diff options
| author | 2019-04-13 12:40:52 -0400 | |
|---|---|---|
| committer | 2019-04-13 12:40:52 -0400 | |
| commit | 55bfff7cf6541caac172b43186cf14405185b14d (patch) | |
| tree | c1ae99d2b39f8df8933d81ec2e61e81050bdb410 /frontends/calculator/CEdev/examples/gfx_template | |
| parent | 761462861fc1228e65546c4e0f877d5212320082 (diff) | |
| download | cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2 cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip | |
fix curses on linux
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_template')
3 files changed, 91 insertions, 91 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_template/makefile b/frontends/calculator/CEdev/examples/gfx_template/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/makefile +++ b/frontends/calculator/CEdev/examples/gfx_template/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ----------------------------
+# Set NAME to the program name
+# Set ICON to the png icon file name
+# Set DESCRIPTION to display within a compatible shell
+# Set COMPRESSED to "YES" to create a compressed program
+# ----------------------------
+
+NAME ?= DEMO
+COMPRESSED ?= NO
+ICON ?= iconc.png
+DESCRIPTION ?= "C SDK Demo"
+
+# ----------------------------
+
+include $(CEDEV)/include/.makefile
diff --git a/frontends/calculator/CEdev/examples/gfx_template/readme.md b/frontends/calculator/CEdev/examples/gfx_template/readme.md index 9d807e1..8d20e1b 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_template/readme.md @@ -1,12 +1,12 @@ -### GraphX Template - -You can clone this directory for your own GraphX-based projects. - -To add code, fill in the begin, end, step, and draw functions in main.c. You can also create your own .c and .h files and add them to the directory; the Makefile included in this template will automatically find and compile the new .c files. - -In addition, you can also add your own .asm files, which will be detected and -added appropriately to the proper segment. - ---- - -This template is a part of the C SDK Toolchain for use on the CE. +### GraphX Template
+
+You can clone this directory for your own GraphX-based projects.
+
+To add code, fill in the begin, end, step, and draw functions in main.c. You can also create your own .c and .h files and add them to the directory; the Makefile included in this template will automatically find and compile the new .c files.
+
+In addition, you can also add your own .asm files, which will be detected and
+added appropriately to the proper segment.
+
+---
+
+This template is a part of the C SDK Toolchain for use on the CE.
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 <stdbool.h> -#include <stddef.h> -#include <stdint.h> -#include <tice.h> - -/* Standard headers (recommended) */ -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <graphx.h> - -/* 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 <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+/* Standard headers (recommended) */
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <graphx.h>
+
+/* 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! */
+}
|