[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.343,1.344 charset.cpp,2.137,2.138 costume.cpp,1.179,1.180 cursor.cpp,2.35,2.36 gfx.cpp,2.434,2.435 input.cpp,2.24,2.25 object.cpp,1.230,1.231 resource.cpp,1.317,1.318 resource_v2.cpp,1.52,1.53 resource_v4.cpp,1.24,1.25 room.cpp,1.6,1.7 saveload.cpp,1.205,1.206 script.cpp,1.216,1.217 script_v2.cpp,2.273,2.274 script_v5.cpp,1.283,1.284 script_v6.cpp,1.434,1.435 script_v6he.cpp,2.155,2.156 scumm.cpp,1.445,1.446 scumm.h,1.591,1.592 sound.cpp,1.445,1.446 string.cpp,1.278,1.279 vars.cpp,1.123,1.124 verbs.cpp,1.128,1.129
Max Horn
fingolfin at users.sourceforge.net
Wed Apr 20 11:23:22 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/insane insane.cpp,1.56,1.57 insane_ben.cpp,1.23,1.24 insane_enemy.cpp,1.17,1.18 insane_iact.cpp,1.18,1.19 insane_scenes.cpp,1.26,1.27
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.116,1.117 scene.cpp,1.95,1.96
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29055
Modified Files:
actor.cpp charset.cpp costume.cpp cursor.cpp gfx.cpp input.cpp
object.cpp resource.cpp resource_v2.cpp resource_v4.cpp
room.cpp saveload.cpp script.cpp script_v2.cpp script_v5.cpp
script_v6.cpp script_v6he.cpp scumm.cpp scumm.h sound.cpp
string.cpp vars.cpp verbs.cpp
Log Message:
Replaced the platform specific GF_FOO switches (using _platform instead now)
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- actor.cpp 20 Apr 2005 01:33:40 -0000 1.343
+++ actor.cpp 20 Apr 2005 18:20:44 -0000 1.344
@@ -445,7 +445,7 @@
}
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::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 @@
// 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 @@
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 @@
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();
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.137
retrieving revision 2.138
diff -u -d -r2.137 -r2.138
--- charset.cpp 10 Apr 2005 12:58:55 -0000 2.137
+++ charset.cpp 20 Apr 2005 18:20:47 -0000 2.138
@@ -1163,7 +1163,7 @@
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 @@
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 @@
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;
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- costume.cpp 20 Apr 2005 01:33:41 -0000 1.179
+++ costume.cpp 20 Apr 2005 18:20:54 -0000 1.180
@@ -96,7 +96,7 @@
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
Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -d -r2.35 -r2.36
--- cursor.cpp 20 Apr 2005 03:13:04 -0000 2.35
+++ cursor.cpp 20 Apr 2005 18:20:55 -0000 2.36
@@ -119,7 +119,7 @@
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_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 @@
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 @@
*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;
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.434
retrieving revision 2.435
diff -u -d -r2.434 -r2.435
--- gfx.cpp 20 Apr 2005 01:33:41 -0000 2.434
+++ gfx.cpp 20 Apr 2005 18:20:55 -0000 2.435
@@ -195,7 +195,7 @@
_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::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 @@
}
}
- 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 @@
// 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 @@
_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 @@
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 @@
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);
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/input.cpp,v
retrieving revision 2.24
retrieving revision 2.25
diff -u -d -r2.24 -r2.25
--- input.cpp 17 Apr 2005 22:40:45 -0000 2.24
+++ input.cpp 20 Apr 2005 18:20:57 -0000 2.25
@@ -216,7 +216,7 @@
_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 @@
}
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 @@
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
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- object.cpp 20 Apr 2005 01:33:41 -0000 1.230
+++ object.cpp 20 Apr 2005 18:20:57 -0000 1.231
@@ -352,7 +352,7 @@
} 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 @@
byte flags = od.flags | Gdi::dbObjectMode;
if (_version == 1) {
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
gdi.decodeNESObject(ptr, xpos, ypos, width, height);
}
}
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -d -r1.317 -r1.318
--- resource.cpp 20 Apr 2005 01:33:42 -0000 1.317
+++ resource.cpp 20 Apr 2005 18:20:58 -0000 1.318
@@ -138,7 +138,7 @@
}
// 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 @@
_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 @@
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 @@
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
if ((_gameId == GID_FT) && (_features & GF_DEMO) &&
- (_features & GF_PC))
+ (_platform == Common::kPlatformPC))
_numGlobalScripts = 300;
else
_numGlobalScripts = 2000;
Index: resource_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- resource_v2.cpp 10 Apr 2005 12:58:56 -0000 1.52
+++ resource_v2.cpp 20 Apr 2005 18:20:59 -0000 1.53
@@ -35,13 +35,13 @@
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 @@
readClassicIndexFile();
break;
case 0x4643:
- if (!(_features & GF_NES))
+ if (!(_platform == Common::kPlatformNES))
error("Use maniac target");
printf("NES V1 game detected\n");
_version = 1;
Index: resource_v4.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v4.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- resource_v4.cpp 10 Apr 2005 13:16:49 -0000 1.24
+++ resource_v4.cpp 20 Apr 2005 18:21:00 -0000 1.25
@@ -121,7 +121,7 @@
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;
}
Index: room.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/room.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- room.cpp 17 Apr 2005 14:33:21 -0000 1.6
+++ room.cpp 20 Apr 2005 18:21:00 -0000 1.7
@@ -553,7 +553,7 @@
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;
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- saveload.cpp 10 Apr 2005 15:13:37 -0000 1.205
+++ saveload.cpp 20 Apr 2005 18:21:01 -0000 1.206
@@ -248,7 +248,7 @@
// 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 @@
break;
default:
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette();
else
setupEGAPalette();
@@ -753,7 +753,7 @@
}
}
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
if (savegameVersion < VER(47))
NES_loadCostumeSet(_NESCostumeSet = 0);
else
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- script.cpp 20 Apr 2005 01:42:55 -0000 1.216
+++ script.cpp 20 Apr 2005 18:21:01 -0000 1.217
@@ -524,12 +524,12 @@
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 @@
} 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 @@
_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;
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.273
retrieving revision 2.274
diff -u -d -r2.273 -r2.274
--- script_v2.cpp 10 Apr 2005 12:58:57 -0000 2.273
+++ script_v2.cpp 20 Apr 2005 18:21:02 -0000 2.274
@@ -414,7 +414,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
{ " ", " 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 @@
_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 @@
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 @@
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 @@
// 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 @@
clearDrawObjectQueue();
runInventoryScript(1);
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
_sound->addSoundToQueue(51); // play 'pickup' sound
}
@@ -1513,7 +1513,7 @@
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 @@
}
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 @@
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_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();
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -d -r1.283 -r1.284
--- script_v5.cpp 17 Apr 2005 22:37:16 -0000 1.283
+++ script_v5.cpp 20 Apr 2005 18:21:03 -0000 1.284
@@ -1099,7 +1099,7 @@
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 @@
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 @@
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 @@
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 @@
_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_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 @@
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_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 @@
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
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.434
retrieving revision 1.435
diff -u -d -r1.434 -r1.435
--- script_v6.cpp 20 Apr 2005 01:33:43 -0000 1.434
+++ script_v6.cpp 20 Apr 2005 18:21:04 -0000 1.435
@@ -2505,14 +2505,14 @@
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;
Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.155
retrieving revision 2.156
diff -u -d -r2.155 -r2.156
--- script_v6he.cpp 17 Apr 2005 12:55:42 -0000 2.155
+++ script_v6he.cpp 20 Apr 2005 18:21:05 -0000 2.156
@@ -1093,7 +1093,7 @@
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 @@
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) {
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -d -r1.445 -r1.446
--- scumm.cpp 20 Apr 2005 09:53:12 -0000 1.445
+++ scumm.cpp 20 Apr 2005 18:21:06 -0000 1.446
@@ -112,16 +112,16 @@
{"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 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
_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 @@
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 @@
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 @@
// 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 @@
_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 @@
// 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 @@
break;
default:
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ if ((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST))
setupAmigaPalette();
else
setupEGAPalette();
@@ -1544,7 +1544,7 @@
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 @@
clearDrawObjectQueue();
- if (_features & GF_NES)
+ if (_platform == Common::kPlatformNES)
decodeNESBaseTiles();
for (i = 0; i < 6; i++) {
@@ -1624,7 +1624,7 @@
void ScummEngine_v2::scummInit() {
ScummEngine::scummInit();
- if (_features & GF_NES) {
+ if (_platform == Common::kPlatformNES) {
initNESMouseOver();
_switchRoomEffect2 = _switchRoomEffect = 6;
} else {
@@ -1714,13 +1714,13 @@
// 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 @@
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 @@
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 @@
} 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 @@
if (substLastIndex > 0) {
if (substResFileNameTable[substLastIndex].genMethod == kGenMac ||
substResFileNameTable[substLastIndex].genMethod == kGenMacNoParens)
- game.features |= GF_MACINTOSH;
game.platform = Common::kPlatformMacintosh;
}
@@ -2728,35 +2727,9 @@
// -> 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
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.591
retrieving revision 1.592
diff -u -d -r1.591 -r1.592
--- scumm.h 20 Apr 2005 09:53:13 -0000 1.591
+++ scumm.h 20 Apr 2005 18:21:07 -0000 1.592
@@ -120,18 +120,8 @@
/** 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 */
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -d -r1.445 -r1.446
--- sound.cpp 20 Apr 2005 01:33:44 -0000 1.445
+++ sound.cpp 20 Apr 2005 18:21:08 -0000 1.446
@@ -427,7 +427,7 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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();
}
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -d -r1.278 -r1.279
--- string.cpp 13 Apr 2005 06:30:02 -0000 1.278
+++ string.cpp 20 Apr 2005 18:21:11 -0000 1.279
@@ -235,7 +235,7 @@
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 @@
} 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;
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- vars.cpp 20 Apr 2005 01:33:44 -0000 1.123
+++ vars.cpp 20 Apr 2005 18:21:12 -0000 1.124
@@ -541,7 +541,7 @@
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 @@
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 @@
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 {
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- verbs.cpp 16 Apr 2005 14:59:15 -0000 1.128
+++ verbs.cpp 20 Apr 2005 18:21:12 -0000 1.129
@@ -40,7 +40,7 @@
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::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 @@
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 @@
_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 @@
_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 @@
} 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
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/insane insane.cpp,1.56,1.57 insane_ben.cpp,1.23,1.24 insane_enemy.cpp,1.17,1.18 insane_iact.cpp,1.18,1.19 insane_scenes.cpp,1.26,1.27
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.116,1.117 scene.cpp,1.95,1.96
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list