From 55bfff7cf6541caac172b43186cf14405185b14d Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sat, 13 Apr 2019 12:40:52 -0400 Subject: fix curses on linux --- .../CEdev/examples/gfx_template/src/main.c | 128 ++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) (limited to 'frontends/calculator/CEdev/examples/gfx_template/src') diff --git a/frontends/calculator/CEdev/examples/gfx_template/src/main.c b/frontends/calculator/CEdev/examples/gfx_template/src/main.c index 2904b0a..0b97651 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_template/src/main.c @@ -1,64 +1,64 @@ -/* - *-------------------------------------- - * Program Name: - * Author: - * License: - * Description: - *-------------------------------------- -*/ - -/* Keep these headers */ -#include -#include -#include -#include - -/* Standard headers (recommended) */ -#include -#include -#include -#include - -#include - -/* Put your function prototypes here */ -void begin(); -void end(); -bool step(); -void draw(); - -/* Put all your globals here */ -bool partial_redraw; - -void main() { - begin(); // No rendering allowed! - gfx_Begin(); - gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats - - while (step()) { // No rendering allowed in step! - if (partial_redraw) // Only want to redraw part of the previous frame? - gfx_BlitScreen(); // Copy previous frame as a base for this frame - draw(); // As little non-rendering logic as possible - gfx_SwapDraw(); // Queue the buffered frame to be displayed - } - - gfx_End(); - end(); -} - -/* Put other functions here */ -void begin() { - /* Implement me! */ -} - -void end() { - /* Implement me! */ -} - -bool step() { - /* Implement me! */ -} - -void draw() { - /* Implement me! */ -} +/* + *-------------------------------------- + * Program Name: + * Author: + * License: + * Description: + *-------------------------------------- +*/ + +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers (recommended) */ +#include +#include +#include +#include + +#include + +/* Put your function prototypes here */ +void begin(); +void end(); +bool step(); +void draw(); + +/* Put all your globals here */ +bool partial_redraw; + +void main() { + begin(); // No rendering allowed! + gfx_Begin(); + gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats + + while (step()) { // No rendering allowed in step! + if (partial_redraw) // Only want to redraw part of the previous frame? + gfx_BlitScreen(); // Copy previous frame as a base for this frame + draw(); // As little non-rendering logic as possible + gfx_SwapDraw(); // Queue the buffered frame to be displayed + } + + gfx_End(); + end(); +} + +/* Put other functions here */ +void begin() { + /* Implement me! */ +} + +void end() { + /* Implement me! */ +} + +bool step() { + /* Implement me! */ +} + +void draw() { + /* Implement me! */ +} -- cgit v1.2.3-101-g0448