aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap
diff options
context:
space:
mode:
authorStrangerke2016-04-11 23:37:24 +0200
committerEugene Sandulenko2016-05-10 09:54:21 +0200
commit558ab62fd7e526af549f82b92cc820f46faf2fcd (patch)
tree4aa9c11f089ebb985882a62a00e7a4592a773f86 /engines/gnap
parent192bc349350e33e44d15f59e548dcecd4a7b253c (diff)
downloadscummvm-rg350-558ab62fd7e526af549f82b92cc820f46faf2fcd.tar.gz
scummvm-rg350-558ab62fd7e526af549f82b92cc820f46faf2fcd.tar.bz2
scummvm-rg350-558ab62fd7e526af549f82b92cc820f46faf2fcd.zip
GNAP: Enforce the use of a boolean when calling playSound()
Diffstat (limited to 'engines/gnap')
-rw-r--r--engines/gnap/gnap.cpp16
-rw-r--r--engines/gnap/menu.cpp48
-rw-r--r--engines/gnap/scenes/scene00.cpp2
-rw-r--r--engines/gnap/scenes/scene01.cpp10
-rw-r--r--engines/gnap/scenes/scene02.cpp4
-rw-r--r--engines/gnap/scenes/scene03.cpp5
-rw-r--r--engines/gnap/scenes/scene04.cpp5
-rw-r--r--engines/gnap/scenes/scene05.cpp4
-rw-r--r--engines/gnap/scenes/scene06.cpp2
-rw-r--r--engines/gnap/scenes/scene07.cpp2
-rw-r--r--engines/gnap/scenes/scene08.cpp2
-rw-r--r--engines/gnap/scenes/scene09.cpp2
-rw-r--r--engines/gnap/scenes/scene10.cpp6
-rw-r--r--engines/gnap/scenes/scene11.cpp4
-rw-r--r--engines/gnap/scenes/scene13.cpp16
-rw-r--r--engines/gnap/scenes/scene14.cpp10
-rw-r--r--engines/gnap/scenes/scene15.cpp16
-rw-r--r--engines/gnap/scenes/scene17.cpp5
-rw-r--r--engines/gnap/scenes/scene18.cpp3
-rw-r--r--engines/gnap/scenes/scene19.cpp2
-rw-r--r--engines/gnap/scenes/scene20.cpp4
-rw-r--r--engines/gnap/scenes/scene21.cpp8
-rw-r--r--engines/gnap/scenes/scene23.cpp6
-rw-r--r--engines/gnap/scenes/scene24.cpp4
-rw-r--r--engines/gnap/scenes/scene25.cpp3
-rw-r--r--engines/gnap/scenes/scene26.cpp4
-rw-r--r--engines/gnap/scenes/scene27.cpp4
-rw-r--r--engines/gnap/scenes/scene28.cpp5
-rw-r--r--engines/gnap/scenes/scene29.cpp4
-rw-r--r--engines/gnap/scenes/scene30.cpp10
-rw-r--r--engines/gnap/scenes/scene31.cpp5
-rw-r--r--engines/gnap/scenes/scene32.cpp7
-rw-r--r--engines/gnap/scenes/scene33.cpp5
-rw-r--r--engines/gnap/scenes/scene39.cpp2
-rw-r--r--engines/gnap/scenes/scene40.cpp2
-rw-r--r--engines/gnap/scenes/scene41.cpp2
-rw-r--r--engines/gnap/scenes/scene42.cpp2
-rw-r--r--engines/gnap/scenes/scene43.cpp8
-rw-r--r--engines/gnap/scenes/scene44.cpp2
-rw-r--r--engines/gnap/scenes/scene45.cpp6
-rw-r--r--engines/gnap/scenes/scene46.cpp3
-rw-r--r--engines/gnap/scenes/scene49.cpp8
-rw-r--r--engines/gnap/scenes/scene51.cpp12
-rw-r--r--engines/gnap/scenes/scene52.cpp18
-rw-r--r--engines/gnap/scenes/scene53.cpp3
45 files changed, 136 insertions, 165 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 08b8f95843..a755c9841f 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -911,7 +911,7 @@ int GnapEngine::playSoundA() {
if (!_timers[_soundTimerIndexA]) {
_timers[_soundTimerIndexA] = getRandom(50) + 100;
soundId = kSoundIdsA[getRandom(11)];
- playSound(soundId | 0x10000, 0);
+ playSound(soundId | 0x10000, false);
}
return soundId;
}
@@ -935,7 +935,7 @@ int GnapEngine::playSoundB() {
if (!_timers[_soundTimerIndexB]) {
_timers[_soundTimerIndexB] = getRandom(50) + 150;
soundId = kSoundIdsB[getRandom(19)];
- playSound(soundId | 0x10000, 0);
+ playSound(soundId | 0x10000, false);
}
return soundId;
}
@@ -957,7 +957,7 @@ int GnapEngine::playSoundC() {
if (!_timers[_soundTimerIndexC]) {
_timers[_soundTimerIndexC] = getRandom(50) + 150;
soundId = kSoundIdsC[getRandom(7)] ;
- playSound(soundId | 0x10000, 0);
+ playSound(soundId | 0x10000, false);
}
return soundId;
}
@@ -2134,16 +2134,16 @@ void GnapEngine::sceneXX_playRandomSound(int timerIndex) {
_timers[timerIndex] = getRandom(40) + 50;
switch (getRandom(4)) {
case 0:
- playSound(0x1091B, 0);
+ playSound(0x1091B, false);
break;
case 1:
- playSound(0x10921, 0);
+ playSound(0x10921, false);
break;
case 2:
- playSound(0x10927, 0);
+ playSound(0x10927, false);
break;
case 3:
- playSound(0x1091D, 0);
+ playSound(0x1091D, false);
break;
}
}
@@ -2326,7 +2326,7 @@ void GnapEngine::cutscene_run() {
}
if (soundId != -1)
- playSound(soundId, 0);
+ playSound(soundId, false);
hideCursor();
diff --git a/engines/gnap/menu.cpp b/engines/gnap/menu.cpp
index 1ffd7ab1c5..82e45dedbe 100644
--- a/engines/gnap/menu.cpp
+++ b/engines/gnap/menu.cpp
@@ -406,7 +406,7 @@ void GnapEngine::updateMenuStatusInventory() {
if (_sceneClickedHotspot == _hotspotsCount - 3) {
if (_grabCursorSpriteIndex == -1) {
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_menuStatus = 1;
Common::Rect dirtyRect(_hotspots[0]._x1, _hotspots[0]._y1, _hotspots[2]._x2, _hotspots[_hotspotsCount - 4]._y2);
drawInventoryFrames();
@@ -417,11 +417,11 @@ void GnapEngine::updateMenuStatusInventory() {
_gameSys->insertSpriteDrawItem(_menuSprite1, 288, 79, 262);
_gameSys->insertDirtyRect(dirtyRect);
} else {
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
}
} else if (_sceneClickedHotspot == _hotspotsCount - 1) {
_timers[2] = 10;
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_menuDone = true;
}
} else if (_sceneClickedHotspot != -1 && _menuInventoryIndices[_sceneClickedHotspot] != -1 && _grabCursorSpriteIndex == -1) {
@@ -448,7 +448,7 @@ void GnapEngine::updateMenuStatusInventory() {
invRemove(kCombineItems[combineIndex].item1);
invRemove(kCombineItems[combineIndex].item2);
invAdd(kCombineItems[combineIndex].resultItem);
- playSound(0x108AE, 0);
+ playSound(0x108AE, false);
deleteSurface(&_spriteHandle); // CHECKME
_spriteHandle = _gameSys->createSurface(0x10001);
_gameSys->insertSpriteDrawItem(_spriteHandle, _hotspots[_menuSpritesIndex - 1]._x1, _hotspots[_menuSpritesIndex - 1]._y1, 261);
@@ -457,7 +457,7 @@ void GnapEngine::updateMenuStatusInventory() {
insertInventorySprites();
delayTicksCursor(5);
} else {
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
}
}
}
@@ -476,7 +476,7 @@ void GnapEngine::updateMenuStatusMainMenu() {
if (_sceneClickedHotspot == 3) {
// Quit
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_gameSys->removeSpriteDrawItem(_menuSprite1, 262);
initMenuQuitQueryHotspots();
_menuStatus = 4;
@@ -485,7 +485,7 @@ void GnapEngine::updateMenuStatusMainMenu() {
_gameSys->insertSpriteDrawItem(_menuQuitQuerySprite, 254, 93, 262);
} else if (_sceneClickedHotspot == 4) {
// Pause ?
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
Common::Rect dirtyRect(0, 0, 799, 599);
hideCursor();
_largeSprite = _gameSys->allocSurface(800, 600);
@@ -513,7 +513,7 @@ void GnapEngine::updateMenuStatusMainMenu() {
gameUpdateTick();
}
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_mouseClickState._left = false;
clearKeyStatus1(28);
clearKeyStatus1(29);
@@ -527,7 +527,7 @@ void GnapEngine::updateMenuStatusMainMenu() {
} else if (_hotspotsCount - 3 == _sceneClickedHotspot) {
// Button
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
initMenuHotspots1();
/* TODO
if (_mouseX < 93 || _mouseX > 638 || _mouseY < 0 || _mouseY > 600)
@@ -542,14 +542,14 @@ void GnapEngine::updateMenuStatusMainMenu() {
}
} else {
// Resume
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_menuDone = true;
}
} else {
// Save / Load
#if 1
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
if (_sceneClickedHotspot == 1) {
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
@@ -570,16 +570,16 @@ void GnapEngine::updateMenuStatusMainMenu() {
_wasSavegameLoaded = true;
_menuDone = true;
_sceneDone = true;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
} else {
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
}
}
}
#else
// Original Code
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_gameSys->removeSpriteDrawItem(_menuSprite1, 262);
if (_menuSaveLoadSprite)
deleteSurface(&_menuSaveLoadSprite);
@@ -751,13 +751,13 @@ void GnapEngine::updateMenuStatusSaveGame() {
if (_hotspotsCount - 3 == _sceneClickedHotspot) {
// Button
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_menuStatus = 1;
warning("writeSavegame(_savegameIndex + 1, (int)&_savegameFilenames[30 * _savegameIndex], 1);");
} else if (_hotspotsCount - 4 == _sceneClickedHotspot) {
// Cancel
_timers[2] = 10;
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_menuStatus = 1;
if (strcmp(v43, _savegameFilenames[_savegameIndex]) && _savegameIndex != -1) {
strcpy(_savegameFilenames[_savegameIndex], v43);
@@ -772,7 +772,7 @@ void GnapEngine::updateMenuStatusSaveGame() {
} else if (_hotspotsCount - 5 == _sceneClickedHotspot) {
// OK
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
if (_savegameIndex != -1)
warning("writeSavegame(_savegameIndex + 1, (int)&_savegameFilenames[30 * _savegameIndex], 1);");
_menuStatus = 1;
@@ -782,7 +782,7 @@ void GnapEngine::updateMenuStatusSaveGame() {
} else if (_sceneClickedHotspot != -1 && _hotspotsCount - 2 != _sceneClickedHotspot) {
// Savegame name
_timers[2] = 10;
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
if (strcmp(v43, _savegameFilenames[_savegameIndex]) & (_savegameIndex != -1)) {
strcpy(_savegameFilenames[_savegameIndex], v43);
if (_savegameSprites[_savegameIndex] != nullptr) {
@@ -903,7 +903,7 @@ void GnapEngine::updateMenuStatusLoadGame() {
if (_sceneClickedHotspot != -1 && _hotspotsCount - 2 != _sceneClickedHotspot) {
_timers[2] = 10;
if (_hotspotsCount - 4 <= _sceneClickedHotspot) {
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_gameSys->removeSpriteDrawItem(_menuSprite2, 262);
_gameSys->removeSpriteDrawItem(_menuSaveLoadSprite, 262);
for (int i = 0; i < 7; ++i)
@@ -916,9 +916,9 @@ void GnapEngine::updateMenuStatusLoadGame() {
_gameSys->insertSpriteDrawItem(_menuSprite1, 288, 79, 262);
}
} else if (loadSavegame(_sceneClickedHotspot + 1)) {
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
} else {
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_sceneDone = true;
}
}
@@ -946,18 +946,18 @@ void GnapEngine::updateMenuStatusQueryQuit() {
if (_sceneClickedHotspot == 0) {
// Quit the game
- playSound(0x108F5, 0);
+ playSound(0x108F5, false);
_gameSys->removeSpriteDrawItem(_menuQuitQuerySprite, 262);
_sceneDone = true;
_gameDone = true;
} else if (_sceneClickedHotspot == 4) {
// Exit the device
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_gameSys->removeSpriteDrawItem(_menuQuitQuerySprite, 262);
_menuDone = true;
} else if (_sceneClickedHotspot != -1) {
// Return to the main menu
- playSound(0x108F4, 0);
+ playSound(0x108F4, false);
_gameSys->removeSpriteDrawItem(_menuQuitQuerySprite, 262);
_timers[2] = 10;
_menuStatus = 1;
diff --git a/engines/gnap/scenes/scene00.cpp b/engines/gnap/scenes/scene00.cpp
index c53f58c99a..8291546691 100644
--- a/engines/gnap/scenes/scene00.cpp
+++ b/engines/gnap/scenes/scene00.cpp
@@ -136,7 +136,7 @@ void GnapEngine::scene00_run() {
else {
_gameSys->insertSequence(animIdArr[index], 2, 0, 0, kSeqNone, 0, 0, 0);
if (index == 2) {
- playSound(0x10000, 0);
+ playSound(0x10000, false);
_gameSys->insertSequence(0x359, 2, 0, 0, 0, 0, 0, 0);
} else if (index == 3)
_gameSys->insertSequence(0x35B, 2, 0, 0, kSeqNone, 0, 0, 0);
diff --git a/engines/gnap/scenes/scene01.cpp b/engines/gnap/scenes/scene01.cpp
index bb7315c90c..30e649186f 100644
--- a/engines/gnap/scenes/scene01.cpp
+++ b/engines/gnap/scenes/scene01.cpp
@@ -84,7 +84,7 @@ void GnapEngine::scene01_run() {
// NOTE Removed _s01_dword_474380 which was set when the mud was taken
// which is also set in the global game flags.
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(5);
_gameSys->setAnimation(134, 20, 4);
@@ -269,7 +269,7 @@ void GnapEngine::scene01_run() {
scene01_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
@@ -329,9 +329,9 @@ void GnapEngine::scene01_updateAnimations() {
_gnapActionStatus = -1;
break;
case kASLookPigs:
- playSound(138, 0);
- playSound(139, 0);
- playSound(140, 0);
+ playSound(138, false);
+ playSound(139, false);
+ playSound(140, false);
_gnapActionStatus = -1;
break;
case kASUsePigs:
diff --git a/engines/gnap/scenes/scene02.cpp b/engines/gnap/scenes/scene02.cpp
index e1b4d2a135..d214f3b412 100644
--- a/engines/gnap/scenes/scene02.cpp
+++ b/engines/gnap/scenes/scene02.cpp
@@ -84,7 +84,7 @@ void GnapEngine::scene02_updateHotspots() {
}
void GnapEngine::scene02_run() {
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(6);
_s02_currChickenSequenceId = 0x14B;
@@ -360,7 +360,7 @@ void GnapEngine::scene02_run() {
scene02_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
diff --git a/engines/gnap/scenes/scene03.cpp b/engines/gnap/scenes/scene03.cpp
index 50c985c543..1916350c35 100644
--- a/engines/gnap/scenes/scene03.cpp
+++ b/engines/gnap/scenes/scene03.cpp
@@ -81,8 +81,7 @@ void GnapEngine::scene03_updateHotspots() {
}
void GnapEngine::scene03_run() {
-
- playSound(0x10925, 1);
+ playSound(0x10925, true);
startSoundTimerC(7);
@@ -317,7 +316,7 @@ void GnapEngine::scene03_run() {
scene03_updateAnimations();
if (!isSoundPlaying(0x10925))
- playSound(0x10925, 1);
+ playSound(0x10925, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
diff --git a/engines/gnap/scenes/scene04.cpp b/engines/gnap/scenes/scene04.cpp
index 6204971dee..27ed3ac9cd 100644
--- a/engines/gnap/scenes/scene04.cpp
+++ b/engines/gnap/scenes/scene04.cpp
@@ -83,8 +83,7 @@ void GnapEngine::scene04_updateHotspots() {
}
void GnapEngine::scene04_run() {
-
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(4);
_gameSys->insertSequence(0x210, 139 - _s04_dogIdCtr, 0, 0, kSeqNone, 0, 0, 0);
@@ -396,7 +395,7 @@ void GnapEngine::scene04_run() {
scene04_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
diff --git a/engines/gnap/scenes/scene05.cpp b/engines/gnap/scenes/scene05.cpp
index 03534b1318..6ef4b357fc 100644
--- a/engines/gnap/scenes/scene05.cpp
+++ b/engines/gnap/scenes/scene05.cpp
@@ -78,7 +78,7 @@ void GnapEngine::scene05_updateHotspots() {
void GnapEngine::scene05_run() {
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(7);
_s05_currChickenSequenceId = 0x142;
@@ -317,7 +317,7 @@ void GnapEngine::scene05_run() {
scene05_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (isFlag(kGFPlatypus))
diff --git a/engines/gnap/scenes/scene06.cpp b/engines/gnap/scenes/scene06.cpp
index c051f800b4..f89bace54c 100644
--- a/engines/gnap/scenes/scene06.cpp
+++ b/engines/gnap/scenes/scene06.cpp
@@ -54,7 +54,7 @@ int GnapEngine::scene06_init() {
_gameSys->setAnimation(0, 0, 1);
_gameSys->setAnimation(0, 0, 2);
if (isFlag(kGFSceneFlag1)) {
- playSound(0x11B, 0);
+ playSound(0x11B, false);
clearFlag(kGFSceneFlag1);
}
return 0x101;
diff --git a/engines/gnap/scenes/scene07.cpp b/engines/gnap/scenes/scene07.cpp
index d10c4096cb..e2d385df63 100644
--- a/engines/gnap/scenes/scene07.cpp
+++ b/engines/gnap/scenes/scene07.cpp
@@ -100,7 +100,7 @@ void GnapEngine::scene07_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x10919))
- playSound(0x10919, 1);
+ playSound(0x10919, true);
if (testWalk(0, 1, 8, 7, 6, 7))
scene07_updateHotspots();
diff --git a/engines/gnap/scenes/scene08.cpp b/engines/gnap/scenes/scene08.cpp
index 4b5c564187..d8a1c26a08 100644
--- a/engines/gnap/scenes/scene08.cpp
+++ b/engines/gnap/scenes/scene08.cpp
@@ -129,7 +129,7 @@ void GnapEngine::scene08_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x10919))
- playSound(0x10919, 1);
+ playSound(0x10919, true);
testWalk(0, 0, -1, -1, -1, -1);
diff --git a/engines/gnap/scenes/scene09.cpp b/engines/gnap/scenes/scene09.cpp
index d16f3bd6ce..368f8fea49 100644
--- a/engines/gnap/scenes/scene09.cpp
+++ b/engines/gnap/scenes/scene09.cpp
@@ -84,7 +84,7 @@ void GnapEngine::scene09_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x10919))
- playSound(0x10919, 1);
+ playSound(0x10919, true);
testWalk(0, 0, -1, -1, -1, -1);
diff --git a/engines/gnap/scenes/scene10.cpp b/engines/gnap/scenes/scene10.cpp
index 6f9f47e817..b5f9cb1577 100644
--- a/engines/gnap/scenes/scene10.cpp
+++ b/engines/gnap/scenes/scene10.cpp
@@ -103,10 +103,10 @@ void GnapEngine::scene10_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1091E))
- playSound(0x1091E, 1);
+ playSound(0x1091E, true);
if (!isSoundPlaying(0x1091A))
- playSound(0x1091A, 1);
+ playSound(0x1091A, true);
updateMouseCursor();
@@ -325,7 +325,7 @@ void GnapEngine::scene10_run() {
updateGnapIdleSequence();
if (!_timers[4]) {
_timers[4] = getRandom(80) + 150;
- playSound(0x12B, 0);
+ playSound(0x12B, false);
}
if (!_timers[5]) {
_timers[5] = getRandom(100) + 100;
diff --git a/engines/gnap/scenes/scene11.cpp b/engines/gnap/scenes/scene11.cpp
index 95a8df36d9..3e2a75757c 100644
--- a/engines/gnap/scenes/scene11.cpp
+++ b/engines/gnap/scenes/scene11.cpp
@@ -57,8 +57,8 @@ int GnapEngine::scene11_init() {
_gameSys->setAnimation(0, 0, 3);
_gameSys->setAnimation(0, 0, 2);
if (_prevSceneNum == 10 || _prevSceneNum == 13) {
- playSound(0x108EC, 0);
- playSound(0x10928, 0);
+ playSound(0x108EC, false);
+ playSound(0x10928, false);
}
return 0x209;
}
diff --git a/engines/gnap/scenes/scene13.cpp b/engines/gnap/scenes/scene13.cpp
index 8a04b2dda9..58bdba1ade 100644
--- a/engines/gnap/scenes/scene13.cpp
+++ b/engines/gnap/scenes/scene13.cpp
@@ -58,7 +58,7 @@ enum {
};
int GnapEngine::scene13_init() {
- playSound(0x108EC, 0);
+ playSound(0x108EC, false);
return 0xAC;
}
@@ -122,7 +122,7 @@ void GnapEngine::scene13_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1091A))
- playSound(0x1091A, 1);
+ playSound(0x1091A, true);
testWalk(0, 0, -1, -1, -1, -1);
@@ -325,19 +325,19 @@ void GnapEngine::scene13_run() {
_timers[4] = getRandom(20) + 20;
switch (getRandom(5)) {
case 0:
- playSound(0xD2, 0);
+ playSound(0xD2, false);
break;
case 1:
- playSound(0xD3, 0);
+ playSound(0xD3, false);
break;
case 2:
- playSound(0xD4, 0);
+ playSound(0xD4, false);
break;
case 3:
- playSound(0xD5, 0);
+ playSound(0xD5, false);
break;
case 4:
- playSound(0xD6, 0);
+ playSound(0xD6, false);
break;
}
}
@@ -362,7 +362,7 @@ void GnapEngine::scene13_run() {
break;
}
if (newSoundId != currSoundId) {
- playSound(newSoundId, 0);
+ playSound(newSoundId, false);
currSoundId = newSoundId;
}
}
diff --git a/engines/gnap/scenes/scene14.cpp b/engines/gnap/scenes/scene14.cpp
index 47bb12f563..25db3a68ea 100644
--- a/engines/gnap/scenes/scene14.cpp
+++ b/engines/gnap/scenes/scene14.cpp
@@ -101,11 +101,11 @@ void GnapEngine::scene14_run() {
_gameSys->setAnimation(0x26, 10, 0);
_gameSys->insertSequence(0x26, 10, _gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0);
} else if (_grabCursorSpriteIndex >= 0) {
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
break;
case GRAB_CURSOR:
_gameSys->insertSequence(0x25, 10, _gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0);
@@ -113,7 +113,7 @@ void GnapEngine::scene14_run() {
_gnapSequenceId = 0x23;
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
@@ -129,10 +129,10 @@ void GnapEngine::scene14_run() {
switch (_verbCursor) {
case LOOK_CURSOR:
case GRAB_CURSOR:
- playSound(0x108B1, 0);
+ playSound(0x108B1, false);
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
diff --git a/engines/gnap/scenes/scene15.cpp b/engines/gnap/scenes/scene15.cpp
index 4323253a8c..89ca126c01 100644
--- a/engines/gnap/scenes/scene15.cpp
+++ b/engines/gnap/scenes/scene15.cpp
@@ -130,10 +130,10 @@ void GnapEngine::scene15_run() {
switch (_verbCursor) {
case LOOK_CURSOR:
case GRAB_CURSOR:
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
@@ -149,7 +149,7 @@ void GnapEngine::scene15_run() {
switch (_verbCursor) {
case LOOK_CURSOR:
if (isFlag(kGFGnapControlsToyUFO) || isFlag(kGFUnk13))
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
else
_s15_nextSlotSequenceId = 0xDA;
break;
@@ -160,7 +160,7 @@ void GnapEngine::scene15_run() {
_s15_nextSlotSequenceId = 0xDA;
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
@@ -180,13 +180,13 @@ void GnapEngine::scene15_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
break;
case GRAB_CURSOR:
_s15_nextUpperButtonSequenceId = _sceneClickedHotspot + 0xC5;
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
@@ -206,13 +206,13 @@ void GnapEngine::scene15_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- playSound(0x108E9, 0);
+ playSound(0x108E9, false);
break;
case GRAB_CURSOR:
_s15_nextLowerButtonSequenceId = _sceneClickedHotspot + 0xC5;
break;
case TALK_CURSOR:
- playSound((getRandom(5) + 0x8D5) | 0x10000, 0);
+ playSound((getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
_gameSys->insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _gnapGridX, 576 - _gnapGridY);
diff --git a/engines/gnap/scenes/scene17.cpp b/engines/gnap/scenes/scene17.cpp
index 849e06329c..aa08255cd6 100644
--- a/engines/gnap/scenes/scene17.cpp
+++ b/engines/gnap/scenes/scene17.cpp
@@ -119,8 +119,7 @@ void GnapEngine::scene17_platHangUpPhone() {
}
void GnapEngine::scene17_run() {
-
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(8);
_sceneWaiting = false;
_timers[4] = getRandom(100) + 200;
@@ -486,7 +485,7 @@ void GnapEngine::scene17_run() {
scene17_updateAnimations();
if (!isSoundPlaying(0x10940))
- playSound(0x10940, 1);
+ playSound(0x10940, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0)
diff --git a/engines/gnap/scenes/scene18.cpp b/engines/gnap/scenes/scene18.cpp
index 8faeb64853..b338b4c3fc 100644
--- a/engines/gnap/scenes/scene18.cpp
+++ b/engines/gnap/scenes/scene18.cpp
@@ -309,10 +309,9 @@ void GnapEngine::scene18_waitForGnapAction() {
}
void GnapEngine::scene18_run() {
-
_s18_cowboyHatSurface = 0;
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(4);
_timers[5] = getRandom(100) + 100;
diff --git a/engines/gnap/scenes/scene19.cpp b/engines/gnap/scenes/scene19.cpp
index da295583f4..ddc977fb7b 100644
--- a/engines/gnap/scenes/scene19.cpp
+++ b/engines/gnap/scenes/scene19.cpp
@@ -59,7 +59,7 @@ enum {
};
int GnapEngine::scene19_init() {
- playSound(0x79, 0);
+ playSound(0x79, false);
return isFlag(kGFPlatypusTalkingToAssistant) ? 0x77 : 0x76;
}
diff --git a/engines/gnap/scenes/scene20.cpp b/engines/gnap/scenes/scene20.cpp
index 2301d2994e..dd49b4c0bf 100644
--- a/engines/gnap/scenes/scene20.cpp
+++ b/engines/gnap/scenes/scene20.cpp
@@ -180,7 +180,7 @@ void GnapEngine::scene20_stopSounds() {
void GnapEngine::scene20_run() {
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(8);
@@ -490,7 +490,7 @@ void GnapEngine::scene20_run() {
scene20_updateAnimations();
if (!isSoundPlaying(0x10940))
- playSound(0x10940, 1);
+ playSound(0x10940, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0) {
diff --git a/engines/gnap/scenes/scene21.cpp b/engines/gnap/scenes/scene21.cpp
index a6f42e10fa..c04b7c43cf 100644
--- a/engines/gnap/scenes/scene21.cpp
+++ b/engines/gnap/scenes/scene21.cpp
@@ -67,8 +67,7 @@ void GnapEngine::scene21_updateHotspots() {
}
void GnapEngine::scene21_run() {
-
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(6);
_timers[5] = getRandom(100) + 100;
@@ -232,7 +231,7 @@ void GnapEngine::scene21_run() {
scene21_updateAnimations();
if (!isSoundPlaying(0x10940))
- playSound(0x10940, 1);
+ playSound(0x10940, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
@@ -267,13 +266,10 @@ void GnapEngine::scene21_run() {
}
gameUpdateTick();
-
}
-
}
void GnapEngine::scene21_updateAnimations() {
-
if (_gameSys->getAnimationStatus(0) == 2) {
_gameSys->setAnimation(0, 0, 0);
switch (_gnapActionStatus) {
diff --git a/engines/gnap/scenes/scene23.cpp b/engines/gnap/scenes/scene23.cpp
index e3e793962a..9a16ce42ff 100644
--- a/engines/gnap/scenes/scene23.cpp
+++ b/engines/gnap/scenes/scene23.cpp
@@ -217,13 +217,13 @@ void GnapEngine::scene23_run() {
_timers[5] = getRandom(100) + 200;
switch (getRandom(3)) {
case 0:
- playSound(0xCE, 0);
+ playSound(0xCE, false);
break;
case 1:
- playSound(0xD0, 0);
+ playSound(0xD0, false);
break;
case 2:
- playSound(0xCF, 0);
+ playSound(0xCF, false);
break;
}
}
diff --git a/engines/gnap/scenes/scene24.cpp b/engines/gnap/scenes/scene24.cpp
index ace9043062..dcfeb181ac 100644
--- a/engines/gnap/scenes/scene24.cpp
+++ b/engines/gnap/scenes/scene24.cpp
@@ -58,7 +58,7 @@ void GnapEngine::scene24_updateHotspots() {
void GnapEngine::scene24_run() {
int counter = 0;
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(9);
@@ -182,7 +182,7 @@ void GnapEngine::scene24_run() {
scene24_updateAnimations();
if (!isSoundPlaying(0x10940))
- playSound(0x10940, 1);
+ playSound(0x10940, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
diff --git a/engines/gnap/scenes/scene25.cpp b/engines/gnap/scenes/scene25.cpp
index 42df9bd35e..cf95acafb7 100644
--- a/engines/gnap/scenes/scene25.cpp
+++ b/engines/gnap/scenes/scene25.cpp
@@ -106,8 +106,7 @@ void GnapEngine::scene25_playAnims(int index) {
}
void GnapEngine::scene25_run() {
-
- playSound(0x10940, 1);
+ playSound(0x10940, true);
startSoundTimerA(5);
diff --git a/engines/gnap/scenes/scene26.cpp b/engines/gnap/scenes/scene26.cpp
index 55b5b0774a..7da339358e 100644
--- a/engines/gnap/scenes/scene26.cpp
+++ b/engines/gnap/scenes/scene26.cpp
@@ -62,7 +62,7 @@ void GnapEngine::scene26_updateHotspots() {
void GnapEngine::scene26_run() {
startSoundTimerB(7);
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
_s26_currKidSequenceId = 0x5B;
_s26_nextKidSequenceId = -1;
@@ -198,7 +198,7 @@ void GnapEngine::scene26_run() {
scene26_updateAnimations();
if (!isSoundPlaying(0x1093B))
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
diff --git a/engines/gnap/scenes/scene27.cpp b/engines/gnap/scenes/scene27.cpp
index 2b7666b4ee..0466940267 100644
--- a/engines/gnap/scenes/scene27.cpp
+++ b/engines/gnap/scenes/scene27.cpp
@@ -70,7 +70,7 @@ void GnapEngine::scene27_updateHotspots() {
void GnapEngine::scene27_run() {
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
startSoundTimerB(4);
_timers[7] = getRandom(100) + 300;
queueInsertDeviceIcon();
@@ -277,7 +277,7 @@ void GnapEngine::scene27_run() {
scene27_updateAnimations();
if (!isSoundPlaying(0x1093B))
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
diff --git a/engines/gnap/scenes/scene28.cpp b/engines/gnap/scenes/scene28.cpp
index d175fdfd24..5f4dc74bd2 100644
--- a/engines/gnap/scenes/scene28.cpp
+++ b/engines/gnap/scenes/scene28.cpp
@@ -72,8 +72,7 @@ void GnapEngine::scene28_updateHotspots() {
}
void GnapEngine::scene28_run() {
-
- playSound(0x1093C, 1);
+ playSound(0x1093C, true);
_s28_nextClownSequenceId = -1;
queueInsertDeviceIcon();
_gameSys->insertSequence(0x124, 255, 0, 0, kSeqNone, 0, 0, 0);
@@ -287,7 +286,7 @@ void GnapEngine::scene28_run() {
scene28_updateAnimations();
if (!isSoundPlaying(0x1093C))
- playSound(0x1093C, 1);
+ playSound(0x1093C, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
diff --git a/engines/gnap/scenes/scene29.cpp b/engines/gnap/scenes/scene29.cpp
index 302c031eba..e4cea83bbd 100644
--- a/engines/gnap/scenes/scene29.cpp
+++ b/engines/gnap/scenes/scene29.cpp
@@ -60,7 +60,7 @@ void GnapEngine::scene29_updateHotspots() {
void GnapEngine::scene29_run() {
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
startSoundTimerB(6);
queueInsertDeviceIcon();
@@ -231,7 +231,7 @@ void GnapEngine::scene29_run() {
scene29_updateAnimations();
if (!isSoundPlaying(0x1093B))
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
if (!_isLeavingScene) {
if (_gnapActionStatus < 0) {
diff --git a/engines/gnap/scenes/scene30.cpp b/engines/gnap/scenes/scene30.cpp
index 6b9504d615..5344d3f724 100644
--- a/engines/gnap/scenes/scene30.cpp
+++ b/engines/gnap/scenes/scene30.cpp
@@ -59,7 +59,7 @@ void GnapEngine::scene30_updateHotspots() {
void GnapEngine::scene30_run() {
bool hasTakenPill = false;
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
startSoundTimerB(6);
queueInsertDeviceIcon();
@@ -182,7 +182,7 @@ void GnapEngine::scene30_run() {
scene30_updateAnimations();
if (!isSoundPlaying(0x1093B))
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
if (!_isLeavingScene) {
updateBeaverIdleSequence();
@@ -221,13 +221,10 @@ void GnapEngine::scene30_run() {
}
gameUpdateTick();
-
}
-
}
-void GnapEngine::scene30_updateAnimations() {
-
+void GnapEngine::scene30_updateAnimations() {
if (_gameSys->getAnimationStatus(0) == 2) {
_gameSys->setAnimation(0, 0, 0);
switch (_gnapActionStatus) {
@@ -281,7 +278,6 @@ void GnapEngine::scene30_updateAnimations() {
break;
}
}
-
}
} // End of namespace Gnap
diff --git a/engines/gnap/scenes/scene31.cpp b/engines/gnap/scenes/scene31.cpp
index 97c07fc0bb..084a12733b 100644
--- a/engines/gnap/scenes/scene31.cpp
+++ b/engines/gnap/scenes/scene31.cpp
@@ -61,8 +61,7 @@ void GnapEngine::scene31_updateHotspots() {
}
void GnapEngine::scene31_run() {
-
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
startSoundTimerB(6);
queueInsertDeviceIcon();
@@ -251,7 +250,7 @@ void GnapEngine::scene31_run() {
scene31_updateAnimations();
if (!isSoundPlaying(0x1093B))
- playSound(0x1093B, 1);
+ playSound(0x1093B, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0)
diff --git a/engines/gnap/scenes/scene32.cpp b/engines/gnap/scenes/scene32.cpp
index ed735ccef0..0822dc41ed 100644
--- a/engines/gnap/scenes/scene32.cpp
+++ b/engines/gnap/scenes/scene32.cpp
@@ -65,8 +65,7 @@ void GnapEngine::scene32_updateHotspots() {
}
void GnapEngine::scene32_run() {
-
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(5);
queueInsertDeviceIcon();
_timers[4] = getRandom(100) + 300;
@@ -84,7 +83,6 @@ void GnapEngine::scene32_run() {
}
while (!_sceneDone) {
-
updateMouseCursor();
updateCursorByHotspot();
testWalk(0, 0, -1, -1, -1, -1);
@@ -93,7 +91,6 @@ void GnapEngine::scene32_run() {
updateGrabCursorSprite(0, 0);
switch (_sceneClickedHotspot) {
-
case kHSDevice:
if (_gnapActionStatus < 0) {
runMenu();
@@ -158,7 +155,7 @@ void GnapEngine::scene32_run() {
scene32_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0)
diff --git a/engines/gnap/scenes/scene33.cpp b/engines/gnap/scenes/scene33.cpp
index 99e9dbc6d4..3069dba025 100644
--- a/engines/gnap/scenes/scene33.cpp
+++ b/engines/gnap/scenes/scene33.cpp
@@ -63,8 +63,7 @@ void GnapEngine::scene33_updateHotspots() {
}
void GnapEngine::scene33_run() {
-
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
startSoundTimerC(6);
queueInsertDeviceIcon();
@@ -233,7 +232,7 @@ void GnapEngine::scene33_run() {
scene33_updateAnimations();
if (!isSoundPlaying(0x1091C))
- playSound(0x1091C, 1);
+ playSound(0x1091C, true);
if (!_isLeavingScene) {
if (_beaverActionStatus < 0)
diff --git a/engines/gnap/scenes/scene39.cpp b/engines/gnap/scenes/scene39.cpp
index 2d3ac77a07..4950717d16 100644
--- a/engines/gnap/scenes/scene39.cpp
+++ b/engines/gnap/scenes/scene39.cpp
@@ -82,7 +82,7 @@ void GnapEngine::scene39_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1094B)) {
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
setSoundVolume(0x1094B, 60);
}
diff --git a/engines/gnap/scenes/scene40.cpp b/engines/gnap/scenes/scene40.cpp
index fe95742f0f..cbbae71729 100644
--- a/engines/gnap/scenes/scene40.cpp
+++ b/engines/gnap/scenes/scene40.cpp
@@ -65,7 +65,7 @@ void GnapEngine::scene40_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
updateMouseCursor();
updateCursorByHotspot();
diff --git a/engines/gnap/scenes/scene41.cpp b/engines/gnap/scenes/scene41.cpp
index 20751129e0..41480bf3ce 100644
--- a/engines/gnap/scenes/scene41.cpp
+++ b/engines/gnap/scenes/scene41.cpp
@@ -163,7 +163,7 @@ void GnapEngine::scene41_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
if (!isFlag(kGFGnapControlsToyUFO)) {
_hotspots[kHSToyUfo]._x1 = _toyUfoX - 25;
diff --git a/engines/gnap/scenes/scene42.cpp b/engines/gnap/scenes/scene42.cpp
index 04f372f56f..906d84f040 100644
--- a/engines/gnap/scenes/scene42.cpp
+++ b/engines/gnap/scenes/scene42.cpp
@@ -147,7 +147,7 @@ void GnapEngine::scene42_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
updateMouseCursor();
updateCursorByHotspot();
diff --git a/engines/gnap/scenes/scene43.cpp b/engines/gnap/scenes/scene43.cpp
index 83b11b7697..45b52a7adb 100644
--- a/engines/gnap/scenes/scene43.cpp
+++ b/engines/gnap/scenes/scene43.cpp
@@ -143,9 +143,8 @@ void GnapEngine::scene43_run() {
}
while (!_sceneDone) {
-
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
updateMouseCursor();
updateCursorByHotspot();
@@ -199,11 +198,8 @@ void GnapEngine::scene43_run() {
_timers[9] = 600;
break;
}
-
} else {
-
switch (_sceneClickedHotspot) {
-
case kHSDevice:
runMenu();
scene43_updateHotspots();
@@ -364,12 +360,10 @@ void GnapEngine::scene43_run() {
}
gameUpdateTick();
-
}
if (_newSceneNum == 54)
clearFlag(kGFGnapControlsToyUFO);
-
}
void GnapEngine::scene43_updateAnimations() {
diff --git a/engines/gnap/scenes/scene44.cpp b/engines/gnap/scenes/scene44.cpp
index 48dd1fdee1..dad63016a5 100644
--- a/engines/gnap/scenes/scene44.cpp
+++ b/engines/gnap/scenes/scene44.cpp
@@ -169,7 +169,7 @@ void GnapEngine::scene44_run() {
while (!_sceneDone) {
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
updateMouseCursor();
updateCursorByHotspot();
diff --git a/engines/gnap/scenes/scene45.cpp b/engines/gnap/scenes/scene45.cpp
index daad788055..3f8f790518 100644
--- a/engines/gnap/scenes/scene45.cpp
+++ b/engines/gnap/scenes/scene45.cpp
@@ -83,9 +83,8 @@ void GnapEngine::scene45_updateHotspots() {
}
void GnapEngine::scene45_run() {
-
if (!isSoundPlaying(0x1094A))
- playSound(0x1094A, 1);
+ playSound(0x1094A, true);
queueInsertDeviceIcon();
@@ -181,9 +180,8 @@ void GnapEngine::scene45_run() {
_gameSys->setAnimation(_beaverSequenceId, _beaverId, 1);
while (!_sceneDone) {
-
if (!isSoundPlaying(0x1094A))
- playSound(0x1094A, 1);
+ playSound(0x1094A, true);
updateMouseCursor();
updateCursorByHotspot();
diff --git a/engines/gnap/scenes/scene46.cpp b/engines/gnap/scenes/scene46.cpp
index 29a8608273..d0c8965d86 100644
--- a/engines/gnap/scenes/scene46.cpp
+++ b/engines/gnap/scenes/scene46.cpp
@@ -124,9 +124,8 @@ void GnapEngine::scene46_run() {
_timers[5] = getRandom(50) + 80;
while (!_sceneDone) {
-
if (!isSoundPlaying(0x1094B))
- playSound(0x1094B, 1);
+ playSound(0x1094B, true);
updateMouseCursor();
updateCursorByHotspot();
diff --git a/engines/gnap/scenes/scene49.cpp b/engines/gnap/scenes/scene49.cpp
index 9a4714529d..2c92919a8b 100644
--- a/engines/gnap/scenes/scene49.cpp
+++ b/engines/gnap/scenes/scene49.cpp
@@ -172,7 +172,7 @@ void GnapEngine::scene49_updateObstacle(int id) {
obstacle._currSequenceId, obstacle._currId,
kSeqSyncWait, 0, 0, -50);
obstacle._currSequenceId = obstacle._collisionSequenceId;
- playSound(224, 0);
+ playSound(224, false);
scene49_increaseScore(30);
} else if ((obstacle._laneNum == 1 && _s49_truckSequenceId == 0xB0) ||
(obstacle._laneNum == 2 && (_s49_truckSequenceId == 0xB1 || _s49_truckSequenceId == 0xB2)) ||
@@ -194,7 +194,7 @@ void GnapEngine::scene49_updateObstacle(int id) {
_s49_truckSequenceId = obstacle._collisionSequenceId;
_s49_truckId = 256;
obstacle._currSequenceId = obstacle._passedSequenceId;
- playSound(225, 0);
+ playSound(225, false);
scene49_decreaseScore(30);
}
} else {
@@ -212,7 +212,7 @@ void GnapEngine::scene49_updateObstacle(int id) {
obstacle._currSequenceId, obstacle._currId,
kSeqSyncWait, 0, 0, -50);
obstacle._currSequenceId = obstacle._collisionSequenceId;
- playSound(224, 0);
+ playSound(224, false);
scene49_increaseScore(30);
}
} else if (obstacle._splashSequenceId) {
@@ -275,7 +275,7 @@ void GnapEngine::scene49_run() {
bool streetAnimToggle = false;
bool bgAnimToggle = false;
- playSound(0xE2, 1);
+ playSound(0xE2, true);
setSoundVolume(0xE2, 75);
hideCursor();
diff --git a/engines/gnap/scenes/scene51.cpp b/engines/gnap/scenes/scene51.cpp
index d93506ff00..1d9e177989 100644
--- a/engines/gnap/scenes/scene51.cpp
+++ b/engines/gnap/scenes/scene51.cpp
@@ -323,7 +323,7 @@ void GnapEngine::scene51_updateItemAnimation(Scene51Item *item, int index) {
} else {
_gameSys->removeSequence(item->_currSequenceId, item->_id, true);
_gameSys->setAnimation(0, 0, index + 1);
- playSound(218, 0);
+ playSound(218, false);
if (scene51_incCashAmount(item->_currSequenceId) == 1995) {
scene51_winMinigame();
_sceneDone = true;
@@ -523,7 +523,7 @@ void GnapEngine::scene51_playIntroAnim() {
_s51_platypusSequenceId = _s51_platypusNextSequenceId;
++soundCtr;
if (soundCtr % 4 == 0)
- playSound(214, 0);
+ playSound(214, false);
}
_s51_platypusNextSequenceId = 0x75;
@@ -541,7 +541,7 @@ void GnapEngine::scene51_playIntroAnim() {
} else {
++soundCtr;
if (soundCtr % 4 == 0)
- playSound(214, 0);
+ playSound(214, false);
}
}
@@ -604,7 +604,7 @@ int GnapEngine::scene51_incCashAmount(int sequenceId) {
void GnapEngine::scene51_winMinigame() {
scene51_updateCash(1995);
- playSound(218, 0);
+ playSound(218, false);
// TODO delayTicksA(1, 5);
_newSceneNum = 48;
invRemove(kItemBanana);
@@ -781,7 +781,7 @@ void GnapEngine::scene51_run() {
} else {
++soundCtr;
if (soundCtr % 4 == 0)
- playSound(214, 0);
+ playSound(214, false);
}
}
} else {
@@ -833,7 +833,7 @@ void GnapEngine::scene51_run() {
} else {
++soundCtr;
if (soundCtr % 4 == 0)
- playSound(214, 0);
+ playSound(214, false);
}
}
} else {
diff --git a/engines/gnap/scenes/scene52.cpp b/engines/gnap/scenes/scene52.cpp
index 0b00b4299a..0caf7a83e8 100644
--- a/engines/gnap/scenes/scene52.cpp
+++ b/engines/gnap/scenes/scene52.cpp
@@ -47,7 +47,7 @@ void GnapEngine::scene52_update() {
if (_s52_liveAlienRows == 0 && !_s52_alienSingle) {
_s52_alienWave = false;
- playSound(48, 0);
+ playSound(48, false);
++_s52_alienCounter;
if (_s52_alienCounter != 3) {
_timers[0] = 50;
@@ -172,7 +172,7 @@ void GnapEngine::scene52_fireShipCannon(int posX) {
_s52_shipCannonPosY = _s52_shipCannonTopY;
_gameSys->setAnimation(0x23, cannonNum + 256, cannonNum + 8);
_gameSys->insertSequence(0x23, cannonNum + 256, 0, 0, kSeqNone, 0, _s52_shipCannonPosX, _s52_shipCannonPosY);
- playSound(0x2D, 0);
+ playSound(0x2D, false);
if (scene52_shipCannonHitShield(cannonNum)) {
_gameSys->setAnimation(0, 0, cannonNum + 8);
_gameSys->removeSequence(0x23, cannonNum + 256, true);
@@ -421,7 +421,7 @@ int GnapEngine::scene52_updateHitAlien() {
if (hitAlienNum != -1 && _s52_items[rowNum][hitAlienNum] >= 0) {
_s52_gameScore = ((_s52_items[rowNum][hitAlienNum] - 24) % 3 + _s52_gameScore + 1) % 1000;
_s52_items[rowNum][hitAlienNum] = -2;
- playSound(44, 0);
+ playSound(44, false);
_gameSys->insertSequence(0x21, 266, 0, 0,
kSeqNone, 0, _s52_alienLeftX + hitAlienNum * _s52_alienWidth + _s52_alienRowXOfs[rowNum] - 10, ya - _s52_alienHeight);
result = 1;
@@ -540,7 +540,7 @@ int GnapEngine::scene52_alienCannonHitShield(int cannonNum) {
}
_gameSys->setAnimation(0, 0, cannonNum + 9);
_gameSys->insertSequence(0x21, shieldNum + 257, 0, 0, kSeqNone, 0, _s52_alienCannonPosX[cannonNum] - 18, _s52_arcadeScreenBottom - 44);
- playSound(0x2C, 0);
+ playSound(0x2C, false);
result = 1;
}
@@ -583,7 +583,7 @@ int GnapEngine::scene52_shipCannonHitShield(int cannonNum) {
_s52_shieldSpriteIds[shieldNum] = -1;
}
_gameSys->insertSequence(0x21, shieldNum + 257, 0, 0, kSeqNone, 0, _s52_shipCannonPosX - 18, _s52_arcadeScreenBottom - 44);
- playSound(0x2C, 0);
+ playSound(0x2C, false);
result = 1;
}
@@ -639,10 +639,10 @@ void GnapEngine::scene52_shipExplode() {
if (!_s52_aliensCount) {
_gameSys->setAnimation(0, 0, 7);
_gameSys->removeSequence(_s52_ufoSequenceId, 256, true);
- playSound(44, 0);
+ playSound(44, false);
_gameSys->insertSequence(0x21, 266, 0, 0, kSeqNone, 0, _s52_shipPosX, _s52_arcadeScreenBottom);
_s52_aliensCount = 1;
- playSound(0x31, 0);
+ playSound(0x31, false);
}
}
@@ -735,10 +735,10 @@ void GnapEngine::scene52_initAlienSize() {
void GnapEngine::scene52_playSound() {
if (_s52_soundToggle) {
- playSound(0x2F, 0);
+ playSound(0x2F, false);
_s52_soundToggle = false;
} else {
- playSound(0x2E, 0);
+ playSound(0x2E, false);
_s52_soundToggle = true;
}
}
diff --git a/engines/gnap/scenes/scene53.cpp b/engines/gnap/scenes/scene53.cpp
index 0b06f55e09..9b2867ac12 100644
--- a/engines/gnap/scenes/scene53.cpp
+++ b/engines/gnap/scenes/scene53.cpp
@@ -270,10 +270,9 @@ void GnapEngine::scene53_run() {
setVerbCursor(GRAB_CURSOR);
- playSound(0xA0, 1);
+ playSound(0xA0, true);
while (!_sceneDone) {
-
updateMouseCursor();
updateCursorByHotspot();