From cd8ae0e4f628bd491fcaf1dd4778bc283d619065 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Fri, 31 Jan 2025 23:24:45 +0100 Subject: implement renderer --- lib/nes/sys/nes.cc | 3 --- lib/nes/sys/types/button-mask.hh | 16 ++++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'lib/nes/sys') 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 -- cgit v1.3.1