2002-03-25 08:51:34 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
2005-01-01 16:09:25 +00:00
|
|
|
* Copyright (C) 2001-2005 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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-03-25 08:51:34 +00:00
|
|
|
*
|
|
|
|
* $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"
|
|
|
|
|
2003-09-08 17:13:40 +00:00
|
|
|
class Engine;
|
|
|
|
class GameDetector;
|
2003-09-08 17:42:53 +00:00
|
|
|
class OSystem;
|
2003-09-17 22:41:01 +00:00
|
|
|
class Plugin;
|
2005-05-10 23:48:48 +00:00
|
|
|
namespace Audio {
|
|
|
|
class Mixer;
|
|
|
|
}
|
2002-08-18 17:48:18 +00:00
|
|
|
|
2003-06-15 01:42:19 +00:00
|
|
|
/** Global (shared) game feature flags. */
|
|
|
|
enum {
|
2004-01-18 20:46:11 +00:00
|
|
|
// GF_HAS_SPEECH = 1 << 28,
|
|
|
|
// GF_HAS_SUBTITLES = 1 << 29,
|
|
|
|
GF_DEFAULT_TO_1X_SCALER = 1 << 30
|
2003-06-15 01:42:19 +00:00
|
|
|
};
|
|
|
|
|
2003-10-12 18:40:12 +00:00
|
|
|
struct GameSettings {
|
2003-12-13 00:20:01 +00:00
|
|
|
const char *name;
|
2003-09-08 15:38:34 +00:00
|
|
|
const char *description;
|
2002-12-14 11:53:58 +00:00
|
|
|
uint32 features;
|
2002-09-27 23:27:14 +00:00
|
|
|
};
|
|
|
|
|
2002-03-25 08:51:34 +00:00
|
|
|
class GameDetector {
|
2003-10-02 17:43:02 +00:00
|
|
|
typedef Common::String String;
|
2002-12-13 23:29:18 +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);
|
2003-09-20 00:37:09 +00:00
|
|
|
bool detectMain();
|
2003-09-08 17:13:40 +00:00
|
|
|
|
2003-10-12 18:40:12 +00:00
|
|
|
String _targetName;
|
2003-12-13 00:20:01 +00:00
|
|
|
GameSettings _game; // TODO: Eventually get rid of this?!
|
2003-09-17 22:41:01 +00:00
|
|
|
const Plugin *_plugin;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2002-12-31 02:09:57 +00:00
|
|
|
bool _dumpScripts;
|
2002-04-12 10:34:46 +00:00
|
|
|
|
2005-03-10 16:29:08 +00:00
|
|
|
bool _force1xOverlay;
|
|
|
|
|
2003-10-18 00:22:46 +00:00
|
|
|
void setTarget(const String &name);
|
2003-09-08 17:13:40 +00:00
|
|
|
|
2004-12-02 00:33:42 +00:00
|
|
|
public:
|
2003-10-18 00:22:46 +00:00
|
|
|
Engine *createEngine(OSystem *system);
|
2002-12-13 23:29:18 +00:00
|
|
|
|
2005-05-10 23:48:48 +00:00
|
|
|
static Audio::Mixer *createMixer();
|
2003-11-08 22:05:58 +00:00
|
|
|
|
2003-10-17 12:18:58 +00:00
|
|
|
static GameSettings findGame(const String &gameName, const Plugin **plugin = NULL);
|
2002-12-13 23:29:18 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool detectGame(void);
|
2002-03-23 20:34:47 +00:00
|
|
|
};
|
2002-08-18 17:48:18 +00:00
|
|
|
|
|
|
|
#endif
|