This commit is contained in:
Paul 2001-03-25 21:09:06 +00:00
parent 00e04dd6d0
commit d26f36461e
2 changed files with 148 additions and 0 deletions

90
source/player/pmdead.cpp Normal file
View File

@ -0,0 +1,90 @@
/*=========================================================================
pmdead.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\pmdead.h"
//#ifndef __PLAYER_PLAYER_H__
//#include "player\player.h"
//#endif
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerModeDead::enter()
{
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerModeDead::think()
{
DVECTOR pos;
int controlHeld;
pos=getPlayerPos();
controlHeld=getPadInputHeld();
if(controlHeld&PI_LEFT)
{
pos.vx-=5;
}
else if(controlHeld&PI_RIGHT)
{
pos.vx+=5;
}
if(controlHeld&PI_UP)
{
pos.vy-=5;
}
else if(controlHeld&PI_DOWN)
{
pos.vy+=5;
}
setPlayerPos(&pos);
}
/*===========================================================================
end */

58
source/player/pmdead.h Normal file
View File

@ -0,0 +1,58 @@
/*=========================================================================
pmdead.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLAYER_PMDEAD_H__
#define __PLAYER_PMDEAD_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __PLAYER_PMODES_H__
#include "player\pmodes.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CPlayerModeDead : public CPlayerMode
{
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PLAYER_PMDEAD_H__ */
/*===========================================================================
end */