114 lines
2.4 KiB
C++
114 lines
2.4 KiB
C++
|
|
/*=========================================================================
|
|
|
|
psbutt.cpp
|
|
|
|
Author: PKG
|
|
Created:
|
|
Project: Spongebob
|
|
Purpose:
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
Includes
|
|
-------- */
|
|
|
|
#include "player\psbutt.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 CPlayerStateButtBounce::enter(CPlayer *_player)
|
|
{
|
|
setAnimNo(_player,ANIM_PLAYER_ANIM_BUTTBOUNCE);
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
void CPlayerStateButtBounce::think(CPlayer *_player)
|
|
{
|
|
if(advanceAnimFrameAndCheckForEndOfAnim(_player))
|
|
{
|
|
setState(_player,STATE_BUTTFALL);
|
|
}
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
void CPlayerStateButtBounceLand::enter(CPlayer *_player)
|
|
{
|
|
setAnimNo(_player,ANIM_PLAYER_ANIM_BUTTBOUNCE);
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
void CPlayerStateButtBounceLand::think(CPlayer *_player)
|
|
{
|
|
if(advanceAnimFrameAndCheckForEndOfAnim(_player))
|
|
{
|
|
setState(_player,STATE_IDLE);
|
|
}
|
|
}
|
|
|
|
|
|
/*===========================================================================
|
|
end */
|