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