Commit 130f9201 authored by Gerhard Stein's avatar Gerhard Stein

More Sounds, bug fixes, improved AI and Blooguard makes the clubbing a better...

More Sounds, bug fixes, improved AI and Blooguard makes the clubbing a better more like in the original with the moving screen
parent 02170b2b
......@@ -130,7 +130,18 @@ SOUND_SPINDREDFLYDOWN,
SOUND_MASTERSHOT,
SOUND_MASTERTELE,
SOUND_ELEVATING,
SOUND_ELEVATOR_OPEN
SOUND_ELEVATOR_OPEN,
// EP6
SOUND_JUMPED_GEM,
SOUND_BIP_SHIP_CRASH,
SOUND_BIP_SHIP_LAND,
SOUND_SQUISH,
SOUND_AUTOGUN,
SOUND_BIPSHIP_SHOOT,
SOUND_SATELITE_MOUNT,
SOUND_GET_SPECIAL_ITEM,
SOUND_BLOOGGUARD_STUB
};
......
......@@ -33,10 +33,15 @@ CGalaxySpriteObject(pmap, foeID, x, y)
calcBoundingBoxes();
playSound( SOUND_KEEN_FIRE );
/*static int slot = 60;
// For testing sounds.
/*g_pSound->playStereosoundSlot(slot, PLAY_NOW, 0);
printf("Sound %d played!\n", slot-64);
slot++;*/
g_pSound->playStereosoundSlot(slot, PLAY_NOW, 0);
printf("Sound %d played!\n", slot-60);
slot++;
if(slot == 120)
slot = 60;*/
}
void CBullet::process()
......
......@@ -924,10 +924,10 @@ void CPlayerLevel::processCliffClimbingOntoFloor()
}
}
void CPlayerLevel::stun()
bool CPlayerLevel::stun()
{
if(!blockedd || getActionStatus(A_KEEN_SLIDE))
return;
return false;
setAction(A_KEEN_STUNNED);
......@@ -935,6 +935,7 @@ void CPlayerLevel::stun()
m_Action.setActionFormat(0x1868);
mStunTimer = 0;
return true;
}
......
......@@ -157,8 +157,9 @@ public:
void processCliffClimbingOntoFloor();
// Make Keen get stunned. This one is very special, as it doesn't belong to the current actions of Keen and only happen in Keen 6
void stun();
// Make Keen get stunned. This one is very special,
// as it doesn't belong to the current actions of Keen and only happen in Keen 6
bool stun();
void processStunned();
......
......@@ -446,6 +446,7 @@ void CPlayerWM::verifyTeleportation()
m_teleportanibasetile = newTile;
mp_Map->setTile(x>>CSF, y>>CSF, newTile, true);
playSound(SOUND_TELEPORT);
solid = false;
}
......@@ -710,7 +711,7 @@ void CPlayerWM::processEnteringTeleporter()
// make him invisible
solid = false;
dontdraw = true;
mProcessPtr = &CPlayerWM::processWarpInTeleporter;
mProcessPtr = &CPlayerWM::processWarpInTeleporter;
performWalkingAnimation(false);
}
else
......@@ -746,6 +747,7 @@ void CPlayerWM::processWarpInTeleporter()
m_camera.setPosition(new_pos);
mProcessPtr = &CPlayerWM::processLeavingTeleporter;
playSound(SOUND_TELEPORT);
target.y += (1<<CSF);
dontdraw = false;
......
......@@ -39,13 +39,8 @@ void CBip::processStanding()
if(getActionStatus(A_BIP_WALK))
setAction(A_BIP_WALK);
/*if(mTimer < STAND_TIME)
return; */
mTimer = 0;
//setAction(A_BIP_WALK);
}
......@@ -86,6 +81,7 @@ void CBip::getTouchedBy(CSpriteObject& theObject)
// Was it a bullet? Than make it stunned.
if( dynamic_cast<CPlayerLevel*>(&theObject) )
{
playSound(SOUND_SQUISH);
setAction(A_BIP_SQUISHED);
dead = true;
}
......
......@@ -89,12 +89,13 @@ void CBipShip::processHit()
{
if(blockedd)
{
// TODO: If blooglet carried a gem it should fall that case it must jump out! That is a sprite item which can fall on the floor.
// If blooglet carried a gem it should fall that case it must jump out! That is a sprite item which can fall on the floor.
const int newX = getXMidPos();
const int newY = getYUpPos();
auto *bip = new CBip(mp_Map, 0x6C, newX, newY);
g_pBehaviorEngine->m_EventList.spawnObj( bip );
setAction(A_BIPSHIP_CRASH);
playSound(SOUND_BIP_SHIP_CRASH);
}
}
......@@ -131,6 +132,7 @@ void CBipShip::getTouchedBy(CSpriteObject& theObject)
setAction(A_BIPSHIP_HIT);
dead = true;
theObject.dead = true;
playSound(SOUND_BIP_SHIP_LAND);
}
if( CPlayerBase *player = dynamic_cast<CPlayerBase*>(&theObject) )
......
......@@ -58,13 +58,14 @@ void CBlooglet::getTouchedBy(CSpriteObject &theObject)
{
if(mCarriesGem)
{
// TODO: If blooglet carried a gem it should fall that case it must jump out! That is a sprite item which can fall on the floor.
// If blooglet carried a gem it should fall that case it must jump out! That is a sprite item which can fall on the floor.
const int newX = getXMidPos();
const int newY = getYUpPos();
const Uint32 newSprite = 118+2*( mFoeID-0xB );
auto *gem = new CSpriteItem(mp_Map, mFoeID+0x2E, newX, newY, newSprite, true);
gem->honorPriority = false;
g_pBehaviorEngine->m_EventList.spawnObj( gem );
playSound(SOUND_JUMPED_GEM);
}
setAction(A_BLOOGLET_STUNNED);
......
......@@ -67,6 +67,7 @@ void CBlooguard::processClubbing()
// At this point Keen must get stunned!
mStubPlayer = true;
setAction(A_BLOOGUARD_WALK);
playSound(SOUND_BLOOGGUARD_STUB);
}
}
......@@ -90,7 +91,11 @@ bool CBlooguard::isNearby(CSpriteObject& theObject)
if(mStubPlayer)
{
mStubPlayer = false;
player->stun();
if(player->stun())
{
player->m_camera.m_relcam.y = (8<<CSF);
}
return true;
}
......
......@@ -23,11 +23,11 @@ void CSpecialItem::getTouchedBy(CSpriteObject& theObject)
CEventContainer& EventContainer = g_pBehaviorEngine->m_EventList;
// TODO: Sound play
//g_pSound->playSound(SOUND_GOT_SPECIAL_ITEM, PLAY_PAUSEALL);
// Sound play
g_pSound->playSound(SOUND_GET_SPECIAL_ITEM, PLAY_PAUSEALL);
// TODO: Show message(s)
// Show message(s)
/*std::vector< std::shared_ptr<EventSendBitmapDialogMsg> > msgs;
std::unique_ptr<EventSendBitmapDialogMsg> msg1(new EventSendBitmapDialogMsg(g_pGfxEngine->getBitmap(104), elder_text[0], LEFT));
......
......@@ -208,8 +208,8 @@ void CAudioGalaxy::setupAudioMap()
sndSlotMapGalaxy[6][SOUND_KEEN_JUMP] = 2;
sndSlotMapGalaxy[6][SOUND_KEEN_LAND] = 3;
sndSlotMapGalaxy[6][SOUND_KEEN_FIRE] = 4;
//sndSlotMapGalaxy[6][?] = 5;
// sndSlotMapGalaxy[4][?] = 6; // This sounds like alternative breathe under water. not sure
sndSlotMapGalaxy[6][SOUND_JUMPED_GEM] = 5;
//sndSlotMapGalaxy[6][?] = 6;
sndSlotMapGalaxy[6][SOUND_KEEN_POGO] = 7;
sndSlotMapGalaxy[6][SOUND_GET_BONUS] = 8;
sndSlotMapGalaxy[6][SOUND_GET_AMMO] = 9;
......@@ -225,18 +225,18 @@ void CAudioGalaxy::setupAudioMap()
sndSlotMapGalaxy[6][SOUND_GET_GEM] = 19;
sndSlotMapGalaxy[6][SOUND_KEEN_FALL] = 20;
sndSlotMapGalaxy[6][SOUND_GUN_CLICK] = 21;
//sndSlotMapGalaxy[6][?] = 22;
sndSlotMapGalaxy[6][SOUND_SQUISH] = 22;
sndSlotMapGalaxy[6][SOUND_KEEN_DIE] = 23;
//sndSlotMapGalaxy[6][?] = 24;
// sndSlotMapGalaxy[6][?] = 24;
sndSlotMapGalaxy[6][SOUND_SHOT_HIT] = 25;
//sndSlotMapGalaxy[6][?] = 26;
//sndSlotMapGalaxy[6][?] = 27;
//sndSlotMapGalaxy[6][?] = 28;
//sndSlotMapGalaxy[6][?] = 29;
sndSlotMapGalaxy[6][SOUND_AUTOGUN] = 29;
//sndSlotMapGalaxy[6][?] = 30;
//sndSlotMapGalaxy[6][?] = 31;
//sndSlotMapGalaxy[6][BIPSHIP_SHOOT] = 31;
//sndSlotMapGalaxy[6][?] = 32;
//sndSlotMapGalaxy[6][?] = 33;
sndSlotMapGalaxy[6][SOUND_SATELITE_MOUNT] = 33;
sndSlotMapGalaxy[6][SOUND_STATUS_SLIDE_IN] = 34;
sndSlotMapGalaxy[6][SOUND_STATUS_SLIDE_OUT] = 35;
//sndSlotMapGalaxy[6][?] = 36;
......@@ -244,17 +244,18 @@ void CAudioGalaxy::setupAudioMap()
//sndSlotMapGalaxy[6][?] = 38;
//sndSlotMapGalaxy[6][?] = 39;
//sndSlotMapGalaxy[6][?] = 40;
//sndSlotMapGalaxy[6][?] = 41;
sndSlotMapGalaxy[6][SOUND_TELEPORT] = 41;
//sndSlotMapGalaxy[6][?] = 42;
sndSlotMapGalaxy[6][SOUND_FLAG_APPEAR] = 43;
sndSlotMapGalaxy[6][SOUND_FLAG_LAND] = 44;
//sndSlotMapGalaxy[6][?] = 45;
sndSlotMapGalaxy[6][SOUND_GET_SPECIAL_ITEM] = 45;
//sndSlotMapGalaxy[6][?] = 46;
sndSlotMapGalaxy[6][SOUND_PLAYER_PADDLE] = 47;
sndSlotMapGalaxy[6][SOUND_COMPUTER_PADDLE] = 48;
sndSlotMapGalaxy[6][SOUND_HIT_SIDEWALL] = 49;
sndSlotMapGalaxy[6][SOUND_COMPUTER_POINT] = 50;
sndSlotMapGalaxy[6][SOUND_PLAYER_POINT] = 51;
sndSlotMapGalaxy[6][SOUND_BLOOGGUARD_STUB] = 58;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment