diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-01-31 23:30:56 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-01-31 23:30:56 +0100 |
| commit | ccb81b60dac888e44079fb0228c1d5d8542ceade (patch) | |
| tree | 297b672e2cd4de2ce4203c19b973274c5750e60d /lib/nes/app/application.cc | |
| parent | cd8ae0e4f628bd491fcaf1dd4778bc283d619065 (diff) | |
move components into dedicated namespaces
Diffstat (limited to 'lib/nes/app/application.cc')
| -rw-r--r-- | lib/nes/app/application.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/nes/app/application.cc b/lib/nes/app/application.cc index ad3c1af..4da3848 100644 --- a/lib/nes/app/application.cc +++ b/lib/nes/app/application.cc @@ -8,7 +8,7 @@ #include "nes/common/display.hh" #include <iostream> -namespace nes +namespace nes::app { namespace { @@ -18,9 +18,9 @@ namespace nes application::application(display& display, input_device_keyboard& keyboard) : display_{ display } , input_manager_{ keyboard } - , console_{ cartridge::from_file(file), display_ } + , console_{ sys::cartridge::from_file(file), display_ } { - if (console_.get_status() != status::success) + if (console_.get_status() != sys::status::success) { std::cerr << "Unable to load cartridge: " << to_string(console_.get_status()) << std::endl; std::abort(); @@ -29,21 +29,15 @@ 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); - if (console_.get_status() != status::success) + if (console_.get_status() != sys::status::success) { 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 +} // namespace nes::app
\ No newline at end of file |
