summaryrefslogtreecommitdiff
path: root/lib/nes/app/application.cc
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/application.cc
parent307e07d6513f9524b7fcab5134494bd175465cd1 (diff)
implement renderer
Diffstat (limited to 'lib/nes/app/application.cc')
-rw-r--r--lib/nes/app/application.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/nes/app/application.cc b/lib/nes/app/application.cc
index db43854..ad3c1af 100644
--- a/lib/nes/app/application.cc
+++ b/lib/nes/app/application.cc
@@ -1,6 +1,11 @@
#include "nes/app/application.hh"
#include "nes/app/input/input-device-keyboard.hh"
#include "nes/app/input/input-device-controller.hh"
+#include "nes/app/graphics/renderer.hh"
+#include "nes/app/graphics/color.hh"
+#include "nes/app/graphics/mask-tile.hh"
+#include "nes/app/graphics/image-tile.hh"
+#include "nes/common/display.hh"
#include <iostream>
namespace nes
@@ -24,7 +29,7 @@ namespace nes
auto application::frame(std::chrono::microseconds const elapsed_time) -> void
{
- console_.ref_controller_1().set_pressed(input_manager_.get_input_1().read_mask());
+ /*console_.ref_controller_1().set_pressed(input_manager_.get_input_1().read_mask());
console_.ref_controller_2().set_pressed(input_manager_.get_input_2().read_mask());
console_.step(elapsed_time);
@@ -33,6 +38,12 @@ namespace nes
{
std::cerr << "Invalid state: " << to_string(console_.get_status()) << std::endl;
std::abort();
- }
+ }*/
+
+ auto r = app::renderer{ display_ };
+ r.render_fill(app::color::background_primary);
+ r.render_mask_tile(10, 5, app::tiles::letter_a, app::color::foreground_primary);
+ r.render_image_tile(5, 5, app::tiles::test);
+ display_.switch_buffers();
}
} // namespace nes \ No newline at end of file