From b1d1573702f21e3104606d6ade5f5d39ec86a33a Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 23 Jan 2025 22:02:11 +0100 Subject: restructure project --- src/nes/util/rgb.hh | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/nes/util/rgb.hh (limited to 'src/nes/util/rgb.hh') diff --git a/src/nes/util/rgb.hh b/src/nes/util/rgb.hh deleted file mode 100644 index d62c70c..0000000 --- a/src/nes/util/rgb.hh +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include - -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 -- cgit v1.3.1