aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2003-08-06 09:30:48 +0000
committerTravis Howell2003-08-06 09:30:48 +0000
commit5dd4d3e8e448c430bb581f4097acd3016f1a41f4 (patch)
tree4b01178253b40ed1767f66623c27463c5b4ae7ff /scumm
parente4e9538038a59cb2d47c61fcfb762d02b2abfb8c (diff)
downloadscummvm-rg350-5dd4d3e8e448c430bb581f4097acd3016f1a41f4.tar.gz
scummvm-rg350-5dd4d3e8e448c430bb581f4097acd3016f1a41f4.tar.bz2
scummvm-rg350-5dd4d3e8e448c430bb581f4097acd3016f1a41f4.zip
Add GF_LOOM feature flag for loom games to reduce checks.
Will make it easier to add loom fm towns target in future. svn-id: r9547
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/debugger.cpp4
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/script_v5.cpp2
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/scummvm.cpp4
6 files changed, 9 insertions, 8 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 94dd4c0d1a..0e51a9d10d 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -225,7 +225,7 @@ int Actor::remapDirection(int dir, bool is_walking) {
// not necessary here because we never call the function unless the
// actor is in the current room anyway.
- if (!ignoreBoxes || _vm->_gameId == GID_LOOM || _vm->_gameId == GID_LOOM256) {
+ if (!ignoreBoxes || (_vm->_features & GF_LOOM)) {
specdir = _vm->_extraBoxFlags[walkbox];
if (specdir) {
if (specdir & 0x8000) {
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index 5e2176a53e..a6e11e86d6 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -99,7 +99,7 @@ void ScummDebugger::attach(Scumm *s, char *entry) {
DCmd_Register("scripts", &ScummDebugger::Cmd_PrintScript);
DCmd_Register("importres", &ScummDebugger::Cmd_ImportRes);
- if ((_s->_gameId == GID_LOOM) || (_s->_gameId == GID_LOOM256))
+ if ((_s->_features & GF_LOOM))
DCmd_Register("drafts", &ScummDebugger::Cmd_PrintDraft);
DCmd_Register("loadgame", &ScummDebugger::Cmd_LoadGame);
@@ -934,7 +934,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
const char *notes = "cdefgabC";
int i, base, draft;
- if (_s->_gameId != GID_LOOM && _s->_gameId != GID_LOOM256) {
+ if (!(_s->_features & GF_LOOM)) {
Debug_Printf("Command only works with Loom/LoomCD\n");
return true;
}
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 6f503a2677..6e83c342f6 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -664,7 +664,7 @@ void Scumm::drawFlashlight() {
_flashlight.x = x - _flashlight.w / 2 - _screenStartStrip * 8;
_flashlight.y = y - _flashlight.h / 2;
- if (_gameId == GID_LOOM || _gameId == GID_LOOM256)
+ if (_features & GF_LOOM)
_flashlight.y -= 12;
// Clip the flashlight at the borders
@@ -3508,7 +3508,7 @@ void Scumm::decompressDefaultCursor(int idx) {
// FIXME: None of the stock cursors are right for Loom. Why is that?
- if (_gameId == GID_LOOM || _gameId == GID_LOOM256) {
+ if (_features & GF_LOOM) {
int w = 0;
_cursor.width = 8;
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 5449ea64c0..95b882ace3 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -647,7 +647,7 @@ void Scumm_v5::o5_cursorCommand() {
// omit for now.
// FIXME: Actually: is this opcode ever called by a non-Loom game?
// Which V3-V5 game besides Loom makes use of custom cursors, ever?
- if ((_gameId != GID_LOOM256) && (_gameId != GID_LOOM)) {
+ if (!(_features & GF_LOOM)) {
warning("setCursorImg called - tell Fingolfin where you saw this!");
setCursorImg(i, j, 1);
}
diff --git a/scumm/scumm.h b/scumm/scumm.h
index f048a5339b..ad40e83caf 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -85,6 +85,7 @@ enum GameFeatures {
GF_AFTER_HEV7 = 1 << 15,
GF_FMTOWNS = 1 << 16,
GF_INDY3 = 1 << 17,
+ GF_LOOM = 1 << 18,
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER
};
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index dacd9e5429..125c9b87c0 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -82,7 +82,7 @@ static const VersionSettings scumm_settings[] = {
{"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,
- 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_LOOM, "00.LFL"},
/* Scumm Version 4 */
{"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 4, VersionSettings::ADLIB_ALWAYS,
@@ -94,7 +94,7 @@ static const VersionSettings scumm_settings[] = {
{"monkeyVGA", "Monkey Island 1 (256 color Floppy version)", GID_MONKEY_VGA, 4, VersionSettings::ADLIB_ALWAYS,
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, "000.LFL"},
+ GF_SMALL_HEADER | GF_USE_KEY | GF_LOOM | GF_AUDIOTRACKS, "000.LFL"},
{"monkey", "Monkey Island 1", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED,
GF_USE_KEY | GF_AUDIOTRACKS, 0},
{"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED,