aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2003-08-06 09:10:19 +0000
committerTravis Howell2003-08-06 09:10:19 +0000
commite4e9538038a59cb2d47c61fcfb762d02b2abfb8c (patch)
treee0570ed96e29fca774e783b8f9a3f57f58cf9e09 /scumm
parent8b3ac82f358e7066070f0f19a2118fd9fc0bdd08 (diff)
downloadscummvm-rg350-e4e9538038a59cb2d47c61fcfb762d02b2abfb8c.tar.gz
scummvm-rg350-e4e9538038a59cb2d47c61fcfb762d02b2abfb8c.tar.bz2
scummvm-rg350-e4e9538038a59cb2d47c61fcfb762d02b2abfb8c.zip
Add GF_INDY3 feature flag for indy3 games to reduce checks
Remove GF_ADLIB_DEFAULT since it is no longer used svn-id: r9546
Diffstat (limited to 'scumm')
-rw-r--r--scumm/boxes.cpp3
-rw-r--r--scumm/script_v5.cpp13
-rw-r--r--scumm/scumm.h10
-rw-r--r--scumm/scummvm.cpp58
4 files changed, 41 insertions, 43 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index f46c68d6a5..0342288832 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -657,8 +657,7 @@ int Scumm::getPathToDestBox(byte from, byte to) {
// case to fix the scene in Indy3 where Indy meets Hitler in Berlin.
// It's one of the places (or maybe even the only one?). See bug #770690
// and also bug #774783.
- if ((_gameId == GID_INDY3 || _gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256)
- && _roomResource == 46 && from == 1 && to == 0)
+ if ((_features & GF_INDY3) && _roomResource == 46 && from == 1 && to == 0)
return 1;
// Skip up to the matrix data for box 'from'
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index d3ffe9d09c..5449ea64c0 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -597,8 +597,7 @@ void Scumm_v5::o5_chainScript() {
// called via chainScript by script 32, and in there Local[5] is defined
// to the actor ID of the opposing soldier. So, we copy that value over
// to the Local[5] variable of script 33.
- if ((_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3)
- && vm.slot[cur].number == 32 && script == 33) {
+ if ((_features & GF_INDY3) && vm.slot[cur].number == 32 && script == 33) {
vars[5] = vm.localvar[cur][5];
}
@@ -967,7 +966,7 @@ void Scumm_v5::o5_getActorScale() {
return;
// INDY3 uses this opcode as a wait_for_actor();
- if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3) {
+ if (_features & GF_INDY3) {
const byte *oldaddr = _scriptPointer - 1;
a = derefActor(getVarOrDirectByte(0x80), "o5_getActorScale (wait)");
if (a->moving) {
@@ -1001,7 +1000,7 @@ void Scumm_v5::o5_getActorX() {
int a;
getResultPos();
- if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3)
+ if (_features & GF_INDY3)
a = getVarOrDirectByte(0x80);
else
a = getVarOrDirectWord(0x80);
@@ -1013,7 +1012,7 @@ void Scumm_v5::o5_getActorY() {
int a;
getResultPos();
- if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3) {
+ if (_features & GF_INDY3) {
a = getVarOrDirectByte(0x80);
// WORKAROUND bug #636433 (can't get into Zeppelin)
@@ -2350,7 +2349,7 @@ void Scumm_v5::o5_verbOps() {
void Scumm_v5::o5_wait() {
const byte *oldaddr = _scriptPointer - 1;
- if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3) {
+ if (_features & GF_INDY3) {
_opcode = 2;
} else
_opcode = fetchScriptByte();
@@ -2594,7 +2593,7 @@ void Scumm_v5::decodeParseString() {
// It's also needed for Loom, or the lines Bobbin
// speaks during the intro are put at position 0,0.
// In addition, Loom needs to remember the text colour.
- if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) {
+ if ((_features & GF_INDY3) || _gameId == GID_LOOM) {
_string[textSlot].t_xpos = _string[textSlot].xpos;
_string[textSlot].t_ypos = _string[textSlot].ypos;
_string[textSlot].t_color = _string[textSlot].color;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 3698794e12..f048a5339b 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -80,11 +80,11 @@ enum GameFeatures {
GF_OLD256 = 1 << 10,
GF_AUDIOTRACKS = 1 << 11,
GF_NO_SCALING = 1 << 12,
- GF_ADLIB_DEFAULT = 1 << 13,
- GF_AMIGA = 1 << 14,
- GF_HUMONGOUS = 1 << 15,
- GF_AFTER_HEV7 = 1 << 16,
- GF_FMTOWNS = 1 << 17,
+ GF_AMIGA = 1 << 13,
+ GF_HUMONGOUS = 1 << 14,
+ GF_AFTER_HEV7 = 1 << 15,
+ GF_FMTOWNS = 1 << 16,
+ GF_INDY3 = 1 << 17,
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER
};
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 387f5fb4f4..dacd9e5429 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -74,11 +74,11 @@ static const VersionSettings scumm_settings[] = {
/* Scumm Version 3 */
{"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"},
+ GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_INDY3, "00.LFL"},
{"indy3Towns", "Indiana Jones and the Last Crusade (FM Towns)", GID_INDY3_TOWNS, 3, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
+ GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_INDY3 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_ADLIB_DEFAULT, "00.LFL"},
+ GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_INDY3, "00.LFL"},
{"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"loom", "Loom", GID_LOOM, 3, VersionSettings::ADLIB_ALWAYS,
@@ -86,65 +86,65 @@ static const VersionSettings scumm_settings[] = {
/* Scumm Version 4 */
{"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR, "000.LFL"},
{"pass", "Passport to Adventure", GID_MONKEY_EGA, 4, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR, "000.LFL"},
/* Scumm version 5 */
{"monkeyVGA", "Monkey Island 1 (256 color Floppy version)", GID_MONKEY_VGA, 4, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_USE_KEY | GF_ADLIB_DEFAULT, "000.LFL"},
+ GF_SMALL_HEADER | GF_USE_KEY, "000.LFL"},
{"loomcd", "Loom (256 color CD version)", GID_LOOM256, 4, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, "000.LFL"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_AUDIOTRACKS, "000.LFL"},
{"monkey", "Monkey Island 1", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY | GF_AUDIOTRACKS, 0},
{"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY | GF_AUDIOTRACKS, 0},
{"game", "Monkey Island 1 (SegaCD version)", GID_MONKEY_SEGA, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY | GF_AUDIOTRACKS, 0},
{"monkey2", "Monkey Island 2: LeChuck's revenge", GID_MONKEY2, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
{"mi2demo", "Monkey Island 2: LeChuck's revenge (Demo)", GID_MONKEY2, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
{"indydemo", "Indiana Jones and the Fate of Atlantis (FM Towns Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
{"atlantis", "Indiana Jones and the Fate of Atlantis", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
{"playfate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
{"fate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED,
- GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_USE_KEY, 0},
/* Scumm Version 6 */
{"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS, 0},
{"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"funpack", "Putt-Putt's Fun Pack", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"fbpack", "Fatty Bear's Fun Pack", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"fbear", "Fatty Bear's Birthday Surprise (DOS)", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_PUTTPUTT, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, VersionSettings::ADLIB_PREFERRED,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_NEW_OPCODES | GF_USE_KEY, 0},
{"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, VersionSettings::ADLIB_PREFERRED,
- GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT, 0},
+ GF_NEW_OPCODES | GF_USE_KEY, 0},
{"samnmax", "Sam & Max", GID_SAMNMAX, 6, VersionSettings::ADLIB_DONT_CARE,
GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER, 0},
{"samdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED,
- GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER, 0},
{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_DONT_CARE,
- GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER, 0},
{"snmidemo", "Sam & Max (Interactive WIP Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_ALWAYS,
- GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0},
+ GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER, 0},
{"test", "Test demo game", GID_SAMNMAX, 6, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES, 0},