From 2bdc393e9a3987f5e35a967933cde0c4bf3ceeca Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 14 Feb 2026 19:07:14 -0800 Subject: Use float colour --- CMakeLists.txt | 2 +- src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bf9869..ca5a231 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ target_link_libraries(game stb swgfx) -target_compile_options(game PRIVATE -Wall -Wextra) +target_compile_options(game PRIVATE -Wall -Wextra -Wno-missing-braces) # Tools. diff --git a/src/main.c b/src/main.c index e38eeaa..17995bc 100644 --- a/src/main.c +++ b/src/main.c @@ -274,7 +274,7 @@ static void RenderTriangle2d(swgfx* gfx) { static void Checkerboard(swgfx* gfx, int width, int height) { assert(gfx); - const sgPixel colour = (sgPixel){255, 0, 255, 255}; + const sgColour4 colour = (sgColour4){1, 0, 1, 1}; for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { if (((x ^ y) & 1) == 1) { -- cgit v1.2.3