|
Porytiles
|
Represents the attributes of a single metatile. More...
#include <metatile_attribute.hpp>
Public Member Functions | |
| MetatileAttribute ()=default | |
| MetatileAttribute (LayerType layer_type, std::uint16_t behavior) | |
| Constructs an Emerald-format metatile attribute. | |
| MetatileAttribute (LayerType layer_type, std::uint16_t behavior, std::uint8_t terrain, std::uint8_t encounter_type, std::uint8_t attribute_2, std::uint8_t attribute_3, std::uint8_t attribute_5, bool attribute_7) | |
| Constructs a FireRed-format metatile attribute with all fields. | |
| LayerType | layer_type () const |
| void | layer_type (LayerType layer_type) |
| std::uint16_t | behavior () const |
| void | behavior (std::uint16_t behavior) |
| std::uint8_t | terrain () const |
| void | terrain (std::uint8_t terrain) |
| std::uint8_t | encounter_type () const |
| void | encounter_type (std::uint8_t encounter_type) |
| std::uint8_t | attribute_2 () const |
| void | attribute_2 (std::uint8_t attribute_2) |
| std::uint8_t | attribute_3 () const |
| void | attribute_3 (std::uint8_t attribute_3) |
| std::uint8_t | attribute_5 () const |
| void | attribute_5 (std::uint8_t attribute_5) |
| bool | attribute_7 () const |
| void | attribute_7 (bool attribute_7) |
Represents the attributes of a single metatile.
Emerald uses a 2-byte format encoding behavior (bits 0-7) and layer type (bits 12-15). FireRed uses a 4-byte format encoding behavior (bits 0-8), terrain (bits 9-13), attribute_2 (bits 14-17), attribute_3 (bits 18-23), encounter_type (bits 24-26), attribute_5 (bits 27-28), layer_type (bits 29-30), and attribute_7 (bit 31).
The FireRed-specific fields default to zero, so existing Emerald code is unaffected.
Definition at line 30 of file metatile_attribute.hpp.
|
default |
|
inline |
Constructs an Emerald-format metatile attribute.
FireRed-specific fields are initialized to zero.
Definition at line 40 of file metatile_attribute.hpp.
|
inline |
Constructs a FireRed-format metatile attribute with all fields.
Definition at line 45 of file metatile_attribute.hpp.
|
inline |
Definition at line 99 of file metatile_attribute.hpp.
|
inline |
Definition at line 104 of file metatile_attribute.hpp.
|
inline |
Definition at line 109 of file metatile_attribute.hpp.
|
inline |
Definition at line 114 of file metatile_attribute.hpp.
|
inline |
Definition at line 119 of file metatile_attribute.hpp.
|
inline |
Definition at line 124 of file metatile_attribute.hpp.
|
inline |
Definition at line 129 of file metatile_attribute.hpp.
|
inline |
Definition at line 134 of file metatile_attribute.hpp.
|
inline |
Definition at line 69 of file metatile_attribute.hpp.
|
inline |
Definition at line 74 of file metatile_attribute.hpp.
|
inline |
Definition at line 89 of file metatile_attribute.hpp.
|
inline |
Definition at line 94 of file metatile_attribute.hpp.
|
inline |
Definition at line 59 of file metatile_attribute.hpp.
|
inline |
Definition at line 64 of file metatile_attribute.hpp.
|
inline |
Definition at line 79 of file metatile_attribute.hpp.
|
inline |
Definition at line 84 of file metatile_attribute.hpp.