aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/insane/insane.cpp18
-rw-r--r--scumm/insane/insane_ben.cpp65
-rw-r--r--scumm/insane/insane_enemy.cpp92
-rw-r--r--scumm/insane/insane_scenes.cpp3
4 files changed, 113 insertions, 65 deletions
diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp
index 50cc3ea8cb..d17175703d 100644
--- a/scumm/insane/insane.cpp
+++ b/scumm/insane/insane.cpp
@@ -804,8 +804,10 @@ void Insane::prepareScenePropScene(int32 scenePropNum, bool arg_4, bool arg_8) {
debugC(DEBUG_INSANE, "Insane::prepareScenePropScene(%d, %d, %d)", scenePropNum, arg_4, arg_8);
- if (!loadScenePropSounds(idx))
- return;
+ if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (!loadScenePropSounds(idx))
+ return;
+ }
_actor[0].defunct = arg_4;
_actor[1].defunct = arg_8;
@@ -1113,9 +1115,6 @@ bool Insane::actor0StateFlags2(int state) {
// smlayer_loadSound1 && smlayer_loadSound2
int Insane::smlayer_loadSound(int id, int flag, int phase) {
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
- return 0;
-
int resid;
if (phase == 1) {
@@ -1197,16 +1196,10 @@ void Insane::smlayer_setFluPalette(byte *pal, int shut_flag) {
}
bool Insane::smlayer_isSoundRunning(int32 sound) {
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
- return 1;
-
return _vm->_imuseDigital->getSoundStatus(readArray(sound)) != 0;
}
bool Insane::smlayer_startSfx(int32 sound) {
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
- return 1;
-
if (smlayer_loadSound(sound, 0, 2)) {
_vm->_imuseDigital->startSfx(readArray(sound), 40);
return true;
@@ -1215,9 +1208,6 @@ bool Insane::smlayer_startSfx(int32 sound) {
}
bool Insane::smlayer_startVoice(int32 sound) {
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
- return 1;
-
if (smlayer_loadSound(sound, 0, 2)) {
_vm->_imuseDigital->startSfx(readArray(sound), 126);
return true;
diff --git a/scumm/insane/insane_ben.cpp b/scumm/insane/insane_ben.cpp
index eb488c54df..0dbe89e03e 100644
--- a/scumm/insane/insane_ben.cpp
+++ b/scumm/insane/insane_ben.cpp
@@ -87,7 +87,8 @@ void Insane::turnBen(bool controllable) {
_actor[0].act[1].state, _actor[0].act[2].state, _actor[0].act[3].state);
actor01Reaction(buttons);
actor02Reaction(buttons);
- actor03Reaction(buttons);
+ if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)))
+ actor03Reaction(buttons);
actor00Reaction(buttons);
break;
case 17:
@@ -122,6 +123,12 @@ void Insane::turnBen(bool controllable) {
int32 Insane::actionBen(void) {
int32 buttons, tmp;
bool doDamage = false;
+ int sound;
+
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ sound = 59;
+ else
+ sound = 95;
if (_actor[0].enemyHandler != -1)
buttons = enemyHandler(_actor[0].enemyHandler, 0, 1, _actor[0].probability);
@@ -165,11 +172,11 @@ int32 Insane::actionBen(void) {
_val213d = 0;
}
- if (!smlayer_isSoundRunning(95))
- smlayer_startSfx(95);
+ if (!smlayer_isSoundRunning(sound))
+ smlayer_startSfx(sound);
} else {
- if (smlayer_isSoundRunning(95))
- smlayer_stopSound(95);
+ if (smlayer_isSoundRunning(sound))
+ smlayer_stopSound(sound);
_val213d = 0;
}
@@ -568,10 +575,15 @@ void Insane::actor02Reaction(int32 buttons) {
if (_actor[0].act[2].frame == 2) {
if (_currEnemy != EN_CAVEFISH) {
tmp = calcEnemyDamage(1, 1);
- if (tmp == 1)
- smlayer_startSfx(60);
- if (tmp == 1000)
- smlayer_startSfx(62);
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(50);
+ } else {
+ if (tmp == 1)
+ smlayer_startSfx(60);
+ if (tmp == 1000)
+ smlayer_startSfx(62);
+ }
} else {
if ((_actor[1].x - _actor[0].x <= weaponMaxRange(0)) &&
(_actor[1].x - _actor[0].x >= weaponMinRange(0)) &&
@@ -886,10 +898,17 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcEnemyDamage(1, 1);
- if (tmp == 1)
- smlayer_startSfx(67);
- if (tmp == 1000)
- smlayer_startSfx(68);
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(52);
+ if (tmp == 1000)
+ smlayer_startSfx(56);
+ } else {
+ if (tmp == 1)
+ smlayer_startSfx(67);
+ if (tmp == 1000)
+ smlayer_startSfx(68);
+ }
break;
default:
if (calcEnemyDamage(1, 0))
@@ -1046,10 +1065,17 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_BOOT:
case INV_DUST:
tmp = calcEnemyDamage(1, 1);
- if (tmp == 1)
- smlayer_startSfx(70);
- if (tmp == 1000)
- smlayer_startSfx(71);
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(58);
+ if (tmp == 1000)
+ smlayer_startSfx(56);
+ } else {
+ if (tmp == 1)
+ smlayer_startSfx(70);
+ if (tmp == 1000)
+ smlayer_startSfx(71);
+ }
break;
case INV_HAND:
if (!calcEnemyDamage(1, 0))
@@ -1958,6 +1984,11 @@ int32 Insane::setBenState(void) {
void Insane::ouchSoundBen(void) {
_actor[0].act[3].state = 52;
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ smlayer_startVoice(54);
+ return;
+ }
+
switch (_vm->_rnd.getRandomNumber(3)) {
case 0:
smlayer_startVoice(315);
diff --git a/scumm/insane/insane_enemy.cpp b/scumm/insane/insane_enemy.cpp
index 7088f7a4ab..d0553996ab 100644
--- a/scumm/insane/insane_enemy.cpp
+++ b/scumm/insane/insane_enemy.cpp
@@ -1265,6 +1265,11 @@ void Insane::ouchSoundEnemy(void) {
_actor[1].act[3].state = 52;
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ smlayer_startVoice(55);
+ return;
+ }
+
switch (_currEnemy) {
case EN_VULTF1:
if (_actor[0].weapon == INV_DUST) {
@@ -1357,7 +1362,8 @@ void Insane::turnEnemy(bool battle) {
_actor[1].act[2].state, _actor[1].act[3].state, _actor[1].act[0].state);
actor11Reaction(buttons);
actor12Reaction(buttons);
- actor13Reaction(buttons);
+ if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)))
+ actor13Reaction(buttons);
actor10Reaction(buttons);
}
@@ -1694,9 +1700,12 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].weaponClass = 1;
if (_actor[1].act[2].frame >= 6) {
tmp = calcBenDamage(1, 1);
- if (tmp == 1)
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(50);
+ } else if (tmp == 1)
smlayer_startSfx(60);
- if (tmp == 1000)
+ else if (tmp == 1000)
smlayer_startSfx(62);
smlayer_setActorFacing(1, 2, 20, 180);
_actor[1].act[2].state = 4;
@@ -1863,15 +1872,17 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorFacing(1, 2, 19, 180);
_actor[1].act[2].state = 19;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
- smlayer_startSfx(69);
-
- if (!_actor[1].field_54) {
- tmp = _vm->_rnd.getRandomNumber(4);
- if (tmp == 1) {
- smlayer_startSfx(213);
- } else if (tmp == 3) {
- smlayer_startSfx(215);
+ if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ smlayer_startSfx(69);
+ if (!_actor[1].field_54) {
+ tmp = _vm->_rnd.getRandomNumber(4);
+ if (tmp == 1)
+ smlayer_startSfx(213);
+ else if (tmp == 3)
+ smlayer_startSfx(215);
}
+ } else {
+ smlayer_startSfx(53);
}
break;
case 19:
@@ -1925,10 +1936,17 @@ void Insane::actor12Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcBenDamage(1, 1);
- if (tmp == 1)
- smlayer_startSfx(67);
- if (tmp == 1000)
- smlayer_startSfx(68);
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(52);
+ else if (tmp == 1000)
+ smlayer_startSfx(56);
+ } else {
+ if (tmp == 1)
+ smlayer_startSfx(67);
+ else if (tmp == 1000)
+ smlayer_startSfx(68);
+ }
break;
default:
calcBenDamage(1, 0);
@@ -2036,9 +2054,12 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = true;
if (_actor[1].act[2].frame >= 3) {
tmp = calcBenDamage(1, 1);
- if (tmp == 1)
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if (tmp == 1)
+ smlayer_startSfx(57);
+ } else if (tmp == 1)
smlayer_startSfx(70);
- if (tmp == 1000)
+ else if (tmp == 1000)
smlayer_startSfx(71);
smlayer_setActorFacing(1, 2, 21, 180);
@@ -2087,24 +2108,27 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorCostume(1, 2, readArray(_enemy[_currEnemy].costumevar));
smlayer_setActorFacing(1, 2, 6, 180);
smlayer_setActorLayer(1, 2, 25);
- smlayer_startSfx(96);
_actor[1].act[2].state = 37;
- switch (_currEnemy) {
- case EN_ROTT1:
- smlayer_startVoice(212);
- break;
- case EN_ROTT2:
- smlayer_startVoice(259);
- break;
- case EN_ROTT3:
- smlayer_startVoice(232);
- break;
- case EN_VULTF1:
- smlayer_startVoice(281);
- break;
- case EN_VULTF2:
- smlayer_startVoice(276);
- break;
+
+ if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ smlayer_startSfx(96);
+ switch (_currEnemy) {
+ case EN_ROTT1:
+ smlayer_startVoice(212);
+ break;
+ case EN_ROTT2:
+ smlayer_startVoice(259);
+ break;
+ case EN_ROTT3:
+ smlayer_startVoice(232);
+ break;
+ case EN_VULTF1:
+ smlayer_startVoice(281);
+ break;
+ case EN_VULTF2:
+ smlayer_startVoice(276);
+ break;
+ }
}
case 37:
_actor[1].cursorX = 0;
diff --git a/scumm/insane/insane_scenes.cpp b/scumm/insane/insane_scenes.cpp
index 23977960c8..b6df92af69 100644
--- a/scumm/insane/insane_scenes.cpp
+++ b/scumm/insane/insane_scenes.cpp
@@ -306,6 +306,9 @@ void Insane::shutCurrentScene(void) {
// insane_loadSceneData1 & insane_loadSceneData2
int Insane::loadSceneData(int scene, int flag, int phase) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ return 1;
+
int retvalue = 1;
debugC(DEBUG_INSANE, "Insane::loadSceneData(%d, %d, %d)", scene, flag, phase);