summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/gfx_shapes_shift
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_shapes_shift')
-rw-r--r--frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json126
-rw-r--r--frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile30
-rw-r--r--frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md20
-rw-r--r--frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c224
4 files changed, 200 insertions, 200 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json b/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json
index af3def5..89f6ee2 100644
--- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json
+++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json
@@ -1,63 +1,63 @@
-{
- "rom": "84pce_515.rom",
- "transfer_files": [
- "bin/DEMO.8xp"
- ],
- "target": {
- "name": "DEMO",
- "isASM": true
- },
- "sequence": [
- "action|launch",
- "hashWait|1",
- "key|enter",
- "hashWait|2",
- "key|enter",
- "hashWait|3",
- "key|enter",
- "hashWait|4",
- "key|enter",
- "hashWait|5",
- "key|enter",
- "hashWait|6"
- ],
- "hashes": {
- "1": {
- "description": "The empty and filled blue circles are drawn correctly",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "2C41178A" ]
- },
- "2": {
- "description": "The yellow rectangle, red circle, and blue triangle are drawn correctly",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "C8E3ED16" ]
- },
- "3": {
- "description": "Filled yellow rectangle, red circle, and blue triangle are drawn correctly",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "D7543DD6" ]
- },
- "4": {
- "description": "The screen is shifted several times",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "F2BD5102" ]
- },
- "5": {
- "description": "The screen displays many different triangles",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "CDE95095" ]
- },
- "6": {
- "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",
+ "key|enter",
+ "hashWait|3",
+ "key|enter",
+ "hashWait|4",
+ "key|enter",
+ "hashWait|5",
+ "key|enter",
+ "hashWait|6"
+ ],
+ "hashes": {
+ "1": {
+ "description": "The empty and filled blue circles are drawn correctly",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "2C41178A" ]
+ },
+ "2": {
+ "description": "The yellow rectangle, red circle, and blue triangle are drawn correctly",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "C8E3ED16" ]
+ },
+ "3": {
+ "description": "Filled yellow rectangle, red circle, and blue triangle are drawn correctly",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "D7543DD6" ]
+ },
+ "4": {
+ "description": "The screen is shifted several times",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "F2BD5102" ]
+ },
+ "5": {
+ "description": "The screen displays many different triangles",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "CDE95095" ]
+ },
+ "6": {
+ "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_shapes_shift/makefile b/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile
index 1f1b36b..d3deba8 100644
--- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile
+++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/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_shapes_shift/readme.md b/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md
index 5f163d3..c66cd1d 100644
--- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md
+++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md
@@ -1,10 +1,10 @@
-### GraphX Shapes and Shift Demo
-
-Draws different shapes, and demonstrates window shifting.
-
-![Screenshot](screenshot.gif)
-
----
-
-This demo is a part of the C SDK Toolchain for use on the CE.
-
+### GraphX Shapes and Shift Demo
+
+Draws different shapes, and demonstrates window shifting.
+
+![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_shapes_shift/src/main.c b/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c
index cfa784d..382cd12 100644
--- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c
+++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c
@@ -1,112 +1,112 @@
-#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) {
- uint8_t y;
- uint24_t i;
-
- /* Triangle coordinates */
- int verts[6] = {
- 160, 1, /* (x0, y0) */
- 1, 238, /* (x1, y1) */
- 318,238, /* (x2, y2) */
- };
-
- /* Initialize the 8bpp graphics */
- gfx_Begin();
- gfx_SetColor(gfx_blue);
-
- /* Draw some circles to make sure they all look the same */
- y = 40;
- for (i = 2; i < 13; i++) {
- y += i;
- gfx_FillCircle_NoClip(80, y, i);
- y += i + 3;
- }
- y = 40;
- for (i = 2; i < 13; i++) {
- y += i;
- gfx_FillCircle(240, y, i);
- y += i + 3;
- }
- y = 40;
- for (i = 2; i < 13; i++) {
- y += i;
- gfx_Circle(160, y, i);
- y += i + 3;
- }
-
- /* Wait for any key */
- while (!os_GetCSC());
-
- gfx_FillScreen(gfx_white);
- gfx_SetColor(gfx_yellow);
- gfx_Rectangle(0, 0, 320, 240);
-
- /* Draw a blue triangle outline */
- gfx_SetColor(gfx_blue);
- gfx_Polygon(verts, 3);
-
- /* Draw a red circle outline */
- gfx_SetColor(gfx_red);
- gfx_Circle(160, 152, 80);
-
- /* Wait for any key */
- while (!os_GetCSC());
-
- /* Draw a filled yellow rectangle */
- gfx_SetColor(gfx_yellow);
- gfx_FillRectangle(0, 0, 320, 240);
-
- /* Draw a filled blue triangle */
- gfx_SetColor(gfx_blue);
- gfx_FillTriangle(verts[0], verts[1], verts[2], verts[3], verts[4], verts[5]);
-
- /* Draw a filled red circle */
- gfx_SetColor(gfx_red);
- gfx_FillCircle(160, 152, 80);
-
- /* Wait for any key */
- while (!os_GetCSC());
-
- /* Shift the screen around a bit */
- gfx_ShiftDown(20);
- gfx_ShiftDown(20);
- gfx_ShiftLeft(20);
- gfx_ShiftLeft(20);
- gfx_ShiftUp(20);
- gfx_ShiftRight(20);
-
- /* Wait for any key */
- while (!os_GetCSC());
-
- gfx_FillScreen(gfx_white);
-
- /* Test triangle drawing */
- gfx_SetColor(gfx_blue);
- gfx_FillTriangle(110, 170, 110, 70, 230, 70);
- gfx_SetColor(gfx_green);
- gfx_FillTriangle_NoClip(110, 170, 230, 70, 230, 170);
- gfx_SetColor(gfx_black);
- gfx_FillTriangle(110, 170, 200, 200, 230, 200);
- gfx_FillTriangle_NoClip(140, 40, 110, 40, 230, 70);
- gfx_FillTriangle(1, 1, 318, 1, 1, 1);
- gfx_FillTriangle_NoClip(1, 238, 1, 238, 318, 238);
- gfx_FillTriangle(1, 3, 1, 236, 1, 236);
- gfx_FillTriangle_NoClip(318, 3, 318, 236, 318, 3);
-
- /* Wait for any key */
- 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) {
+ uint8_t y;
+ uint24_t i;
+
+ /* Triangle coordinates */
+ int verts[6] = {
+ 160, 1, /* (x0, y0) */
+ 1, 238, /* (x1, y1) */
+ 318,238, /* (x2, y2) */
+ };
+
+ /* Initialize the 8bpp graphics */
+ gfx_Begin();
+ gfx_SetColor(gfx_blue);
+
+ /* Draw some circles to make sure they all look the same */
+ y = 40;
+ for (i = 2; i < 13; i++) {
+ y += i;
+ gfx_FillCircle_NoClip(80, y, i);
+ y += i + 3;
+ }
+ y = 40;
+ for (i = 2; i < 13; i++) {
+ y += i;
+ gfx_FillCircle(240, y, i);
+ y += i + 3;
+ }
+ y = 40;
+ for (i = 2; i < 13; i++) {
+ y += i;
+ gfx_Circle(160, y, i);
+ y += i + 3;
+ }
+
+ /* Wait for any key */
+ while (!os_GetCSC());
+
+ gfx_FillScreen(gfx_white);
+ gfx_SetColor(gfx_yellow);
+ gfx_Rectangle(0, 0, 320, 240);
+
+ /* Draw a blue triangle outline */
+ gfx_SetColor(gfx_blue);
+ gfx_Polygon(verts, 3);
+
+ /* Draw a red circle outline */
+ gfx_SetColor(gfx_red);
+ gfx_Circle(160, 152, 80);
+
+ /* Wait for any key */
+ while (!os_GetCSC());
+
+ /* Draw a filled yellow rectangle */
+ gfx_SetColor(gfx_yellow);
+ gfx_FillRectangle(0, 0, 320, 240);
+
+ /* Draw a filled blue triangle */
+ gfx_SetColor(gfx_blue);
+ gfx_FillTriangle(verts[0], verts[1], verts[2], verts[3], verts[4], verts[5]);
+
+ /* Draw a filled red circle */
+ gfx_SetColor(gfx_red);
+ gfx_FillCircle(160, 152, 80);
+
+ /* Wait for any key */
+ while (!os_GetCSC());
+
+ /* Shift the screen around a bit */
+ gfx_ShiftDown(20);
+ gfx_ShiftDown(20);
+ gfx_ShiftLeft(20);
+ gfx_ShiftLeft(20);
+ gfx_ShiftUp(20);
+ gfx_ShiftRight(20);
+
+ /* Wait for any key */
+ while (!os_GetCSC());
+
+ gfx_FillScreen(gfx_white);
+
+ /* Test triangle drawing */
+ gfx_SetColor(gfx_blue);
+ gfx_FillTriangle(110, 170, 110, 70, 230, 70);
+ gfx_SetColor(gfx_green);
+ gfx_FillTriangle_NoClip(110, 170, 230, 70, 230, 170);
+ gfx_SetColor(gfx_black);
+ gfx_FillTriangle(110, 170, 200, 200, 230, 200);
+ gfx_FillTriangle_NoClip(140, 40, 110, 40, 230, 70);
+ gfx_FillTriangle(1, 1, 318, 1, 1, 1);
+ gfx_FillTriangle_NoClip(1, 238, 1, 238, 318, 238);
+ gfx_FillTriangle(1, 3, 1, 236, 1, 236);
+ gfx_FillTriangle_NoClip(318, 3, 318, 236, 318, 3);
+
+ /* Wait for any key */
+ while (!os_GetCSC());
+
+ /* Close the graphics */
+ gfx_End();
+}