ScummVM API documentation
groovie.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 GROOVIE_GROOVIE_H
23#define GROOVIE_GROOVIE_H
24
25#include "groovie/debug.h"
26#include "groovie/font.h"
27
28#include "engines/engine.h"
29#include "graphics/pixelformat.h"
30#include "groovie/detection.h"
31
32namespace Common {
33class MacResManager;
34}
35
51namespace Groovie {
52
53class GraphicsMan;
54class GrvCursorMan;
55class MusicPlayer;
56class ResMan;
57class Script;
58class VideoPlayer;
59
60enum DebugLevels {
61 kDebugVideo = 1,
62 kDebugResource,
63 kDebugScript,
64 kDebugUnknown,
65 kDebugHotspots,
66 kDebugCursor,
67 kDebugMIDI,
68 kDebugScriptvars,
69 kDebugLogic,
70 kDebugFast,
71 //kDebugTlcGame,
72};
73
82 kGroovieSpeedNormal,
83 kGroovieSpeedFast
84};
85
86enum GROOVIEAction {
87 kActionNone,
88 kActionSkip
89};
90
91#define MAX_SAVES 25
92
93struct GroovieGameDescription;
94
97 uint32 _loops;
98};
99
101public:
103 void setVM(GroovieEngine *vm);
104 void queue(Common::SeekableReadStream *soundfile, uint32 loops);
105 void tick();
106 void stopAll();
107
108protected:
109 void deleteFile();
110 VideoPlayer *_player;
111 GroovieEngine *_vm;
114};
115
116class GroovieEngine : public Engine {
117public:
118 static const int AUTOSAVE_SLOT;
119
121 ~GroovieEngine() override;
122
123 Common::Platform getPlatform() const;
124 EngineVersion getEngineVersion() const;
125
126 int getAutosaveSlot() const override;
127 bool canLaunchLoad() const;
128 bool isDemo() const;
129
130protected:
131
132 // Engine APIs
133 Common::Error run() override;
134 void pauseEngineIntern(bool pause) override;
135
136 bool hasFeature(EngineFeature f) const override;
137
138 bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
139 bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
140 Common::Error loadGameState(int slot) override;
141 Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
142 void syncSoundSettings() override;
143
144public:
145 void waitForInput();
146 bool isWaitingForInput() { return _waitingForInput; }
147
148 Graphics::PixelFormat _pixelFormat;
149 bool _spookyMode;
150 Script *_script;
151 ResMan *_resMan;
152 GrvCursorMan *_grvCursorMan;
153 VideoPlayer *_videoPlayer;
154 SoundEffectQueue _soundQueue;
155 MusicPlayer *_musicPlayer;
156 GraphicsMan *_graphicsMan;
157 const Graphics::Font *_font;
158
159 Common::MacResManager *_macResFork;
160
161 GameSpeed _modeSpeed;
162
163private:
164 const GroovieGameDescription *_gameDescription;
165 bool _waitingForInput;
166 T7GFont _sphinxFont;
167};
168
169} // End of namespace Groovie
170
171#endif // GROOVIE_GROOVIE_H
Definition: error.h:81
Definition: macresman.h:126
Definition: queue.h:42
Definition: stream.h:745
Definition: str.h:59
Definition: ustr.h:57
Definition: engine.h:149
EngineFeature
Definition: engine.h:282
Definition: font.h:83
Definition: graphics.h:31
Definition: groovie.h:116
bool hasFeature(EngineFeature f) const override
Common::Error loadGameState(int slot) override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
void pauseEngineIntern(bool pause) override
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
int getAutosaveSlot() const override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
void syncSoundSettings() override
Common::Error run() override
Definition: cursor.h:49
Definition: music.h:40
Definition: resource.h:39
Definition: script.h:55
Definition: groovie.h:100
Definition: font.h:30
Definition: player.h:36
Definition: system.h:166
Platform
Definition: platform.h:93
Definition: algorithm.h:29
Definition: cursor.h:32
GameSpeed
Definition: groovie.h:81
Definition: pixelformat.h:138
Definition: detection.h:37
Definition: groovie.h:95