Add Imgui, Add TextureManager

From 1.1k texture loads to 5
This commit is contained in:
Bram Verhulst
2024-03-18 12:22:56 +01:00
parent 05f46b7eba
commit 39c744ba79
33 changed files with 59230 additions and 378 deletions

View File

@@ -15,7 +15,7 @@ WorldLevel::WorldLevel(Camera* camera) : Level(camera), m_mousePos{ 0, 0 }, m_pl
for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
int actualX = x - WORLD_WIDTH / 2;
m_worldTiles[x][y] = new WorldTile{ Point2f{ float(actualX * TILE_WIDTH), -float(y * TILE_HEIGHT) - TILE_HEIGHT}, GroundTileTypes::Dirt};
m_worldTiles[x][y] = new WorldTile{ Point2f{ float(actualX * TILE_WIDTH), -float(y * TILE_HEIGHT) - TILE_HEIGHT}, GroundTileTypes::Dirt, TextureManager::GetInstance()};
}
}
m_Rects.push_back(Collision::CollisionRect{ Point2f{0.0f, 10.0f}, Point2f{40.0f, 40.0f} });