This commit is contained in:
Daveo 2001-07-03 16:55:37 +00:00
parent b7f6568e30
commit 3d1889c964
5 changed files with 20 additions and 37 deletions

View file

@ -22,27 +22,18 @@ void CFXBubble::init(DVECTOR const &_Pos)
Life=32+getRndRange(63);
Velocity.vy=-(getRndRange(4)+1);
CurrentScaleX=CurrentScaleY=getRndRange(ONE/2)+(ONE/2);
Die=0;
XIdx=getRnd()&15;
Lifetime = 2 * GameState::getOneSecondInFrames();
}
/*****************************************************************************/
/*** Think *******************************************************************/
/*****************************************************************************/
int XT[16]={ 0,+1,+0,+1,+0, 0,-1,+0,-1,+0,0,+1,+0,+1,+0,};
static const s16 XT[16]={ 0,+1,+0,+1,+0, 0,-1,+0,-1,+0,0,+1,+0,+1,+0,};
void CFXBubble::think(int _frames)
{
if (Lifetime > 0)
{
Lifetime -= _frames;
}
else
{
Die = true;
}
if (Die)
if (Life<=0)
{
if (renderFrame!=FRM__BUBBLEPOP)
{
@ -60,10 +51,3 @@ void CFXBubble::think(int _frames)
XIdx&=15;
}
}
/*****************************************************************************/
void CFXBubble::killFX()
{
Die=1;
}