Kumo
A hand-rolled game engine.
git clone https://git.sentomk.me/Kumo.git
commit 1d2203c5265791b8ab78fcf252d2e0487ff81e0f parent 9cf998cea8f92693252af9e6a28a6b770bab6ac0 Author: sentomk <sentomk@proton.me> Date: Sat, 14 Nov 2026 16:19:43 +0800 docs: bring comments up to date with the Windows backend window.h and kumo.toml still described macOS as the only window backend, and a comment in fixed_test.cpp named numbers the test does not use. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Diffstat:
| M | kumo.toml | | | 4 | ++-- |
| M | src/platform/window.h | | | 8 | ++++---- |
| M | src/platform/window_win.cpp | | | 2 | +- |
| M | tests/unit/fixed_test.cpp | | | 4 | ++-- |
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/kumo.toml b/kumo.toml @@ -25,8 +25,8 @@ objcxx_flags = ["-fobjc-arc"] link = [] # Per-platform additions: `flags` and `link` here are appended to the lists -# above, on that platform only. Linux will need "-lX11" and Windows -# "-luser32", "-lgdi32" once the window code for those platforms exists. +# above, on that platform only. Linux will need "-lX11" once the window code +# for it exists, and Windows "-lgdi32" once its window presents a frame. [mac] link = ["-framework", "Cocoa", "-framework", "Metal", "-framework", "QuartzCore"] diff --git a/src/platform/window.h b/src/platform/window.h @@ -2,8 +2,8 @@ /// @brief Platform-independent window interface. /// /// The implementation is chosen at build time by the name of the file: -/// `window_mac.mm` for macOS. A window is created and driven from the main -/// thread only. +/// `window_mac.mm` for macOS, `window_win.cpp` for Windows. A window is created +/// and driven from the main thread only. #pragma once #include "core/types.h" @@ -24,8 +24,8 @@ struct WindowDesc { /// @brief Creates a window, shows it and brings it to the front. /// -/// The first call also sets up the application: its menu (with Cmd+Q) and the -/// rest of what a program needs to be a normal windowed application. +/// The first call also sets up the application: on macOS its menu (with Cmd+Q) +/// and the rest of what a program needs to be a normal windowed application. /// /// @param desc Window parameters. /// @return The new window, or `nullptr` on failure. diff --git a/src/platform/window_win.cpp b/src/platform/window_win.cpp @@ -1,5 +1,5 @@ /// @file platform/window_win.cpp -/// @brief Windows implementation of platform/window.h +/// @brief Windows (Win32) implementation of platform/window.h. #define WIN32_LEAN_AND_MEAN #define NOMINMAX diff --git a/tests/unit/fixed_test.cpp b/tests/unit/fixed_test.cpp @@ -75,8 +75,8 @@ TEST(fixed_multiplication_rounds_toward_minus_infinity) { } TEST(fixed_multiplication_does_not_lose_bits_to_the_intermediate) { - // 30000 * 30000 does not fit in 32 bits before the shift: the product is - // taken in 64 bits. + // The raw values of 180 and 180 multiply to about 1.4e14, which does not fit + // in 32 bits before the shift: the product is taken in 64 bits. CHECK_EQ(Fixed::from_int(180) * Fixed::from_int(180), Fixed::from_int(32400)); CHECK_EQ(Fixed::from_int(-180) * Fixed::from_int(180), Fixed::from_int(-32400));
