[Scummvm-cvs-logs] CVS: scummvm/common engine.h,1.26,1.27 gameDetector.cpp,1.109,1.110 gameDetector.h,1.44,1.45
Max Horn
fingolfin at users.sourceforge.net
Sat Jun 14 18:43:07 CEST 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv26708/common
Modified Files:
engine.h gameDetector.cpp gameDetector.h
Log Message:
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)
Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/engine.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- engine.h 1 Jun 2003 09:41:55 -0000 1.26
+++ engine.h 15 Jun 2003 01:42:13 -0000 1.27
@@ -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;
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- gameDetector.cpp 13 Jun 2003 10:13:41 -0000 1.109
+++ gameDetector.cpp 15 Jun 2003 01:42:13 -0000 1.110
@@ -627,8 +627,9 @@
* 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;
}
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- gameDetector.h 7 Jun 2003 00:16:54 -0000 1.44
+++ gameDetector.h 15 Jun 2003 01:42:13 -0000 1.45
@@ -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 @@
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;
};
More information about the Scummvm-git-logs
mailing list