feat: add map background color

This commit is contained in:
2021-12-12 16:13:05 +01:00
parent 43f21ffd44
commit 1a091baeaf
10 changed files with 32 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
namespace td {
namespace render {
Renderer::Renderer() {
Renderer::Renderer() : m_BackgroundColor(0, 0, 0) {
}
@@ -86,7 +86,7 @@ void Renderer::updateIsometricFade() {
void Renderer::prepare() {
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0, 0, 0, 0);
glClearColor(m_BackgroundColor.r, m_BackgroundColor.g, m_BackgroundColor.b, 0);
updateIsometricFade();
}

View File

@@ -38,7 +38,7 @@ WorldRenderer::WorldRenderer(game::World* world, client::ClientGame* client) : m
m_TowerPlacePopup = std::make_unique<gui::TowerPlacePopup>(m_Client->getClient());
m_MobTooltip = std::make_unique<gui::MobTooltip>(m_Client->getClient());
m_CastleTooltip = std::make_unique<gui::CastleTooltip>(m_Client->getClient());
m_Client->getWorld().getWorldNotifier().bindListener(this);
m_Client->getWorldClient().getWorldNotifier().bindListener(this);
}
void WorldRenderer::updateCursorPos() {