diff options
author | Max Horn | 2003-06-15 01:42:19 +0000 |
---|---|---|
committer | Max Horn | 2003-06-15 01:42:19 +0000 |
commit | 101df28e0b196201ab924cdbb771ba95426ff42d (patch) | |
tree | 6453d3321cbb2bc3a4b0e9403a6954d94bb829d5 /scumm | |
parent | 9ce9ce620f5210e4293c7c0452509d48fecd0b69 (diff) | |
download | scummvm-rg350-101df28e0b196201ab924cdbb771ba95426ff42d.tar.gz scummvm-rg350-101df28e0b196201ab924cdbb771ba95426ff42d.tar.bz2 scummvm-rg350-101df28e0b196201ab924cdbb771ba95426ff42d.zip |
moved GameId declaration to common/engine.h (more logical); moved scumm specific stuff from gameDetector.h to scumm.h; cleaned up some #includes (ideally, never #include something in a header file if you can avoid it - this cuts down interdepencies)
svn-id: r8496
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 1 | ||||
-rw-r--r-- | scumm/imuse.cpp | 13 | ||||
-rw-r--r-- | scumm/imuse.h | 2 | ||||
-rw-r--r-- | scumm/imuse_digi.cpp | 7 | ||||
-rw-r--r-- | scumm/imuse_digi.h | 2 | ||||
-rw-r--r-- | scumm/saveload.h | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 32 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 78 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 8 | ||||
-rw-r--r-- | scumm/sound.cpp | 11 |
10 files changed, 97 insertions, 61 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index c27d2a8c4a..e40d5b6abb 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -22,6 +22,7 @@ #include "charset.h" #include "scumm.h" #include "nut_renderer.h" +#include "common/gameDetector.h" CharsetRenderer::CharsetRenderer(Scumm *vm) { diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index d9598e0197..5291789598 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -20,13 +20,14 @@ */ #include "stdafx.h" -#include "scumm/scumm.h" -#include "sound/mididrv.h" -#include "scumm/imuse.h" -#include "scumm/instrument.h" -#include "scumm/saveload.h" -#include "common/util.h" +#include "imuse.h" #include "imuse_internal.h" +#include "instrument.h" +#include "saveload.h" +#include "scumm.h" +#include "common/util.h" +#include "sound/mididrv.h" +#include "common/gameDetector.h" // For kDefaultMasterVolume etc. diff --git a/scumm/imuse.h b/scumm/imuse.h index 541f34e067..7c9033c940 100644 --- a/scumm/imuse.h +++ b/scumm/imuse.h @@ -23,6 +23,8 @@ #ifndef IMUSE_H #define IMUSE_H +#include "scummsys.h" + class IMuseInternal; class MidiDriver; class OSystem; diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index 3e9ec67cd5..fec6a1f2f1 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -20,10 +20,11 @@ */ #include "stdafx.h" -#include "scumm/scumm.h" -#include "scumm/imuse_digi.h" -#include "scumm/sound.h" +#include "imuse_digi.h" +#include "scumm.h" +#include "sound.h" #include "sound/mixer.h" +#include "common/timer.h" //////////////////////////////////////// // diff --git a/scumm/imuse_digi.h b/scumm/imuse_digi.h index 280815b93d..a3239c5e4d 100644 --- a/scumm/imuse_digi.h +++ b/scumm/imuse_digi.h @@ -23,6 +23,8 @@ #ifndef IMUSE_DIGI_H #define IMUSE_DIGI_H +#include "scummsys.h" + #define MAX_DIGITAL_CHANNELS 8 #define MAX_IMUSE_JUMPS 1 #define MAX_IMUSE_REGIONS 3 diff --git a/scumm/saveload.h b/scumm/saveload.h index 9446a8527d..79de7528bd 100644 --- a/scumm/saveload.h +++ b/scumm/saveload.h @@ -22,6 +22,8 @@ #ifndef SAVELOAD_H #define SAVELOAD_H +#include "scummsys.h" + // Support for "old" savegames (made with 2501 CVS build) // Can be useful for other ports too :) @@ -103,6 +105,8 @@ struct SaveLoadEntry { typedef int SerializerSaveReference(void *me, byte type, void *ref); typedef void *SerializerLoadReference(void *me, byte type, int ref); +class SaveFile; + class Serializer { public: Serializer(SaveFile *stream, bool saveOrLoad, uint32 savegameVersion) diff --git a/scumm/scumm.h b/scumm/scumm.h index b4dd2cb6e9..f5d7011553 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -24,13 +24,13 @@ #define SCUMM_H #include "common/engine.h" -#include "common/gameDetector.h" #include "common/file.h" #include "common/map.h" #include "common/rect.h" #include "common/str.h" -#include "common/timer.h" -#include "common/util.h" + +#include "gfx.h" +#include "boxes.h" class CharsetRenderer; class GameDetector; @@ -63,6 +63,29 @@ enum { KEY_SET_OPTIONS = 3456 // WinCE }; +/** SCUMM feature flags. */ +enum GameFeatures { + GF_NEW_OPCODES = 1 << 0, + GF_NEW_CAMERA = 1 << 1, + GF_NEW_COSTUMES = 1 << 2, + GF_DIGI_IMUSE = 1 << 3, + GF_USE_KEY = 1 << 4, + GF_DRAWOBJ_OTHER_ORDER = 1 << 5, + GF_SMALL_HEADER = 1 << 6, + GF_SMALL_NAMES = 1 << 7, + GF_OLD_BUNDLE = 1 << 8, + GF_16COLOR = 1 << 9, + GF_OLD256 = 1 << 10, + GF_AUDIOTRACKS = 1 << 11, + GF_NO_SCALLING = 1 << 12, + GF_ADLIB_DEFAULT = 1 << 13, + GF_AMIGA = 1 << 14, + GF_HUMONGOUS = 1 << 15, + GF_AFTER_HEV7 = 1 << 16, + + GF_EXTERNAL_CHARSET = GF_SMALL_HEADER +}; + enum ObjectClass { kObjectClassNeverClip = 20, kObjectClassAlwaysClip = 21, @@ -73,9 +96,6 @@ enum ObjectClass { kObjectClassUntouchable = 32 }; -#include "gfx.h" -#include "boxes.h" - struct MemBlkHeader { uint32 size; }; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 11336126e4..a05b05a363 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -82,96 +82,98 @@ static const VersionSettings scumm_settings[] = { /* Scumm Version 1 */ /* Scumm Version 2 */ - {"maniac", "Maniac Mansion", GID_MANIAC, 2, + {"maniac", "Maniac Mansion", GID_MANIAC, 2, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, - {"zak", "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, + {"zak", "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALLING, "00.LFL"}, /* Scumm Version 3 */ - {"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, + {"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"}, - {"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, + {"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_ADLIB_DEFAULT, "00.LFL"}, - {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, + {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_AUDIOTRACKS, "00.LFL"}, - {"loom", "Loom", GID_LOOM, 3, + {"loom", "Loom", GID_LOOM, 3, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"}, /* Scumm Version 4 */ - {"monkeyEGA", "Monkey Island 1 (EGA)", GID_MONKEY_EGA, 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"}, - {"pass", "Passport to Adventure", GID_MONKEY_EGA, 4, + {"pass", "Passport to Adventure", GID_MONKEY_EGA, 4, VersionSettings::ADLIB_ALWAYS, GF_SMALL_HEADER | GF_USE_KEY | GF_16COLOR | GF_ADLIB_DEFAULT, "000.LFL"}, /* Scumm version 5 */ - {"monkeyVGA", "Monkey Island 1 (256 color Floppy version)", GID_MONKEY_VGA, 4, + {"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"}, - {"loomcd", "Loom (256 color CD version)", GID_LOOM256, 4, + {"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"}, - {"monkey", "Monkey Island 1", GID_MONKEY, 5, + {"monkey", "Monkey Island 1", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0}, - {"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, + {"monkey1", "Monkey Island 1 (alt)", GID_MONKEY, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_AUDIOTRACKS | GF_ADLIB_DEFAULT, 0}, - {"monkey2", "Monkey Island 2: LeChuck's revenge", GID_MONKEY2, 5, + {"monkey2", "Monkey Island 2: LeChuck's revenge", GID_MONKEY2, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"mi2demo", "Monkey Island 2: LeChuck's revenge (Demo)", GID_MONKEY2, 5, + {"mi2demo", "Monkey Island 2: LeChuck's revenge (Demo)", GID_MONKEY2, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"indydemo", "Indiana Jones and the Fate of Atlantis (FM Towns Demo)", GID_INDY4, 5, + {"indydemo", "Indiana Jones and the Fate of Atlantis (FM Towns Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"atlantis", "Indiana Jones and the Fate of Atlantis", GID_INDY4, 5, + {"atlantis", "Indiana Jones and the Fate of Atlantis", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"playfate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, + {"playfate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"fate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, + {"fate", "Indiana Jones and the Fate of Atlantis (Demo)", GID_INDY4, 5, VersionSettings::ADLIB_PREFERRED, GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, /* Scumm Version 6 */ - {"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_SAMNMAX, 6, + {"puttputt", "Putt-Putt Joins The Parade (DOS)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, + {"puttdemo", "Putt-Putt Joins The Parade (DOS Demo)", GID_PUTTDEMO, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS, 0}, - {"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_SAMNMAX, 6, + {"moondemo", "Putt-Putt Goes To The Moon (DOS Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_SAMNMAX, 6, + {"puttmoon", "Putt-Putt Goes To The Moon (DOS)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"funpack", "Putt-Putt's Fun Pack", GID_SAMNMAX, 6, + {"funpack", "Putt-Putt's Fun Pack", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbpack", "Fatty Bear's Fun Pack", GID_SAMNMAX, 6, + {"fbpack", "Fatty Bear's Fun Pack", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbear", "Fatty Bear's Birthday Surprise (DOS)", GID_SAMNMAX, 6, + {"fbear", "Fatty Bear's Birthday Surprise (DOS)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_SAMNMAX, 6, + {"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, - {"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, + {"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, + {"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_ADLIB_DEFAULT, 0}, - {"samnmax", "Sam & Max", GID_SAMNMAX, 6, + + {"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, + + {"samdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, + {"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"snmidemo", "Sam & Max (Interactive WIP Demo)", GID_SAMNMAX, 6, + {"snmidemo", "Sam & Max (Interactive WIP Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_PREFERRED, GF_NEW_OPCODES | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT, 0}, - {"test", "Test demo game", GID_SAMNMAX, 6, GF_NEW_OPCODES, 0}, + {"test", "Test demo game", GID_SAMNMAX, 6, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES, 0}, /* Humongous Entertainment Scumm Version 7 */ - {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_SAMNMAX, 6, + {"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_SAMNMAX, 6, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0}, /* Scumm Version 7 */ - {"ft", "Full Throttle", GID_FT, 7, + {"ft", "Full Throttle", GID_FT, 7, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, 0}, - {"dig", "The Dig", GID_DIG, 7, + {"dig", "The Dig", GID_DIG, 7, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, 0}, /* Scumm Version 8 */ - {"comi", "The Curse of Monkey Island", GID_CMI, 8, + {"comi", "The Curse of Monkey Island", GID_CMI, 8, VersionSettings::ADLIB_DONT_CARE, GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER, 0}, - {NULL, NULL, 0, 0, 0, NULL} + {NULL, NULL, 0, 0, VersionSettings::ADLIB_DONT_CARE, 0, NULL} }; const VersionSettings *Engine_SCUMM_targetList() { diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index f20d007221..3b58d681d2 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -20,9 +20,6 @@ */ #include "stdafx.h" -#include "common/file.h" -#include "common/util.h" -#include "common/engine.h" #include "scumm/scumm.h" #include "scumm/bomp.h" #include "scumm/sound.h" @@ -36,6 +33,11 @@ #include "chunk.h" #include "chunk_type.h" +#include "common/engine.h" +#include "common/file.h" +#include "common/util.h" +#include "common/timer.h" + const int MAX_STRINGS = 200; class StringResource { diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 78bd0b1b39..62d3bd1242 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -21,16 +21,17 @@ */ #include "stdafx.h" +#include "actor.h" +#include "bundle.h" +#include "imuse.h" +#include "imuse_digi.h" +#include "player_v2.h" #include "scumm.h" #include "sound.h" #include "sound/mididrv.h" #include "sound/mixer.h" -#include "imuse.h" -#include "imuse_digi.h" -#include "player_v2.h" -#include "actor.h" -#include "bundle.h" #include "common/config-file.h" +#include "common/timer.h" #include "common/util.h" #include "sound/midiparser.h" |