ScummVM API documentation
nuvie.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 NUVIE_NUVIE_H
23 #define NUVIE_NUVIE_H
24 
25 #include "ultima/shared/engine/events.h"
26 #include "ultima/shared/engine/ultima.h"
27 #include "ultima/shared/std/string.h"
28 #include "ultima/nuvie/conf/configuration.h"
29 #include "common/archive.h"
30 #include "common/random.h"
31 #include "engines/engine.h"
32 #include "gui/debugger.h"
33 
34 namespace Ultima {
35 namespace Nuvie {
36 
37 class Game;
38 class SaveGame;
39 class Screen;
40 class Script;
41 class SoundManager;
42 
44 private:
45  Configuration *_config;
46  Screen *_screen;
47  Script *_script;
48  Game *_game;
49  SaveGame *_savegame;
50 
51  SoundManager *_soundManager;
53 private:
54  void initConfig();
55  void assignGameConfigValues(uint8 game_type);
56  bool checkGameDir(uint8 game_type);
57  bool checkDataDir();
58 
59  bool playIntro();
60 protected:
61  bool initialize() override;
62 
66  bool isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) override;
67 public:
68  const Std::string c_empty_string;
69 public:
70  NuvieEngine(OSystem *syst, const Ultima::UltimaGameDescription *gameDesc);
71  ~NuvieEngine() override;
72 
76  Common::Error run() override;
77 
81  void syncSoundSettings() override;
82 
87  bool canLoadGameStateCurrently(bool isAutosave) override;
88 
93  bool canSaveGameStateCurrently(bool isAutosave) override;
94 
100  Common::Error loadGameState(int slot) override;
101 
109  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
110 
114  bool journeyOnwards();
115 
119  bool loadLatestSave();
120 
124  bool quickSave(int saveSlot, bool isLoad);
125 
130  return _soundManager;
131  }
132 };
133 
134 extern NuvieEngine *g_engine;
135 
136 } // End of namespace Nuvie
137 } // End of namespace Ultima
138 
139 #endif
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override
Definition: str.h:59
bool isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) override
Definition: error.h:84
Definition: configuration.h:61
Definition: save_game.h:43
SoundManager * getSoundManager() const
Definition: nuvie.h:129
Definition: nuvie.h:43
bool canLoadGameStateCurrently(bool isAutosave) override
Definition: path.h:52
Definition: atari-screen.h:60
Definition: detection.h:65
Definition: ultima.h:33
Engine * g_engine
Definition: screen.h:41
Definition: detection.h:27
bool initialize() override
Definition: string.h:30
Definition: sound_manager.h:62
Definition: events.h:139
void syncSoundSettings() override
Definition: script.h:102
Common::Error loadGameState(int slot) override
Common::Error run() override
bool canSaveGameStateCurrently(bool isAutosave) override
Definition: system.h:161
Definition: events.h:124
Definition: game.h:73
bool quickSave(int saveSlot, bool isLoad)