This commit is contained in:
Paul 2001-01-22 19:24:04 +00:00
parent d236bd4b00
commit 080f7bbb17
2 changed files with 148 additions and 0 deletions

88
source/player/pschop.cpp Normal file
View File

@ -0,0 +1,88 @@
/*=========================================================================
pschop.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\pschop.h"
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
#ifndef __PAD_PADS_H__
#include "pad\pads.h"
#endif
/* Std Lib
------- */
/* Data
---- */
#ifndef __ANIM_PLAYER_ANIM_HEADER__
#include <player_anim.h>
#endif
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerStateChop::enter(CPlayer *_player)
{
setAnimNo(_player,ANIM_PLAYER_ANIM_KARATE);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerStateChop::think(CPlayer *_player)
{
if(advanceAnimFrameAndCheckForEndOfAnim(_player))
{
setState(_player,STATE_IDLE);
}
}
/*===========================================================================
end */

60
source/player/pschop.h Normal file
View File

@ -0,0 +1,60 @@
/*=========================================================================
pschop.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLAYER_PSCHOP_H__
#define __PLAYER_PSCHOP_H__
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\pstates.h"
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CPlayerStateChop : public CPlayerState
{
public:
void enter(class CPlayer *_player);
void think(class CPlayer *_player);
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PLAYER_PSCHOP_H__ */
/*===========================================================================
end */