This commit is contained in:
parent
24ab5fe256
commit
07c36f9bac
@ -86,7 +86,7 @@ CFXBaseAnim::sFXAnim FXFireData=
|
||||
FRM__FIRE01,FRM__FIRE06,
|
||||
1,
|
||||
127,127,127,
|
||||
CFXBaseAnim::FXANIM_FLAG_LOOP,
|
||||
CFXBaseAnim::FXANIM_FLAG_LOOP | CFXBaseAnim::FXANIM_FLAG_TRANS,
|
||||
{0,0},
|
||||
0
|
||||
};
|
||||
|
@ -104,13 +104,10 @@ DVECTOR RenderPos;
|
||||
if (!canRender() || !IsVisible) return;
|
||||
|
||||
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
||||
|
||||
//POLY_FT4 *Ft4=SprBank->printFT4Scaled(renderFrame,RenderPos.vx,RenderPos.vy,0,0,OtPos*0,CurrentScale>>4);
|
||||
POLY_FT4 *Ft4=SprBank->printRotatedScaledSprite(renderFrame,RenderPos.vx,RenderPos.vy,CurrentScaleX,CurrentScaleY,CurrentHeading,OtPos*0);
|
||||
Ft4->u1--; Ft4->u3--;
|
||||
Ft4->v2--; Ft4->v3--;
|
||||
POLY_FT4 *Ft4=SprBank->printRotatedScaledSprite(renderFrame,RenderPos.vx,RenderPos.vy,CurrentScaleX,CurrentScaleY,CurrentHeading,OtPos);
|
||||
setShadeTex(Ft4,0);
|
||||
setRGB0(Ft4,DataPtr->R,DataPtr->G,DataPtr->B);
|
||||
setSemiTrans(Ft4,DataPtr->Flags & FXANIM_FLAG_TRANS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
FXANIM_FLAG_HAS_GRAVITY =1<<2,
|
||||
FXANIM_FLAG_INJURE_PLAYER =1<<3,
|
||||
FXANIM_FLAG_KILL_PLAYER =1<<4,
|
||||
FXANIM_FLAG_TRANS =1<<5,
|
||||
};
|
||||
|
||||
virtual void init(DVECTOR const &Pos);
|
||||
|
@ -83,7 +83,7 @@ DVECTOR RenderPos;
|
||||
RenderPos.vy+=ThisElem.Ofs.vy>>2;
|
||||
if (ThisElem.Shade)
|
||||
{
|
||||
Ft4=SprBank->printRotatedScaledSprite(ThisElem.Frame,RenderPos.vx,RenderPos.vy,ThisElem.Scale,ThisElem.Scale,ThisElem.Angle,OtPos*0);
|
||||
Ft4=SprBank->printRotatedScaledSprite(ThisElem.Frame,RenderPos.vx,RenderPos.vy,ThisElem.Scale,ThisElem.Scale,ThisElem.Angle,OtPos);
|
||||
setShadeTex(Ft4,0);
|
||||
setRGB0(Ft4,ThisElem.Shade,ThisElem.Shade,ThisElem.Shade);
|
||||
setSemiTrans(Ft4,1);
|
||||
|
@ -86,7 +86,7 @@
|
||||
|
||||
#include "gfx\actor.h"
|
||||
|
||||
int RenderZ=256;
|
||||
int RenderZ=378;//256; Increased to make depth less, and SB more visible
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
@ -61,12 +61,10 @@ int SlotW=+32000,SlotH=+32000;
|
||||
|
||||
if (SlotList[Slot].Width<W)
|
||||
{
|
||||
// DAVE_DBGMSG("Adjusted Slot Width from %i to %i\n",SlotList[Slot].Width,W);
|
||||
SlotList[Slot].Width=W;
|
||||
}
|
||||
if (SlotList[Slot].Height<H)
|
||||
{
|
||||
// DAVE_DBGMSG("Adjusted Slot Height from %i to %i\n",SlotList[Slot].Height,H);
|
||||
SlotList[Slot].Height=H;
|
||||
}
|
||||
|
||||
@ -256,9 +254,9 @@ sPoolNode *List;
|
||||
for (int X=0; X<W; X++)
|
||||
{
|
||||
int U=(X*ThisSlot->Width);
|
||||
int V=Y*ThisSlot->Height;
|
||||
int TexX=CACHE_X+CurrentTPX+(U>>2);
|
||||
int TexY=CACHE_Y+V;
|
||||
int V=(Y*ThisSlot->Height);
|
||||
int TexX=(CACHE_X+CurrentTPX+(U>>2));
|
||||
int TexY=(CACHE_Y+V);
|
||||
|
||||
List->Frame=0;
|
||||
List->DstRect.x=TexX;
|
||||
@ -654,12 +652,16 @@ int dX,dY;
|
||||
int CosAngle,SinAngle;
|
||||
int CosX,CosY,SinX,SinY;
|
||||
sBBox SBox,CBox;
|
||||
|
||||
int W=Ft4->x1-Ft4->x0;
|
||||
int H=Ft4->y2-Ft4->y0;
|
||||
|
||||
Angle&=4095;
|
||||
|
||||
dX=(CurrentFrameGfx->W*XScale)>>(12+1); // +1 for half
|
||||
dY=(CurrentFrameGfx->H*YScale)>>(12);
|
||||
// dX=(CurrentFrameGfx->W*XScale)>>(12+1); // +1 for half
|
||||
// dY=(CurrentFrameGfx->H*YScale)>>(12);
|
||||
|
||||
dX=(W*XScale)>>(12+1); // +1 for half
|
||||
dY=(H*YScale)>>(12);
|
||||
|
||||
CosAngle=mcos(Angle);
|
||||
SinAngle=msin(Angle);
|
||||
@ -727,9 +729,9 @@ u8 V=Node->V;
|
||||
X-=CurrentFrame->XOfs;
|
||||
X-=W;
|
||||
Ft4->u0=U+W-1;
|
||||
Ft4->u1=U;//-1;
|
||||
Ft4->u1=U;//-1;//
|
||||
Ft4->u2=U+W-1;
|
||||
Ft4->u3=U;//-1;
|
||||
Ft4->u3=U;//-1;//
|
||||
|
||||
}
|
||||
else
|
||||
@ -748,8 +750,8 @@ u8 V=Node->V;
|
||||
Y-=H;
|
||||
Ft4->v0=V+H-1;
|
||||
Ft4->v1=V+H-1;
|
||||
Ft4->v2=V;//-1;
|
||||
Ft4->v3=V;//-1;
|
||||
Ft4->v2=V-1;//
|
||||
Ft4->v3=V-1;//
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -761,6 +763,7 @@ u8 V=Node->V;
|
||||
}
|
||||
|
||||
setXYWH(Ft4,X,Y,W,H);
|
||||
CorrectAspect(Ft4);
|
||||
}
|
||||
|
||||
|
||||
|
@ -172,3 +172,5 @@ LINE_G2 *DrawGLine(int _x0,int _y0,int _x1,int _y1,int _r1,int _g1,int _b1,int
|
||||
AddPrimToList(lg2,_ot);
|
||||
return lg2;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -349,6 +349,31 @@ inline void GetFrameWH(sFrameHdr *Fr,u8 *W,u8 *H) {*W=Fr->W; *H=Fr->H;}
|
||||
inline int GetFrameClut(sFrameHdr *Fr) {return(Fr->Clut);}
|
||||
inline int GetFrameTPage(sFrameHdr *Fr) {return(Fr->TPage);}
|
||||
|
||||
const int aspectX=4096+1024;//(512<<12)/320;
|
||||
//int aspectY=(256<<12)/320;
|
||||
inline void CorrectAspect(POLY_FT4 *P)
|
||||
{
|
||||
int W=P->x1-P->x0;
|
||||
int aW=(W*aspectX)>>12;
|
||||
int dW=(W-aW)>>1;
|
||||
|
||||
P->x0+=dW;
|
||||
P->x1-=dW;
|
||||
P->x2+=dW;
|
||||
P->x3-=dW;
|
||||
}
|
||||
inline void CorrectAspect(POLY_GT4 *P)
|
||||
{
|
||||
int W=P->x1-P->x0;
|
||||
int aW=(W*aspectX)>>12;
|
||||
int dW=(W-aW)>>1;
|
||||
|
||||
P->x0+=dW;
|
||||
P->x1-=dW;
|
||||
P->x2+=dW;
|
||||
P->x3-=dW;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -268,6 +268,7 @@ void SpriteBank::prepareFT4(POLY_FT4 *_ft4,sFrameHdr *_fh,int _x,int _y,bool _xF
|
||||
|
||||
setXYWH(_ft4,_x,_y,W,H);
|
||||
setUVTp(_fh,_ft4,_xFlip,_yFlip);
|
||||
//!! CorrectAspect(_ft4);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -337,6 +338,7 @@ void SpriteBank::prepareFT4Scaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _x,int _y,bo
|
||||
|
||||
setXYWH(_ft4,_x,_y,W,H);
|
||||
setUVTp(_fh,_ft4,_xFlip,_yFlip);
|
||||
//!! CorrectAspect(_ft4);
|
||||
}
|
||||
|
||||
|
||||
@ -411,6 +413,8 @@ void SpriteBank::prepareFT4RotatedScaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _xCen
|
||||
_ft4->tpage=_fh->TPage;
|
||||
_ft4->clut=_fh->Clut;
|
||||
////////////////////////////////
|
||||
//!! CorrectAspect(_ft4);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user