diff --git a/Graphics/characters/SpongeBob/AnimList.Txt b/Graphics/characters/SpongeBob/AnimList.Txt index 19616a6f1..1b255e55c 100644 --- a/Graphics/characters/SpongeBob/AnimList.Txt +++ b/Graphics/characters/SpongeBob/AnimList.Txt @@ -9,7 +9,6 @@ Jump Run RunStop RunStart -SoakUp TeeterBack TeeterFront Swipe diff --git a/Graphics/characters/SpongeBob_JellyFish/AnimList.Txt b/Graphics/characters/SpongeBob_JellyFish/AnimList.Txt index 3f18ea715..90e1cab8a 100644 --- a/Graphics/characters/SpongeBob_JellyFish/AnimList.Txt +++ b/Graphics/characters/SpongeBob_JellyFish/AnimList.Txt @@ -9,7 +9,6 @@ Jump Run RunStop RunStart -SoakUp TeeterBack TeeterFront Swipe diff --git a/Graphics/characters/SpongeBob_JellyLauncher/AnimList.Txt b/Graphics/characters/SpongeBob_JellyLauncher/AnimList.Txt index 5f8f3c839..3921d08f3 100644 --- a/Graphics/characters/SpongeBob_JellyLauncher/AnimList.Txt +++ b/Graphics/characters/SpongeBob_JellyLauncher/AnimList.Txt @@ -11,7 +11,6 @@ Jump Run RunStop RunStart -SoakUp TeeterBack TeeterFront DeathSpin diff --git a/Graphics/characters/SpongeBob_Net/AnimList.Txt b/Graphics/characters/SpongeBob_Net/AnimList.Txt index fc68bac1b..e34ff7830 100644 --- a/Graphics/characters/SpongeBob_Net/AnimList.Txt +++ b/Graphics/characters/SpongeBob_Net/AnimList.Txt @@ -9,7 +9,6 @@ Jump Run RunStop RunStart -SoakUp TeeterBack TeeterFront Swipe diff --git a/source/game/game.cpp b/source/game/game.cpp index 8f5d4d8b8..6882007af 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -200,6 +200,8 @@ void CGameScene::init() CFader::setFadingIn(); initLevel(); + m_gamestate=GAMESTATE_SHOWING_LIVES; + m_showingLivesTimer=0; } /*****************************************************************************/ // This is a seperate funtion ( and virtual ) so that we can overload it for @@ -214,7 +216,7 @@ void CGameScene::createPlayer() // This is also to be overloaded for demomode.. to stop the pause menu appearing int CGameScene::canPause() { - return true; + return m_gamestate==GAMESTATE_PLAYING; } @@ -233,6 +235,71 @@ void CGameScene::shutdown() /*****************************************************************************/ void CGameScene::render() +{ + switch(m_gamestate) + { + case GAMESTATE_SHOWING_LIVES: + render_showing_lives(); + break; + case GAMESTATE_PLAYING: + render_playing(); + break; + } +} + +/*****************************************************************************/ +void CGameScene::render_showing_lives() +{ + int colour; + POLY_F4 *f4; + POLY_FT3 *ft3; + + + colour=m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT; + if(colour<0) + { + colour=0; + } + else + { + colour*=SPEED_OF_FADE; + if(colour>255) + { + colour=255; + } + } + colour=255-colour; + + // Text + s_genericFont->setJustification(FontBank::JUST_CENTRE); + s_genericFont->setColour(colour,colour,colour); + s_genericFont->setTrans(1); + s_genericFont->setSMode(1); + s_genericFont->print(256,50,"Now entering:"); + s_genericFont->print(256,80,Level.getChapterLoadingText()); + s_genericFont->print(256,100,Level.getLevelLoadingText()); + s_genericFont->print(256,140,"Lives x 5"); + + // Black background + f4=GetPrimF4(); + setXYWH(f4,0,0,512,256); + setRGB0(f4,colour,colour,colour); + setShadeTex(f4,0); + setSemiTrans(f4,1); + AddPrimToList(f4,0); + ft3=GetPrimFT3(); + setPolyFT3(ft3); + setShadeTex(ft3,1); + setSemiTrans(ft3,1); + ft3->tpage=2<<5; + setXY3(ft3,512,512,512,512,512,512); + AddPrimToList(ft3,0); + + render_playing(); +} + +/*****************************************************************************/ +void CGameScene::render_playing() { // CamMtx.t[2]=ZPos; // Temp @@ -264,6 +331,50 @@ void CGameScene::render() /*****************************************************************************/ void CGameScene::think(int _frames) +{ + switch(m_gamestate) + { + case GAMESTATE_SHOWING_LIVES: + think_showing_lives(_frames); + break; + case GAMESTATE_PLAYING: + think_playing(_frames); + break; + } +} + +/*****************************************************************************/ +void CGameScene::think_showing_lives(int _frames) +{ + if(m_showingLivesTimer==0) + { + think_playing(0); + } + else if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>128) + { + think_playing(_frames); + } + + if(PadGetDown(0)&PAD_CROSS&&m_showingLivesTimerignoreNewlyPressedButtonsOnPadThisThink(); + } + + if(_frames>2) + { + _frames=2; + } + m_showingLivesTimer+=_frames; + + if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>255) + { + m_gamestate=GAMESTATE_PLAYING; + } +} + +/*****************************************************************************/ +void CGameScene::think_playing(int _frames) { if(s_readyToExit) { @@ -398,7 +509,6 @@ void CGameScene::think(int _frames) } } - /*****************************************************************************/ int CGameScene::readyToShutdown() { @@ -431,6 +541,8 @@ void CGameScene::respawnLevel() { m_player->respawn(); Level.respawnLevel(); + m_gamestate=GAMESTATE_SHOWING_LIVES; + m_showingLivesTimer=0; } diff --git a/source/game/game.h b/source/game/game.h index aa1dfaf26..f36200dde 100644 --- a/source/game/game.h +++ b/source/game/game.h @@ -61,6 +61,30 @@ static void setBossHasBeenKilled() {s_bossHasBeenKilled=true;} static int getBossHasBeenKilled() {return s_bossHasBeenKilled;} static void dropHealth(DVECTOR &Pos,int Amount,int Vel); + + +private: + typedef enum + { + GAMESTATE_SHOWING_LIVES, + GAMESTATE_PLAYING, + }GAMESTATE; + + enum + { + TIME_TO_DISPLAY_LIVES_COUNT=3*60, + SPEED_OF_FADE=10, + }; + + GAMESTATE m_gamestate; + int m_showingLivesTimer; + + void think_showing_lives(int _frames); + void think_playing(int _frames); + void render_showing_lives(); + void render_playing(); + + protected: void initLevel(); diff --git a/source/player/player.cpp b/source/player/player.cpp index 4b4f3a1ee..e4291baf0 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -314,7 +314,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_NET_RUN, // ANIM_SPONGEBOB_RUN, ANIM_SPONGEBOB_NET_RUNSTOP, // ANIM_SPONGEBOB_RUNSTOP, ANIM_SPONGEBOB_NET_RUNSTART, // ANIM_SPONGEBOB_RUNSTART, - ANIM_SPONGEBOB_NET_SOAKUP, // ANIM_SPONGEBOB_SOAKUP, ANIM_SPONGEBOB_NET_TEETERBACK, // ANIM_SPONGEBOB_TEETERBACK, ANIM_SPONGEBOB_NET_TEETERFRONT, // ANIM_SPONGEBOB_TEETERFRONT, ANIM_SPONGEBOB_NET_SWIPE, // ANIM_SPONGEBOB_SWIPE, @@ -326,7 +325,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= -1, // ANIM_SPONGEBOB_BLOWBUBBLE, -1, // ANIM_SPONGEBOB_FIREEND, -1, // ANIM_SPONGEBOB_FIRESTART, - -1, // ANIM_SPONGEBOB_IDLEWEAPON, + ANIM_SPONGEBOB_NET_IDLEWEAPON, // ANIM_SPONGEBOB_IDLEWEAPON, -1, // ANIM_SPONGEBOB_WALK, -1, // ANIM_SPONGEBOB_KARATE, ANIM_SPONGEBOB_NET_GETHIT, // ANIM_SPONGEBOB_GETHIT @@ -335,7 +334,14 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_NET_LOOKUP, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN - + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + ANIM_SPONGEBOB_NET_IDLENET, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, }, // PLAYER_ADDON_CORALBLOWER, @@ -351,7 +357,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= -1, // ANIM_SPONGEBOB_RUN, -1, // ANIM_SPONGEBOB_RUNSTOP, -1, // ANIM_SPONGEBOB_RUNSTART, - -1, // ANIM_SPONGEBOB_SOAKUP, ANIM_SPONGEBOB_CORALBLOWER_TEETERBACK, // ANIM_SPONGEBOB_TEETERBACK, ANIM_SPONGEBOB_CORALBLOWER_TEETERFRONT, // ANIM_SPONGEBOB_TEETERFRONT, -1, // ANIM_SPONGEBOB_SWIPE, @@ -372,6 +377,14 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_CORALBLOWER_LOOKUP, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + -1, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, }, // PLAYER_ADDON_JELLYLAUNCHER, @@ -387,7 +400,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_JELLYLAUNCHER_RUN, // ANIM_SPONGEBOB_RUN, ANIM_SPONGEBOB_JELLYLAUNCHER_RUNSTOP, // ANIM_SPONGEBOB_RUNSTOP, ANIM_SPONGEBOB_JELLYLAUNCHER_RUNSTART, // ANIM_SPONGEBOB_RUNSTART, - ANIM_SPONGEBOB_JELLYLAUNCHER_SOAKUP, // ANIM_SPONGEBOB_SOAKUP, ANIM_SPONGEBOB_JELLYLAUNCHER_TEETERBACK, // ANIM_SPONGEBOB_TEETERBACK, ANIM_SPONGEBOB_JELLYLAUNCHER_TEETERFRONT, // ANIM_SPONGEBOB_TEETERFRONT, -1, // ANIM_SPONGEBOB_SWIPE, @@ -408,6 +420,14 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_JELLYLAUNCHER_LOOKUP, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + -1, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, }, // PLAYER_ADDON_BUBBLEWAND, @@ -423,7 +443,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_WAND_RUN, // ANIM_SPONGEBOB_RUN, ANIM_SPONGEBOB_WAND_RUNSTOP, // ANIM_SPONGEBOB_RUNSTOP, ANIM_SPONGEBOB_WAND_RUNSTART, // ANIM_SPONGEBOB_RUNSTART, - -1, // ANIM_SPONGEBOB_SOAKUP, ANIM_SPONGEBOB_WAND_TEETERBACK, // ANIM_SPONGEBOB_TEETERBACK, ANIM_SPONGEBOB_WAND_TEETERFRONT, // ANIM_SPONGEBOB_TEETERFRONT, -1, // ANIM_SPONGEBOB_SWIPE, @@ -444,6 +463,15 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_WAND_LOOKUP, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + -1, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, + }, // PLAYER_ADDON_JELLYFISHINNET @@ -459,7 +487,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_JELLYFISH_RUN, // ANIM_SPONGEBOB_RUN, ANIM_SPONGEBOB_JELLYFISH_RUNSTOP, // ANIM_SPONGEBOB_RUNSTOP, ANIM_SPONGEBOB_JELLYFISH_RUNSTART, // ANIM_SPONGEBOB_RUNSTART, - ANIM_SPONGEBOB_JELLYFISH_SOAKUP, // ANIM_SPONGEBOB_SOAKUP, ANIM_SPONGEBOB_JELLYFISH_TEETERBACK, // ANIM_SPONGEBOB_TEETERBACK, ANIM_SPONGEBOB_JELLYFISH_TEETERFRONT, // ANIM_SPONGEBOB_TEETERFRONT, ANIM_SPONGEBOB_JELLYFISH_SWIPE, // ANIM_SPONGEBOB_SWIPE, @@ -480,6 +507,14 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= ANIM_SPONGEBOB_JELLYFISH_LOOKUP, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + -1, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, }, // PLAYER_ADDON_GLOVE @@ -495,7 +530,6 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= -1, // ANIM_SPONGEBOB_RUN, -1, // ANIM_SPONGEBOB_RUNSTOP, -1, // ANIM_SPONGEBOB_RUNSTART, - -1, // ANIM_SPONGEBOB_SOAKUP, -1, // ANIM_SPONGEBOB_TEETERBACK, -1, // ANIM_SPONGEBOB_TEETERFRONT, -1, // ANIM_SPONGEBOB_SWIPE, @@ -516,6 +550,14 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]= -1, // ANIM_SPONGEBOB_LOOKUP -1, // ANIM_SPONGEBOB_IDLEBIGEYE -1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN + -1, // ANIM_SPONGEBOB_IDLEBANDAID, + -1, // ANIM_SPONGEBOB_IDLEEYEPOP, + -1, // ANIM_SPONGEBOB_IDLEINHAT, + -1, // ANIM_SPONGEBOB_IDLEMATURE, + -1, // ANIM_SPONGEBOB_IDLEMOUSTACHE, + -1, // ANIM_SPONGEBOB_IDLENOFACE, + -1, // ANIM_SPONGEBOB_IDLENET, + -1, // ANIM_SPONGEBOB_IDLEZORRO, }, }; @@ -1229,13 +1271,16 @@ if(drawlastpos) // Render player - DVECTOR sbPos= + if(m_animNo!=ANIM_SPONGEBOB_DONOTDRAW) { - Pos.vx-m_cameraPos.vx, - Pos.vy-m_cameraPos.vy, - }; - renderSb(&sbPos,m_animNo,m_animFrame>>sbanimspeed); - m_currentPlayerModeClass->render(&sbPos); + DVECTOR sbPos= + { + Pos.vx-m_cameraPos.vx, + Pos.vy-m_cameraPos.vy, + }; + renderSb(&sbPos,m_animNo,m_animFrame>>sbanimspeed); + m_currentPlayerModeClass->render(&sbPos); + } // UI diff --git a/source/player/player.h b/source/player/player.h index 187741054..37cda535c 100644 --- a/source/player/player.h +++ b/source/player/player.h @@ -78,7 +78,6 @@ typedef enum STATE_BUTTFALL, STATE_BUTTLAND, STATE_BUTTBOUNCEUP, - STATE_DUCK, STATE_SOAKUP, STATE_GETUP, STATE_LOOKDOWN, @@ -176,6 +175,13 @@ typedef enum + +// Special anim that means SB will not get drawn +// Just pass it to setAnimNo() like a normal anim +#define ANIM_SPONGEBOB_DONOTDRAW -1 + + + /*---------------------------------------------------------------------- Structure defintions -------------------- */ diff --git a/source/player/pmbubble.cpp b/source/player/pmbubble.cpp index bd6f5b14c..b686c1af3 100644 --- a/source/player/pmbubble.cpp +++ b/source/player/pmbubble.cpp @@ -204,7 +204,6 @@ int CPlayerModeBubbleMixture::canBlowBubbleFromThisState() case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: diff --git a/source/player/pmchop.cpp b/source/player/pmchop.cpp index c4ce35e7b..354101a3d 100644 --- a/source/player/pmchop.cpp +++ b/source/player/pmchop.cpp @@ -193,7 +193,6 @@ int CPlayerModeChop::canAttackFromThisState() case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: diff --git a/source/player/pmcoral.cpp b/source/player/pmcoral.cpp index e38fbde5e..4e96e292a 100644 --- a/source/player/pmcoral.cpp +++ b/source/player/pmcoral.cpp @@ -124,7 +124,6 @@ static CPlayerState *s_stateTable[]= NULL, // STATE_BUTTFALL NULL, // STATE_BUTTLAND NULL, // STATE_BUTTBOUNCEUP - NULL, // STATE_DUCK NULL, // STATE_SOAKUP &s_stateGetUp, // STATE_GETUP &s_stateLookDown, // STATE_LOOKDOWN diff --git a/source/player/pmjelly.cpp b/source/player/pmjelly.cpp index 7acf2b727..dddbaea37 100644 --- a/source/player/pmjelly.cpp +++ b/source/player/pmjelly.cpp @@ -212,7 +212,6 @@ int CPlayerModeJellyLauncher::setState(int _state) case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: @@ -260,7 +259,6 @@ int CPlayerModeJellyLauncher::canFireFromThisState() case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: diff --git a/source/player/pmnet.cpp b/source/player/pmnet.cpp index e6214d907..21567ef41 100644 --- a/source/player/pmnet.cpp +++ b/source/player/pmnet.cpp @@ -128,7 +128,6 @@ static CPlayerState *s_stateTable[]= &s_stateButtBounceFall, // STATE_BUTTFALL &s_stateButtBounceLand, // STATE_BUTTLAND &s_stateButtBounceUp, // STATE_BUTTBOUNCEUP - &s_stateDuck, // STATE_DUCK &s_stateSoakUp, // STATE_SOAKUP &s_stateGetUp, // STATE_GETUP &s_stateLookDown, // STATE_LOOKDOWN @@ -428,7 +427,6 @@ int CPlayerModeNet::canSwingNetFromThisState() case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: diff --git a/source/player/pmodes.cpp b/source/player/pmodes.cpp index cefdfc06e..11267920d 100644 --- a/source/player/pmodes.cpp +++ b/source/player/pmodes.cpp @@ -124,7 +124,6 @@ static CPlayerState *s_stateTable[]= &s_stateButtBounceFall, // STATE_BUTTFALL &s_stateButtBounceLand, // STATE_BUTTLAND &s_stateButtBounceUp, // STATE_BUTTBOUNCEUP - &s_stateDuck, // STATE_DUCK &s_stateSoakUp, // STATE_SOAKUP &s_stateGetUp, // STATE_GETUP &s_stateLookDown, // STATE_LOOKDOWN @@ -251,7 +250,6 @@ int CPlayerModeBase::canDoLookAround() case STATE_BUTTFALL: case STATE_BUTTLAND: case STATE_BUTTBOUNCEUP: - case STATE_DUCK: case STATE_GETUP: case STATE_LOOKDOWNRELAX: case STATE_LOOKUPRELAX: @@ -288,7 +286,6 @@ ATTACK_STATE CPlayerModeBase::getAttackState() case STATE_FALL: case STATE_FALLFAR: case STATE_BUTTBOUNCE: - case STATE_DUCK: case STATE_SOAKUP: case STATE_GETUP: case STATE_LOOKDOWN: @@ -656,7 +653,6 @@ void CPlayerModeBase::spring() moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<setAnimNo(ANIM_SPONGEBOB_SOAKUP); -} - - -/*---------------------------------------------------------------------- - Function: - Purpose: - Params: - Returns: - ---------------------------------------------------------------------- */ -void CPlayerStateDuck::think(CPlayerModeBase *_playerMode) -{ - _playerMode->slowdown(); - if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim()) - { - _playerMode->setState(STATE_SOAKUP); - } -} - - /*---------------------------------------------------------------------- Function: Purpose: @@ -101,8 +72,7 @@ void CPlayerStateDuck::think(CPlayerModeBase *_playerMode) void CPlayerStateSoakUp::enter(CPlayerModeBase *_playerMode) { _playerMode->zeroMoveVelocity(); - _playerMode->setAnimNo(ANIM_SPONGEBOB_SOAKUP); - _playerMode->setAnimFrame(_playerMode->getAnimFrameCount()-1); + _playerMode->setAnimNo(ANIM_SPONGEBOB_DONOTDRAW); m_breatheDelayFrames=0; } diff --git a/source/player/psduck.h b/source/player/psduck.h index 6c6f56d42..bc78ce9db 100644 --- a/source/player/psduck.h +++ b/source/player/psduck.h @@ -32,15 +32,6 @@ Structure defintions -------------------- */ -class CPlayerStateDuck : public CPlayerState -{ -public: - void enter(class CPlayerModeBase *_playerMode); - void think(class CPlayerModeBase *_playerMode); - -}; - - class CPlayerStateSoakUp : public CPlayerState { public: @@ -74,7 +65,6 @@ public: Globals ------- */ -extern CPlayerStateDuck s_stateDuck; extern CPlayerStateSoakUp s_stateSoakUp; extern CPlayerStateGetUp s_stateGetUp;