2002-03-25 08:51:34 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
2003-03-06 21:46:56 +00:00
|
|
|
* Copyright (C) 2001-2003 The ScummVM project
|
2002-03-25 08:51:34 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2002-08-18 17:48:18 +00:00
|
|
|
#ifndef GAMEDETECTOR_H
|
|
|
|
#define GAMEDETECTOR_H
|
|
|
|
|
2002-09-30 00:55:47 +00:00
|
|
|
#include "common/str.h"
|
|
|
|
|
2002-08-18 17:48:18 +00:00
|
|
|
class OSystem;
|
|
|
|
class MidiDriver;
|
|
|
|
|
2002-11-06 16:01:36 +00:00
|
|
|
enum {
|
|
|
|
kDefaultMasterVolume = 192,
|
|
|
|
kDefaultSFXVolume = 192,
|
|
|
|
kDefaultMusicVolume = 192
|
|
|
|
};
|
|
|
|
|
2003-03-23 13:44:59 +00:00
|
|
|
/* Languages
|
|
|
|
* note: values 0->8 are are _needed_ for scripts in comi please don't
|
|
|
|
* remove/change fixed numbers from this enum
|
|
|
|
*/
|
|
|
|
enum {
|
|
|
|
EN_USA = 0,
|
|
|
|
DE_DEU = 1,
|
|
|
|
FR_FRA = 2,
|
|
|
|
IT_ITA = 3,
|
|
|
|
PT_BRA = 4,
|
|
|
|
ES_ESP = 5,
|
|
|
|
JA_JPN = 6,
|
|
|
|
ZH_TWN = 7,
|
|
|
|
KO_KOR = 8,
|
|
|
|
HB_HEB = 20
|
|
|
|
};
|
|
|
|
|
2002-11-06 16:01:36 +00:00
|
|
|
enum GameId {
|
2003-03-01 22:04:48 +00:00
|
|
|
GID_SCUMM_FIRST = 1,
|
|
|
|
GID_SCUMM_LAST = GID_SCUMM_FIRST + 99,
|
2003-03-01 21:26:45 +00:00
|
|
|
|
|
|
|
// Simon the Sorcerer
|
2003-03-01 22:04:48 +00:00
|
|
|
GID_SIMON_FIRST,
|
2003-03-05 19:04:34 +00:00
|
|
|
GID_SIMON_LAST = GID_SIMON_FIRST + 99,
|
|
|
|
|
|
|
|
// Beneath a Steel Sky
|
|
|
|
GID_SKY_FIRST,
|
|
|
|
GID_SKY_LAST = GID_SKY_FIRST + 99
|
2002-11-06 16:01:36 +00:00
|
|
|
};
|
|
|
|
|
2003-03-01 22:04:48 +00:00
|
|
|
// 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.
|
2002-11-06 16:01:36 +00:00
|
|
|
enum GameFeatures {
|
2003-03-01 21:26:45 +00:00
|
|
|
// SCUMM features
|
|
|
|
GF_NEW_OPCODES = 1 << 0,
|
|
|
|
GF_AFTER_V6 = 1 << 1,
|
|
|
|
GF_AFTER_V7 = 1 << 2,
|
|
|
|
GF_AFTER_V8 = 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_NEW_COSTUMES = 1 << 16,
|
2003-03-18 06:53:47 +00:00
|
|
|
GF_DEFAULT_TO_1X_SCALER = 1 << 17,
|
2003-04-06 19:41:34 +00:00
|
|
|
GF_AFTER_V2 = 1 << 18,
|
|
|
|
GF_AFTER_V3 = 1 << 19,
|
|
|
|
GF_AFTER_V4 = 1 << 20,
|
|
|
|
GF_AFTER_V5 = 1 << 21,
|
2003-03-01 21:26:45 +00:00
|
|
|
|
|
|
|
GF_HAS_ROOMTABLE = GF_AFTER_V7,
|
|
|
|
GF_USE_ANGLES = GF_AFTER_V7,
|
|
|
|
GF_DEFAULT = GF_USE_KEY,
|
|
|
|
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER
|
2002-11-06 16:01:36 +00:00
|
|
|
};
|
|
|
|
|
2002-09-27 23:27:14 +00:00
|
|
|
struct VersionSettings {
|
|
|
|
const char *filename;
|
|
|
|
const char *gamename;
|
2002-12-14 11:53:58 +00:00
|
|
|
byte id, major, middle, minor;
|
|
|
|
uint32 features;
|
|
|
|
char *detectname;
|
2002-09-27 23:27:14 +00:00
|
|
|
};
|
|
|
|
|
2003-03-25 00:26:53 +00:00
|
|
|
struct MusicDriver {
|
2002-12-13 23:29:18 +00:00
|
|
|
const char *name;
|
|
|
|
const char *description;
|
2002-12-14 11:53:58 +00:00
|
|
|
int id;
|
2002-12-13 23:29:18 +00:00
|
|
|
};
|
|
|
|
|
2003-03-25 00:26:53 +00:00
|
|
|
struct GraphicsMode {
|
2002-12-13 23:29:18 +00:00
|
|
|
const char *name;
|
|
|
|
const char *description;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
2003-03-25 00:26:53 +00:00
|
|
|
struct Language {
|
2003-01-29 08:07:10 +00:00
|
|
|
const char *name;
|
|
|
|
const char *description;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
2003-03-01 22:04:48 +00:00
|
|
|
extern const VersionSettings *version_settings;
|
2002-09-27 23:27:14 +00:00
|
|
|
|
|
|
|
|
2002-03-25 08:51:34 +00:00
|
|
|
class GameDetector {
|
2002-09-30 00:55:47 +00:00
|
|
|
typedef ScummVM::String String;
|
2002-12-13 23:29:18 +00:00
|
|
|
|
|
|
|
public:
|
2003-03-25 00:26:53 +00:00
|
|
|
static const MusicDriver *getMusicDrivers();
|
2002-12-13 23:29:18 +00:00
|
|
|
static bool isMusicDriverAvailable(int drv);
|
2002-09-30 00:55:47 +00:00
|
|
|
|
2002-03-23 20:34:47 +00:00
|
|
|
public:
|
2002-09-30 00:55:47 +00:00
|
|
|
GameDetector();
|
2003-03-06 16:27:06 +00:00
|
|
|
|
2002-03-23 20:34:47 +00:00
|
|
|
void parseCommandLine(int argc, char **argv);
|
2002-09-30 00:55:47 +00:00
|
|
|
int detectMain();
|
|
|
|
void setGame(const String &name);
|
2002-10-23 12:56:30 +00:00
|
|
|
const String& getGameName(void);
|
2002-12-13 23:29:18 +00:00
|
|
|
|
2002-03-23 20:34:47 +00:00
|
|
|
bool _fullScreen;
|
2002-04-12 10:34:46 +00:00
|
|
|
byte _gameId;
|
|
|
|
|
2002-04-13 18:34:11 +00:00
|
|
|
bool _use_adlib;
|
|
|
|
|
2003-03-25 15:32:36 +00:00
|
|
|
int _master_volume;
|
2002-08-07 00:32:13 +00:00
|
|
|
int _music_volume;
|
|
|
|
int _sfx_volume;
|
2002-04-17 03:11:37 +00:00
|
|
|
bool _amiga;
|
2003-01-29 08:07:10 +00:00
|
|
|
int _language;
|
2002-04-14 18:13:08 +00:00
|
|
|
|
2002-05-05 20:08:41 +00:00
|
|
|
uint16 _talkSpeed;
|
2002-03-23 20:34:47 +00:00
|
|
|
uint16 _debugMode;
|
2002-12-06 15:24:14 +00:00
|
|
|
uint16 _debugLevel;
|
2002-12-31 02:09:57 +00:00
|
|
|
bool _dumpScripts;
|
2002-09-30 00:55:47 +00:00
|
|
|
bool _noSubtitles;
|
2002-03-23 20:34:47 +00:00
|
|
|
uint16 _bootParam;
|
2002-04-12 10:34:46 +00:00
|
|
|
|
2002-03-23 20:34:47 +00:00
|
|
|
char *_gameDataPath;
|
|
|
|
int _gameTempo;
|
|
|
|
int _midi_driver;
|
2002-09-30 00:55:47 +00:00
|
|
|
String _gameFileName;
|
2002-10-23 12:56:30 +00:00
|
|
|
String _gameText;
|
2002-10-28 09:03:02 +00:00
|
|
|
String _gameRealName;
|
2002-03-23 20:34:47 +00:00
|
|
|
uint32 _features;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
int _gfx_mode;
|
2003-03-18 06:53:47 +00:00
|
|
|
bool _default_gfx_mode;
|
2002-04-12 10:34:46 +00:00
|
|
|
|
2002-04-07 07:33:39 +00:00
|
|
|
int _cdrom;
|
2002-07-19 12:06:45 +00:00
|
|
|
int _save_slot;
|
2002-04-27 16:58:29 +00:00
|
|
|
|
|
|
|
bool _saveconfig;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2002-12-13 23:29:18 +00:00
|
|
|
public:
|
|
|
|
OSystem *createSystem();
|
|
|
|
MidiDriver *createMidi();
|
|
|
|
|
2003-01-12 07:19:03 +00:00
|
|
|
int parseGraphicsMode(const char *s);
|
2002-12-13 23:29:18 +00:00
|
|
|
void updateconfig();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool detectGame(void);
|
2002-04-13 18:34:11 +00:00
|
|
|
bool parseMusicDriver(const char *s);
|
2003-01-29 08:07:10 +00:00
|
|
|
int parseLanguage(const char *s);
|
2002-10-18 07:08:45 +00:00
|
|
|
void list_games();
|
2002-03-23 20:34:47 +00:00
|
|
|
};
|
2002-08-18 17:48:18 +00:00
|
|
|
|
|
|
|
#endif
|