This commit is contained in:
Paul 2001-01-16 19:27:14 +00:00
parent d7e13123b1
commit e890f6ce88
2 changed files with 190 additions and 52 deletions

View file

@ -1,16 +1,46 @@
/**************/
/*** Player ***/
/**************/
/*=========================================================================
player.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLAYER_PLAYER_H__
#define __PLAYER_PLAYER_H__
#define __PLAYER_PLAYER_H__
#include <dstructs.h>
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __GAME_THING_H__
#include "Game/Thing.h"
#endif
#ifndef __SKEL_HEADER__
#include "Gfx/Skel.h"
#endif
#ifndef __DATA_STRUCTS_HEADER__
#include <dstructs.h>
#endif
/*****************************************************************************/
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CPlayer : public CThing
{
@ -32,15 +62,6 @@ private:
NUM_STATES,
}PLAYER_STATE;
void setState(PLAYER_STATE _state);
void finishedAnim();
int m_frame;
int m_animNo;
PLAYER_STATE m_state;
CSkel m_skel;
enum
{
MAX_RUN_VELOCITY=8,
@ -48,13 +69,24 @@ private:
RUN_REVERSESLOWDOWN=2,
RUN_SLOWDOWN=1,
};
int m_runVel;
enum
{
FACING_LEFT=+1,
FACING_RIGHT=-1,
};
void setState(PLAYER_STATE _state);
void setFacing(int _facing);
void finishedAnim();
virtual int getPadInput();
int m_frame;
int m_animNo;
PLAYER_STATE m_state;
CSkel m_skel;
int m_runVel;
int m_facing;
static int s_stateAnims[NUM_STATES];
@ -62,5 +94,17 @@ private:
};
/*****************************************************************************/
#endif
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PLAYER_PLAYER_H__ */
/*===========================================================================
end */