yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
room_object.h
Go to the documentation of this file.
1#ifndef YAZE_APP_ZELDA3_DUNGEON_ROOM_OBJECT_H
2#define YAZE_APP_ZELDA3_DUNGEON_ROOM_OBJECT_H
3
4#include <cstdint>
5#include <string>
6#include <vector>
7
8#include "absl/strings/string_view.h"
9#include "app/gfx/snes_tile.h"
10#include "app/rom.h"
12
13namespace yaze {
14namespace zelda3 {
15
17 uint32_t subtype_ptr;
18 uint32_t routine_ptr;
19};
20
21SubtypeInfo FetchSubtypeInfo(uint16_t object_id);
22
24
25enum Sorting {
26 All = 0,
27 Wall = 1,
32 Floors = 32,
34};
35
36enum class ObjectOption {
38 Door = 1,
39 Chest = 2,
40 Block = 4,
41 Torch = 8,
42 Bgr = 16,
43 Stairs = 32
44};
45
50
51constexpr int kRoomObjectSubtype1 = 0x8000; // JP = Same
52constexpr int kRoomObjectSubtype2 = 0x83F0; // JP = Same
53constexpr int kRoomObjectSubtype3 = 0x84F0; // JP = Same
54constexpr int kRoomObjectTileAddress = 0x1B52; // JP = Same
55constexpr int kRoomObjectTileAddressFloor = 0x1B5A; // JP = Same
56
57class RoomObject : public SharedRom {
58 public:
59 enum LayerType { BG1 = 0, BG2 = 1, BG3 = 2 };
60
61 RoomObject(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer = 0)
62 : id_(id),
63 x_(x),
64 y_(y),
65 size_(size),
66 layer_(static_cast<LayerType>(layer)),
67 nx_(x),
68 ny_(y),
69 ox_(x),
70 oy_(y),
71 width_(16),
72 height_(16) {}
73
74 void AddTiles(int nbr, int pos) {
75 for (int i = 0; i < nbr; i++) {
76 ASSIGN_OR_LOG_ERROR(auto tile, rom()->ReadTile16(pos + (i * 2)));
77 tiles_.push_back(tile);
78 }
79 }
80
81 void DrawTile(gfx::Tile16 t, int xx, int yy,
82 std::vector<uint8_t>& current_gfx16,
83 std::vector<uint8_t>& tiles_bg1_buffer,
84 std::vector<uint8_t>& tiles_bg2_buffer,
85 uint16_t tile_under = 0xFFFF);
86
87 auto options() const { return options_; }
89
90 protected:
91 bool all_bgs_ = false;
92 bool lit_ = false;
93
94 int16_t id_;
95 uint8_t x_;
96 uint8_t y_;
97 uint8_t size_;
98 uint8_t nx_;
99 uint8_t ny_;
100 uint8_t ox_;
101 uint8_t oy_;
102 uint8_t z_ = 0;
103 uint8_t previous_size_ = 0;
104
107 int offset_x_ = 0;
108 int offset_y_ = 0;
109
110 std::string name_;
111
112 std::vector<uint8_t> preview_object_data_;
113 std::vector<gfx::Tile16> tiles_;
114
117};
118
119class Subtype1 : public RoomObject {
120 public:
123 std::string name;
125
126 Subtype1(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer,
127 int tile_count)
128 : RoomObject(id, x, y, size, layer), tile_count_(tile_count) {
129 auto rom_data = rom()->data();
130 int pos = kRoomObjectTileAddress +
131 static_cast<int16_t>(
132 (rom_data[kRoomObjectSubtype1 + ((id & 0xFF) * 2) + 1] << 8) +
133 rom_data[kRoomObjectSubtype1 + ((id & 0xFF) * 2)]);
134 AddTiles(tile_count_, pos);
136 }
137
138 void Draw(std::vector<uint8_t>& current_gfx16,
139 std::vector<uint8_t>& tiles_bg1_buffer,
140 std::vector<uint8_t>& tiles_bg2_buffer) {
141 for (int s = 0; s < size_ + (tile_count_ == 8 ? 1 : 0); s++) {
142 for (int i = 0; i < tile_count_; i++) {
143 DrawTile(tiles_[i], ((s * 2)) * 8, (i / 2) * 8, current_gfx16,
144 tiles_bg1_buffer, tiles_bg2_buffer);
145 }
146 }
147 }
148};
149
150class Subtype2 : public RoomObject {
151 public:
152 std::string name;
155
156 Subtype2(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
157 : RoomObject(id, x, y, size, layer) {
158 auto rom_data = rom()->data();
159 int pos = kRoomObjectTileAddress +
160 static_cast<int16_t>(
161 (rom_data[kRoomObjectSubtype2 + ((id & 0x7F) * 2) + 1] << 8) +
162 rom_data[kRoomObjectSubtype2 + ((id & 0x7F) * 2)]);
163 AddTiles(8, pos);
165 }
166
167 void Draw(std::vector<uint8_t>& current_gfx16,
168 std::vector<uint8_t>& tiles_bg1_buffer,
169 std::vector<uint8_t>& tiles_bg2_buffer) {
170 for (int i = 0; i < 8; i++) {
171 DrawTile(tiles_[i], x_ * 8, (y_ + i) * 8, current_gfx16, tiles_bg1_buffer,
172 tiles_bg2_buffer);
173 }
174 }
175};
176
177class Subtype3 : public RoomObject {
178 public:
180 std::string name;
182
183 Subtype3(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
184 : RoomObject(id, x, y, size, layer) {
185 auto rom_data = rom()->data();
186 int pos = kRoomObjectTileAddress +
187 static_cast<int16_t>(
188 (rom_data[kRoomObjectSubtype3 + ((id & 0xFF) * 2) + 1] << 8) +
189 rom_data[kRoomObjectSubtype3 + ((id & 0xFF) * 2)]);
190 AddTiles(8, pos);
192 }
193
194 void Draw(std::vector<uint8_t>& current_gfx16,
195 std::vector<uint8_t>& tiles_bg1_buffer,
196 std::vector<uint8_t>& tiles_bg2_buffer) {
197 for (int i = 0; i < 8; i++) {
198 DrawTile(tiles_[i], x_ * 8, (y_ + i) * 8, current_gfx16, tiles_bg1_buffer,
199 tiles_bg2_buffer);
200 }
201 }
202};
203
204constexpr static inline absl::string_view Type1RoomObjectNames[] = {
205 "Ceiling ↔",
206 "Wall (top, north) ↔",
207 "Wall (top, south) ↔",
208 "Wall (bottom, north) ↔",
209 "Wall (bottom, south) ↔",
210 "Wall columns (north) ↔",
211 "Wall columns (south) ↔",
212 "Deep wall (north) ↔",
213 "Deep wall (south) ↔",
214 "Diagonal wall A ◤ (top) ↔",
215 "Diagonal wall A ◣ (top) ↔",
216 "Diagonal wall A ◥ (top) ↔",
217 "Diagonal wall A ◢ (top) ↔",
218 "Diagonal wall B ◤ (top) ↔",
219 "Diagonal wall B ◣ (top) ↔",
220 "Diagonal wall B ◥ (top) ↔",
221 "Diagonal wall B ◢ (top) ↔",
222 "Diagonal wall C ◤ (top) ↔",
223 "Diagonal wall C ◣ (top) ↔",
224 "Diagonal wall C ◥ (top) ↔",
225 "Diagonal wall C ◢ (top) ↔",
226 "Diagonal wall A ◤ (bottom) ↔",
227 "Diagonal wall A ◣ (bottom) ↔",
228 "Diagonal wall A ◥ (bottom) ↔",
229 "Diagonal wall A ◢ (bottom) ↔",
230 "Diagonal wall B ◤ (bottom) ↔",
231 "Diagonal wall B ◣ (bottom) ↔",
232 "Diagonal wall B ◥ (bottom) ↔",
233 "Diagonal wall B ◢ (bottom) ↔",
234 "Diagonal wall C ◤ (bottom) ↔",
235 "Diagonal wall C ◣ (bottom) ↔",
236 "Diagonal wall C ◥ (bottom) ↔",
237 "Diagonal wall C ◢ (bottom) ↔",
238 "Platform stairs ↔",
239 "Rail ↔",
240 "Pit edge ┏━┓ A (north) ↔",
241 "Pit edge ┏━┓ B (north) ↔",
242 "Pit edge ┏━┓ C (north) ↔",
243 "Pit edge ┏━┓ D (north) ↔",
244 "Pit edge ┏━┓ E (north) ↔",
245 "Pit edge ┗━┛ (south) ↔",
246 "Pit edge ━━━ (south) ↔",
247 "Pit edge ━━━ (north) ↔",
248 "Pit edge ━━┛ (south) ↔",
249 "Pit edge ┗━━ (south) ↔",
250 "Pit edge ━━┓ (north) ↔",
251 "Pit edge ┏━━ (north) ↔",
252 "Rail wall (north) ↔",
253 "Rail wall (south) ↔",
254 "Nothing",
255 "Nothing",
256 "Carpet ↔",
257 "Carpet trim ↔",
258 "Weird door", // TODO: WEIRD DOOR OBJECT NEEDS INVESTIGATION
259 "Drapes (north) ↔",
260 "Drapes (west, odd) ↔",
261 "Statues ↔",
262 "Columns ↔",
263 "Wall decors (north) ↔",
264 "Wall decors (south) ↔",
265 "Chairs in pairs ↔",
266 "Tall torches ↔",
267 "Supports (north) ↔",
268 "Water edge ┏━┓ (concave) ↔",
269 "Water edge ┗━┛ (concave) ↔",
270 "Water edge ┏━┓ (convex) ↔",
271 "Water edge ┗━┛ (convex) ↔",
272 "Water edge ┏━┛ (concave) ↔",
273 "Water edge ┗━┓ (concave) ↔",
274 "Water edge ┗━┓ (convex) ↔",
275 "Water edge ┏━┛ (convex) ↔",
276 "Unknown", // TODO: NEEDS IN GAME CHECKING
277 "Unknown", // TODO: NEEDS IN GAME CHECKING
278 "Unknown", // TODO: NEEDS IN GAME CHECKING
279 "Unknown", // TODO: NEEDS IN GAME CHECKING
280 "Supports (south) ↔",
281 "Bar ↔",
282 "Shelf A ↔",
283 "Shelf B ↔",
284 "Shelf C ↔",
285 "Somaria path ↔",
286 "Cannon hole A (north) ↔",
287 "Cannon hole A (south) ↔",
288 "Pipe path ↔",
289 "Nothing",
290 "Wall torches (north) ↔",
291 "Wall torches (south) ↔",
292 "Nothing",
293 "Nothing",
294 "Nothing",
295 "Nothing",
296 "Cannon hole B (north) ↔",
297 "Cannon hole B (south) ↔",
298 "Thick rail ↔",
299 "Blocks ↔",
300 "Long rail ↔",
301 "Ceiling ↕",
302 "Wall (top, west) ↕",
303 "Wall (top, east) ↕",
304 "Wall (bottom, west) ↕",
305 "Wall (bottom, east) ↕",
306 "Wall columns (west) ↕",
307 "Wall columns (east) ↕",
308 "Deep wall (west) ↕",
309 "Deep wall (east) ↕",
310 "Rail ↕",
311 "Pit edge (west) ↕",
312 "Pit edge (east) ↕",
313 "Rail wall (west) ↕",
314 "Rail wall (east) ↕",
315 "Nothing",
316 "Nothing",
317 "Carpet ↕",
318 "Carpet trim ↕",
319 "Nothing",
320 "Drapes (west) ↕",
321 "Drapes (east) ↕",
322 "Columns ↕",
323 "Wall decors (west) ↕",
324 "Wall decors (east) ↕",
325 "Supports (west) ↕",
326 "Water edge (west) ↕",
327 "Water edge (east) ↕",
328 "Supports (east) ↕",
329 "Somaria path ↕",
330 "Pipe path ↕",
331 "Nothing",
332 "Wall torches (west) ↕",
333 "Wall torches (east) ↕",
334 "Wall decors tight A (west) ↕",
335 "Wall decors tight A (east) ↕",
336 "Wall decors tight B (west) ↕",
337 "Wall decors tight B (east) ↕",
338 "Cannon hole (west) ↕",
339 "Cannon hole (east) ↕",
340 "Tall torches ↕",
341 "Thick rail ↕",
342 "Blocks ↕",
343 "Long rail ↕",
344 "Jump ledge (west) ↕",
345 "Jump ledge (east) ↕",
346 "Rug trim (west) ↕",
347 "Rug trim (east) ↕",
348 "Bar ↕",
349 "Wall flair (west) ↕",
350 "Wall flair (east) ↕",
351 "Blue pegs ↕",
352 "Orange pegs ↕",
353 "Invisible floor ↕",
354 "Fake pots ↕",
355 "Hammer pegs ↕",
356 "Nothing",
357 "Nothing",
358 "Nothing",
359 "Nothing",
360 "Nothing",
361 "Nothing",
362 "Nothing",
363 "Nothing",
364 "Nothing",
365 "Diagonal ceiling A ◤",
366 "Diagonal ceiling A ◣",
367 "Diagonal ceiling A ◥",
368 "Diagonal ceiling A ◢",
369 "Pit ⇲",
370 "Diagonal layer 2 mask A ◤",
371 "Diagonal layer 2 mask A ◣",
372 "Diagonal layer 2 mask A ◥",
373 "Diagonal layer 2 mask A ◢",
374 "Diagonal layer 2 mask B ◤", // TODO: VERIFY
375 "Diagonal layer 2 mask B ◣", // TODO: VERIFY
376 "Diagonal layer 2 mask B ◥", // TODO: VERIFY
377 "Diagonal layer 2 mask B ◢", // TODO: VERIFY
378 "Nothing",
379 "Nothing",
380 "Nothing",
381 "Jump ledge (north) ↔",
382 "Jump ledge (south) ↔",
383 "Rug ↔",
384 "Rug trim (north) ↔",
385 "Rug trim (south) ↔",
386 "Archery game curtains ↔",
387 "Wall flair (north) ↔",
388 "Wall flair (south) ↔",
389 "Blue pegs ↔",
390 "Orange pegs ↔",
391 "Invisible floor ↔",
392 "Fake pressure plates ↔",
393 "Fake pots ↔",
394 "Hammer pegs ↔",
395 "Nothing",
396 "Nothing",
397 "Ceiling (large) ⇲",
398 "Chest platform (tall) ⇲",
399 "Layer 2 pit mask (large) ⇲",
400 "Layer 2 pit mask (medium) ⇲",
401 "Floor 1 ⇲",
402 "Floor 3 ⇲",
403 "Layer 2 mask (large) ⇲",
404 "Floor 4 ⇲",
405 "Water floor ⇲ ",
406 "Flood water (medium) ⇲ ",
407 "Conveyor floor ⇲ ",
408 "Nothing",
409 "Nothing",
410 "Moving wall (west) ⇲",
411 "Moving wall (east) ⇲",
412 "Nothing",
413 "Nothing",
414 "Icy floor A ⇲",
415 "Icy floor B ⇲",
416 "Moving wall flag", // TODO: WTF IS THIS?
417 "Moving wall flag", // TODO: WTF IS THIS?
418 "Moving wall flag", // TODO: WTF IS THIS?
419 "Moving wall flag", // TODO: WTF IS THIS?
420 "Layer 2 mask (medium) ⇲",
421 "Flood water (large) ⇲",
422 "Layer 2 swim mask ⇲",
423 "Flood water B (large) ⇲",
424 "Floor 2 ⇲",
425 "Chest platform (short) ⇲",
426 "Table / rock ⇲",
427 "Spike blocks ⇲",
428 "Spiked floor ⇲",
429 "Floor 7 ⇲",
430 "Tiled floor ⇲",
431 "Rupee floor ⇲",
432 "Conveyor upwards ⇲",
433 "Conveyor downwards ⇲",
434 "Conveyor leftwards ⇲",
435 "Conveyor rightwards ⇲",
436 "Heavy current water ⇲",
437 "Floor 10 ⇲",
438 "Nothing",
439 "Nothing",
440 "Nothing",
441 "Nothing",
442 "Nothing",
443 "Nothing",
444 "Nothing",
445 "Nothing",
446 "Nothing",
447 "Nothing",
448 "Nothing",
449 "Nothing",
450 "Nothing",
451 "Nothing",
452 "Nothing",
453};
454
455constexpr static inline absl::string_view Type2RoomObjectNames[] = {
456 "Corner (top, concave) ▛",
457 "Corner (top, concave) ▙",
458 "Corner (top, concave) ▜",
459 "Corner (top, concave) ▟",
460 "Corner (top, convex) ▟",
461 "Corner (top, convex) ▜",
462 "Corner (top, convex) ▙",
463 "Corner (top, convex) ▛",
464 "Corner (bottom, concave) ▛",
465 "Corner (bottom, concave) ▙",
466 "Corner (bottom, concave) ▜",
467 "Corner (bottom, concave) ▟",
468 "Corner (bottom, convex) ▟",
469 "Corner (bottom, convex) ▜",
470 "Corner (bottom, convex) ▙",
471 "Corner (bottom, convex) ▛",
472 "Kinked corner north (bottom) ▜",
473 "Kinked corner south (bottom) ▟",
474 "Kinked corner north (bottom) ▛",
475 "Kinked corner south (bottom) ▙",
476 "Kinked corner west (bottom) ▙",
477 "Kinked corner west (bottom) ▛",
478 "Kinked corner east (bottom) ▟",
479 "Kinked corner east (bottom) ▜",
480 "Deep corner (concave) ▛",
481 "Deep corner (concave) ▙",
482 "Deep corner (concave) ▜",
483 "Deep corner (concave) ▟",
484 "Large brazier",
485 "Statue",
486 "Star tile (disabled)",
487 "Star tile (enabled)",
488 "Small torch (lit)",
489 "Barrel",
490 "Unknown", // TODO: NEEDS IN GAME CHECKING
491 "Table",
492 "Fairy statue",
493 "Unknown", // TODO: NEEDS IN GAME CHECKING
494 "Unknown", // TODO: NEEDS IN GAME CHECKING
495 "Chair",
496 "Bed",
497 "Fireplace",
498 "Mario portrait",
499 "Unknown", // TODO: NEEDS IN GAME CHECKING
500 "Unknown", // TODO: NEEDS IN GAME CHECKING
501 "Interroom stairs (up)",
502 "Interroom stairs (down)",
503 "Interroom stairs B (down)",
504 "Intraroom stairs north B", // TODO: VERIFY LAYER HANDLING
505 "Intraroom stairs north (separate layers)",
506 "Intraroom stairs north (merged layers)",
507 "Intraroom stairs north (swim layer)",
508 "Block",
509 "Water ladder (north)",
510 "Water ladder (south)", // TODO: NEEDS IN GAME VERIFICATION
511 "Dam floodgate",
512 "Interroom spiral stairs up (top)",
513 "Interroom spiral stairs down (top)",
514 "Interroom spiral stairs up (bottom)",
515 "Interroom spiral stairs down (bottom)",
516 "Sanctuary wall (north)",
517 "Unknown", // TODO: NEEDS IN GAME CHECKING
518 "Pew",
519 "Magic bat altar",
520};
521
522constexpr static inline absl::string_view Type3RoomObjectNames[] = {
523 "Waterfall face (empty)",
524 "Waterfall face (short)",
525 "Waterfall face (long)",
526 "Somaria path endpoint",
527 "Somaria path intersection ╋",
528 "Somaria path corner ┏",
529 "Somaria path corner ┗",
530 "Somaria path corner ┓",
531 "Somaria path corner ┛",
532 "Somaria path intersection ┳",
533 "Somaria path intersection ┻",
534 "Somaria path intersection ┣",
535 "Somaria path intersection ┫",
536 "Unknown", // TODO: NEEDS IN GAME CHECKING
537 "Somaria path 2-way endpoint",
538 "Somaria path crossover",
539 "Babasu hole (north)",
540 "Babasu hole (south)",
541 "9 blue rupees",
542 "Telepathy tile",
543 "Warp door", // TODO: NEEDS IN GAME VERIFICATION THAT THIS IS USELESS
544 "Kholdstare's shell",
545 "Hammer peg",
546 "Prison cell",
547 "Big key lock",
548 "Chest",
549 "Chest (open)",
550 "Intraroom stairs south", // TODO: VERIFY LAYER HANDLING
551 "Intraroom stairs south (separate layers)",
552 "Intraroom stairs south (merged layers)",
553 "Interroom straight stairs up (north, top)",
554 "Interroom straight stairs down (north, top)",
555 "Interroom straight stairs up (south, top)",
556 "Interroom straight stairs down (south, top)",
557 "Deep corner (convex) ▟",
558 "Deep corner (convex) ▜",
559 "Deep corner (convex) ▙",
560 "Deep corner (convex) ▛",
561 "Interroom straight stairs up (north, bottom)",
562 "Interroom straight stairs down (north, bottom)",
563 "Interroom straight stairs up (south, bottom)",
564 "Interroom straight stairs down (south, bottom)",
565 "Lamp cones",
566 "Unknown", // TODO: NEEDS IN GAME CHECKING
567 "Liftable large block",
568 "Agahnim's altar",
569 "Agahnim's boss room",
570 "Pot",
571 "Unknown", // TODO: NEEDS IN GAME CHECKING
572 "Big chest",
573 "Big chest (open)",
574 "Intraroom stairs south (swim layer)",
575 "Unknown", // TODO: NEEDS IN GAME CHECKING
576 "Unknown", // TODO: NEEDS IN GAME CHECKING
577 "Unknown", // TODO: NEEDS IN GAME CHECKING
578 "Unknown", // TODO: NEEDS IN GAME CHECKING
579 "Unknown", // TODO: NEEDS IN GAME CHECKING
580 "Unknown", // TODO: NEEDS IN GAME CHECKING
581 "Pipe end (south)",
582 "Pipe end (north)",
583 "Pipe end (east)",
584 "Pipe end (west)",
585 "Pipe corner ▛",
586 "Pipe corner ▙",
587 "Pipe corner ▜",
588 "Pipe corner ▟",
589 "Pipe-rock intersection ⯊",
590 "Pipe-rock intersection ⯋",
591 "Pipe-rock intersection ◖",
592 "Pipe-rock intersection ◗",
593 "Pipe crossover",
594 "Bombable floor",
595 "Fake bombable floor",
596 "Unknown", // TODO: NEEDS IN GAME CHECKING
597 "Warp tile",
598 "Tool rack",
599 "Furnace",
600 "Tub (wide)",
601 "Anvil",
602 "Warp tile (disabled)",
603 "Pressure plate",
604 "Unknown", // TODO: NEEDS IN GAME CHECKING
605 "Blue peg",
606 "Orange peg",
607 "Fortune teller room",
608 "Unknown", // TODO: NEEDS IN GAME CHECKING
609 "Bar corner ▛",
610 "Bar corner ▙",
611 "Bar corner ▜",
612 "Bar corner ▟",
613 "Decorative bowl",
614 "Tub (tall)",
615 "Bookcase",
616 "Range",
617 "Suitcase",
618 "Bar bottles",
619 "Arrow game hole (west)",
620 "Arrow game hole (east)",
621 "Vitreous goo gfx",
622 "Fake pressure plate",
623 "Medusa head",
624 "4-way shooter block",
625 "Pit",
626 "Wall crack (north)",
627 "Wall crack (south)",
628 "Wall crack (west)",
629 "Wall crack (east)",
630 "Large decor",
631 "Water grate (north)",
632 "Water grate (south)",
633 "Water grate (west)",
634 "Water grate (east)",
635 "Window sunlight",
636 "Floor sunlight",
637 "Trinexx's shell",
638 "Layer 2 mask (full)",
639 "Boss entrance",
640 "Minigame chest",
641 "Ganon door",
642 "Triforce wall ornament",
643 "Triforce floor tiles",
644 "Freezor hole",
645 "Pile of bones",
646 "Vitreous goo damage",
647 "Arrow tile ↑",
648 "Arrow tile ↓",
649 "Arrow tile →",
650 "Nothing",
651};
652
653} // namespace zelda3
654} // namespace yaze
655
656#endif // YAZE_APP_ZELDA3_DUNGEON_ROOM_OBJECT_H
auto rom()
Definition rom.h:384
SharedRom()=default
Tile composition of four 8x8 tiles.
Definition snes_tile.h:129
std::vector< uint8_t > preview_object_data_
void AddTiles(int nbr, int pos)
Definition room_object.h:74
std::vector< gfx::Tile16 > tiles_
void DrawTile(gfx::Tile16 t, int xx, int yy, std::vector< uint8_t > &current_gfx16, std::vector< uint8_t > &tiles_bg1_buffer, std::vector< uint8_t > &tiles_bg2_buffer, uint16_t tile_under=0xFFFF)
RoomObject(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer=0)
Definition room_object.h:61
void set_options(ObjectOption options)
Definition room_object.h:88
Subtype1(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer, int tile_count)
void Draw(std::vector< uint8_t > &current_gfx16, std::vector< uint8_t > &tiles_bg1_buffer, std::vector< uint8_t > &tiles_bg2_buffer)
void Draw(std::vector< uint8_t > &current_gfx16, std::vector< uint8_t > &tiles_bg1_buffer, std::vector< uint8_t > &tiles_bg2_buffer)
Subtype2(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
void Draw(std::vector< uint8_t > &current_gfx16, std::vector< uint8_t > &tiles_bg1_buffer, std::vector< uint8_t > &tiles_bg2_buffer)
Subtype3(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
#define ASSIGN_OR_LOG_ERROR(type_variable_name, expression)
Definition macro.h:70
Zelda 3 specific classes and functions.
constexpr int kRoomObjectSubtype3
Definition room_object.h:53
ObjectOption operator|(ObjectOption lhs, ObjectOption rhs)
Definition room_object.cc:6
ObjectOption operator^(ObjectOption lhs, ObjectOption rhs)
constexpr int kRoomObjectSubtype1
Definition room_object.h:51
constexpr int kRoomObjectSubtype2
Definition room_object.h:52
constexpr int kRoomObjectTileAddress
Definition room_object.h:54
ObjectOption operator~(ObjectOption option)
SubtypeInfo FetchSubtypeInfo(uint16_t object_id)
ObjectOption operator&(ObjectOption lhs, ObjectOption rhs)
constexpr int kRoomObjectTileAddressFloor
Definition room_object.h:55
Main namespace for the application.
Definition controller.cc:18