ScummVM API documentation
savemetadata.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 STARK_SAVE_METADATA_H
23
#define STARK_SAVE_METADATA_H
24
25
#include "common/error.h"
26
#include "common/system.h"
27
28
namespace
Stark {
29
30
class
ResourceSerializer;
31
38
class
SaveMetadata
{
39
public
:
40
Common::String
description;
41
uint levelIndex;
42
uint locationIndex;
43
uint version;
44
uint32 totalPlayTime;
45
46
uint8 saveDay;
47
uint8 saveMonth;
48
uint16 saveYear;
49
50
uint8 saveHour;
51
uint8 saveMinute;
52
uint8 saveSecond;
53
54
bool
isAutoSave;
55
56
const
Graphics::Surface
*gameWindowThumbnail;
57
58
SaveMetadata
();
59
61
void
setSaveTime
(
const
TimeDate
&timeDate);
62
68
Common::ErrorCode
read
(
Common::SeekableReadStream
*stream,
const
Common::String
&filename);
69
71
void
write
(
Common::WriteStream
*stream);
72
74
Graphics::Surface
*
readGameScreenThumbnail
(
Common::SeekableReadStream
*stream);
75
77
void
skipGameScreenThumbnail
(
Common::SeekableReadStream
*stream);
78
80
void
writeGameScreenThumbnail
(
Common::WriteStream
*stream);
81
82
static
constexpr
inline
Graphics::PixelFormat
getPixelFormat() {
83
return
Graphics::PixelFormat::createFormatRGBA32
();
84
}
85
86
private
:
87
void
saveLoad(
ResourceSerializer
*s);
88
static
void
syncResourceIndexAsString(
ResourceSerializer
*s, uint &index);
89
Common::ErrorCode
syncVersion(
ResourceSerializer
*s);
90
91
Common::String
_readFilename;
92
Common::ErrorCode
_readErrorCode;
93
};
94
95
}
// End of namespace Stark
96
97
#endif
// STARK_SAVE_METADATA_H
Common::SeekableReadStream
Definition:
stream.h:745
Common::String
Definition:
str.h:59
Common::WriteStream
Definition:
stream.h:77
Stark::ResourceSerializer
Definition:
stateprovider.h:51
Stark::SaveMetadata
Definition:
savemetadata.h:38
Stark::SaveMetadata::readGameScreenThumbnail
Graphics::Surface * readGameScreenThumbnail(Common::SeekableReadStream *stream)
Stark::SaveMetadata::write
void write(Common::WriteStream *stream)
Stark::SaveMetadata::writeGameScreenThumbnail
void writeGameScreenThumbnail(Common::WriteStream *stream)
Stark::SaveMetadata::skipGameScreenThumbnail
void skipGameScreenThumbnail(Common::SeekableReadStream *stream)
Stark::SaveMetadata::read
Common::ErrorCode read(Common::SeekableReadStream *stream, const Common::String &filename)
Stark::SaveMetadata::setSaveTime
void setSaveTime(const TimeDate &timeDate)
Common::ErrorCode
ErrorCode
Definition:
error.h:47
Graphics::PixelFormat
Definition:
pixelformat.h:138
Graphics::PixelFormat::createFormatRGBA32
static constexpr PixelFormat createFormatRGBA32(bool alpha=true)
Definition:
pixelformat.h:207
Graphics::Surface
Definition:
surface.h:67
TimeDate
Definition:
system.h:111
engines
stark
savemetadata.h
Generated on Sat Oct 24 2026 09:23:59 for ScummVM API documentation by
1.9.4