|
Porytiles
|
Abstract interface for providing two-way metatile encounter type mappings. More...
#include <encounter_type_map_provider.hpp>
Public Member Functions | |
| virtual | ~EncounterTypeMapProvider ()=default |
| virtual ChainableResult< std::uint8_t > | lookup (const std::string &encounter_name) const =0 |
| Looks up the numeric value for an encounter type constant name. | |
| virtual ChainableResult< std::string > | lookup (std::uint8_t encounter_value) const =0 |
| Looks up the encounter type constant name for a numeric value. | |
Abstract interface for providing two-way metatile encounter type mappings.
The EncounterTypeMapProvider maps encounter type constant names (e.g., "TILE_ENCOUNTER_NONE", "TILE_ENCOUNTER_LAND") to their corresponding uint8_t values and vice versa. Implementations may load these mappings from various sources such as header files or configuration. Loading and caching strategies are implementation details left to concrete implementations.
Definition at line 19 of file encounter_type_map_provider.hpp.
|
virtualdefault |
|
pure virtual |
Looks up the numeric value for an encounter type constant name.
This function searches for the given encounter type constant name in the provider's mapping and returns its corresponding numeric value if found.
| encounter_name | The encounter type constant name (e.g., "TILE_ENCOUNTER_NONE") |
Implemented in porytiles::HeaderEncounterTypeMapProvider.
|
pure virtual |
Looks up the encounter type constant name for a numeric value.
This function performs a reverse lookup, searching for the encounter type constant name that corresponds to the given numeric value.
| encounter_value | The numeric encounter type value |
Implemented in porytiles::HeaderEncounterTypeMapProvider.