From d1773647159f9ef1393d7a1d33204de5886edce5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 8 Oct 2003 21:59:23 +0000 Subject: new config manager. not everything is completed, and some things will still be changed, but it seems to work well enough to put it into CVS svn-id: r10687 --- base/gameDetector.h | 64 +++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 44 deletions(-) (limited to 'base/gameDetector.h') diff --git a/base/gameDetector.h b/base/gameDetector.h index a78288e437..7f96ecf4e4 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -51,7 +51,8 @@ enum { * @note The order and mappings of the values 0..8 are *required* to stay the * way they are now, as scripts in COMI rely on them. So don't touch them. */ -enum { +enum Language { + UNK_LANG = -1, // Use default language (i.e. none specified) EN_USA = 0, DE_DEU = 1, FR_FRA = 2, @@ -66,6 +67,14 @@ enum { HB_HEB = 20 }; +enum Platform { + kPlatformUnknown = -1, + kPlatformPC = 0, + kPlatformAmiga = 1, + kPlatformAtariST = 2, + kPlatformMacintosh = 3 +}; + enum MidiDriverType { MDT_NONE = 0, MDT_PCSPK = 1, // MD_PCSPK and MD_PCJR @@ -92,69 +101,36 @@ public: void parseCommandLine(int argc, char **argv); bool detectMain(); - void setGame(const String &name); - const String& getGameName(void); String _gameFileName; TargetSettings _game; const Plugin *_plugin; - bool _fullScreen; - bool _aspectRatio; - - int _master_volume; - int _music_volume; - int _sfx_volume; - bool _amiga; - int _platform; - int _language; - - bool _demo_mode; - bool _floppyIntro; - - uint16 _talkSpeed; - uint16 _debugMode; - uint16 _debugLevel; + bool _debugMode; bool _dumpScripts; - bool _noSubtitles; - uint16 _bootParam; + bool _saveconfig; - char *_gameDataPath; - int _gameTempo; int _midi_driver; - int _gfx_mode; - bool _default_gfx_mode; - - bool _multi_midi; - bool _native_mt32; - - int _cdrom; - int _joystick_num; - int _save_slot; - - bool _saveconfig; - bool _confirmExit; - public: OSystem *createSystem(); Engine *createEngine(OSystem *system); SoundMixer *createMixer(); MidiDriver *createMidi(); - int getMidiDriverType(); + int getMidiDriverType(); // FIXME: Try to get rid of this, only Sky frontend uses it - int parseGraphicsMode(const char *s); - void updateconfig(); + void setGame(const String &name); + + static int parseGraphicsMode(const String &s); // Used in main() + static int parseMusicDriver(const String &s); + static Language parseLanguage(const String &s); + static Platform parsePlatform(const String &s); - const TargetSettings *findTarget(const char *targetName, const Plugin **plugin = NULL) const; + const TargetSettings *findTarget(const String &targetName, const Plugin **plugin = NULL) const; protected: - String _gameText; - bool detectGame(void); - bool parseMusicDriver(const char *s); - int parseLanguage(const char *s); void list_games(); }; -- cgit v1.2.3