ScummVM API documentation
patch.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 PATCH_H
23#define PATCH_H
24
25#include "agds/screenLoadingType.h"
26#include "common/array.h"
27#include "common/rect.h"
28#include "common/scummsys.h"
29#include "common/str.h"
30
31namespace Common {
32class ReadStream;
33class WriteStream;
34} // namespace Common
35
36namespace AGDS {
37
38class AGDSEngine;
39class Object;
40
42 static constexpr unsigned Size = 66;
43
44 Common::String text;
45 Common::String region;
46 int z;
47 void load(Common::ReadStream &stream);
48 void save(Common::WriteStream &stream) const;
49};
50
51struct Patch {
52 struct Object {
53 Common::String name;
54 int16 flag;
55
56 Object(const Common::String &n, int f) : name(n), flag(f) {}
57 };
58
59 bool screenSaved = false;
60 Common::String screenRegionName;
61 Common::String prevScreenName;
62
63 ScreenLoadingType loadingType = ScreenLoadingType::Normal;
64 Common::Point characterPosition;
65 int characterDirection = 0;
66 bool characterPresent = false;
67
68 byte palette[0x300] = {};
69 Common::String defaultMouseCursor;
71
72 void load(Common::ReadStream &stream);
73 void save(Common::WriteStream &stream);
74 void setFlag(const Common::String &name, int flag);
75 int getFlag(const Common::String &name) const;
76 int incRef(const Common::String &name);
77 int decRef(const Common::String &name);
78};
79
80} // End of namespace AGDS
81
82#endif /* AGDS_PATCH_H */
Definition: stream.h:385
Definition: str.h:59
Definition: stream.h:77
Definition: algorithm.h:29
Definition: patch.h:41
Definition: patch.h:52
Definition: patch.h:51
Definition: rect.h:144