|
Porytiles
|
Abstract interface for providing two-way metatile behavior mappings. More...
#include <behavior_map_provider.hpp>
Public Member Functions | |
| virtual | ~BehaviorMapProvider ()=default |
| virtual ChainableResult< std::uint16_t > | lookup (const std::string &behavior_name) const =0 |
| Looks up the numeric value for a behavior constant name. | |
| virtual ChainableResult< std::string > | lookup (std::uint16_t behavior_value) const =0 |
| Looks up the behavior constant name for a numeric value. | |
Abstract interface for providing two-way metatile behavior mappings.
The BehaviorMapProvider maps behavior constant names (e.g., "MB_NORMAL", "MB_TALL_GRASS") to their corresponding uint16_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 18 of file behavior_map_provider.hpp.
|
virtualdefault |
|
pure virtual |
Looks up the numeric value for a behavior constant name.
This function searches for the given behavior constant name in the provider's mapping and returns its corresponding numeric value if found.
| behavior_name | The behavior constant name (e.g., "MB_NORMAL") |
Implemented in porytiles::HeaderBehaviorMapProvider.
|
pure virtual |
Looks up the behavior constant name for a numeric value.
This function performs a reverse lookup, searching for the behavior constant name that corresponds to the given numeric value.
| behavior_value | The numeric behavior value |
Implemented in porytiles::HeaderBehaviorMapProvider.