2002-03-25 08:51:34 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
|
|
|
* Copyright (C) 2001/2002 The ScummVM project
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
};
|
|
|
|
|
|
|
|
enum GameId {
|
|
|
|
GID_TENTACLE = 1,
|
|
|
|
GID_MONKEY2 = 2,
|
|
|
|
GID_INDY4 = 3,
|
|
|
|
GID_MONKEY = 4,
|
|
|
|
GID_SAMNMAX = 5,
|
|
|
|
GID_MONKEY_EGA = 6,
|
|
|
|
GID_LOOM256 = 7,
|
|
|
|
GID_ZAK256 = 8,
|
|
|
|
GID_INDY3_256 = 9,
|
|
|
|
GID_LOOM = 10,
|
|
|
|
GID_FT = 11,
|
|
|
|
GID_DIG = 12,
|
|
|
|
GID_MONKEY_VGA = 13,
|
|
|
|
GID_CMI = 14,
|
2002-12-12 16:29:21 +00:00
|
|
|
GID_MANIAC = 15,
|
|
|
|
GID_ZAK = 16,
|
|
|
|
//GID_MANIAC64 = 17,
|
|
|
|
//GID_ZAK64 = 18,
|
2002-11-06 16:01:36 +00:00
|
|
|
|
|
|
|
/* Simon the Sorcerer */
|
|
|
|
GID_SIMON_FIRST = 20,
|
2002-12-25 00:36:04 +00:00
|
|
|
GID_SIMON_LAST = GID_SIMON_FIRST + 8
|
2002-11-06 16:01:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum GameFeatures {
|
|
|
|
GF_NEW_OPCODES = 1,
|
|
|
|
GF_AFTER_V6 = 2,
|
|
|
|
GF_AFTER_V7 = 4,
|
|
|
|
GF_HAS_ROOMTABLE = GF_AFTER_V7,
|
|
|
|
GF_USE_KEY = 8,
|
|
|
|
GF_NEW_COSTUMES = GF_AFTER_V7,
|
|
|
|
GF_USE_ANGLES = GF_AFTER_V7,
|
|
|
|
GF_DRAWOBJ_OTHER_ORDER = 16,
|
|
|
|
|
|
|
|
GF_DEFAULT = GF_USE_KEY,
|
|
|
|
|
|
|
|
GF_SMALL_HEADER = 32,
|
|
|
|
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER,
|
|
|
|
GF_SMALL_NAMES = 64,
|
|
|
|
GF_OLD_BUNDLE = 128,
|
|
|
|
GF_16COLOR = 256,
|
|
|
|
GF_OLD256 = 512,
|
|
|
|
GF_AUDIOTRACKS = 1024,
|
|
|
|
GF_NO_SCALLING = 2048,
|
|
|
|
GF_ADLIB_DEFAULT = 4096,
|
|
|
|
GF_AMIGA = 8192,
|
|
|
|
GF_HUMONGOUS = 16384,
|
|
|
|
GF_AFTER_V8 = 32768
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2002-12-13 23:29:18 +00:00
|
|
|
struct MusicDrivers {
|
|
|
|
const char *name;
|
|
|
|
const char *description;
|
2002-12-14 11:53:58 +00:00
|
|
|
int id;
|
2002-12-13 23:29:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GraphicsModes {
|
|
|
|
const char *name;
|
|
|
|
const char *description;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
2002-09-27 23:27:14 +00:00
|
|
|
extern const VersionSettings version_settings[];
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
static const MusicDrivers *getMusicDrivers();
|
|
|
|
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();
|
|
|
|
|
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;
|
|
|
|
|
2002-08-07 00:32:13 +00:00
|
|
|
int _music_volume;
|
|
|
|
int _sfx_volume;
|
2002-10-23 10:34:14 +00:00
|
|
|
int _master_volume;
|
2002-04-17 03:11:37 +00:00
|
|
|
bool _amiga;
|
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-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
|
|
|
|
2002-04-13 18:34:11 +00:00
|
|
|
int _gfx_driver;
|
2002-04-12 21:26:59 +00:00
|
|
|
int _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();
|
|
|
|
|
|
|
|
void updateconfig();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool detectGame(void);
|
2002-03-25 01:40:51 +00:00
|
|
|
|
2002-12-13 23:29:18 +00:00
|
|
|
int parseGraphicsMode(const char *s);
|
2002-04-13 18:34:11 +00:00
|
|
|
bool parseMusicDriver(const char *s);
|
2002-04-27 16:58:29 +00:00
|
|
|
|
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
|