ScummVM API documentation
hotzone.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 * Copyright 2020 Google
21 *
22 */
23#ifndef HADESCH_HOTZONE_H
24#define HADESCH_HOTZONE_H
25
26#include "common/ptr.h"
27#include "common/str.h"
28#include "common/rect.h"
29
30#include "hadesch/tag_file.h"
31
32namespace Hadesch {
33
34class HotZone {
35public:
37 const Common::String &hotid, bool enabled,
38 int icsh);
39 bool isInside(const Common::Point &pnt) const;
40 const Common::String &getID() const;
41 void load(const TagFile &file, int idx);
42 void setEnabled(bool enabled);
43 bool isEnabled() const;
44 void setOffset(Common::Point offset);
45 int getICSH() const;
46private:
47 Common::String _hotid;
49 Common::Point _offset;
50 bool _enabled;
51 int _icsh;
52};
53
55public:
58
59 void setHotzoneEnabled(const Common::String &name, bool enabled);
60 void readHotzones(Common::SharedPtr<Common::SeekableReadStream> hzFile,
61 bool enable, Common::Point offset = Common::Point(0, 0));
62 int pointToIndex(Common::Point point);
63 Common::String pointToName(Common::Point point);
64 void setHotZoneOffset(const Common::String &name, Common::Point offset);
65 Common::String indexToName(int idx);
66 int indexToCursor(int idx, int frame);
67 int indexToICSH(int idx);
68private:
69 Common::Array<HotZone> _hotZones;
70};
71
72}
73#endif
Definition: str.h:59
Definition: hotzone.h:54
Definition: hotzone.h:34
Definition: tag_file.h:36
Definition: rect.h:144