25 #include "engines/engine.h" 26 #include "engines/advancedDetector.h" 28 #include "common/str-array.h" 29 #include "common/hashmap.h" 30 #include "common/events.h" 32 #include "graphics/renderer.h" 34 #include "engines/grim/textobject.h" 35 #include "engines/grim/iris.h" 36 #include "engines/grim/detection.h" 48 class PrimitiveObject;
83 uint32 getGameFlags() {
return _gameFlags; }
84 GrimGameType getGameType() {
return _gameType; }
87 virtual const char *getUpdateFilename();
92 void setMode(EngineMode mode);
93 EngineMode getMode() {
return _mode; }
94 void setPreviousMode(EngineMode mode) { _previousMode = mode; }
95 EngineMode getPreviousMode() {
return _previousMode; }
96 void setSpeechMode(SpeechMode mode) { _speechMode = mode; }
97 SpeechMode getSpeechMode() {
return _speechMode; }
98 SaveGame *savedState() {
return _savedState; }
99 bool getJustSaveLoaded() {
return _justSaveLoaded; }
100 void setJustSaveLoaded(
bool state) { _justSaveLoaded = state; }
102 void handleDebugLoadResource();
104 void updateDisplayScene();
106 void setFlipEnable(
bool state) { _flipEnable = state; }
107 bool getFlipEnable() {
return _flipEnable; }
108 virtual void drawTextObjects();
109 void playIrisAnimation(Iris::Direction dir,
int x,
int y,
int time);
112 unsigned getFrameStart()
const {
return _frameStart; }
113 unsigned getFrameTime()
const {
return _frameTime; }
118 float getPerSecond(
float rate)
const;
120 int getTextSpeed() {
return _textSpeed; }
121 void setTextSpeed(
int speed);
123 void enableControl(
int num) { _controlsEnabled[num] =
true; }
124 void disableControl(
int num) { _controlsEnabled[num] =
false; }
125 float getControlAxis(
int num);
126 bool getControlState(
int num);
127 void clearEventQueue();
130 void setSetLock(
const char *name,
bool lockStatus);
132 void setSet(
const char *name);
133 void setSet(
Set *scene);
134 Set *getCurrSet() {
return _currSet; }
135 void makeCurrentSetup(
int num);
137 void flagRefreshShadowMask(
bool flag) { _refreshShadowMask = flag; }
138 bool getFlagRefreshShadowMask() {
return _refreshShadowMask; }
140 void setSelectedActor(
Actor *a) { _selectedActor = a; }
141 Actor *getSelectedActor() {
return _selectedActor; }
147 virtual void invalidateActiveActorsList();
148 virtual void invalidateTextObjectsSortOrder() {};
157 void addTalkingActor(
Actor *actor);
159 bool areActorsTalking()
const;
160 void immediatelyRemoveActor(
Actor *actor);
162 void drawMovieSubtitle();
164 void setMovieSetup();
166 int getLanguage()
const {
return _language; }
167 void setLanguage(
int langId) { _language = langId; }
170 bool isConceptEnabled(uint32 number)
const;
171 void enableConcept(uint32 number);
173 bool isCutsceneEnabled(uint32 number)
const;
174 void enableCutscene(uint32 number);
176 Commentary *getCommentary() {
return _commentary; }
181 void setSaveMetaData(
const char*,
int,
const char*);
186 void changeHardwareState();
202 void pauseEngineIntern(
bool pause)
override;
206 void handleJoyAxis(byte axis, int16 position);
207 void handleMouseAxis(byte axis, int16 position);
211 void handleUserPaint();
212 void cameraChangeHandle(
int prev,
int next);
213 void cameraPostChangeHandle(
int num);
214 void buildActiveActorsList();
215 void savegameCallback();
216 GfxBase *createRenderer(
int screenW,
int screenH);
217 void playAspyrLogo();
219 virtual void updateNormalMode();
220 virtual void updateDrawMode();
221 virtual void drawNormalMode();
226 void savegameRestore();
229 virtual void storeSaveGameMetadata(
SaveGame *state);
230 virtual void storeSaveGameImage(
SaveGame *savedState);
232 bool _savegameLoadRequest =
false;
233 bool _savegameSaveRequest =
false;
236 bool _justSaveLoaded;
239 EngineMode _mode, _previousMode;
240 SpeechMode _speechMode;
245 bool _refreshShadowMask =
false;
246 bool _shortFrame =
false;
247 bool _setupChanged =
true;
251 unsigned _frameStart = 0, _frameTime = 0, _movieTime = 0;
252 int _prevSmushFrame = 0;
253 unsigned int _frameCounter = 0;
254 unsigned int _lastFrameTime = 0;
255 unsigned _speedLimitMs;
259 bool *_controlsEnabled;
260 bool *_controlsState;
261 float *_joyAxisPosition;
263 bool _changeHardwareState =
false;
265 Actor *_selectedActor;
267 TextObject::Ptr _movieSubtitle;
269 bool _buildActiveActorsList;
274 GrimGameType _gameType;
277 uint32 _pauseStartTime;
281 static const uint32 kNumConcepts = 98;
282 static const uint32 kNumCutscenes = 40;
283 bool _cutsceneEnabled[kNumCutscenes];
284 bool _conceptEnabled[kNumConcepts];
295 bool _isUtf8 =
false;
296 bool _transcodeChineseToSimplified =
false;
297 Font *_overrideFont =
nullptr;
302 extern int g_imuseState;
307 KEYCODE_JOY1_A = 512,
314 KEYCODE_JOY1_LEFTSTICK,
315 KEYCODE_JOY1_RIGHTSTICK,
338 KEYCODE_JOY2_LEFTSTICK,
339 KEYCODE_JOY2_RIGHTSTICK,
364 KEYCODE_AXIS_MOUSE_X,
365 KEYCODE_AXIS_MOUSE_Y,
366 KEYCODE_AXIS_MOUSE_Z,
370 #define NUM_JOY_AXES (KEYCODE_AXIS_JOY1_V - KEYCODE_AXIS_JOY1_X + 1) 371 #define NUM_JOY_BUTTONS (KEYCODE_JOY1_R2 - KEYCODE_JOY1_A + 1) bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: grim.h:88
RendererType
Definition: renderer.h:45
EngineFeature
Definition: engine.h:253
EventType
Definition: events.h:49
Definition: savegame.h:33
const Common::List< Actor * > & getActiveActors() const
Definition: grim.h:152
Definition: textobject.h:84
Definition: gfx_base.h:62
Actor represents a 3D character on screen.
Definition: actor.h:72
Definition: keyboard.h:294
Definition: textobject.h:80
Add "-remastered' to gameid.
Definition: advancedDetector.h:157
Language
Definition: language.h:45