From cd8ae0e4f628bd491fcaf1dd4778bc283d619065 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Fri, 31 Jan 2025 23:24:45 +0100 Subject: implement renderer --- lib/nes/app/graphics/mask-tile.hh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/nes/app/graphics/mask-tile.hh (limited to 'lib/nes/app/graphics/mask-tile.hh') diff --git a/lib/nes/app/graphics/mask-tile.hh b/lib/nes/app/graphics/mask-tile.hh new file mode 100644 index 0000000..c811003 --- /dev/null +++ b/lib/nes/app/graphics/mask-tile.hh @@ -0,0 +1,30 @@ +#pragma once + +#include + +namespace nes::app +{ + /// An 8x8 tile without intrinsic coloring, only providing the alpha mask. + /// + /// The tile is stored as an array of 8 8-bit integers, where each bit represents a horizontal pixel in the + /// integer's row. + struct mask_tile + { + std::uint8_t data[8]{}; + }; + + namespace tiles + { + inline constexpr auto letter_a = mask_tile + { + 0b00111000, + 0b01101100, + 0b11000110, + 0b11000110, + 0b11111110, + 0b11000110, + 0b11000110, + 0b00000000, + }; + } // namespace tiles +} // namespace nes::app \ No newline at end of file -- cgit v1.3.1