diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-01 01:14:03 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-01 01:14:03 +0100 |
| commit | 9ca793417149cbaa7b5f4b7797bc929e6e191f28 (patch) | |
| tree | 3f067cad3fe7e606e5e9ea1dd8079874de3f048c /lib/nes/common/display.hh | |
| parent | 1d5f5482f91391a6dfee9ec0e7cb0a22ee5f0464 (diff) | |
use custom integer types
Diffstat (limited to 'lib/nes/common/display.hh')
| -rw-r--r-- | lib/nes/common/display.hh | 9 |
1 files changed, 5 insertions, 4 deletions
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; |
