This commit is contained in:
parent
e52c7dcd1d
commit
13b2fbf0a8
13 changed files with 692 additions and 1439 deletions
90
source/player/pmfly.cpp
Normal file
90
source/player/pmfly.cpp
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*=========================================================================
|
||||
|
||||
pmfly.cpp
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "player\pmfly.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 CPlayerModeFly::enter()
|
||||
{
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayerModeFly::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 */
|
Loading…
Add table
Add a link
Reference in a new issue