ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
freescape.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 FREESCAPE_H
23 #define FREESCAPE_H
24 
25 #include "common/bitarray.h"
26 #include "common/events.h"
27 #include "engines/advancedDetector.h"
28 #include "graphics/managed_surface.h"
29 #include "graphics/surface.h"
30 
31 #include "audio/decoders/wave.h"
32 #include "audio/mixer.h"
33 #include "audio/softsynth/pcspk.h"
34 #include "graphics/framelimiter.h"
35 
36 #include "freescape/area.h"
37 #include "freescape/font.h"
38 #include "freescape/gfx.h"
39 #include "freescape/objects/entrance.h"
40 #include "freescape/objects/geometricobject.h"
41 #include "freescape/objects/sensor.h"
42 #include "freescape/sound.h"
43 
44 namespace Common {
45 class RandomSource;
46 }
47 
48 namespace Freescape {
49 
50 class Renderer;
51 
52 #define FREESCAPE_DATA_BUNDLE "freescape.dat"
53 
54 enum CameraMovement {
55  kForwardMovement,
56  kBackwardMovement,
57  kLeftMovement,
58  kRightMovement
59 };
60 
61 enum FreescapeAction {
62  kActionNone,
63  kActionEscape,
64  kActionSave,
65  kActionLoad,
66  kActionToggleSound,
67  kActionMoveUp,
68  kActionMoveDown,
69  kActionMoveLeft,
70  kActionMoveRight,
71  kActionShoot,
72  kActionChangeAngle,
73  kActionChangeStepSize,
74  kActionToggleRiseLower,
75  kActionRiseOrFlyUp,
76  kActionLowerOrFlyDown,
77  kActionChangeMode,
78  kActionSkip,
79  kActionFaceForward,
80  kActionRotateUp,
81  kActionRotateDown,
82  kActionRotateLeft,
83  kActionRotateRight,
84  kActionTurnBack,
85  kActionInfoMenu,
86  kActionIncreaseStepSize,
87  kActionDecreaseStepSize,
88  kActionToggleFlyMode,
89  kActionToggleClipMode,
90  // Driller
91  kActionDeployDrillingRig,
92  kActionCollectDrillingRig,
93  // Total Eclipse
94  kActionRest,
95  // Castle
96  kActionRunMode,
97  kActionWalkMode,
98  kActionCrawlMode,
99  kActionSelectPrince,
100  kActionSelectPrincess,
101  kActionQuit,
102 };
103 
104 typedef Common::HashMap<uint16, Area *> AreaMap;
105 typedef Common::Array<byte *> ColorMap;
106 typedef Common::HashMap<uint16, int32> StateVars;
107 
108 enum {
109  kFreescapeDebugMove = 1,
110  kFreescapeDebugParser,
111  kFreescapeDebugCode,
112  kFreescapeDebugMedia,
113  kFreescapeDebugGroup,
114 };
115 
116 enum {
117  kFreescapeDefaultVolume = 192,
118 };
119 
120 enum GameStateControl {
121  kFreescapeGameStateStart,
122  kFreescapeGameStatePlaying,
123  kFreescapeGameStateDemo,
124  kFreescapeGameStateEnd,
125  kFreescapeGameStateRestart,
126 };
127 
129  int areaId;
130  byte *palette;
131 };
132 
133 extern Common::String shiftStr(const Common::String &str, int shift);
134 
136 public:
138  // EventManager API
139  bool pollEvent(Common::Event &event);
140  void purgeKeyboardEvents();
141  void purgeMouseEvents();
142  void pushEvent(Common::Event &event);
143  void clearExitEvents();
144 
145 private:
146  // for continuous events (keyDown)
147  enum {
148  kKeyRepeatInitialDelay = 400,
149  kKeyRepeatSustainDelay = 100
150  };
151 
152  Common::EventManager *_delegate;
153 
154  Common::KeyState _currentKeyDown;
155  Common::CustomEventType _currentActionDown;
156  uint32 _keyRepeatTime;
157 };
158 
159 class FreescapeEngine : public Engine {
160 
161 public:
162  FreescapeEngine(OSystem *syst, const ADGameDescription *gd);
163  ~FreescapeEngine();
164 
165  const ADGameDescription *_gameDescription;
166  GameStateControl _gameStateControl;
167  bool isDemo() const;
168 
169  // Game selection
170  uint32 _variant;
171  Common::Language _language;
172  bool isSpaceStationOblivion() { return _targetName.hasPrefix("spacestationoblivion"); }
173  bool isDriller() { return _targetName.hasPrefix("driller") || _targetName.hasPrefix("spacestationoblivion"); }
174  bool isDark() { return _targetName.hasPrefix("darkside"); }
175  bool isEclipse() { return _targetName.hasPrefix("totaleclipse"); } // This will match Total Eclipse 1 and 2.
176  bool isEclipse2() { return _targetName.hasPrefix("totaleclipse2"); }
177  bool isCastle() { return _targetName.hasPrefix("castle"); }
178  bool isAmiga() { return _gameDescription->platform == Common::kPlatformAmiga; }
179  bool isAtariST() { return _gameDescription->platform == Common::kPlatformAtariST; }
180  bool isDOS() { return _gameDescription->platform == Common::kPlatformDOS; }
181  bool isSpectrum() { return _gameDescription->platform == Common::kPlatformZX; }
182  bool isCPC() { return _gameDescription->platform == Common::kPlatformAmstradCPC; }
183  bool isC64() { return _gameDescription->platform == Common::kPlatformC64; }
184 
185  Common::Error run() override;
186 
187  // UI
188  Common::Rect _viewArea;
189  Common::Rect _fullscreenViewArea;
190  void centerCrossair();
191 
192  virtual void borderScreen();
193  virtual void titleScreen();
194 
195  void drawFullscreenSurface(Graphics::Surface *surface);
196  virtual void loadBorder();
197  virtual void processBorder();
198  void waitInLoop(int maxWait);
199  void drawBorder();
200  void drawTitle();
201  virtual void drawBackground();
202  void clearBackground();
203  virtual void drawUI();
204  virtual void drawInfoMenu();
205  void drawBorderScreenAndWait(Graphics::Surface *surface, int maxWait = INT_MAX);
206 
207  virtual void drawCrossair(Graphics::Surface *surface);
208  Graphics::ManagedSurface *_border;
209  Graphics::ManagedSurface *_title;
210  Graphics::ManagedSurface *_background;
211 
212  Texture *_borderTexture;
213  Texture *_titleTexture;
214  Texture *_uiTexture;
215  Texture *_skyTexture;
216 
218  Common::HashMap<uint16, Texture *> _borderCGAByArea;
219  Common::HashMap<uint16, byte *> _paletteCGAByArea;
220 
221  // Parsing assets
222  uint8 _binaryBits;
223  virtual void loadAssets();
224  virtual void loadAssetsDemo();
225  virtual void loadAssetsFullGame();
226 
227  virtual void loadAssetsAtariFullGame();
228  virtual void loadAssetsAtariDemo();
229 
230  virtual void loadAssetsAmigaFullGame();
231  virtual void loadAssetsAmigaDemo();
232 
233  virtual void loadAssetsDOSFullGame();
234  virtual void loadAssetsDOSDemo();
235 
236  virtual void loadAssetsZXFullGame();
237  virtual void loadAssetsZXDemo();
238 
239  virtual void loadAssetsCPCFullGame();
240  virtual void loadAssetsCPCDemo();
241 
242  virtual void loadAssetsC64FullGame();
243  virtual void loadAssetsC64Demo();
244 
245  virtual void drawDOSUI(Graphics::Surface *surface);
246  virtual void drawZXUI(Graphics::Surface *surface);
247  virtual void drawCPCUI(Graphics::Surface *surface);
248  virtual void drawC64UI(Graphics::Surface *surface);
249  virtual void drawAmigaAtariSTUI(Graphics::Surface *surface);
250 
251  Common::Archive *_dataBundle;
252  void loadDataBundle();
253  Graphics::Surface *loadBundledImage(const Common::String &name, bool appendRenderMode = true);
254  byte *getPaletteFromNeoImage(Common::SeekableReadStream *stream, int offset);
255  Graphics::ManagedSurface *loadAndConvertNeoImage(Common::SeekableReadStream *stream, int offset, byte *palette = nullptr);
256  Graphics::ManagedSurface *loadAndCenterScrImage(Common::SeekableReadStream *stream);
257  Graphics::ManagedSurface *loadAndConvertDoodleImage(Common::SeekableReadStream *bitmap, Common::SeekableReadStream *color1, Common::SeekableReadStream *color2, byte *palette);
258 
259  void loadPalettes(Common::SeekableReadStream *file, int offset);
260  byte *loadPalette(Common::SeekableReadStream *file);
261  void swapPalette(uint16 areaID);
262  virtual byte *findCGAPalette(uint16 levelID);
263  Common::HashMap<uint16, byte *> _paletteByArea;
264  void loadColorPalette();
265 
266  // Demo
267  Common::Array<byte> _demoData;
268  int _demoIndex;
269  int _currentDemoInputCode;
270  int _currentDemoInputRepetition;
271  Common::Array<Common::Event> _demoEvents;
272  Common::Point _currentDemoMousePosition;
273  void loadDemoData(Common::SeekableReadStream *file, int offset, int size);
274  int decodeAmigaAtariKey(int code);
275  int decodeDOSKey(int code);
276  Common::Event decodeDOSMouseEvent(int code, int repetition);
277 
278  uint16 readField(Common::SeekableReadStream *file, int nbits);
279  uint16 readPtr(Common::SeekableReadStream *file);
280  Common::Array<uint16> readArray(Common::SeekableReadStream *file, int size);
281 
282  // 8-bit
283  void load8bitBinary(Common::SeekableReadStream *file, int offset, int ncolors);
284  Area *load8bitArea(Common::SeekableReadStream *file, uint16 ncolors);
285  Object *load8bitObject(Common::SeekableReadStream *file);
286  Group *load8bitGroup(Common::SeekableReadStream *file, byte rawFlagsAndType);
287  Group *load8bitGroupV1(Common::SeekableReadStream *file, byte rawFlagsAndType);
288  Group *load8bitGroupV2(Common::SeekableReadStream *file, byte rawFlagsAndType);
289 
290  void loadGlobalObjects(Common::SeekableReadStream *file, int offset, int size);
291  void renderPixels8bitBinImage(Graphics::ManagedSurface *surface, int row, int column, int bit, int count);
292 
293  void renderPixels8bitBinCGAImage(Graphics::ManagedSurface *surface, int &i, int &j, uint8 pixels, int color);
294  void renderPixels8bitBinEGAImage(Graphics::ManagedSurface *surface, int &i, int &j, uint8 pixels, int color);
295 
296  Graphics::ManagedSurface *load8bitBinImage(Common::SeekableReadStream *file, int offset);
297  void load8bitBinImageRow(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row);
298  void load8bitBinImageRowIteration(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int bit);
299  int execute8bitBinImageCommand(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int pixels, int bit);
300  int execute8bitBinImageSingleCommand(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int pixels, int bit, int count);
301  int execute8bitBinImageMultiCommand(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int pixels, int bit, int count);
302 
303  void parseAmigaAtariHeader(Common::SeekableReadStream *file);
304  Common::SeekableReadStream *decryptFileAmigaAtari(const Common::Path &packed, const Common::Path &unpacker, uint32 unpackArrayOffset);
305 
306  // Areas
307  uint16 _startArea;
308  uint16 _endArea;
309  AreaMap _areaMap;
310  Area *_currentArea;
311  bool _gotoExecuted;
312  Math::Vector3d _scale;
313 
314  virtual void gotoArea(uint16 areaID, int entranceID);
315  // Entrance
316  uint16 _startEntrance;
317  uint16 _endEntrance;
319 
320  // Input
321  bool _demoMode;
322  bool _disableDemoMode;
323  bool _flyMode;
324  bool _shootMode;
325  bool _noClipMode;
326  bool _invertY;
327  virtual void initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *infoScreenKeyMap, const char *target);
328  EventManagerWrapper *_eventManager;
329  void processInput();
330  void resetInput();
331  void generateDemoInput();
332  virtual void pressedKey(const int keycode);
333  virtual void releasedKey(const int keycode);
334  Common::Point getNormalizedPosition(Common::Point position);
335  virtual bool onScreenControls(Common::Point mouse);
336  void move(CameraMovement direction, uint8 scale, float deltaTime);
337  void resolveCollisions(Math::Vector3d newPosition);
338  virtual void checkIfStillInArea();
339  void changePlayerHeight(int index);
340  void increaseStepSize();
341  void decreaseStepSize();
342  void changeStepSize();
343 
344  void changeAngle();
345  bool rise();
346  void lower();
347  bool checkFloor(Math::Vector3d currentPosition);
348  bool tryStepUp(Math::Vector3d currentPosition);
349  bool tryStepDown(Math::Vector3d currentPosition);
350  bool _hasFallen;
351  int _maxFallingDistance;
352  int _maxShield;
353  int _maxEnergy;
354 
355  void rotate(float xoffset, float yoffset);
356  // Input state
357  float _lastFrame;
358 
359  // Interaction
360  void activate();
361  void shoot();
362  void traverseEntrance(uint16 entranceID);
363 
364  // Euler Angles
365  float _yaw;
366  float _pitch;
367  int _angleRotationIndex;
368  Common::Array<float> _angleRotations;
369 
370  Math::Vector3d directionToVector(float pitch, float heading, bool useTable);
371  void updateCamera();
372 
373  // Camera options
374  Common::Point _crossairPosition;
375  float _mouseSensitivity;
376  Math::Vector3d _upVector; // const
377  Math::Vector3d _cameraFront, _cameraRight;
378  // Spacial attributes
379  Math::Vector3d _position, _rotation, _velocity;
380  Math::Vector3d _lastPosition;
381  int _playerHeightNumber;
382  int _playerHeightMaxNumber;
383  uint16 _playerHeight;
384  uint16 _playerWidth;
385  uint16 _playerDepth;
386  uint16 _stepUpDistance;
387 
388  int _playerStepIndex;
389  Common::Array<int> _playerSteps;
390 
391  Common::Point crossairPosToMousePos(const Common::Point crossairPos);
392  Common::Point mousePosToCrossairPos(const Common::Point mousePos);
393  void warpMouseToCrossair(void);
394 
395  // Effects
396  Common::Array<Common::String> _conditionSources;
398 
399  bool runCollisionConditions(Math::Vector3d const lastPosition, Math::Vector3d const newPosition);
400  Math::Vector3d _objExecutingCodeSize;
401  bool _executingGlobalCode;
402  virtual void executeMovementConditions();
403  bool executeObjectConditions(GeometricObject *obj, bool shot, bool collided, bool activated);
404  void executeEntranceConditions(Entrance *entrance);
405  void executeLocalGlobalConditions(bool shot, bool collided, bool timer);
406  bool executeCode(FCLInstructionVector &code, bool shot, bool collided, bool timer, bool activated);
407 
408  // Instructions
409  bool checkConditional(FCLInstruction &instruction, bool shot, bool collided, bool timer, bool activated);
410  bool checkIfGreaterOrEqual(FCLInstruction &instruction);
411  bool checkIfLessOrEqual(FCLInstruction &instruction);
412  void executeExecute(FCLInstruction &instruction, bool shot, bool collided, bool activated);
413  void executeIncrementVariable(FCLInstruction &instruction);
414  void executeDecrementVariable(FCLInstruction &instruction);
415  void executeSetVariable(FCLInstruction &instruction);
416  void executeGoto(FCLInstruction &instruction);
417  void executeIfThenElse(FCLInstruction &instruction);
418  virtual void executeMakeInvisible(FCLInstruction &instruction);
419  void executeMakeVisible(FCLInstruction &instruction);
420  void executeToggleVisibility(FCLInstruction &instruction);
421  virtual void executeDestroy(FCLInstruction &instruction);
422  virtual void executeRedraw(FCLInstruction &instruction);
423  void executeSound(FCLInstruction &instruction);
424  void executeDelay(FCLInstruction &instruction);
425  bool executeEndIfNotEqual(FCLInstruction &instruction);
426  void executeSetBit(FCLInstruction &instruction);
427  void executeClearBit(FCLInstruction &instruction);
428  void executeToggleBit(FCLInstruction &instruction);
429  bool executeEndIfBitNotEqual(FCLInstruction &instruction);
430  bool executeEndIfVisibilityIsEqual(FCLInstruction &instruction);
431  void executeSwapJet(FCLInstruction &instruction);
432  virtual void executePrint(FCLInstruction &instruction);
433  void executeSPFX(FCLInstruction &instruction);
434  void executeStartAnim(FCLInstruction &instruction);
435 
436  // Sound
437  Audio::SoundHandle _soundFxHandle;
438  Audio::SoundHandle _musicHandle;
439  Freescape::SizedPCSpeaker *_speaker;
440 
441  bool _syncSound;
442  bool _firstSound;
443  bool _usePrerecordedSounds;
444  void waitForSounds();
445  void stopAllSounds();
446  bool isPlayingSound();
447  void playSound(int index, bool sync);
448  void playWav(const Common::Path &filename);
449  void playMusic(const Common::Path &filename);
450  void queueSoundConst(double hzFreq, int duration);
451  void playSilence(int duration, bool sync);
452  void playSoundConst(double hzFreq, int duration, bool sync);
453  void playSoundSweepIncWL(double hzFreq1, double hzFreq2, double wlStepPerMS, int resolution, bool sync);
454  uint16 playSoundDOSSpeaker(uint16 startFrequency, soundSpeakerFx *speakerFxInfo);
455  void playSoundDOS(soundSpeakerFx *speakerFxInfo, bool sync);
456 
457  virtual void playSoundFx(int index, bool sync);
458  virtual void loadSoundsFx(Common::SeekableReadStream *file, int offset, int number);
460  void loadSpeakerFxDOS(Common::SeekableReadStream *file, int offsetFreq, int offsetDuration);
461  void loadSpeakerFxZX(Common::SeekableReadStream *file, int sfxTable, int sfxData);
463 
464  void playSoundZX(Common::Array<soundUnitZX> *data);
466  int _soundIndexShoot;
467  int _soundIndexCollide;
468  int _soundIndexFall;
469  int _soundIndexClimb;
470  int _soundIndexMenu;
471  int _soundIndexStart;
472  int _soundIndexAreaChange;
473  int _soundIndexHit;
474 
475  int _soundIndexNoShield;
476  int _soundIndexNoEnergy;
477  int _soundIndexFallen;
478  int _soundIndexTimeout;
479  int _soundIndexForceEndGame;
480  int _soundIndexCrushed;
481  int _soundIndexMissionComplete;
482 
483  // Rendering
484  int _screenW, _screenH;
485  Renderer *_gfx;
486  Graphics::FrameLimiter *_frameLimiter;
487  bool _vsyncEnabled;
488  Common::RenderMode _renderMode;
489  ColorMap _colorMap;
490  int _underFireFrames;
491  int _avoidRenderingFrames;
492  int _shootingFrames;
493  GeometricObject *_delayedShootObject;
494  void drawFrame();
495  void flashScreen(int backgroundColor);
496  uint8 _colorNumber;
497  Math::Vector3d _scaleVector;
498  float _nearClipPlane;
499  float _farClipPlane;
500 
501  // Text messages and Fonts
502  void insertTemporaryMessage(const Common::String message, int deadline);
503  void getLatestMessages(Common::String &message, int &deadline);
504  void clearTemporalMessages();
505  Common::StringArray _temporaryMessages;
506  Common::Array<int> _temporaryMessageDeadlines;
507  Common::StringArray _messagesList;
508  Common::String _noShieldMessage;
509  Common::String _noEnergyMessage;
510  Common::String _fallenMessage;
511  Common::String _timeoutMessage;
512  Common::String _forceEndGameMessage;
513  Common::String _crushedMessage;
514  Common::String _outOfReachMessage;
515  Common::String _noEffectMessage;
516 
517  void loadMessagesFixedSize(Common::SeekableReadStream *file, int offset, int size, int number);
518  virtual void loadMessagesVariableSize(Common::SeekableReadStream *file, int offset, int number);
519  void drawFullscreenMessageAndWait(Common::String message);
520  void drawFullscreenMessage(Common::String message, uint32 front, Graphics::Surface *surface);
521 
522  // Font loading and rendering
523  void loadFonts(Common::SeekableReadStream *file, int offset);
524  void loadFonts(byte *font, int charNumber);
525  Common::Array<Graphics::ManagedSurface *> getChars(Common::SeekableReadStream *file, int offset, int charsNumber);
526  Common::Array<Graphics::ManagedSurface *> getCharsAmigaAtariInternal(int sizeX, int sizeY, int additional, int m1, int m2, Common::SeekableReadStream *file, int offset, int charsNumber);
527  Common::Array<Graphics::ManagedSurface *> getCharsAmigaAtari(Common::SeekableReadStream *file, int offset, int charsNumber);
528  Common::StringArray _currentAreaMessages;
529  Common::StringArray _currentEphymeralMessages;
530  Font _font;
531  bool _fontLoaded;
532  virtual void drawStringInSurface(const Common::String &str, int x, int y, uint32 fontColor, uint32 backColor, Graphics::Surface *surface, int offset = 0);
533  virtual void drawStringInSurface(const Common::String &str, int x, int y, uint32 primaryFontColor, uint32 secondaryFontColor, uint32 backColor, Graphics::Surface *surface, int offset = 0);
534  Graphics::Surface *drawStringsInSurface(const Common::Array<Common::String> &lines, Graphics::Surface *surface);
535 
536  // Game state
537  virtual void initGameState();
538  void setGameBit(int index);
539  void clearGameBit(int index);
540  void toggleGameBit(int index);
541  uint16 getGameBit(int index);
542 
543  StateVars _gameStateVars;
544  uint32 _gameStateBits;
545  void checkIfPlayerWasCrushed();
546  virtual bool checkIfGameEnded();
547  virtual void endGame();
548  int _endGameDelayTicks;
549  bool _endGameKeyPressed;
550  bool _endGamePlayerEndArea;
551  bool _forceEndGame;
552  bool _playerWasCrushed;
553  Common::HashMap<uint16, bool> _exploredAreas;
554  ObjectArray _sensors;
555  virtual void checkSensors();
556  virtual void drawSensorShoot(Sensor *sensor);
557  void takeDamageFromSensor();
558 
559  bool hasFeature(EngineFeature f) const override;
560  bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override { return true; }
561  bool canSaveAutosaveCurrently() override { return false; }
562  bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override { return _gameStateControl == kFreescapeGameStatePlaying && _currentArea; }
563  Common::Error loadGameStream(Common::SeekableReadStream *stream) override;
564  Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
565  virtual Common::Error saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave = false);
566  virtual Common::Error loadGameStreamExtended(Common::SeekableReadStream *stream);
567  Graphics::Surface *_savedScreen;
568 
569  void pauseEngineIntern(bool pause) override;
570 
571  // Timers
572  bool startCountdown(uint32 delay);
573  void removeTimers();
574  bool _timerStarted;
575  int _initialCountdown;
576  int _countdown;
577  int _ticks;
578  int _ticksFromEnd;
579  int _lastTick;
580  int _lastMinute;
581 
582  void getTimeFromCountdown(int &seconds, int &minutes, int &hours);
583  virtual void updateTimeVariables();
584 
585  // Cheats
586  bool _useExtendedTimer;
587  bool _disableSensors;
588  bool _disableFalling;
589 
590  // Random
591  Common::RandomSource *_rnd;
592 };
593 
594 enum GameReleaseFlags {
595  GF_AMIGA_RETAIL = (1 << 0),
596  GF_AMIGA_BUDGET = (1 << 1),
597  GF_ZX_RETAIL = (1 << 2),
598  GF_ZX_BUDGET = (1 << 3),
599  GF_ZX_DISC = (1 << 4),
600  GF_CPC_RETAIL = (1 << 5),
601  GF_CPC_RETAIL_ALT = (1 << 6),
602  GF_CPC_BUDGET = (1 << 7),
603  GF_CPC_VIRTUALWORLDS = (1 << 8),
604  GF_ATARI_RETAIL = (1 << 9),
605  GF_ATARI_BUDGET = (1 << 10),
606  GF_C64_RETAIL = (1 << 11),
607  GF_C64_BUDGET = (1 << 12),
608 };
609 
610 extern FreescapeEngine *g_freescape;
611 
612 } // namespace Freescape
613 
614 #endif // FREESCAPE_H
Definition: geometricobject.h:34
Definition: managed_surface.h:51
Definition: group.h:40
Definition: sound.h:45
Definition: framelimiter.h:37
Definition: keymap.h:66
Definition: str.h:59
Definition: surface.h:67
EngineFeature
Definition: engine.h:253
Definition: stream.h:77
Definition: error.h:84
bool canSaveAutosaveCurrently() override
Definition: freescape.h:561
Definition: area.h:36
Definition: freescape.h:135
Definition: advancedDetector.h:163
Definition: random.h:44
RenderMode
Definition: rendermode.h:48
Definition: rect.h:144
Definition: area.h:40
Definition: path.h:52
uint32 CustomEventType
Definition: events.h:193
Definition: stream.h:745
Definition: archive.h:141
Definition: freescape.h:159
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: freescape.h:562
Definition: mixer.h:49
Definition: gfx.h:60
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: sensor.h:34
Definition: ustr.h:57
Definition: events.h:199
Definition: algorithm.h:29
Definition: rect.h:45
Definition: entrance.h:34
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: font.h:32
Definition: keyboard.h:294
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: freescape.h:560
Definition: object.h:56
Definition: sound.h:54
Definition: system.h:161
Definition: instruction.h:36
Definition: freescape.h:128
Common::Platform platform
Definition: advancedDetector.h:198
Definition: events.h:472
Definition: engine.h:144
Definition: gfx.h:47
Language
Definition: language.h:45