aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/insane
diff options
context:
space:
mode:
authorMax Horn2006-02-20 16:51:30 +0000
committerMax Horn2006-02-20 16:51:30 +0000
commite389bcf497391cf4cde7d7b7a6f4023877205735 (patch)
treeb8314b1ad8bc19117c37df4d4ce27d9cce92a442 /engines/scumm/insane
parenta6e5f6fd2cdb574e09fb3bd120b1e8efa034f0cb (diff)
downloadscummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.tar.gz
scummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.tar.bz2
scummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.zip
Replaced _gameId, _version, _heversion, _features, _midi, _platform with a simple ScummGameSettings instance: _game
svn-id: r20795
Diffstat (limited to 'engines/scumm/insane')
-rw-r--r--engines/scumm/insane/insane.cpp16
-rw-r--r--engines/scumm/insane/insane_ben.cpp20
-rw-r--r--engines/scumm/insane/insane_enemy.cpp12
-rw-r--r--engines/scumm/insane/insane_iact.cpp2
-rw-r--r--engines/scumm/insane/insane_scenes.cpp16
5 files changed, 33 insertions, 33 deletions
diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index 08c982b65f..6e769153c6 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -55,7 +55,7 @@ Insane::Insane(ScummEngine_v6 *scumm) {
initvars();
- if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
readFileToMem("roadrash.rip", &_smush_roadrashRip);
readFileToMem("roadrsh2.rip", &_smush_roadrsh2Rip);
readFileToMem("roadrsh3.rip", &_smush_roadrsh3Rip);
@@ -179,7 +179,7 @@ void Insane::initvars(void) {
_iactBits[i] = 0;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
init_enemyStruct(EN_ROTT1, EN_ROTT1, 0, 0, 160, 0, INV_MACE, 63, "endcrshr.san",
25, 15, 16, 26, 11, 3);
} else {
@@ -634,7 +634,7 @@ void Insane::putActors(void) {
void Insane::readState(void) { // PATCH
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
_actor[0].inventory[INV_CHAIN] = 0;
_actor[0].inventory[INV_CHAINSAW] = 0;
_actor[0].inventory[INV_MACE] = 0;
@@ -803,7 +803,7 @@ 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 (((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) || !loadScenePropSounds(idx))
+ if (((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) || !loadScenePropSounds(idx))
return;
_actor[0].defunct = arg_4;
@@ -900,7 +900,7 @@ int32 Insane::weaponDamage(int32 actornum) {
}
void Insane::reinitActors(void) {
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -956,7 +956,7 @@ void Insane::escapeKeyHandler(void) {
struct fluConf *flu;
// Demos have just one scene
- if (!_insaneIsRunning || _vm->_features & GF_DEMO) {
+ if (!_insaneIsRunning || _vm->_game.features & GF_DEMO) {
smush_setToFinish();
return;
}
@@ -1182,7 +1182,7 @@ void Insane::smlayer_setActorLayer(int actornum, int actnum, int layer) {
}
void Insane::smlayer_setFluPalette(byte *pal, int shut_flag) {
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
return;
// if (shut_flag)
@@ -1298,7 +1298,7 @@ void Insane::procSKIP(Chunk &b) {
int16 par1, par2;
_player->_skipNext = false;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
_player->checkBlock(b, TYPE_SKIP, 2);
par1 = b.getWord();
if (isBitSet(par1))
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index 4e58fa14c9..465922d353 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -125,7 +125,7 @@ int32 Insane::actionBen(void) {
bool doDamage = false;
int sound;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
sound = 59;
else
sound = 95;
@@ -566,7 +566,7 @@ void Insane::actor02Reaction(int32 buttons) {
if (_actor[0].act[2].frame == 2) {
if (_currEnemy != EN_CAVEFISH) {
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(50);
} else {
@@ -889,7 +889,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(52);
if (tmp == 1000)
@@ -1014,7 +1014,7 @@ void Insane::actor02Reaction(int32 buttons) {
smlayer_setActorFacing(0, 2, 19, 180);
_actor[0].act[2].state = 27;
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt);
- if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)))
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)))
smlayer_startSfx(72);
break;
case 27:
@@ -1057,7 +1057,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_BOOT:
case INV_DUST:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(58);
if (tmp == 1000)
@@ -1176,7 +1176,7 @@ void Insane::actor02Reaction(int32 buttons) {
case 36:
smlayer_setActorLayer(0, 2, 5);
_actor[0].kicking = false;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(17));
else
smlayer_setActorCostume(0, 2, readArray(18));
@@ -1222,7 +1222,7 @@ void Insane::actor02Reaction(int32 buttons) {
case EN_ROTT1:
case EN_ROTT2:
case EN_ROTT3:
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
queueSceneSwitch(9, 0, "bencrshe.san", 64, 0, 0, 0);
else
queueSceneSwitch(9, 0, "wr2_benr.san", 64, 0, 0, 0);
@@ -1923,7 +1923,7 @@ void Insane::switchBenWeapon(void) {
_actor[0].act[2].state = 34;
break;
case INV_WRENCH:
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(24));
else
smlayer_setActorCostume(0, 2, readArray(25));
@@ -1934,7 +1934,7 @@ void Insane::switchBenWeapon(void) {
case INV_BOOT:
case INV_HAND:
case INV_DUST:
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(11));
else
smlayer_setActorCostume(0, 2, readArray(12));
@@ -1985,7 +1985,7 @@ int32 Insane::setBenState(void) {
void Insane::ouchSoundBen(void) {
_actor[0].act[3].state = 52;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
smlayer_startVoice(54);
return;
}
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index d67fc7ae09..2b12754131 100644
--- a/engines/scumm/insane/insane_enemy.cpp
+++ b/engines/scumm/insane/insane_enemy.cpp
@@ -1266,7 +1266,7 @@ void Insane::ouchSoundEnemy(void) {
_actor[1].act[3].state = 52;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
smlayer_startVoice(55);
return;
}
@@ -1700,7 +1700,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].weaponClass = 1;
if (_actor[1].act[2].frame >= 6) {
tmp = calcBenDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(50);
} else if (tmp == 1)
@@ -1872,7 +1872,7 @@ 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);
- if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
smlayer_startSfx(69);
if (!_actor[1].field_54) {
tmp = _vm->_rnd.getRandomNumber(4);
@@ -1936,7 +1936,7 @@ void Insane::actor12Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcBenDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(52);
else if (tmp == 1000)
@@ -2054,7 +2054,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = true;
if (_actor[1].act[2].frame >= 3) {
tmp = calcBenDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(57);
} else if (tmp == 1)
@@ -2110,7 +2110,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorLayer(1, 2, 25);
_actor[1].act[2].state = 37;
- if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
smlayer_startSfx(96);
switch (_currEnemy) {
case EN_ROTT1:
diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp
index c706c7d191..9b2ceb3230 100644
--- a/engines/scumm/insane/insane_iact.cpp
+++ b/engines/scumm/insane/insane_iact.cpp
@@ -324,7 +324,7 @@ void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
int32 setupsan13, Chunk &b, int32 size, int32 flags) {
_player->checkBlock(b, TYPE_IACT, 8);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
return;
int16 par1, par2, par3, par4, par5;
diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp
index 7cc01fc2cf..651852a5a5 100644
--- a/engines/scumm/insane/insane_scenes.cpp
+++ b/engines/scumm/insane/insane_scenes.cpp
@@ -68,14 +68,14 @@ void Insane::runScene(int arraynum) {
break;
case 2:
setupValues();
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_putActor(0, 2, _actor[0].x, _actor[0].y1 + 190, _smlayer_room2);
_mainRoadPos = readArray(2);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
initScene(5);
startVideo("tovista.san", 1, 32, 12, 0);
} else if (_mainRoadPos == _posBrokenTruck) {
@@ -142,7 +142,7 @@ void Insane::runScene(int arraynum) {
_insaneIsRunning = false;
- if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
writeArray(50, _actor[0].inventory[INV_CHAIN]);
writeArray(51, _actor[0].inventory[INV_CHAINSAW]);
writeArray(52, _actor[0].inventory[INV_MACE]);
@@ -239,7 +239,7 @@ void Insane::stopSceneSounds(int sceneId) {
_actor[1].defunct = 0;
_actor[1].scenePropSubIdx = 0;
_actor[1].field_54 = 0;
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
smlayer_stopSound(59);
smlayer_stopSound(63);
} else {
@@ -315,7 +315,7 @@ void Insane::shutCurrentScene(void) {
// insane_loadSceneData1 & insane_loadSceneData2
int Insane::loadSceneData(int scene, int flag, int phase) {
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
return 1;
int retvalue = 1;
@@ -649,7 +649,7 @@ void Insane::setSceneCostumes(int sceneId) {
case 4:
case 5:
case 6:
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
@@ -669,7 +669,7 @@ void Insane::setEnemyCostumes(void) {
debugC(DEBUG_INSANE, "setEnemyCostumes(%d)", _currEnemy);
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -1133,7 +1133,7 @@ void Insane::postCase20(byte *renderBitmap, int32 codecparam, int32 setupsan12,
void Insane::postCase3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
int32 setupsan13, int32 curFrame, int32 maxFrame) {
- if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
turnBen(false);
else
turnBen(true);