ScummVM API documentation
regions.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 BLADERUNNER_REGIONS_H
23#define BLADERUNNER_REGIONS_H
24
25#include "bladerunner/bladerunner.h"
26
27#include "common/array.h"
28#include "common/rect.h"
29
30namespace BladeRunner {
31
32class SaveFileReadStream;
33class SaveFileWriteStream;
34
35class Regions {
36 friend class Debugger;
37
38 struct Region {
39 Common::Rect rectangle;
40 int type; // Arrow Icon on mouse-over (has meaning only for Exits) 0: Upward , 1: Right, 2: Downward, 3: Left
41 int present;
42 };
43
44 Common::Array<Region> _regions;
45 bool _enabled;
46
47public:
48 Regions();
49
50 void clear();
51 bool add(int index, Common::Rect rect, int type);
52 bool remove(int index);
53
54 int getTypeAtXY(int x, int y) const;
55 int getRegionAtXY(int x, int y) const;
56
57 void setEnabled(bool enabled);
58 void enable();
59
60 void save(SaveFileWriteStream &f);
61 void load(SaveFileReadStream &f);
62};
63
64} // End of namespace BladeRunner
65
66#endif
Definition: debugger.h:56
Definition: regions.h:35
Definition: savefile.h:113
Definition: savefile.h:88
Definition: rect.h:536