summaryrefslogtreecommitdiff
path: root/src/nes/display.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nes/display.cc')
-rw-r--r--src/nes/display.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nes/display.cc b/src/nes/display.cc
new file mode 100644
index 0000000..4ff1d5f
--- /dev/null
+++ b/src/nes/display.cc
@@ -0,0 +1,16 @@
+#include "nes/display.hh"
+#include "nes/util/rgb.hh"
+
+namespace nes
+{
+ auto display::clear(rgb const color) -> void
+ {
+ for (auto y = unsigned{ 0 }; y < height; ++y)
+ {
+ for (auto x = unsigned{ 0 }; x < width; ++x)
+ {
+ set(x, y, color);
+ }
+ }
+ }
+} // namespace nes \ No newline at end of file