This commit is contained in:
parent
61308f18f6
commit
1ed6b3c05f
@ -83,6 +83,11 @@ void CNpcBallBlobEnemy::processMovement( int _frames )
|
|||||||
}
|
}
|
||||||
|
|
||||||
moveY = groundHeight;
|
moveY = groundHeight;
|
||||||
|
|
||||||
|
if ( m_data[m_type].moveSfx < CSoundMediator::NUM_SFXIDS )
|
||||||
|
{
|
||||||
|
CSoundMediator::playSfx( m_data[m_type].moveSfx );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// deal with horizontal
|
// deal with horizontal
|
||||||
|
@ -67,6 +67,8 @@ void CNpcFlamingSkullEnemy::processClose( int _frames )
|
|||||||
s32 distX, distY;
|
s32 distX, distY;
|
||||||
s32 distXSqr, distYSqr;
|
s32 distXSqr, distYSqr;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_FLAMING_SKULL_ATTACK );
|
||||||
|
|
||||||
if ( m_state == FLAMING_SKULL_ATTACK )
|
if ( m_state == FLAMING_SKULL_ATTACK )
|
||||||
{
|
{
|
||||||
processGenericGetUserDist( _frames, &distX, &distY );
|
processGenericGetUserDist( _frames, &distX, &distY );
|
||||||
|
@ -259,6 +259,8 @@ void CNpcMotherJellyfishEnemy::processClose( int _frames )
|
|||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
m_state = MOTHER_JELLYFISH_RETURN_TO_START_1;
|
m_state = MOTHER_JELLYFISH_RETURN_TO_START_1;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_JELLYFISH_ATTACK );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -53,7 +53,7 @@ void CNpcPricklyBugEnemy::processMovementModifier( int _frames, s32 distX, s32 d
|
|||||||
|
|
||||||
// sound
|
// sound
|
||||||
|
|
||||||
CSoundMediator::playSfx( CSoundMediator::SFX_PRICKLY_BUG_MOVE );
|
//CSoundMediator::playSfx( CSoundMediator::SFX_PRICKLY_BUG_MOVE );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -410,7 +410,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::SFX_PRICKLY_BUG_DEFEATED,
|
CSoundMediator::SFX_PRICKLY_BUG_DEFEATED,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
//CSoundMediator::NUM_SFXIDS,
|
||||||
|
CSoundMediator::SFX_PRICKLY_BUG_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SEA_SNAKE
|
{ // NPC_SEA_SNAKE
|
||||||
@ -435,7 +436,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_SEASNAKE_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PUFFA_FISH
|
{ // NPC_PUFFA_FISH
|
||||||
@ -460,7 +461,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_PUFFAFISH_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANGLER_FISH
|
{ // NPC_ANGLER_FISH
|
||||||
@ -485,7 +486,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_ANGLER_FISH_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_HERMIT_CRAB
|
{ // NPC_HERMIT_CRAB
|
||||||
@ -535,7 +536,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_HAZARD__MINE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BOOGER_MONSTER
|
{ // NPC_BOOGER_MONSTER
|
||||||
@ -735,7 +736,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_GHOST,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST_PIRATE
|
{ // NPC_GHOST_PIRATE
|
||||||
@ -784,8 +785,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_FLAMING_SKULL_DEFEATED,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_FLAMING_SKULL_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHARK_MAN
|
{ // NPC_SHARK_MAN
|
||||||
@ -884,8 +885,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_JELLYFISH_DEFEATED,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_JELLYFISH_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SUB_SHARK
|
{ // NPC_SUB_SHARK
|
||||||
@ -1035,7 +1036,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::NUM_SFXIDS,
|
||||||
CSoundMediator::NUM_SFXIDS,
|
CSoundMediator::SFX_BALL_BLOB_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHELL
|
{ // NPC_SHELL
|
||||||
|
@ -246,6 +246,11 @@ void CNpcSeaSnakeEnemy::processMovement( int _frames )
|
|||||||
DVECTOR oldPos = Pos;
|
DVECTOR oldPos = Pos;
|
||||||
u8 skipCounter;
|
u8 skipCounter;
|
||||||
|
|
||||||
|
if ( m_data[m_type].moveSfx < CSoundMediator::NUM_SFXIDS )
|
||||||
|
{
|
||||||
|
CSoundMediator::playSfx( m_data[m_type].moveSfx );
|
||||||
|
}
|
||||||
|
|
||||||
processGenericFixedPathMove( _frames, &moveX, &moveY, &moveVel, &moveDist );
|
processGenericFixedPathMove( _frames, &moveX, &moveY, &moveVel, &moveDist );
|
||||||
|
|
||||||
Pos.vx += moveX;
|
Pos.vx += moveX;
|
||||||
|
@ -55,6 +55,7 @@ bool CNpcSkullStomperEnemy::processSensor()
|
|||||||
{
|
{
|
||||||
m_controlFunc = NPC_CONTROL_CLOSE;
|
m_controlFunc = NPC_CONTROL_CLOSE;
|
||||||
m_extendDir = EXTEND_DOWN;
|
m_extendDir = EXTEND_DOWN;
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_SKULL_ATTACK );
|
||||||
|
|
||||||
return( true );
|
return( true );
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ void CNpcGaryFriend::think( int _frames )
|
|||||||
|
|
||||||
if ( m_started )
|
if ( m_started )
|
||||||
{
|
{
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL );
|
||||||
|
|
||||||
Pos.vx += multiplier * _frames;
|
Pos.vx += multiplier * _frames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,6 +109,8 @@ void CNpcGaryFriend::think( int _frames )
|
|||||||
{
|
{
|
||||||
if ( m_started )
|
if ( m_started )
|
||||||
{
|
{
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL );
|
||||||
|
|
||||||
Pos.vx += multiplier * _frames;
|
Pos.vx += multiplier * _frames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
#include "gfx\actor.h"
|
#include "gfx\actor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SOUND_SOUND_H__
|
||||||
|
#include "sound\sound.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
class CNpcHazard : public CHazardThing
|
class CNpcHazard : public CHazardThing
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,7 @@ void CNpcBigWheelHazard::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
m_rotation += 5 * _frames;
|
m_rotation += 5 * _frames;
|
||||||
m_rotation &= 4095;
|
m_rotation &= 4095;
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_WORLD_OBJECT__BIG_WHEEL );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -39,6 +39,8 @@ void CNpcCircularSawHazard::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
m_rotation += 256 * _frames;
|
m_rotation += 256 * _frames;
|
||||||
m_rotation &= 4095;
|
m_rotation &= 4095;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_SAW );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -132,6 +132,8 @@ void CNpcFallingHazard::processMovement( int _frames )
|
|||||||
|
|
||||||
if ( groundHeight < yMovement )
|
if ( groundHeight < yMovement )
|
||||||
{
|
{
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND );
|
||||||
|
|
||||||
// colliding with ground
|
// colliding with ground
|
||||||
|
|
||||||
Pos.vy += groundHeight;
|
Pos.vy += groundHeight;
|
||||||
|
@ -96,6 +96,7 @@ void CNpcFireballHazard::processMovement( int _frames )
|
|||||||
m_isActive = false;
|
m_isActive = false;
|
||||||
m_timerActive = true;
|
m_timerActive = true;
|
||||||
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
|
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FIREBALL_LAND );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -114,5 +115,7 @@ void CNpcFireballHazard::processTimer( int _frames )
|
|||||||
{
|
{
|
||||||
m_timerActive = false;
|
m_timerActive = false;
|
||||||
m_isActive = true;
|
m_isActive = true;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FIREBALL_LAUNCH );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,8 @@ void CNpcMowerHazard::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
m_rotation += 256 * _frames;
|
m_rotation += 256 * _frames;
|
||||||
m_rotation &= 4095;
|
m_rotation &= 4095;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_SAW );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -58,6 +58,7 @@ void CNpcRockShardHazard::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
Pos.vx = m_base.vx + ( -3 + ( getRnd() % 7 ) );
|
Pos.vx = m_base.vx + ( -3 + ( getRnd() % 7 ) );
|
||||||
Pos.vy = m_base.vy + ( -3 + ( getRnd() % 7 ) );
|
Pos.vy = m_base.vy + ( -3 + ( getRnd() % 7 ) );
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STALACTITE_RATTLE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -75,6 +76,7 @@ void CNpcRockShardHazard::processMovement( int _frames )
|
|||||||
m_isActive = false;
|
m_isActive = false;
|
||||||
m_timerActive = true;
|
m_timerActive = true;
|
||||||
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
|
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STALACTITE_LAND );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,11 @@ void CNpcRollingRockHazard::processMovement( int _frames )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if ( !m_jump )
|
||||||
|
{
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_ROLLING_ROCK );
|
||||||
|
}
|
||||||
|
|
||||||
if ( distX )
|
if ( distX )
|
||||||
{
|
{
|
||||||
// move along ground
|
// move along ground
|
||||||
|
@ -45,6 +45,8 @@ void CNpcSawbladeHazard::processMovement( int _frames )
|
|||||||
|
|
||||||
s16 headingToTarget = m_npcPath.think( Pos, &pathComplete, &waypointChange, &xDist, &yDist );
|
s16 headingToTarget = m_npcPath.think( Pos, &pathComplete, &waypointChange, &xDist, &yDist );
|
||||||
|
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_SAW );
|
||||||
|
|
||||||
if ( !pathComplete )
|
if ( !pathComplete )
|
||||||
{
|
{
|
||||||
s16 decDir, incDir, moveDist;
|
s16 decDir, incDir, moveDist;
|
||||||
|
@ -134,6 +134,7 @@ void CNpcGeyserPlatform::processTimer( int _frames )
|
|||||||
m_isFiring = true;
|
m_isFiring = true;
|
||||||
Pos = m_base;
|
Pos = m_base;
|
||||||
m_state = GEYSER_RISING;
|
m_state = GEYSER_RISING;
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_WORLD_OBJECT__GEYSER );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,11 @@ void CNpcSeesawPlatform::processMovement( int _frames )
|
|||||||
m_angularVelocity = 0;
|
m_angularVelocity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentAngle = newAngle;
|
if ( m_currentAngle != newAngle )
|
||||||
|
{
|
||||||
|
m_currentAngle = newAngle;
|
||||||
|
CSoundMediator::playSfx( CSoundMediator::SFX_WORLD_OBJECT__SEESAW );
|
||||||
|
}
|
||||||
|
|
||||||
setCollisionAngle( newAngle >> 8 );
|
setCollisionAngle( newAngle >> 8 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user