Tracks and analyzes usage statistics for dungeon resources. More...
#include <dungeon_usage_tracker.h>
Public Member Functions | |
| DungeonUsageTracker ()=default | |
| void | CalculateUsageStats (const DungeonRoomStore &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 17 of file dungeon_usage_tracker.h.
|
default |
| void yaze::editor::DungeonUsageTracker::CalculateUsageStats | ( | const DungeonRoomStore & | rooms | ) |
Definition at line 47 of file dungeon_usage_tracker.cc.
References blockset_usage_, palette_usage_, yaze::editor::DungeonRoomStore::size(), and spriteset_usage_.
| void yaze::editor::DungeonUsageTracker::DrawUsageStats | ( | ) |
Definition at line 74 of file dungeon_usage_tracker.cc.
References blockset_usage_, ClearUsageStats(), palette_usage_, and spriteset_usage_.
| void yaze::editor::DungeonUsageTracker::DrawUsageGrid | ( | ) |
Definition at line 108 of file dungeon_usage_tracker.cc.
References blockset_usage_, palette_usage_, RenderSetUsage(), selected_blockset_, selected_palette_, selected_spriteset_, and spriteset_usage_.
| 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 206 of file dungeon_usage_tracker.cc.
Referenced by DrawUsageGrid().
|
inline |
Definition at line 29 of file dungeon_usage_tracker.h.
References blockset_usage_.
|
inline |
Definition at line 32 of file dungeon_usage_tracker.h.
References spriteset_usage_.
|
inline |
Definition at line 35 of file dungeon_usage_tracker.h.
References palette_usage_.
|
inline |
Definition at line 40 of file dungeon_usage_tracker.h.
References selected_blockset_.
|
inline |
Definition at line 41 of file dungeon_usage_tracker.h.
References selected_spriteset_.
|
inline |
Definition at line 42 of file dungeon_usage_tracker.h.
References selected_palette_.
|
inline |
Definition at line 44 of file dungeon_usage_tracker.h.
References selected_blockset_.
|
inline |
Definition at line 45 of file dungeon_usage_tracker.h.
References selected_spriteset_.
|
inline |
Definition at line 48 of file dungeon_usage_tracker.h.
References selected_palette_.
| void yaze::editor::DungeonUsageTracker::ClearUsageStats | ( | ) |
Definition at line 296 of file dungeon_usage_tracker.cc.
References blockset_usage_, palette_usage_, selected_blockset_, selected_palette_, selected_spriteset_, and spriteset_usage_.
Referenced by DrawUsageStats().
|
private |
Definition at line 54 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageGrid(), DrawUsageStats(), and GetSpritesetUsage().
|
private |
Definition at line 55 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageGrid(), DrawUsageStats(), and GetBlocksetUsage().
|
private |
Definition at line 56 of file dungeon_usage_tracker.h.
Referenced by CalculateUsageStats(), ClearUsageStats(), DrawUsageGrid(), DrawUsageStats(), and GetPaletteUsage().
|
private |
Definition at line 58 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), DrawUsageGrid(), GetSelectedBlockset(), and SetSelectedBlockset().
|
private |
Definition at line 59 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), DrawUsageGrid(), GetSelectedSpriteset(), and SetSelectedSpriteset().
|
private |
Definition at line 60 of file dungeon_usage_tracker.h.
Referenced by ClearUsageStats(), DrawUsageGrid(), GetSelectedPalette(), and SetSelectedPalette().