ScummVM API documentation
hotspot.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 HOTSPOT_H_
23 #define HOTSPOT_H_
24 
25 #include "common/rect.h"
26 #include "common/array.h"
27 
28 namespace Myst3 {
29 
30 class GameState;
31 
32 struct Opcode {
33  uint8 op;
35 };
36 
37 struct CondScript {
38  uint16 condition;
39  Common::Array<Opcode> script;
40 };
41 
42 struct PolarRect {
43  int16 centerPitch;
44  int16 centerHeading;
45  int16 height;
46  int16 width;
47 };
48 
49 class HotSpot {
50 public:
51  HotSpot();
52 
53  int16 condition;
55  int16 cursor;
56  Common::Array<Opcode> script;
57 
58  int32 isPointInRectsCube(float pitch, float heading);
59  int32 isPointInRectsFrame(GameState *state, const Common::Point &p);
60  bool isEnabled(GameState *state, uint16 var = 0);
61 
62 private:
63  bool isZip() { return cursor == 7; }
64  int32 isZipDestinationAvailable(GameState *state);
65 };
66 
67 } // End of namespace Myst3
68 
69 #endif // HOTSPOT_H_
Definition: ambient.h:27
Definition: state.h:48
Definition: hotspot.h:49
Definition: rect.h:45
Definition: hotspot.h:32
Definition: hotspot.h:37
Definition: hotspot.h:42