ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
savegame_components.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 AGS_ENGINE_GAME_SAVEGAME_COMPONENTS_H
23 #define AGS_ENGINE_GAME_SAVEGAME_COMPONENTS_H
24 
25 #include "ags/engine/game/savegame.h"
26 #include "ags/shared/util/stream.h"
27 
28 namespace AGS3 {
29 namespace AGS {
30 
31 namespace Shared {
32 struct Interaction;
33 } // namespace Shared
34 
35 namespace Engine {
36 
37 using Shared::Stream;
38 using Shared::Interaction;
39 
40 struct PreservedParams;
41 struct RestoredData;
42 
43 namespace SavegameComponents {
44 
45 extern void component_handlers_init();
46 extern void component_handlers_free();
47 
48 // Reads all available components from the stream
49 HSaveError ReadAll(Stream *in, SavegameVersion svg_version, const PreservedParams &pp, RestoredData &r_data);
50 // Writes a full list of common components to the stream
51 HSaveError WriteAllCommon(Stream *out);
52 
53 // Utility functions for reading and writing legacy interactions,
54 // or their "times run" counters separately.
55 void ReadTimesRun272(Interaction &intr, Stream *in);
56 HSaveError ReadInteraction272(Interaction &intr, Stream *in);
57 void WriteTimesRun272(const Interaction &intr, Stream *out);
58 void WriteInteraction272(const Interaction &intr, Stream *out);
59 
60 // Precreates primary camera and viewport and reads legacy camera data
61 void ReadLegacyCameraState(Stream *in, RestoredData &r_data);
62 } // namespace SavegameComponents
63 
64 } // namespace Engine
65 } // namespace AGS
66 } // namespace AGS3
67 
68 #endif
Definition: achievements_tables.h:27
Definition: engine.h:144
Definition: ags.h:40