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

◆ 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

Pair yaze::gfx::Tilemap::map_size

Size of tilemap in tiles.

Definition at line 114 of file tilemap.h.

Referenced by yaze::gfx::CreateTilemap(), yaze::gui::Canvas::DrawBitmapGroup(), and yaze::zelda3::LoadDungeonMapTile16().


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