diff --git a/makefile.gfx b/makefile.gfx index 3ec697365..5880c1f7e 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -170,10 +170,11 @@ cleananims: cleanplayeranims ANIM_OUT_DIR := $(DATA_OUT)/anims PLAYER_ANIM_IN_DIR := $(ACTOR_IN_DIR)/SpongeBob/SbAnim/GinFiles -# float hitground01 idlegeneric01 idlegeneric02 idlegeneric03 idlegeneric04 idlegeneric05 -PLAYER_ANIM_LIST := buttbounce deathelectric deathfall electricshock fall fireaim firerecoill getup hover idleboots idlecoral \ - idlecoral01 idlelauncher idlenet jumpend jumpstart karate \ - knockback knockforward netfirelob netswipe netswipejump run runjumpend runjumpstart runstart runstop soakup teeterback teeterfront wakeup + +# DUFF_ANIMS deathfall runjumpend runjumpstart +PLAYER_ANIM_LIST := buttbounceend buttbouncestart deathbackwards deathdry deathforwards deathspin deathtar electricshock electricshockend electricshockstart faceback facefront \ + fall getup getuprun hitground hover hoverend hoverstart idlebreathe idlehoola idlelook idlewigglearm jumpend karate knockback knockforward run \ + runstart runstop soakup talk01 talk02 talk03 talk04 teeterback teeterfront PLAYER_ANIM_IN := $(foreach FILE, $(PLAYER_ANIM_LIST),$(PLAYER_ANIM_IN_DIR)/$(FILE).gin) PLAYER_ANIM_OUT := $(ANIM_OUT_DIR)/Player.Abk @@ -189,7 +190,6 @@ $(PLAYER_ANIM_OUT) : $(PLAYER_ANIM_IN) @$(MKANIM3D) $(PLAYER_ANIM_IN) -o:$(PLAYER_ANIM_OUT) -i:$(PLAYER_ANIM_INC) -s:256 GFX_DATA_OUT += $(PLAYER_ANIM_OUT) - #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Text translations diff --git a/source/gfx/animtex.cpp b/source/gfx/animtex.cpp index 6418fec92..25136165a 100644 --- a/source/gfx/animtex.cpp +++ b/source/gfx/animtex.cpp @@ -15,6 +15,7 @@ #endif CAnimTex *AnimTexList=0; +CMoveTex *MoveTexList=0; /*****************************************************************************/ CAnimTex::CAnimTex() @@ -145,8 +146,50 @@ int Time = GameState::getFramesSinceLast(); ThisTex->Count%=(ThisTex->Rect.h<<2); ThisTex=ThisTex->NextTex; } + CMoveTex::MoveTex(); + +} + +/*****************************************************************************/ +/*****************************************************************************/ +/*****************************************************************************/ +CMoveTex::CMoveTex() +{ + NextTex=0; +} + +/*****************************************************************************/ +void CMoveTex::Add(sTexInfo &SrcFrame,sTexInfo &DstFrame) +{ +CMoveTex *ThisTex=new ("CMoveTex::AddMoveTex") CMoveTex; + +// ASSERT(SrcFrame.w==DstFrame.w); +// ASSERT(SrcFrame.h==DstFrame.h); + + ThisTex->NextTex=MoveTexList; + MoveTexList=ThisTex; + + ThisTex->Src=&SrcFrame; + ThisTex->Dst=&DstFrame; + +} + +/*****************************************************************************/ +void CMoveTex::MoveTex() +{ +CMoveTex *ThisTex=MoveTexList,*NextTex; + + while (ThisTex) + { + MoveImage((RECT*)ThisTex->Src,ThisTex->Dst->x,ThisTex->Dst->y); + NextTex=ThisTex->NextTex; + delete ThisTex; + ThisTex=NextTex; + } + MoveTexList=0; } /*****************************************************************************/ + diff --git a/source/gfx/animtex.h b/source/gfx/animtex.h index 18751a2ff..bfb762723 100644 --- a/source/gfx/animtex.h +++ b/source/gfx/animtex.h @@ -6,6 +6,7 @@ #define _ANIMTEX_HEADER_ #include "gfx\tpage.h" +#include /*****************************************************************************/ class CAnimTex @@ -30,6 +31,22 @@ private: }; +/*****************************************************************************/ +class CMoveTex +{ +public: + CMoveTex(); +// ~CMoveTex(); + +static void Add(sTexInfo &SrcFrame,sTexInfo &DstFrame); +static void MoveTex(); + +private: + CMoveTex *NextTex; + sTexInfo *Src,*Dst; + +}; + /*****************************************************************************/ #endif \ No newline at end of file