1#ifndef YAZE_APP_ZELDA3_DUNGEON_ROOM_OBJECT_H
2#define YAZE_APP_ZELDA3_DUNGEON_ROOM_OBJECT_H
8#include "absl/strings/string_view.h"
61 RoomObject(int16_t
id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer = 0)
75 for (
int i = 0; i < nbr; i++) {
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);
126 Subtype1(int16_t
id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer,
129 auto rom_data =
rom()->data();
131 static_cast<int16_t
>(
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) {
144 tiles_bg1_buffer, tiles_bg2_buffer);
156 Subtype2(int16_t
id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
158 auto rom_data =
rom()->data();
160 static_cast<int16_t
>(
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++) {
183 Subtype3(int16_t
id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
185 auto rom_data =
rom()->data();
187 static_cast<int16_t
>(
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++) {
204constexpr static inline absl::string_view Type1RoomObjectNames[] = {
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) ↔",
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) ↔",
260 "Drapes (west, odd) ↔",
263 "Wall decors (north) ↔",
264 "Wall decors (south) ↔",
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) ↔",
280 "Supports (south) ↔",
286 "Cannon hole A (north) ↔",
287 "Cannon hole A (south) ↔",
290 "Wall torches (north) ↔",
291 "Wall torches (south) ↔",
296 "Cannon hole B (north) ↔",
297 "Cannon hole B (south) ↔",
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) ↕",
313 "Rail wall (west) ↕",
314 "Rail wall (east) ↕",
323 "Wall decors (west) ↕",
324 "Wall decors (east) ↕",
326 "Water edge (west) ↕",
327 "Water edge (east) ↕",
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) ↕",
344 "Jump ledge (west) ↕",
345 "Jump ledge (east) ↕",
349 "Wall flair (west) ↕",
350 "Wall flair (east) ↕",
365 "Diagonal ceiling A ◤",
366 "Diagonal ceiling A ◣",
367 "Diagonal ceiling A ◥",
368 "Diagonal ceiling A ◢",
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 ◤",
375 "Diagonal layer 2 mask B ◣",
376 "Diagonal layer 2 mask B ◥",
377 "Diagonal layer 2 mask B ◢",
381 "Jump ledge (north) ↔",
382 "Jump ledge (south) ↔",
384 "Rug trim (north) ↔",
385 "Rug trim (south) ↔",
386 "Archery game curtains ↔",
387 "Wall flair (north) ↔",
388 "Wall flair (south) ↔",
392 "Fake pressure plates ↔",
398 "Chest platform (tall) ⇲",
399 "Layer 2 pit mask (large) ⇲",
400 "Layer 2 pit mask (medium) ⇲",
403 "Layer 2 mask (large) ⇲",
406 "Flood water (medium) ⇲ ",
410 "Moving wall (west) ⇲",
411 "Moving wall (east) ⇲",
420 "Layer 2 mask (medium) ⇲",
421 "Flood water (large) ⇲",
422 "Layer 2 swim mask ⇲",
423 "Flood water B (large) ⇲",
425 "Chest platform (short) ⇲",
432 "Conveyor upwards ⇲",
433 "Conveyor downwards ⇲",
434 "Conveyor leftwards ⇲",
435 "Conveyor rightwards ⇲",
436 "Heavy current water ⇲",
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) ▟",
486 "Star tile (disabled)",
487 "Star tile (enabled)",
501 "Interroom stairs (up)",
502 "Interroom stairs (down)",
503 "Interroom stairs B (down)",
504 "Intraroom stairs north B",
505 "Intraroom stairs north (separate layers)",
506 "Intraroom stairs north (merged layers)",
507 "Intraroom stairs north (swim layer)",
509 "Water ladder (north)",
510 "Water ladder (south)",
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)",
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 ┫",
537 "Somaria path 2-way endpoint",
538 "Somaria path crossover",
539 "Babasu hole (north)",
540 "Babasu hole (south)",
544 "Kholdstare's shell",
550 "Intraroom stairs south",
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)",
567 "Liftable large block",
569 "Agahnim's boss room",
574 "Intraroom stairs south (swim layer)",
589 "Pipe-rock intersection ⯊",
590 "Pipe-rock intersection ⯋",
591 "Pipe-rock intersection ◖",
592 "Pipe-rock intersection ◗",
595 "Fake bombable floor",
602 "Warp tile (disabled)",
607 "Fortune teller room",
619 "Arrow game hole (west)",
620 "Arrow game hole (east)",
622 "Fake pressure plate",
624 "4-way shooter block",
626 "Wall crack (north)",
627 "Wall crack (south)",
631 "Water grate (north)",
632 "Water grate (south)",
633 "Water grate (west)",
634 "Water grate (east)",
638 "Layer 2 mask (full)",
642 "Triforce wall ornament",
643 "Triforce floor tiles",
646 "Vitreous goo damage",
Tile composition of four 8x8 tiles.
std::vector< uint8_t > preview_object_data_
void AddTiles(int nbr, int pos)
std::vector< gfx::Tile16 > tiles_
void DrawTile(gfx::Tile16 t, int xx, int yy, std::vector< uint8_t > ¤t_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)
void set_options(ObjectOption options)
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 > ¤t_gfx16, std::vector< uint8_t > &tiles_bg1_buffer, std::vector< uint8_t > &tiles_bg2_buffer)
void Draw(std::vector< uint8_t > ¤t_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 > ¤t_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)
Zelda 3 specific classes and functions.
constexpr int kRoomObjectSubtype3
ObjectOption operator|(ObjectOption lhs, ObjectOption rhs)
ObjectOption operator^(ObjectOption lhs, ObjectOption rhs)
constexpr int kRoomObjectSubtype1
constexpr int kRoomObjectSubtype2
constexpr int kRoomObjectTileAddress
ObjectOption operator~(ObjectOption option)
SubtypeInfo FetchSubtypeInfo(uint16_t object_id)
ObjectOption operator&(ObjectOption lhs, ObjectOption rhs)
constexpr int kRoomObjectTileAddressFloor
Main namespace for the application.