5#include <unordered_map>
17 static std::vector<std::string> room_names;
18 if (room_names.empty()) {
20 room_names.emplace_back(
name);
28 static std::vector<std::string> entrance_names;
29 if (entrance_names.empty()) {
31 entrance_names.emplace_back(
name);
34 return entrance_names;
39 static std::vector<std::string> sprite_names;
40 if (sprite_names.empty()) {
42 sprite_names.push_back(
name);
50 static std::vector<std::string> overlord_names;
51 if (overlord_names.empty()) {
53 overlord_names.push_back(
name);
56 return overlord_names;
61 static const std::vector<std::string> map_names = {
63 "Lost Woods",
"Master Sword Pedestal",
"Castle Courtyard",
"Link's House",
64 "Eastern Palace",
"Desert Palace",
"Hyrule Castle",
"Witch's Hut",
65 "Kakariko Village",
"Death Mountain",
"Tower of Hera",
"Spectacle Rock",
66 "Graveyard",
"Sanctuary",
"Lake Hylia",
"Desert of Mystery",
67 "Eastern Ruins",
"Zora's Domain",
"Catfish",
"Dam",
"Potion Shop",
68 "Kakariko Well",
"Blacksmith",
"Sick Kid",
"Library",
"Mushroom",
69 "Magic Bat",
"Fairy Fountain",
"Fortune Teller",
"Lake Shop",
"Bomb Shop",
70 "Cave 45",
"Checkerboard Cave",
"Mini Moldorm Cave",
"Ice Rod Cave",
71 "Bonk Rocks",
"Bottle Merchant",
"Sahasrahla's Hut",
"Chicken House",
72 "Aginah's Cave",
"Dam Exterior",
"Mimic Cave Exterior",
"Waterfall Fairy",
73 "Pyramid",
"Fat Fairy",
"Spike Cave",
"Hookshot Cave",
"Graveyard Ledge",
74 "Dark Lumberjacks",
"Bumper Cave",
"Skull Woods 1",
"Skull Woods 2",
75 "Skull Woods 3",
"Skull Woods 4",
"Skull Woods 5",
"Skull Woods 6",
76 "Skull Woods 7",
"Skull Woods 8",
"Ice Palace Exterior",
77 "Misery Mire Exterior",
"Palace of Darkness Exterior",
78 "Swamp Palace Exterior",
"Turtle Rock Exterior",
"Thieves' Town Exterior",
81 "Dark Woods",
"Dark Chapel",
"Dark Castle",
"Dark Shields",
"Dark Palace",
82 "Dark Desert",
"Dark Castle Gate",
"Dark Witch",
"Dark Village",
83 "Dark Mountain",
"Dark Tower",
"Dark Rocks",
"Dark Graveyard",
84 "Dark Sanctuary",
"Dark Lake",
"Dark Desert South",
"Dark Eastern",
85 "Dark Zora",
"Dark Catfish",
"Dark Dam",
"Dark Shop",
"Dark Well",
86 "Dark Blacksmith",
"Dark Sick Kid",
"Dark Library",
"Dark Mushroom",
87 "Dark Bat",
"Dark Fountain",
"Dark Fortune",
"Dark Lake Shop",
88 "Dark Bomb Shop",
"Dark Cave 45",
"Dark Checker",
"Dark Mini Moldorm",
89 "Dark Ice Rod",
"Dark Bonk",
"Dark Bottle",
"Dark Sahasrahla",
90 "Dark Chicken",
"Dark Aginah",
"Dark Dam Exit",
"Dark Mimic Exit",
91 "Dark Waterfall",
"Pyramid Top",
"Dark Fat Fairy",
"Dark Spike Cave",
92 "Dark Hookshot",
"Dark Graveyard Ledge",
"Lumberjack House",
93 "Dark Bumper",
"Skull Woods A",
"Skull Woods B",
"Skull Woods C",
94 "Skull Woods D",
"Skull Woods E",
"Skull Woods F",
"Skull Woods G",
95 "Skull Woods H",
"Ice Palace Entry",
"Misery Mire Entry",
96 "Palace of Darkness Entry",
"Swamp Palace Entry",
"Turtle Rock Entry",
97 "Thieves' Town Entry",
100 "Special Area 1",
"Special Area 2",
"Special Area 3",
"Special Area 4",
101 "Special Area 5",
"Special Area 6",
"Special Area 7",
"Special Area 8",
102 "Special Area 9",
"Special Area 10",
"Special Area 11",
"Special Area 12",
103 "Special Area 13",
"Special Area 14",
"Special Area 15",
104 "Special Area 16",
"Special Area 17",
"Special Area 18",
105 "Special Area 19",
"Special Area 20",
"Special Area 21",
106 "Special Area 22",
"Special Area 23",
"Special Area 24",
107 "Special Area 25",
"Special Area 26",
"Special Area 27",
108 "Special Area 28",
"Special Area 29",
"Special Area 30",
109 "Special Area 31",
"Special Area 32"};
115 static const std::vector<std::string> item_names = {
163 "Red Potion (Refill)",
164 "Green Potion (Refill)",
165 "Blue Potion (Refill)",
172 "Pendant of Courage",
176 "Silver Arrows Upgrade",
179 "Heart Container (Boss)",
189 "Heart Container (Sanctuary)",
195 "Blue Shield (Refill)",
196 "Magic Upgrade (1/2)",
197 "Magic Upgrade (1/4)",
198 "Programmable Item 1",
199 "Programmable Item 2",
200 "Programmable Item 3",
208 "Progressive Shield",
210 "Progressive Lifting Glove",
214 "Progressive Bow (Alt)",
225 static const std::vector<std::string> music_names = {
239 "Dark World Death Mountain",
251 "Boss Victory (Short)",
256 "Light World Death Mountain",
279 static const std::vector<std::string> gfx_names = {
"Sprite Sheet 0",
317 std::vector<std::string> result;
318 result.reserve(size);
319 for (
size_t i = 0; i < size; ++i) {
320 result.emplace_back(array[i]);
327 static const std::vector<std::string> names = []() {
328 std::vector<std::string> result;
334 "Wall (top, north) ↔",
335 "Wall (top, south) ↔",
336 "Wall (bottom, north) ↔",
337 "Wall (bottom, south) ↔",
338 "Wall columns (north) ↔",
339 "Wall columns (south) ↔",
340 "Deep wall (north) ↔",
341 "Deep wall (south) ↔",
342 "Diagonal wall A ◤ (top) ↔",
343 "Diagonal wall A ◣ (top) ↔",
344 "Diagonal wall A ◥ (top) ↔",
345 "Diagonal wall A ◢ (top) ↔",
354 static const std::vector<std::string> names = []() {
355 std::vector<std::string> result;
357 result = {
"Type2 Object 1",
"Type2 Object 2" };
364 static const std::vector<std::string> names = []() {
365 std::vector<std::string> result;
367 result = {
"Type3 Object 1",
"Type3 Object 2" };
375 static std::vector<std::string> effect_names;
376 if (effect_names.empty()) {
378 effect_names.push_back(
name);
386 static const std::vector<std::string> tag_names = {
387 "No Tag",
"NW",
"NE",
"SW",
"SE",
"West",
"East",
388 "North",
"South",
"Entrance",
"Treasure",
"Boss",
"Dark"};
394 static const std::vector<std::string> tile_names = {
395 "Nothing (standard floor)",
398 "Collision (unknown types)",
400 "Collision (unused?)",
405 "Unknown (near water/pit edges)",
406 "Collision (water/pit edges)",
427 "Blocks switch (chest, PoD, walls)",
430 "North single-layer auto stairs",
431 "North layer swap auto stairs",
432 "South single-layer auto stairs",
433 "South layer swap auto stairs",
434 "North/south layer swap auto stairs",
435 "North/south single-layer auto stairs",
436 "West single-layer auto stairs",
437 "West layer swap auto stairs",
438 "East single-layer auto stairs",
439 "East layer swap auto stairs",
440 "East/west layer swap auto stairs",
441 "East/west single-layer auto stairs",
442 "Nothing (stairs edge)",
443 "Straight inter-room stairs south/up",
444 "Straight inter-room stairs north/down",
445 "Straight inter-room stairs south/down 2",
446 "Straight inter-room stairs north/up 2",
447 "Star tile (inactive on GBA)",
448 "Collision (near stairs)",
450 "Square corners ⌜⌝⌞⌟",
461std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
463 std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
468 for (
size_t i = 0; i < rooms.size(); ++i) {
469 labels[
"room"][std::to_string(i)] = rooms[i];
474 for (
size_t i = 0; i < entrances.size(); ++i) {
475 labels[
"entrance"][std::to_string(i)] = entrances[i];
480 for (
size_t i = 0; i < sprites.size(); ++i) {
481 labels[
"sprite"][std::to_string(i)] = sprites[i];
486 for (
size_t i = 0; i < overlords.size(); ++i) {
487 labels[
"overlord"][std::to_string(i)] = overlords[i];
492 for (
size_t i = 0; i < maps.size(); ++i) {
493 labels[
"overworld_map"][std::to_string(i)] = maps[i];
498 for (
size_t i = 0; i < items.size(); ++i) {
499 labels[
"item"][std::to_string(i)] = items[i];
504 for (
size_t i = 0; i < music.size(); ++i) {
505 labels[
"music"][std::to_string(i)] = music[i];
510 for (
size_t i = 0; i < gfx.size(); ++i) {
511 labels[
"graphics"][std::to_string(i)] = gfx[i];
516 for (
size_t i = 0; i < effects.size(); ++i) {
517 labels[
"room_effect"][std::to_string(i)] = effects[i];
522 for (
size_t i = 0; i < tags.size(); ++i) {
523 labels[
"room_tag"][std::to_string(i)] = tags[i];
528 for (
size_t i = 0; i < tiles.size(); ++i) {
529 labels[
"tile_type"][std::to_string(i)] = tiles[i];
537 const std::string& default_value) {
540 auto type_it = labels.find(resource_type);
541 if (type_it == labels.end()) {
542 return default_value.empty() ? resource_type +
"_" + std::to_string(
id)
546 auto label_it = type_it->second.find(std::to_string(
id));
547 if (label_it == type_it->second.end()) {
548 return default_value.empty() ? resource_type +
"_" + std::to_string(
id)
552 return label_it->second;
std::vector< std::string > ConvertArrayToVector(const char **array, size_t size)
Zelda 3 specific classes and functions.
const std::string kOverlordNames[26]
const std::string kSpriteDefaultNames[256]
constexpr std::array< std::string_view, 297 > kRoomNames
const std::string RoomEffect[8]
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()