summaryrefslogtreecommitdiff
path: root/lib/nes/util/rgb.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-01-29 14:49:20 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-01-29 14:49:20 +0100
commit5959349f341a2380c0c3f41ec40a1e8e0d969d00 (patch)
tree8b36ba3f8cade68562af1dfdcea8b42160619975 /lib/nes/util/rgb.hh
parent1d32f7561305d6c86b1c80858bc73d55b1c6c402 (diff)
refactor: move emulation logic into sys
Diffstat (limited to 'lib/nes/util/rgb.hh')
-rw-r--r--lib/nes/util/rgb.hh33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/nes/util/rgb.hh b/lib/nes/util/rgb.hh
deleted file mode 100644
index d62c70c..0000000
--- a/lib/nes/util/rgb.hh
+++ /dev/null
@@ -1,33 +0,0 @@
-#pragma once
-
-#include <cstdint>
-
-namespace nes
-{
- /// An RGB value.
- class rgb
- {
- public:
- explicit rgb() = default;
-
- explicit rgb(std::uint8_t const r, std::uint8_t const g, std::uint8_t const b)
- : r{ r }
- , g{ g }
- , b{ b }
- {
- }
-
- static auto from_hex(std::uint32_t const hex) -> rgb
- {
- auto res = rgb{};
- res.r = (hex & 0x00FF0000) >> 16;
- res.g = (hex & 0x0000FF00) >> 8;
- res.b = (hex & 0x000000FF) >> 0;
- return res;
- }
-
- std::uint8_t r{ 0 };
- std::uint8_t g{ 0 };
- std::uint8_t b{ 0 };
- };
-} // namespace nes \ No newline at end of file