This commit is contained in:
Daveo 2001-05-16 20:46:54 +00:00
parent 33985a09f1
commit d2b2ea04b9
10 changed files with 11 additions and 49 deletions

View file

@ -623,7 +623,7 @@ void CNpcEnemy::init()
m_npcPath.initPath(); m_npcPath.initPath();
m_isShuttingDown = false; // m_isShuttingDown = false;
m_drawRotation = 0; m_drawRotation = 0;
m_isCaught = false; m_isCaught = false;
m_isBlowerOn = false; m_isBlowerOn = false;
@ -684,13 +684,6 @@ void CNpcEnemy::shutdown()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcEnemy::setToShutdown()
{
m_isShuttingDown = true;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int CNpcEnemy::getFrameCount() int CNpcEnemy::getFrameCount()
{ {
return( m_actorGfx->getFrameCount( m_animNo ) ); return( m_actorGfx->getFrameCount( m_animNo ) );

View file

@ -115,9 +115,6 @@ public:
virtual int canCollide(); virtual int canCollide();
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
bool canBeSuckedUp(); bool canBeSuckedUp();
bool suckUp( DVECTOR *suckPos, int _frames ); bool suckUp( DVECTOR *suckPos, int _frames );
@ -307,8 +304,6 @@ protected:
POLY_FT4 *SprFrame; POLY_FT4 *SprFrame;
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);
u8 m_isShuttingDown;
s16 m_drawRotation; s16 m_drawRotation;
}; };

View file

@ -61,8 +61,6 @@ virtual void think(int _frames);
virtual void render(); virtual void render();
virtual int canCollide() {return false;} virtual int canCollide() {return false;}
virtual u8 isSetToShutdown() {return( false );}
virtual void SetOtPos(int Ot) {OtPos=Ot;} virtual void SetOtPos(int Ot) {OtPos=Ot;}
protected: protected:

View file

@ -54,7 +54,8 @@ void CFXFallingTile::think(int _frames)
Pos.vx+=Velocity.vx; Pos.vx+=Velocity.vx;
Pos.vy+=Velocity.vy; Pos.vy+=Velocity.vy;
Velocity.vy++; Velocity.vy++;
if (Life) Life--; Life--;
if (!Life) setToShutdown();
} }
/*****************************************************************************/ /*****************************************************************************/

View file

@ -16,8 +16,6 @@ virtual void init(DVECTOR const &Pos);
virtual void shutdown(); virtual void shutdown();
virtual void think(int _frames); virtual void think(int _frames);
virtual void render(); virtual void render();
virtual u8 isSetToShutdown() {return(Life<=0);}
void SetTile(int T) {Tile=T;} void SetTile(int T) {Tile=T;}
protected: protected:

View file

