Resource management arena for efficient graphics memory handling. More...
#include <arena.h>

Classes | |
| struct | SurfacePool |
| struct | TextureCommand |
| struct | TexturePool |
Public Types | |
| enum class | TextureCommandType { CREATE , UPDATE , DESTROY } |
| using | PaletteChangeCallback |
Public Member Functions | |
| void | Initialize (IRenderer *renderer) |
| ~Arena () | |
| void | QueueTextureCommand (TextureCommandType type, Bitmap *bitmap) |
| void | ProcessTextureQueue (IRenderer *renderer) |
| bool | HasPendingTextures () const |
| Check if there are pending textures to process. | |
| bool | ProcessSingleTexture (IRenderer *renderer) |
| Process a single texture command for frame-budget-aware loading. | |
| SDL_Surface * | AllocateSurface (int width, int height, int depth, int format) |
| void | FreeSurface (SDL_Surface *surface) |
| void | Shutdown () |
| size_t | GetTextureCount () const |
| size_t | GetSurfaceCount () const |
| size_t | GetPooledTextureCount () const |
| size_t | GetPooledSurfaceCount () const |
| size_t | texture_command_queue_size () const |
| std::array< gfx::Bitmap, 223 > & | gfx_sheets () |
| Get reference to all graphics sheets. | |
| auto | gfx_sheet (int i) |
| Get a specific graphics sheet by index. | |
| auto | mutable_gfx_sheet (int i) |
| Get mutable reference to a specific graphics sheet. | |
| auto | mutable_gfx_sheets () |
| Get mutable reference to all graphics sheets. | |
| void | NotifySheetModified (int sheet_index) |
| Notify Arena that a graphics sheet has been modified. | |
| void | NotifyPaletteModified (const std::string &group_name, int palette_index=-1) |
| Notify all listeners that a palette has been modified. | |
| int | RegisterPaletteListener (PaletteChangeCallback callback) |
| Register a callback for palette change notifications. | |
| void | UnregisterPaletteListener (int listener_id) |
| Unregister a palette change listener. | |
| auto & | bg1 () |
| Get reference to background layer 1 buffer. | |
| auto & | bg2 () |
| Get reference to background layer 2 buffer. | |
Static Public Member Functions | |
| static Arena & | Get () |
Private Member Functions | |
| Arena () | |
Private Attributes | |
| BackgroundBuffer | bg1_ |
| BackgroundBuffer | bg2_ |
| std::array< uint16_t, kTotalTiles > | layer1_buffer_ |
| std::array< uint16_t, kTotalTiles > | layer2_buffer_ |
| std::array< gfx::Bitmap, 223 > | gfx_sheets_ |
| std::unordered_map< TextureHandle, std::unique_ptr< SDL_Texture, util::SDL_Texture_Deleter > > | textures_ |
| std::unordered_map< SDL_Surface *, std::unique_ptr< SDL_Surface, util::SDL_Surface_Deleter > > | surfaces_ |
| struct yaze::gfx::Arena::TexturePool | texture_pool_ |
| struct yaze::gfx::Arena::SurfacePool | surface_pool_ |
| std::vector< TextureCommand > | texture_command_queue_ |
| IRenderer * | renderer_ = nullptr |
| std::unordered_map< int, PaletteChangeCallback > | palette_listeners_ |
| int | next_palette_listener_id_ = 1 |
Static Private Attributes | |
| static constexpr int | kTilesPerRow = 64 |
| static constexpr int | kTilesPerColumn = 64 |
| static constexpr int | kTotalTiles = kTilesPerRow * kTilesPerColumn |
Resource management arena for efficient graphics memory handling.
The Arena class provides centralized management of SDL textures and surfaces for the YAZE ROM hacking editor. It implements several key optimizations:
Key Features:
Performance Optimizations:
ROM Hacking Specific:
|
strong |
| yaze::gfx::Arena::~Arena | ( | ) |
Definition at line 29 of file arena.cc.
References Shutdown().

