From 9ca793417149cbaa7b5f4b7797bc929e6e191f28 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Sat, 1 Feb 2025 01:14:03 +0100 Subject: use custom integer types --- lib/nes/common/display.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/nes/common/display.hh') diff --git a/lib/nes/common/display.hh b/lib/nes/common/display.hh index 85af915..eb35366 100644 --- a/lib/nes/common/display.hh +++ b/lib/nes/common/display.hh @@ -1,6 +1,7 @@ #pragma once #include "nes/common/rgb.hh" +#include "nes/common/types.hh" namespace nes { @@ -10,8 +11,8 @@ namespace nes class display { public: - static constexpr auto width = unsigned{ 256 }; - static constexpr auto height = unsigned{ 240 }; + static constexpr auto width = u32{ 256 }; + static constexpr auto height = u32{ 240 }; virtual ~display() = default; @@ -23,9 +24,9 @@ namespace nes /// Switch between front and back buffers. virtual auto switch_buffers() -> void = 0; /// Update the pixel at the given position in the back buffer. - virtual auto set(unsigned x, unsigned y, rgb value) -> void = 0; + virtual auto set(u32 x, u32 y, rgb value) -> void = 0; /// Load the pixel value at the given position in the back buffer. - virtual auto get(unsigned x, unsigned y) const -> rgb = 0; + virtual auto get(u32 x, u32 y) const -> rgb = 0; protected: explicit display() = default; -- cgit v1.3.1