From f27302215702eebc470d664b10ba8f66ca885bd5 Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 12 Oct 2023 18:26:32 +0200 Subject: [PATCH] Prepare timer bug fix --- examples/PoolBox/application/Overlays.json | 18 ++--- .../PoolBox/application/src/Objects/paco.hpp | 71 +++++++++---------- .../application/src/Overlay/Overlay.hpp | 4 ++ 3 files changed, 48 insertions(+), 45 deletions(-) create mode 100644 examples/PoolBox/application/src/Overlay/Overlay.hpp diff --git a/examples/PoolBox/application/Overlays.json b/examples/PoolBox/application/Overlays.json index 7103e778..961fe582 100644 --- a/examples/PoolBox/application/Overlays.json +++ b/examples/PoolBox/application/Overlays.json @@ -1,10 +1,10 @@ -{ - "slot_0": { - "timer_tests": { - "pattern": "bin/*/src/Overlay/TimerTests/*.o" - }, - "gpu_tests": { - "pattern": "bin/*/src/Overlay/GPUTests/*.o" - } - } +{ + "slot_0": { + "timer_tests": { + "pattern": "bin/*/src/Overlay/TimerTests2/*.o" + }, + "gpu_tests": { + "pattern": "bin/*/src/Overlay/GPUTests/*.o" + } + } } \ No newline at end of file diff --git a/examples/PoolBox/application/src/Objects/paco.hpp b/examples/PoolBox/application/src/Objects/paco.hpp index ffb39ea4..3a400413 100644 --- a/examples/PoolBox/application/src/Objects/paco.hpp +++ b/examples/PoolBox/application/src/Objects/paco.hpp @@ -1,37 +1,36 @@ -#pragma once -#include -#include -#include - -namespace object { - using namespace JabyEngine; - - class Paco { - public: - static constexpr auto TIM = SimpleTIM(896, 0, 960, 510); - private: - static const GPU::Color24 Colors[]; - - GPU::TexPage::Linked tex_page; - GPU::SPRT::Linked sprite; - SimpleTimer timer; - uint8_t color_idx; - - public: - constexpr Paco() : - tex_page(GPU::TexPage::create(GPU::PositionU16::create( - TIM.get_texture_x(), TIM.get_texture_y()), - GPU::TexturePageColor::$4bit).linked()), - sprite(GPU::SPRT::create( - #pragma GCC warning "This pic used to be 122px (file size) and every tool would except it - however the display would be corrupt" - GPU::AreaI16::create(GPU::PositionI16::create(0, 100), GPU::SizeI16::create(120, 128)), - GPU::PagePositionClut(GPU::PagePosition::create(0, 0), GPU::PageClut::create(TIM.get_clut_x(), TIM.get_clut_y())), - GPU::Color24::Blue()).linked()), - timer(), - color_idx(0) {} - - void setup(); - void update(); - void render(); - }; +#pragma once +#include +#include +#include + +namespace object { + using namespace JabyEngine; + + class Paco { + public: + static constexpr auto TIM = SimpleTIM(896, 0, 960, 510); + private: + static const GPU::Color24 Colors[]; + + GPU::TexPage::Linked tex_page; + GPU::SPRT::Linked sprite; + SimpleTimer timer; + uint8_t color_idx; + + public: + constexpr Paco() : + tex_page(GPU::TexPage::create(GPU::PositionU16::create( + TIM.get_texture_x(), TIM.get_texture_y()), + GPU::TexturePageColor::$4bit).linked()), + sprite(GPU::SPRT::create( + GPU::AreaI16::create(GPU::PositionI16::create(0, 100), GPU::SizeI16::create(120, 128)), + GPU::PagePositionClut(GPU::PagePosition::create(0, 0), GPU::PageClut::create(TIM.get_clut_x(), TIM.get_clut_y())), + GPU::Color24::Blue()).linked()), + timer(), + color_idx(0) {} + + void setup(); + void update(); + void render(); + }; } \ No newline at end of file diff --git a/examples/PoolBox/application/src/Overlay/Overlay.hpp b/examples/PoolBox/application/src/Overlay/Overlay.hpp new file mode 100644 index 00000000..d5ccc809 --- /dev/null +++ b/examples/PoolBox/application/src/Overlay/Overlay.hpp @@ -0,0 +1,4 @@ +#pragma once +namespace Overlay { + void mesaure_busy_loop(); +} \ No newline at end of file