ScummVM API documentation
ultima4.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 ULTIMA4_H
23 #define ULTIMA4_H
24 
25 #include "ultima/shared/engine/ultima.h"
26 #include "ultima/shared/std/containers.h"
27 
28 namespace Ultima {
29 namespace Ultima4 {
30 
31 class Armors;
32 class Codex;
33 class Config;
34 class Context;
35 class Death;
36 class DialogueLoaders;
37 class Items;
38 class GameController;
39 class MapLoaders;
40 class Moongates;
41 class Music;
42 class ResponseParts;
43 struct SaveGame;
44 class Screen;
45 class Shrines;
46 class SoundManager;
47 class Spells;
48 class TileMaps;
49 class TileRules;
50 class TileSets;
51 class Weapons;
52 
54 private:
55  int _saveSlotToLoad;
56 private:
57  void startup();
58 protected:
59  // Engine APIs
60  Common::Error run() override;
61 
62  bool initialize() override;
63 
67  bool isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) override;
68 public:
69  Armors *_armors;
70  Codex *_codex;
71  Config *_config;
72  Context *_context;
73  Death *_death;
74  DialogueLoaders *_dialogueLoaders;
75  GameController *_game;
76  Items *_items;
77  MapLoaders *_mapLoaders;
78  Moongates *_moongates;
79  Music *_music;
80  ResponseParts *_responseParts;
81  SaveGame *_saveGame;
82  Screen *_screen;
83  Shrines *_shrines;
84  SoundManager *_soundManager;
85  Spells *_spells;
86  TileMaps *_tileMaps;
87  TileRules *_tileRules;
88  TileSets *_tileSets;
89  Weapons *_weapons;
90  Std::vector<Common::String> _hawkwindText;
91 public:
92  Ultima4Engine(OSystem *syst, const Ultima::UltimaGameDescription *gameDesc);
93  ~Ultima4Engine() override;
94 
98  bool canLoadGameStateCurrently(bool isAutosave = false) override;
99 
103  bool canSaveGameStateCurrently(bool isAutosave = false) override;
104 
112  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
113 
120 
127  Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
128 
133  void setToJourneyOnwards();
134 
138  void quitGame();
139 };
140 
141 extern Ultima4Engine *g_ultima;
142 
143 } // End of namespace Ultima4
144 } // End of namespace Ultima
145 
146 #endif
Definition: context.h:55
Definition: maploader.h:129
Definition: armor.h:63
Definition: savegame.h:270
Definition: str.h:59
Definition: music.h:40
Definition: tilemap.h:51
Definition: stream.h:77
Definition: error.h:84
Definition: game_controller.h:44
bool canLoadGameStateCurrently(bool isAutosave=false) override
Definition: tileset.h:143
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Definition: conversation.h:55
Definition: path.h:52
Definition: atari-screen.h:60
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
Definition: stream.h:745
Definition: detection.h:65
Definition: ultima.h:33
Definition: codex.h:49
Definition: dialogueloader.h:50
Definition: sound.h:72
Definition: detection.h:27
bool canSaveGameStateCurrently(bool isAutosave=false) override
Definition: ios7_game_controller.h:29
Definition: item.h:60
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
Definition: shrine.h:64
Definition: spell.h:105
bool isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) override
Definition: config.h:105
Common::Error run() override
Definition: system.h:161
Definition: ultima4.h:53
Definition: weapon.h:125
Definition: death.h:30
Definition: screen.h:103
Definition: tileset.h:117
Definition: moongate.h:31