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 /common | |
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 'common')
-rw-r--r-- | common/engine.h | 15 | ||||
-rw-r--r-- | common/gameDetector.cpp | 5 | ||||
-rw-r--r-- | common/gameDetector.h | 54 |
3 files changed, 32 insertions, 42 deletions
diff --git a/common/engine.h b/common/engine.h index 151ce69352..9a8cd64f3c 100644 --- a/common/engine.h +++ b/common/engine.h @@ -27,6 +27,21 @@ #define SCUMMVM_VERSION "0.4.2cvs" #define SCUMMVM_CVS "2003-05-25" + +enum GameId { + GID_SCUMM_FIRST = 1, + GID_SCUMM_LAST = GID_SCUMM_FIRST + 99, + + // Simon the Sorcerer + GID_SIMON_FIRST, + GID_SIMON_LAST = GID_SIMON_FIRST + 49, + + // Beneath a Steel Sky + GID_SKY_FIRST, + GID_SKY_LAST = GID_SKY_FIRST + 49 +}; + + class SoundMixer; class GameDetector; class Timer; diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index f21240b1ab..594e66f3b1 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -627,8 +627,9 @@ int GameDetector::detectMain() { * and the game is one of those that want adlib as * default, OR if the game is an older game that doesn't * support anything else anyway. */ -#ifndef __PALM_OS__ // currently adlib is not supported, is this really needed ? - if ((_midi_driver == MD_AUTO && _game.features & GF_ADLIB_DEFAULT) || _game.features & GF_SMALL_HEADER) { +#ifndef __PALM_OS__ // currently adlib is not supported on PalmOS + if ((_game.adlib & VersionSettings::ADLIB_ALWAYS) || + ((_game.adlib & VersionSettings::ADLIB_PREFERRED) && _midi_driver == MD_AUTO)) { _midi_driver = MD_ADLIB; _use_adlib = true; } diff --git a/common/gameDetector.h b/common/gameDetector.h index 003b33a15e..f73f20cd56 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -28,12 +28,20 @@ class OSystem; class MidiDriver; +/** Default sound/music volumes. + * @todo move this to a better place. + */ enum { kDefaultMasterVolume = 192, kDefaultSFXVolume = 192, kDefaultMusicVolume = 192 }; +/** Global (shared) game feature flags. */ +enum { + GF_DEFAULT_TO_1X_SCALER = 1 << 31 +}; + /* Languages * note: values 0->8 are are _needed_ for scripts in comi please don't * remove/change fixed numbers from this enum @@ -51,50 +59,16 @@ enum { HB_HEB = 20 }; -enum GameId { - GID_SCUMM_FIRST = 1, - GID_SCUMM_LAST = GID_SCUMM_FIRST + 99, - - // Simon the Sorcerer - GID_SIMON_FIRST, - GID_SIMON_LAST = GID_SIMON_FIRST + 49, - - // Beneath a Steel Sky - GID_SKY_FIRST, - GID_SKY_LAST = GID_SKY_FIRST + 49 -}; - -// TODO: the GameFeatures really should be moved to scumm/scumm.h, too -// but right now, gameDetector.h still uses GF_ADLIB_DEFAULT, so we can't. -enum GameFeatures { - // SCUMM features - GF_NEW_OPCODES = 1 << 0, - 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_NEW_COSTUMES = 1 << 16, - GF_DEFAULT_TO_1X_SCALER = 1 << 17, - GF_AFTER_HEV7 = 1 << 23, - - GF_NEW_CAMERA = 1 << 24, - GF_DIGI_IMUSE = 1 << 25, - - GF_EXTERNAL_CHARSET = GF_SMALL_HEADER -}; - struct VersionSettings { const char *filename; const char *gamename; byte id, version; + enum { + ADLIB_DONT_CARE = 0, + ADLIB_PREFERRED = 1, + ADLIB_ALWAYS = 2, + ADLIB_NEVER = 3 + } adlib; uint32 features; char *detectname; }; |