yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1#ifndef YAZE_APP_ZELDA3_COMMON_H
2#define YAZE_APP_ZELDA3_COMMON_H
3
4#include <vector>
5#include <cstdint>
6#include <string>
7
8namespace yaze {
9namespace app {
14namespace zelda3 {
15
19using OWBlockset = std::vector<std::vector<uint16_t>>;
20
29using OWMapTiles = struct OWMapTiles;
30
36 public:
48 int x_;
49 int y_;
53 uint16_t map_id_;
54
55 auto set_x(int x) { x_ = x; }
56 auto set_y(int y) { y_ = y; }
57
58 GameEntity() = default;
59
60 virtual void UpdateMapProperties(uint16_t map_id) = 0;
61};
62
63static const std::string TileTypeNames[] = {
64 "$00 Nothing (standard floor)",
65 "$01 Collision",
66 "$02 Collision",
67 "$03 Collision",
68 "$04 Collision",
69 "$05 Nothing (unused?)",
70 "$06 Nothing (unused?)",
71 "$07 Nothing (unused?)",
72 "$08 Deep water",
73 "$09 Shallow water",
74 "$0A Unknown? Possibly unused",
75 "$0B Collision (different in Overworld and unknown)",
76 "$0C Overlay mask",
77 "$0D Spike floor",
78 "$0E GT ice",
79 "$0F Ice palace ice",
80 "$10 Slope ◤",
81 "$11 Slope ◥",
82 "$12 Slope ◣",
83 "$13 Slope ◢",
84 "$14 Nothing (unused?)",
85 "$15 Nothing (unused?)",
86 "$16 Nothing (unused?)",
87 "$17 Nothing (unused?)",
88 "$18 Slope ◤",
89 "$19 Slope ◥",
90 "$1A Slope ◣",
91 "$1B Slope ◢",
92 "$1C Layer 2 overlay",
93 "$1D North single-layer auto stairs",
94 "$1E North layer-swap auto stairs",
95 "$1F North layer-swap auto stairs",
96 "$20 Pit",
97 "$21 Nothing (unused?)",
98 "$22 Manual stairs",
99 "$23 Pot switch",
100 "$24 Pressure switch",
101 "$25 Nothing (unused but referenced by somaria blocks)",
102 "$26 Collision (near stairs?)",
103 "$27 Brazier/Fence/Statue/Block/General hookable things",
104 "$28 North ledge",
105 "$29 South ledge",
106 "$2A East ledge",
107 "$2B West ledge",
108 "$2C ◤ ledge",
109 "$2D ◣ ledge",
110 "$2E ◥ ledge",
111 "$2F ◢ ledge",
112 "$30 Straight inter-room stairs south/up 0",
113 "$31 Straight inter-room stairs south/up 1",
114 "$32 Straight inter-room stairs south/up 2",
115 "$33 Straight inter-room stairs south/up 3",
116 "$34 Straight inter-room stairs north/down 0",
117 "$35 Straight inter-room stairs north/down 1",
118 "$36 Straight inter-room stairs north/down 2",
119 "$37 Straight inter-room stairs north/down 3",
120 "$38 Straight inter-room stairs north/down edge",
121 "$39 Straight inter-room stairs south/up edge",
122 "$3A Star tile (inactive on load)",
123 "$3B Star tile (active on load)",
124 "$3C Nothing (unused?)",
125 "$3D South single-layer auto stairs",
126 "$3E South layer-swap auto stairs",
127 "$3F South layer-swap auto stairs",
128 "$40 Thick grass",
129 "$41 Nothing (unused?)",
130 "$42 Gravestone / Tower of hera ledge shadows??",
131 "$43 Skull Woods entrance/Hera columns???",
132 "$44 Spike",
133 "$45 Nothing (unused?)",
134 "$46 Desert Tablet",
135 "$47 Nothing (unused?)",
136 "$48 Diggable ground",
137 "$49 Nothing (unused?)",
138 "$4A Diggable ground",
139 "$4B Warp tile",
140 "$4C Nothing (unused?) | Something unknown in overworld",
141 "$4D Nothing (unused?) | Something unknown in overworld",
142 "$4E Square corners in EP overworld",
143 "$4F Square corners in EP overworld",
144 "$50 Green bush",
145 "$51 Dark bush",
146 "$52 Gray rock",
147 "$53 Black rock",
148 "$54 Hint tile/Sign",
149 "$55 Big gray rock",
150 "$56 Big black rock",
151 "$57 Bonk rocks",
152 "$58 Chest 0",
153 "$59 Chest 1",
154 "$5A Chest 2",
155 "$5B Chest 3",
156 "$5C Chest 4",
157 "$5D Chest 5",
158 "$5E Spiral stairs",
159 "$5F Spiral stairs",
160 "$60 Rupee tile",
161 "$61 Nothing (unused?)",
162 "$62 Bombable floor",
163 "$63 Minigame chest",
164 "$64 Nothing (unused?)",
165 "$65 Nothing (unused?)",
166 "$66 Crystal peg down",
167 "$67 Crystal peg up",
168 "$68 Upwards conveyor",
169 "$69 Downwards conveyor",
170 "$6A Leftwards conveyor",
171 "$6B Rightwards conveyor",
172 "$6C North vines",
173 "$6D South vines",
174 "$6E West vines",
175 "$6F East vines",
176 "$70 Pot/Hammer peg/Push block 00",
177 "$71 Pot/Hammer peg/Push block 01",
178 "$72 Pot/Hammer peg/Push block 02",
179 "$73 Pot/Hammer peg/Push block 03",
180 "$74 Pot/Hammer peg/Push block 04",
181 "$75 Pot/Hammer peg/Push block 05",
182 "$76 Pot/Hammer peg/Push block 06",
183 "$77 Pot/Hammer peg/Push block 07",
184 "$78 Pot/Hammer peg/Push block 08",
185 "$79 Pot/Hammer peg/Push block 09",
186 "$7A Pot/Hammer peg/Push block 0A",
187 "$7B Pot/Hammer peg/Push block 0B",
188 "$7C Pot/Hammer peg/Push block 0C",
189 "$7D Pot/Hammer peg/Push block 0D",
190 "$7E Pot/Hammer peg/Push block 0E",
191 "$7F Pot/Hammer peg/Push block 0F",
192 "$80 North/South door",
193 "$81 East/West door",
194 "$82 North/South shutter door",
195 "$83 East/West shutter door",
196 "$84 North/South layer 2 door",
197 "$85 East/West layer 2 door",
198 "$86 North/South layer 2 shutter door",
199 "$87 East/West layer 2 shutter door",
200 "$88 Some type of door (?)",
201 "$89 East/West transport door",
202 "$8A Some type of door (?)",
203 "$8B Some type of door (?)",
204 "$8C Some type of door (?)",
205 "$8D Some type of door (?)",
206 "$8E Entrance door",
207 "$8F Entrance door",
208 "$90 Layer toggle shutter door (?)",
209 "$91 Layer toggle shutter door (?)",
210 "$92 Layer toggle shutter door (?)",
211 "$93 Layer toggle shutter door (?)",
212 "$94 Layer toggle shutter door (?)",
213 "$95 Layer toggle shutter door (?)",
214 "$96 Layer toggle shutter door (?)",
215 "$97 Layer toggle shutter door (?)",
216 "$98 Layer+Dungeon toggle shutter door (?)",
217 "$99 Layer+Dungeon toggle shutter door (?)",
218 "$9A Layer+Dungeon toggle shutter door (?)",
219 "$9B Layer+Dungeon toggle shutter door (?)",
220 "$9C Layer+Dungeon toggle shutter door (?)",
221 "$9D Layer+Dungeon toggle shutter door (?)",
222 "$9E Layer+Dungeon toggle shutter door (?)",
223 "$9F Layer+Dungeon toggle shutter door (?)",
224 "$A0 North/South Dungeon swap door",
225 "$A1 Dungeon toggle door (?)",
226 "$A2 Dungeon toggle door (?)",
227 "$A3 Dungeon toggle door (?)",
228 "$A4 Dungeon toggle door (?)",
229 "$A5 Dungeon toggle door (?)",
230 "$A6 Nothing (unused?)",
231 "$A7 Nothing (unused?)",
232 "$A8 Layer+Dungeon toggle shutter door (?)",
233 "$A9 Layer+Dungeon toggle shutter door (?)",
234 "$AA Layer+Dungeon toggle shutter door (?)",
235 "$AB Layer+Dungeon toggle shutter door (?)",
236 "$AC Layer+Dungeon toggle shutter door (?)",
237 "$AD Layer+Dungeon toggle shutter door (?)",
238 "$AE Layer+Dungeon toggle shutter door (?)",
239 "$AF Layer+Dungeon toggle shutter door (?)",
240 "$B0 Somaria ─",
241 "$B1 Somaria │",
242 "$B2 Somaria ┌",
243 "$B3 Somaria └",
244 "$B4 Somaria ┐",
245 "$B5 Somaria ┘",
246 "$B6 Somaria ⍰ 1 way",
247 "$B7 Somaria ┬",
248 "$B8 Somaria ┴",
249 "$B9 Somaria ├",
250 "$BA Somaria ┤",
251 "$BB Somaria ┼",
252 "$BC Somaria ⍰ 2 way",
253 "$BD Somaria ┼ crossover",
254 "$BE Pipe entrance",
255 "$BF Nothing (unused?)",
256 "$C0 Torch 00",
257 "$C1 Torch 01",
258 "$C2 Torch 02",
259 "$C3 Torch 03",
260 "$C4 Torch 04",
261 "$C5 Torch 05",
262 "$C6 Torch 06",
263 "$C7 Torch 07",
264 "$C8 Torch 08",
265 "$C9 Torch 09",
266 "$CA Torch 0A",
267 "$CB Torch 0B",
268 "$CC Torch 0C",
269 "$CD Torch 0D",
270 "$CE Torch 0E",
271 "$CF Torch 0F",
272 "$D0 Nothing (unused?)",
273 "$D1 Nothing (unused?)",
274 "$D2 Nothing (unused?)",
275 "$D3 Nothing (unused?)",
276 "$D4 Nothing (unused?)",
277 "$D5 Nothing (unused?)",
278 "$D6 Nothing (unused?)",
279 "$D7 Nothing (unused?)",
280 "$D8 Nothing (unused?)",
281 "$D9 Nothing (unused?)",
282 "$DA Nothing (unused?)",
283 "$DB Nothing (unused?)",
284 "$DC Nothing (unused?)",
285 "$DD Nothing (unused?)",
286 "$DE Nothing (unused?)",
287 "$DF Nothing (unused?)",
288 "$E0 Nothing (unused?)",
289 "$E1 Nothing (unused?)",
290 "$E2 Nothing (unused?)",
291 "$E3 Nothing (unused?)",
292 "$E4 Nothing (unused?)",
293 "$E5 Nothing (unused?)",
294 "$E6 Nothing (unused?)",
295 "$E7 Nothing (unused?)",
296 "$E8 Nothing (unused?)",
297 "$E9 Nothing (unused?)",
298 "$EA Nothing (unused?)",
299 "$EB Nothing (unused?)",
300 "$EC Nothing (unused?)",
301 "$ED Nothing (unused?)",
302 "$EE Nothing (unused?)",
303 "$EF Nothing (unused?)",
304 "$F0 Door 0 bottom",
305 "$F1 Door 1 bottom",
306 "$F2 Door 2 bottom",
307 "$F3 Door 3 bottom",
308 "$F4 Door X bottom? (unused?)",
309 "$F5 Door X bottom? (unused?)",
310 "$F6 Door X bottom? (unused?)",
311 "$F7 Door X bottom? (unused?)",
312 "$F8 Door 0 top",
313 "$F9 Door 1 top",
314 "$FA Door 2 top",
315 "$FB Door 3 top",
316 "$FC Door X top? (unused?)",
317 "$FD Door X top? (unused?)",
318 "$FE Door X top? (unused?)",
319 "$FF Door X top? (unused?)"};
320
321} // namespace zelda3
322} // namespace app
323} // namespace yaze
324
325#endif // YAZE_APP_ZELDA3_COMMON_H
Base class for all overworld and dungeon entities.
Definition common.h:35
virtual void UpdateMapProperties(uint16_t map_id)=0
enum yaze::app::zelda3::GameEntity::EntityType entity_type_
std::vector< std::vector< uint16_t > > OWBlockset
Represents tile32 data for the overworld.
Definition common.h:19
Definition common.cc:22
Overworld map tile32 data.
Definition common.h:24