This commit is contained in:
Paul 2001-07-02 20:20:15 +00:00
parent daf464232a
commit 3a54aaf2fc
2 changed files with 150 additions and 0 deletions

87
source/player/psdance.cpp Normal file
View File

@ -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 <ACTOR_SPONGEBOB_ANIM.h>
#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 */

63
source/player/psdance.h Normal file
View File

@ -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 */