summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/gfx_floodfill
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_floodfill')
-rw-r--r--frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json72
-rw-r--r--frontends/calculator/CEdev/examples/gfx_floodfill/makefile30
-rw-r--r--frontends/calculator/CEdev/examples/gfx_floodfill/readme.md20
-rw-r--r--frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c100
4 files changed, 111 insertions, 111 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json b/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json
index 01e94ee..0ffc0f3 100644
--- a/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json
+++ b/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json
@@ -1,36 +1,36 @@
-{
- "rom": "84pce_515.rom",
- "transfer_files": [
- "bin/DEMO.8xp"
- ],
- "target": {
- "name": "DEMO",
- "isASM": true
- },
- "sequence": [
- "action|launch",
- "delay|300",
- "hash|1",
- "key|enter",
- "delay|300",
- "hash|2",
- "delay|300",
- "key|enter",
- "delay|300"
- ],
- "hashes": {
- "1": {
- "description": "A black star outline is drawn to the screen",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "7EA01B1B" ]
- },
- "2": {
- "description": "The rest of the screen will be filled a solid black",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "4CECC590" ]
- }
- }
-}
-
+{
+ "rom": "84pce_515.rom",
+ "transfer_files": [
+ "bin/DEMO.8xp"
+ ],
+ "target": {
+ "name": "DEMO",
+ "isASM": true
+ },
+ "sequence": [
+ "action|launch",
+ "delay|300",
+ "hash|1",
+ "key|enter",
+ "delay|300",
+ "hash|2",
+ "delay|300",
+ "key|enter",
+ "delay|300"
+ ],
+ "hashes": {
+ "1": {
+ "description": "A black star outline is drawn to the screen",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "7EA01B1B" ]
+ },
+ "2": {
+ "description": "The rest of the screen will be filled a solid black",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "4CECC590" ]
+ }
+ }
+}
+
diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/makefile b/frontends/calculator/CEdev/examples/gfx_floodfill/makefile
index 1f1b36b..d3deba8 100644
--- a/frontends/calculator/CEdev/examples/gfx_floodfill/makefile
+++ b/frontends/calculator/CEdev/examples/gfx_floodfill/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_floodfill/readme.md b/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md
index e94fd0d..c535cd2 100644
--- a/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md
+++ b/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md
@@ -1,10 +1,10 @@
-### GraphX Flood Fill Demo
-
-This example demonstrates using the flood fill algorithim implemented in GraphX
-
-![Screenshot](screenshot.gif)
-
----
-
-This demo is a part of the C SDK Toolchain for use on the CE.
-
+### GraphX Flood Fill Demo
+
+This example demonstrates using the flood fill algorithim implemented in GraphX
+
+![Screenshot](screenshot.gif)
+
+---
+
+This demo is a part of the C SDK Toolchain for use on the CE.
+
diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c b/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c
index 31a2090..a282527 100644
--- a/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c
+++ b/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c
@@ -1,50 +1,50 @@
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <tice.h>
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <graphx.h>
-
-void main(void) {
- int pts[10], i;
-
- int rx = 100;
- int ry = 100;
- int cx = LCD_WIDTH / 2;
- int cy = LCD_HEIGHT / 2;
-
- /* Build the coordinates of the polygon */
- double theta = -M_PI / 2;
- double dtheta = 4 * M_PI / 5;
- for (i = 0; i < 10; i += 2) {
- pts[i+0] = (int)(cx + rx * cos(theta)),
- pts[i+1] = (int)(cy + ry * sin(theta));
- theta += dtheta;
- }
-
- /* Initialize the 8bpp graphics */
- gfx_Begin();
-
- /* Set up the palette */
- gfx_SetColor(gfx_black);
-
- /* Draw a polygon on the buffer */
- gfx_Polygon(pts, 5);
-
- /* Pause */
- while (!os_GetCSC());
-
- /* Flood fill the rest of the screen */
- gfx_FloodFill(0, 0, 0);
-
- /* Pause */
- while (!os_GetCSC());
-
- /* Close the graphics */
- gfx_End();
-}
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <graphx.h>
+
+void main(void) {
+ int pts[10], i;
+
+ int rx = 100;
+ int ry = 100;
+ int cx = LCD_WIDTH / 2;
+ int cy = LCD_HEIGHT / 2;
+
+ /* Build the coordinates of the polygon */
+ double theta = -M_PI / 2;
+ double dtheta = 4 * M_PI / 5;
+ for (i = 0; i < 10; i += 2) {
+ pts[i+0] = (int)(cx + rx * cos(theta)),
+ pts[i+1] = (int)(cy + ry * sin(theta));
+ theta += dtheta;
+ }
+
+ /* Initialize the 8bpp graphics */
+ gfx_Begin();
+
+ /* Set up the palette */
+ gfx_SetColor(gfx_black);
+
+ /* Draw a polygon on the buffer */
+ gfx_Polygon(pts, 5);
+
+ /* Pause */
+ while (!os_GetCSC());
+
+ /* Flood fill the rest of the screen */
+ gfx_FloodFill(0, 0, 0);
+
+ /* Pause */
+ while (!os_GetCSC());
+
+ /* Close the graphics */
+ gfx_End();
+}