ScummVM API documentation
draci.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 DRACI_DRACI_H
23 #define DRACI_DRACI_H
24 
25 #include "engines/engine.h"
26 #include "common/random.h"
27 #include "draci/console.h"
28 
29 struct ADGameDescription;
30 
31 class MidiDriver;
32 class OSystem;
33 
42 namespace Draci {
43 
44 enum DRACIAction {
45  kActionNone,
46  kActionEscape,
47  kActionMap,
48  kActionShowWalkMap,
49  kActionToggleWalkSpeed,
50  kActionInventory,
51  kActionOpenMainMenu,
52  kActionTogglePointerItem,
53  kActionInvRotatePrevious,
54  kActionInvRotateNext
55 };
56 
57 class Screen;
58 class Mouse;
59 class Game;
60 class Script;
61 class AnimationManager;
62 class Sound;
63 class MusicPlayer;
64 class Font;
65 class BArchive;
66 class SoundArchive;
67 
68 class DraciEngine : public Engine {
69 public:
70  DraciEngine(OSystem *syst, const ADGameDescription *gameDesc);
71  ~DraciEngine() override;
72 
73  int init();
74  Common::Error run() override;
75 
76  bool hasFeature(Engine::EngineFeature f) const override;
77  void pauseEngineIntern(bool pause) override;
78  void syncSoundSettings() override;
79 
80  void handleEvents();
81 
82  static Common::String getSavegameFile(int saveGameIdx);
83  Common::String getSaveStateName(int slot) const override { return getSavegameFile(slot); }
84  Common::Error loadGameState(int slot) override;
85  bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
86  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
87  bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
88 
89  Screen *_screen;
90  Mouse *_mouse;
91  Game *_game;
92  Script *_script;
93  AnimationManager *_anims;
94  Sound *_sound;
95  MusicPlayer *_music;
96 
97  Font *_smallFont;
98  Font *_bigFont;
99 
100  BArchive *_iconsArchive;
101  BArchive *_objectsArchive;
102  BArchive *_spritesArchive;
103  BArchive *_paletteArchive;
104  BArchive *_roomsArchive;
105  BArchive *_overlaysArchive;
106  BArchive *_animationsArchive;
107  BArchive *_walkingMapsArchive;
108  BArchive *_itemsArchive;
109  BArchive *_itemImagesArchive;
110  BArchive *_initArchive;
111  BArchive *_stringsArchive;
112 
113  SoundArchive *_soundsArchive;
114  SoundArchive *_dubbingArchive;
115 
116  bool _showWalkingMap;
117 
119 
120  int32 _pauseStartTime;
121 };
122 
123 enum {
124  kDraciGeneralDebugLevel = 1 << 0,
125  kDraciBytecodeDebugLevel = 1 << 1,
126  kDraciArchiverDebugLevel = 1 << 2,
127  kDraciLogicDebugLevel = 1 << 3,
128  kDraciAnimationDebugLevel = 1 << 4,
129  kDraciSoundDebugLevel = 1 << 5,
130  kDraciWalkingDebugLevel = 1 << 6
131 };
132 
133 } // End of namespace Draci
134 
135 #endif // DRACI_DRACI_H
void pauseEngineIntern(bool pause) override
Definition: mouse.h:45
Definition: font.h:54
Common::String getSaveStateName(int slot) const override
Definition: draci.h:83
Definition: draci.h:68
Definition: str.h:59
EngineFeature
Definition: engine.h:253
Definition: error.h:84
Definition: advancedDetector.h:163
Definition: animation.h:176
Definition: random.h:44
Definition: atari-screen.h:60
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: mididrv.h:309
Definition: sound.h:182
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
void syncSoundSettings() override
Definition: script.h:93
Definition: music.h:33
Definition: ustr.h:57
bool hasFeature(Engine::EngineFeature f) const override
Definition: barchive.h:48
Definition: screen.h:39
Definition: game.h:188
Definition: animation.h:30
Common::Error run() override
Definition: system.h:161
Definition: engine.h:144
Common::Error loadGameState(int slot) override
Definition: sound.h:66
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override