WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Public Member Functions | Public Attributes | List of all members
TileViewer Class Reference

#include <TileViewer.hpp>

Public Member Functions

 TileViewer ()
 
void init (const int _worldSizeXY, const int _nAtlas, const int _tileSizePixels, const int _atlasSizePixels)
 
int & operator() (const unsigned int x, const unsigned int y, const unsigned int z)
 
void render (const int _screenX1, const int _screenY1, const int _screenX2, const int _screenY2, const double _centerTileX, const double _centerTileY)
 
short int pushTexture (Texture *t, short int layer)
 
void loadAtlas (Texture *t, short int layer)
 
void putTile (const int _x, const int _y, const int _z, const int _tileID)
 

Public Attributes

ArrayS3< int > aBoard
 
int tileSizePixels
 
int atlasSizePixels
 

Constructor & Destructor Documentation

◆ TileViewer()

TileViewer::TileViewer ( )
inline

Member Function Documentation

◆ init()

void TileViewer::init ( const int  _worldSizeXY,
const int  _nAtlas,
const int  _tileSizePixels,
const int  _atlasSizePixels 
)
inline

◆ loadAtlas()

void TileViewer::loadAtlas ( Texture *  t,
short int  layer 
)
inline

◆ operator()()

int& TileViewer::operator() ( const unsigned int  x,
const unsigned int  y,
const unsigned int  z 
)
inline

◆ pushTexture()

short int TileViewer::pushTexture ( Texture *  t,
short int  layer 
)
inline

◆ putTile()

void TileViewer::putTile ( const int  _x,
const int  _y,
const int  _z,
const int  _tileID 
)
inline

◆ render()

void TileViewer::render ( const int  _screenX1,
const int  _screenY1,
const int  _screenX2,
const int  _screenY2,
const double  _centerTileX,
const double  _centerTileY 
)
inline

Member Data Documentation

◆ aBoard

ArrayS3<int> TileViewer::aBoard

◆ atlasSizePixels

int TileViewer::atlasSizePixels

◆ tileSizePixels

int TileViewer::tileSizePixels

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