From 302bac10e6bf91f471e339062639b15ee26de300 Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Wed, 8 Jan 2025 00:01:08 +0100 Subject: [PATCH] Add some menu effects --- renderer.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/renderer.h b/renderer.h index 12ef637..86c137c 100644 --- a/renderer.h +++ b/renderer.h @@ -1742,12 +1742,20 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, { int stripHeight = LCR_EFFECTIVE_RESOLUTION_Y / 4; int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 10; - int i = 0; + uint16_t effect = LCR_renderer.frame >> 1; while (i < stripHeight * LCR_EFFECTIVE_RESOLUTION_X) { - LCR_drawPixel(i,0x8ddc); + LCR_drawPixel(i,0x8ddc +#if LCR_SETTING_POTATO_GRAPHICS + ); +#else + ^ (effect & 0x18e3)); + + effect += 7; +#endif + ++i; } @@ -1766,8 +1774,8 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, for (int x = 0; x < LCR_EFFECTIVE_RESOLUTION_X; ++x) { LCR_drawPixel(i,(x > LCR_EFFECTIVE_RESOLUTION_X / 4 - limit && - x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4 + limit) - ? 0x73ae : 0x31a6); + (x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4 + limit) + ? 0x73ae : 0x31a6) + ((x + y) % 8)); i++; } } @@ -1806,6 +1814,8 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, LCR_IMAGE_SIZE * (stripHeight / LCR_IMAGE_SIZE)) / 2,0, stripHeight / LCR_IMAGE_SIZE,0xffff); #endif + + LCR_renderer.frame++; } // TODO: what is this function even doing?