From 4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 24 Apr 2019 11:03:58 -0400 Subject: add pause to curses, remove unfinished calculator frontend --- .../CEdev/examples/gfx_light_dark/src/main.c | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c (limited to 'frontends/calculator/CEdev/examples/gfx_light_dark/src') diff --git a/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c b/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c deleted file mode 100644 index 4f2e4d1..0000000 --- a/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define color gfx_RGBTo1555(34, 55, 89) - -void main(void) { - uint8_t i = 0; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* For i in 0..255 */ - do { - - /* Fade out to black */ - gfx_palette[0] = gfx_Darken(color, i); - /* Fade in from black */ - gfx_palette[1] = gfx_Darken(color, ~i); - /* Fade in from white */ - gfx_palette[3] = gfx_Lighten(color, ~i); - /* Fade out to white */ - gfx_palette[2] = gfx_Lighten(color, i); - - /* Fade out to black */ - gfx_SetColor(0); - gfx_FillRectangle_NoClip(0, 0, 160, 120); - /* Fade in from black */ - gfx_SetColor(1); - gfx_FillRectangle_NoClip(160, 0, 160, 120); - /* Fade in from white */ - gfx_SetColor(2); - gfx_FillRectangle_NoClip(0, 120, 160, 120); - /* Fade out to white */ - gfx_SetColor(3); - gfx_FillRectangle_NoClip(160, 120, 160, 120); - - /* Wait for a keypress at the start of each quarter of the fade */ - if (!(i & 0x3f)) { - while (!os_GetCSC()); - } - - /* Loop until i is 0 again because of 8 bit range */ - } while (++i); - - /* Wait for a keypress */ - while (!os_GetCSC()); - - /* Usual cleanup */ - gfx_End(); -} -- cgit v1.2.3-101-g0448