This commit is contained in:
parent
8a89d6deea
commit
75649b9bef
@ -331,7 +331,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]=
|
||||
ANIM_SPONGEBOB_NET_GETHIT, // ANIM_SPONGEBOB_GETHIT
|
||||
ANIM_SPONGEBOB_NET_CROUCHDOWN, // ANIM_SPONGEBOB_CROUCHDOWN
|
||||
ANIM_SPONGEBOB_NET_CROUCHUP, // ANIM_SPONGEBOB_CROUCHUP
|
||||
-1, // ANIM_SPONGEBOB_LOOKUP
|
||||
ANIM_SPONGEBOB_NET_LOOKUP, // ANIM_SPONGEBOB_LOOKUP
|
||||
-1, // ANIM_SPONGEBOB_IDLEBIGEYE
|
||||
-1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN
|
||||
|
||||
@ -368,7 +368,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]=
|
||||
ANIM_SPONGEBOB_CORALBLOWER_GETHIT, // ANIM_SPONGEBOB_GETHIT
|
||||
ANIM_SPONGEBOB_CORALBLOWER_CROUCHDOWN, // ANIM_SPONGEBOB_CROUCHDOWN
|
||||
ANIM_SPONGEBOB_CORALBLOWER_CROUCHUP, // ANIM_SPONGEBOB_CROUCHUP
|
||||
-1, // ANIM_SPONGEBOB_LOOKUP
|
||||
ANIM_SPONGEBOB_CORALBLOWER_LOOKUP, // ANIM_SPONGEBOB_LOOKUP
|
||||
-1, // ANIM_SPONGEBOB_IDLEBIGEYE
|
||||
-1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN
|
||||
},
|
||||
@ -404,7 +404,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]=
|
||||
ANIM_SPONGEBOB_JELLYLAUNCHER_GETHIT, // ANIM_SPONGEBOB_GETHIT
|
||||
ANIM_SPONGEBOB_JELLYLAUNCHER_CROUCHDOWN, // ANIM_SPONGEBOB_CROUCHDOWN
|
||||
ANIM_SPONGEBOB_JELLYLAUNCHER_CROUCHUP, // ANIM_SPONGEBOB_CROUCHUP
|
||||
-1, // ANIM_SPONGEBOB_LOOKUP
|
||||
ANIM_SPONGEBOB_JELLYLAUNCHER_LOOKUP, // ANIM_SPONGEBOB_LOOKUP
|
||||
-1, // ANIM_SPONGEBOB_IDLEBIGEYE
|
||||
-1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN
|
||||
},
|
||||
@ -440,7 +440,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]=
|
||||
ANIM_SPONGEBOB_WAND_GETHIT, // ANIM_SPONGEBOB_GETHIT
|
||||
ANIM_SPONGEBOB_WAND_CROUCHDOWN, // ANIM_SPONGEBOB_CROUCHDOWN
|
||||
ANIM_SPONGEBOB_WAND_CROUCHUP, // ANIM_SPONGEBOB_CROUCHUP
|
||||
-1, // ANIM_SPONGEBOB_LOOKUP
|
||||
ANIM_SPONGEBOB_WAND_LOOKUP, // ANIM_SPONGEBOB_LOOKUP
|
||||
-1, // ANIM_SPONGEBOB_IDLEBIGEYE
|
||||
-1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN
|
||||
},
|
||||
@ -476,7 +476,7 @@ static s8 s_animMapNet[NUM_PLAYER_ADDONS][NUM_ANIM_SPONGEBOB]=
|
||||
ANIM_SPONGEBOB_JELLYFISH_GETHIT, // ANIM_SPONGEBOB_GETHIT
|
||||
ANIM_SPONGEBOB_JELLYFISH_CROUCHDOWN, // ANIM_SPONGEBOB_CROUCHDOWN
|
||||
ANIM_SPONGEBOB_JELLYFISH_CROUCHUP, // ANIM_SPONGEBOB_CROUCHUP
|
||||
-1, // ANIM_SPONGEBOB_LOOKUP
|
||||
ANIM_SPONGEBOB_JELLYFISH_LOOKUP, // ANIM_SPONGEBOB_LOOKUP
|
||||
-1, // ANIM_SPONGEBOB_IDLEBIGEYE
|
||||
-1, // ANIM_SPONGEBOB_IDLEFACEUPSIDEDOWN
|
||||
},
|
||||
@ -713,35 +713,10 @@ if(newmode!=-1)
|
||||
|
||||
///
|
||||
#ifdef __USER_paul__
|
||||
/*
|
||||
if(PadGetDown(0)&PAD_TRIANGLE)
|
||||
{
|
||||
DVECTOR spawnBasePos;
|
||||
int angle,angleInc;
|
||||
int i;
|
||||
|
||||
spawnBasePos=Pos;
|
||||
spawnBasePos.vy-=50;
|
||||
angle=-1024;
|
||||
angleInc=512;
|
||||
|
||||
for(i=0;i<5;i++)
|
||||
{
|
||||
DVECTOR offset,spawnPos;
|
||||
CBaseBouncingPickup *pickup;
|
||||
|
||||
angle&=4095;
|
||||
offset.vx=((msin(angle)*25)>>12);
|
||||
offset.vy=-((mcos(angle)*25)>>12);
|
||||
spawnPos.vx=spawnBasePos.vx+offset.vx;
|
||||
spawnPos.vy=spawnBasePos.vy+offset.vy;
|
||||
|
||||
pickup=(CBaseBouncingPickup*)createPickup(PICKUP__BOUNCING_SPATULA,&spawnPos);
|
||||
|
||||
angle+=angleInc;
|
||||
}
|
||||
CSoundMediator::setVolume(CSoundMediator::VOL_SONG,0);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
///
|
||||
|
||||
|
@ -83,6 +83,8 @@ typedef enum
|
||||
STATE_GETUP,
|
||||
STATE_LOOKDOWN,
|
||||
STATE_LOOKDOWNRELAX,
|
||||
STATE_LOOKUP,
|
||||
STATE_LOOKUPRELAX,
|
||||
STATE_JUMPBACK,
|
||||
STATE_CART,
|
||||
STATE_FLOAT,
|
||||
|
@ -209,6 +209,8 @@ int CPlayerModeBubbleMixture::canBlowBubbleFromThisState()
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
|
@ -198,6 +198,8 @@ int CPlayerModeChop::canAttackFromThisState()
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
|
@ -129,6 +129,8 @@ static CPlayerState *s_stateTable[]=
|
||||
&s_stateGetUp, // STATE_GETUP
|
||||
&s_stateLookDown, // STATE_LOOKDOWN
|
||||
&s_stateLookDownRelax, // STATE_LOOKDOWNRELAX
|
||||
&s_stateLookUp, // STATE_LOOKUP
|
||||
&s_stateLookUpRelax, // STATE_LOOKUPRELAX
|
||||
&s_stateJumpBack, // STATE_JUMPBACK
|
||||
};
|
||||
|
||||
|
@ -217,6 +217,8 @@ int CPlayerModeJellyLauncher::setState(int _state)
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
allowChange=false;
|
||||
break;
|
||||
}
|
||||
@ -263,6 +265,8 @@ int CPlayerModeJellyLauncher::canFireFromThisState()
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
|
@ -354,6 +354,8 @@ int CPlayerModeNet::canSwingNetFromThisState()
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
|
@ -129,6 +129,8 @@ static CPlayerState *s_stateTable[]=
|
||||
&s_stateGetUp, // STATE_GETUP
|
||||
&s_stateLookDown, // STATE_LOOKDOWN
|
||||
&s_stateLookDownRelax, // STATE_LOOKDOWNRELAX
|
||||
&s_stateLookUp, // STATE_LOOKUP
|
||||
&s_stateLookUpRelax, // STATE_LOOKUPRELAX
|
||||
&s_stateJumpBack, // STATE_JUMPBACK
|
||||
&s_stateCart, // STATE_CART
|
||||
&s_stateFloat, // STATE_FLOAT
|
||||
@ -235,6 +237,7 @@ int CPlayerModeBase::canDoLookAround()
|
||||
case STATE_IDLETEETER:
|
||||
case STATE_SOAKUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKUP:
|
||||
ret=true;
|
||||
break;
|
||||
|
||||
@ -251,6 +254,7 @@ int CPlayerModeBase::canDoLookAround()
|
||||
case STATE_DUCK:
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
@ -289,6 +293,8 @@ ATTACK_STATE CPlayerModeBase::getAttackState()
|
||||
case STATE_GETUP:
|
||||
case STATE_LOOKDOWN:
|
||||
case STATE_LOOKDOWNRELAX:
|
||||
case STATE_LOOKUP:
|
||||
case STATE_LOOKUPRELAX:
|
||||
case STATE_JUMPBACK:
|
||||
break;
|
||||
}
|
||||
|
@ -89,6 +89,10 @@ void CPlayerStateBaseIdle::thinkControl(CPlayerModeBase *_playerMode)
|
||||
{
|
||||
_playerMode->setState(STATE_LOOKDOWN);
|
||||
}
|
||||
else if(controlHeld&PI_UP&&_playerMode->canDoLookAround())
|
||||
{
|
||||
_playerMode->setState(STATE_LOOKUP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,6 +57,8 @@
|
||||
|
||||
CPlayerStateLookDown s_stateLookDown;
|
||||
CPlayerStateLookDownRelax s_stateLookDownRelax;
|
||||
CPlayerStateLookUp s_stateLookUp;
|
||||
CPlayerStateLookUpRelax s_stateLookUpRelax;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -93,9 +95,9 @@ void CPlayerStateLookDown::think(CPlayerModeBase *_playerMode)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(controlHeld&PI_DOWN))
|
||||
if(!(controlHeld&controlThatMustBeHeld()))
|
||||
{
|
||||
_playerMode->setState(STATE_LOOKDOWNRELAX);
|
||||
_playerMode->setState(getNextState());
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,6 +118,24 @@ void CPlayerStateLookDown::think(CPlayerModeBase *_playerMode)
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int CPlayerStateLookDown::getNextState()
|
||||
{
|
||||
return STATE_LOOKDOWNRELAX;
|
||||
}
|
||||
int CPlayerStateLookDown::controlThatMustBeHeld()
|
||||
{
|
||||
return PI_DOWN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
@ -162,5 +182,51 @@ void CPlayerStateLookDownRelax::think(CPlayerModeBase *_playerMode)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayerStateLookUp::enter(CPlayerModeBase *_playerMode)
|
||||
{
|
||||
_playerMode->setAnimNo(ANIM_SPONGEBOB_LOOKUP);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int CPlayerStateLookUp::getNextState()
|
||||
{
|
||||
return STATE_LOOKUPRELAX;
|
||||
}
|
||||
int CPlayerStateLookUp::controlThatMustBeHeld()
|
||||
{
|
||||
return PI_UP;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayerStateLookUpRelax::enter(CPlayerModeBase *_playerMode)
|
||||
{
|
||||
// _playerMode->setAnimNo(ANIM_SPONGEBOB_CROUCHUP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
@ -35,8 +35,12 @@
|
||||
class CPlayerStateLookDown : public CPlayerState
|
||||
{
|
||||
public:
|
||||
void enter(class CPlayerModeBase *_playerMode);
|
||||
void think(class CPlayerModeBase *_playerMode);
|
||||
virtual void enter(class CPlayerModeBase *_playerMode);
|
||||
virtual void think(class CPlayerModeBase *_playerMode);
|
||||
|
||||
protected:
|
||||
virtual int getNextState();
|
||||
virtual int controlThatMustBeHeld();
|
||||
|
||||
};
|
||||
|
||||
@ -44,8 +48,28 @@ public:
|
||||
class CPlayerStateLookDownRelax : public CPlayerState
|
||||
{
|
||||
public:
|
||||
void enter(class CPlayerModeBase *_playerMode);
|
||||
void think(class CPlayerModeBase *_playerMode);
|
||||
virtual void enter(class CPlayerModeBase *_playerMode);
|
||||
virtual void think(class CPlayerModeBase *_playerMode);
|
||||
|
||||
};
|
||||
|
||||
|
||||
class CPlayerStateLookUp : public CPlayerStateLookDown
|
||||
{
|
||||
public:
|
||||
virtual void enter(class CPlayerModeBase *_playerMode);
|
||||
|
||||
protected:
|
||||
virtual int getNextState();
|
||||
virtual int controlThatMustBeHeld();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class CPlayerStateLookUpRelax : public CPlayerStateLookDownRelax
|
||||
{
|
||||
public:
|
||||
virtual void enter(class CPlayerModeBase *_playerMode);
|
||||
|
||||
};
|
||||
|
||||
@ -56,6 +80,8 @@ public:
|
||||
|
||||
extern CPlayerStateLookDown s_stateLookDown;
|
||||
extern CPlayerStateLookDownRelax s_stateLookDownRelax;
|
||||
extern CPlayerStateLookUp s_stateLookUp;
|
||||
extern CPlayerStateLookUpRelax s_stateLookUpRelax;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -119,6 +119,10 @@ void CPlayerStateRun::think(CPlayerModeBase *_playerMode)
|
||||
{
|
||||
switchedState=_playerMode->setState(STATE_LOOKDOWN);
|
||||
}
|
||||
else if(controlDown&PI_UP)
|
||||
{
|
||||
switchedState=_playerMode->setState(STATE_LOOKUP);
|
||||
}
|
||||
|
||||
if(controlHeld&PI_LEFT)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user