Represents a decoded custom object (from binary format) More...
#include <custom_object.h>
Classes | |
| struct | BoundingBox |
| struct | TileMapEntry |
Public Member Functions | |
| bool | IsEmpty () const |
| BoundingBox | GetBoundingBox () const |
Public Attributes | |
| std::vector< TileMapEntry > | tiles |
Represents a decoded custom object (from binary format)
Binary Format (matches Oracle-of-Secrets object_handler.asm): Header (2 bytes, little-endian): Low 5 bits: Tile Count (0 encodes 32 tiles for a nonzero header) High Byte: Jump Offset (added to row start position for next segment) Data (Tile Count * 2 bytes): Word: vhopppcc cccccccc (SNES tilemap entry: flip, priority, palette, tile ID) A zero word advances the destination without writing a tile. Repeats until Header is 0x0000.
Buffer Layout: Stride = 128 bytes (64 tiles per row, 2 bytes per tile) Jump offset of 0x80 (128) advances by 1 row
Definition at line 36 of file custom_object.h.
|
inline |
Definition at line 56 of file custom_object.h.
References tiles.
|
inline |
Definition at line 60 of file custom_object.h.
References yaze::zelda3::CustomObject::BoundingBox::max_x, yaze::zelda3::CustomObject::BoundingBox::max_y, yaze::zelda3::CustomObject::BoundingBox::min_x, yaze::zelda3::CustomObject::BoundingBox::min_y, and tiles.
Referenced by yaze::zelda3::ObjectTileEditor::LoadCustomObjectLayout().
| std::vector<TileMapEntry> yaze::zelda3::CustomObject::tiles |
Definition at line 54 of file custom_object.h.
Referenced by GetBoundingBox(), IsEmpty(), yaze::zelda3::ObjectTileEditor::LoadCustomObjectLayout(), and yaze::zelda3::ObjectTileEditor::WriteBack().