This commit is contained in:
parent
57b4d19ca6
commit
82afdfce50
10 changed files with 35 additions and 31 deletions
|
@ -544,20 +544,6 @@ void CNpcEnemy::setThinkArea()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*void CNpcEnemy::addWaypoint( u16 *ptr )
|
||||
{
|
||||
m_npcPath.addWaypoint( ptr );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcEnemy::addWaypoint( u16 *ptrX, u16 *ptrY )
|
||||
{
|
||||
m_npcPath.addWaypoint( ptrX, ptrY );
|
||||
}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcEnemy::setStartPos( s32 xPos, s32 yPos )
|
||||
{
|
||||
Pos.vx = ( xPos << 4 ) + 8;
|
||||
|
@ -622,7 +608,6 @@ void CNpcEnemy::init()
|
|||
|
||||
m_npcPath.initPath();
|
||||
|
||||
// m_isShuttingDown = false;
|
||||
m_drawRotation = 0;
|
||||
m_isCaught = false;
|
||||
m_isBlowerOn = false;
|
||||
|
@ -680,8 +665,6 @@ void CNpcEnemy::shutdown()
|
|||
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||
}
|
||||
|
||||
//m_npcPath.removeAllWaypoints();
|
||||
|
||||
if (m_actorGfx) delete m_actorGfx;
|
||||
|
||||
CEnemyThing::shutdown();
|
||||
|
|
|
@ -27,7 +27,6 @@ public:
|
|||
};
|
||||
|
||||
void initPath();
|
||||
void removeAllWaypoints();
|
||||
void setPathType( u8 newPathType );
|
||||
u8 getPathType();
|
||||
bool incPath();
|
||||
|
|
|
@ -45,12 +45,37 @@ void CNpcGaryFriend::postInit()
|
|||
m_started = false;
|
||||
m_fallDeath = false;
|
||||
m_drawRotation = 0;
|
||||
|
||||
m_soundId = (int) NOT_PLAYING;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcGaryFriend::shutdown()
|
||||
{
|
||||
if ( m_soundId != NOT_PLAYING )
|
||||
{
|
||||
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||
}
|
||||
|
||||
CNpcFriend::shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcGaryFriend::think( int _frames )
|
||||
{
|
||||
if ( m_soundId != NOT_PLAYING )
|
||||
{
|
||||
if( !CSoundMediator::isSfxStillPlaying( (xmPlayingId) m_soundId ) )
|
||||
{
|
||||
// unlock sound if it has finished
|
||||
|
||||
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||
m_soundId = NOT_PLAYING;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_animPlaying )
|
||||
{
|
||||
s32 frameCount;
|
||||
|
@ -169,7 +194,10 @@ void CNpcGaryFriend::think( int _frames )
|
|||
|
||||
if ( m_started )
|
||||
{
|
||||
//CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL );
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
|
||||
}
|
||||
|
||||
Pos.vx += multiplier * 2 * _frames;
|
||||
}
|
||||
|
@ -195,7 +223,10 @@ void CNpcGaryFriend::think( int _frames )
|
|||
{
|
||||
if ( m_started )
|
||||
{
|
||||
//CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL );
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
|
||||
}
|
||||
|
||||
Pos.vx += multiplier * 2 * _frames;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ class CNpcGaryFriend : public CNpcFriend
|
|||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual void shutdown();
|
||||
virtual void think( int _frames );
|
||||
virtual void setupWaypoints( sThingActor *ThisActor );
|
||||
bool alwaysThink() {return(true);}
|
||||
|
@ -38,6 +39,7 @@ protected:
|
|||
u8 m_fallDeath;
|
||||
s16 m_speed;
|
||||
s16 m_drawRotation;
|
||||
int m_soundId;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -437,9 +437,6 @@ void CNpcHazard::shutdown()
|
|||
}
|
||||
|
||||
delete m_modelGfx;
|
||||
// remove waypoints
|
||||
|
||||
//m_npcPath.removeAllWaypoints();
|
||||
|
||||
//if (m_actorGfx) delete m_actorGfx;
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ void CNpcFishHookPlatform::postInit()
|
|||
|
||||
m_isMoving = false;
|
||||
m_isResetting = false;
|
||||
m_isShuttingDown = false;
|
||||
m_lineBase.vx = Pos.vx;
|
||||
m_lineBase.vy = 0;
|
||||
m_bobTimer = 0;
|
||||
|
|
|
@ -27,7 +27,6 @@ void CNpcFishHook3Platform::postInit()
|
|||
|
||||
m_isMoving = false;
|
||||
m_isResetting = false;
|
||||
m_isShuttingDown = false;
|
||||
m_lineBase.vx = Pos.vx;
|
||||
m_lineBase.vy = 0;
|
||||
}
|
||||
|
|
|
@ -611,8 +611,6 @@ void CNpcPlatform::init()
|
|||
m_lifetime = 0;
|
||||
m_lifetimeType = m_dataPtr->lifetimeType;
|
||||
|
||||
m_isShuttingDown = false;
|
||||
|
||||
m_npcPath.initPath();
|
||||
|
||||
m_speed = m_dataPtr->speed;
|
||||
|
@ -699,7 +697,6 @@ void CNpcPlatform::shutdown()
|
|||
}
|
||||
|
||||
delete m_modelGfx;
|
||||
//m_npcPath.removeAllWaypoints();
|
||||
|
||||
// temporary
|
||||
CPlatformThing::shutdown();
|
||||
|
|
|
@ -225,7 +225,6 @@ protected:
|
|||
s16 m_initRotation;
|
||||
|
||||
CModelGfx *m_modelGfx;
|
||||
u8 m_isShuttingDown;
|
||||
|
||||
int m_graphicNum;
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ void CProjectile::init()
|
|||
m_state = PROJECTILE_ATTACK;
|
||||
m_turnSpeed = 256;
|
||||
m_extension = 0;
|
||||
// m_isShuttingDown = false;
|
||||
m_ot = OTPOS__ACTOR_POS;
|
||||
m_speed = 3;
|
||||
updateCollisionArea();
|
||||
|
@ -502,7 +501,6 @@ void CPlayerProjectile::init()
|
|||
m_extension = 0;
|
||||
m_frame = 0;
|
||||
m_reversed = 0;
|
||||
// m_isShuttingDown = false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Reference in a new issue