From bb39b3c5a1fc19f58fa7d37bfaab314e07e60feb Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Jul 2001 01:18:20 +0000 Subject: [PATCH] --- source/gfx/actor.cpp | 14 ++++++++++++++ source/gfx/actor.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/source/gfx/actor.cpp b/source/gfx/actor.cpp index 2f0e54e4c..b3c669a80 100644 --- a/source/gfx/actor.cpp +++ b/source/gfx/actor.cpp @@ -710,6 +710,20 @@ int YMin,YMax; return(Ft4); } +/*****************************************************************************/ +void CActorGfx::getFrameOffsets(int _anim,int _frame,int *_x,int *_y) +{ + sSpriteAnimBank *SpriteBank; + sSpriteAnim *ThisAnim; + sSpriteFrame *pFrame; + + SpriteBank=PoolEntry->ActorGfx; + ThisAnim=SpriteBank->AnimList+_anim; + pFrame=&ThisAnim->Anim[_frame]; + *_x=pFrame->XOfs; + *_y=pFrame->YOfs; +} + /*****************************************************************************/ void CActorGfx::SetUpFT4(POLY_FT4 *Ft4,sPoolNode *Node,int X,int Y,bool XFlip,bool YFlip) { diff --git a/source/gfx/actor.h b/source/gfx/actor.h index 0f4ed5f42..fea0d6b58 100644 --- a/source/gfx/actor.h +++ b/source/gfx/actor.h @@ -142,6 +142,7 @@ virtual ~CActorGfx(); POLY_FT4 *Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX=false,bool FlipY=false); POLY_FT4 *RotateScale(POLY_FT4 *Ft4,DVECTOR &Pos,int Angle,int XScale,int YScale); + void getFrameOffsets(int _anim,int _frame,int *_x,int *_y); int getFrameCount(int Anim) {return(PoolEntry->ActorGfx->AnimList[Anim].FrameCount);} int GetTotalFrameCount() {return(PoolEntry->ActorGfx->FrameCount);} @@ -152,6 +153,7 @@ virtual ~CActorGfx(); // void SetShadowOfs(int X,int Y) {ShadowXOfs=X; ShadowYOfs=Y;} void SetOtPos(int Ot) {OtPos=Ot;} + protected: void SetUpFT4(POLY_FT4 *Ft4,sPoolNode *Node,int X,int Y,bool XFlip,bool YFlip);