Replace union with std::variant

This commit is contained in:
Jan Mrna
2025-11-04 19:35:07 +01:00
parent e588364b08
commit a029c416d5
3 changed files with 18 additions and 26 deletions

View File

@@ -62,7 +62,6 @@ std::expected<void, std::string> Window::Init() {
// Set renderer to the Sprite class
Sprite::SetRenderer(m_Renderer);
// TODO this needs to be tied to map size
SDL_SetRenderScale(m_Renderer.get(), 1.0f, 1.0f);
return {};
@@ -105,7 +104,6 @@ void Window::ClearWindow() {
void Window::Flush() { SDL_RenderPresent(m_Renderer.get()); }
// TODO use some struct for color
void Window::DrawCircle(const WindowPos &position, float radius, uint8_t R,
uint8_t G, uint8_t B) {
int cx = static_cast<int>(position.x());