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
32
namespace
Hadesch
{
33
34
class
HotZone
{
35
public
:
36
HotZone
(
const
Common::Array<Common::Point>
&polygon,
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
;
46
private
:
47
Common::String
_hotid;
48
Common::Array<Common::Point>
_polygon;
49
Common::Point
_offset;
50
bool
_enabled;
51
int
_icsh;
52
};
53
54
class
HotZoneArray
{
55
public
:
56
HotZoneArray
();
57
HotZoneArray
(
Common::SharedPtr<Common::SeekableReadStream>
hzFile,
bool
enable);
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);
68
private
:
69
Common::Array<HotZone>
_hotZones;
70
};
71
72
}
73
#endif
Common::String
Definition:
str.h:59
Hadesch
Definition:
ambient.h:30
Common::Array< Common::Point >
Hadesch::HotZone
Definition:
hotzone.h:34
Hadesch::HotZoneArray
Definition:
hotzone.h:54
Common::Point
Definition:
rect.h:45
Hadesch::TagFile
Definition:
tag_file.h:36
Common::SharedPtr< Common::SeekableReadStream >
engines
hadesch
hotzone.h
Generated on Thu Nov 14 2024 09:13:24 for ScummVM API documentation by
1.8.13