ScummVM API documentation
sludge.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef SLUDGE_SLUDGE_H
23 #define SLUDGE_SLUDGE_H
24 
25 #include "engines/engine.h"
26 
27 namespace Common {
28 class RandomSource;
29 }
30 
31 namespace Graphics {
32 struct PixelFormat;
33 }
34 
35 namespace Sludge {
36 
37 class CursorManager;
38 class EventManager;
39 class FatalMsgManager;
40 class FloorManager;
41 class GraphicsManager;
42 class LanguageManager;
43 class ObjectManager;
44 class PeopleManager;
45 class ResourceManager;
46 class RegionManager;
47 class SoundManager;
48 class SpeechManager;
49 class StatusBarManager;
50 class TextManager;
51 class Timer;
52 
53 struct SludgeGameDescription;
54 
55 #define IN_THE_CENTRE 65535
56 
57 // debug channels
58 enum {
59  kSludgeDebugFatal = 1 << 0,
60  kSludgeDebugDataLoad = 1 << 1,
61  kSludgeDebugStackMachine = 1 << 2,
62  kSludgeDebugBuiltin = 1 << 3,
63  kSludgeDebugGraphics = 1 << 4,
64  kSludgeDebugZBuffer = 1 << 5,
65  kSludgeDebugSound = 1 << 6
66 };
67 
68 class SludgeEngine: public Engine {
69 protected:
70  // Engine APIs
71  Common::Error run() override;
72 
73 public:
74  // global String variables
75  Common::String launchNext;
76  Common::String loadNow;
77  Common::String gamePath;
78 
79  // timer
80  Timer *_timer;
81 
82  // managers
83  ResourceManager *_resMan;
84  LanguageManager *_languageMan;
85  ObjectManager *_objMan;
86  GraphicsManager *_gfxMan;
87  EventManager *_evtMan;
88  SoundManager *_soundMan;
89  TextManager *_txtMan;
90  CursorManager *_cursorMan;
91  SpeechManager *_speechMan;
92  RegionManager *_regionMan;
93  PeopleManager *_peopleMan;
94  FloorManager *_floorMan;
95  FatalMsgManager *_fatalMan;
96  StatusBarManager *_statusBar;
97 
98  bool _dumpScripts;
99 
100  SludgeEngine(OSystem *syst, const SludgeGameDescription *gameDesc);
101  ~SludgeEngine() override;
102 
103  uint getLanguageID() const;
104  const char *getGameId() const;
105  uint32 getFeatures() const;
106  Common::Language getLanguage() const;
107  Graphics::PixelFormat *getScreenPixelFormat() const;
108  Graphics::PixelFormat *getOrigPixelFormat() const;
109  Common::RandomSource *getRandomSource() const { return _rnd; };
110 
111  const char *getGameFile() const;
112 
113  const SludgeGameDescription *_gameDescription;
114 
115 private:
116  Common::RandomSource *_rnd;
117  Graphics::PixelFormat *_pixelFormat;
118  Graphics::PixelFormat *_origFormat;
119 };
120 
121 extern SludgeEngine *g_sludge;
122 
123 } // End of namespace Sludge
124 
125 #endif
Definition: statusba.h:40
Definition: str.h:59
Definition: people.h:100
Definition: error.h:84
Definition: pixelformat.h:138
Definition: detection.h:27
Definition: region.h:34
Definition: newfatal.h:29
Definition: random.h:44
Definition: graphics.h:64
Definition: fileset.h:28
Definition: speech.h:44
Definition: sludge.h:68
Definition: event.h:56
Definition: fonttext.h:39
Definition: timing.h:26
Definition: builtin.h:27
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: language.h:28
Definition: graphics.h:37
Definition: floor.h:48
Definition: objtypes.h:44
Definition: system.h:161
Definition: engine.h:144
Definition: cursors.h:36
Definition: sound.h:49
Language
Definition: language.h:45