1#ifndef YAZE_ZELDA3_RESOURCE_LABELS_H
2#define YAZE_ZELDA3_RESOURCE_LABELS_H
7#include <unordered_map>
10#include "absl/status/status.h"
58 using LabelMap = std::unordered_map<std::string, std::string>;
84 std::string
GetLabel(
const std::string& type_str,
int id)
const;
Unified interface for accessing resource labels with project overrides.
std::string ExportToZScreamFormat() const
Export project labels to ZScream DefaultNames.txt format.
void SetProjectLabel(ResourceType type, int id, const std::string &label)
Set a project-specific label override.
bool HasProjectLabel(ResourceType type, int id) const
Check if a project-specific label exists.
const ProjectLabels * GetAllProjectLabels() const
Get all project labels (read-only)
void ClearAllProjectLabels()
Clear all project labels.
int GetResourceCount(ResourceType type) const
Get the count of resources for a given type.
std::unordered_map< std::string, std::string > LabelMap
ProjectLabels * project_labels_
bool PreferHMagicNames() const
Get whether Hyrule Magic names are preferred.
std::string GetLabel(ResourceType type, int id) const
Get a label for a resource by type and ID.
bool ParseZScreamLine(const std::string &line, const std::string §ion, int &line_index)
void SetPreferHMagicNames(bool prefer)
Set whether to prefer Hyrule Magic sprite names.
std::unordered_map< std::string, LabelMap > ProjectLabels
absl::Status ImportFromZScreamFormat(const std::string &content)
Import labels from ZScream DefaultNames.txt format.
std::string GetVanillaLabel(ResourceType type, int id) const
Get the vanilla (default) label for a resource.
ResourceLabelProvider()=default
const LabelMap * GetProjectLabelsForType(ResourceType type) const
Get all project labels for a given type.
std::string GetHMagicLabel(ResourceType type, int id) const
Get the Hyrule Magic label for a resource (sprites only)
void SetProjectLabels(ProjectLabels *labels)
Set the project labels reference (typically from YazeProject)
void ClearProjectLabel(ResourceType type, int id)
Clear a project-specific label (revert to default)
ResourceType
Enumeration of all supported resource types for labeling.
std::string GetRoomTagLabel(int id)
Convenience function to get a room tag label.
std::string GetSpriteLabel(int id)
Convenience function to get a sprite label.
std::string GetEntranceLabel(int id)
Convenience function to get an entrance label.
std::string GetRoomLabel(int id)
Convenience function to get a room label.
std::string GetOverlordLabel(int id)
Convenience function to get an overlord label.
std::string GetItemLabel(int id)
Convenience function to get an item label.
std::string GetOverworldMapLabel(int id)
Convenience function to get an overworld map label.
std::string ResourceTypeToString(ResourceType type)
Convert ResourceType enum to string key for storage.
ResourceType StringToResourceType(const std::string &type_str)
Convert string key to ResourceType enum.
std::string GetMusicLabel(int id)
Convenience function to get a music track label.
ResourceLabelProvider & GetResourceLabels()
Get the global ResourceLabelProvider instance.