This commit is contained in:
Daveo 2001-04-02 20:24:58 +00:00
parent 18f18f3b84
commit 7178f52028
3 changed files with 7 additions and 20 deletions

View File

@ -87,20 +87,6 @@ u16 ThisFrame=ThisAnim->Anim[Frame];
return(SpriteBank->FrameList+ThisFrame);
}
/*****************************************************************************/
int CActorGfx::getFrameWidth(int Anim,int Frame)
{
sSpriteFrame *ThisFrame=GetFrame(Anim,Frame);
return(ThisFrame->W);
}
/*****************************************************************************/
int CActorGfx::getFrameHeight(int Anim,int Frame)
{
sSpriteFrame *ThisFrame=GetFrame(Anim,Frame);
return(ThisFrame->H);
}
/*****************************************************************************/
POLY_FT4 *CActorGfx::Render(DVECTOR &Pos,int Anim,int Frame,bool XFlip,bool YFlip,bool Shadow)
{
@ -152,6 +138,8 @@ int H=ThisFrame->H;
Ft4->u1=U;
Ft4->u2=U+W-1;
Ft4->u3=U;
X-=ThisFrame->XOfs;
X-=ThisFrame->W/2;
}
else
{
@ -159,6 +147,7 @@ int H=ThisFrame->H;
Ft4->u1=U+W;
Ft4->u2=U;
Ft4->u3=U+W;
X+=ThisFrame->XOfs;
}
if (YFlip)
@ -167,6 +156,8 @@ int H=ThisFrame->H;
Ft4->v1=V+H-1;
Ft4->v2=V;
Ft4->v3=V;
Y-=ThisFrame->YOfs;
Y-=ThisFrame->H/2;
}
else
{
@ -174,11 +165,9 @@ int H=ThisFrame->H;
Ft4->v1=V;
Ft4->v2=V+H;
Ft4->v3=V+H;
Y+=ThisFrame->YOfs;
}
X-=ThisFrame->XOfs;
Y-=ThisFrame->YOfs;
setXYWH(Ft4,X,Y,W,H);
}

View File

@ -24,10 +24,8 @@ virtual ~CActorGfx();
void Dump();
int getFrameCount(int Anim) {return(SpriteBank->AnimList[Anim].FrameCount);}
int getFrameWidth(int Anim,int Frame);
int getFrameHeight(int Anim,int Frame);
FileEquate GetFilename() {return(Filename);}
private:
void SetUpFT4(POLY_FT4 *Ft4,sSpriteFrame *ThisFrame,int X,int Y,bool XFlip,bool YFlip);
sSpriteFrame *GetFrame(int Anim,int Frame);

Binary file not shown.