yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::Tilemap Struct Reference

Tilemap structure for SNES tile-based graphics management. More...

#include <tilemap.h>

Collaboration diagram for yaze::gfx::Tilemap:

Public Attributes

Bitmap atlas
 Master bitmap containing all tiles.
 
TileCache tile_cache
 Smart tile cache with LRU eviction.
 
std::vector< std::array< gfx::TileInfo, 4 > > tile_info
 Tile metadata (4 tiles per 16x16)
 
Pair tile_size
 Size of individual tiles (8x8 or 16x16)
 
Pair map_size
 Size of tilemap in tiles.
 

Detailed Description

Tilemap structure for SNES tile-based graphics management.

The Tilemap class provides comprehensive tile management for ROM hacking:

Key Features:

  • Atlas bitmap containing all tiles in a single texture
  • Smart tile cache with LRU eviction for optimal memory usage
  • Tile metadata storage (mirroring, palette, etc.)
  • Support for both 8x8 and 16x16 tile sizes
  • Efficient tile lookup and rendering

Performance Optimizations:

  • Hash map storage for O(1) tile access
  • LRU tile caching to minimize memory usage
  • Atlas-based rendering to minimize draw calls
  • Tile metadata caching for fast property access

ROM Hacking Specific:

  • SNES tile format support (4BPP, 8BPP)
  • Tile mirroring and flipping support
  • Palette index management per tile
  • Integration with SNES graphics buffer format

Definition at line 109 of file tilemap.h.

Member Data Documentation

◆ atlas

Bitmap yaze::gfx::Tilemap::atlas

Master bitmap containing all tiles.

Definition at line 110 of file tilemap.h.

Referenced by yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::editor::Tile16Editor::CommitChangesToBlockset(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::gfx::anonymous_namespace{tilemap.cc}::ComposeAndPlaceTilePart(), yaze::gfx::ComposeTile16(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::gfx::CreateTilemap(), yaze::gui::Canvas::DrawBitmapGroup(), yaze::editor::ScreenEditor::DrawDungeonMapScreen(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::OverworldEditor::DrawOverworldEdits(), yaze::editor::OverworldEditor::DrawTile16Selector(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::gui::CanvasInteractionHandler::DrawTilemapPainter(), yaze::gfx::GetTilemapData(), yaze::gui::HandleTilemapPaint(), yaze::editor::Tile16Editor::IsTile16Valid(), yaze::editor::ScreenEditor::Load(), yaze::zelda3::LoadDungeonMapTile16(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::gfx::ModifyTile16(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RefreshTile16Blockset(), yaze::gui::RenderBitmapGroup(), yaze::gfx::RenderTile(), yaze::gfx::RenderTile16(), yaze::gfx::RenderTilesBatch(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), yaze::gfx::UpdateTile16(), yaze::gfx::UpdateTilemap(), and yaze::editor::Tile16Editor::ValidateTile16Data().

◆ tile_cache

TileCache yaze::gfx::Tilemap::tile_cache

◆ tile_info

std::vector<std::array<gfx::TileInfo, 4> > yaze::gfx::Tilemap::tile_info

◆ tile_size

◆ map_size


The documentation for this struct was generated from the following file: