Tracks and analyzes usage statistics for dungeon resources. More...
#include <dungeon_usage_tracker.h>
Public Member Functions | |
DungeonUsageTracker ()=default | |
void | CalculateUsageStats (const std::array< zelda3::Room, 0x128 > &rooms) |
void | DrawUsageStats () |
void | DrawUsageGrid () |
void | RenderSetUsage (const absl::flat_hash_map< uint16_t, int > &usage_map, uint16_t &selected_set, int spriteset_offset=0x00) |
const absl::flat_hash_map< uint16_t, int > & | GetBlocksetUsage () const |
const absl::flat_hash_map< uint16_t, int > & | GetSpritesetUsage () const |
const absl::flat_hash_map< uint16_t, int > & | GetPaletteUsage () const |
uint16_t | GetSelectedBlockset () const |
uint16_t | GetSelectedSpriteset () const |
uint16_t | GetSelectedPalette () const |
void | SetSelectedBlockset (uint16_t blockset) |
void | SetSelectedSpriteset (uint16_t spriteset) |
void | SetSelectedPalette (uint16_t palette) |
void | ClearUsageStats () |
Private Attributes | |
absl::flat_hash_map< uint16_t, int > | spriteset_usage_ |
absl::flat_hash_map< uint16_t, int > | blockset_usage_ |
absl::flat_hash_map< uint16_t, int > | palette_usage_ |
uint16_t | selected_blockset_ = 0xFFFF |
uint16_t | selected_spriteset_ = 0xFFFF |
uint16_t | selected_palette_ = 0xFFFF |
Tracks and analyzes usage statistics for dungeon resources.
This component manages blockset, spriteset, and palette usage statistics across all dungeon rooms, providing insights for optimization.
Definition at line 16 of file dungeon_usage_tracker.h.
|
default |
void yaze::editor::DungeonUsageTracker::CalculateUsageStats | ( | const std::array< zelda3::Room, 0x128 > & | rooms | ) |
Definition at line 7 of file dungeon_usage_tracker.cc.
References blockset_usage_, palette_usage_, and spriteset_usage_.
void yaze::editor::DungeonUsageTracker::DrawUsageStats | ( | ) |
Definition at line 33 of file dungeon_usage_tracker.cc.
References blockset_usage_, ClearUsageStats(), palette_usage_, and spriteset_usage_.
void yaze::editor::DungeonUsageTracker::DrawUsageGrid | ( | ) |
Definition at line 67 of file dungeon_usage_tracker.cc.
void yaze::editor::DungeonUsageTracker::RenderSetUsage | ( | const absl::flat_hash_map< uint16_t, int > & | usage_map, |
uint16_t & | selected_set, | ||
int | spriteset_offset = 0x00 |
||
) |
Definition at line 72 of file dungeon_usage_tracker.cc.
|
inline |
Definition at line 28 of file dungeon_usage_tracker.h.
References blockset_usage_.
Referenced by yaze::test::TEST(), and yaze::test::TEST().
|
inline |
Definition at line 29 of file dungeon_usage_tracker.h.
References spriteset_usage_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 30 of file dungeon_usage_tracker.h.
References palette_usage_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 33 of file dungeon_usage_tracker.h.
References selected_blockset_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 34 of file dungeon_usage_tracker.h.
References selected_spriteset_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 35 of file dungeon_usage_tracker.h.
References selected_palette_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 37 of file dungeon_usage_tracker.h.
References selected_blockset_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 38 of file dungeon_usage_tracker.h.
References selected_spriteset_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 39 of file dungeon_usage_tracker.h.
References selected_palette_.
Referenced by yaze::test::TEST().
void yaze::editor::DungeonUsageTracker::ClearUsageStats | ( | ) |
Definition at line 78 of file dungeon_usage_tracker.cc.
References blockset_usage_, palette_usage_, selected_blockset_, selected_palette_, selected_spriteset_, and spriteset_usage_.
Referenced by DrawUsageStats(), and yaze::test::TEST().
|
private |
Definition at line 45 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageStats(), and GetSpritesetUsage().
|
private |
Definition at line 46 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageStats(), and GetBlocksetUsage().
|
private |
Definition at line 47 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageStats(), and GetPaletteUsage().
|
private |
Definition at line 49 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), GetSelectedBlockset(), and SetSelectedBlockset().
|
private |
Definition at line 50 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), GetSelectedSpriteset(), and SetSelectedSpriteset().
|
private |
Definition at line 51 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), GetSelectedPalette(), and SetSelectedPalette().