21#ifndef SCUMM_INSANE_MORTIMER_CASTLE_H
22#define SCUMM_INSANE_MORTIMER_CASTLE_H
24#include "common/random.h"
25#include "scumm/insane/mortimer/flight.h"
26#include "scumm/insane/mortimer/text.h"
33 bool start(
int scene, uint flightDifficulty, uint riddleDifficulty,
bool girl);
40 void clearDamage() { _damage = 0; }
41 void forceChoice(
bool correct) { _forcedChoice = correct ? 1 : 2; }
42 void setProgrammer(
bool enabled) { _programmer = enabled; }
46 bool needsMovie()
const {
return _moviePending; }
47 bool courseView()
const {
return _stage <= kExit && interactive(); }
48 bool acceptsShots()
const {
return (_stage == kEntry || _stage == kRoom) && !_choosing && !_leaving && !_holdFrames; }
49 bool choosing()
const {
return _choosing; }
50 bool paused()
const {
return _choosing || _stage == kIdle || _holdFrames; }
51 bool finished()
const {
return _stage == kFinished; }
52 bool solved()
const {
return _stage == kCorrect || _stage == kFinished; }
53 bool hasSpeech()
const {
return _nextVoice < _voices.
size(); }
54 bool forceSubtitles()
const {
return _stage == kSong; }
55 uint damage()
const {
return _damage; }
57 const char *subtitleName()
const;
59 const Common::String &errorMessage()
const {
return _error.empty() ? MortimerMovie::errorMessage() : _error; }
62 void handleAction(
const byte *data, uint32 size)
override;
65 enum Stage { kEntry, kRoom, kLeft, kDrop, kExit, kGate, kSong, kIdle, kRiddle, kWrong, kCorrect, kFinished };
68 uint next = 0, count = 0, size = 0;
74 void enter(Stage stage);
75 void retry(
bool crash);
78 void selectSide(uint side);
79 int animal(uint side)
const;
87 SpeechBlock _speechBlocks[2];
90 uint _nextVoice, _flightDifficulty, _riddleDifficulty, _puzzle, _step, _damage, _checkpointDamage;
91 uint _wrongChoices, _crashes, _frame, _choiceFrame, _hintFrames, _holdFrames;
92 uint _rooms[5], _sides[6];
93 int _answer, _selection, _forcedChoice;
95 bool _moviePending, _choosing, _leaving, _correct, _resourcesLoaded, _programmer;
size_type size() const
Definition: array.h:316