This commit is contained in:
parent
c9646ee3e9
commit
6c7ad5a2ef
2 changed files with 146 additions and 0 deletions
83
source/player/pshitgnd.cpp
Normal file
83
source/player/pshitgnd.cpp
Normal file
|
@ -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 <ACTOR_SPONGEBOB_ANIM.h>
|
||||||
|
#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 */
|
63
source/player/pshitgnd.h
Normal file
63
source/player/pshitgnd.h
Normal file
|
@ -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 */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue