diff --git a/source/player/psdance.cpp b/source/player/psdance.cpp new file mode 100644 index 000000000..6b63bb66a --- /dev/null +++ b/source/player/psdance.cpp @@ -0,0 +1,87 @@ +/*========================================================================= + + psdance.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\psdance.h" + +#ifndef __PLAYER_PLAYER_H__ +#include "player\player.h" +#endif + +#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 + ---- */ + +CPlayerStateDance s_stateDance; + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateDance::enter(CPlayerModeBase *_playerMode) +{ + _playerMode->setAnimNo(ANIM_SPONGEBOB_CELEBRATE); +} + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateDance::think(CPlayerModeBase *_playerMode) +{ + _playerMode->advanceAnimFrameAndCheckForEndOfAnim(); + _playerMode->slowdown(); + _playerMode->fall(); +} + + +/*=========================================================================== + end */ diff --git a/source/player/psdance.h b/source/player/psdance.h new file mode 100644 index 000000000..3325732bb --- /dev/null +++ b/source/player/psdance.h @@ -0,0 +1,63 @@ +/*========================================================================= + + psdance.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __PLAYER_PSDANCE_H__ +#define __PLAYER_PSDANCE_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\pstates.h" + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CPlayerStateDance : public CPlayerState +{ +public: + void enter(class CPlayerModeBase *_playerMode); + void think(class CPlayerModeBase *_playerMode); + +}; + + +/*---------------------------------------------------------------------- + Globals + ------- */ + +extern CPlayerStateDance s_stateDance; + + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __PLAYER_PSDANCE_H__ */ + +/*=========================================================================== + end */ + + +