summaryrefslogtreecommitdiff
path: root/lib/nes/common/rgb.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-02-01 01:14:03 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-02-01 01:14:03 +0100
commit9ca793417149cbaa7b5f4b7797bc929e6e191f28 (patch)
tree3f067cad3fe7e606e5e9ea1dd8079874de3f048c /lib/nes/common/rgb.hh
parent1d5f5482f91391a6dfee9ec0e7cb0a22ee5f0464 (diff)
use custom integer types
Diffstat (limited to 'lib/nes/common/rgb.hh')
-rw-r--r--lib/nes/common/rgb.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/nes/common/rgb.hh b/lib/nes/common/rgb.hh
index d62c70c..0b8ec1c 100644
--- a/lib/nes/common/rgb.hh
+++ b/lib/nes/common/rgb.hh
@@ -1,6 +1,6 @@
#pragma once
-#include <cstdint>
+#include "nes/common/types.hh"
namespace nes
{
@@ -10,14 +10,14 @@ namespace nes
public:
explicit rgb() = default;
- explicit rgb(std::uint8_t const r, std::uint8_t const g, std::uint8_t const b)
+ explicit rgb(u8 const r, u8 const g, u8 const b)
: r{ r }
, g{ g }
, b{ b }
{
}
- static auto from_hex(std::uint32_t const hex) -> rgb
+ static auto from_hex(u32 const hex) -> rgb
{
auto res = rgb{};
res.r = (hex & 0x00FF0000) >> 16;
@@ -26,8 +26,8 @@ namespace nes
return res;
}
- std::uint8_t r{ 0 };
- std::uint8_t g{ 0 };
- std::uint8_t b{ 0 };
+ u8 r{ 0 };
+ u8 g{ 0 };
+ u8 b{ 0 };
};
} // namespace nes \ No newline at end of file