This commit is contained in:
parent
1189ae7989
commit
5cbd3fe4ab
2 changed files with 15 additions and 3 deletions
|
@ -22,6 +22,8 @@ void CFXGeyser::init(DVECTOR const &_Pos)
|
||||||
Height=TargetHeight=8;
|
Height=TargetHeight=8;
|
||||||
currentFrame=FRM__GUSH000;
|
currentFrame=FRM__GUSH000;
|
||||||
SoundId = NOT_PLAYING;
|
SoundId = NOT_PLAYING;
|
||||||
|
BasePos=_Pos;
|
||||||
|
OtPos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -39,7 +41,7 @@ void CFXGeyser::shutdown()
|
||||||
void CFXGeyser::think(int Frames)
|
void CFXGeyser::think(int Frames)
|
||||||
{
|
{
|
||||||
CFX::think(Frames);
|
CFX::think(Frames);
|
||||||
|
Pos=BasePos;
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
if (currentFrame>FRM__GUSH003)
|
if (currentFrame>FRM__GUSH003)
|
||||||
{
|
{
|
||||||
|
@ -57,6 +59,7 @@ DVECTOR RenderPos;
|
||||||
POLY_FT4 *Ft4;
|
POLY_FT4 *Ft4;
|
||||||
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
||||||
CThing *Parent=getParent();
|
CThing *Parent=getParent();
|
||||||
|
int W;
|
||||||
|
|
||||||
getFXRenderPos(RenderPos);
|
getFXRenderPos(RenderPos);
|
||||||
if (!canRender() || Flags & FX_FLAG_HIDDEN) return;
|
if (!canRender() || Flags & FX_FLAG_HIDDEN) return;
|
||||||
|
@ -95,10 +98,13 @@ CThing *Parent=getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// top
|
// top
|
||||||
Ft4=SprBank->printFT4(currentFrame,RenderPos.vx,RenderPos.vy-Height,0,0,OtPos);
|
Ft4=SprBank->printFT4(currentFrame,RenderPos.vx-8,RenderPos.vy-Height,0,0,OtPos);
|
||||||
setShadeTex(Ft4,0);
|
setShadeTex(Ft4,0);
|
||||||
setRGB0(Ft4,RGB.R,RGB.G,RGB.B);
|
setRGB0(Ft4,RGB.R,RGB.G,RGB.B);
|
||||||
setSemiTrans(Ft4,Flags & FX_FLAG_TRANS);
|
setSemiTrans(Ft4,Flags & FX_FLAG_TRANS);
|
||||||
|
W=(Ft4->x1-Ft4->x0)/2;
|
||||||
|
Ft4->x0-=W; Ft4->x1+=W;
|
||||||
|
Ft4->x2-=W; Ft4->x3+=W;
|
||||||
|
|
||||||
int FrameW=Ft4->x1-Ft4->x0;
|
int FrameW=Ft4->x1-Ft4->x0;
|
||||||
setCollisionCentreOffset(FrameW>>1,-Height/2);
|
setCollisionCentreOffset(FrameW>>1,-Height/2);
|
||||||
|
@ -106,13 +112,18 @@ int FrameW=Ft4->x1-Ft4->x0;
|
||||||
setCollisionSize(FrameW,Height);
|
setCollisionSize(FrameW,Height);
|
||||||
|
|
||||||
// Base
|
// Base
|
||||||
Ft4=SprBank->printFT4(FRM__GUSHBASE,RenderPos.vx,RenderPos.vy,0,0,OtPos);
|
Ft4=SprBank->printFT4(FRM__GUSHBASE,RenderPos.vx-8,RenderPos.vy,currentFrame&2,0/*currentFrame&2*/,OtPos);
|
||||||
setShadeTex(Ft4,0);
|
setShadeTex(Ft4,0);
|
||||||
setRGB0(Ft4,RGB.R,RGB.G,RGB.B);
|
setRGB0(Ft4,RGB.R,RGB.G,RGB.B);
|
||||||
setSemiTrans(Ft4,Flags & FX_FLAG_TRANS);
|
setSemiTrans(Ft4,Flags & FX_FLAG_TRANS);
|
||||||
|
W=(Ft4->x1-Ft4->x0)/2;
|
||||||
|
Ft4->x0-=W+2; Ft4->x1+=W+2;
|
||||||
|
Ft4->x2-=W-2; Ft4->x3+=W-2;
|
||||||
Ft4->y0=Ft4->y2-Height;
|
Ft4->y0=Ft4->y2-Height;
|
||||||
Ft4->y1=Ft4->y3-Height;
|
Ft4->y1=Ft4->y3-Height;
|
||||||
|
Ft4->v0++; Ft4->v1++;
|
||||||
Ft4->v2--; Ft4->v3--;
|
Ft4->v2--; Ft4->v3--;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ protected:
|
||||||
s16 TargetHeight,Height;
|
s16 TargetHeight,Height;
|
||||||
u16 currentFrame;
|
u16 currentFrame;
|
||||||
int SoundId;
|
int SoundId;
|
||||||
|
DVECTOR BasePos;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue