summaryrefslogtreecommitdiff
path: root/lib/nes/app/graphics/mask-tile.hh
diff options
context:
space:
mode:
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