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 class Screen;
45 class Mouse;
46 class Game;
47 class Script;
48 class AnimationManager;
49 class Sound;
50 class MusicPlayer;
51 class Font;
52 class BArchive;
53 class SoundArchive;
54 
55 class DraciEngine : public Engine {
56 public:
57  DraciEngine(OSystem *syst, const ADGameDescription *gameDesc);
58  ~DraciEngine() override;
59 
60  int init();
61  Common::Error run() override;
62 
63  bool hasFeature(Engine::EngineFeature f) const override;
64  void pauseEngineIntern(bool pause) override;
65  void syncSoundSettings() override;
66 
67  void handleEvents();
68 
69  static Common::String getSavegameFile(int saveGameIdx);
70  Common::String getSaveStateName(int slot) const override { return getSavegameFile(slot); }
71  Common::Error loadGameState(int slot) override;
72  bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
73  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
74  bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
75 
76  Screen *_screen;
77  Mouse *_mouse;
78  Game *_game;
79  Script *_script;
80  AnimationManager *_anims;
81  Sound *_sound;
82  MusicPlayer *_music;
83 
84  Font *_smallFont;
85  Font *_bigFont;
86 
87  BArchive *_iconsArchive;
88  BArchive *_objectsArchive;
89  BArchive *_spritesArchive;
90  BArchive *_paletteArchive;
91  BArchive *_roomsArchive;
92  BArchive *_overlaysArchive;
93  BArchive *_animationsArchive;
94  BArchive *_walkingMapsArchive;
95  BArchive *_itemsArchive;
96  BArchive *_itemImagesArchive;
97  BArchive *_initArchive;
98  BArchive *_stringsArchive;
99 
100  SoundArchive *_soundsArchive;
101  SoundArchive *_dubbingArchive;
102 
103  bool _showWalkingMap;
104 
106 
107  int32 _pauseStartTime;
108 };
109 
110 enum {
111  kDraciGeneralDebugLevel = 1 << 0,
112  kDraciBytecodeDebugLevel = 1 << 1,
113  kDraciArchiverDebugLevel = 1 << 2,
114  kDraciLogicDebugLevel = 1 << 3,
115  kDraciAnimationDebugLevel = 1 << 4,
116  kDraciSoundDebugLevel = 1 << 5,
117  kDraciWalkingDebugLevel = 1 << 6
118 };
119 
120 } // End of namespace Draci
121 
122 #endif // DRACI_DRACI_H
void pauseEngineIntern(bool pause) override
Definition: mouse.h:45
Definition: font.h:53
Common::String getSaveStateName(int slot) const override
Definition: draci.h:70
Definition: draci.h:55
Definition: str.h:59
EngineFeature
Definition: engine.h:250
Definition: error.h:84
Definition: advancedDetector.h:120
Definition: animation.h:176
Definition: random.h:44
Definition: default_display_client.h:78
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: mididrv.h:299
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:167
Definition: engine.h:143
Common::Error loadGameState(int slot) override
Definition: sound.h:66
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override