This commit is contained in:
parent
cb067e3db8
commit
44ff77f5a2
@ -592,12 +592,14 @@ m_animFrame=0;
|
||||
|
||||
// Always ( cept for one level ) need this
|
||||
registerAddon(PLAYER_ADDON_GLOVE);
|
||||
// registerAddon(PLAYER_ADDON_NET);
|
||||
// registerAddon(PLAYER_ADDON_CORALBLOWER);
|
||||
// registerAddon(PLAYER_ADDON_JELLYLAUNCHER);
|
||||
// registerAddon(PLAYER_ADDON_GLASSES);
|
||||
// registerAddon(PLAYER_ADDON_BUBBLEWAND);
|
||||
// registerAddon(PLAYER_ADDON_JELLYFISHINNET);
|
||||
#ifdef __USER_paul__
|
||||
registerAddon(PLAYER_ADDON_NET);
|
||||
registerAddon(PLAYER_ADDON_CORALBLOWER);
|
||||
registerAddon(PLAYER_ADDON_JELLYLAUNCHER);
|
||||
registerAddon(PLAYER_ADDON_GLASSES);
|
||||
registerAddon(PLAYER_ADDON_BUBBLEWAND);
|
||||
registerAddon(PLAYER_ADDON_JELLYFISHINNET);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -1504,6 +1506,7 @@ void CPlayer::respawn()
|
||||
m_invincibilityRingTimer=0;
|
||||
m_bubbleAmmo=0;
|
||||
m_jellyAmmo=0;
|
||||
m_jellyfishAmmo=0;
|
||||
|
||||
m_moveVelocity.vx=m_moveVelocity.vy=0;
|
||||
|
||||
@ -1524,14 +1527,23 @@ void CPlayer::respawn()
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayer::renderSb(DVECTOR *_pos,int _animNo,int _animFrame)
|
||||
{
|
||||
POLY_FT4 *ft4;
|
||||
int playerMode;
|
||||
int trans;
|
||||
int addon;
|
||||
POLY_FT4 *ft4;
|
||||
|
||||
if(m_currentMode==PLAYER_MODE_DEAD)
|
||||
{
|
||||
playerMode=m_lastModeBeforeDeath;
|
||||
}
|
||||
else
|
||||
{
|
||||
playerMode=m_currentMode;
|
||||
}
|
||||
trans=m_invincibleFrameCount||m_invincibilityRingTimer;
|
||||
|
||||
// Render an addon?
|
||||
addon=s_addonNumbers[m_currentMode];
|
||||
addon=s_addonNumbers[playerMode];
|
||||
if(addon!=NO_ADDON)
|
||||
{
|
||||
s8 addonAnimNo=s_animMapNet[addon][_animNo];
|
||||
@ -1554,7 +1566,7 @@ void CPlayer::renderSb(DVECTOR *_pos,int _animNo,int _animFrame)
|
||||
}
|
||||
|
||||
// Render JFish in a net?
|
||||
if(m_currentMode==PLAYER_MODE_NET&&m_currentPlayerModeClass->isJellyfishNetFull())
|
||||
if(playerMode==PLAYER_MODE_NET&&getJellyFishAmmo())
|
||||
{
|
||||
s8 addonAnimNo=s_animMapNet[PLAYER_ADDON_JELLYFISHINNET][_animNo];
|
||||
if(addonAnimNo!=-1)
|
||||
@ -1575,6 +1587,7 @@ void CPlayer::renderSb(DVECTOR *_pos,int _animNo,int _animFrame)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Render glasses addon?
|
||||
if(isWearingGlasses())
|
||||
{
|
||||
|
@ -360,6 +360,11 @@ public:
|
||||
void useOneJelly() {m_jellyAmmo--;}
|
||||
int getJellyAmmo() {return m_jellyAmmo;}
|
||||
|
||||
void giveJellyFishAmmo() {if(!isJellyFishAmmoFull())m_jellyfishAmmo++;}
|
||||
void useOneJellyFishAmmo() {m_jellyfishAmmo--;}
|
||||
int isJellyFishAmmoFull() {return m_jellyfishAmmo==5;}
|
||||
int getJellyFishAmmo() {return m_jellyfishAmmo;}
|
||||
|
||||
void setIsInWater(int _in) {m_isInWater=_in;}
|
||||
int getIsInWater() {return m_isInWater;}
|
||||
int getIsHealthFullSoICanStopSoakingUp() {return m_healthWaterLevel==WATERMAXHEALTH;}
|
||||
@ -376,6 +381,7 @@ private:
|
||||
int m_divingHelmet;
|
||||
int m_bubbleAmmo;
|
||||
int m_jellyAmmo;
|
||||
int m_jellyfishAmmo;
|
||||
int m_isInWater;
|
||||
|
||||
// Platforms
|
||||
|
@ -88,7 +88,6 @@ void CPlayerModeNet::enter()
|
||||
{
|
||||
CPlayerModeBase::enter();
|
||||
m_netState=NET_STATE__INERT;
|
||||
m_jellyfishHeld=0;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -140,11 +139,11 @@ void CPlayerModeNet::think()
|
||||
padDown=getPadInputDown();
|
||||
if(padDown&(PI_CATCH|PI_FIRE)&&canSwingNetFromThisState())
|
||||
{
|
||||
if(padDown&PI_CATCH&&m_jellyfishHeld<5)
|
||||
if(padDown&PI_CATCH&&!m_player->isJellyFishAmmoFull())
|
||||
{
|
||||
m_netState=NET_STATE__CATCHING;
|
||||
}
|
||||
else if(padDown&PI_FIRE&&m_jellyfishHeld)
|
||||
else if(padDown&PI_FIRE&&m_player->getJellyFishAmmo())
|
||||
{
|
||||
m_netState=NET_STATE__LAUNCHING;
|
||||
}
|
||||
@ -196,11 +195,11 @@ void CPlayerModeNet::think()
|
||||
((CNpcEnemy*)thing)->caughtWithNet();
|
||||
m_netState=NET_STATE__JUST_CAUGHT_SOMETHING;
|
||||
thing=NULL;
|
||||
if(m_jellyfishHeld==0)
|
||||
if(m_player->getJellyFishAmmo()==0)
|
||||
{
|
||||
m_netSin=0;
|
||||
}
|
||||
m_jellyfishHeld++;
|
||||
m_player->giveJellyFishAmmo();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -241,7 +240,7 @@ void CPlayerModeNet::think()
|
||||
projectile->updateCollisionArea();
|
||||
|
||||
m_netState=NET_STATE__JUST_LAUNCHED_SOMETHING;
|
||||
m_jellyfishHeld--;
|
||||
m_player->useOneJellyFishAmmo();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -263,7 +262,7 @@ void CPlayerModeNet::think()
|
||||
}
|
||||
}
|
||||
|
||||
if(m_jellyfishHeld)
|
||||
if(m_player->getJellyFishAmmo())
|
||||
{
|
||||
m_netSin=(m_netSin+npspeed)&4095;
|
||||
}
|
||||
@ -283,7 +282,7 @@ void CPlayerModeNet::think()
|
||||
|
||||
sb=m_player->getSpriteBank();
|
||||
fh=sb->getFrameHeader(FRM__NET);
|
||||
if(m_jellyfishHeld)
|
||||
if(m_player->getJellyFishAmmo())
|
||||
{
|
||||
POLY_FT4 *ft4;
|
||||
|
||||
@ -299,7 +298,7 @@ void CPlayerModeNet::think()
|
||||
sb->printFT4(fh,CPlayer::POWERUPUI_ICONX,CPlayer::POWERUPUI_ICONY,0,0,CPlayer::POWERUPUI_OT);
|
||||
}
|
||||
|
||||
sprintf(buf,"x%d",m_jellyfishHeld);
|
||||
sprintf(buf,"x%d",m_player->getJellyFishAmmo());
|
||||
m_player->getFontBank()->print(CPlayer::POWERUPUI_TEXTX,CPlayer::POWERUPUI_TEXTY,buf);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
virtual void enter();
|
||||
virtual void think();
|
||||
virtual void renderModeUi();
|
||||
virtual int isJellyfishNetFull() {return m_jellyfishHeld!=0;}
|
||||
|
||||
virtual void setAnimNo(int _animNo);
|
||||
virtual void setAnimFrame(int _animFrame);
|
||||
@ -61,7 +60,6 @@ private:
|
||||
int m_netFrame;
|
||||
NetState m_netState;
|
||||
int m_netSin;
|
||||
int m_jellyfishHeld;
|
||||
|
||||
};
|
||||
|
||||
|
@ -93,7 +93,6 @@ public:
|
||||
virtual int canDoLookAround() {return false;}
|
||||
virtual void springPlayerUp() {;}
|
||||
void inSoakUpState();
|
||||
virtual int isJellyfishNetFull() {ASSERT(0);return false;} // Fugly..
|
||||
|
||||
virtual int setState(int _state) {return 0;}
|
||||
virtual int getState() {return STATE_IDLE;} // ARSE.. states need to go back in CPlayer! (pkg)
|
||||
|
Loading…
Reference in New Issue
Block a user