This commit is contained in:
Paul 2001-07-27 15:19:36 +00:00
parent f204d4d1af
commit f183b0965f
2 changed files with 53 additions and 6 deletions

View File

@ -765,11 +765,10 @@ if(newmode!=-1)
/// ///
#ifdef __USER_paul__ #ifdef __USER_paul__
if(PadGetDown(0)&PAD_TRIANGLE) //if(PadGetDown(0)&PAD_TRIANGLE)
{ //{
// CSoundMediator::setVolume(CSoundMediator::VOL_SONG,0); // addLife();
// m_currentPlayerModeClass->setState(STATE_CELEBRATE); //}
}
#endif #endif
/// ///
@ -1208,6 +1207,12 @@ if(PadGetDown(0)&PAD_TRIANGLE)
// Restore flipped camera // Restore flipped camera
setReverseCameraMovement(false); setReverseCameraMovement(false);
// flashing pants..
if(m_pantFlashTimer)
{
m_pantFlashTimer-=_frames;
}
CPlayerThing::think(_frames); CPlayerThing::think(_frames);
} }
@ -1625,6 +1630,25 @@ void CPlayer::addLife()
{ {
gameSlot->m_lives++; gameSlot->m_lives++;
} }
m_pantFlashTimer=PANT_FLASH_TIME;
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayer::addSpatula(int Count=1)
{
m_numSpatulasHeld+=Count;
if(!m_hasReceivedExtraLifeFor100Spats&&m_numSpatulasHeld==100)
{
addLife();
m_hasReceivedExtraLifeFor100Spats=true;
}
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
@ -1918,6 +1942,8 @@ void CPlayer::respawn()
m_bubbleAmmo=INITIAL_BUBBLE_BLOWER_AMMO; m_bubbleAmmo=INITIAL_BUBBLE_BLOWER_AMMO;
m_jellyAmmo=INITIAL_JELLY_LAUNCHER_AMMO; m_jellyAmmo=INITIAL_JELLY_LAUNCHER_AMMO;
m_jellyfishAmmoCount=0; m_jellyfishAmmoCount=0;
m_pantFlashTimer=0;
m_hasReceivedExtraLifeFor100Spats=false;
m_moveVelocity.vx=m_moveVelocity.vy=0; m_moveVelocity.vx=m_moveVelocity.vy=0;
@ -2034,6 +2060,22 @@ void CPlayer::renderSb(DVECTOR *_pos,int _animNo,int _animFrame)
} }
setSemiTrans(ft4,trans); setSemiTrans(ft4,trans);
// Pants?
if(m_pantFlashTimer>0)
{
SpriteBank *sb=CGameScene::getSpriteBank();
sFrameHdr *fh;
DVECTOR drawPos;
int size;
fh=sb->getFrameHeader(FRM__PANTS);
drawPos=*_pos;
drawPos.vy+=PANT_FLASH_Y_OFFSET;
size=m_pantFlashTimer&8?4096:8192;
ft4=sb->printRotatedScaledSprite(fh,drawPos.vx,drawPos.vy,size,size,0,0);
}
} }

View File

@ -251,7 +251,7 @@ public:
void setLedgeLookAhead(int _lookAhead); void setLedgeLookAhead(int _lookAhead);
void addLife(); void addLife();
void addSpatula(int Count=1) {m_numSpatulasHeld+=Count;} void addSpatula(int Count=1);
int getSpatulasHeld() {return m_numSpatulasHeld;} int getSpatulasHeld() {return m_numSpatulasHeld;}
ATTACK_STATE getAttackState(); ATTACK_STATE getAttackState();
int isRecoveringFromHit() {return m_invincibleFrameCount!=0||m_currentMode==PLAYER_MODE_DEAD;} int isRecoveringFromHit() {return m_invincibleFrameCount!=0||m_currentMode==PLAYER_MODE_DEAD;}
@ -404,6 +404,9 @@ private:
JELLY_LAUNCHER_AMMO_IN_PICKUP=6, JELLY_LAUNCHER_AMMO_IN_PICKUP=6,
MAX_JELLY_LAUNCHER_AMMO=99, MAX_JELLY_LAUNCHER_AMMO=99,
PANT_FLASH_TIME=128,
PANT_FLASH_Y_OFFSET=-90,
MAX_JELLFISH_IN_NET=5, MAX_JELLFISH_IN_NET=5,
}; };
public: public:
@ -448,6 +451,8 @@ private:
int m_jellyAmmo; int m_jellyAmmo;
int m_jellyfishAmmoCount; int m_jellyfishAmmoCount;
int m_isInWater; int m_isInWater;
int m_pantFlashTimer;
int m_hasReceivedExtraLifeFor100Spats;
// Platforms // Platforms
public: public: