SBSPSS/source/player/psidle.h

128 lines
2.7 KiB
C
Raw Normal View History

2001-01-24 16:52:31 +01:00
/*=========================================================================
psidle.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLAYER_PSIDLE_H__
#define __PLAYER_PSIDLE_H__
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\pstates.h"
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
2001-02-06 18:15:28 +01:00
////
class CPlayerStateBaseIdle : public CPlayerState
{
public:
2001-03-25 22:36:28 +02:00
void thinkControl(class CPlayerModeBase *CPlayerMode);
2001-02-06 18:15:28 +01:00
};
////
class CPlayerStateTeeterIdle : public CPlayerStateBaseIdle
{
public:
2001-03-25 22:36:28 +02:00
virtual void enter(class CPlayerModeBase *_playerMode);
virtual void think(class CPlayerModeBase *_playerMode);
2001-02-06 18:15:28 +01:00
};
////
2001-01-29 23:35:18 +01:00
typedef struct
{
int m_startFrame; // Or -1 for none
int m_loopFrame; // Must exist
int m_endFrame; // Or -1 for none
int m_loopCount; // Number of times to run m_loopFrame
} IdleAnims;
2001-02-06 18:15:28 +01:00
class CPlayerStateIdle : public CPlayerStateBaseIdle
2001-01-24 16:52:31 +01:00
{
public:
2001-03-25 22:36:28 +02:00
virtual void enter(class CPlayerModeBase *_playerMode);
virtual void think(class CPlayerModeBase *_playerMode);
2001-01-24 16:52:31 +01:00
2001-01-25 18:43:10 +01:00
private:
typedef enum
{
ANIMSTATE_START,
ANIMSTATE_LOOP,
ANIMSTATE_END,
} ANIMSTATE;
2001-03-25 22:36:28 +02:00
void setNextIdleAnim(class CPlayerModeBase *_playerMode);
2001-01-25 18:43:10 +01:00
2001-01-29 23:35:18 +01:00
virtual IdleAnims *getIdleAnimsDb(int _animNo)=0;
virtual int getNumIdleAnims()=0;
2001-01-25 18:43:10 +01:00
int m_idleTime; // Number of idle anims that have been started
int m_currentIdleAnim;
ANIMSTATE m_animState;
int m_loopCount; // Number of times to loop middle section of anim
2001-01-29 23:35:18 +01:00
};
class CPlayerStateUnarmedIdle : public CPlayerStateIdle
{
private:
virtual IdleAnims *getIdleAnimsDb(int _animNo);
virtual int getNumIdleAnims();
};
2001-04-10 20:44:12 +02:00
class CPlayerStateWeaponIdle : public CPlayerStateIdle
2001-01-29 23:35:18 +01:00
{
private:
virtual IdleAnims *getIdleAnimsDb(int _animNo);
virtual int getNumIdleAnims();
2001-01-25 18:43:10 +01:00
2001-01-24 16:52:31 +01:00
};
/*----------------------------------------------------------------------
Globals
------- */
2001-04-03 18:47:07 +02:00
extern CPlayerStateUnarmedIdle s_stateUnarmedIdle;
extern CPlayerStateTeeterIdle s_stateTeeterIdle;
2001-04-10 20:44:12 +02:00
extern CPlayerStateWeaponIdle s_stateWeaponIdle;
2001-04-03 18:47:07 +02:00
2001-01-24 16:52:31 +01:00
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PLAYER_PSIDLE_H__ */
/*===========================================================================
end */