diff --git a/examples/PoolBox/application/src/main.cpp b/examples/PoolBox/application/src/main.cpp index 03ebc201..06dd6ddb 100644 --- a/examples/PoolBox/application/src/main.cpp +++ b/examples/PoolBox/application/src/main.cpp @@ -16,9 +16,14 @@ static auto paco = GPU::SPRT( // This pic used to be 122px (file size) and every tool would except it - however the display would be corrupt. Try it!! GPU::AreaI16({0, 100}, {120, 128}), GPU::PagePositionClut({0, 0}, GPU::PageClut(Assets::PacoTIM.get_clut_x(), Assets::PacoTIM.get_clut_y())), - GPU::Color24::Grey() + GPU::Color24::Blue() ).linked(); +static const GPU::Color24 paco_color[] = { + GPU::Color24::Red(), GPU::Color24::Green(), GPU::Color24::Blue(), GPU::Color24::Yellow() +}; +static uint8_t color_idx = 0; + static void setup() { Assets::load_for_main(); FontWriter::setup(); @@ -31,14 +36,17 @@ static void update() { const auto end_pos = FontWriter::write({0, 32}, "Cody is cute\n&\na \x1b[8;0;0mBAAAAABY!!!"); FontWriter::write(end_pos, "\x1b[0;7;7mJaby was\nhere c:"); - if(timer.is_expired_for(1000_ms)) { - printf("Dino\n"); + if(timer.is_expired_for(325_ms)) { + static constexpr uint8_t last_idx = (sizeof(paco_color)/sizeof(paco_color[0])) - 1; + + color_idx = (color_idx == last_idx) ? 0 : color_idx + 1; timer.reset(); } } static void render() { GPU::swap_buffers_vsync(1); + paco->color = paco_color[color_idx]; GPU::render(paco_texpage); FontWriter::render(); } diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index 012b4b7a..75aea332 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -16,7 +16,7 @@ $(OUTPUT_DIR)/YoshiFont.bin: YoshiFont.png jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans $(OUTPUT_DIR)/Paco.bin: Paco.png - jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 + jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans all: $(INPUT) diff --git a/examples/PoolBox/assets/Paco.png b/examples/PoolBox/assets/Paco.png index 05db9e67..b508457a 100644 --- a/examples/PoolBox/assets/Paco.png +++ b/examples/PoolBox/assets/Paco.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ffd5f19946196768be2c2b14a7b7de2c3d7e0016969c58c4366799d4c4a4dd5 -size 5127 +oid sha256:12cfc332393318a2e22b53493297574de6a2fd58146d901fdbbe102d79ac8d04 +size 5510