diff --git a/source/player/pshitgnd.cpp b/source/player/pshitgnd.cpp new file mode 100644 index 000000000..9f38ae84b --- /dev/null +++ b/source/player/pshitgnd.cpp @@ -0,0 +1,83 @@ + +/*========================================================================= + + pshitgnd.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\pshitgnd.h" + +#ifndef __PLAYER_PMODES_H__ +#include "player\pmodes.h" +#endif + + +/* Std Lib + ------- */ + +/* Data + ---- */ + +#ifndef __ANIM_SPONGEBOB_HEADER__ +#include +#endif + + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +/*---------------------------------------------------------------------- + Function Prototypes + ------------------- */ + +/*---------------------------------------------------------------------- + Vars + ---- */ + +CPlayerStateHitGround s_stateHitGround; + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateHitGround::enter(CPlayerModeBase *_playerMode) +{ + _playerMode->setAnimNo(ANIM_SPONGEBOB_HITGROUND); +} + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateHitGround::think(CPlayerModeBase *_playerMode) +{ + if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim()) + { + _playerMode->setState(STATE_GETUP); + } +} + +/*=========================================================================== + end */ diff --git a/source/player/pshitgnd.h b/source/player/pshitgnd.h new file mode 100644 index 000000000..3b7e1ea0f --- /dev/null +++ b/source/player/pshitgnd.h @@ -0,0 +1,63 @@ +/*========================================================================= + + pshitgnd.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __PLAYER_PSHITGND_H__ +#define __PLAYER_PSHITGND_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\pstates.h" + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CPlayerStateHitGround : public CPlayerState +{ +public: + void enter(class CPlayerModeBase *_playerMode); + void think(class CPlayerModeBase *_playerMode); + +}; + + +/*---------------------------------------------------------------------- + Globals + ------- */ + +extern CPlayerStateHitGround s_stateHitGround; + + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __PLAYER_PSHITGND_H__ */ + +/*=========================================================================== + end */ + + +