diff --git a/engine/Engine.cpp b/engine/Engine.cpp index 93e9de8..87e332b 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -160,8 +160,8 @@ void Engine::printDebugInfo() const { Vec2D{xPos + width, yPos + height * i}, Vec2D{xPos + width, yPos + height + height * i}, Vec2D{xPos, yPos + height + height * i}, - {static_cast(255 * width / timerWidth), - static_cast(255 * (1 - width / timerWidth)), + {static_cast(255.0 * static_cast(width) / timerWidth), + static_cast(255.0 * (1.0 - static_cast(width) / timerWidth)), 0, 150}); @@ -181,8 +181,8 @@ void Engine::printDebugInfo() const { Vec2D{xPos + width, yPos + height * i}, Vec2D{xPos + width, yPos + height + height * i}, Vec2D{xPos, yPos + height + height * i}, - {static_cast(255 * width / timerWidth), - static_cast(255 * (1 - width / timerWidth)), + {static_cast(255.0 * static_cast(width) / timerWidth), + static_cast(255.0 * (1.0 - static_cast(width) / timerWidth)), 0, 150});