#include <TileMap.hpp>
|
| | TileMapComponent (std::string tileSheetFileName, int rows, int cols, int _TileWidth, int _TileHeight, int _mapX, int _mapY, SDL_Renderer *ren) |
| |
| | ~TileMapComponent () |
| |
| void | GenerateSimpleMap () |
| |
| void | PrintMap () |
| |
| void | SetTile (int x, int y, int type) |
| |
| int | GetTileType (int x, int y) |
| |
| void | Update (SDL_Event e, int frame, std::vector< std::string > broadcastList) override |
| |
| void | Render (SDL_Renderer *ren) override |
| |
| void | ShowComponentEditor (bool *showEditor) override |
| |
| const char * | ComponentTypeName () override |
| |
| | Component () |
| |
| | ~Component () |
| |
| virtual void | Update (SDL_Event e, int frame, std::vector< std::string > broadcastList) |
| |
| virtual void | Render (SDL_Renderer *ren) |
| |
| virtual void | ShowComponentEditor (bool *showEditor) |
| |
| virtual bool | HasTag (ComponentTag t) |
| |
| virtual const char * | ComponentTypeName () |
| |
| void | ParseAndUpdateBroadcast (std::vector< std::string > broadcastList) |
| |
|
|
int | m_Rows |
| |
|
int | m_Cols |
| |
|
int | m_TileWidth |
| |
|
int | m_TileHeight |
| |
|
int | m_MapX |
| |
|
int | m_MapY |
| |
|
SDL_Surface * | m_TileSpriteSheet |
| |
|
SDL_Texture * | m_Texture |
| |
|
int * | m_Tiles |
| |
|
|
std::vector< ComponentTag > | tags |
| |
|
std::vector< std::string > | previousBroadcasts |
| |
|
std::vector< std::string > | pendingBroadcasts |
| |
This is a minimal implementation of a TileMapComponent
◆ TileMapComponent()
| TileMapComponent::TileMapComponent |
( |
std::string |
tileSheetFileName, |
|
|
int |
rows, |
|
|
int |
cols, |
|
|
int |
_TileWidth, |
|
|
int |
_TileHeight, |
|
|
int |
_mapX, |
|
|
int |
_mapY, |
|
|
SDL_Renderer * |
ren |
|
) |
| |
Constructor for a tilemap
◆ ~TileMapComponent()
| TileMapComponent::~TileMapComponent |
( |
| ) |
|
◆ ComponentTypeName()
| const char * TileMapComponent::ComponentTypeName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GenerateSimpleMap()
| void TileMapComponent::GenerateSimpleMap |
( |
| ) |
|
Temporary function for generating a simple map to display some tiles
◆ GetTileType()
| int TileMapComponent::GetTileType |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Return the tile type at an x and y position
◆ PrintMap()
| void TileMapComponent::PrintMap |
( |
| ) |
|
Function for printing text to console
◆ Render()
| void TileMapComponent::Render |
( |
SDL_Renderer * |
ren | ) |
|
|
overridevirtual |
Renders the component (if it has anything to render)
- Parameters
-
| ren | the SDL renderer to be displayed upon |
- See also
- IGraphicsEngineRenderer
Reimplemented from Component.
◆ SetTile()
| void TileMapComponent::SetTile |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
type |
|
) |
| |
Set the 'type' of tile at an x and y position
◆ ShowComponentEditor()
| void TileMapComponent::ShowComponentEditor |
( |
bool * |
showEditor | ) |
|
|
overridevirtual |
◆ Update()
| void TileMapComponent::Update |
( |
SDL_Event |
e, |
|
|
int |
frame, |
|
|
std::vector< std::string > |
broadcastList |
|
) |
| |
|
overridevirtual |
Draw all of the tiles in the tilemap
Reimplemented from Component.
The documentation for this class was generated from the following files: