aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/actor.cpp12
-rw-r--r--scumm/charset.cpp6
-rw-r--r--scumm/costume.cpp2
-rw-r--r--scumm/cursor.cpp8
-rw-r--r--scumm/gfx.cpp14
-rw-r--r--scumm/input.cpp6
-rw-r--r--scumm/insane/insane.cpp14
-rw-r--r--scumm/insane/insane_ben.cpp20
-rw-r--r--scumm/insane/insane_enemy.cpp12
-rw-r--r--scumm/insane/insane_iact.cpp2
-rw-r--r--scumm/insane/insane_scenes.cpp16
-rw-r--r--scumm/object.cpp4
-rw-r--r--scumm/resource.cpp8
-rw-r--r--scumm/resource_v2.cpp6
-rw-r--r--scumm/resource_v4.cpp2
-rw-r--r--scumm/room.cpp2
-rw-r--r--scumm/saveload.cpp6
-rw-r--r--scumm/script.cpp8
-rw-r--r--scumm/script_v2.cpp32
-rw-r--r--scumm/script_v5.cpp18
-rw-r--r--scumm/script_v6.cpp4
-rw-r--r--scumm/script_v6he.cpp4
-rw-r--r--scumm/scumm.cpp99
-rw-r--r--scumm/scumm.h14
-rw-r--r--scumm/smush/smush_player.cpp4
-rw-r--r--scumm/sound.cpp16
-rw-r--r--scumm/string.cpp4
-rw-r--r--scumm/vars.cpp10
-rw-r--r--scumm/verbs.cpp14
29 files changed, 165 insertions, 202 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 337ab945d0..b0b095ad83 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -445,7 +445,7 @@ void Actor::setupActorScale() {
}
void Actor::startAnimActor(int f) {
- if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
switch (f) {
case 1001:
f = _initFrame;
@@ -512,7 +512,7 @@ void Actor::startAnimActor(int f) {
void Actor::animateActor(int anim) {
int cmd, dir;
- if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
if (anim == 0xFF)
anim = 2000;
@@ -825,14 +825,14 @@ void Actor::showActor() {
// an internal variable. Emulate this to prevent overwriting script vars...
// Maniac NES (V1), however, DOES have a ScummVar for VAR_TALK_ACTOR
int ScummEngine::getTalkingActor() {
- if (_gameId == GID_MANIAC && _version == 1 && !(_features & GF_NES))
+ if (_gameId == GID_MANIAC && _version == 1 && !(_platform == Common::kPlatformNES))
return _V1TalkingActor;
else
return VAR(VAR_TALK_ACTOR);
}
void ScummEngine::setTalkingActor(int value) {
- if (_gameId == GID_MANIAC && _version == 1 && !(_features & GF_NES))
+ if (_gameId == GID_MANIAC && _version == 1 && !(_platform == Common::kPlatformNES))
_V1TalkingActor = value;
else
VAR(VAR_TALK_ACTOR) = value;
@@ -1041,7 +1041,7 @@ void Actor::drawActorCostume(bool hitTestMode) {
bcr->_actorX = _pos.x + _offsX - _vm->virtscr[0].xstart;
bcr->_actorY = _pos.y + _offsY - _elevation;
- if (_vm->_features & GF_NES) {
+ if (_vm->_platform == Common::kPlatformNES) {
// In the NES version, when the actor is facing right,
// we need to shift it 8 pixels to the left
if (_facing == 90)
@@ -1315,7 +1315,7 @@ void ScummEngine::actorTalk(const byte *msg) {
if (_heversion >= 72 || getTalkingActor() > 0x7F) {
_charsetColor = (byte)_string[0].color;
- } else if (_features & GF_NES) {
+ } else if (_platform == Common::kPlatformNES) {
if (_NES_lastTalkingActor != getTalkingActor())
_NES_talkColor ^= 1;
_NES_lastTalkingActor = getTalkingActor();
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 24175b095b..fe5e7ecd41 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -1163,7 +1163,7 @@ int CharsetRendererV3::getCharWidth(byte chr) {
void CharsetRendererV3::setColor(byte color)
{
_color = color;
- _shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0;
+ _shadowColor = (_vm->_platform == Common::kPlatformFMTowns) ? 8 : 0;
// FM-TOWNS version of Loom uses old colour method as well
if ((_vm->_version >= 2) && (_vm->_features & GF_16COLOR || _vm->_gameId == GID_LOOM)) {
_dropShadow = ((_color & 0xF0) != 0);
@@ -1306,7 +1306,7 @@ void CharsetRendererClassic::printChar(int chr) {
int type = *_fontPtr;
if (is2byte) {
_dropShadow = true;
- _shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0;
+ _shadowColor = (_vm->_platform == Common::kPlatformFMTowns) ? 8 : 0;
charPtr = _vm->get2byteCharPtr(chr);
width = _vm->_2byteWidth;
height = _vm->_2byteHeight;
@@ -1500,7 +1500,7 @@ void CharsetRendererClassic::drawChar(int chr, const Graphics::Surface &s, int x
if (is2byte) {
_dropShadow = true;
- _shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0;
+ _shadowColor = (_vm->_platform == Common::kPlatformFMTowns) ? 8 : 0;
charPtr = _vm->get2byteCharPtr(chr);
width = _vm->_2byteWidth;
height = _vm->_2byteHeight;
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index 1004799274..ee5c257b99 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -96,7 +96,7 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
const int scaletableSize = 128;
- const bool newAmiCost = (_vm->_version == 5) && (_vm->_features & GF_AMIGA);
+ const bool newAmiCost = (_vm->_version == 5) && (_vm->_platform == Common::kPlatformAmiga);
CHECK_HEAP
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index a2f9840873..441f677580 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -119,7 +119,7 @@ void ScummEngine_v6::setCursorTransparency(int a) {
void ScummEngine::updateCursor() {
_system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
_cursor.hotspotX, _cursor.hotspotY,
- (_features & GF_NES ? _grabbedCursor[63] : 255),
+ (_platform == Common::kPlatformNES ? _grabbedCursor[63] : 255),
(_heversion == 70 ? 2 : 1));
}
@@ -157,7 +157,7 @@ void ScummEngine::setCursorFromBuffer(byte *ptr, int width, int height, int pitc
}
void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {
- if (_features & GF_MACINTOSH && _heversion == 72)
+ if (_platform == Common::kPlatformMacintosh && _heversion == 72)
_macResExtractor->setCursor(img);
else
_win32ResExtractor->setCursor(img);
@@ -382,7 +382,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
else
color = default_cursor_colors[idx];
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
_cursor.width = 8;
_cursor.height = 8;
_cursor.hotspotX = 0;
@@ -399,7 +399,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
*dst++ = palette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | ((idx == 3) ? 4 : 0)];
}
- } else if (_version <= 2 && _features & GF_AMIGA) {
+ } else if (_version <= 2 && _platform == Common::kPlatformAmiga) {
_cursor.width = 15;
_cursor.height = 15;
_cursor.hotspotX = 7;
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 044b9611e9..34ceca3e78 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -195,7 +195,7 @@ Gdi::Gdi(ScummEngine *vm) {
_vm = vm;
_roomPalette = vm->_roomPalette;
_roomStrips = 0;
- if ((vm->_features & GF_AMIGA) && (vm->_version >= 4))
+ if ((vm->_platform == Common::kPlatformAmiga) && (vm->_version >= 4))
_roomPalette += 16;
}
@@ -225,7 +225,7 @@ void Gdi::init() {
void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs) {
if (_vm->_version == 1) {
- if (_vm->_features & GF_NES) {
+ if (_vm->_platform == Common::kPlatformNES) {
decodeNESGfx(roomptr);
} else {
for (int i = 0; i < 4; i++){
@@ -272,7 +272,7 @@ void ScummEngine::initScreens(int b, int h) {
}
}
- if ((_features & GF_NES) && (h != _screenHeight)) {
+ if ((_platform == Common::kPlatformNES) && (h != _screenHeight)) {
adj = 16;
initVirtScreen(kUnkVirtScreen, 0, 0, _screenWidth, adj, false, false);
}
@@ -555,7 +555,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
// NES can address negative number strips and that poses problem for
// our code. So instead adding zillions of fixes and potentially break
// other games we shift it right on rendering stage
- if ((_features & GF_NES) && (((_NESStartStrip > 0) && (vs->number == kMainVirtScreen)) || (vs->number == kTextVirtScreen))) {
+ if ((_platform == Common::kPlatformNES) && (((_NESStartStrip > 0) && (vs->number == kMainVirtScreen)) || (vs->number == kTextVirtScreen))) {
x += 16;
}
@@ -1340,7 +1340,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
_objectMode = (flag & dbObjectMode) == dbObjectMode;
if (_objectMode && _vm->_version == 1) {
- if (_vm->_features & GF_NES) {
+ if (_vm->_platform == Common::kPlatformNES) {
// TODO: Maybe call decodeNESObject here?
} else {
decodeC64Gfx(ptr, _C64.objectMap, (width / 8) * (height / 8) * 3);
@@ -1405,7 +1405,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
dstPtr = (byte *)vs->pixels + y * vs->pitch + x * 8;
if (_vm->_version == 1) {
- if (_vm->_features & GF_NES) {
+ if (_vm->_platform == Common::kPlatformNES) {
mask_ptr = getMaskBuffer(x, y, 0);
drawStripNES(dstPtr, mask_ptr, vs->pitch, stripnr, y, height);
}
@@ -1457,7 +1457,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
if (_vm->_version == 1) {
mask_ptr = getMaskBuffer(x, y, 1);
- if (_vm->_features & GF_NES) {
+ if (_vm->_platform == Common::kPlatformNES) {
drawStripNESMask(mask_ptr, stripnr, height);
} else {
drawStripC64Mask(mask_ptr, stripnr, width, height);
diff --git a/scumm/input.cpp b/scumm/input.cpp
index 984efce08f..666bfe9084 100644
--- a/scumm/input.cpp
+++ b/scumm/input.cpp
@@ -216,7 +216,7 @@ void ScummEngine::processKbd(bool smushMode) {
_lastKeyHit = _keyPressed;
_keyPressed = 0;
- if (((_version <= 2) || (_features & GF_FMTOWNS && _version == 3)) && 315 <= _lastKeyHit && _lastKeyHit < 315+12) {
+ if (((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3)) && 315 <= _lastKeyHit && _lastKeyHit < 315+12) {
// Convert F-Keys for V1/V2 games (they start at 1 instead of at 315)
_lastKeyHit -= 314;
}
@@ -374,7 +374,7 @@ void ScummEngine::processKbd(bool smushMode) {
}
if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY) ||
- (((_version <= 2) || (_features & GF_FMTOWNS && _version == 3)) && _lastKeyHit == 8)) {
+ (((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3)) && _lastKeyHit == 8)) {
confirmRestartDialog();
return;
}
@@ -392,7 +392,7 @@ void ScummEngine::processKbd(bool smushMode) {
return;
}
- if ((_version <= 2) || (_features & GF_FMTOWNS && _version == 3))
+ if ((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3))
saveloadkey = 5; // F5
else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI) || (_heversion >= 72))
saveloadkey = 319; // F5
diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp
index 80ea65f2aa..041cfd0181 100644
--- a/scumm/insane/insane.cpp
+++ b/scumm/insane/insane.cpp
@@ -54,7 +54,7 @@ Insane::Insane(ScummEngine_v6 *scumm) {
initvars();
- if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
readFileToMem("roadrash.rip", &_smush_roadrashRip);
readFileToMem("roadrsh2.rip", &_smush_roadrsh2Rip);
readFileToMem("roadrsh3.rip", &_smush_roadrsh3Rip);
@@ -178,7 +178,7 @@ void Insane::initvars(void) {
_iactBits[i] = 0;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_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 {
@@ -633,7 +633,7 @@ void Insane::putActors(void) {
void Insane::readState(void) { // PATCH
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
_actor[0].inventory[INV_CHAIN] = 0;
_actor[0].inventory[INV_CHAINSAW] = 0;
_actor[0].inventory[INV_MACE] = 0;
@@ -795,7 +795,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->_features & GF_PC)) || !loadScenePropSounds(idx))
+ if (((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) || !loadScenePropSounds(idx))
return;
_actor[0].defunct = arg_4;
@@ -892,7 +892,7 @@ int32 Insane::weaponDamage(int32 actornum) {
}
void Insane::reinitActors(void) {
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -1174,7 +1174,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->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
return;
// if (shut_flag)
@@ -1290,7 +1290,7 @@ void Insane::procSKIP(Chunk &b) {
int16 par1, par2;
_player->_skipNext = false;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
_player->checkBlock(b, TYPE_SKIP, 2);
par1 = b.getWord();
if (isBitSet(par1))
diff --git a/scumm/insane/insane_ben.cpp b/scumm/insane/insane_ben.cpp
index 15108e04f0..2d12061772 100644
--- a/scumm/insane/insane_ben.cpp
+++ b/scumm/insane/insane_ben.cpp
@@ -124,7 +124,7 @@ int32 Insane::actionBen(void) {
bool doDamage = false;
int sound;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
sound = 59;
else
sound = 95;
@@ -565,7 +565,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->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(50);
} else {
@@ -888,7 +888,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(52);
if (tmp == 1000)
@@ -1013,7 +1013,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->_features & GF_PC)))
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)))
smlayer_startSfx(72);
break;
case 27:
@@ -1056,7 +1056,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_BOOT:
case INV_DUST:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(58);
if (tmp == 1000)
@@ -1175,7 +1175,7 @@ void Insane::actor02Reaction(int32 buttons) {
case 36:
smlayer_setActorLayer(0, 2, 5);
_actor[0].kicking = false;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(17));
else
smlayer_setActorCostume(0, 2, readArray(18));
@@ -1221,7 +1221,7 @@ void Insane::actor02Reaction(int32 buttons) {
case EN_ROTT1:
case EN_ROTT2:
case EN_ROTT3:
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
queueSceneSwitch(9, 0, "bencrshe.san", 64, 0, 0, 0);
else
queueSceneSwitch(9, 0, "wr2_benr.san", 64, 0, 0, 0);
@@ -1922,7 +1922,7 @@ void Insane::switchBenWeapon(void) {
_actor[0].act[2].state = 34;
break;
case INV_WRENCH:
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(24));
else
smlayer_setActorCostume(0, 2, readArray(25));
@@ -1933,7 +1933,7 @@ void Insane::switchBenWeapon(void) {
case INV_BOOT:
case INV_HAND:
case INV_DUST:
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(11));
else
smlayer_setActorCostume(0, 2, readArray(12));
@@ -1984,7 +1984,7 @@ int32 Insane::setBenState(void) {
void Insane::ouchSoundBen(void) {
_actor[0].act[3].state = 52;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
smlayer_startVoice(54);
return;
}
diff --git a/scumm/insane/insane_enemy.cpp b/scumm/insane/insane_enemy.cpp
index d951f77029..a8e1f91cc4 100644
--- a/scumm/insane/insane_enemy.cpp
+++ b/scumm/insane/insane_enemy.cpp
@@ -1265,7 +1265,7 @@ void Insane::ouchSoundEnemy(void) {
_actor[1].act[3].state = 52;
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
smlayer_startVoice(55);
return;
}
@@ -1699,7 +1699,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->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(50);
} else if (tmp == 1)
@@ -1871,7 +1871,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->_features & GF_PC))) {
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
smlayer_startSfx(69);
if (!_actor[1].field_54) {
tmp = _vm->_rnd.getRandomNumber(4);
@@ -1935,7 +1935,7 @@ void Insane::actor12Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcBenDamage(1, 1);
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(52);
else if (tmp == 1000)
@@ -2053,7 +2053,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->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
if (tmp == 1)
smlayer_startSfx(57);
} else if (tmp == 1)
@@ -2109,7 +2109,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorLayer(1, 2, 25);
_actor[1].act[2].state = 37;
- if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
smlayer_startSfx(96);
switch (_currEnemy) {
case EN_ROTT1:
diff --git a/scumm/insane/insane_iact.cpp b/scumm/insane/insane_iact.cpp
index 11b3caa377..bd53842e38 100644
--- a/scumm/insane/insane_iact.cpp
+++ b/scumm/insane/insane_iact.cpp
@@ -323,7 +323,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->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
return;
int16 par1, par2, par3, par4, par5;
diff --git a/scumm/insane/insane_scenes.cpp b/scumm/insane/insane_scenes.cpp
index c3e9e7c212..c3b25be260 100644
--- a/scumm/insane/insane_scenes.cpp
+++ b/scumm/insane/insane_scenes.cpp
@@ -67,14 +67,14 @@ void Insane::runScene(int arraynum) {
break;
case 2:
setupValues();
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_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->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
initScene(5);
startVideo("tovista.san", 1, 32, 12, 0);
} else if (_mainRoadPos == _posBrokenTruck) {
@@ -141,7 +141,7 @@ void Insane::runScene(int arraynum) {
_insaneIsRunning = false;
- if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
writeArray(50, _actor[0].inventory[INV_CHAIN]);
writeArray(51, _actor[0].inventory[INV_CHAINSAW]);
writeArray(52, _actor[0].inventory[INV_MACE]);
@@ -238,7 +238,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->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
smlayer_stopSound(59);
smlayer_stopSound(63);
} else {
@@ -314,7 +314,7 @@ 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))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
return 1;
int retvalue = 1;
@@ -648,7 +648,7 @@ void Insane::setSceneCostumes(int sceneId) {
case 4:
case 5:
case 6:
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
@@ -668,7 +668,7 @@ void Insane::setEnemyCostumes(void) {
debugC(DEBUG_INSANE, "setEnemyCostumes(%d)", _currEnemy);
- if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) {
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -1132,7 +1132,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->_features & GF_PC))
+ if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
turnBen(false);
else
turnBen(true);
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 0d48f3efea..9e350e567d 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -352,7 +352,7 @@ int ScummEngine::findObject(int x, int y) {
} while ((_objs[b].state & mask) == a);
}
- if ((_features & GF_NES) && (_userState & 0x40) && (v2_mouseover_box >= 0) &&
+ if ((_platform == Common::kPlatformNES) && (_userState & 0x40) && (v2_mouseover_box >= 0) &&
(v2_mouseover_box < 4))
return findInventory(VAR(VAR_EGO), v2_mouseover_box + _inventoryOffset + 1);
@@ -487,7 +487,7 @@ void ScummEngine::drawObject(int obj, int arg) {
byte flags = od.flags | Gdi::dbObjectMode;
if (_version == 1) {
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
gdi.decodeNESObject(ptr, xpos, ypos, width, height);
}
}
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index ec13c66353..9b96557b13 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -138,7 +138,7 @@ void ScummEngine::openRoom(const int room) {
}
// If we have substitute
- if (_substResFileNameIndex > 0 && !(_features & GF_NES)) {
+ if (_substResFileNameIndex > 0 && !(_platform == Common::kPlatformNES)) {
char tmpBuf[128];
generateSubstResFileName(buf, tmpBuf, sizeof(tmpBuf));
@@ -646,7 +646,7 @@ int ScummEngine::loadResource(int type, int idx) {
_fileHandle->seek(fileOffs + _fileOffset, SEEK_SET);
if (_features & GF_OLD_BUNDLE) {
- if ((_version == 3) && !(_features & GF_AMIGA) && (type == rtSound)) {
+ if ((_version == 3) && !(_platform == Common::kPlatformAmiga) && (type == rtSound)) {
return readSoundResourceSmallHeader(type, idx);
} else {
size = _fileHandle->readUint16LE();
@@ -658,7 +658,7 @@ int ScummEngine::loadResource(int type, int idx) {
size = _fileHandle->readUint32LE();
tag = _fileHandle->readUint16LE();
_fileHandle->seek(-6, SEEK_CUR);
- if ((type == rtSound) && !(_features & GF_AMIGA) && !(_features & GF_FMTOWNS)) {
+ if ((type == rtSound) && !(_platform == Common::kPlatformAmiga) && !(_platform == Common::kPlatformFMTowns)) {
return readSoundResourceSmallHeader(type, idx);
}
} else {
@@ -1073,7 +1073,7 @@ void ScummEngine_v7::readMAXS(int blockSize) {
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
if ((_gameId == GID_FT) && (_features & GF_DEMO) &&
- (_features & GF_PC))
+ (_platform == Common::kPlatformPC))
_numGlobalScripts = 300;
else
_numGlobalScripts = 2000;
diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp
index a0ab105ec1..00f2628023 100644
--- a/scumm/resource_v2.cpp
+++ b/scumm/resource_v2.cpp
@@ -35,13 +35,13 @@ void ScummEngine_v2::readClassicIndexFile() {
int i;
if (_gameId == GID_MANIAC) {
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_numGlobalObjects = 775;
else
_numGlobalObjects = 800;
_numRooms = 55;
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
// costumes 25-36 are special. see v1MMNEScostTables[] in costume.cpp
// costumes 37-76 are room graphics resources
// costume 77 is a character set translation table
@@ -169,7 +169,7 @@ void ScummEngine_v2::readIndexFile() {
readClassicIndexFile();
break;
case 0x4643:
- if (!(_features & GF_NES))
+ if (!(_platform == Common::kPlatformNES))
error("Use maniac target");
printf("NES V1 game detected\n");
_version = 1;
diff --git a/scumm/resource_v4.cpp b/scumm/resource_v4.cpp
index a17b0ef7eb..2b63dc0d4f 100644
--- a/scumm/resource_v4.cpp
+++ b/scumm/resource_v4.cpp
@@ -121,7 +121,7 @@ void ScummEngine_v4::readIndexFile() {
default:
// FIXME: this is a little hack because Indy3 FM-TOWNS has
// 32 extra bytes of unknown meaning appended to 00.LFL
- if (!(_gameId == GID_INDY3 && _features & GF_FMTOWNS))
+ if (!(_gameId == GID_INDY3 && _platform == Common::kPlatformFMTowns))
error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
return;
}
diff --git a/scumm/room.cpp b/scumm/room.cpp
index 209e5c0eed..459c96c1bb 100644
--- a/scumm/room.cpp
+++ b/scumm/room.cpp
@@ -553,7 +553,7 @@ void ScummEngine_v3old::initRoomSubBlocks() {
rmhd = (const RoomHeader *)(roomptr + 4);
if (_version == 1) {
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
_roomWidth = READ_LE_UINT16(&(rmhd->old.width)) * 8;
_roomHeight = READ_LE_UINT16(&(rmhd->old.height)) * 8;
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index e41e6df51c..f488eec4bd 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -248,7 +248,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
// ever add options for using different 16-colour palettes.
if (_version == 1) {
if (_gameId == GID_MANIAC)
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
setupNESPalette();
else
setupV1ManiacPalette();
@@ -274,7 +274,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
break;
default:
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette();
else
setupEGAPalette();
@@ -753,7 +753,7 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
}
}
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
if (savegameVersion < VER(47))
NES_loadCostumeSet(_NESCostumeSet = 0);
else
diff --git a/scumm/script.cpp b/scumm/script.cpp
index ff97f325ca..8f631dee6f 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -524,12 +524,12 @@ int ScummEngine::readVar(uint var) {
return _roomVars[var];
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) ||
- (_gameId == GID_LOOM && (_features & GF_FMTOWNS))) {
+ (_gameId == GID_LOOM && (_platform == Common::kPlatformFMTowns))) {
int bit = var & 0xF;
var = (var >> 4) & 0xFF;
if (!_copyProtection) {
- if (_gameId == GID_LOOM && (_features & GF_FMTOWNS) && var == 214 && bit == 15) {
+ if (_gameId == GID_LOOM && (_platform == Common::kPlatformFMTowns) && var == 214 && bit == 15) {
return 0;
} else if (_gameId == GID_ZAK256 && var == 151 && bit == 8) {
return 0;
@@ -541,7 +541,7 @@ int ScummEngine::readVar(uint var) {
} else {
var &= 0x7FFF;
if (!_copyProtection) {
- if (_gameId == GID_INDY3 && (_features & GF_FMTOWNS) && var == 1508)
+ if (_gameId == GID_INDY3 && (_platform == Common::kPlatformFMTowns) && var == 1508)
return 0;
}
@@ -607,7 +607,7 @@ void ScummEngine::writeVar(uint var, int value) {
_roomVars[var] = value;
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) ||
- (_gameId == GID_LOOM && (_features & GF_FMTOWNS))) {
+ (_gameId == GID_LOOM && (_platform == Common::kPlatformFMTowns))) {
// In the old games, the bit variables were using the same memory
// as the normal variables!
int bit = var & 0xF;
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index ddfd88bf54..810f136ca9 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -414,7 +414,7 @@ void ScummEngine_v2::decodeParseString() {
int textSlot = 0;
_string[textSlot].xpos = 0;
_string[textSlot].ypos = 0;
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_string[textSlot].right = 256;
else
_string[textSlot].right = 320;
@@ -524,7 +524,7 @@ void ScummEngine_v2::o2_setObjPreposition() {
int obj = getVarOrDirectWord(PARAM_1);
int unk = fetchScriptByte();
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
return;
if (whereIsObject(obj) != WIO_NOT_FOUND) {
@@ -825,7 +825,7 @@ void ScummEngine_v2::o2_verbOps() {
slot = getVarOrDirectByte(PARAM_1) + 1;
int prep = fetchScriptByte(); // Only used in V1?
// V1 Maniac verbs are relative to the 'verb area' - under the sentence
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
x += 8;
else if ((_gameId == GID_MANIAC) && (_version == 1))
y += 8;
@@ -838,7 +838,7 @@ void ScummEngine_v2::o2_verbOps() {
vs = &_verbs[slot];
vs->verbid = verb;
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
vs->color = 1;
vs->hicolor = 1;
vs->dimcolor = 1;
@@ -981,7 +981,7 @@ void ScummEngine_v2::o2_drawSentence() {
const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0);
- if (!((_userState & 32) || (_features & GF_NES && _userState & 0xe0)))
+ if (!((_userState & 32) || (_platform == Common::kPlatformNES && _userState & 0xe0)))
return;
if (getResourceAddress(rtVerb, slot))
@@ -998,7 +998,7 @@ void ScummEngine_v2::o2_drawSentence() {
// For V1 games, the engine must compute the preposition.
// In all other Scumm versions, this is done by the sentence script.
- if ((_gameId == GID_MANIAC && _version == 1 && !(_features & GF_NES)) && (VAR(VAR_SENTENCE_PREPOSITION) == 0)) {
+ if ((_gameId == GID_MANIAC && _version == 1 && !(_platform == Common::kPlatformNES)) && (VAR(VAR_SENTENCE_PREPOSITION) == 0)) {
if (_verbs[slot].prep == 0xFF) {
byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1));
assert(ptr);
@@ -1026,7 +1026,7 @@ void ScummEngine_v2::o2_drawSentence() {
{ " ", " in", " with", " on", " to" } // Korean
};
int lang = (_language <= 8) ? _language : 0; // Default to english
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
strcat(sentence, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
} else
strcat(sentence, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]);
@@ -1043,7 +1043,7 @@ void ScummEngine_v2::o2_drawSentence() {
_string[2].charset = 1;
_string[2].ypos = virtscr[2].topline;
_string[2].xpos = 0;
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
_string[2].xpos = 16;
_string[2].color = 0;
} else if (_version == 1)
@@ -1065,7 +1065,7 @@ void ScummEngine_v2::o2_drawSentence() {
ptr++;
}
- if (_features & GF_NES) { // TODO - get multiline sentences working
+ if (_platform == Common::kPlatformNES) { // TODO - get multiline sentences working
sentenceline.top = virtscr[2].topline;
sentenceline.bottom = virtscr[2].topline + 16;
sentenceline.left = 16;
@@ -1292,7 +1292,7 @@ void ScummEngine_v2::o2_lights() {
c = fetchScriptByte();
if (c == 0) {
- if (_gameId == GID_MANIAC && _version == 1 && !(_features & GF_NES)) {
+ if (_gameId == GID_MANIAC && _version == 1 && !(_platform == Common::kPlatformNES)) {
// Convert older light mode values into
// equivalent values.of later games
// 0 Darkness
@@ -1448,7 +1448,7 @@ void ScummEngine_v2::o2_endCutscene() {
// Reset user state to values before cutscene
setUserState(vm.cutSceneData[0] | 7);
- if ((_gameId == GID_MANIAC) && !(_features & GF_NES)) {
+ if ((_gameId == GID_MANIAC) && !(_platform == Common::kPlatformNES)) {
camera._mode = (byte) vm.cutSceneData[3];
if (camera._mode == kFollowActorCameraMode) {
actorFollowCamera(VAR(VAR_EGO));
@@ -1496,7 +1496,7 @@ void ScummEngine_v2::o2_pickupObject() {
clearDrawObjectQueue();
runInventoryScript(1);
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_sound->addSoundToQueue(51); // play 'pickup' sound
}
@@ -1513,7 +1513,7 @@ void ScummEngine_v2::o2_cursorCommand() { // TODO: Define the magic numbers
void ScummEngine_v2::setUserState(byte state) {
if (state & 4) { // Userface
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_userState = (_userState & ~0xE0) | (state & 0xE0);
else
_userState = state & (32 | 64 | 128);
@@ -1527,7 +1527,7 @@ void ScummEngine_v2::setUserState(byte state) {
}
if (state & 2) { // Cursor Show/Hide
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_userState = (_userState & ~0x10) | (state & 0x10);
if (state & 16) {
_userPut = 1;
@@ -1542,7 +1542,7 @@ void ScummEngine_v2::setUserState(byte state) {
Common::Rect rect;
rect.top = virtscr[2].topline;
rect.bottom = virtscr[2].topline + 8 * 88;
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
rect.left = 16;
rect.right = 255;
} else {
@@ -1572,7 +1572,7 @@ void ScummEngine_v2::o2_dummy() {
void ScummEngine_v2::o2_switchCostumeSet() {
// NES version of maniac uses this to switch between the two
// groups of costumes it has
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
NES_loadCostumeSet(fetchScriptByte());
else
o2_dummy();
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index dfdd5b18e0..fd35a7117e 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1099,7 +1099,7 @@ void ScummEngine_v5::o5_getActorX() {
int a;
getResultPos();
- if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH))
+ if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh))
a = getVarOrDirectByte(PARAM_1);
else
a = getVarOrDirectWord(PARAM_1);
@@ -1111,7 +1111,7 @@ void ScummEngine_v5::o5_getActorY() {
int a;
getResultPos();
- if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) {
+ if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh)) {
a = getVarOrDirectByte(PARAM_1);
// WORKAROUND bug #636433 (can't get into Zeppelin)
@@ -1138,7 +1138,7 @@ void ScummEngine_v5::o5_saveLoadGame() {
slot = 1;
if (a == 1)
_opcode = 0x40;
- else if ((a == 2) || (_features & GF_NES))
+ else if ((a == 2) || (_platform == Common::kPlatformNES))
_opcode = 0x80;
} else {
_opcode = a & 0xE0;
@@ -1407,7 +1407,7 @@ void ScummEngine_v5::o5_lessOrEqual() {
int16 b = getVarOrDirectWord(PARAM_1);
// WORKAROUND bug #820507 : Work around a bug in Indy3Town.
- if (_gameId == GID_INDY3 && (_features & GF_FMTOWNS) &&
+ if (_gameId == GID_INDY3 && (_platform == Common::kPlatformFMTowns) &&
(vm.slot[_currentScript].number == 200 || vm.slot[_currentScript].number == 203) &&
_currentRoom == 70 && b == -256) {
o5_jumpRelative();
@@ -1698,7 +1698,7 @@ void ScummEngine_v5::o5_resourceRoutines() {
_opcode = fetchScriptByte();
if (_opcode != 17)
resid = getVarOrDirectByte(PARAM_1);
- if (!(_features & GF_FMTOWNS)) {
+ if (!(_platform == Common::kPlatformFMTowns)) {
// FIXME - this probably can be removed eventually, I don't think the following
// check will ever be triggered, but then I could be wrong and it's better
// to play it safe.
@@ -2106,7 +2106,7 @@ void ScummEngine_v5::o5_setVarRange() {
}
void ScummEngine_v5::o5_startMusic() {
- if (_features & GF_FMTOWNS && _version == 3) {
+ if (_platform == Common::kPlatformFMTowns && _version == 3) {
// In FM-TOWNS games this is some kind of Audio CD status query function.
// See also bug #762589 (thanks to Hibernatus for providing the information).
getResultPos();
@@ -2348,7 +2348,7 @@ void ScummEngine_v5::o5_verbOps() {
vs->curRect.left = getVarOrDirectWord(PARAM_1);
vs->curRect.top = getVarOrDirectWord(PARAM_2);
// Macintosh verison of indy3ega used different interface, so adjust values.
- if ((_features & GF_MACINTOSH) && (_gameId == GID_INDY3)) {
+ if ((_platform == Common::kPlatformMacintosh) && (_gameId == GID_INDY3)) {
if ((verb > 0) && (verb < 14) || (verb > 31) && (verb < 35)) {
switch (verb) {
case 1:
@@ -2482,7 +2482,7 @@ void ScummEngine_v5::o5_verbOps() {
void ScummEngine_v5::o5_wait() {
const byte *oldaddr = _scriptPointer - 1;
- if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) {
+ if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh)) {
_opcode = 2;
} else
_opcode = fetchScriptByte();
@@ -2745,7 +2745,7 @@ void ScummEngine_v5::o5_oldRoomEffect() {
a = getVarOrDirectWord(PARAM_1);
#if 1
- if (_features & GF_FMTOWNS && _version == 3) {
+ if (_platform == Common::kPlatformFMTowns && _version == 3) {
// FIXME / TODO: OK the first thing to note is: at least in Zak256,
// maybe also in other games, this opcode does a bit more. I added
// some stubs here, but somebody with a full IDA or more knowledge
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index d7a78cef37..66db6204c6 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -2505,14 +2505,14 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
SmushPlayer *sp = new SmushPlayer(this, speed);
// Correct incorrect smush filename in Macintosh FT demo
- if ((_gameId == GID_FT) && (_features & GF_DEMO) && (_features & GF_MACINTOSH) &&
+ if ((_gameId == GID_FT) && (_features & GF_DEMO) && (_platform == Common::kPlatformMacintosh) &&
(strcmp((char *)getStringAddressVar(VAR_VIDEONAME), "jumpgorge.san") == 0))
sp->play("jumpgorg.san");
else
sp->play((char *)getStringAddressVar(VAR_VIDEONAME));
delete sp;
} else if (_gameId == GID_FT) {
- const int insaneVarNum = ((_features & GF_DEMO) && (_features & GF_PC))
+ const int insaneVarNum = ((_features & GF_DEMO) && (_platform == Common::kPlatformPC))
? 232 : 233;
_insaneRunning = true;
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index a3aabf3c29..ee21de7efe 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -1093,7 +1093,7 @@ void ScummEngine_v60he::o60_readFile() {
int val;
// Fatty Bear uses positive values
- if ((_features & GF_PC) && (_gameId == GID_FBEAR))
+ if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
size = -size;
if (size == -2) {
@@ -1121,7 +1121,7 @@ void ScummEngine_v60he::o60_writeFile() {
int slot = pop();
// Fatty Bear uses positive values
- if ((_features & GF_PC) && (_gameId == GID_FBEAR))
+ if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
size = -size;
if (size == -2) {
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 21057468ff..f2b31a4bb5 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -112,16 +112,16 @@ static const ScummGameSettings scumm_settings[] = {
{"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, 0, 13, MDT_PCSPK | MDT_ADLIB,
GF_SMALL_HEADER | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, Common::kPlatformUnknown, 0, 0},
{"indy3Towns", "Indiana Jones and the Last Crusade (FM-TOWNS)", GID_INDY3, 3, 0, 13, MDT_TOWNS,
- GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_FMTOWNS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
+ GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3, 3, 0, 13, MDT_PCSPK | MDT_ADLIB,
GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformUnknown, 0, 0},
{"zakTowns", "Zak McKracken and the Alien Mindbenders (FM-TOWNS)", GID_ZAK256, 3, 0, 13, MDT_TOWNS,
- GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
+ GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
{"loom", "Loom", GID_LOOM, 3, 0, 13, MDT_PCSPK | MDT_ADLIB | MDT_NATIVE,
GF_SMALL_HEADER | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, Common::kPlatformUnknown, 0, 0},
{"loomTowns", "Loom (FM Towns)", GID_LOOM, 3, 0, 13, MDT_TOWNS,
- GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
+ GF_SMALL_HEADER | GF_NO_SCALING | GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, 0, 0},
/* Scumm Version 4 */
{"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, 0, 13, MDT_PCSPK | MDT_ADLIB | MDT_NATIVE,
@@ -400,9 +400,9 @@ static const ScummGameSettings multiple_versions_md5_settings[] = {
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // Football2002
{"179879b6e35c1ead0d93aab26db0951b", "Fatty Bear's Birthday Surprise (Windows)", GID_FBEAR, 6, 70, 13, MDT_NONE,
- GF_USE_KEY | GF_NEW_COSTUMES | GF_WINDOWS, Common::kPlatformWindows, 0, 0},
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"22c9eb04455440131ffc157aeb8d40a8", "Fatty Bear's Birthday Surprise (Windows Demo)", GID_FBEAR, 6, 70, 13, MDT_NONE,
- GF_USE_KEY | GF_NEW_COSTUMES | GF_WINDOWS, Common::kPlatformWindows, 0, 0},
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"d4cccb5af88f3e77f370896e9ba8c5f9", "Freddi Fish 1: The Case of the Missing Kelp Seeds", GID_HEGAME, 6, 71, 30, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
@@ -438,13 +438,13 @@ static const ScummGameSettings multiple_versions_md5_settings[] = {
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
{"d8d07efcb88f396bee0b402b10c3b1c9", "Maniac Mansion (NES E)", GID_MANIAC, 1, 0, 25, MDT_NONE,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, Common::kPlatformNES, 0, "Maniac Mansion (E).prg"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformNES, 0, "Maniac Mansion (E).prg"},
{"81bbfa181184cb494e7a81dcfa94fbd9", "Maniac Mansion (NES F)", GID_MANIAC, 1, 0, 25, MDT_NONE,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, Common::kPlatformNES, 0, "Maniac Mansion (F).prg"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformNES, 0, "Maniac Mansion (F).prg"},
{"22d07d6c386c9c25aca5dac2a0c0d94b", "Maniac Mansion (NES SW)", GID_MANIAC, 1, 0, 25, MDT_NONE,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, Common::kPlatformNES, 0, "Maniac Mansion (SW).prg"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformNES, 0, "Maniac Mansion (SW).prg"},
{"3905799e081b80a61d4460b7b733c206", "Maniac Mansion (NES U)", GID_MANIAC, 1, 0, 25, MDT_NONE,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, Common::kPlatformNES, 0, "Maniac Mansion (U).prg"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformNES, 0, "Maniac Mansion (U).prg"},
{"7f45ddd6dbfbf8f80c0c0efea4c295bc", "Maniac Mansion (v1)", GID_MANIAC, 1, 0, 25, MDT_PCSPK,
GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, Common::kPlatformUnknown, 0, 0},
@@ -464,14 +464,14 @@ static const ScummGameSettings multiple_versions_md5_settings[] = {
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0}, // 500demo
{"9c92eeaf517a31b7221ec2546ab669fd", "Putt-Putt Goes To The Moon (Windows)", GID_HEGAME, 6, 70, 13, MDT_NONE,
- GF_USE_KEY | GF_NEW_COSTUMES | GF_WINDOWS, Common::kPlatformWindows, 0, 0},
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"9c143c5905055d5df7a0f014ab379aee", "Putt-Putt Goes To The Moon (Windows Demo)", GID_HEGAME, 6, 70, 13, MDT_NONE,
- GF_USE_KEY | GF_NEW_COSTUMES | GF_WINDOWS, Common::kPlatformWindows, 0, 0},
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"0b3222aaa7efcf283eb621e0cefd26cc", "Putt-Putt Joins The Parade (early version)", GID_HEGAME, 6, 0, 13, MDT_ADLIB | MDT_NATIVE,
GF_USE_KEY, Common::kPlatformUnknown, 0, 0},
{"6a30a07f353a75cdc602db27d73e1b42", "Putt-Putt Joins The Parade (Windows)", GID_HEGAME, 6, 70, 13, MDT_NONE,
- GF_USE_KEY | GF_NEW_COSTUMES | GF_WINDOWS, Common::kPlatformWindows, 0, 0},
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"37ff1b308999c4cca7319edfcc1280a0", "Putt-Putt Joins The Parade (Windows Demo)", GID_HEGAME, 6, 70, 13, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
@@ -642,13 +642,13 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
// Add default file directories.
- if (((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) && (_version <= 4)) {
+ if (((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST)) && (_version <= 4)) {
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
File::addDefaultDirectory(_gameDataPath + "ROOMS/");
File::addDefaultDirectory(_gameDataPath + "rooms/");
}
- if ((_features & GF_MACINTOSH) && (_version == 3)) {
+ if ((_platform == Common::kPlatformMacintosh) && (_version == 3)) {
// This is for the Mac version of Indy3/Loom
File::addDefaultDirectory(_gameDataPath + "Rooms 1/");
File::addDefaultDirectory(_gameDataPath + "Rooms 2/");
@@ -687,7 +687,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// We read data directly from NES ROM instead of extracting it with
// external tool
- if ((_features & GF_NES) && (_substResFileNameIndex || gs.detectFilename))
+ if ((_platform == Common::kPlatformNES) && (_substResFileNameIndex || gs.detectFilename))
_fileHandle = new ScummNESFile();
else
_fileHandle = new ScummFile();
@@ -1139,13 +1139,13 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_features |= GF_DEFAULT_TO_1X_SCALER;
}
- if (_features & GF_FMTOWNS && _version == 3) { // FM-TOWNS V3 games use 320x240
+ if (_platform == Common::kPlatformFMTowns && _version == 3) { // FM-TOWNS V3 games use 320x240
_screenWidth = 320;
_screenHeight = 240;
} else if (_features & GF_DEFAULT_TO_1X_SCALER) {
_screenWidth = 640;
_screenHeight = 480;
- } else if (_features & GF_NES) {
+ } else if (_platform == Common::kPlatformNES) {
_screenWidth = 256;
_screenHeight = 240;
} else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
@@ -1322,7 +1322,7 @@ int ScummEngine::init(GameDetector &detector) {
loadCJKFont();
// Create the charset renderer
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_charset = new CharsetRendererNES(this, _language);
else if (_version <= 2)
_charset = new CharsetRendererV2(this, _language);
@@ -1337,7 +1337,7 @@ int ScummEngine::init(GameDetector &detector) {
if (_features & GF_NEW_COSTUMES) {
_costumeRenderer = new AkosRenderer(this);
_costumeLoader = new AkosCostumeLoader(this);
- } else if (_features & GF_NES) {
+ } else if (_platform == Common::kPlatformNES) {
_costumeRenderer = new NESCostumeRenderer(this);
_costumeLoader = new NESCostumeLoader(this);
} else {
@@ -1413,7 +1413,7 @@ int ScummEngine::init(GameDetector &detector) {
// Since MM NES substitutes whole file class we get monster.sou file
// name badly generated, so avoid even attempts to open it
- if (!(_features & GF_NES))
+ if (!(_platform == Common::kPlatformNES))
_sound->setupSound();
// Create debugger
@@ -1429,7 +1429,7 @@ void ScummEngine::scummInit() {
_tempMusic = 0;
debug(9, "scummInit");
- if ((_gameId == GID_MANIAC) && (_version == 1) && !(_features & GF_NES)) {
+ if ((_gameId == GID_MANIAC) && (_version == 1) && !(_platform == Common::kPlatformNES)) {
initScreens(16, 152);
} else if (_version >= 7 || _heversion >= 71) {
initScreens(0, _screenHeight);
@@ -1448,7 +1448,7 @@ void ScummEngine::scummInit() {
// Original games used some kind of dynamic
// color table remapping between rooms
if (_gameId == GID_MANIAC) {
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
setupNESPalette();
else
setupV1ManiacPalette();
@@ -1477,7 +1477,7 @@ void ScummEngine::scummInit() {
break;
default:
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette();
else
setupEGAPalette();
@@ -1544,7 +1544,7 @@ void ScummEngine::scummInit() {
VAR(VAR_CAMERA_ACCEL_X) = 100;
VAR(VAR_CAMERA_ACCEL_Y) = 100;
} else if (!(_features & GF_NEW_CAMERA)) {
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
camera._leftTrigger = 6; // 6
camera._rightTrigger = 21; // 25
} else {
@@ -1596,7 +1596,7 @@ void ScummEngine::scummInit() {
clearDrawObjectQueue();
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
decodeNESBaseTiles();
for (i = 0; i < 6; i++) {
@@ -1624,7 +1624,7 @@ void ScummEngine::scummInit() {
void ScummEngine_v2::scummInit() {
ScummEngine::scummInit();
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
initNESMouseOver();
_switchRoomEffect2 = _switchRoomEffect = 6;
} else {
@@ -1714,13 +1714,13 @@ void ScummEngine::setupMusic(int midi) {
// Init iMuse
if (_features & GF_DIGI_IMUSE) {
_musicEngine = _imuseDigital = new IMuseDigital(this, 10);
- } else if (_features & GF_NES) {
+ } else if (_platform == Common::kPlatformNES) {
_musicEngine = new Player_NES(this);
- } else if ((_features & GF_AMIGA) && (_version == 2)) {
+ } else if ((_platform == Common::kPlatformAmiga) && (_version == 2)) {
_musicEngine = new Player_V2A(this);
- } else if ((_features & GF_AMIGA) && (_version == 3)) {
+ } else if ((_platform == Common::kPlatformAmiga) && (_version == 3)) {
_musicEngine = new Player_V3A(this);
- } else if ((_features & GF_AMIGA) && (_version < 5)) {
+ } else if ((_platform == Common::kPlatformAmiga) && (_version < 5)) {
_musicEngine = NULL;
} else if (_gameId == GID_MANIAC && (_version == 1)) {
_musicEngine = new Player_V1(this, _midiDriver != MD_PCSPK);
@@ -1902,7 +1902,7 @@ int ScummEngine::scummLoop(int delta) {
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
// Adjust mouse coordinates as narrow rooms in NES are centered
- if (_features & GF_NES && _NESStartStrip > 0) {
+ if (_platform == Common::kPlatformNES && _NESStartStrip > 0) {
VAR(VAR_VIRT_MOUSE_X) -= 2;
if (VAR(VAR_VIRT_MOUSE_X) < 0)
VAR(VAR_VIRT_MOUSE_X) = 0;
@@ -2003,11 +2003,11 @@ load_game:
memset(args, 0, sizeof(args));
args[0] = 2;
- if (_features & GF_MACINTOSH)
+ if (_platform == Common::kPlatformMacintosh)
value = 105;
else
value = (_gameId == GID_LOOM256) ? 150 : 100;
- byte restoreScript = (_features & GF_FMTOWNS) ? 17 : 18;
+ byte restoreScript = (_platform == Common::kPlatformFMTowns) ? 17 : 18;
// if verbs should be shown restore them
if (VAR(value) == 2)
runScript(restoreScript, 0, 0, args);
@@ -2397,7 +2397,7 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
} else if (g->heversion >= 60) {
strcpy(detectName, base);
strcat(detectName, ".he0");
- } else if (g->features & GF_NES) {
+ } else if (g->platform == Common::kPlatformNES) {
strcpy(detectName, base);
} else {
strcpy(detectName, base);
@@ -2692,7 +2692,6 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
if (substLastIndex > 0) {
if (substResFileNameTable[substLastIndex].genMethod == kGenMac ||
substResFileNameTable[substLastIndex].genMethod == kGenMacNoParens)
- game.features |= GF_MACINTOSH;
game.platform = Common::kPlatformMacintosh;
}
@@ -2728,35 +2727,9 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
// -> potentially might cause troubles with FM-Towns/amiga versions?
if (ConfMan.hasKey("platform"))
game.platform = Common::parsePlatform(ConfMan.get("platform"));
- else
- game.platform = Common::kPlatformPC;
- switch (game.platform) {
- case Common::kPlatformAmiga:
- game.features |= GF_AMIGA;
- break;
- case Common::kPlatformAtariST:
- game.features |= GF_ATARI_ST;
- break;
- case Common::kPlatformMacintosh:
- game.features |= GF_MACINTOSH;
- break;
- case Common::kPlatformNES:
- game.features |= GF_NES;
- break;
- case Common::kPlatformWindows:
- game.features |= GF_WINDOWS;
- break;
- case Common::kPlatformFMTowns:
- game.features |= GF_FMTOWNS;
- if (game.version == 3) {
- game.midi = MDT_TOWNS;
- }
- break;
- default:
- if (!(game.features & GF_FMTOWNS))
- game.features |= GF_PC;
- break;
+ if (game.platform == Common::kPlatformFMTowns && game.version == 3) {
+ game.midi = MDT_TOWNS;
}
// Special cases for HE games
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 016aa1d487..64b144e1a2 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -120,18 +120,8 @@ enum GameFeatures {
/** Games with multiple versions */
GF_MULTIPLE_VERSIONS = 1 << 13,
-#if 1
- // TODO: Remove this in favor of using _platform !
- GF_FMTOWNS = 1 << 14,
- GF_AMIGA = 1 << 15,
- GF_NES = 1 << 16,
- GF_ATARI_ST = 1 << 17,
- GF_MACINTOSH = 1 << 18,
- GF_PC = 1 << 19,
- GF_WINDOWS = 1 << 20,
-#endif
-
- GF_DEMO = 1 << 21
+ /** A demo, not a full blown game. */
+ GF_DEMO = 1 << 14
};
/* SCUMM Debug Channels */
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index d879a710f3..883cf43e2c 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -984,13 +984,13 @@ void SmushPlayer::setupAnim(const char *file) {
handleAnimHeader(*sub);
if (_insanity) {
- if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)))
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)))
readString("mineroad.trs");
} else
readString(file);
if (_vm->_gameId == GID_FT) {
- if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
+ if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))) {
_sf[0] = new SmushFont(true, false);
_sf[1] = new SmushFont(true, false);
_sf[2] = new SmushFont(true, false);
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 7b5592f310..0f8009f422 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -427,7 +427,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
memcpy(sound, ptr + 6, size);
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
}
- else if ((_vm->_features & GF_FMTOWNS && _vm->_version == 3) || READ_UINT32(ptr) == MKID('SOUN') || READ_UINT32(ptr) == MKID('TOWS')) {
+ else if ((_vm->_platform == Common::kPlatformFMTowns && _vm->_version == 3) || READ_UINT32(ptr) == MKID('SOUN') || READ_UINT32(ptr) == MKID('TOWS')) {
bool tows = READ_UINT32(ptr) == MKID('TOWS');
if (_vm->_version == 3) {
@@ -511,7 +511,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
break;
}
}
- else if ((_vm->_gameId == GID_LOOM) && (_vm->_features & GF_MACINTOSH)) {
+ else if ((_vm->_gameId == GID_LOOM) && (_vm->_platform == Common::kPlatformMacintosh)) {
// Mac version of Loom uses yet another sound format
/*
playSound #9 (room 70)
@@ -534,7 +534,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
000070: 01 18 5a 00 10 00 02 28 5f 00 01 00 00 00 00 00 |..Z....(_.......|
*/
}
- else if ((_vm->_features & GF_MACINTOSH) && (_vm->_gameId == GID_INDY3) && (ptr[26] == 0)) {
+ else if ((_vm->_platform == Common::kPlatformMacintosh) && (_vm->_gameId == GID_INDY3) && (ptr[26] == 0)) {
size = READ_BE_UINT16(ptr + 12);
rate = 3579545 / READ_BE_UINT16(ptr + 20);
sound = (char *)malloc(size);
@@ -545,9 +545,9 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
else {
if (_vm->_gameId == GID_MONKEY_VGA || _vm->_gameId == GID_MONKEY_EGA
- || (_vm->_gameId == GID_MONKEY && _vm->_features & GF_MACINTOSH)) {
+ || (_vm->_gameId == GID_MONKEY && _vm->_platform == Common::kPlatformMacintosh)) {
// Sound is currently not supported at all in the amiga versions of these games
- if (_vm->_features & GF_AMIGA) {
+ if (_vm->_platform == Common::kPlatformAmiga) {
int track = -1;
if (soundID == 50)
track = 17;
@@ -1133,7 +1133,7 @@ ScummFile *Sound::openSfxFile() {
}
if (!file->isOpen()) {
- if ((_vm->_heversion == 60 && _vm->_features & GF_MACINTOSH) || (_vm->_heversion >= 70)) {
+ if ((_vm->_heversion == 60 && _vm->_platform == Common::kPlatformMacintosh) || (_vm->_heversion >= 70)) {
sprintf(buf, "%s.he2", _vm->getGameName());
} else {
sprintf(buf, "%s.tlk", _vm->getGameName());
@@ -2203,7 +2203,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) {
debug(4, "readSoundResourceSmallHeader(%d)", idx);
- if ((_gameId == GID_LOOM) && (_features & GF_PC) && VAR(VAR_SOUNDCARD) == 4) {
+ if ((_gameId == GID_LOOM) && (_platform == Common::kPlatformPC) && VAR(VAR_SOUNDCARD) == 4) {
// Roland resources in Loom are tagless
// So we add an RO tag to allow imuse to detect format
byte *ptr, *src_ptr;
@@ -2223,7 +2223,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) {
wa_size = _fileHandle->readUint16LE();
_fileHandle->seek(wa_size - 2, SEEK_CUR);
- if (!(_features & GF_ATARI_ST || _features & GF_MACINTOSH)) {
+ if (!(_platform == Common::kPlatformAtariST || _platform == Common::kPlatformMacintosh)) {
ad_offs = _fileHandle->pos();
ad_size = _fileHandle->readUint16LE();
}
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 48af2b7a32..4778bdbe95 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -235,7 +235,7 @@ void ScummEngine::CHARSET_1() {
if (_charset->_center) {
_charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2;
}
- if (!(_features & GF_FMTOWNS) && _string[0].height) {
+ if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) {
_charset->_nextTop += _string[0].height;
} else {
_charset->_nextTop += _charset->getFontHeight();
@@ -505,7 +505,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
} else {
_charset->_left = _charset->_startLeft;
}
- if (!(_features & GF_FMTOWNS) && _string[0].height) {
+ if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) {
_charset->_nextTop += _string[0].height;
} else {
_charset->_top += fontHeight;
diff --git a/scumm/vars.cpp b/scumm/vars.cpp
index 46793a2053..b55325b7e1 100644
--- a/scumm/vars.cpp
+++ b/scumm/vars.cpp
@@ -541,7 +541,7 @@ void ScummEngine::initScummVars() {
case MD_ADLIB: VAR(VAR_SOUNDCARD) = 3; break;
default:
if ((_gameId == GID_MONKEY_EGA || _gameId == GID_MONKEY_VGA || _gameId == GID_LOOM)
- && (_features & GF_PC)) {
+ && (_platform == Common::kPlatformPC)) {
if (_gameId == GID_LOOM) {
char buf[50];
File f;
@@ -574,11 +574,11 @@ void ScummEngine::initScummVars() {
VAR(VAR_SOUNDPARAM3) = 0;
}
- if (_features & GF_FMTOWNS)
+ if (_platform == Common::kPlatformFMTowns)
VAR(VAR_VIDEOMODE) = 42;
- else if (_gameId == GID_INDY3 && (_features & GF_MACINTOSH))
+ else if (_gameId == GID_INDY3 && (_platform == Common::kPlatformMacintosh))
VAR(VAR_VIDEOMODE) = 50;
- else if (_gameId == GID_MONKEY2 && (_features & GF_AMIGA))
+ else if (_gameId == GID_MONKEY2 && (_platform == Common::kPlatformAmiga))
VAR(VAR_VIDEOMODE) = 82;
else if (_renderMode == Common::kRenderCGA)
VAR(VAR_VIDEOMODE) = 4;
@@ -591,7 +591,7 @@ void ScummEngine::initScummVars() {
VAR(VAR_CURRENTDRIVE) = 0;
if (_gameId == GID_LOOM && (_features & GF_OLD_BUNDLE)) {
- if (_features & GF_MACINTOSH) {
+ if (_platform == Common::kPlatformMacintosh) {
// This is the for the Mac version of Indy3/Loom
VAR(39) = 320;
} else {
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 3de3bd1542..a88a09bee7 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -40,7 +40,7 @@ void ScummEngine_v2::initV2MouseOver() {
int i;
int arrow_color, color, hi_color;
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
color = 0;
hi_color = 0;
arrow_color = 0;
@@ -225,7 +225,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
}
void ScummEngine::checkV2Inventory(int x, int y) {
- int inventoryArea = (_features & GF_NES) ? 48: 32;
+ int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
int object = 0;
y -= virtscr[kVerbVirtScreen].topline;
@@ -266,8 +266,8 @@ void ScummEngine::redrawV2Inventory() {
int i;
int max_inv;
Common::Rect inventoryBox;
- int inventoryArea = (_features & GF_NES) ? 48: 32;
- int maxChars = (_features & GF_NES) ? 13: 18;
+ int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
+ int maxChars = (_platform == Common::kPlatformNES) ? 13: 18;
v2_mouseover_box = -1;
@@ -314,7 +314,7 @@ void ScummEngine::redrawV2Inventory() {
_string[1].xpos = v2_mouseover_boxes[kInventoryUpArrow].rect.left;
_string[1].ypos = v2_mouseover_boxes[kInventoryUpArrow].rect.top + vs->topline;
_string[1].color = v2_mouseover_boxes[kInventoryUpArrow].color;
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
drawString(1, (const byte *)"\x7E");
else
drawString(1, (const byte *)" \1\2");
@@ -325,7 +325,7 @@ void ScummEngine::redrawV2Inventory() {
_string[1].xpos = v2_mouseover_boxes[kInventoryDownArrow].rect.left;
_string[1].ypos = v2_mouseover_boxes[kInventoryDownArrow].rect.top + vs->topline;
_string[1].color = v2_mouseover_boxes[kInventoryDownArrow].color;
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
drawString(1, (const byte *)"\x7F");
else
drawString(1, (const byte *)" \3\4");
@@ -395,7 +395,7 @@ void ScummEngine::checkExecVerbs() {
} else if (_mouseButStat & MBS_MOUSE_MASK) {
VirtScreen *zone = findVirtScreen(_mouse.y);
byte code = _mouseButStat & MBS_LEFT_CLICK ? 1 : 2;
- int inventoryArea = (_features & GF_NES) ? 48: 32;
+ int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
if (_version <= 2 && zone->number == 2 && _mouse.y <= zone->topline + 8) {
// Click into V2 sentence line