mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 20:41:47 +01:00
Lmao, git removed some things :>(
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user