30 TileMap(std::string tileSheetFileName, std::string _TileMapPath,
int levelWidth,
int levelHeight,
int _TileSize, SDL_Renderer *ren);
47 void SetTile(
int x,
int y,
int type);
55 void Render(SDL_Renderer *ren,
int x, std::vector<std::shared_ptr<GameEntity>> &obstacles, std::shared_ptr<GameEntity>
mainCharacter);
76 SDL_Surface *m_TileSpriteSheet;
77 SDL_Texture *m_Texture;
85 std::map<int, std::vector<int>> tMap;
86 std::string tileMapPath;
87 std::vector<int> enemyCoordinates;
88 SDL_Texture* mCoinTexture;
89 SDL_Texture* mWinTexture;
std::shared_ptr< GameEntity > mainCharacter
Definition: Engine.cpp:51
The resource manager is responsible for handling and managing resources regarding the game.
Definition: ResourceManager.hpp:23
static ResourceManager & getInstance()
Method used to get instance of ResourceManager class.
Definition: ResourceManager.cpp:8
TileMap class is used to create and generate a map.
Definition: TileMap.hpp:20
void GenerateSimpleMap(std::vector< int > &collectablesAvailable)
Temporary function for generating a simple map to display some tiles.
Definition: TileMap.cpp:94
std::vector< int > getEnemyData()
Definition: TileMap.cpp:166
void PrintMap()
Function for printing text to console.
Definition: TileMap.cpp:135
void setTileSheetMap(int width, int height)
Helper function to set the tMap i.e.
Definition: TileMap.cpp:59
~TileMap()
Destructor for a tilemap.
Definition: TileMap.cpp:84
void Render(SDL_Renderer *ren, int x, std::vector< std::shared_ptr< GameEntity >> &obstacles, std::shared_ptr< GameEntity > mainCharacter)
Draw all of the tiles in the tilemap.
Definition: TileMap.cpp:177
TileMap(std::string tileSheetFileName, std::string _TileMapPath, int levelWidth, int levelHeight, int _TileSize, SDL_Renderer *ren)
Constuctor for a TileMap. Takes in a file path for a tile sheet, file for tile map path,...
Definition: TileMap.cpp:14
void SetTile(int x, int y, int type)
Set the 'type' of tile at an x and y position.
Definition: TileMap.cpp:152
int GetTileType(int x, int y)
Return the tile type at an x and y position.
Definition: TileMap.cpp:161