ScummVM API documentation
save_game.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_SAVE_SAVE_GAME_H
23#define NUVIE_SAVE_SAVE_GAME_H
24
25#define SAVE_VERSION_MAJOR 1
26#define SAVE_VERSION_MINOR 0
27#define SAVE_VERSION (SAVE_VERSION_MAJOR * 256 + SAVE_VERSION_MINOR)
28
29#include "common/str.h"
30#include "ultima/nuvie/files/nuvie_io_file.h"
31
32namespace Ultima {
33namespace Nuvie {
34
35class Configuration;
36class ActorManager;
37class ObjManager;
38class Actor;
39class Map;
40class NuvieIO;
41class NuvieIOFileWrite;
42
43class SaveGame {
44private:
45 Configuration *config;
46 NuvieIOBuffer objlist;
47protected:
48 bool load_objlist();
49 bool save_objlist();
50
51 void update_objlist_for_new_game();
52 void update_objlist_for_new_game_u6();
53 void update_objlist_for_new_game_se();
54 void update_objlist_for_new_game_md();
55public:
57 ~SaveGame();
58
59 void init(ObjManager *obj_manager);
60
64 bool load_new();
65
70
75
79 bool load(const Common::String &filename);
80
81 bool check_version(NuvieIOFileRead *loadfile, uint16 gameType);
82
83 bool save(const Common::String &filename, const Common::String &save_description, bool isAutosave);
84};
85
86} // End of namespace Nuvie
87} // End of namespace Ultima
88
89#endif
Definition: str.h:59
Definition: configuration.h:60
Definition: nuvie_io.h:106
Definition: nuvie_io_file.h:44
Definition: obj_manager.h:74
Definition: save_game.h:43
bool load(const Common::String &filename)