|
private |
Definition at line 24 of file arena.cc.
References layer1_buffer_, and layer2_buffer_.
|
static |
Definition at line 19 of file arena.cc.
Referenced by yaze::editor::PixelEditorPanel::ApplyBrush(), yaze::editor::PixelEditorPanel::ApplyEraser(), yaze::editor::PixelEditorPanel::ApplyEyedropper(), yaze::editor::PixelEditorPanel::ApplyFill(), yaze::gui::CanvasUtils::ApplyPaletteGroup(), yaze::editor::PaletteControlsPanel::ApplyPaletteToAllSheets(), yaze::editor::Tile16Editor::ApplyPaletteToCurrentTile16Bitmap(), yaze::editor::PaletteControlsPanel::ApplyPaletteToSheet(), yaze::editor::PixelEditorPanel::ApplyPencil(), yaze::gui::CanvasUtils::ApplyPendingPaletteUpdates(), yaze::gfx::PaletteManager::ApplyPreviewChanges(), yaze::gui::PaletteEditorWidget::ApplyROMPalette(), yaze::editor::LinkSpritePanel::ApplySelectedPalette(), yaze::gfx::Bitmap::Bitmap(), yaze::zelda3::Inventory::BuildTileset(), yaze::zelda3::TitleScreen::BuildTileset(), yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::editor::OverworldEditor::Clear(), yaze::editor::OverworldEditor::ClearScratchSpace(), yaze::editor::Tile16Editor::ClearTile16(), yaze::test::TestManager::CollectResourceStats(), yaze::editor::Tile16Editor::CommitChangesToBlockset(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::gfx::Bitmap::Create(), yaze::zelda3::OverworldMapScreen::Create(), yaze::zelda3::Inventory::Create(), yaze::gfx::Bitmap::CreateTexture(), yaze::gfx::CreateTilemap(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::Controller::DoRender(), yaze::editor::DungeonRoomGraphicsPanel::Draw(), yaze::editor::OverworldEditor::DrawAreaGraphics(), yaze::gui::DrawBitmap(), yaze::gui::DrawBitmapPreview(), yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::editor::PixelEditorPanel::DrawColorPicker(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::PixelEditorPanel::DrawLine(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::PixelEditorPanel::DrawMiniMap(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::PixelEditorPanel::DrawRectangle(), yaze::editor::DungeonCanvasViewer::DrawRoomBackgroundLayers(), yaze::editor::DungeonObjectSelector::DrawRoomGraphics(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::OverworldEditor::DrawScratchSpace(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::editor::SheetBrowserPanel::DrawSheetGrid(), yaze::editor::LinkSpritePanel::DrawSheetThumbnail(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::editor::OverworldEditor::DrawTile8Selector(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenEditor(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::PixelEditorPanel::DrawToolbar(), yaze::editor::PixelEditorPanel::EndSelection(), yaze::editor::OverworldEditor::EnsureMapTexture(), yaze::cli::agent::tools::VisualAnalysisBase::ExtractTileAtPosition(), yaze::editor::Tile16Editor::FillTile16WithTile8(), getArenaStatus(), getGfxSheetInfo(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::PixelEditorPanel::HandleCanvasInput(), yaze::cli::HandleGfxExportLegacy(), yaze::cli::HandleGfxImportLegacy(), yaze::editor::MessageEditor::Initialize(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::GraphicsEditor::Load(), yaze::editor::ScreenEditor::Load(), yaze::editor::OverworldEditor::Load(), yaze::editor::EditorManager::LoadAssets(), yaze::editor::ScreenEditor::LoadBinaryGfx(), yaze::zelda3::OverworldMapScreen::LoadCustomMap(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::zelda3::LoadDungeonMapTile16(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::editor::OverworldEditor::LoadSpriteGraphics(), yaze::editor::SpriteEditor::LoadSpriteGraphicsBuffer(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::LoadTile8(), yaze::zelda3::TitleScreen::LoadTitleScreen(), yaze::Controller::OnEntry(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::gfx::Bitmap::operator=(), yaze::gfx::Bitmap::operator=(), yaze::editor::PixelEditorPanel::PasteSelection(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::editor::Tile16Editor::PreviewPaletteChange(), yaze::editor::DungeonEditorV2::ProcessDeferredTextures(), yaze::editor::OverworldEditor::ProcessDeferredTextures(), yaze::editor::Tile16Editor::Redo(), yaze::gfx::Bitmap::Reformat(), yaze::editor::Tile16Editor::RefreshAllPalettes(), yaze::editor::OverworldEditor::RefreshChildMapOnDemand(), yaze::editor::OverworldEditor::RefreshMapPalette(), yaze::editor::OverworldEditor::RefreshMultiAreaMapsSafely(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM(), yaze::zelda3::TitleScreen::RenderBG1Layer(), yaze::zelda3::TitleScreen::RenderBG2Layer(), yaze::gui::CanvasContextMenu::RenderBitmapOperationsMenu(), yaze::zelda3::TitleScreen::RenderCompositeLayer(), yaze::editor::DungeonObjectInteraction::RenderGhostPreviewBitmap(), yaze::gui::RenderPreviewPanel(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::gfx::RenderTilesBatch(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::gfx::Bitmap::Resize(), yaze::test::ArenaTestSuite::RunArenaAllocationTest(), yaze::test::ArenaTestSuite::RunArenaCleanupTest(), yaze::test::IntegratedTestSuite::RunArenaIntegrityTest(), yaze::test::IntegratedTestSuite::RunArenaResourceManagementTest(), yaze::test::ArenaTestSuite::RunArenaResourceTrackingTest(), yaze::test::IntegratedTestSuite::RunGraphicsValidationTest(), yaze::test::PerformanceTestSuite::RunMemoryUsageTest(), yaze::test::PerformanceTestSuite::RunResourceLeakTest(), yaze::editor::GraphicsEditor::Save(), yaze::editor::OverworldEditor::SaveCurrentSelectionToScratch(), yaze::gfx::PaletteManager::SaveGroup(), yaze::editor::EditorManager::SaveRom(), yaze::editor::Tile16Editor::SaveTile16ToScratchSpace(), yaze::editor::PixelEditorPanel::SaveUndoState(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::platform::SDL2WindowBackend::Shutdown(), yaze::core::ShutdownWindow(), yaze::editor::Tile16Editor::Undo(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges(), yaze::editor::Tile16Editor::UpdateLivePreview(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), yaze::editor::OverworldEditor::UpdateScratchBitmapTile(), yaze::gfx::Bitmap::UpdateTexture(), yaze::gfx::UpdateTile16(), yaze::editor::Tile16Editor::UpdateTile16Edit(), yaze::editor::Tile16Editor::UpdateTile8Palette(), and yaze::gfx::UpdateTilemap().
| void yaze::gfx::Arena::Initialize | ( | IRenderer * | renderer | ) |
Definition at line 15 of file arena.cc.
References renderer_.
Referenced by yaze::Controller::OnEntry().
| void yaze::gfx::Arena::QueueTextureCommand | ( | TextureCommandType | type, |
| Bitmap * | bitmap ) |
Definition at line 34 of file arena.cc.
References yaze::gfx::Bitmap::generation(), and texture_command_queue_.
Referenced by yaze::gui::CanvasUtils::ApplyPaletteGroup(), yaze::editor::Tile16Editor::ApplyPaletteToCurrentTile16Bitmap(), yaze::gui::CanvasUtils::ApplyPendingPaletteUpdates(), yaze::gui::PaletteEditorWidget::ApplyROMPalette(), yaze::editor::LinkSpritePanel::ApplySelectedPalette(), yaze::zelda3::Inventory::BuildTileset(), yaze::zelda3::TitleScreen::BuildTileset(), yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::editor::OverworldEditor::ClearScratchSpace(), yaze::editor::Tile16Editor::ClearTile16(), yaze::editor::Tile16Editor::CommitChangesToBlockset(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::zelda3::OverworldMapScreen::Create(), yaze::zelda3::Inventory::Create(), yaze::gfx::Bitmap::CreateTexture(), yaze::gfx::CreateTilemap(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::editor::DungeonRoomGraphicsPanel::Draw(), yaze::editor::OverworldEditor::DrawAreaGraphics(), yaze::gui::DrawBitmap(), yaze::gui::DrawBitmapPreview(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::ScreenEditor::DrawOverworldMapEditor(), yaze::editor::DungeonCanvasViewer::DrawRoomBackgroundLayers(), yaze::editor::OverworldEditor::DrawScratchSpace(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::editor::LinkSpritePanel::DrawSheetThumbnail(), yaze::editor::ScreenEditor::DrawTitleScreenBG1Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenBG2Canvas(), yaze::editor::ScreenEditor::DrawTitleScreenCompositeCanvas(), yaze::editor::ScreenEditor::DrawTitleScreenEditor(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::OverworldEditor::EnsureMapTexture(), yaze::editor::Tile16Editor::FillTile16WithTile8(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::MessageEditor::Initialize(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::GraphicsEditor::Load(), yaze::editor::ScreenEditor::Load(), yaze::editor::ScreenEditor::LoadBinaryGfx(), yaze::zelda3::OverworldMapScreen::LoadCustomMap(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::zelda3::LoadDungeonMapTile16(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::editor::OverworldEditor::LoadSpriteGraphics(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::LoadTile8(), yaze::zelda3::TitleScreen::LoadTitleScreen(), NotifySheetModified(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::gfx::Bitmap::operator=(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::editor::Tile16Editor::PreviewPaletteChange(), yaze::editor::Tile16Editor::Redo(), yaze::editor::Tile16Editor::RefreshAllPalettes(), yaze::editor::OverworldEditor::RefreshChildMapOnDemand(), yaze::editor::OverworldEditor::RefreshMapPalette(), yaze::editor::OverworldEditor::RefreshMultiAreaMapsSafely(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM(), yaze::zelda3::TitleScreen::RenderBG1Layer(), yaze::zelda3::TitleScreen::RenderBG2Layer(), yaze::gui::CanvasContextMenu::RenderBitmapOperationsMenu(), yaze::zelda3::TitleScreen::RenderCompositeLayer(), yaze::editor::DungeonObjectInteraction::RenderGhostPreviewBitmap(), yaze::gui::RenderPreviewPanel(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::gfx::RenderTilesBatch(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::editor::OverworldEditor::SaveCurrentSelectionToScratch(), yaze::editor::Tile16Editor::SaveTile16ToScratchSpace(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::Undo(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges(), yaze::editor::Tile16Editor::UpdateLivePreview(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), yaze::editor::OverworldEditor::UpdateScratchBitmapTile(), yaze::gfx::Bitmap::UpdateTexture(), yaze::gfx::UpdateTile16(), yaze::editor::Tile16Editor::UpdateTile16Edit(), yaze::editor::Tile16Editor::UpdateTile8Palette(), and yaze::gfx::UpdateTilemap().

| void yaze::gfx::Arena::ProcessTextureQueue | ( | IRenderer * | renderer | ) |
Definition at line 110 of file arena.cc.
References CREATE, yaze::gfx::IRenderer::CreateTexture(), DESTROY, yaze::gfx::IRenderer::DestroyTexture(), yaze::zelda3::PaletteDebugger::Get(), yaze::platform::GetSurfacePalette(), LOG_DEBUG, LOG_ERROR, LOG_WARN, yaze::zelda3::PaletteDebugger::LogPaletteApplication(), yaze::zelda3::PaletteDebugger::LogSurfaceState(), yaze::zelda3::PaletteDebugger::LogTextureCreation(), renderer_, texture_command_queue_, UPDATE, and yaze::gfx::IRenderer::UpdateTexture().
Referenced by yaze::Controller::DoRender(), yaze::editor::DungeonRoomGraphicsPanel::Draw(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::editor::DungeonEditorV2::ProcessDeferredTextures(), yaze::editor::OverworldEditor::ProcessDeferredTextures(), yaze::editor::DungeonObjectInteraction::RenderGhostPreviewBitmap(), and Shutdown().
|
inline |
Check if there are pending textures to process.
Definition at line 68 of file arena.h.
References texture_command_queue_.
| bool yaze::gfx::Arena::ProcessSingleTexture | ( | IRenderer * | renderer | ) |
Process a single texture command for frame-budget-aware loading.
| renderer | The renderer to use for texture operations |
Definition at line 40 of file arena.cc.
References CREATE, yaze::gfx::IRenderer::CreateTexture(), DESTROY, yaze::gfx::IRenderer::DestroyTexture(), LOG_DEBUG, LOG_ERROR, renderer_, texture_command_queue_, UPDATE, and yaze::gfx::IRenderer::UpdateTexture().

| SDL_Surface * yaze::gfx::Arena::AllocateSurface | ( | int | width, |
| int | height, | ||
| int | depth, | ||
| int | format ) |
Definition at line 250 of file arena.cc.
References yaze::gfx::Arena::SurfacePool::available_surfaces_, yaze::platform::CreateSurface(), yaze::gfx::GetSnesPixelFormat(), yaze::gfx::Arena::SurfacePool::surface_info_, surface_pool_, and surfaces_.
Referenced by yaze::gfx::Bitmap::Bitmap(), yaze::gfx::Bitmap::Create(), yaze::gfx::Bitmap::operator=(), yaze::gfx::Bitmap::Reformat(), and yaze::gfx::Bitmap::Resize().

| void yaze::gfx::Arena::FreeSurface | ( | SDL_Surface * | surface | ) |
Definition at line 280 of file arena.cc.
References yaze::gfx::Arena::SurfacePool::available_surfaces_, yaze::gfx::Arena::SurfacePool::MAX_POOL_SIZE, yaze::gfx::Arena::SurfacePool::surface_info_, surface_pool_, and surfaces_.
Referenced by yaze::gfx::Bitmap::operator=(), and yaze::gfx::Bitmap::operator=().
| void yaze::gfx::Arena::Shutdown | ( | ) |
Definition at line 294 of file arena.cc.
References yaze::gfx::Arena::SurfacePool::available_surfaces_, yaze::gfx::Arena::TexturePool::available_textures_, ProcessTextureQueue(), renderer_, yaze::gfx::Arena::SurfacePool::surface_info_, surface_pool_, surfaces_, texture_command_queue_, texture_pool_, yaze::gfx::Arena::TexturePool::texture_sizes_, and textures_.
Referenced by yaze::platform::SDL2WindowBackend::Shutdown(), yaze::core::ShutdownWindow(), and ~Arena().

|
inline |
|
inline |
|
inline |
Definition at line 86 of file arena.h.
References yaze::gfx::Arena::TexturePool::available_textures_, and texture_pool_.
|
inline |
Definition at line 89 of file arena.h.
References yaze::gfx::Arena::SurfacePool::available_surfaces_, and surface_pool_.
|
inline |
Definition at line 92 of file arena.h.
References texture_command_queue_.
|
inline |
Get reference to all graphics sheets.
Definition at line 101 of file arena.h.
References gfx_sheets_.
Referenced by yaze::editor::PixelEditorPanel::ApplyEyedropper(), yaze::editor::DungeonRoomGraphicsPanel::Draw(), yaze::editor::DungeonObjectSelector::DrawRoomGraphics(), yaze::editor::SheetBrowserPanel::DrawSheetGrid(), yaze::editor::OverworldEditor::DrawTile8Selector(), yaze::editor::PixelEditorPanel::EndSelection(), yaze::cli::agent::tools::VisualAnalysisBase::ExtractTileAtPosition(), yaze::editor::GraphicsEditor::Load(), yaze::editor::SpriteEditor::LoadSpriteGraphicsBuffer(), yaze::editor::GraphicsEditor::Save(), and yaze::editor::PixelEditorPanel::SaveUndoState().
|
inline |
Get a specific graphics sheet by index.
| i | Sheet index (0-222) |
Definition at line 108 of file arena.h.
References gfx_sheets_.
|
inline |
Get mutable reference to a specific graphics sheet.
| i | Sheet index (0-222) |
Definition at line 118 of file arena.h.
References gfx_sheets_.
|
inline |
Get mutable reference to all graphics sheets.
Definition at line 127 of file arena.h.
References gfx_sheets_.
Referenced by yaze::editor::PixelEditorPanel::ApplyBrush(), yaze::editor::PixelEditorPanel::ApplyEraser(), yaze::editor::PixelEditorPanel::ApplyFill(), yaze::editor::PaletteControlsPanel::ApplyPaletteToAllSheets(), yaze::editor::PaletteControlsPanel::ApplyPaletteToSheet(), yaze::editor::PixelEditorPanel::ApplyPencil(), yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::PixelEditorPanel::DrawCanvas(), yaze::editor::PixelEditorPanel::DrawColorPicker(), yaze::editor::PixelEditorPanel::DrawLine(), yaze::editor::PixelEditorPanel::DrawMiniMap(), yaze::editor::PixelEditorPanel::DrawRectangle(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::editor::PixelEditorPanel::DrawToolbar(), yaze::editor::PixelEditorPanel::HandleCanvasInput(), yaze::editor::EditorManager::LoadAssets(), and yaze::editor::PixelEditorPanel::PasteSelection().
| void yaze::gfx::Arena::NotifySheetModified | ( | int | sheet_index | ) |
Notify Arena that a graphics sheet has been modified.
| sheet_index | Index of the modified sheet (0-222) |
This ensures textures are updated across all editors
Definition at line 313 of file arena.cc.
References CREATE, gfx_sheets_, LOG_DEBUG, LOG_WARN, QueueTextureCommand(), and UPDATE.
Referenced by yaze::editor::PixelEditorPanel::ApplyBrush(), yaze::editor::PixelEditorPanel::ApplyEraser(), yaze::editor::PixelEditorPanel::ApplyFill(), yaze::editor::PaletteControlsPanel::ApplyPaletteToAllSheets(), yaze::editor::PaletteControlsPanel::ApplyPaletteToSheet(), yaze::editor::PixelEditorPanel::ApplyPencil(), yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::PixelEditorPanel::DrawLine(), yaze::editor::PixelEditorPanel::DrawRectangle(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::editor::PixelEditorPanel::DrawToolbar(), and yaze::editor::PixelEditorPanel::PasteSelection().

| void yaze::gfx::Arena::NotifyPaletteModified | ( | const std::string & | group_name, |
| int | palette_index = -1 ) |
Notify all listeners that a palette has been modified.
| group_name | The palette group name (e.g., "ow_main", "dungeon_main") |
| palette_index | Specific palette index, or -1 for entire group |
This triggers bitmap refresh in editors using these palettes
Definition at line 343 of file arena.cc.
References LOG_DEBUG, LOG_ERROR, and palette_listeners_.
Referenced by yaze::gfx::PaletteManager::ApplyPreviewChanges(), and yaze::gfx::PaletteManager::SaveGroup().
| int yaze::gfx::Arena::RegisterPaletteListener | ( | PaletteChangeCallback | callback | ) |
Register a callback for palette change notifications.
| callback | Function to call when palettes change |
Definition at line 360 of file arena.cc.
References LOG_DEBUG, next_palette_listener_id_, and palette_listeners_.
Referenced by yaze::editor::OverworldEditor::Load().
| void yaze::gfx::Arena::UnregisterPaletteListener | ( | int | listener_id | ) |
Unregister a palette change listener.
| listener_id | The ID returned from RegisterPaletteListener |
Definition at line 367 of file arena.cc.
References LOG_DEBUG, and palette_listeners_.
Referenced by yaze::editor::OverworldEditor::Clear().
|
inline |
Get reference to background layer 1 buffer.
Definition at line 171 of file arena.h.
References bg1_.
|
inline |
Get reference to background layer 2 buffer.
Definition at line 177 of file arena.h.
References bg2_.
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
Definition at line 192 of file arena.h.
Referenced by gfx_sheet(), gfx_sheets(), mutable_gfx_sheet(), mutable_gfx_sheets(), and NotifySheetModified().
|
private |
Definition at line 196 of file arena.h.
Referenced by GetTextureCount(), and Shutdown().
|
private |
Definition at line 200 of file arena.h.
Referenced by AllocateSurface(), FreeSurface(), GetSurfaceCount(), and Shutdown().
|
private |
Referenced by GetPooledTextureCount(), and Shutdown().
|
private |
Referenced by AllocateSurface(), FreeSurface(), GetPooledSurfaceCount(), and Shutdown().
|
private |
Definition at line 216 of file arena.h.
Referenced by HasPendingTextures(), ProcessSingleTexture(), ProcessTextureQueue(), QueueTextureCommand(), Shutdown(), and texture_command_queue_size().
|
private |
Definition at line 217 of file arena.h.
Referenced by Initialize(), ProcessSingleTexture(), ProcessTextureQueue(), and Shutdown().
|
private |
Definition at line 220 of file arena.h.
Referenced by NotifyPaletteModified(), RegisterPaletteListener(), and UnregisterPaletteListener().
|
private |
Definition at line 221 of file arena.h.
Referenced by RegisterPaletteListener().