mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 20:41:47 +01:00
Add alot of memory leak fixes
This commit is contained in:
@@ -33,6 +33,10 @@ GroundTileType* getRandomGroundTile() {
|
||||
// This should never be reached if weights sum to 1.0
|
||||
return Tiles::AIR; // Default value
|
||||
}
|
||||
// void InitializeGroundTiles() {
|
||||
//
|
||||
// Tiles::AIR = new GroundTileType("", GroundTileTypes::Air);
|
||||
// }
|
||||
WorldTile::WorldTile(const Vector2f& position, GroundTileType* groundTileType, TextureManager* pTextureManager, WorldGridManager* pGridManager) : m_Position { position }, m_GroundTileType { groundTileType }, m_pGridManager { pGridManager } {
|
||||
// const std::string dirtPath = + "tiles/dirt/dirt" + std::to_string(utils::randRange(1, 5)) + ".png";
|
||||
// m_pTexture = new Texture(dirtPath);
|
||||
@@ -52,7 +56,6 @@ WorldTile::WorldTile(const Vector2f& position, GroundTileType* groundTileType, T
|
||||
m_pAllTexture = pTextureManager->GetTexture("tiles/dirt/sidepieces/all.png");
|
||||
}
|
||||
WorldTile::~WorldTile() {
|
||||
delete m_pTexture;
|
||||
}
|
||||
void WorldTile::Draw() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user