diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-01-31 23:24:45 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-01-31 23:24:45 +0100 |
| commit | cd8ae0e4f628bd491fcaf1dd4778bc283d619065 (patch) | |
| tree | dea35210e2bfe21182cfec76511a84de9a23a2fa /lib/nes/sys | |
| parent | 307e07d6513f9524b7fcab5134494bd175465cd1 (diff) | |
implement renderer
Diffstat (limited to 'lib/nes/sys')
| -rw-r--r-- | lib/nes/sys/nes.cc | 3 | ||||
| -rw-r--r-- | lib/nes/sys/types/button-mask.hh | 16 |
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/nes/sys/nes.cc b/lib/nes/sys/nes.cc index f922b7d..1504100 100644 --- a/lib/nes/sys/nes.cc +++ b/lib/nes/sys/nes.cc @@ -12,9 +12,6 @@ namespace nes , cpu_{ ppu_, cartridge_, controller_1_, controller_2_ } , status_{ cartridge_.get_status() } { - display_.clear(rgb{}); - display_.switch_buffers(); - display_.clear(rgb{}); } auto nes::step(std::chrono::microseconds const delta) -> void diff --git a/lib/nes/sys/types/button-mask.hh b/lib/nes/sys/types/button-mask.hh index 16b0dad..94c6a2b 100644 --- a/lib/nes/sys/types/button-mask.hh +++ b/lib/nes/sys/types/button-mask.hh @@ -32,13 +32,13 @@ namespace nes namespace buttons { - static constexpr auto a = button_mask::from_raw_value(1 << 0); - static constexpr auto b = button_mask::from_raw_value(1 << 1); - static constexpr auto select = button_mask::from_raw_value(1 << 2); - static constexpr auto start = button_mask::from_raw_value(1 << 3); - static constexpr auto up = button_mask::from_raw_value(1 << 4); - static constexpr auto down = button_mask::from_raw_value(1 << 5); - static constexpr auto left = button_mask::from_raw_value(1 << 6); - static constexpr auto right = button_mask::from_raw_value(1 << 7); + inline constexpr auto a = button_mask::from_raw_value(1 << 0); + inline constexpr auto b = button_mask::from_raw_value(1 << 1); + inline constexpr auto select = button_mask::from_raw_value(1 << 2); + inline constexpr auto start = button_mask::from_raw_value(1 << 3); + inline constexpr auto up = button_mask::from_raw_value(1 << 4); + inline constexpr auto down = button_mask::from_raw_value(1 << 5); + inline constexpr auto left = button_mask::from_raw_value(1 << 6); + inline constexpr auto right = button_mask::from_raw_value(1 << 7); } // namespace buttons } // namespace nes
\ No newline at end of file |
