SaturnRingLibrary 0.6
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::Tilemap::TilemapInfo Struct Reference

Detailed Description

All the info necessary to properly configure VDP2 tilemap data in VRAM.

#include <srl_tilemap.hpp>

Public Member Functions

 TilemapInfo ()=default
 Initializes an empty tilemap info.
 
 TilemapInfo (SRL::CRAM::TextureColorMode color, uint16_t map, uint16_t charSz, uint16_t plane, uint16_t height, uint16_t width, int size)
 Initialize by manually entering all parameters.
 
uint16_t SGLColorMode ()
 Gets the SGL macro corresponding to ColorMode.
 

Public Attributes

int32_t CellByteSize = 0
 Number of bytes of image data comprising the Tile set.
 
uint16_t CharSize = 0
 Size of the tiles that comprise the tilemap (charater pattern data)
 
SRL::CRAM::TextureColorMode ColorMode = SRL::CRAM::TextureColorMode::RGB555
 Color Mode of the Tilemap (Paletted16, Paletted256, or RGB555)
 
int32_t MapByteSize = 0
 Number of bytes of map data comprising the Tile map.
 
uint16_t MapHeight = 0
 Height of the Tilemap (in tile units)
 
uint16_t MapMode = 0
 Size and bit configuration of the map data (pattern name data)
 
uint16_t MapWidth = 0
 Width of the tilemap (in tile Units)
 
uint16_t PlaneSize = 0
 Size of the Planes that comprise a Scroll Screen.
 

Constructor & Destructor Documentation

◆ TilemapInfo()

SRL::Tilemap::TilemapInfo::TilemapInfo ( SRL::CRAM::TextureColorMode color,
uint16_t map,
uint16_t charSz,
uint16_t plane,
uint16_t height,
uint16_t width,
int size )
inline

Initialize by manually entering all parameters.

Parameters
colorColor Mode of the Tilemap (Paletted16, Paletted256, or RGB555).
mapSize and bit configuration of the map data (pattern name data).
charSzSize of the tiles that comprise the tilemap (charater pattern data).
planeSize of the Planes that comprise a Scroll Screen.
heightHeight of tilemap (in tile units).
widthWidth of the tilemap (in tile Units).
sizeNumber of bytes of image data comprising the Tile set.

Member Function Documentation

◆ SGLColorMode()

uint16_t SRL::Tilemap::TilemapInfo::SGLColorMode ( )
inline

Gets the SGL macro corresponding to ColorMode.

Returns
SGL VDP2 color macro for the tile map

Member Data Documentation

◆ ColorMode

SRL::CRAM::TextureColorMode SRL::Tilemap::TilemapInfo::ColorMode = SRL::CRAM::TextureColorMode::RGB555

Color Mode of the Tilemap (Paletted16, Paletted256, or RGB555)

Note
Paletted64 and Paletted128 color types will be converted to Paletted256 internally