summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/gfx_char
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_char')
-rw-r--r--frontends/calculator/CEdev/examples/gfx_char/autotester.json60
-rw-r--r--frontends/calculator/CEdev/examples/gfx_char/makefile30
-rw-r--r--frontends/calculator/CEdev/examples/gfx_char/readme.md20
-rw-r--r--frontends/calculator/CEdev/examples/gfx_char/src/main.c104
4 files changed, 107 insertions, 107 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_char/autotester.json b/frontends/calculator/CEdev/examples/gfx_char/autotester.json
index 66dfe16..fabde19 100644
--- a/frontends/calculator/CEdev/examples/gfx_char/autotester.json
+++ b/frontends/calculator/CEdev/examples/gfx_char/autotester.json
@@ -1,30 +1,30 @@
-{
- "rom": "84pce_515.rom",
- "transfer_files": [
- "bin/DEMO.8xp"
- ],
- "target": {
- "name": "DEMO",
- "isASM": true
- },
- "sequence": [
- "action|launch",
- "hashWait|1",
- "key|enter",
- "hashWait|2"
- ],
- "hashes": {
- "1": {
- "description": "Test flipped text on black background",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "198A8841" ]
- },
- "2": {
- "description": "Back to the home screen (exit check)",
- "start": "vram_start",
- "size": "vram_16_size",
- "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ]
- }
- }
-}
+{
+ "rom": "84pce_515.rom",
+ "transfer_files": [
+ "bin/DEMO.8xp"
+ ],
+ "target": {
+ "name": "DEMO",
+ "isASM": true
+ },
+ "sequence": [
+ "action|launch",
+ "hashWait|1",
+ "key|enter",
+ "hashWait|2"
+ ],
+ "hashes": {
+ "1": {
+ "description": "Test flipped text on black background",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "198A8841" ]
+ },
+ "2": {
+ "description": "Back to the home screen (exit check)",
+ "start": "vram_start",
+ "size": "vram_16_size",
+ "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ]
+ }
+ }
+}
diff --git a/frontends/calculator/CEdev/examples/gfx_char/makefile b/frontends/calculator/CEdev/examples/gfx_char/makefile
index 1f1b36b..d3deba8 100644
--- a/frontends/calculator/CEdev/examples/gfx_char/makefile
+++ b/frontends/calculator/CEdev/examples/gfx_char/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_char/readme.md b/frontends/calculator/CEdev/examples/gfx_char/readme.md
index 7889ac8..10ba641 100644
--- a/frontends/calculator/CEdev/examples/gfx_char/readme.md
+++ b/frontends/calculator/CEdev/examples/gfx_char/readme.md
@@ -1,10 +1,10 @@
-### GraphX Character Demo
-
-A simple demo showing an upside down string.
-
-![Screenshot](screenshot.png)
-
----
-
-This demo is a part of the C SDK Toolchain for use on the CE.
-
+### GraphX Character Demo
+
+A simple demo showing an upside down string.
+
+![Screenshot](screenshot.png)
+
+---
+
+This demo is a part of the C SDK Toolchain for use on the CE.
+
diff --git a/frontends/calculator/CEdev/examples/gfx_char/src/main.c b/frontends/calculator/CEdev/examples/gfx_char/src/main.c
index 7d1b5ec..a7f108e 100644
--- a/frontends/calculator/CEdev/examples/gfx_char/src/main.c
+++ b/frontends/calculator/CEdev/examples/gfx_char/src/main.c
@@ -1,52 +1,52 @@
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <tice.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <graphx.h>
-
-/* Use some random color as the transparent one */
-#define TRANSPARENT_COLOR 10
-#define FONT_WIDTH 8
-#define FONT_HEIGHT 8
-
-/* Function prototypes */
-void printu(char *str, int x, int y);
-
-const char *my_str = "!!DEPPILF si txet sihT";
-
-void main(void) {
- /* Initialize the 8bpp graphics */
- gfx_Begin();
- gfx_FillScreen(gfx_black);
-
- /* Setup the colors */
- gfx_SetTextFGColor(gfx_white);
-
- /* Set the transparent text background color */
- gfx_SetTextBGColor(TRANSPARENT_COLOR);
- gfx_SetTextTransparentColor(TRANSPARENT_COLOR);
- gfx_SetMonospaceFont(FONT_WIDTH);
-
- /* Print some upside down text */
- printu(my_str, (LCD_WIDTH - gfx_GetStringWidth(my_str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2);
-
- /* Wait for key */
- while (!os_GetCSC());
-
- /* Finish the graphics */
- gfx_End();
-}
-
-void printu(char *str, int x, int y) {
- gfx_TempSprite(my_char, 8, 8);
-
- while (*str) {
- gfx_TransparentSprite(gfx_RotateSpriteHalf(gfx_GetSpriteChar(*str), my_char), x, y);
- x += gfx_GetCharWidth(*str++);
- }
-}
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <graphx.h>
+
+/* Use some random color as the transparent one */
+#define TRANSPARENT_COLOR 10
+#define FONT_WIDTH 8
+#define FONT_HEIGHT 8
+
+/* Function prototypes */
+void printu(char *str, int x, int y);
+
+const char *my_str = "!!DEPPILF si txet sihT";
+
+void main(void) {
+ /* Initialize the 8bpp graphics */
+ gfx_Begin();
+ gfx_FillScreen(gfx_black);
+
+ /* Setup the colors */
+ gfx_SetTextFGColor(gfx_white);
+
+ /* Set the transparent text background color */
+ gfx_SetTextBGColor(TRANSPARENT_COLOR);
+ gfx_SetTextTransparentColor(TRANSPARENT_COLOR);
+ gfx_SetMonospaceFont(FONT_WIDTH);
+
+ /* Print some upside down text */
+ printu(my_str, (LCD_WIDTH - gfx_GetStringWidth(my_str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2);
+
+ /* Wait for key */
+ while (!os_GetCSC());
+
+ /* Finish the graphics */
+ gfx_End();
+}
+
+void printu(char *str, int x, int y) {
+ gfx_TempSprite(my_char, 8, 8);
+
+ while (*str) {
+ gfx_TransparentSprite(gfx_RotateSpriteHalf(gfx_GetSpriteChar(*str), my_char), x, y);
+ x += gfx_GetCharWidth(*str++);
+ }
+}