2009-02-16 01:58:30 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
2009-02-17 15:20:21 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2009-02-16 01:58:30 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
#ifndef SCI_H
|
|
|
|
#define SCI_H
|
|
|
|
|
|
|
|
#include "engines/engine.h"
|
2009-02-20 21:47:51 +00:00
|
|
|
#include "engines/advancedDetector.h"
|
2009-02-21 09:45:34 +00:00
|
|
|
|
2009-02-20 14:45:28 +00:00
|
|
|
namespace Sci {
|
2009-02-15 06:10:59 +00:00
|
|
|
|
2009-05-11 17:07:38 +00:00
|
|
|
class Console;
|
2009-05-14 12:38:50 +00:00
|
|
|
struct EngineState;
|
2009-07-11 23:45:54 +00:00
|
|
|
class Kernel;
|
|
|
|
class Vocabulary;
|
2009-08-30 01:37:27 +00:00
|
|
|
class ResourceManager;
|
2009-05-11 13:31:17 +00:00
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
// our engine debug levels
|
2009-02-20 20:11:12 +00:00
|
|
|
enum kDebugLevels {
|
|
|
|
kDebugLevelError = 1 << 0,
|
|
|
|
kDebugLevelNodes = 1 << 1,
|
|
|
|
kDebugLevelGraphics = 1 << 2,
|
|
|
|
kDebugLevelStrings = 1 << 3,
|
2009-05-30 15:40:49 +00:00
|
|
|
kDebugLevelMemory = 1 << 4,
|
2009-02-20 20:11:12 +00:00
|
|
|
kDebugLevelFuncCheck = 1 << 5,
|
|
|
|
kDebugLevelBresen = 1 << 6,
|
|
|
|
kDebugLevelSound = 1 << 7,
|
|
|
|
kDebugLevelGfxDriver = 1 << 8,
|
|
|
|
kDebugLevelBaseSetter = 1 << 9,
|
|
|
|
kDebugLevelParser = 1 << 10,
|
2009-07-04 11:33:51 +00:00
|
|
|
kDebugLevelMenu = 1 << 11,
|
|
|
|
kDebugLevelSaid = 1 << 12,
|
|
|
|
kDebugLevelFile = 1 << 13,
|
|
|
|
kDebugLevelTime = 1 << 14,
|
|
|
|
kDebugLevelRoom = 1 << 15,
|
|
|
|
kDebugLevelAvoidPath = 1 << 16,
|
|
|
|
kDebugLevelDclInflate = 1 << 17,
|
|
|
|
kDebugLevelVM = 1 << 18,
|
2009-07-06 10:39:22 +00:00
|
|
|
kDebugLevelScripts = 1 << 19,
|
|
|
|
kDebugLevelGC = 1 << 20
|
2009-02-15 06:10:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SciGameDescription {
|
2009-02-15 08:20:53 +00:00
|
|
|
ADGameDescription desc;
|
2009-05-13 16:52:41 +00:00
|
|
|
uint32 flags;
|
|
|
|
};
|
2009-05-12 20:12:49 +00:00
|
|
|
|
2009-08-16 19:18:19 +00:00
|
|
|
extern const char *versionNames[];
|
2009-05-14 12:38:50 +00:00
|
|
|
|
2009-05-13 16:52:41 +00:00
|
|
|
enum SciGameFlags {
|
2009-07-04 15:39:31 +00:00
|
|
|
// SCI0 flags
|
2009-05-12 20:12:49 +00:00
|
|
|
|
2009-05-13 16:52:41 +00:00
|
|
|
/* Applies to all versions before 0.000.629
|
2009-07-04 15:39:31 +00:00
|
|
|
* Older SCI versions had simpler code for GetTime()
|
|
|
|
*/
|
2009-07-07 10:28:05 +00:00
|
|
|
GF_SCI0_OLDGETTIME = (1 << 0)
|
2009-05-12 20:12:49 +00:00
|
|
|
};
|
|
|
|
|
2009-08-30 01:37:27 +00:00
|
|
|
/** SCI versions */
|
|
|
|
enum SciVersion {
|
|
|
|
SCI_VERSION_AUTODETECT,
|
|
|
|
SCI_VERSION_0_EARLY, // Early KQ4, 1988 xmas card
|
|
|
|
SCI_VERSION_0_LATE, // KQ4, LSL2, LSL3, SQ3 etc
|
|
|
|
SCI_VERSION_01, // KQ1 and multilingual games (S.old.*)
|
|
|
|
SCI_VERSION_1_EGA, // EGA with parser, QFG2
|
|
|
|
SCI_VERSION_1_EARLY, // KQ5. (EGA/VGA)
|
|
|
|
SCI_VERSION_1_MIDDLE, // LSL1, JONESCD. (EGA?/VGA)
|
|
|
|
SCI_VERSION_1_LATE, // ECO1, LSL5. (EGA/VGA)
|
|
|
|
SCI_VERSION_1_1, // KQ6, ECO2
|
|
|
|
SCI_VERSION_2, // GK1, PQ4 (Floppy), QFG4 (Floppy)
|
|
|
|
SCI_VERSION_2_1, // GK2, KQ7, SQ6, Torin
|
|
|
|
SCI_VERSION_3 // LSL7, RAMA, Lighthouse
|
|
|
|
};
|
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
class SciEngine : public Engine {
|
2009-06-07 23:04:34 +00:00
|
|
|
friend class Console;
|
2009-02-15 22:43:13 +00:00
|
|
|
public:
|
|
|
|
SciEngine(OSystem *syst, const SciGameDescription *desc);
|
|
|
|
~SciEngine();
|
2009-02-15 06:10:59 +00:00
|
|
|
|
2009-03-01 04:42:46 +00:00
|
|
|
// Engine APIs
|
|
|
|
virtual Common::Error run();
|
2009-06-02 19:03:43 +00:00
|
|
|
void pauseEngineIntern(bool pause);
|
2009-05-11 13:31:17 +00:00
|
|
|
virtual GUI::Debugger *getDebugger();
|
2009-07-03 14:22:50 +00:00
|
|
|
Console *getSciDebugger();
|
2009-02-21 09:45:34 +00:00
|
|
|
|
2009-02-18 20:08:49 +00:00
|
|
|
const char* getGameID() const;
|
2009-02-22 03:40:51 +00:00
|
|
|
int getResourceVersion() const;
|
2009-08-15 12:09:47 +00:00
|
|
|
SciVersion getVersion() const;
|
2009-02-18 20:08:49 +00:00
|
|
|
Common::Language getLanguage() const;
|
|
|
|
Common::Platform getPlatform() const;
|
|
|
|
uint32 getFlags() const;
|
2009-08-25 08:38:14 +00:00
|
|
|
ResourceManager *getresourceManager() const { return _resourceManager; }
|
2009-07-11 23:45:54 +00:00
|
|
|
Kernel *getKernel() const { return _kernel; }
|
|
|
|
Vocabulary *getVocabulary() const { return _vocabulary; }
|
2009-02-27 01:17:24 +00:00
|
|
|
|
2009-02-20 23:41:15 +00:00
|
|
|
Common::String getSavegameName(int nr) const;
|
2009-02-27 01:17:24 +00:00
|
|
|
Common::String getSavegamePattern() const;
|
|
|
|
|
|
|
|
/** Prepend 'TARGET-' to the given filename. */
|
|
|
|
Common::String wrapFilename(const Common::String &name) const;
|
|
|
|
|
|
|
|
/** Remove the 'TARGET-' prefix of the given filename, if present. */
|
|
|
|
Common::String unwrapFilename(const Common::String &name) const;
|
|
|
|
|
2009-08-30 01:37:27 +00:00
|
|
|
Common::String getSciVersionDesc(SciVersion version) const;
|
|
|
|
|
2009-02-15 22:43:13 +00:00
|
|
|
private:
|
2009-02-20 14:45:28 +00:00
|
|
|
const SciGameDescription *_gameDescription;
|
2009-08-25 08:38:14 +00:00
|
|
|
ResourceManager *_resourceManager;
|
2009-06-03 14:09:25 +00:00
|
|
|
EngineState *_gamestate;
|
2009-07-11 23:45:54 +00:00
|
|
|
Kernel *_kernel;
|
|
|
|
Vocabulary *_vocabulary;
|
2009-06-03 14:09:25 +00:00
|
|
|
Console *_console;
|
2009-02-15 06:10:59 +00:00
|
|
|
};
|
|
|
|
|
2009-02-20 14:45:28 +00:00
|
|
|
} // End of namespace Sci
|
2009-02-15 06:10:59 +00:00
|
|
|
|
|
|
|
#endif // SCI_H
|