ScummVM API documentation
mapnavigatorxobj.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 DIRECTOR_LINGO_XLIBS_MAPNAVIGATORXOBJ_H
23 #define DIRECTOR_LINGO_XLIBS_MAPNAVIGATORXOBJ_H
24 
25 namespace Director {
26 
28  byte instruction_type;
29  byte reserved;
30  Common::String text;
31 };
32 struct NavCondition {
33  uint16 record_size;
34  uint16 destination_node;
35  uint16 condition_id;
36  uint16 instruction_count;
37 
38  Common::Array<NavInstruction> instructions;
39 };
40 
41 struct NavHotSpot {
42  uint16 record_size;
43  int16 left;
44  int16 top;
45  int16 right;
46  int16 bottom;
47  uint16 cursor_id;
48  byte initially_hidden;
49  byte unknown_0d;
50  uint16 condition_count;
51  Common::String evaluation_name;
52 
53  bool isHidden; // Not part of the original data, used to track current hidden state in ScummVM
54 
55  Common::Array<NavCondition> conditions;
56 };
57 
58 struct NavNode {
59  uint16 background_picture;
60  uint16 hotspot_count;
61  uint16 unknown_04;
62  uint16 hotspot_list_offset;
63  Common::String name;
64 
66 };
67 
68 class MapNavigatorXObject : public Object<MapNavigatorXObject> {
69 public:
70  MapNavigatorXObject(ObjectType objType);
71 
72  Common::String _filename;
73  int16 _nodeCount;
74  int16 _hotspotCount;
75  int16 _firstNodeIndex;
77 };
78 
79 namespace MapNavigatorXObj {
80 
81 extern const char *const xlibName;
82 extern const XlibFileDesc fileNames[];
83 
84 void open(ObjectType type, const Common::Path &path);
85 void close(ObjectType type);
86 
87 void m_new(int nargs);
88 void m_dispose(int nargs);
89 void m_getFirstNode(int nargs);
90 void m_resetHidden(int nargs);
91 void m_getNodeName(int nargs);
92 void m_getNodeIndex(int nargs);
93 void m_getBackgroundPicture(int nargs);
94 void m_getHotSpotCount(int nargs);
95 void m_setHidden(int nargs);
96 void m_getHidden(int nargs);
97 void m_pointInside(int nargs);
98 void m_getHotSpotRect(int nargs);
99 void m_getHotSpotCursor(int nargs);
100 void m_getEvaluationFcn(int nargs);
101 void m_getDestinationNode(int nargs);
102 void m_getInstructionCount(int nargs);
103 void m_getInstructionType(int nargs);
104 void m_getInstruction(int nargs);
105 
106 } // End of namespace MapNavigatorXObj
107 
108 } // End of namespace Director
109 
110 #endif
Definition: mapnavigatorxobj.h:32
Definition: mapnavigatorxobj.h:27
Definition: str.h:59
Definition: array.h:52
Definition: path.h:52
Definition: lingo-object.h:37
Definition: archive.h:36
Definition: mapnavigatorxobj.h:58
Definition: lingo-object.h:71
Definition: mapnavigatorxobj.h:68
Definition: mapnavigatorxobj.h:41