Lmao, git removed some things :>(

This commit is contained in:
Bram Verhulst
2024-03-25 09:30:59 +01:00
parent ad847355b5
commit 61d1d17795
8 changed files with 116 additions and 15 deletions

View File

@@ -23,9 +23,14 @@ WorldLevel::WorldLevel(Camera* camera, Rectf viewport):
for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
int actualX = x - WORLD_WIDTH / 2;
Point2f pos = Point2f{ float(actualX * TILE_WIDTH), -float(y * TILE_HEIGHT) - TILE_HEIGHT};
m_gridManager.SetTileAtIndex(x,y, new WorldTile{ pos, GroundTileTypes::Dirt, TextureManager::GetInstance() });
GroundTileTypes type = rand() % 2 == 0 ? GroundTileTypes::Dirt : GroundTileTypes::Dirt;
m_gridManager.SetTileAtIndex(x,y, new WorldTile{ pos, type, TextureManager::GetInstance() });
}
}
//
// for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
// m_gridManager.GetTileAtIndex(x, 0)->SetTileType(GroundTileTypes::Dirt);
// }
}
WorldLevel::~WorldLevel() {
@@ -126,6 +131,7 @@ void WorldLevel::ProcessImGui() {
}
ImGui::EndMenu();
}
if(ImGui::BeginMenu(std::to_string(utils::isKeyPressed(SDL_SCANCODE_S)).c_str())){}
ImGui::EndMainMenuBar();
}
@@ -160,6 +166,6 @@ void WorldLevel::ProcessImGui() {
// }
ImGui::End();
m_player.ProcessImGui();
}
}