yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::SpriteOamRegistry Class Reference

Registry of all known sprite OAM layouts. More...

#include <sprite_oam_tables.h>

Static Public Member Functions

static const SpriteOamLayoutGetLayout (uint8_t sprite_id)
 Get the OAM layout for a sprite ID.
 
static std::optional< std::array< uint8_t, 4 > > GetRequiredSheets (uint8_t sprite_id)
 Get required graphics sheets for a sprite.
 
static bool HasLayout (uint8_t sprite_id)
 Check if a sprite has a defined layout.
 
static std::vector< const SpriteOamLayout * > GetAllLayouts ()
 Get all defined layouts.
 

Detailed Description

Registry of all known sprite OAM layouts.

Provides lookup by sprite ID for static rendering.

Definition at line 225 of file sprite_oam_tables.h.

Member Function Documentation

◆ GetLayout()

const SpriteOamLayout * yaze::zelda3::SpriteOamRegistry::GetLayout ( uint8_t sprite_id)
static

Get the OAM layout for a sprite ID.

Parameters
sprite_idThe sprite type ID
Returns
Pointer to layout, or nullptr if not defined

Definition at line 42 of file sprite_oam_tables.cc.

Referenced by yaze::editor::SpriteEditor::DrawSpriteCanvas(), and GetRequiredSheets().

◆ GetRequiredSheets()

std::optional< std::array< uint8_t, 4 > > yaze::zelda3::SpriteOamRegistry::GetRequiredSheets ( uint8_t sprite_id)
static

Get required graphics sheets for a sprite.

Parameters
sprite_idThe sprite type ID
Returns
Array of sheet IDs, or empty if not defined

Definition at line 51 of file sprite_oam_tables.cc.

References GetLayout().

Here is the call graph for this function:

◆ HasLayout()

bool yaze::zelda3::SpriteOamRegistry::HasLayout ( uint8_t sprite_id)
static

Check if a sprite has a defined layout.

Parameters
sprite_idThe sprite type ID
Returns
true if layout exists

Definition at line 60 of file sprite_oam_tables.cc.

◆ GetAllLayouts()

std::vector< const SpriteOamLayout * > yaze::zelda3::SpriteOamRegistry::GetAllLayouts ( )
static

Get all defined layouts.

Returns
Vector of all sprite layouts

Definition at line 65 of file sprite_oam_tables.cc.


The documentation for this class was generated from the following files: