ScummVM API documentation
made.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 MADE_MADE_H
23#define MADE_MADE_H
24
25#include "made/sound.h"
26#include "made/detection.h"
27
28#include "engines/engine.h"
29
30#include "common/random.h"
31#include "common/text-to-speech.h"
32
44namespace Made {
45
46const uint32 kTimerResolution = 40;
47
48class ResourceReader;
49class PmvPlayer;
50class Screen;
51class ScriptInterpreter;
52class GameDatabase;
53class MusicPlayer;
54class MadeConsole;
55
56enum MADEAction {
57 kActionNone,
58 kActionCursorUp,
59 kActionCursorDown,
60 kActionCursorLeft,
61 kActionCursorRight,
62 kActionMenu,
63 kActionSaveGame,
64 kActionLoadGame,
65 kActionRepeatMessage
66};
67
68
69class MadeEngine : public ::Engine {
70protected:
71
72 // Engine APIs
73 Common::Error run() override;
74
75public:
76 MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc);
77 ~MadeEngine() override;
78
79 bool hasFeature(EngineFeature f) const override;
80 void syncSoundSettings() override;
81
83 const MadeGameDescription *_gameDescription;
84 uint32 getGameID() const;
85 uint32 getFeatures() const;
86 uint8 getVersion() const;
87 uint8 getSubVersion() const;
88 Common::Platform getPlatform() const;
89 Common::Language getLanguage() const;
90
91public:
92 PmvPlayer *_pmvPlayer;
93 ResourceReader *_res;
94 Screen *_screen;
95 GameDatabase *_dat;
96 ScriptInterpreter *_script;
97 MusicPlayer *_music;
98
99 bool _useWinCursors;
100
101 uint16 _eventNum;
102 int _eventMouseX, _eventMouseY;
103 uint16 _eventKey;
104
105 int _soundRate;
106 bool _autoStopSound;
107 uint _soundEnergyIndex;
108 SoundEnergyArray *_soundEnergyArray;
109
110 uint32 _musicBeatStart;
111 uint32 _cdTimeStart;
112 bool _introMusicDigital;
113
114 Common::CodePage _ttsTextEncoding;
115 int _previousRect;
116 int _previousTextBox;
117 bool _saveLoadScreenOpen;
118 bool _openingCreditsOpen;
119 bool _tapeRecorderOpen;
120
121 bool _voiceText;
122 bool _forceVoiceText;
123 bool _forceQueueText;
124
125#ifdef USE_TTS
126 Common::String _rtzSaveLoadButtonText[2];
127 uint8 _rtzFirstSaveSlot;
128 uint8 _rtzSaveLoadIndex;
129
130 Common::String _tapeRecorderText[4];
131 uint8 _tapeRecorderIndex;
132
133 Common::String _playOMaticButtonText[4];
134 uint8 _playOMaticButtonIndex;
135#endif
136
137 int32 _timers[50];
138 int16 getTicks();
139 int16 getTimer(int16 timerNum);
140 void setTimer(int16 timerNum, int16 value);
141 void resetTimer(int16 timerNum);
142 int16 allocTimer();
143 void freeTimer(int16 timerNum);
144 void resetAllTimers();
145
146 void sayText(const Common::String &text, Common::TextToSpeechManager::Action action = Common::TextToSpeechManager::INTERRUPT) const;
147 void stopTextToSpeech() const;
148#ifdef USE_TTS
149 void checkHoveringSaveLoadScreen();
150 void checkHoveringPlayOMatic(int16 spriteY = -1);
151#endif
152
153 const Common::String getTargetName() { return _targetName; }
154 Common::String getSavegameFilename(int16 saveNum);
155
156 void handleEvents();
157
158protected:
159 void pauseEngineIntern(bool pause) override;
160};
161
162} // End of namespace Made
163
164#endif /* MADE_H */
Definition: array.h:52
Definition: error.h:81
Definition: random.h:44
Definition: str.h:59
Definition: engine.h:149
const Common::String _targetName
Definition: engine.h:186
EngineFeature
Definition: engine.h:282
Definition: database.h:123
Definition: made.h:69
Common::Error run() override
void syncSoundSettings() override
void pauseEngineIntern(bool pause) override
bool hasFeature(EngineFeature f) const override
Definition: music.h:48
Definition: pmvplayer.h:44
Definition: resource.h:188
Definition: screen.h:76
Definition: script.h:90
Definition: system.h:166
Language
Definition: language.h:45
Platform
Definition: platform.h:93
Definition: console.h:27
Definition: detection.h:45
Definition: atari-screen.h:58