From 854dd569d87b5c0c2c414e1b14d6ea6b96ab5919 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 6 Feb 2001 20:25:27 +0000 Subject: [PATCH] --- source/player/psdead.cpp | 82 ++++++++++++++++++++++++++++++++++++++++ source/player/psdead.h | 60 +++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 source/player/psdead.cpp create mode 100644 source/player/psdead.h diff --git a/source/player/psdead.cpp b/source/player/psdead.cpp new file mode 100644 index 000000000..097099ce4 --- /dev/null +++ b/source/player/psdead.cpp @@ -0,0 +1,82 @@ +/*========================================================================= + + psdead.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\psdead.h" + +#ifndef __PLAYER_PLAYER_H__ +#include "player\player.h" +#endif + + +/* Std Lib + ------- */ + +/* Data + ---- */ + +#ifndef __ANIM_PLAYER_ANIM_HEADER__ +#include +#endif + + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +/*---------------------------------------------------------------------- + Function Prototypes + ------------------- */ + +/*---------------------------------------------------------------------- + Vars + ---- */ + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateDead::enter(CPlayer *_player) +{ + setAnimNo(_player,ANIM_PLAYER_ANIM_DEATHSPIN); +} + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerStateDead::think(CPlayer *_player) +{ + if(advanceAnimFrameAndCheckForEndOfAnim(_player)) + { + setState(_player,STATE_IDLE); + } + +} + + +/*=========================================================================== + end */ diff --git a/source/player/psdead.h b/source/player/psdead.h new file mode 100644 index 000000000..f4f168f52 --- /dev/null +++ b/source/player/psdead.h @@ -0,0 +1,60 @@ +/*========================================================================= + + psdead.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __PLAYER_PSDEAD_H__ +#define __PLAYER_PSDEAD_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player\pstates.h" + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CPlayerStateDead : public CPlayerState +{ +public: + virtual void enter(class CPlayer *_player); + virtual void think(class CPlayer *_player); + +}; + + +/*---------------------------------------------------------------------- + Globals + ------- */ + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __PLAYER_PSDEAD_H__ */ + +/*=========================================================================== + end */ + + +