122 lines
3.0 KiB
C
Raw Normal View History

/* 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.
*
*/
#ifndef SLUDGE_SLUDGE_H
#define SLUDGE_SLUDGE_H
2017-05-27 20:04:09 +02:00
#include "common/random.h"
#include "engines/engine.h"
#include "graphics/pixelformat.h"
#include "gui/debugger.h"
2017-05-27 20:04:09 +02:00
#include "sludge/console.h"
2017-07-18 19:03:45 +02:00
#include "sludge/fileset.h"
2017-07-18 17:25:00 +02:00
#include "sludge/language.h"
2017-07-18 19:50:45 +02:00
#include "sludge/objtypes.h"
2017-07-17 12:14:40 +02:00
#include "sludge/timing.h"
namespace Sludge {
2017-05-29 08:02:59 +02:00
extern SludgeEngine *g_sludge;
2017-07-21 08:16:17 +02:00
class CursorManager;
class EventManager;
2018-05-28 21:04:05 +02:00
class FatalMsgManager;
2018-05-01 18:41:34 +02:00
class FloorManager;
class GraphicsManager;
2018-04-15 21:10:02 +02:00
class PeopleManager;
2018-04-15 00:21:17 +02:00
class RegionManager;
2017-07-20 23:18:05 +02:00
class SoundManager;
2017-12-19 21:24:31 +01:00
class SpeechManager;
2017-07-21 00:11:17 +02:00
class TextManager;
2017-07-20 23:18:05 +02:00
class SludgeConsole;
2017-05-27 20:04:09 +02:00
struct SludgeGameDescription;
// debug channels
enum {
kSludgeDebugFatal = 1 << 0,
2017-05-26 21:25:11 +02:00
kSludgeDebugDataLoad = 1 << 1,
2017-05-27 20:04:09 +02:00
kSludgeDebugStackMachine = 1 << 2,
kSludgeDebugBuiltin = 1 << 3,
2017-08-02 16:35:09 +02:00
kSludgeDebugGraphics = 1 << 4,
2017-08-15 07:41:32 +02:00
kSludgeDebugZBuffer = 1 << 5,
kSludgeDebugSound = 1 << 6
};
2017-05-29 08:02:59 +02:00
class SludgeEngine: public Engine {
protected:
// Engine APIs
virtual Common::Error run();
public:
// global String variables
Common::String launchMe;
Common::String launchNext;
Common::String loadNow;
Common::String gamePath;
2017-07-17 12:14:40 +02:00
// timer
Timer _timer;
2017-07-18 17:25:00 +02:00
// managers
2017-07-18 19:03:45 +02:00
ResourceManager *_resMan;
2017-07-18 17:25:00 +02:00
LanguageManager *_languageMan;
2017-07-18 19:50:45 +02:00
ObjectManager *_objMan;
GraphicsManager *_gfxMan;
EventManager *_evtMan;
2017-07-20 23:18:05 +02:00
SoundManager *_soundMan;
2017-07-21 00:11:17 +02:00
TextManager *_txtMan;
2017-07-21 08:16:17 +02:00
CursorManager *_cursorMan;
2017-12-19 21:24:31 +01:00
SpeechManager *_speechMan;
2018-04-15 00:21:17 +02:00
RegionManager *_regionMan;
2018-04-15 21:10:02 +02:00
PeopleManager *_peopleMan;
2018-05-01 18:41:34 +02:00
FloorManager *_floorMan;
2018-05-28 21:04:05 +02:00
FatalMsgManager *_fatalMan;
2017-07-18 17:25:00 +02:00
SludgeEngine(OSystem *syst, const SludgeGameDescription *gameDesc);
virtual ~SludgeEngine();
2017-05-29 08:02:59 +02:00
uint getLanguageID() const;
const char *getGameId() const;
uint32 getFeatures() const;
Common::Language getLanguage() const;
Graphics::PixelFormat *getScreenPixelFormat() const;
Graphics::PixelFormat *getOrigPixelFormat() const;
2017-07-13 23:27:09 +02:00
Common::RandomSource *getRandomSource() const { return _rnd; };
const char *getGameFile() const;
const SludgeGameDescription *_gameDescription;
2017-05-29 08:02:59 +02:00
private:
SludgeConsole *_console;
2017-05-29 08:02:59 +02:00
Common::RandomSource *_rnd;
Graphics::PixelFormat *_pixelFormat;
Graphics::PixelFormat *_origFormat;
};
} // End of namespace Sludge
2017-05-29 08:02:59 +02:00
#endif