4#include <unordered_map>
16 static std::vector<std::string> room_names;
17 if (room_names.empty()) {
19 room_names.emplace_back(name);
27 static std::vector<std::string> entrance_names;
28 if (entrance_names.empty()) {
30 entrance_names.emplace_back(name);
33 return entrance_names;
38 static std::vector<std::string> sprite_names;
39 if (sprite_names.empty()) {
40 for (
const auto& name : kSpriteDefaultNames) {
41 sprite_names.push_back(name);
49 static std::vector<std::string> overlord_names;
50 if (overlord_names.empty()) {
51 for (
const auto& name : kOverlordNames) {
52 overlord_names.push_back(name);
55 return overlord_names;
60 static const std::vector<std::string> map_names = {
62 "Lost Woods",
"Master Sword Pedestal",
"Castle Courtyard",
"Link's House",
63 "Eastern Palace",
"Desert Palace",
"Hyrule Castle",
"Witch's Hut",
64 "Kakariko Village",
"Death Mountain",
"Tower of Hera",
"Spectacle Rock",
65 "Graveyard",
"Sanctuary",
"Lake Hylia",
"Desert of Mystery",
66 "Eastern Ruins",
"Zora's Domain",
"Catfish",
"Dam",
"Potion Shop",
67 "Kakariko Well",
"Blacksmith",
"Sick Kid",
"Library",
"Mushroom",
68 "Magic Bat",
"Fairy Fountain",
"Fortune Teller",
"Lake Shop",
"Bomb Shop",
69 "Cave 45",
"Checkerboard Cave",
"Mini Moldorm Cave",
"Ice Rod Cave",
70 "Bonk Rocks",
"Bottle Merchant",
"Sahasrahla's Hut",
"Chicken House",
71 "Aginah's Cave",
"Dam Exterior",
"Mimic Cave Exterior",
"Waterfall Fairy",
72 "Pyramid",
"Fat Fairy",
"Spike Cave",
"Hookshot Cave",
"Graveyard Ledge",
73 "Dark Lumberjacks",
"Bumper Cave",
"Skull Woods 1",
"Skull Woods 2",
74 "Skull Woods 3",
"Skull Woods 4",
"Skull Woods 5",
"Skull Woods 6",
75 "Skull Woods 7",
"Skull Woods 8",
"Ice Palace Exterior",
76 "Misery Mire Exterior",
"Palace of Darkness Exterior",
77 "Swamp Palace Exterior",
"Turtle Rock Exterior",
"Thieves' Town Exterior",
80 "Dark Woods",
"Dark Chapel",
"Dark Castle",
"Dark Shields",
"Dark Palace",
81 "Dark Desert",
"Dark Castle Gate",
"Dark Witch",
"Dark Village",
82 "Dark Mountain",
"Dark Tower",
"Dark Rocks",
"Dark Graveyard",
83 "Dark Sanctuary",
"Dark Lake",
"Dark Desert South",
"Dark Eastern",
84 "Dark Zora",
"Dark Catfish",
"Dark Dam",
"Dark Shop",
"Dark Well",
85 "Dark Blacksmith",
"Dark Sick Kid",
"Dark Library",
"Dark Mushroom",
86 "Dark Bat",
"Dark Fountain",
"Dark Fortune",
"Dark Lake Shop",
87 "Dark Bomb Shop",
"Dark Cave 45",
"Dark Checker",
"Dark Mini Moldorm",
88 "Dark Ice Rod",
"Dark Bonk",
"Dark Bottle",
"Dark Sahasrahla",
89 "Dark Chicken",
"Dark Aginah",
"Dark Dam Exit",
"Dark Mimic Exit",
90 "Dark Waterfall",
"Pyramid Top",
"Dark Fat Fairy",
"Dark Spike Cave",
91 "Dark Hookshot",
"Dark Graveyard Ledge",
"Lumberjack House",
92 "Dark Bumper",
"Skull Woods A",
"Skull Woods B",
"Skull Woods C",
93 "Skull Woods D",
"Skull Woods E",
"Skull Woods F",
"Skull Woods G",
94 "Skull Woods H",
"Ice Palace Entry",
"Misery Mire Entry",
95 "Palace of Darkness Entry",
"Swamp Palace Entry",
"Turtle Rock Entry",
96 "Thieves' Town Entry",
99 "Special Area 1",
"Special Area 2",
"Special Area 3",
"Special Area 4",
100 "Special Area 5",
"Special Area 6",
"Special Area 7",
"Special Area 8",
101 "Special Area 9",
"Special Area 10",
"Special Area 11",
"Special Area 12",
102 "Special Area 13",
"Special Area 14",
"Special Area 15",
103 "Special Area 16",
"Special Area 17",
"Special Area 18",
104 "Special Area 19",
"Special Area 20",
"Special Area 21",
105 "Special Area 22",
"Special Area 23",
"Special Area 24",
106 "Special Area 25",
"Special Area 26",
"Special Area 27",
107 "Special Area 28",
"Special Area 29",
"Special Area 30",
108 "Special Area 31",
"Special Area 32"};
114 static const std::vector<std::string> item_names = {
162 "Red Potion (Refill)",
163 "Green Potion (Refill)",
164 "Blue Potion (Refill)",
171 "Pendant of Courage",
175 "Silver Arrows Upgrade",
178 "Heart Container (Boss)",
188 "Heart Container (Sanctuary)",
194 "Blue Shield (Refill)",
195 "Magic Upgrade (1/2)",
196 "Magic Upgrade (1/4)",
197 "Programmable Item 1",
198 "Programmable Item 2",
199 "Programmable Item 3",
207 "Progressive Shield",
209 "Progressive Lifting Glove",
213 "Progressive Bow (Alt)",
224 static const std::vector<std::string> music_names = {
238 "Dark World Death Mountain",
250 "Boss Victory (Short)",
255 "Light World Death Mountain",
278 static const std::vector<std::string> gfx_names = {
"Sprite Sheet 0",
316 std::vector<std::string> result;
317 result.reserve(size);
318 for (
size_t i = 0; i < size; ++i) {
319 result.emplace_back(array[i]);
326 static const std::vector<std::string> names = []() {
327 std::vector<std::string> result;
333 "Wall (top, north) ↔",
334 "Wall (top, south) ↔",
335 "Wall (bottom, north) ↔",
336 "Wall (bottom, south) ↔",
337 "Wall columns (north) ↔",
338 "Wall columns (south) ↔",
339 "Deep wall (north) ↔",
340 "Deep wall (south) ↔",
341 "Diagonal wall A ◤ (top) ↔",
342 "Diagonal wall A ◣ (top) ↔",
343 "Diagonal wall A ◥ (top) ↔",
344 "Diagonal wall A ◢ (top) ↔",
353 static const std::vector<std::string> names = []() {
354 std::vector<std::string> result;
356 result = {
"Type2 Object 1",
"Type2 Object 2" };
363 static const std::vector<std::string> names = []() {
364 std::vector<std::string> result;
366 result = {
"Type3 Object 1",
"Type3 Object 2" };
374 static std::vector<std::string> effect_names;
375 if (effect_names.empty()) {
376 for (
const auto& name : RoomEffect) {
377 effect_names.push_back(name);
385 static const std::vector<std::string> tag_names = {
386 "No Tag",
"NW",
"NE",
"SW",
"SE",
"West",
"East",
387 "North",
"South",
"Entrance",
"Treasure",
"Boss",
"Dark"};
393 static const std::vector<std::string> tile_names = {
394 "Nothing (standard floor)",
397 "Collision (unknown types)",
399 "Collision (unused?)",
404 "Unknown (near water/pit edges)",
405 "Collision (water/pit edges)",
426 "Blocks switch (chest, PoD, walls)",
429 "North single-layer auto stairs",
430 "North layer swap auto stairs",
431 "South single-layer auto stairs",
432 "South layer swap auto stairs",
433 "North/south layer swap auto stairs",
434 "North/south single-layer auto stairs",
435 "West single-layer auto stairs",
436 "West layer swap auto stairs",
437 "East single-layer auto stairs",
438 "East layer swap auto stairs",
439 "East/west layer swap auto stairs",
440 "East/west single-layer auto stairs",
441 "Nothing (stairs edge)",
442 "Straight inter-room stairs south/up",
443 "Straight inter-room stairs north/down",
444 "Straight inter-room stairs south/down 2",
445 "Straight inter-room stairs north/up 2",
446 "Star tile (inactive on GBA)",
447 "Collision (near stairs)",
449 "Square corners ⌜⌝⌞⌟",
460std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
462 std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
467 for (
size_t i = 0; i < rooms.size(); ++i) {
468 labels[
"room"][std::to_string(i)] = rooms[i];
473 for (
size_t i = 0; i < entrances.size(); ++i) {
474 labels[
"entrance"][std::to_string(i)] = entrances[i];
479 for (
size_t i = 0; i < sprites.size(); ++i) {
480 labels[
"sprite"][std::to_string(i)] = sprites[i];
485 for (
size_t i = 0; i < overlords.size(); ++i) {
486 labels[
"overlord"][std::to_string(i)] = overlords[i];
491 for (
size_t i = 0; i < maps.size(); ++i) {
492 labels[
"overworld_map"][std::to_string(i)] = maps[i];
497 for (
size_t i = 0; i < items.size(); ++i) {
498 labels[
"item"][std::to_string(i)] = items[i];
503 for (
size_t i = 0; i < music.size(); ++i) {
504 labels[
"music"][std::to_string(i)] = music[i];
509 for (
size_t i = 0; i < gfx.size(); ++i) {
510 labels[
"graphics"][std::to_string(i)] = gfx[i];
515 for (
size_t i = 0; i < effects.size(); ++i) {
516 labels[
"room_effect"][std::to_string(i)] = effects[i];
521 for (
size_t i = 0; i < tags.size(); ++i) {
522 labels[
"room_tag"][std::to_string(i)] = tags[i];
527 for (
size_t i = 0; i < tiles.size(); ++i) {
528 labels[
"tile_type"][std::to_string(i)] = tiles[i];
536 const std::string& default_value) {
539 auto type_it = labels.find(resource_type);
540 if (type_it == labels.end()) {
541 return default_value.empty() ? resource_type +
"_" + std::to_string(
id)
545 auto label_it = type_it->second.find(std::to_string(
id));
546 if (label_it == type_it->second.end()) {
547 return default_value.empty() ? resource_type +
"_" + std::to_string(
id)
551 return label_it->second;
std::vector< std::string > ConvertArrayToVector(const char **array, size_t size)
Zelda 3 specific classes and functions.
constexpr std::string_view kRoomNames[]
constexpr const char * kEntranceNames[]
static const std::vector< std::string > & GetRoomNames()
static const std::vector< std::string > & GetItemNames()
static std::unordered_map< std::string, std::unordered_map< std::string, std::string > > ToResourceLabels()
Convert all labels to a structured map for project embedding.
static const std::vector< std::string > & GetEntranceNames()
static const std::vector< std::string > & GetType2RoomObjectNames()
static const std::vector< std::string > & GetType1RoomObjectNames()
static const std::vector< std::string > & GetGraphicsSheetNames()
static const std::vector< std::string > & GetMusicTrackNames()
static const std::vector< std::string > & GetTileTypeNames()
static const std::vector< std::string > & GetOverlordNames()
static const std::vector< std::string > & GetSpriteNames()
static const std::vector< std::string > & GetOverworldMapNames()
static const std::vector< std::string > & GetType3RoomObjectNames()
static std::string GetLabel(const std::string &resource_type, int id, const std::string &default_value="")
Get a label by resource type and ID.
static const std::vector< std::string > & GetRoomEffectNames()
static const std::vector< std::string > & GetRoomTagNames()