@ -535,13 +535,6 @@ void CNpcPlatform::shutdown()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::setToShutdown()
{
m_isShuttingDown = true;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::processLifetime( int _frames ) void CNpcPlatform::processLifetime( int _frames )
{ {
switch( m_lifetimeType ) switch( m_lifetimeType )

View file

@ -110,9 +110,6 @@ public:
static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType ); static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcPlatform *Create(sThingPlatform *ThisPlatform); static CNpcPlatform *Create(sThingPlatform *ThisPlatform);
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
void setSpeed( s16 newSpeed ) {m_speed = newSpeed;} void setSpeed( s16 newSpeed ) {m_speed = newSpeed;}
protected: protected:

View file

@ -46,6 +46,7 @@
#ifndef __ENEMY_NPC_H__ #ifndef __ENEMY_NPC_H__
#include "enemy\npc.h" #include "enemy\npc.h"
#endif #endif
#include "gfx\otpos.h"
/*****************************************************************************/ /*****************************************************************************/
@ -64,8 +65,8 @@ void CProjectile::init()
m_state = PROJECTILE_ATTACK; m_state = PROJECTILE_ATTACK;
m_turnSpeed = 256; m_turnSpeed = 256;
m_extension = 0; m_extension = 0;
m_isShuttingDown = false; // m_isShuttingDown = false;
m_ot = 0; m_ot = OTPOS__ACTOR_POS;
updateCollisionArea(); updateCollisionArea();
} }
@ -99,11 +100,6 @@ void CProjectile::shutdown()
CEnemyProjectileThing::shutdown(); CEnemyProjectileThing::shutdown();
} }
void CProjectile::setToShutdown()
{
m_isShuttingDown = true;
}
bool CProjectile::processTargetSeek( int _frames, DVECTOR targetPos ) bool CProjectile::processTargetSeek( int _frames, DVECTOR targetPos )
{ {
s32 moveX = 0, moveY = 0; s32 moveX = 0, moveY = 0;
@ -411,7 +407,7 @@ void CPlayerProjectile::init()
m_extension = 0; m_extension = 0;
m_frame = 0; m_frame = 0;
m_reversed = 0; m_reversed = 0;
m_isShuttingDown = false; // m_isShuttingDown = false;
} }
void CPlayerProjectile::init( DVECTOR initPos, s16 initHeading ) void CPlayerProjectile::init( DVECTOR initPos, s16 initHeading )
@ -449,11 +445,6 @@ void CPlayerProjectile::shutdown()
CPlayerProjectileThing::shutdown(); CPlayerProjectileThing::shutdown();
} }
void CPlayerProjectile::setToShutdown()
{
m_isShuttingDown = true;
}
void CPlayerProjectile::setMovementType( PLAYER_PROJECTILE_MOVEMENT_TYPE moveType ) void CPlayerProjectile::setMovementType( PLAYER_PROJECTILE_MOVEMENT_TYPE moveType )
{ {
m_movementType = moveType; m_movementType = moveType;

View file

@ -48,8 +48,6 @@ public:
void init( DVECTOR initPos, s16 initHeading, PROJECTILE_MOVEMENT_TYPE initMoveType, PROJECTILE_LIFETIME_TYPE initLifeType ); void init( DVECTOR initPos, s16 initHeading, PROJECTILE_MOVEMENT_TYPE initMoveType, PROJECTILE_LIFETIME_TYPE initLifeType );
void init( DVECTOR initPos, s16 initHeading, PROJECTILE_MOVEMENT_TYPE initMoveType, PROJECTILE_LIFETIME_TYPE initLifeType, s32 initLifetime ); void init( DVECTOR initPos, s16 initHeading, PROJECTILE_MOVEMENT_TYPE initMoveType, PROJECTILE_LIFETIME_TYPE initLifeType, s32 initLifetime );
void shutdown(); void shutdown();
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
void think(int _frames); void think(int _frames);
void setPos( DVECTOR newPos ) {Pos = newPos;} void setPos( DVECTOR newPos ) {Pos = newPos;}
virtual void render(); virtual void render();
@ -79,7 +77,6 @@ protected:
PROJECTILE_LIFETIME_TYPE m_lifetimeType; PROJECTILE_LIFETIME_TYPE m_lifetimeType;
PROJECTILE_STATE m_state; PROJECTILE_STATE m_state;
u16 m_turnSpeed; u16 m_turnSpeed;
u8 m_isShuttingDown;
u8 m_ot; u8 m_ot;
}; };
@ -104,8 +101,6 @@ public:
void init( DVECTOR initPos, s16 initHeading, PLAYER_PROJECTILE_MOVEMENT_TYPE initMoveType, PLAYER_PROJECTILE_LIFETIME_TYPE initLifeType ); void init( DVECTOR initPos, s16 initHeading, PLAYER_PROJECTILE_MOVEMENT_TYPE initMoveType, PLAYER_PROJECTILE_LIFETIME_TYPE initLifeType );
void init( DVECTOR initPos, s16 initHeading, PLAYER_PROJECTILE_MOVEMENT_TYPE initMoveType, PLAYER_PROJECTILE_LIFETIME_TYPE initLifeType, s32 initLifetime ); void init( DVECTOR initPos, s16 initHeading, PLAYER_PROJECTILE_MOVEMENT_TYPE initMoveType, PLAYER_PROJECTILE_LIFETIME_TYPE initLifeType, s32 initLifetime );
void shutdown(); void shutdown();
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
virtual void think(int _frames); virtual void think(int _frames);
virtual void render(); virtual void render();
void processEvent( GAME_EVENT evt, CThing *sourceThing ); void processEvent( GAME_EVENT evt, CThing *sourceThing );
@ -133,7 +128,6 @@ protected:
int m_frame; int m_frame;
POLY_FT4 *SprFrame; POLY_FT4 *SprFrame;
u8 m_reversed; u8 m_reversed;
u8 m_isShuttingDown;
}; };

View file

@ -105,7 +105,7 @@ public:
MAX_TYPE, MAX_TYPE,
}; };
// TYPE; // TYPE;
CThing() {;} CThing() {m_isShuttingDown=false;}
virtual ~CThing() {;} virtual ~CThing() {;}
virtual TYPE getThingType()=0; virtual TYPE getThingType()=0;
@ -114,7 +114,8 @@ virtual void init();
virtual void shutdown(); virtual void shutdown();
virtual void think(int _frames); virtual void think(int _frames);
virtual void render(); virtual void render();
virtual u8 isSetToShutdown() {return( false );} void setToShutdown() {m_isShuttingDown = true;}
u8 isSetToShutdown() {return( m_isShuttingDown);}
virtual int dontKillDuringLevelRespawn() {return false;} virtual int dontKillDuringLevelRespawn() {return false;}
// Linkage // Linkage
@ -193,6 +194,7 @@ private:
bool m_renderFlag,m_thinkFlag; bool m_renderFlag,m_thinkFlag;
DVECTOR m_RenderPos; DVECTOR m_RenderPos;
bool m_isShuttingDown;
}; };
/*---------------------------------------------------------------------- */ /*---------------------------------------------------------------------- */