Add alot of memory leak fixes

This commit is contained in:
Bram Verhulst
2024-04-23 11:17:17 +02:00
parent e75b80eea8
commit 1b90f222a4
27 changed files with 234 additions and 48 deletions

View File

@@ -0,0 +1,38 @@
#pragma once
#include <map>
class GroundTileType;
class GroundTileTypeManager
{
public:
static GroundTileTypeManager* GetInstance();
static void DestroyInstance();
//
// static GroundTileType* AIR{ nullptr };
//
//
// static std::map<GroundTileType *, float> GroundTileWeights {
// { Tiles::AIR, 0.2f },
// { Tiles::DIRT, 0.5f },
// { Tiles::Special::GRASS, 0.0f },
// { Tiles::Hazards::STONE, 0.025f },
// { Tiles::Hazards::LAVA, 0.01f },
// { Tiles::Special::HARD_LEFT, 0.0f },
// { Tiles::Special::HARD_MIDDLE, 0.0f },
// { Tiles::Special::HARD_RIGHT, 0.0f },
// { Tiles::Ores::BRONZE, 0.05f },
// { Tiles::Ores::GOLD, 0.02f },
// { Tiles::Ores::IRON, 0.1f },
// };
private:
GroundTileTypeManager();
~GroundTileTypeManager();
static GroundTileTypeManager* m_pInstance;
};