21#ifndef SCUMM_INSANE_MORTIMER_MORTIMER_H
22#define SCUMM_INSANE_MORTIMER_MORTIMER_H
24#include "engines/engine.h"
25#include "backends/keymapper/keymap.h"
26#include "audio/mixer.h"
27#include "common/random.h"
28#include "graphics/surface.h"
29#include "scumm/insane/mortimer/flight.h"
30#include "scumm/insane/mortimer/interview.h"
31#include "scumm/insane/mortimer/campaign.h"
32#include "scumm/insane/mortimer/castle.h"
33#include "scumm/insane/mortimer/scores.h"
34#include "scumm/smush/saud_stream.h"
56 enum CrashStage { kNoCrash, kCrashMovie, kRepairMovie };
59 bool selectDifficulty();
60 void setDifficulty(uint flight, uint riddle);
64 void saveCheckpoint(uint checkpoint);
65 void setScoreNameInput(
bool enabled);
66 bool finishHighScores();
67 uint introCount()
const;
68 bool loadIntro(uint index);
69 bool loadFlight(uint segment);
70 bool enterCampaignScene();
71 bool loadRegion(uint region);
72 bool loadRetailFlight(
const Common::String &name,
bool cached =
false);
73 bool followFlightBranch();
74 bool loadSubtitles(
const char *name);
75 void updateMovieContext();
76 bool startMovie(
bool preserveScreen =
false);
79 bool loadCrashMovie(
bool repair);
82 bool processInterview();
86 bool nextScene(
bool skip =
false);
87 bool restart(
bool all =
false);
90 MortimerFlight ¤tFlight() {
return _castleActive ? _castle : _flight; }
91 bool interactive()
const {
return _castleActive ? _castle.courseView() :
92 _crashStage == kNoCrash && !_interviewActive && _introIndex < 0 && _flight.interactive(); }
93 bool canFire()
const {
return interactive() && (!_castleActive || _castle.acceptsShots()); }
94 bool gameplay()
const {
return _interviewActive || _castleActive || _crashStage != kNoCrash ||
95 (_introIndex < 0 && (!_isDemo || _flight.interactive())); }
96 bool canPause()
const;
98 void updateSteering(
bool centerView =
false);
99 void updateView(
int x,
int y);
100 void updateInterface();
102 bool updateAutofire();
105 void draw(
bool paused =
false);
106 void drawSprite(
const MortimerSprite &sprite,
int x,
int y,
bool centered =
false,
const Common::Rect *clip =
nullptr);
107 void drawProjectile();
109 void drawDashboard();
110 bool speechPlaying()
const;
112 void playMovieSounds(
bool seek =
false);
113 void playCollisionSound();
117 bool addShellShock();
118 void clearShellShock();
120 const bool _isDemo, _restoredContent;
121 uint _flightDifficulty, _riddleDifficulty;
125 uint32 _score, _checkpointScore;
126 bool _girl, _pilotLoadRequested;
127 bool _highScoresActive, _highScoreEligible, _viewingHighScores;
128 MortimerHighScores _highScores;
130 MortimerCutscene _intro;
131 MortimerFlight _flight;
132 MortimerInterview _interview;
133 MortimerCastle _castle;
134 MortimerSubtitles _subtitles;
135 MortimerCampaign _campaign;
139 MortimerSound _scopeSound, _rescueSound, _collisionSound, _slimeSound, _slimeHitSound, _glowSound, _balloonSound;
140 MortimerSound _buttonSound, _payoutSound;
141 SaudStreamState _soundState;
151 MortimerFlight::Weapon _shotWeapon;
152 CrashStage _crashStage;
153 uint32 _nextFrameTime, _pauseTime;
156 uint _creditedRescues;
157 uint _segment, _carriedStones, _completedSpecies, _shellShocks, _shockFrame, _crashCount;
158 uint _uiFrame, _shotFrame, _glowFrame, _glowStones, _pendingGlowStones;
159 uint _fireButtons, _fireCountdown;
161 bool _finished, _controllerMode, _interviewActive, _castleActive;
162 bool _resourcesLoaded, _playingCached;
163 bool _needsRepair, _hitJolt;
164 bool _cheats, _programmer, _invulnerable;
SoundType
Definition: mixer.h:73
EngineFeature
Definition: engine.h:282
Definition: mortimer.h:40
Common::Error loadGameState(int slot) override
Common::Error run() override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
bool hasFeature(EngineFeature feature) const override
Common::String getSaveStateName(int slot) const override
void pauseEngineIntern(bool pause) override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: keyboard.h:294