From 4622fb3b8026eb4cf457a7bf99e1f733cf5553b3 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Wed, 3 Jul 2019 08:24:05 +0530 Subject: HDB: Unstub playSound calls --- engines/hdb/ai-bots.cpp | 49 ++++++++++++++++--------------- engines/hdb/ai-funcs.cpp | 60 +++++++++++++++++++------------------- engines/hdb/ai-lists.cpp | 2 +- engines/hdb/ai-player.cpp | 50 ++++++++++++++++---------------- engines/hdb/ai-use.cpp | 8 +++--- engines/hdb/ai-waypoint.cpp | 24 ++++++++-------- engines/hdb/input.cpp | 8 +++--- engines/hdb/lua-script.cpp | 12 ++++---- engines/hdb/window.cpp | 70 ++++++++++++++++++++++++++++++++++----------- 9 files changed, 162 insertions(+), 121 deletions(-) (limited to 'engines/hdb') diff --git a/engines/hdb/ai-bots.cpp b/engines/hdb/ai-bots.cpp index 056cc4a2c7..b6dfd231d8 100644 --- a/engines/hdb/ai-bots.cpp +++ b/engines/hdb/ai-bots.cpp @@ -110,7 +110,7 @@ void aiOmniBotAction(AIEntity *e) { omni->xVel = xv * kPlayerMoveSpeed * 2; omni->yVel = yv * kPlayerMoveSpeed * 2; if (g_hdb->_map->onScreen(e->tileX, e->tileY)) - warning("STUB: aiOmniBotAction: Play SND_OMNIBOT_FIRE"); + g_hdb->_sound->playSound(SND_OMNIBOT_FIRE); if (!g_hdb->getActionMode()) { omni->xVel >>= 1; omni->yVel >>= 1; @@ -122,7 +122,7 @@ void aiOmniBotAction(AIEntity *e) { } else { g_hdb->_ai->findPath(e); if (e->onScreen) - warning("STUB: aiOmniBotAction: Play SND_OMNIBOT_AMBIENT"); + g_hdb->_sound->playSound(SND_OMNIBOT_AMBIENT); } if (e->sequence) @@ -213,7 +213,7 @@ void aiTurnBotAction(AIEntity *e) { aiTurnBotChoose(e); g_hdb->_ai->animateEntity(e); if (e->onScreen) - warning("STUB: aiTurnBotAction: Play SND_TURNBOT_TURN"); + g_hdb->_sound->playSound(SND_TURNBOT_TURN); } if (e->onScreen && onEvenTile(e->x, e->y) && g_hdb->_ai->checkPlayerCollision(e->x, e->y, 0) && !g_hdb->_ai->playerDead()) @@ -251,7 +251,7 @@ void aiShockBotAction(AIEntity *e) { e->sequence = 20; g_hdb->_ai->animEntFrames(e); if (e->onScreen) - warning("STUB: aiShockBotAction: Play SND_SHOCKBOT_AMBIENT"); + g_hdb->_sound->playSound(SND_SHOCKBOT_AMBIENT); } @@ -452,7 +452,7 @@ void aiRightBotFindGoal(AIEntity *e) { e->xVel = xv * e->moveSpeed; e->yVel = yv * e->moveSpeed; if (e->onScreen) - warning("STUB: aiRightBotFindGoal: Play SND_RIGHTBOT_TURN"); + g_hdb->_sound->playSound(SND_RIGHTBOT_TURN); } void aiRightBotAction(AIEntity *e) { @@ -536,7 +536,7 @@ void aiPushBotAction(AIEntity *e) { warning("STUB: aiPushBotAction: Switch Case for Sound"); } else { if (e->onScreen) - warning("STUB: aiPushBotAction: Play SND_PUSHBOT_STRAIN"); + g_hdb->_sound->playSound(SND_PUSHBOT_STRAIN); e->dir = oneEighty[e->dir]; e->state = moveState[e->dir]; nx = e->tileX + xvAhead[e->dir]; @@ -680,7 +680,7 @@ void aiRailRiderOnAction(AIEntity *e) { g_hdb->_ai->setPlayerInvisible(true); g_hdb->_ai->setPlayerLock(true); g_hdb->_ai->setEntityGoal(e, e->tileX + xv[e->dir], e->tileY + yv[e->dir]); - warning("STUB: aiRailRiderOnAction: Play SND_RAILRIDER_TASTE"); + g_hdb->_sound->playSound(SND_RAILRIDER_TASTE); e->sequence = 2; e->value1 = 0; @@ -734,7 +734,7 @@ void aiRailRiderOnAction(AIEntity *e) { break; } g_hdb->_ai->setPlayerInvisible(false); - warning("STUB: aiRailRiderOnAction: Play SND_RAILRIDER_EXIT"); + g_hdb->_sound->playSound(SND_RAILRIDER_EXIT); } else if (arrowPath->type == 1) { e->dir = arrowPath->dir; g_hdb->_ai->setEntityGoal(e, e->tileX + xv[e->dir], e->tileY + yv[e->dir]); @@ -742,7 +742,7 @@ void aiRailRiderOnAction(AIEntity *e) { } else g_hdb->_ai->setEntityGoal(e, e->tileX + xv[e->dir], e->tileY + yv[e->dir]); - warning("STUB: aiRailRiderOnAction: Play SND_RAILRIDER_ONTRACK"); + g_hdb->_sound->playSound(SND_RAILRIDER_ONTRACK); } p->tileX = e->tileX; @@ -818,7 +818,7 @@ void aiMaintBotAction(AIEntity *e) { int xvAhead[5] = {9, 0, 0,-1, 1}, yvAhead[5] = {9,-1, 1, 0, 0}; AIEntity *it; int nx, ny; - debug(9, "STUB: aiMaintBotAction: Add sounds"); + int whistles[3] = {SND_MBOT_WHISTLE1, SND_MBOT_WHISTLE2, SND_MBOT_WHISTLE3}; // Waiting at an arrow (or hit by player)? if (e->sequence) { @@ -830,7 +830,10 @@ void aiMaintBotAction(AIEntity *e) { switch (e->sequence) { case 50: if (e->onScreen && !e->int1) { - warning("STUB: aiMaintBotAction: Play SND_MBOT_HMMM or SND_MBOT_HMMM2"); + if (g_hdb->_rnd->getRandomNumber(2) & 1) + g_hdb->_sound->playSound(SND_MBOT_HMMM2); + else + g_hdb->_sound->playSound(SND_MBOT_HMMM); } break; // Need to USE the object @@ -888,7 +891,7 @@ void aiMaintBotAction(AIEntity *e) { // HMM case 50: if (e->onScreen && !e->int1) - warning("STUB: aiMaintBotAction: Play SND_MBOT_HMMM"); + g_hdb->_sound->playSound(SND_MBOT_HMMM); break; // Look Right case 40: @@ -903,7 +906,7 @@ void aiMaintBotAction(AIEntity *e) { // HMM2 case 25: if (e->onScreen && !e->int1) - warning("STUB: aiMaintBotAction: Play SND_MBOT_HMM2"); + g_hdb->_sound->playSound(SND_MBOT_HMMM2); break; // Decide direction and GO case 0: @@ -911,7 +914,7 @@ void aiMaintBotAction(AIEntity *e) { e->dir = dirList[dir]; g_hdb->_ai->findPath(e); if (e->onScreen) - warning("STUB: aiMaintBotAction: Play whistle"); + g_hdb->_sound->playSound(whistles[g_hdb->_rnd->getRandomNumber(3)]); break; } } @@ -923,7 +926,7 @@ void aiMaintBotAction(AIEntity *e) { g_hdb->_ai->animateEntity(e); if (hitPlayer(e->x, e->y)) { g_hdb->_ai->killPlayer(DEATH_GRABBED); - warning("STUB: aiMaintBotAction: Play SND_MBOT_DEATH"); + g_hdb->_sound->playSound(SND_MBOT_DEATH); } } else { // Check if there's an arrow UNDER the bot, and if its RED @@ -942,7 +945,7 @@ void aiMaintBotAction(AIEntity *e) { return; } else if (ar->type == 1) { g_hdb->_ai->findPath(e); - warning("STUB: aiMaintBotAction: Play whistle"); + g_hdb->_sound->playSound(whistles[g_hdb->_rnd->getRandomNumber(3)]); } else { e->sequence = 64; e->dir2 = e->dir; @@ -975,7 +978,7 @@ void aiFourFirerAction(AIEntity *e) { e->state = state[e->dir]; e->value1 = 16; if (e->onScreen) - warning("STUB: aiFourFirerAction: Play SND_FOURFIRE_TURN"); + g_hdb->_sound->playSound(SND_FOURFIRE_TURN); } e->value1--; @@ -1011,7 +1014,7 @@ void aiFourFirerAction(AIEntity *e) { if (shoot && !hit && result) { fire = g_hdb->_ai->spawn(AI_OMNIBOT_MISSILE, e->dir, e->tileX + xv, e->tileY + yv, NULL, NULL, NULL, DIR_NONE, e->level, 0, 0, 1); if (g_hdb->_map->onScreen(e->tileX, e->tileY)) - warning("STUB: aiFourFirerAction: Play SND_FOUR_FIRE"); + g_hdb->_sound->playSound(SND_FOUR_FIRE); fire->xVel = xv * kPlayerMoveSpeed * 2; fire->yVel = yv * kPlayerMoveSpeed * 2; if (!g_hdb->getActionMode()) { @@ -1056,9 +1059,9 @@ void aiDeadEyeWalkInPlace(AIEntity *e) { e->state = s; if (e->onScreen) { if (e->sequence == 50) - warning("STUB: aiDeadEyeWalkInPlace: Play SND_DEADEYE_AMB01"); + g_hdb->_sound->playSound(SND_DEADEYE_AMB01); else if (e->sequence == 10) - warning("STUB: aiDeadEyeWalkInPlace: Play SND_DEADEYE_AMB02"); + g_hdb->_sound->playSound(SND_DEADEYE_AMB02); } break; case 0: @@ -1127,7 +1130,7 @@ void aiDeadEyeAction(AIEntity *e) { if (okToMove) { e->moveSpeed = kPlayerMoveSpeed << 1; g_hdb->_ai->setEntityGoal(e, newX, newY); - p->tileX & 1 ? warning("STUB: aiDeadEyeAction: Play SND_DEADEYE_ATTACK01") : warning("STUB: aiDeadEyeAction: Play SND_DEADEYE_ATTACK02"); + p->tileX & 1 ? g_hdb->_sound->playSound(SND_DEADEYE_ATTACK01) : g_hdb->_sound->playSound(SND_DEADEYE_ATTACK02); } g_hdb->_ai->animateEntity(e); return; @@ -1148,9 +1151,9 @@ void aiDeadEyeAction(AIEntity *e) { if (e->onScreen) { if (e->sequence == 50) - warning("STUB: aiDeadEyeAction: Play SND_DEADEYE_AMB01"); + g_hdb->_sound->playSound(SND_DEADEYE_AMB01); else if (e->sequence == 10) - warning("STUB: aiDeadEyeAction: Play SND_DEADEYE_AMB01"); + g_hdb->_sound->playSound(SND_DEADEYE_AMB02); } break; case 0: diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index c68410e103..f16c1f05b6 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -770,32 +770,32 @@ void AI::killPlayer(Death method) { switch (method) { case DEATH_NORMAL: _player->state = STATE_DYING; - warning("STUB: killPlayer: Play SND_GUY_DYING"); + g_hdb->_sound->playSound(SND_GUY_DYING); break; case DEATH_FRIED: _player->state = STATE_HORRIBLE1; - warning("STUB: killPlayer: Play SND_GUY_FRIED"); + g_hdb->_sound->playSound(SND_GUY_FRIED); break; case DEATH_SHOCKED: _player->state = STATE_HORRIBLE2; - warning("STUB: killPlayer: Play SND_GUY_DYING"); - warning("STUB: killPlayer: Play SND_SHOCKBOT_SHOCK"); + g_hdb->_sound->playSound(SND_GUY_DYING); + g_hdb->_sound->playSound(SND_SHOCKBOT_SHOCK); break; case DEATH_GRABBED: _player->state = STATE_HORRIBLE3; - warning("STUB: killPlayer: Play SND_GUY_GRABBED"); + g_hdb->_sound->playSound(SND_GUY_GRABBED); break; case DEATH_DROWNED: _player->state = STATE_HORRIBLE4; - warning("STUB: killPlayer: Play SND_GUY_DROWN"); + g_hdb->_sound->playSound(SND_GUY_DROWN); break; case DEATH_PANICZONE: _player->state = STATE_DYING; - warning("STUB: killPlayer: Play SND_PANIC_DEATH"); + g_hdb->_sound->playSound(SND_PANIC_DEATH); break; case DEATH_PLUMMET: _player->state = STATE_PLUMMET; - warning("STUB: killPlayer: Play SND_GUY_PLUMMET"); + g_hdb->_sound->playSound(SND_GUY_PLUMMET); break; } @@ -814,41 +814,41 @@ void AI::stunEnemy(AIEntity *e, int time) { if (!ns) switch (e->type) { case AI_BUZZFLY: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_BUZZFLY_STUNNED); break; case AI_PUSHBOT: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_PUSHBOT_STUNNED); break; case AI_MEERKAT: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_MEERKAT_STUNNED); break; case AI_FATFROG: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_FATFROG_STUNNED); break; case AI_OMNIBOT: case AI_SHOCKBOT: case AI_LISTENBOT: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_ROBOT_STUNNED); break; case AI_GOODFAIRY: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_GOOD_FAERIE_STUNNED); break; case AI_BADFAIRY: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_BADFAIRY_STUNNED); break; case AI_ICEPUFF: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_ICEPUFF_STUNNED); break; case AI_RIGHTBOT: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_RIGHTBOT_STUNNED); break; case AI_BOOMBARREL: - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_CLUB_HIT_METAL); break; case AI_CHICKEN: // Fall through - warning("STUB: stunEnemy: Play sound"); + g_hdb->_sound->playSound(SND_CHICKEN_DEATH); default: - warning("STUB: stunEnemy: Play sound"); + warning("STUB: stunEnemy: MetalOrFleshSnd"); break; } } @@ -1167,7 +1167,7 @@ void AI::animateEntity(AIEntity *e) { if ((e->type == AI_CRATE || e->type == AI_HEAVYBARREL) && !checkFloating(e->tileX, e->tileY)) { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_SLIME_SPLASH_SIT); floatEntity(e, STATE_FLOATING); - warning("STUB: animateEntity: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); } else if (!checkFloating(e->tileX, e->tileY)) { if (e->type == AI_BOOMBARREL) { aiBarrelExplode(e); @@ -1176,14 +1176,14 @@ void AI::animateEntity(AIEntity *e) { } else { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); removeEntity(e); - warning("STUB: animateEntity: Play SND_BARREL_MELTING"); + g_hdb->_sound->playSound(SND_BARREL_MELTING); } } } else if ((flags & kFlagLightMelt) && e->type == AI_LIGHTBARREL) { if (!checkFloating(e->tileX, e->tileY)) { addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); floatEntity(e, STATE_MELTED); - warning("STUB: animateEntity: Play SND_BARREL_MELTING"); + g_hdb->_sound->playSound(SND_BARREL_MELTING); } } else if (flags & kFlagSlide) { int xv = 0, yv = 0; @@ -1205,7 +1205,7 @@ void AI::animateEntity(AIEntity *e) { else if (flags & kFlagAnimSlow) e->moveSpeed = kPlayerMoveSpeed >> 1; setEntityGoal(e, e->tileX + xv, e->tileY + yv); - warning("STUB: animateEntity: Play SND_LIGHT_SLIDE"); + g_hdb->_sound->playSound(SND_LIGHT_SLIDE); } } else if (!checkFloating(e->tileX, e->tileY)) { @@ -1213,13 +1213,13 @@ void AI::animateEntity(AIEntity *e) { // Make it disappear in the water addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_WATER_SPLASH_SIT); removeEntity(e); - warning("STUB: animateEntity: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); return; } else { // Make it float and splash in water addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_WATER_SPLASH_SIT); floatEntity(e, STATE_FLOATING); - warning("STUB: animateEntity: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); return; } @@ -1296,13 +1296,13 @@ void AI::animateEntity(AIEntity *e) { // Evaporates in Slime addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); removeEntity(e); - warning("STUB: animateEntity: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); return; } else { // Drowns in water addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_WATER_SPLASH_SIT); removeEntity(e); - warning("STUB: animateEntity: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); return; } } @@ -1401,7 +1401,7 @@ void AI::animEntFrames(AIEntity *e) { max = _horrible2Frames; click++; if (click == 16) { - warning("STUB: Play SND_SHOCKBOT_SHOCK"); + g_hdb->_sound->playSound(SND_SHOCKBOT_SHOCK); click = 0; } break; @@ -1413,7 +1413,7 @@ void AI::animEntFrames(AIEntity *e) { max = _horrible3Frames; click++; if (click == 32) { - warning("STUB: Play SND_GUY_GRABBED"); + g_hdb->_sound->playSound(SND_GUY_GRABBED); click = 0; } break; diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index 1e6dee74ed..5126d142da 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -670,7 +670,7 @@ bool AI::checkTeleportList(AIEntity *e, int x, int y) { // Start up Teleport flash animation only if value1 is set to 1 if (anim1 == 1 || anim2 == 2) { addAnimateTarget(e->x, e->y, 0, 7, ANIM_NORMAL, false, false, "teleporter_flash_sit"); - warning("STUB: checkTeleporterList: Play SND_TELEPORT"); + g_hdb->_sound->playSound(SND_TELEPORT); } // PANIC ZONE Teleports? diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index eefede5fce..5b7d9795c4 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -135,7 +135,7 @@ void aiPlayerAction(AIEntity *e) { // Draw the STUN lightning if it exists if (e->sequence) { e->aiDraw = aiPlayerDraw; - warning("STUB: Play SND_STUNNER_FIRE"); + g_hdb->_sound->playSound(SND_STUNNER_FIRE); hit = g_hdb->_ai->findEntity(e->tileX + xvAhead[e->dir], e->tileY + yvAhead[e->dir]); if (hit) switch (hit->type) { @@ -395,7 +395,7 @@ void aiPlayerAction(AIEntity *e) { int bgFlags, fgFlags; if (e->goalX) { if (onEvenTile(e->x, e->y)) { - g_hdb->_ai->playerOnIce() ? warning("STUB: Play SND_STEPS_ICE") : warning("STUB: Play SND_FOOTSTEPS"); + g_hdb->_ai->playerOnIce() ? g_hdb->_sound->playSound(SND_STEPS_ICE) : g_hdb->_sound->playSound(SND_FOOTSTEPS); // Did we just fall down a PLUMMET? bgFlags = g_hdb->_map->getMapBGTileFlags(e->tileX, e->tileY); @@ -491,7 +491,7 @@ void aiGemAttackInit(AIEntity *e) { e->sequence = 0; // flying out at something e->aiAction = aiGemAttackAction; e->draw = e->movedownGfx[0]; - warning("Play SND_GEM_THROW"); + g_hdb->_sound->playSound(SND_GEM_THROW); } void aiGemAttackAction(AIEntity *e) { @@ -517,7 +517,7 @@ void aiGemAttackAction(AIEntity *e) { case AI_CHICKEN: g_hdb->_ai->addAnimateTarget(hit->x, hit->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); g_hdb->_ai->removeEntity(hit); - warning("Play SND_CHICKEN_BAGAWK"); + g_hdb->_sound->playSound(SND_CHICKEN_BAGAWK); break; case AI_BADFAIRY: g_hdb->_ai->stunEnemy(hit, 2); @@ -532,20 +532,20 @@ void aiGemAttackAction(AIEntity *e) { memcpy(num1, hit->luaFuncUse, 3); memcpy(num2, hit->luaFuncUse + 3, 3); - warning("Play SND_CLUB_HIT_FLESH"); + g_hdb->_sound->playSound(SND_CLUB_HIT_FLESH); AIEntity *found = g_hdb->_ai->findEntity(atoi(num1), atoi(num2)); if (found) aiDragonWake(found); } g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); - warning("Play SND_INV_SELECT"); + g_hdb->_sound->playSound(SND_INV_SELECT); break; case AI_DRAGON: - warning("Play SND_CLUB_HIT_FLESH"); + g_hdb->_sound->playSound(SND_CLUB_HIT_FLESH); aiDragonWake(hit); default: g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); - warning("Play SND_CLUB_HIT_FLESH"); + g_hdb->_sound->playSound(SND_CLUB_HIT_FLESH); } if (e->value1) e->sequence = 1; @@ -554,7 +554,7 @@ void aiGemAttackAction(AIEntity *e) { return; } else if (result) { // hit a wall g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); - warning("Play SND_INV_SELECT"); + g_hdb->_sound->playSound(SND_INV_SELECT); // come back to daddy? if (e->value1) e->sequence = 1; @@ -588,7 +588,7 @@ void aiGemAttackAction(AIEntity *e) { g_hdb->_ai->setGemAmount(amt + 1); g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); g_hdb->_ai->removeEntity(e); - warning("Play SND_GET_GEM"); + g_hdb->_sound->playSound(SND_GET_GEM); } break; } @@ -598,7 +598,7 @@ void aiChickenAction(AIEntity *e) { static int delay = 64; if (g_hdb->_map->checkEntOnScreen(e) && !delay) { - warning("Play SND_CHICKEN_AMBIENT"); + g_hdb->_sound->playSound(SND_CHICKEN_AMBIENT); delay = g_hdb->_rnd->getRandomNumber(128) + 160; aiChickenUse(e); } @@ -613,7 +613,7 @@ void aiChickenAction(AIEntity *e) { } void aiChickenUse(AIEntity *e) { - warning("Play SND_CHICKEN_BAGAWK"); + g_hdb->_sound->playSound(SND_CHICKEN_BAGAWK); } void aiChickenInit(AIEntity *e) { @@ -646,7 +646,7 @@ void aiSergeantInit2(AIEntity *e) { void aiSergeantAction(AIEntity *e) { if (e->goalX) { - debug(9, "STUB: AI-PLAYER: aiSergeantAction: Play SND_FOOTSTEPS sounds"); + g_hdb->_sound->playSound(SND_FOOTSTEPS); g_hdb->_ai->animateEntity(e); } else g_hdb->_ai->animEntFrames(e); @@ -777,7 +777,7 @@ void aiBarrelExplode(AIEntity *e) { e->state = STATE_EXPLODING; e->animDelay = e->animCycle; e->animFrame = 0; - warning("STUB: Play SND_BARREL_EXPLODE"); + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); g_hdb->_map->setBoomBarrel(e->tileX, e->tileY, 0); } @@ -965,7 +965,7 @@ void aiSlugAttackAction(AIEntity *e) { uint32 fg_flags = g_hdb->_map->getMapFGTileFlags(e->tileX, e->tileY); result = (e->level == 1 ? (bg_flags & (kFlagSolid)) : !(fg_flags & kFlagGrating) && (bg_flags & (kFlagSolid))); if (hit) { - warning("STUB: Play SND_SLUG_HIT"); + g_hdb->_sound->playSound(SND_SLUG_HIT); warning("STUB: Play MetalOrFleshSnd"); switch (hit->type) { case AI_MEERKAT: @@ -1012,7 +1012,7 @@ void aiSlugAttackAction(AIEntity *e) { g_hdb->_ai->removeEntity(hit); break; case AI_BOOMBARREL: - warning("STUB: Play SND_CLUB_HIT_METAL"); + g_hdb->_sound->playSound(SND_CLUB_HIT_METAL); aiBarrelExplode(hit); aiBarrelBlowup(hit, hit->tileX, hit->tileY); break; @@ -1020,13 +1020,13 @@ void aiSlugAttackAction(AIEntity *e) { case AI_GATEPUDDLE: g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 7, ANIM_NORMAL, false, false, TELEPORT_FLASH); g_hdb->_ai->removeEntity(hit); - warning("STUB: Play SND_TELEPORT"); + g_hdb->_sound->playSound(SND_TELEPORT); break; case AI_DEADEYE: g_hdb->_ai->addAnimateTarget(e->tileX * kTileWidth, e->tileY * kTileHeight, 0, 3, ANIM_NORMAL, false, false, GROUP_EXPLOSION_BOOM_SIT); g_hdb->_ai->removeEntity(hit); - warning("STUB: Play SND_BARREL_EXPLODE"); + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); break; case AI_NONE: @@ -1038,7 +1038,7 @@ void aiSlugAttackAction(AIEntity *e) { memcpy(num1, hit->luaFuncUse, 3); memcpy(num2, hit->luaFuncUse + 3, 3); - warning("STUB: Play SND_CLUB_HIT_FLESH"); + g_hdb->_sound->playSound(SND_CLUB_HIT_FLESH); AIEntity *found = g_hdb->_ai->findEntity(atoi(num1), atoi(num2)); if (found) aiDragonWake(found); @@ -1054,7 +1054,7 @@ void aiSlugAttackAction(AIEntity *e) { g_hdb->_ai->removeEntity(e); // bye bye! return; } else if (result) { // hit a wall - warning("STUB: Play SND_SLUG_HIT"); + g_hdb->_sound->playSound(SND_SLUG_HIT); g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GROUP_STEAM_PUFF_SIT); g_hdb->_ai->removeEntity(e); } else { @@ -1076,7 +1076,7 @@ void aiSlugAttackInit(AIEntity *e) { e->aiDraw = aiSlugAttackDraw; e->state = STATE_MOVEDOWN; // so it will draw & animate e->aiAction = aiSlugAttackAction; - warning("STUB: Play SND_SLUG_FIRE"); + g_hdb->_sound->playSound(SND_SLUG_FIRE); } void aiSlugAttackInit2(AIEntity *e) { @@ -1433,7 +1433,7 @@ void aiMagicEggUse(AIEntity *e) { if (spawned) { g_hdb->_ai->addAnimateTarget(e->tileX * kTileWidth, e->tileY * kTileHeight, 0, 3, ANIM_NORMAL, false, false, GROUP_EXPLOSION_BOOM_SIT); - warning("Play SND_BARREL_EXPLODE"); + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); g_hdb->_ai->removeEntity(e); } } @@ -1584,7 +1584,7 @@ void aiMonkeystoneUse(AIEntity *e) { if (val > 1) strcat(monkBuff, "s"); strcat(monkBuff, "!"); - warning("STUB: Play SND_GET_MONKEYSTONE"); + g_hdb->_sound->playSound(SND_GET_MONKEYSTONE); g_hdb->_window->openMessageBar(monkBuff, kMsgDelay); // have we unlocked a secret star(tm)??? @@ -1609,7 +1609,7 @@ void aiGemAction(AIEntity *e) { if (e->onScreen && abs(p->x - e->x) < tolerance && abs(p->y - e->y) < tolerance && e->level == p->level) { g_hdb->_ai->addAnimateTarget(e->x, e->y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); g_hdb->_ai->addToInventory(e); - warning("Play SND_GET_GEM"); + g_hdb->_sound->playSound(SND_GET_GEM); return; } } @@ -1676,7 +1676,7 @@ void aiGenericAction(AIEntity *e) { if (!e->goalX) g_hdb->_ai->findPath(e); else if (onEvenTile(e->x, e->y)) - debug(9, "STUB: Play SND_FOOTSTEPS"); + g_hdb->_sound->playSound(SND_FOOTSTEPS); g_hdb->_ai->animateEntity(e); } diff --git a/engines/hdb/ai-use.cpp b/engines/hdb/ai-use.cpp index 188244ce1f..10a8e4dbd3 100644 --- a/engines/hdb/ai-use.cpp +++ b/engines/hdb/ai-use.cpp @@ -78,7 +78,7 @@ void callbackDoorOpenClose(int x, int y) { g_hdb->_ai->addAnimateTarget(x, y, tileIndex, tileIndex + 3, ANIM_SLOW, false, true, NULL); if (g_hdb->_map->onScreen(x, y)) - warning("STUB: Play SND_DOOR_OPEN_CLOSE"); + g_hdb->_sound->playSound(SND_DOOR_OPEN_CLOSE); return; } @@ -89,7 +89,7 @@ bool AI::useDoorOpenClose(AIEntity *e, int x, int y) { addAnimateTarget(x, y, tileIndex, tileIndex - 3, ANIM_SLOW, false, true, NULL); addCallback(CALLBACK_DOOR_OPEN_CLOSE, x, y, kDelay5Seconds); if (g_hdb->_map->onScreen(x, y)) - warning("Play SND_DOOR_OPEN_CLOSE"); + g_hdb->_sound->playSound(SND_DOOR_OPEN_CLOSE); return true; } @@ -104,7 +104,7 @@ void callbackAutoDoorOpenClose(int x, int y) { g_hdb->_ai->addAnimateTarget(x, y, tileIndex, tileIndex + 3, ANIM_SLOW, true, true, NULL); if (g_hdb->_map->onScreen(x, y)) - warning("STUB: callbackAutoDoorOpenClose: Play SND_DOOR_OPEN_CLOSE"); + g_hdb->_sound->playSound(SND_DOOR_OPEN_CLOSE); return; } @@ -117,7 +117,7 @@ bool AI::useAutoDoorOpenClose(AIEntity *e, int x, int y) { addAnimateTarget(x, y, tileIndex, tileIndex - 3, ANIM_SLOW, false, true, NULL); addCallback(CALLBACK_AUTODOOR_OPEN_CLOSE, x, y, kDelay5Seconds); if (g_hdb->_map->onScreen(x, y)) - warning("useAutoDoorOpenClose: Play SND_DOOR_OPEN_CLOSE"); + g_hdb->_sound->playSound(SND_DOOR_OPEN_CLOSE); return false; } diff --git a/engines/hdb/ai-waypoint.cpp b/engines/hdb/ai-waypoint.cpp index 6e153a6cd9..687c57cdcd 100644 --- a/engines/hdb/ai-waypoint.cpp +++ b/engines/hdb/ai-waypoint.cpp @@ -85,7 +85,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); if (onEvenTile(_player->x, _player->y)) setEntityGoal(_player, tx, ty); @@ -134,7 +134,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); if (onEvenTile(_player->x, _player->y)) setEntityGoal(_player, tx, ty); @@ -163,7 +163,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); if (onEvenTile(_player->x, _player->y)) setEntityGoal(_player, tx, ty); @@ -221,7 +221,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ty; _waypoints[_numWaypoints].level = lvl1; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } if (_numWaypoints < kMaxWaypoints) { @@ -229,7 +229,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } } } @@ -258,7 +258,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ty; _waypoints[_numWaypoints].level = lvl1; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } if (_numWaypoints < kMaxWaypoints) { @@ -266,7 +266,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } } } @@ -276,7 +276,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ty; _waypoints[_numWaypoints].level = lvl1; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } if (_numWaypoints < kMaxWaypoints) { @@ -284,7 +284,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } } else { tx = px; @@ -308,7 +308,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ty; _waypoints[_numWaypoints].level = lvl1; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } if (_numWaypoints < kMaxWaypoints) { @@ -316,7 +316,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = lvl2; _numWaypoints++; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } } } @@ -338,7 +338,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { _waypoints[_numWaypoints].y = ny; _waypoints[_numWaypoints].level = level; _numWaypoints++; - warning("STUB: addWaypoint: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } } diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index c9dbd2c744..2c527e66b2 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -60,13 +60,13 @@ void Input::setButtons(uint16 b) { if ((_buttons & kButtonA) && !changeState && (g_hdb->getGameState() != GAME_MENU)) { if (g_hdb->_ai->cinematicsActive() && g_hdb->_ai->cineAbortable()) { g_hdb->_ai->cineAbort(); - warning("STUB: setButtons: Play SND_POP"); + g_hdb->_sound->playSound(SND_POP); return; } if (g_hdb->getGameState() == GAME_TITLE) warning("STUB: setButtons: changeToMenu() required"); - warning("STUB: setButtons: Play SND_MENU_BACKOUT"); + g_hdb->_sound->playSound(SND_MENU_BACKOUT); g_hdb->changeGameState(); } @@ -181,7 +181,7 @@ void Input::stylusDown(int x, int y) { g_hdb->_window->centerTextOut("Running Speed", kScreenHeight - 32, kRunToggleDelay * kGameFPS); else g_hdb->_window->centerTextOut("Walking Speed", kScreenHeight - 32, kRunToggleDelay * kGameFPS); - warning("STUB: Play SND_SWITCH_USE"); + g_hdb->_sound->playSound(SND_SWITCH_USE); } g_hdb->setTargetXY(worldX, worldY); @@ -268,7 +268,7 @@ void Input::updateMouseButtons(int l, int m, int r) { return; g_hdb->_ai->clearWaypoints(); - warning("STUB: Play SND_POP"); + g_hdb->_sound->playSound(SND_POP); } // Check if RButton has been pressed diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 4b1086805a..6b18b21cd7 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -705,32 +705,32 @@ static int animation(lua_State *L) { case 0: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 3, ANIM_NORMAL, false, false, GROUP_WATER_SPLASH_SIT); if (playsnd) - warning("STUB: Play SND_SPLASH"); + g_hdb->_sound->playSound(SND_SPLASH); break; case 1: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 3, ANIM_NORMAL, false, false, GROUP_EXPLOSION_BOOM_SIT); if (playsnd) - warning("STUB: Play SND_BARREL_EXPLODE"); + g_hdb->_sound->playSound(SND_BARREL_EXPLODE); break; case 2: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 3, ANIM_FAST, false, false, GROUP_STEAM_PUFF_SIT); if (playsnd) - warning("STUB: Play SND_BARREL_MELTING"); + g_hdb->_sound->playSound(SND_BARREL_MELTING); break; case 3: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 7, ANIM_NORMAL, false, false, TELEPORT_FLASH); if (playsnd) - warning("STUB: Play SND_TELEPORT"); + g_hdb->_sound->playSound(SND_TELEPORT); break; case 4: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 3, ANIM_NORMAL, false, false, GEM_FLASH); if (playsnd) - warning("STUB: Play SND_GET_GEM"); + g_hdb->_sound->playSound(SND_GET_GEM); break; case 5: g_hdb->_ai->addAnimateTarget((int)x, (int)y, 0, 2, ANIM_NORMAL, false, false, GROUP_ENT_CHICKEN_DIE); if (playsnd) - warning("STUB: Play SND_CHICKEN_DEATH"); + g_hdb->_sound->playSound(SND_CHICKEN_DEATH); break; } diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index a0902cfe7a..71e16e9f82 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -112,7 +112,7 @@ void Window::drawPause() { void Window::checkPause(uint x, uint y) { if (x >= 480 / 2 - _gfxPausePlaque->_width / 2 && 480 / 2 + _gfxPausePlaque->_width / 2 > x && y >= kPauseY && y < kPauseY + _gfxPausePlaque->_height) { g_hdb->togglePause(); - warning("STUB: checkPause: Play SND_POP"); + g_hdb->_sound->playSound(SND_POP); } } @@ -168,7 +168,7 @@ void Window::openDialog(const char *title, int tileIndex, const char *string, in _dialogInfo.more = more; if (luaMore) strcpy(_dialogInfo.luaMore, luaMore); - warning("STUB: openDialog: Play SND_MOVE_SELECTION"); + g_hdb->_sound->playSound(SND_MOVE_SELECTION); } void Window::drawDialog() { @@ -230,7 +230,7 @@ void Window::drawDialog() { void Window::closeDialog() { if (_dialogInfo.active) { - warning("STUB: closeDialog: Play SND_SWITCH_USE"); + g_hdb->_sound->playSound(SND_SWITCH_USE); _dialogInfo.active = false; _dialogDelay = 0; if (_dialogInfo.luaMore[0] && !g_hdb->_ai->cinematicsActive()) @@ -378,7 +378,7 @@ void Window::openDialogChoice(const char *title, const char *text, const char *f _dialogChoiceInfo.selection = 0; _dialogChoiceInfo.timeout = 0; - warning("STUB: Play SND_MOVE_SELECTION"); + g_hdb->_sound->playSound(SND_MOVE_SELECTION); } void Window::drawDialogChoice() { @@ -440,7 +440,7 @@ void Window::closeDialogChoice() { g_hdb->_lua->pushFunction(_dialogChoiceInfo.func); g_hdb->_lua->pushInt(_dialogChoiceInfo.selection); g_hdb->_lua->call(1, 0); - warning("STUB: Play SND_SWITCH_USE"); + g_hdb->_sound->playSound(SND_SWITCH_USE); } } @@ -450,7 +450,7 @@ bool Window::checkDialogChoiceClose(int x, int y) { if (x >= _dialogChoiceInfo.x && x < _dialogChoiceInfo.x + _dialogChoiceInfo.width && y >= _dialogChoiceInfo.y + _dialogChoiceInfo.textHeight && y < _dialogChoiceInfo.y + _dialogChoiceInfo.textHeight + _dialogChoiceInfo.numChoices * 16) { - warning("STUB: Play SND_SWITCH_USE"); + g_hdb->_sound->playSound(SND_SWITCH_USE); _dialogChoiceInfo.selection = (y - (_dialogChoiceInfo.y + _dialogChoiceInfo.textHeight)) >> 4; _dialogChoiceInfo.timeout = g_hdb->getTimeSlice() + 500; return true; @@ -463,14 +463,14 @@ void Window::dialogChoiceMoveup() { _dialogChoiceInfo.selection--; if (_dialogChoiceInfo.selection < 0) _dialogChoiceInfo.selection = _dialogChoiceInfo.numChoices - 1; - warning("STUB: Play SND_MOVE_SELECTION"); + g_hdb->_sound->playSound(SND_MOVE_SELECTION); } void Window::dialogChoiceMovedown() { _dialogChoiceInfo.selection++; if (_dialogChoiceInfo.selection >= _dialogChoiceInfo.numChoices) _dialogChoiceInfo.selection = 0; - warning("STUB: Play SND_MOVE_SELECTION"); + g_hdb->_sound->playSound(SND_MOVE_SELECTION); } void Window::openMessageBar(const char *title, int time) { @@ -585,7 +585,7 @@ void Window::nextMsgQueued() { void Window::closeMsg() { nextMsgQueued(); - warning("STUB: Play SND_DIALOG_CLOSE"); + g_hdb->_sound->playSound(SND_DIALOG_CLOSE); } void Window::drawInventory() { @@ -678,7 +678,7 @@ void Window::checkInvSelect(int x, int y) { // If this is a weapon, choose it warning("STUB: checkInvSelect: ChooseWeapon() required"); - warning("STUB: checkInvSelect: Play SND_POP"); + g_hdb->_sound->playSound(SND_POP); } } @@ -694,7 +694,7 @@ void Window::openDeliveries(bool animate) { d->destGfx = g_hdb->_gfx->loadTile(d->destGfxName); } - warning("STUB: Play SND_POP"); + g_hdb->_sound->playSound(SND_POP); _dlvsInfo.animate = animate; _dlvsInfo.delay1 = g_hdb->getTimeSlice() + 500; _dlvsInfo.go1 = _dlvsInfo.go2 = _dlvsInfo.go3 = false; @@ -714,7 +714,45 @@ void Window::drawDeliveries() { DlvEnt *d; static uint32 timer = g_hdb->getTimeSlice() + 300; - debug(9, "STUB: Add Crazy Sounds"); + int crazySounds[kNumCrazy] = { + SND_GUI_INPUT, + SND_MAIL_PROCESS, + SND_MONKEY_OOHOOH, + SND_GET_GEM, + SND_MENU_ACCEPT, + SND_MENU_BACKOUT, + SND_MENU_SLIDER, + SND_DIALOG_CLOSE, + SND_POP, + SND_SPLASH, + SND_CHICKEN_AMBIENT, + SND_SWITCH_USE, + SND_BARREL_EXPLODE, + SND_BARREL_MELTING, + SND_MOVE_SELECTION, + SND_NOTICE, + SND_DIALOG_OPEN, + SND_TOUCHPLATE_CLICK, + SND_MBOT_HYEAH, + SND_MBOT_YEAH, + SND_MBOT_WHISTLE1, + SND_CLUB_MISS, + SND_CLUB_HIT_METAL, + SND_CLUB_HIT_FLESH, + SND_FROG_LICK, + SND_ROBOT_STUNNED, + SND_BRIDGE_EXTEND, + SND_BRIDGE_END, + SND_AIRLOCK_CLOSE, + SND_FART, + SND_FART2, + SND_GEM_THROW, + SND_INV_SELECT, + SND_INFOCOMP, + SND_CLOCK_BONK, + SND_GET_GOO, + SND_MANNY_CRASH + }; if (_infobarDimmed > 1) return; @@ -742,7 +780,7 @@ void Window::drawDeliveries() { if (!_dlvsInfo.go2) { _dlvsInfo.go2 = true; _dlvsInfo.delay2 = g_hdb->getTimeSlice() + 500; - warning("STUB: Play crazy sound"); + g_hdb->_sound->playSound(crazySounds[g_hdb->_rnd->getRandomNumber(kNumCrazy)]); } } } @@ -756,7 +794,7 @@ void Window::drawDeliveries() { if (!_dlvsInfo.go3) { _dlvsInfo.go3 = true; _dlvsInfo.delay3 = g_hdb->getTimeSlice() + 500; - warning("STUB: Play crazy sound"); + g_hdb->_sound->playSound(crazySounds[g_hdb->_rnd->getRandomNumber(kNumCrazy)]); } } } @@ -770,7 +808,7 @@ void Window::drawDeliveries() { g_hdb->_gfx->drawText("to "); g_hdb->_gfx->drawText(d->destTextName); - warning("STUB: Play crazy sound"); + g_hdb->_sound->playSound(crazySounds[g_hdb->_rnd->getRandomNumber(kNumCrazy)]); _dlvsInfo.animate = false; } } @@ -823,7 +861,7 @@ void Window::drawDeliveries() { void Window::setSelectedDelivery(int which) { _dlvsInfo.selected = which; - warning("STUB: Play SND_MENU_SLIDER"); + g_hdb->_sound->playSound(SND_MENU_SLIDER); } void Window::checkDlvSelect(int x, int y) { -- cgit v1.2.3