Unified draw routine registry. More...
#include <draw_routine_registry.h>
Public Member Functions | |
| void | Initialize () |
| const DrawRoutineInfo * | GetRoutineInfo (int routine_id) const |
| const std::vector< DrawRoutineInfo > & | GetAllRoutines () const |
| bool | RoutineDrawsToBothBGs (int routine_id) const |
| bool | GetRoutineDimensions (int routine_id, int *base_width, int *base_height) const |
Static Public Member Functions | |
| static DrawRoutineRegistry & | Get () |
Private Member Functions | |
| DrawRoutineRegistry ()=default | |
| void | BuildRegistry () |
Private Attributes | |
| std::vector< DrawRoutineInfo > | routines_ |
| std::unordered_map< int, const DrawRoutineInfo * > | routine_map_ |
| bool | initialized_ = false |
Unified draw routine registry.
Singleton that provides draw routine metadata for both ObjectDrawer and ObjectGeometry. This ensures both systems use the same routine IDs and dimension calculations.
Definition at line 173 of file draw_routine_registry.h.
|
privatedefault |
|
static |
Definition at line 12 of file draw_routine_registry.cc.
References Initialize(), and initialized_.
Referenced by yaze::zelda3::ObjectGeometry::BuildRegistry(), and yaze::zelda3::ObjectDrawer::RoutineDrawsToBothBGs().

| void yaze::zelda3::DrawRoutineRegistry::Initialize | ( | ) |
Definition at line 20 of file draw_routine_registry.cc.
References BuildRegistry(), and initialized_.
Referenced by Get().

| const DrawRoutineInfo * yaze::zelda3::DrawRoutineRegistry::GetRoutineInfo | ( | int | routine_id | ) | const |
Definition at line 43 of file draw_routine_registry.cc.
References routine_map_.
Referenced by GetRoutineDimensions(), and RoutineDrawsToBothBGs().
|
inline |
Definition at line 184 of file draw_routine_registry.h.
References routines_.
| bool yaze::zelda3::DrawRoutineRegistry::RoutineDrawsToBothBGs | ( | int | routine_id | ) | const |
Definition at line 51 of file draw_routine_registry.cc.
References yaze::zelda3::DrawRoutineInfo::draws_to_both_bgs, and GetRoutineInfo().

| bool yaze::zelda3::DrawRoutineRegistry::GetRoutineDimensions | ( | int | routine_id, |
| int * | base_width, | ||
| int * | base_height ) const |
Definition at line 56 of file draw_routine_registry.cc.
References yaze::zelda3::DrawRoutineInfo::base_height, yaze::zelda3::DrawRoutineInfo::base_width, and GetRoutineInfo().

|
private |
Definition at line 26 of file draw_routine_registry.cc.
References yaze::zelda3::draw_routines::RegisterCornerRoutines(), yaze::zelda3::draw_routines::RegisterDiagonalRoutines(), yaze::zelda3::draw_routines::RegisterDownwardsRoutines(), yaze::zelda3::draw_routines::RegisterRightwardsRoutines(), yaze::zelda3::draw_routines::RegisterSpecialRoutines(), routine_map_, and routines_.
Referenced by Initialize().
|
private |
Definition at line 196 of file draw_routine_registry.h.
Referenced by BuildRegistry(), and GetAllRoutines().
|
private |
Definition at line 197 of file draw_routine_registry.h.
Referenced by BuildRegistry(), and GetRoutineInfo().
|
private |
Definition at line 198 of file draw_routine_registry.h.
Referenced by Get(), and Initialize().