22 #ifndef MEDIASTATION_H 23 #define MEDIASTATION_H 25 #include "audio/mixer.h" 26 #include "common/scummsys.h" 27 #include "common/system.h" 28 #include "common/error.h" 29 #include "common/fs.h" 30 #include "common/hash-str.h" 31 #include "common/random.h" 32 #include "common/serializer.h" 33 #include "common/events.h" 34 #include "common/util.h" 35 #include "engines/engine.h" 36 #include "engines/savestate.h" 38 #include "mediastation/clients.h" 39 #include "mediastation/detection.h" 40 #include "mediastation/datafile.h" 41 #include "mediastation/boot.h" 42 #include "mediastation/context.h" 43 #include "mediastation/actor.h" 44 #include "mediastation/cursors.h" 45 #include "mediastation/graphics.h" 46 #include "mediastation/mediascript/function.h" 47 #include "mediastation/actors/stage.h" 51 struct MediaStationGameDescription;
62 static const char *
const directoryGlobs[] = {
78 uint32 getFeatures()
const;
81 const char *getAppName()
const;
87 bool isFirstGenerationEngine();
88 void dispatchSystemEvents();
89 void draw(
bool dirtyOnly =
true);
91 void registerActor(
Actor *actorToAdd);
92 void destroyActor(uint actorId);
93 void destroyContext(uint contextId,
bool eraseFromLoadedContexts =
true);
94 bool contextIsLocked(uint contextId);
96 void readUnrecognizedFromStream(
Chunk &chunk, uint sectionType);
99 Actor *getActorById(uint actorId);
101 ChannelClient *getChannelClientByChannelIdent(uint channelIdent);
106 RootStage *getRootStage() {
return _stageDirector->getRootStage(); }
108 Document *getDocument() {
return _document; }
110 const FileInfo &fileInfoForIdent(uint fileId) {
return _fileMap.getValOrDefault(fileId); }
111 const StreamInfo &streamInfoForIdent(uint streamId) {
return _streamMap.getValOrDefault(streamId); }
112 const ScreenReference &screenRefWithId(uint screenActorId) {
return _screenReferences.getValOrDefault(screenActorId); }
113 const ContextReference &contextRefWithId(uint contextId) {
return _contextReferences.getValOrDefault(contextId); }
118 SpatialEntity *getMouseInsideHotspot() {
return _mouseInsideHotspot; }
119 void setMouseInsideHotspot(
SpatialEntity *entity) { _mouseInsideHotspot = entity; }
120 void clearMouseInsideHotspot() { _mouseInsideHotspot =
nullptr; }
122 SpatialEntity *getMouseDownHotspot() {
return _mouseDownHotspot; }
123 void setMouseDownHotspot(
SpatialEntity *entity) { _mouseDownHotspot = entity; }
124 void clearMouseDownHotspot() { _mouseDownHotspot =
nullptr; }
128 static const uint SCREEN_WIDTH = 640;
129 static const uint SCREEN_HEIGHT = 480;
130 static const uint BOOT_STREAM_ID = 1;
162 uint _functionTableSize = 0;
165 void initDisplayManager();
166 void initCursorManager();
167 void initFunctionManager();
169 void initDeviceOwner();
170 void initStageDirector();
171 void initStreamFeedManager();
172 void setupInitialStreamMap();
176 virtual void readChunk(
Chunk &chunk)
override;
177 void readDocumentDef(
Chunk &chunk);
178 void readDocumentInfoFromStream(
Chunk &chunk, BootSectionType sectionType);
179 void readVersionInfoFromStream(
Chunk &chunk);
180 void readContextReferencesFromStream(
Chunk &chunk);
181 void readScreenReferencesFromStream(
Chunk &chunk);
182 void readAndAddFileMaps(
Chunk &chunk);
183 void readAndAddStreamMaps(
Chunk &chunk);
185 void readControlCommands(
Chunk &chunk);
186 void readCommandFromStream(
Chunk &chunk, ContextSectionType sectionType);
187 void readCreateContextData(
Chunk &chunk);
188 void readDestroyContextData(
Chunk &chunk);
189 void readCreateActorData(
Chunk &chunk);
190 void readDestroyActorData(
Chunk &chunk);
191 void readActorLoadComplete(
Chunk &chunk);
192 void readCreateVariableData(
Chunk &chunk);
193 void readContextNameData(
Chunk &chunk);
195 void destroyActorsInContext(uint contextId);
199 #define SHOULD_QUIT ::MediaStation::g_engine->shouldQuit() 203 #endif // MEDIASTATION_H
EngineFeature
Definition: engine.h:258
Definition: advancedDetector.h:164