SaturnRingLibrary 0.7
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::Tilemap::Coord Struct Reference

Detailed Description

Unsigned 8 bit coordinates for tiles withing a page of a tilemap.

Note
Coordinates [0,0] represent top left corner of a page (same as Print coordinates)
Coordinates are in tile units, which can be either 8x8 or 16x16 pixels. Max allowed coordinates in a page vary by Tile Size (64 for 8x8 tiles, 32 for 16x16)

#include <srl_tilemap.hpp>

Public Member Functions

 Coord ()
 Initializes a new tile coordinate.
 
 Coord (uint16_t x, uint16_t y)
 Initialize with desired X and Y coordinates.
 

Public Attributes

uint16_t X
 The tiles X coordinate in its page.
 
uint16_t Y
 The tiles Y coordinate in its page.
 

Constructor & Destructor Documentation

◆ Coord()

SRL::Tilemap::Coord::Coord ( uint16_t x,
uint16_t y )
inline

Initialize with desired X and Y coordinates.

Parameters
xX coordinate of tile in page
yY coordinate of tile in page