Replaced the platform specific GF_FOO switches (using _platform instead now)

svn-id: r17716
This commit is contained in:
Max Horn 2005-04-20 18:21:30 +00:00
parent a18d4d5c2f
commit c46ea8bc40
29 changed files with 165 additions and 202 deletions

View file

@ -445,7 +445,7 @@ void Actor::setupActorScale() {
} }
void Actor::startAnimActor(int f) { 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) { switch (f) {
case 1001: case 1001:
f = _initFrame; f = _initFrame;
@ -512,7 +512,7 @@ void Actor::startAnimActor(int f) {
void Actor::animateActor(int anim) { void Actor::animateActor(int anim) {
int cmd, dir; 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) if (anim == 0xFF)
anim = 2000; anim = 2000;
@ -825,14 +825,14 @@ void Actor::showActor() {
// an internal variable. Emulate this to prevent overwriting script vars... // an internal variable. Emulate this to prevent overwriting script vars...
// Maniac NES (V1), however, DOES have a ScummVar for VAR_TALK_ACTOR // Maniac NES (V1), however, DOES have a ScummVar for VAR_TALK_ACTOR
int ScummEngine::getTalkingActor() { int ScummEngine::getTalkingActor() {
if (_gameId == GID_MANIAC && _version == 1 && !(_features & GF_NES)) if (_gameId == GID_MANIAC && _version == 1 && !(_platform == Common::kPlatformNES))
return _V1TalkingActor; return _V1TalkingActor;
else else
return VAR(VAR_TALK_ACTOR); return VAR(VAR_TALK_ACTOR);
} }
void ScummEngine::setTalkingActor(int value) { 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; _V1TalkingActor = value;
else else
VAR(VAR_TALK_ACTOR) = value; VAR(VAR_TALK_ACTOR) = value;
@ -1041,7 +1041,7 @@ void Actor::drawActorCostume(bool hitTestMode) {
bcr->_actorX = _pos.x + _offsX - _vm->virtscr[0].xstart; bcr->_actorX = _pos.x + _offsX - _vm->virtscr[0].xstart;
bcr->_actorY = _pos.y + _offsY - _elevation; 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, // In the NES version, when the actor is facing right,
// we need to shift it 8 pixels to the left // we need to shift it 8 pixels to the left
if (_facing == 90) if (_facing == 90)
@ -1315,7 +1315,7 @@ void ScummEngine::actorTalk(const byte *msg) {
if (_heversion >= 72 || getTalkingActor() > 0x7F) { if (_heversion >= 72 || getTalkingActor() > 0x7F) {
_charsetColor = (byte)_string[0].color; _charsetColor = (byte)_string[0].color;
} else if (_features & GF_NES) { } else if (_platform == Common::kPlatformNES) {
if (_NES_lastTalkingActor != getTalkingActor()) if (_NES_lastTalkingActor != getTalkingActor())
_NES_talkColor ^= 1; _NES_talkColor ^= 1;
_NES_lastTalkingActor = getTalkingActor(); _NES_lastTalkingActor = getTalkingActor();

View file

@ -1163,7 +1163,7 @@ int CharsetRendererV3::getCharWidth(byte chr) {
void CharsetRendererV3::setColor(byte color) void CharsetRendererV3::setColor(byte color)
{ {
_color = 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 // FM-TOWNS version of Loom uses old colour method as well
if ((_vm->_version >= 2) && (_vm->_features & GF_16COLOR || _vm->_gameId == GID_LOOM)) { if ((_vm->_version >= 2) && (_vm->_features & GF_16COLOR || _vm->_gameId == GID_LOOM)) {
_dropShadow = ((_color & 0xF0) != 0); _dropShadow = ((_color & 0xF0) != 0);
@ -1306,7 +1306,7 @@ void CharsetRendererClassic::printChar(int chr) {
int type = *_fontPtr; int type = *_fontPtr;
if (is2byte) { if (is2byte) {
_dropShadow = true; _dropShadow = true;
_shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0; _shadowColor = (_vm->_platform == Common::kPlatformFMTowns) ? 8 : 0;
charPtr = _vm->get2byteCharPtr(chr); charPtr = _vm->get2byteCharPtr(chr);
width = _vm->_2byteWidth; width = _vm->_2byteWidth;
height = _vm->_2byteHeight; height = _vm->_2byteHeight;
@ -1500,7 +1500,7 @@ void CharsetRendererClassic::drawChar(int chr, const Graphics::Surface &s, int x
if (is2byte) { if (is2byte) {
_dropShadow = true; _dropShadow = true;
_shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0; _shadowColor = (_vm->_platform == Common::kPlatformFMTowns) ? 8 : 0;
charPtr = _vm->get2byteCharPtr(chr); charPtr = _vm->get2byteCharPtr(chr);
width = _vm->_2byteWidth; width = _vm->_2byteWidth;
height = _vm->_2byteHeight; height = _vm->_2byteHeight;

View file

@ -96,7 +96,7 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
const int scaletableSize = 128; 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 CHECK_HEAP

View file

@ -119,7 +119,7 @@ void ScummEngine_v6::setCursorTransparency(int a) {
void ScummEngine::updateCursor() { void ScummEngine::updateCursor() {
_system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height, _system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
_cursor.hotspotX, _cursor.hotspotY, _cursor.hotspotX, _cursor.hotspotY,
(_features & GF_NES ? _grabbedCursor[63] : 255), (_platform == Common::kPlatformNES ? _grabbedCursor[63] : 255),
(_heversion == 70 ? 2 : 1)); (_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) { 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); _macResExtractor->setCursor(img);
else else
_win32ResExtractor->setCursor(img); _win32ResExtractor->setCursor(img);
@ -382,7 +382,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
else else
color = default_cursor_colors[idx]; color = default_cursor_colors[idx];
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
_cursor.width = 8; _cursor.width = 8;
_cursor.height = 8; _cursor.height = 8;
_cursor.hotspotX = 0; _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)]; *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.width = 15;
_cursor.height = 15; _cursor.height = 15;
_cursor.hotspotX = 7; _cursor.hotspotX = 7;

View file

@ -195,7 +195,7 @@ Gdi::Gdi(ScummEngine *vm) {
_vm = vm; _vm = vm;
_roomPalette = vm->_roomPalette; _roomPalette = vm->_roomPalette;
_roomStrips = 0; _roomStrips = 0;
if ((vm->_features & GF_AMIGA) && (vm->_version >= 4)) if ((vm->_platform == Common::kPlatformAmiga) && (vm->_version >= 4))
_roomPalette += 16; _roomPalette += 16;
} }
@ -225,7 +225,7 @@ void Gdi::init() {
void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs) { void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs) {
if (_vm->_version == 1) { if (_vm->_version == 1) {
if (_vm->_features & GF_NES) { if (_vm->_platform == Common::kPlatformNES) {
decodeNESGfx(roomptr); decodeNESGfx(roomptr);
} else { } else {
for (int i = 0; i < 4; i++){ 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; adj = 16;
initVirtScreen(kUnkVirtScreen, 0, 0, _screenWidth, adj, false, false); 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 // NES can address negative number strips and that poses problem for
// our code. So instead adding zillions of fixes and potentially break // our code. So instead adding zillions of fixes and potentially break
// other games we shift it right on rendering stage // 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; 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; _objectMode = (flag & dbObjectMode) == dbObjectMode;
if (_objectMode && _vm->_version == 1) { if (_objectMode && _vm->_version == 1) {
if (_vm->_features & GF_NES) { if (_vm->_platform == Common::kPlatformNES) {
// TODO: Maybe call decodeNESObject here? // TODO: Maybe call decodeNESObject here?
} else { } else {
decodeC64Gfx(ptr, _C64.objectMap, (width / 8) * (height / 8) * 3); 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; dstPtr = (byte *)vs->pixels + y * vs->pitch + x * 8;
if (_vm->_version == 1) { if (_vm->_version == 1) {
if (_vm->_features & GF_NES) { if (_vm->_platform == Common::kPlatformNES) {
mask_ptr = getMaskBuffer(x, y, 0); mask_ptr = getMaskBuffer(x, y, 0);
drawStripNES(dstPtr, mask_ptr, vs->pitch, stripnr, y, height); 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) { if (_vm->_version == 1) {
mask_ptr = getMaskBuffer(x, y, 1); mask_ptr = getMaskBuffer(x, y, 1);
if (_vm->_features & GF_NES) { if (_vm->_platform == Common::kPlatformNES) {
drawStripNESMask(mask_ptr, stripnr, height); drawStripNESMask(mask_ptr, stripnr, height);
} else { } else {
drawStripC64Mask(mask_ptr, stripnr, width, height); drawStripC64Mask(mask_ptr, stripnr, width, height);

View file

@ -216,7 +216,7 @@ void ScummEngine::processKbd(bool smushMode) {
_lastKeyHit = _keyPressed; _lastKeyHit = _keyPressed;
_keyPressed = 0; _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) // Convert F-Keys for V1/V2 games (they start at 1 instead of at 315)
_lastKeyHit -= 314; _lastKeyHit -= 314;
} }
@ -374,7 +374,7 @@ void ScummEngine::processKbd(bool smushMode) {
} }
if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY) || 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(); confirmRestartDialog();
return; return;
} }
@ -392,7 +392,7 @@ void ScummEngine::processKbd(bool smushMode) {
return; return;
} }
if ((_version <= 2) || (_features & GF_FMTOWNS && _version == 3)) if ((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3))
saveloadkey = 5; // F5 saveloadkey = 5; // F5
else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI) || (_heversion >= 72)) else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI) || (_heversion >= 72))
saveloadkey = 319; // F5 saveloadkey = 319; // F5

View file

@ -54,7 +54,7 @@ Insane::Insane(ScummEngine_v6 *scumm) {
initvars(); 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("roadrash.rip", &_smush_roadrashRip);
readFileToMem("roadrsh2.rip", &_smush_roadrsh2Rip); readFileToMem("roadrsh2.rip", &_smush_roadrsh2Rip);
readFileToMem("roadrsh3.rip", &_smush_roadrsh3Rip); readFileToMem("roadrsh3.rip", &_smush_roadrsh3Rip);
@ -178,7 +178,7 @@ void Insane::initvars(void) {
_iactBits[i] = 0; _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", init_enemyStruct(EN_ROTT1, EN_ROTT1, 0, 0, 160, 0, INV_MACE, 63, "endcrshr.san",
25, 15, 16, 26, 11, 3); 25, 15, 16, 26, 11, 3);
} else { } else {
@ -633,7 +633,7 @@ void Insane::putActors(void) {
void Insane::readState(void) { // PATCH 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_CHAIN] = 0;
_actor[0].inventory[INV_CHAINSAW] = 0; _actor[0].inventory[INV_CHAINSAW] = 0;
_actor[0].inventory[INV_MACE] = 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); 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; return;
_actor[0].defunct = arg_4; _actor[0].defunct = arg_4;
@ -892,7 +892,7 @@ int32 Insane::weaponDamage(int32 actornum) {
} }
void Insane::reinitActors(void) { 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, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13)); smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12)); 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) { 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; return;
// if (shut_flag) // if (shut_flag)
@ -1290,7 +1290,7 @@ void Insane::procSKIP(Chunk &b) {
int16 par1, par2; int16 par1, par2;
_player->_skipNext = false; _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); _player->checkBlock(b, TYPE_SKIP, 2);
par1 = b.getWord(); par1 = b.getWord();
if (isBitSet(par1)) if (isBitSet(par1))

View file

@ -124,7 +124,7 @@ int32 Insane::actionBen(void) {
bool doDamage = false; bool doDamage = false;
int sound; int sound;
if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC))
sound = 59; sound = 59;
else else
sound = 95; sound = 95;
@ -565,7 +565,7 @@ void Insane::actor02Reaction(int32 buttons) {
if (_actor[0].act[2].frame == 2) { if (_actor[0].act[2].frame == 2) {
if (_currEnemy != EN_CAVEFISH) { if (_currEnemy != EN_CAVEFISH) {
tmp = calcEnemyDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(50); smlayer_startSfx(50);
} else { } else {
@ -888,7 +888,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_2X4: case INV_2X4:
case INV_BOOT: case INV_BOOT:
tmp = calcEnemyDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(52); smlayer_startSfx(52);
if (tmp == 1000) if (tmp == 1000)
@ -1013,7 +1013,7 @@ void Insane::actor02Reaction(int32 buttons) {
smlayer_setActorFacing(0, 2, 19, 180); smlayer_setActorFacing(0, 2, 19, 180);
_actor[0].act[2].state = 27; _actor[0].act[2].state = 27;
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt); _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); smlayer_startSfx(72);
break; break;
case 27: case 27:
@ -1056,7 +1056,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_BOOT: case INV_BOOT:
case INV_DUST: case INV_DUST:
tmp = calcEnemyDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(58); smlayer_startSfx(58);
if (tmp == 1000) if (tmp == 1000)
@ -1175,7 +1175,7 @@ void Insane::actor02Reaction(int32 buttons) {
case 36: case 36:
smlayer_setActorLayer(0, 2, 5); smlayer_setActorLayer(0, 2, 5);
_actor[0].kicking = false; _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)); smlayer_setActorCostume(0, 2, readArray(17));
else else
smlayer_setActorCostume(0, 2, readArray(18)); smlayer_setActorCostume(0, 2, readArray(18));
@ -1221,7 +1221,7 @@ void Insane::actor02Reaction(int32 buttons) {
case EN_ROTT1: case EN_ROTT1:
case EN_ROTT2: case EN_ROTT2:
case EN_ROTT3: 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); queueSceneSwitch(9, 0, "bencrshe.san", 64, 0, 0, 0);
else else
queueSceneSwitch(9, 0, "wr2_benr.san", 64, 0, 0, 0); queueSceneSwitch(9, 0, "wr2_benr.san", 64, 0, 0, 0);
@ -1922,7 +1922,7 @@ void Insane::switchBenWeapon(void) {
_actor[0].act[2].state = 34; _actor[0].act[2].state = 34;
break; break;
case INV_WRENCH: 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)); smlayer_setActorCostume(0, 2, readArray(24));
else else
smlayer_setActorCostume(0, 2, readArray(25)); smlayer_setActorCostume(0, 2, readArray(25));
@ -1933,7 +1933,7 @@ void Insane::switchBenWeapon(void) {
case INV_BOOT: case INV_BOOT:
case INV_HAND: case INV_HAND:
case INV_DUST: 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)); smlayer_setActorCostume(0, 2, readArray(11));
else else
smlayer_setActorCostume(0, 2, readArray(12)); smlayer_setActorCostume(0, 2, readArray(12));
@ -1984,7 +1984,7 @@ int32 Insane::setBenState(void) {
void Insane::ouchSoundBen(void) { void Insane::ouchSoundBen(void) {
_actor[0].act[3].state = 52; _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); smlayer_startVoice(54);
return; return;
} }

View file

@ -1265,7 +1265,7 @@ void Insane::ouchSoundEnemy(void) {
_actor[1].act[3].state = 52; _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); smlayer_startVoice(55);
return; return;
} }
@ -1699,7 +1699,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].weaponClass = 1; _actor[1].weaponClass = 1;
if (_actor[1].act[2].frame >= 6) { if (_actor[1].act[2].frame >= 6) {
tmp = calcBenDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(50); smlayer_startSfx(50);
} else if (tmp == 1) } else if (tmp == 1)
@ -1871,7 +1871,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorFacing(1, 2, 19, 180); smlayer_setActorFacing(1, 2, 19, 180);
_actor[1].act[2].state = 19; _actor[1].act[2].state = 19;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt); _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); smlayer_startSfx(69);
if (!_actor[1].field_54) { if (!_actor[1].field_54) {
tmp = _vm->_rnd.getRandomNumber(4); tmp = _vm->_rnd.getRandomNumber(4);
@ -1935,7 +1935,7 @@ void Insane::actor12Reaction(int32 buttons) {
case INV_2X4: case INV_2X4:
case INV_BOOT: case INV_BOOT:
tmp = calcBenDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(52); smlayer_startSfx(52);
else if (tmp == 1000) else if (tmp == 1000)
@ -2053,7 +2053,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = true; _actor[1].kicking = true;
if (_actor[1].act[2].frame >= 3) { if (_actor[1].act[2].frame >= 3) {
tmp = calcBenDamage(1, 1); 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) if (tmp == 1)
smlayer_startSfx(57); smlayer_startSfx(57);
} else if (tmp == 1) } else if (tmp == 1)
@ -2109,7 +2109,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorLayer(1, 2, 25); smlayer_setActorLayer(1, 2, 25);
_actor[1].act[2].state = 37; _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); smlayer_startSfx(96);
switch (_currEnemy) { switch (_currEnemy) {
case EN_ROTT1: case EN_ROTT1:

View file

@ -323,7 +323,7 @@ void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
int32 setupsan13, Chunk &b, int32 size, int32 flags) { int32 setupsan13, Chunk &b, int32 size, int32 flags) {
_player->checkBlock(b, TYPE_IACT, 8); _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; return;
int16 par1, par2, par3, par4, par5; int16 par1, par2, par3, par4, par5;

View file

@ -67,14 +67,14 @@ void Insane::runScene(int arraynum) {
break; break;
case 2: case 2:
setupValues(); 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)); smlayer_setActorCostume(0, 2, readArray(10));
else else
smlayer_setActorCostume(0, 2, readArray(11)); smlayer_setActorCostume(0, 2, readArray(11));
smlayer_putActor(0, 2, _actor[0].x, _actor[0].y1 + 190, _smlayer_room2); smlayer_putActor(0, 2, _actor[0].x, _actor[0].y1 + 190, _smlayer_room2);
_mainRoadPos = readArray(2); _mainRoadPos = readArray(2);
if ((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC)) { if ((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)) {
initScene(5); initScene(5);
startVideo("tovista.san", 1, 32, 12, 0); startVideo("tovista.san", 1, 32, 12, 0);
} else if (_mainRoadPos == _posBrokenTruck) { } else if (_mainRoadPos == _posBrokenTruck) {
@ -141,7 +141,7 @@ void Insane::runScene(int arraynum) {
_insaneIsRunning = false; _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(50, _actor[0].inventory[INV_CHAIN]);
writeArray(51, _actor[0].inventory[INV_CHAINSAW]); writeArray(51, _actor[0].inventory[INV_CHAINSAW]);
writeArray(52, _actor[0].inventory[INV_MACE]); writeArray(52, _actor[0].inventory[INV_MACE]);
@ -238,7 +238,7 @@ void Insane::stopSceneSounds(int sceneId) {
_actor[1].defunct = 0; _actor[1].defunct = 0;
_actor[1].scenePropSubIdx = 0; _actor[1].scenePropSubIdx = 0;
_actor[1].field_54 = 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(59);
smlayer_stopSound(63); smlayer_stopSound(63);
} else { } else {
@ -314,7 +314,7 @@ void Insane::shutCurrentScene(void) {
// insane_loadSceneData1 & insane_loadSceneData2 // insane_loadSceneData1 & insane_loadSceneData2
int Insane::loadSceneData(int scene, int flag, int phase) { 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; return 1;
int retvalue = 1; int retvalue = 1;
@ -648,7 +648,7 @@ void Insane::setSceneCostumes(int sceneId) {
case 4: case 4:
case 5: case 5:
case 6: 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)); smlayer_setActorCostume(0, 2, readArray(10));
else else
smlayer_setActorCostume(0, 2, readArray(11)); smlayer_setActorCostume(0, 2, readArray(11));
@ -668,7 +668,7 @@ void Insane::setEnemyCostumes(void) {
debugC(DEBUG_INSANE, "setEnemyCostumes(%d)", _currEnemy); 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, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13)); smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12)); 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, void Insane::postCase3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
int32 setupsan13, int32 curFrame, int32 maxFrame) { 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); turnBen(false);
else else
turnBen(true); turnBen(true);

View file

@ -352,7 +352,7 @@ int ScummEngine::findObject(int x, int y) {
} while ((_objs[b].state & mask) == a); } 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)) (v2_mouseover_box < 4))
return findInventory(VAR(VAR_EGO), v2_mouseover_box + _inventoryOffset + 1); 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; byte flags = od.flags | Gdi::dbObjectMode;
if (_version == 1) { if (_version == 1) {
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
gdi.decodeNESObject(ptr, xpos, ypos, width, height); gdi.decodeNESObject(ptr, xpos, ypos, width, height);
} }
} }

View file

@ -138,7 +138,7 @@ void ScummEngine::openRoom(const int room) {
} }
// If we have substitute // If we have substitute
if (_substResFileNameIndex > 0 && !(_features & GF_NES)) { if (_substResFileNameIndex > 0 && !(_platform == Common::kPlatformNES)) {
char tmpBuf[128]; char tmpBuf[128];
generateSubstResFileName(buf, tmpBuf, sizeof(tmpBuf)); generateSubstResFileName(buf, tmpBuf, sizeof(tmpBuf));
@ -646,7 +646,7 @@ int ScummEngine::loadResource(int type, int idx) {
_fileHandle->seek(fileOffs + _fileOffset, SEEK_SET); _fileHandle->seek(fileOffs + _fileOffset, SEEK_SET);
if (_features & GF_OLD_BUNDLE) { 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); return readSoundResourceSmallHeader(type, idx);
} else { } else {
size = _fileHandle->readUint16LE(); size = _fileHandle->readUint16LE();
@ -658,7 +658,7 @@ int ScummEngine::loadResource(int type, int idx) {
size = _fileHandle->readUint32LE(); size = _fileHandle->readUint32LE();
tag = _fileHandle->readUint16LE(); tag = _fileHandle->readUint16LE();
_fileHandle->seek(-6, SEEK_CUR); _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); return readSoundResourceSmallHeader(type, idx);
} }
} else { } else {
@ -1073,7 +1073,7 @@ void ScummEngine_v7::readMAXS(int blockSize) {
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
if ((_gameId == GID_FT) && (_features & GF_DEMO) && if ((_gameId == GID_FT) && (_features & GF_DEMO) &&
(_features & GF_PC)) (_platform == Common::kPlatformPC))
_numGlobalScripts = 300; _numGlobalScripts = 300;
else else
_numGlobalScripts = 2000; _numGlobalScripts = 2000;

View file

@ -35,13 +35,13 @@ void ScummEngine_v2::readClassicIndexFile() {
int i; int i;
if (_gameId == GID_MANIAC) { if (_gameId == GID_MANIAC) {
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_numGlobalObjects = 775; _numGlobalObjects = 775;
else else
_numGlobalObjects = 800; _numGlobalObjects = 800;
_numRooms = 55; _numRooms = 55;
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
// costumes 25-36 are special. see v1MMNEScostTables[] in costume.cpp // costumes 25-36 are special. see v1MMNEScostTables[] in costume.cpp
// costumes 37-76 are room graphics resources // costumes 37-76 are room graphics resources
// costume 77 is a character set translation table // costume 77 is a character set translation table
@ -169,7 +169,7 @@ void ScummEngine_v2::readIndexFile() {
readClassicIndexFile(); readClassicIndexFile();
break; break;
case 0x4643: case 0x4643:
if (!(_features & GF_NES)) if (!(_platform == Common::kPlatformNES))
error("Use maniac target"); error("Use maniac target");
printf("NES V1 game detected\n"); printf("NES V1 game detected\n");
_version = 1; _version = 1;

View file

@ -121,7 +121,7 @@ void ScummEngine_v4::readIndexFile() {
default: default:
// FIXME: this is a little hack because Indy3 FM-TOWNS has // FIXME: this is a little hack because Indy3 FM-TOWNS has
// 32 extra bytes of unknown meaning appended to 00.LFL // 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); error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
return; return;
} }

View file

@ -553,7 +553,7 @@ void ScummEngine_v3old::initRoomSubBlocks() {
rmhd = (const RoomHeader *)(roomptr + 4); rmhd = (const RoomHeader *)(roomptr + 4);
if (_version == 1) { if (_version == 1) {
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
_roomWidth = READ_LE_UINT16(&(rmhd->old.width)) * 8; _roomWidth = READ_LE_UINT16(&(rmhd->old.width)) * 8;
_roomHeight = READ_LE_UINT16(&(rmhd->old.height)) * 8; _roomHeight = READ_LE_UINT16(&(rmhd->old.height)) * 8;

View file

@ -248,7 +248,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
// ever add options for using different 16-colour palettes. // ever add options for using different 16-colour palettes.
if (_version == 1) { if (_version == 1) {
if (_gameId == GID_MANIAC) if (_gameId == GID_MANIAC)
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
setupNESPalette(); setupNESPalette();
else else
setupV1ManiacPalette(); setupV1ManiacPalette();
@ -274,7 +274,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
break; break;
default: default:
if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette(); setupAmigaPalette();
else else
setupEGAPalette(); setupEGAPalette();
@ -753,7 +753,7 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
} }
} }
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
if (savegameVersion < VER(47)) if (savegameVersion < VER(47))
NES_loadCostumeSet(_NESCostumeSet = 0); NES_loadCostumeSet(_NESCostumeSet = 0);
else else

View file

@ -524,12 +524,12 @@ int ScummEngine::readVar(uint var) {
return _roomVars[var]; return _roomVars[var];
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) || } 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; int bit = var & 0xF;
var = (var >> 4) & 0xFF; var = (var >> 4) & 0xFF;
if (!_copyProtection) { 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; return 0;
} else if (_gameId == GID_ZAK256 && var == 151 && bit == 8) { } else if (_gameId == GID_ZAK256 && var == 151 && bit == 8) {
return 0; return 0;
@ -541,7 +541,7 @@ int ScummEngine::readVar(uint var) {
} else { } else {
var &= 0x7FFF; var &= 0x7FFF;
if (!_copyProtection) { if (!_copyProtection) {
if (_gameId == GID_INDY3 && (_features & GF_FMTOWNS) && var == 1508) if (_gameId == GID_INDY3 && (_platform == Common::kPlatformFMTowns) && var == 1508)
return 0; return 0;
} }
@ -607,7 +607,7 @@ void ScummEngine::writeVar(uint var, int value) {
_roomVars[var] = value; _roomVars[var] = value;
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) || } 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 // In the old games, the bit variables were using the same memory
// as the normal variables! // as the normal variables!
int bit = var & 0xF; int bit = var & 0xF;

View file

@ -414,7 +414,7 @@ void ScummEngine_v2::decodeParseString() {
int textSlot = 0; int textSlot = 0;
_string[textSlot].xpos = 0; _string[textSlot].xpos = 0;
_string[textSlot].ypos = 0; _string[textSlot].ypos = 0;
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_string[textSlot].right = 256; _string[textSlot].right = 256;
else else
_string[textSlot].right = 320; _string[textSlot].right = 320;
@ -524,7 +524,7 @@ void ScummEngine_v2::o2_setObjPreposition() {
int obj = getVarOrDirectWord(PARAM_1); int obj = getVarOrDirectWord(PARAM_1);
int unk = fetchScriptByte(); int unk = fetchScriptByte();
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
return; return;
if (whereIsObject(obj) != WIO_NOT_FOUND) { if (whereIsObject(obj) != WIO_NOT_FOUND) {
@ -825,7 +825,7 @@ void ScummEngine_v2::o2_verbOps() {
slot = getVarOrDirectByte(PARAM_1) + 1; slot = getVarOrDirectByte(PARAM_1) + 1;
int prep = fetchScriptByte(); // Only used in V1? int prep = fetchScriptByte(); // Only used in V1?
// V1 Maniac verbs are relative to the 'verb area' - under the sentence // V1 Maniac verbs are relative to the 'verb area' - under the sentence
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
x += 8; x += 8;
else if ((_gameId == GID_MANIAC) && (_version == 1)) else if ((_gameId == GID_MANIAC) && (_version == 1))
y += 8; y += 8;
@ -838,7 +838,7 @@ void ScummEngine_v2::o2_verbOps() {
vs = &_verbs[slot]; vs = &_verbs[slot];
vs->verbid = verb; vs->verbid = verb;
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
vs->color = 1; vs->color = 1;
vs->hicolor = 1; vs->hicolor = 1;
vs->dimcolor = 1; vs->dimcolor = 1;
@ -981,7 +981,7 @@ void ScummEngine_v2::o2_drawSentence() {
const byte *temp; const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0); 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; return;
if (getResourceAddress(rtVerb, slot)) if (getResourceAddress(rtVerb, slot))
@ -998,7 +998,7 @@ void ScummEngine_v2::o2_drawSentence() {
// For V1 games, the engine must compute the preposition. // For V1 games, the engine must compute the preposition.
// In all other Scumm versions, this is done by the sentence script. // 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) { if (_verbs[slot].prep == 0xFF) {
byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1)); byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1));
assert(ptr); assert(ptr);
@ -1026,7 +1026,7 @@ void ScummEngine_v2::o2_drawSentence() {
{ " ", " in", " with", " on", " to" } // Korean { " ", " in", " with", " on", " to" } // Korean
}; };
int lang = (_language <= 8) ? _language : 0; // Default to english 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)); strcat(sentence, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
} else } else
strcat(sentence, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]); strcat(sentence, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]);
@ -1043,7 +1043,7 @@ void ScummEngine_v2::o2_drawSentence() {
_string[2].charset = 1; _string[2].charset = 1;
_string[2].ypos = virtscr[2].topline; _string[2].ypos = virtscr[2].topline;
_string[2].xpos = 0; _string[2].xpos = 0;
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
_string[2].xpos = 16; _string[2].xpos = 16;
_string[2].color = 0; _string[2].color = 0;
} else if (_version == 1) } else if (_version == 1)
@ -1065,7 +1065,7 @@ void ScummEngine_v2::o2_drawSentence() {
ptr++; 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.top = virtscr[2].topline;
sentenceline.bottom = virtscr[2].topline + 16; sentenceline.bottom = virtscr[2].topline + 16;
sentenceline.left = 16; sentenceline.left = 16;
@ -1292,7 +1292,7 @@ void ScummEngine_v2::o2_lights() {
c = fetchScriptByte(); c = fetchScriptByte();
if (c == 0) { 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 // Convert older light mode values into
// equivalent values.of later games // equivalent values.of later games
// 0 Darkness // 0 Darkness
@ -1448,7 +1448,7 @@ void ScummEngine_v2::o2_endCutscene() {
// Reset user state to values before cutscene // Reset user state to values before cutscene
setUserState(vm.cutSceneData[0] | 7); 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]; camera._mode = (byte) vm.cutSceneData[3];
if (camera._mode == kFollowActorCameraMode) { if (camera._mode == kFollowActorCameraMode) {
actorFollowCamera(VAR(VAR_EGO)); actorFollowCamera(VAR(VAR_EGO));
@ -1496,7 +1496,7 @@ void ScummEngine_v2::o2_pickupObject() {
clearDrawObjectQueue(); clearDrawObjectQueue();
runInventoryScript(1); runInventoryScript(1);
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_sound->addSoundToQueue(51); // play 'pickup' sound _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) { void ScummEngine_v2::setUserState(byte state) {
if (state & 4) { // Userface if (state & 4) { // Userface
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_userState = (_userState & ~0xE0) | (state & 0xE0); _userState = (_userState & ~0xE0) | (state & 0xE0);
else else
_userState = state & (32 | 64 | 128); _userState = state & (32 | 64 | 128);
@ -1527,7 +1527,7 @@ void ScummEngine_v2::setUserState(byte state) {
} }
if (state & 2) { // Cursor Show/Hide if (state & 2) { // Cursor Show/Hide
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_userState = (_userState & ~0x10) | (state & 0x10); _userState = (_userState & ~0x10) | (state & 0x10);
if (state & 16) { if (state & 16) {
_userPut = 1; _userPut = 1;
@ -1542,7 +1542,7 @@ void ScummEngine_v2::setUserState(byte state) {
Common::Rect rect; Common::Rect rect;
rect.top = virtscr[2].topline; rect.top = virtscr[2].topline;
rect.bottom = virtscr[2].topline + 8 * 88; rect.bottom = virtscr[2].topline + 8 * 88;
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
rect.left = 16; rect.left = 16;
rect.right = 255; rect.right = 255;
} else { } else {
@ -1572,7 +1572,7 @@ void ScummEngine_v2::o2_dummy() {
void ScummEngine_v2::o2_switchCostumeSet() { void ScummEngine_v2::o2_switchCostumeSet() {
// NES version of maniac uses this to switch between the two // NES version of maniac uses this to switch between the two
// groups of costumes it has // groups of costumes it has
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
NES_loadCostumeSet(fetchScriptByte()); NES_loadCostumeSet(fetchScriptByte());
else else
o2_dummy(); o2_dummy();

View file

@ -1099,7 +1099,7 @@ void ScummEngine_v5::o5_getActorX() {
int a; int a;
getResultPos(); getResultPos();
if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh))
a = getVarOrDirectByte(PARAM_1); a = getVarOrDirectByte(PARAM_1);
else else
a = getVarOrDirectWord(PARAM_1); a = getVarOrDirectWord(PARAM_1);
@ -1111,7 +1111,7 @@ void ScummEngine_v5::o5_getActorY() {
int a; int a;
getResultPos(); getResultPos();
if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) { if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh)) {
a = getVarOrDirectByte(PARAM_1); a = getVarOrDirectByte(PARAM_1);
// WORKAROUND bug #636433 (can't get into Zeppelin) // WORKAROUND bug #636433 (can't get into Zeppelin)
@ -1138,7 +1138,7 @@ void ScummEngine_v5::o5_saveLoadGame() {
slot = 1; slot = 1;
if (a == 1) if (a == 1)
_opcode = 0x40; _opcode = 0x40;
else if ((a == 2) || (_features & GF_NES)) else if ((a == 2) || (_platform == Common::kPlatformNES))
_opcode = 0x80; _opcode = 0x80;
} else { } else {
_opcode = a & 0xE0; _opcode = a & 0xE0;
@ -1407,7 +1407,7 @@ void ScummEngine_v5::o5_lessOrEqual() {
int16 b = getVarOrDirectWord(PARAM_1); int16 b = getVarOrDirectWord(PARAM_1);
// WORKAROUND bug #820507 : Work around a bug in Indy3Town. // 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) && (vm.slot[_currentScript].number == 200 || vm.slot[_currentScript].number == 203) &&
_currentRoom == 70 && b == -256) { _currentRoom == 70 && b == -256) {
o5_jumpRelative(); o5_jumpRelative();
@ -1698,7 +1698,7 @@ void ScummEngine_v5::o5_resourceRoutines() {
_opcode = fetchScriptByte(); _opcode = fetchScriptByte();
if (_opcode != 17) if (_opcode != 17)
resid = getVarOrDirectByte(PARAM_1); 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 // 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 // check will ever be triggered, but then I could be wrong and it's better
// to play it safe. // to play it safe.
@ -2106,7 +2106,7 @@ void ScummEngine_v5::o5_setVarRange() {
} }
void ScummEngine_v5::o5_startMusic() { 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. // 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). // See also bug #762589 (thanks to Hibernatus for providing the information).
getResultPos(); getResultPos();
@ -2348,7 +2348,7 @@ void ScummEngine_v5::o5_verbOps() {
vs->curRect.left = getVarOrDirectWord(PARAM_1); vs->curRect.left = getVarOrDirectWord(PARAM_1);
vs->curRect.top = getVarOrDirectWord(PARAM_2); vs->curRect.top = getVarOrDirectWord(PARAM_2);
// Macintosh verison of indy3ega used different interface, so adjust values. // 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)) { if ((verb > 0) && (verb < 14) || (verb > 31) && (verb < 35)) {
switch (verb) { switch (verb) {
case 1: case 1:
@ -2482,7 +2482,7 @@ void ScummEngine_v5::o5_verbOps() {
void ScummEngine_v5::o5_wait() { void ScummEngine_v5::o5_wait() {
const byte *oldaddr = _scriptPointer - 1; const byte *oldaddr = _scriptPointer - 1;
if ((_gameId == GID_INDY3) && !(_features & GF_MACINTOSH)) { if ((_gameId == GID_INDY3) && !(_platform == Common::kPlatformMacintosh)) {
_opcode = 2; _opcode = 2;
} else } else
_opcode = fetchScriptByte(); _opcode = fetchScriptByte();
@ -2745,7 +2745,7 @@ void ScummEngine_v5::o5_oldRoomEffect() {
a = getVarOrDirectWord(PARAM_1); a = getVarOrDirectWord(PARAM_1);
#if 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, // 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 // 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 // some stubs here, but somebody with a full IDA or more knowledge

View file

@ -2505,14 +2505,14 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
SmushPlayer *sp = new SmushPlayer(this, speed); SmushPlayer *sp = new SmushPlayer(this, speed);
// Correct incorrect smush filename in Macintosh FT demo // 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)) (strcmp((char *)getStringAddressVar(VAR_VIDEONAME), "jumpgorge.san") == 0))
sp->play("jumpgorg.san"); sp->play("jumpgorg.san");
else else
sp->play((char *)getStringAddressVar(VAR_VIDEONAME)); sp->play((char *)getStringAddressVar(VAR_VIDEONAME));
delete sp; delete sp;
} else if (_gameId == GID_FT) { } 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; ? 232 : 233;
_insaneRunning = true; _insaneRunning = true;

View file

@ -1093,7 +1093,7 @@ void ScummEngine_v60he::o60_readFile() {
int val; int val;
// Fatty Bear uses positive values // Fatty Bear uses positive values
if ((_features & GF_PC) && (_gameId == GID_FBEAR)) if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
size = -size; size = -size;
if (size == -2) { if (size == -2) {
@ -1121,7 +1121,7 @@ void ScummEngine_v60he::o60_writeFile() {
int slot = pop(); int slot = pop();
// Fatty Bear uses positive values // Fatty Bear uses positive values
if ((_features & GF_PC) && (_gameId == GID_FBEAR)) if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
size = -size; size = -size;
if (size == -2) { if (size == -2) {

View file

@ -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, {"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}, 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, {"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, {"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}, 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, {"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, {"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}, 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, {"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 */ /* Scumm Version 4 */
{"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, 0, 13, MDT_PCSPK | MDT_ADLIB | MDT_NATIVE, {"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 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, {"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, {"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, {"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}, 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}, GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
{"d8d07efcb88f396bee0b402b10c3b1c9", "Maniac Mansion (NES E)", GID_MANIAC, 1, 0, 25, MDT_NONE, {"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, {"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, {"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, {"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, {"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}, 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 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, {"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, {"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, {"0b3222aaa7efcf283eb621e0cefd26cc", "Putt-Putt Joins The Parade (early version)", GID_HEGAME, 6, 0, 13, MDT_ADLIB | MDT_NATIVE,
GF_USE_KEY, Common::kPlatformUnknown, 0, 0}, GF_USE_KEY, Common::kPlatformUnknown, 0, 0},
{"6a30a07f353a75cdc602db27d73e1b42", "Putt-Putt Joins The Parade (Windows)", GID_HEGAME, 6, 70, 13, MDT_NONE, {"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, {"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}, 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); printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
// Add default file directories. // 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 // This is for the Amiga version of Indy3/Loom/Maniac/Zak
File::addDefaultDirectory(_gameDataPath + "ROOMS/"); File::addDefaultDirectory(_gameDataPath + "ROOMS/");
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 // This is for the Mac version of Indy3/Loom
File::addDefaultDirectory(_gameDataPath + "Rooms 1/"); File::addDefaultDirectory(_gameDataPath + "Rooms 1/");
File::addDefaultDirectory(_gameDataPath + "Rooms 2/"); 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 // We read data directly from NES ROM instead of extracting it with
// external tool // external tool
if ((_features & GF_NES) && (_substResFileNameIndex || gs.detectFilename)) if ((_platform == Common::kPlatformNES) && (_substResFileNameIndex || gs.detectFilename))
_fileHandle = new ScummNESFile(); _fileHandle = new ScummNESFile();
else else
_fileHandle = new ScummFile(); _fileHandle = new ScummFile();
@ -1139,13 +1139,13 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_features |= GF_DEFAULT_TO_1X_SCALER; _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; _screenWidth = 320;
_screenHeight = 240; _screenHeight = 240;
} else if (_features & GF_DEFAULT_TO_1X_SCALER) { } else if (_features & GF_DEFAULT_TO_1X_SCALER) {
_screenWidth = 640; _screenWidth = 640;
_screenHeight = 480; _screenHeight = 480;
} else if (_features & GF_NES) { } else if (_platform == Common::kPlatformNES) {
_screenWidth = 256; _screenWidth = 256;
_screenHeight = 240; _screenHeight = 240;
} else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { } else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
@ -1322,7 +1322,7 @@ int ScummEngine::init(GameDetector &detector) {
loadCJKFont(); loadCJKFont();
// Create the charset renderer // Create the charset renderer
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
_charset = new CharsetRendererNES(this, _language); _charset = new CharsetRendererNES(this, _language);
else if (_version <= 2) else if (_version <= 2)
_charset = new CharsetRendererV2(this, _language); _charset = new CharsetRendererV2(this, _language);
@ -1337,7 +1337,7 @@ int ScummEngine::init(GameDetector &detector) {
if (_features & GF_NEW_COSTUMES) { if (_features & GF_NEW_COSTUMES) {
_costumeRenderer = new AkosRenderer(this); _costumeRenderer = new AkosRenderer(this);
_costumeLoader = new AkosCostumeLoader(this); _costumeLoader = new AkosCostumeLoader(this);
} else if (_features & GF_NES) { } else if (_platform == Common::kPlatformNES) {
_costumeRenderer = new NESCostumeRenderer(this); _costumeRenderer = new NESCostumeRenderer(this);
_costumeLoader = new NESCostumeLoader(this); _costumeLoader = new NESCostumeLoader(this);
} else { } else {
@ -1413,7 +1413,7 @@ int ScummEngine::init(GameDetector &detector) {
// Since MM NES substitutes whole file class we get monster.sou file // Since MM NES substitutes whole file class we get monster.sou file
// name badly generated, so avoid even attempts to open it // name badly generated, so avoid even attempts to open it
if (!(_features & GF_NES)) if (!(_platform == Common::kPlatformNES))
_sound->setupSound(); _sound->setupSound();
// Create debugger // Create debugger
@ -1429,7 +1429,7 @@ void ScummEngine::scummInit() {
_tempMusic = 0; _tempMusic = 0;
debug(9, "scummInit"); debug(9, "scummInit");
if ((_gameId == GID_MANIAC) && (_version == 1) && !(_features & GF_NES)) { if ((_gameId == GID_MANIAC) && (_version == 1) && !(_platform == Common::kPlatformNES)) {
initScreens(16, 152); initScreens(16, 152);
} else if (_version >= 7 || _heversion >= 71) { } else if (_version >= 7 || _heversion >= 71) {
initScreens(0, _screenHeight); initScreens(0, _screenHeight);
@ -1448,7 +1448,7 @@ void ScummEngine::scummInit() {
// Original games used some kind of dynamic // Original games used some kind of dynamic
// color table remapping between rooms // color table remapping between rooms
if (_gameId == GID_MANIAC) { if (_gameId == GID_MANIAC) {
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
setupNESPalette(); setupNESPalette();
else else
setupV1ManiacPalette(); setupV1ManiacPalette();
@ -1477,7 +1477,7 @@ void ScummEngine::scummInit() {
break; break;
default: default:
if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette(); setupAmigaPalette();
else else
setupEGAPalette(); setupEGAPalette();
@ -1544,7 +1544,7 @@ void ScummEngine::scummInit() {
VAR(VAR_CAMERA_ACCEL_X) = 100; VAR(VAR_CAMERA_ACCEL_X) = 100;
VAR(VAR_CAMERA_ACCEL_Y) = 100; VAR(VAR_CAMERA_ACCEL_Y) = 100;
} else if (!(_features & GF_NEW_CAMERA)) { } else if (!(_features & GF_NEW_CAMERA)) {
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
camera._leftTrigger = 6; // 6 camera._leftTrigger = 6; // 6
camera._rightTrigger = 21; // 25 camera._rightTrigger = 21; // 25
} else { } else {
@ -1596,7 +1596,7 @@ void ScummEngine::scummInit() {
clearDrawObjectQueue(); clearDrawObjectQueue();
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
decodeNESBaseTiles(); decodeNESBaseTiles();
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
@ -1624,7 +1624,7 @@ void ScummEngine::scummInit() {
void ScummEngine_v2::scummInit() { void ScummEngine_v2::scummInit() {
ScummEngine::scummInit(); ScummEngine::scummInit();
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
initNESMouseOver(); initNESMouseOver();
_switchRoomEffect2 = _switchRoomEffect = 6; _switchRoomEffect2 = _switchRoomEffect = 6;
} else { } else {
@ -1714,13 +1714,13 @@ void ScummEngine::setupMusic(int midi) {
// Init iMuse // Init iMuse
if (_features & GF_DIGI_IMUSE) { if (_features & GF_DIGI_IMUSE) {
_musicEngine = _imuseDigital = new IMuseDigital(this, 10); _musicEngine = _imuseDigital = new IMuseDigital(this, 10);
} else if (_features & GF_NES) { } else if (_platform == Common::kPlatformNES) {
_musicEngine = new Player_NES(this); _musicEngine = new Player_NES(this);
} else if ((_features & GF_AMIGA) && (_version == 2)) { } else if ((_platform == Common::kPlatformAmiga) && (_version == 2)) {
_musicEngine = new Player_V2A(this); _musicEngine = new Player_V2A(this);
} else if ((_features & GF_AMIGA) && (_version == 3)) { } else if ((_platform == Common::kPlatformAmiga) && (_version == 3)) {
_musicEngine = new Player_V3A(this); _musicEngine = new Player_V3A(this);
} else if ((_features & GF_AMIGA) && (_version < 5)) { } else if ((_platform == Common::kPlatformAmiga) && (_version < 5)) {
_musicEngine = NULL; _musicEngine = NULL;
} else if (_gameId == GID_MANIAC && (_version == 1)) { } else if (_gameId == GID_MANIAC && (_version == 1)) {
_musicEngine = new Player_V1(this, _midiDriver != MD_PCSPK); _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; VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
// Adjust mouse coordinates as narrow rooms in NES are centered // 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; VAR(VAR_VIRT_MOUSE_X) -= 2;
if (VAR(VAR_VIRT_MOUSE_X) < 0) if (VAR(VAR_VIRT_MOUSE_X) < 0)
VAR(VAR_VIRT_MOUSE_X) = 0; VAR(VAR_VIRT_MOUSE_X) = 0;
@ -2003,11 +2003,11 @@ load_game:
memset(args, 0, sizeof(args)); memset(args, 0, sizeof(args));
args[0] = 2; args[0] = 2;
if (_features & GF_MACINTOSH) if (_platform == Common::kPlatformMacintosh)
value = 105; value = 105;
else else
value = (_gameId == GID_LOOM256) ? 150 : 100; 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 verbs should be shown restore them
if (VAR(value) == 2) if (VAR(value) == 2)
runScript(restoreScript, 0, 0, args); runScript(restoreScript, 0, 0, args);
@ -2397,7 +2397,7 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
} else if (g->heversion >= 60) { } else if (g->heversion >= 60) {
strcpy(detectName, base); strcpy(detectName, base);
strcat(detectName, ".he0"); strcat(detectName, ".he0");
} else if (g->features & GF_NES) { } else if (g->platform == Common::kPlatformNES) {
strcpy(detectName, base); strcpy(detectName, base);
} else { } else {
strcpy(detectName, base); strcpy(detectName, base);
@ -2692,7 +2692,6 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
if (substLastIndex > 0) { if (substLastIndex > 0) {
if (substResFileNameTable[substLastIndex].genMethod == kGenMac || if (substResFileNameTable[substLastIndex].genMethod == kGenMac ||
substResFileNameTable[substLastIndex].genMethod == kGenMacNoParens) substResFileNameTable[substLastIndex].genMethod == kGenMacNoParens)
game.features |= GF_MACINTOSH;
game.platform = Common::kPlatformMacintosh; 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? // -> potentially might cause troubles with FM-Towns/amiga versions?
if (ConfMan.hasKey("platform")) if (ConfMan.hasKey("platform"))
game.platform = Common::parsePlatform(ConfMan.get("platform")); game.platform = Common::parsePlatform(ConfMan.get("platform"));
else
game.platform = Common::kPlatformPC;
switch (game.platform) { if (game.platform == Common::kPlatformFMTowns && game.version == 3) {
case Common::kPlatformAmiga: game.midi = MDT_TOWNS;
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;
} }
// Special cases for HE games // Special cases for HE games

View file

@ -120,18 +120,8 @@ enum GameFeatures {
/** Games with multiple versions */ /** Games with multiple versions */
GF_MULTIPLE_VERSIONS = 1 << 13, GF_MULTIPLE_VERSIONS = 1 << 13,
#if 1 /** A demo, not a full blown game. */
// TODO: Remove this in favor of using _platform ! GF_DEMO = 1 << 14
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
}; };
/* SCUMM Debug Channels */ /* SCUMM Debug Channels */

View file

@ -984,13 +984,13 @@ void SmushPlayer::setupAnim(const char *file) {
handleAnimHeader(*sub); handleAnimHeader(*sub);
if (_insanity) { if (_insanity) {
if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) if (!((_vm->_features & GF_DEMO) && (_vm->_platform == Common::kPlatformPC)))
readString("mineroad.trs"); readString("mineroad.trs");
} else } else
readString(file); readString(file);
if (_vm->_gameId == GID_FT) { 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[0] = new SmushFont(true, false);
_sf[1] = new SmushFont(true, false); _sf[1] = new SmushFont(true, false);
_sf[2] = new SmushFont(true, false); _sf[2] = new SmushFont(true, false);

View file

@ -427,7 +427,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
memcpy(sound, ptr + 6, size); memcpy(sound, ptr + 6, size);
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID); _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'); bool tows = READ_UINT32(ptr) == MKID('TOWS');
if (_vm->_version == 3) { if (_vm->_version == 3) {
@ -511,7 +511,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
break; 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 // Mac version of Loom uses yet another sound format
/* /*
playSound #9 (room 70) 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....(_.......| 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); size = READ_BE_UINT16(ptr + 12);
rate = 3579545 / READ_BE_UINT16(ptr + 20); rate = 3579545 / READ_BE_UINT16(ptr + 20);
sound = (char *)malloc(size); sound = (char *)malloc(size);
@ -545,9 +545,9 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
else { else {
if (_vm->_gameId == GID_MONKEY_VGA || _vm->_gameId == GID_MONKEY_EGA 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 // 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; int track = -1;
if (soundID == 50) if (soundID == 50)
track = 17; track = 17;
@ -1133,7 +1133,7 @@ ScummFile *Sound::openSfxFile() {
} }
if (!file->isOpen()) { 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()); sprintf(buf, "%s.he2", _vm->getGameName());
} else { } else {
sprintf(buf, "%s.tlk", _vm->getGameName()); sprintf(buf, "%s.tlk", _vm->getGameName());
@ -2203,7 +2203,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) {
debug(4, "readSoundResourceSmallHeader(%d)", 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 // Roland resources in Loom are tagless
// So we add an RO tag to allow imuse to detect format // So we add an RO tag to allow imuse to detect format
byte *ptr, *src_ptr; byte *ptr, *src_ptr;
@ -2223,7 +2223,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) {
wa_size = _fileHandle->readUint16LE(); wa_size = _fileHandle->readUint16LE();
_fileHandle->seek(wa_size - 2, SEEK_CUR); _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_offs = _fileHandle->pos();
ad_size = _fileHandle->readUint16LE(); ad_size = _fileHandle->readUint16LE();
} }

View file

@ -235,7 +235,7 @@ void ScummEngine::CHARSET_1() {
if (_charset->_center) { if (_charset->_center) {
_charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2; _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; _charset->_nextTop += _string[0].height;
} else { } else {
_charset->_nextTop += _charset->getFontHeight(); _charset->_nextTop += _charset->getFontHeight();
@ -505,7 +505,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
} else { } else {
_charset->_left = _charset->_startLeft; _charset->_left = _charset->_startLeft;
} }
if (!(_features & GF_FMTOWNS) && _string[0].height) { if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) {
_charset->_nextTop += _string[0].height; _charset->_nextTop += _string[0].height;
} else { } else {
_charset->_top += fontHeight; _charset->_top += fontHeight;

View file

@ -541,7 +541,7 @@ void ScummEngine::initScummVars() {
case MD_ADLIB: VAR(VAR_SOUNDCARD) = 3; break; case MD_ADLIB: VAR(VAR_SOUNDCARD) = 3; break;
default: default:
if ((_gameId == GID_MONKEY_EGA || _gameId == GID_MONKEY_VGA || _gameId == GID_LOOM) if ((_gameId == GID_MONKEY_EGA || _gameId == GID_MONKEY_VGA || _gameId == GID_LOOM)
&& (_features & GF_PC)) { && (_platform == Common::kPlatformPC)) {
if (_gameId == GID_LOOM) { if (_gameId == GID_LOOM) {
char buf[50]; char buf[50];
File f; File f;
@ -574,11 +574,11 @@ void ScummEngine::initScummVars() {
VAR(VAR_SOUNDPARAM3) = 0; VAR(VAR_SOUNDPARAM3) = 0;
} }
if (_features & GF_FMTOWNS) if (_platform == Common::kPlatformFMTowns)
VAR(VAR_VIDEOMODE) = 42; VAR(VAR_VIDEOMODE) = 42;
else if (_gameId == GID_INDY3 && (_features & GF_MACINTOSH)) else if (_gameId == GID_INDY3 && (_platform == Common::kPlatformMacintosh))
VAR(VAR_VIDEOMODE) = 50; VAR(VAR_VIDEOMODE) = 50;
else if (_gameId == GID_MONKEY2 && (_features & GF_AMIGA)) else if (_gameId == GID_MONKEY2 && (_platform == Common::kPlatformAmiga))
VAR(VAR_VIDEOMODE) = 82; VAR(VAR_VIDEOMODE) = 82;
else if (_renderMode == Common::kRenderCGA) else if (_renderMode == Common::kRenderCGA)
VAR(VAR_VIDEOMODE) = 4; VAR(VAR_VIDEOMODE) = 4;
@ -591,7 +591,7 @@ void ScummEngine::initScummVars() {
VAR(VAR_CURRENTDRIVE) = 0; VAR(VAR_CURRENTDRIVE) = 0;
if (_gameId == GID_LOOM && (_features & GF_OLD_BUNDLE)) { 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 // This is the for the Mac version of Indy3/Loom
VAR(39) = 320; VAR(39) = 320;
} else { } else {

View file

@ -40,7 +40,7 @@ void ScummEngine_v2::initV2MouseOver() {
int i; int i;
int arrow_color, color, hi_color; int arrow_color, color, hi_color;
if (_features & GF_NES) { if (_platform == Common::kPlatformNES) {
color = 0; color = 0;
hi_color = 0; hi_color = 0;
arrow_color = 0; arrow_color = 0;
@ -225,7 +225,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
} }
void ScummEngine::checkV2Inventory(int x, int y) { void ScummEngine::checkV2Inventory(int x, int y) {
int inventoryArea = (_features & GF_NES) ? 48: 32; int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
int object = 0; int object = 0;
y -= virtscr[kVerbVirtScreen].topline; y -= virtscr[kVerbVirtScreen].topline;
@ -266,8 +266,8 @@ void ScummEngine::redrawV2Inventory() {
int i; int i;
int max_inv; int max_inv;
Common::Rect inventoryBox; Common::Rect inventoryBox;
int inventoryArea = (_features & GF_NES) ? 48: 32; int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
int maxChars = (_features & GF_NES) ? 13: 18; int maxChars = (_platform == Common::kPlatformNES) ? 13: 18;
v2_mouseover_box = -1; v2_mouseover_box = -1;
@ -314,7 +314,7 @@ void ScummEngine::redrawV2Inventory() {
_string[1].xpos = v2_mouseover_boxes[kInventoryUpArrow].rect.left; _string[1].xpos = v2_mouseover_boxes[kInventoryUpArrow].rect.left;
_string[1].ypos = v2_mouseover_boxes[kInventoryUpArrow].rect.top + vs->topline; _string[1].ypos = v2_mouseover_boxes[kInventoryUpArrow].rect.top + vs->topline;
_string[1].color = v2_mouseover_boxes[kInventoryUpArrow].color; _string[1].color = v2_mouseover_boxes[kInventoryUpArrow].color;
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
drawString(1, (const byte *)"\x7E"); drawString(1, (const byte *)"\x7E");
else else
drawString(1, (const byte *)" \1\2"); drawString(1, (const byte *)" \1\2");
@ -325,7 +325,7 @@ void ScummEngine::redrawV2Inventory() {
_string[1].xpos = v2_mouseover_boxes[kInventoryDownArrow].rect.left; _string[1].xpos = v2_mouseover_boxes[kInventoryDownArrow].rect.left;
_string[1].ypos = v2_mouseover_boxes[kInventoryDownArrow].rect.top + vs->topline; _string[1].ypos = v2_mouseover_boxes[kInventoryDownArrow].rect.top + vs->topline;
_string[1].color = v2_mouseover_boxes[kInventoryDownArrow].color; _string[1].color = v2_mouseover_boxes[kInventoryDownArrow].color;
if (_features & GF_NES) if (_platform == Common::kPlatformNES)
drawString(1, (const byte *)"\x7F"); drawString(1, (const byte *)"\x7F");
else else
drawString(1, (const byte *)" \3\4"); drawString(1, (const byte *)" \3\4");
@ -395,7 +395,7 @@ void ScummEngine::checkExecVerbs() {
} else if (_mouseButStat & MBS_MOUSE_MASK) { } else if (_mouseButStat & MBS_MOUSE_MASK) {
VirtScreen *zone = findVirtScreen(_mouse.y); VirtScreen *zone = findVirtScreen(_mouse.y);
byte code = _mouseButStat & MBS_LEFT_CLICK ? 1 : 2; 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) { if (_version <= 2 && zone->number == 2 && _mouse.y <= zone->topline + 8) {
// Click into V2 sentence line // Click into V2 sentence line