summaryrefslogtreecommitdiff
path: root/lib/nes/app/graphics/mask-tile.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-01-31 23:24:45 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-01-31 23:24:45 +0100
commitcd8ae0e4f628bd491fcaf1dd4778bc283d619065 (patch)
treedea35210e2bfe21182cfec76511a84de9a23a2fa /lib/nes/app/graphics/mask-tile.hh
parent307e07d6513f9524b7fcab5134494bd175465cd1 (diff)
implement renderer
Diffstat (limited to 'lib/nes/app/graphics/mask-tile.hh')
-rw-r--r--lib/nes/app/graphics/mask-tile.hh30
1 files changed, 30 insertions, 0 deletions
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 <cstdint>
+
+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