summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/gfx_rletsprite
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2019-04-13 12:40:52 -0400
committerAndrew Opalach <andrew@akon.city> 2019-04-13 12:40:52 -0400
commit55bfff7cf6541caac172b43186cf14405185b14d (patch)
treec1ae99d2b39f8df8933d81ec2e61e81050bdb410 /frontends/calculator/CEdev/examples/gfx_rletsprite
parent761462861fc1228e65546c4e0f877d5212320082 (diff)
downloadcetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz
cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2
cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip
fix curses on linux
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_rletsprite')
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json60
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/makefile30
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md20
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini10
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c404
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h34
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c50
-rw-r--r--frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c218
8 files changed, 413 insertions, 413 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json b/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json
index 8093b64..e35c63f 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/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": "Make sure the sprites are displayed properly",
- "start": "vram_start",
- "size": "vram_8_size",
- "expected_CRCs": [ "4F8D6CB" ]
- },
- "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": "Make sure the sprites are displayed properly",
+ "start": "vram_start",
+ "size": "vram_8_size",
+ "expected_CRCs": [ "4F8D6CB" ]
+ },
+ "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_rletsprite/makefile b/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile
index 1f1b36b..d3deba8 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/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_rletsprite/readme.md b/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md
index b0c8df7..c919f67 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md
@@ -1,10 +1,10 @@
-### GraphX RLETSprite Demo
-
-Draws a sprite with RLE transparency in many clipping scenarios and converts to
-and from a normal sprite with transparency. Created for testing.
-
-![Screenshot](screenshot.png)
-
----
-
-This demo is a part of the C SDK Toolchain for use on the CE.
+### GraphX RLETSprite Demo
+
+Draws a sprite with RLE transparency in many clipping scenarios and converts to
+and from a normal sprite with transparency. Created for testing.
+
+![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_rletsprite/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini
index bac699c..369e17a 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini
@@ -1,5 +1,5 @@
-#GroupC : logo_gfx
-#Style : rlet
-#TransparentColor : 255,255,255
-#PNGImages :
- ubuntu
+#GroupC : logo_gfx
+#Style : rlet
+#TransparentColor : 255,255,255
+#PNGImages :
+ ubuntu
diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c
index 894a456..1fbc912 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c
@@ -1,203 +1,203 @@
-// convpng
-#include <stdint.h>
-#include "logo_gfx.h"
-
-uint16_t logo_gfx_pal[197] = {
- 0xFFFF, // 00 :: rgb(255,255,255)
- 0x7C00, // 01 :: rgb(255,0,0)
- 0x6800, // 02 :: rgb(212,2,2)
- 0xE821, // 03 :: rgb(213,11,11)
- 0xFFE0, // 04 :: rgb(255,255,0)
- 0x83E0, // 05 :: rgb(0,255,0)
- 0x001F, // 06 :: rgb(0,0,255)
- 0x7E20, // 07 :: rgb(251,139,0)
- 0x7920, // 08 :: rgb(244,72,0)
- 0xFFFF, // 09 :: rgb(255,254,254)
- 0x7E20, // 10 :: rgb(251,139,2)
- 0x7E20, // 11 :: rgb(251,139,1)
- 0xFFFF, // 12 :: rgb(255,253,253)
- 0xFE20, // 13 :: rgb(251,140,4)
- 0xFFFF, // 14 :: rgb(255,254,253)
- 0xFECC, // 15 :: rgb(252,182,97)
- 0x7A90, // 16 :: rgb(249,163,128)
- 0x7FDC, // 17 :: rgb(254,244,231)
- 0xF985, // 18 :: rgb(245,100,40)
- 0x7F9A, // 19 :: rgb(253,225,213)
- 0x7FDD, // 20 :: rgb(253,242,242)
- 0x6D6B, // 21 :: rgb(226,90,90)
- 0xFFBC, // 22 :: rgb(254,239,233)
- 0xF921, // 23 :: rgb(244,77,7)
- 0x7EED, // 24 :: rgb(252,187,107)
- 0xFF99, // 25 :: rgb(254,231,203)
- 0xFFFE, // 26 :: rgb(255,253,250)
- 0xFF16, // 27 :: rgb(251,199,177)
- 0xF921, // 28 :: rgb(244,78,8)
- 0x7F31, // 29 :: rgb(253,204,143)
- 0x7FDD, // 30 :: rgb(252,241,241)
- 0xF18C, // 31 :: rgb(229,102,102)
- 0x7B5A, // 32 :: rgb(247,212,212)
- 0xFF76, // 33 :: rgb(253,221,181)
- 0xF652, // 34 :: rgb(237,151,151)
- 0x7652, // 35 :: rgb(236,145,145)
- 0xE800, // 36 :: rgb(212,3,3)
- 0x718C, // 37 :: rgb(228,98,98)
- 0xFF54, // 38 :: rgb(253,214,165)
- 0x7673, // 39 :: rgb(237,153,153)
- 0xFF32, // 40 :: rgb(252,205,148)
- 0x7EA8, // 41 :: rgb(251,169,68)
- 0x6CC6, // 42 :: rgb(219,48,48)
- 0x7FBA, // 43 :: rgb(254,234,211)
- 0xE842, // 44 :: rgb(215,20,20)
- 0xFB7B, // 45 :: rgb(250,224,224)
- 0xFF77, // 46 :: rgb(253,224,187)
- 0xF652, // 47 :: rgb(237,149,149)
- 0x7F75, // 48 :: rgb(253,218,175)
- 0x7FFE, // 49 :: rgb(254,249,249)
- 0x7EEC, // 50 :: rgb(252,185,102)
- 0x7FBD, // 51 :: rgb(252,236,236)
- 0xFFFF, // 52 :: rgb(255,253,251)
- 0x7EED, // 53 :: rgb(252,188,109)
- 0x7FFF, // 54 :: rgb(254,252,252)
- 0xFAF7, // 55 :: rgb(243,189,189)
- 0x7B9B, // 56 :: rgb(250,225,225)
- 0xFE87, // 57 :: rgb(251,164,56)
- 0x7AD2, // 58 :: rgb(250,179,149)
- 0xED09, // 59 :: rgb(224,70,70)
- 0xECA5, // 60 :: rgb(218,43,43)
- 0xFAF4, // 61 :: rgb(250,190,165)
- 0x6D29, // 62 :: rgb(224,74,74)
- 0x6D4A, // 63 :: rgb(225,82,82)
- 0xED08, // 64 :: rgb(223,69,69)
- 0x6D08, // 65 :: rgb(222,63,63)
- 0x76D6, // 66 :: rgb(242,178,178)
- 0xECC6, // 67 :: rgb(220,51,51)
- 0xF1AD, // 68 :: rgb(229,109,109)
- 0xFFDD, // 69 :: rgb(254,246,235)
- 0x718C, // 70 :: rgb(228,97,97)
- 0xFFBC, // 71 :: rgb(254,239,234)
- 0xFF77, // 72 :: rgb(253,223,187)
- 0x76D6, // 73 :: rgb(242,179,179)
- 0x6863, // 74 :: rgb(216,26,26)
- 0x7AB1, // 75 :: rgb(249,169,136)
- 0xE843, // 76 :: rgb(215,21,21)
- 0xFF9C, // 77 :: rgb(251,230,230)
- 0xF9A6, // 78 :: rgb(245,108,51)
- 0x7F97, // 79 :: rgb(253,225,189)
- 0x7942, // 80 :: rgb(244,81,13)
- 0x7FBA, // 81 :: rgb(254,236,215)
- 0xFE21, // 82 :: rgb(251,143,11)
- 0x7FBC, // 83 :: rgb(251,234,234)
- 0xFB18, // 84 :: rgb(245,197,197)
- 0x76D6, // 85 :: rgb(242,177,177)
- 0x71AD, // 86 :: rgb(229,106,106)
- 0xFAB2, // 87 :: rgb(249,176,144)
- 0x7F9A, // 88 :: rgb(253,227,217)
- 0x7FDD, // 89 :: rgb(254,242,237)
- 0x7FDE, // 90 :: rgb(253,243,243)
- 0x7AB1, // 91 :: rgb(249,171,139)
- 0xFFBB, // 92 :: rgb(254,239,221)
- 0xF694, // 93 :: rgb(240,167,167)
- 0xFE87, // 94 :: rgb(251,167,61)
- 0xFF7A, // 95 :: rgb(253,224,213)
- 0x7F0E, // 96 :: rgb(253,193,117)
- 0xFA6F, // 97 :: rgb(249,159,121)
- 0x7FFE, // 98 :: rgb(255,251,247)
- 0xFEAA, // 99 :: rgb(251,175,80)
- 0x7694, // 100 :: rgb(239,161,161)
- 0x7AF3, // 101 :: rgb(250,186,160)
- 0xE801, // 102 :: rgb(213,5,5)
- 0xFA6F, // 103 :: rgb(249,159,122)
- 0x7FDB, // 104 :: rgb(254,241,224)
- 0xF920, // 105 :: rgb(244,75,4)
- 0x7A8F, // 106 :: rgb(249,160,123)
- 0x7694, // 107 :: rgb(239,163,163)
- 0x7B7B, // 108 :: rgb(249,220,220)
- 0xE822, // 109 :: rgb(214,14,14)
- 0x6D29, // 110 :: rgb(223,71,71)
- 0xFAF7, // 111 :: rgb(244,192,192)
- 0xFF55, // 112 :: rgb(253,215,169)
- 0x7A8F, // 113 :: rgb(249,161,124)
- 0xFF32, // 114 :: rgb(253,207,151)
- 0x7FBB, // 115 :: rgb(253,233,224)
- 0xF694, // 116 :: rgb(239,165,165)
- 0xFFBC, // 117 :: rgb(254,238,231)
- 0xFB39, // 118 :: rgb(247,208,208)
- 0x7B38, // 119 :: rgb(246,201,201)
- 0x6842, // 120 :: rgb(214,16,16)
- 0x7FFF, // 121 :: rgb(254,251,251)
- 0xFB7B, // 122 :: rgb(250,223,223)
- 0xF16C, // 123 :: rgb(227,95,95)
- 0x7672, // 124 :: rgb(237,152,152)
- 0x7631, // 125 :: rgb(235,138,138)
- 0xFE87, // 126 :: rgb(251,165,60)
- 0xFFDD, // 127 :: rgb(254,245,240)
- 0xFF33, // 128 :: rgb(252,208,154)
- 0x7F79, // 129 :: rgb(252,220,207)
- 0x7E41, // 130 :: rgb(251,144,12)
- 0x7E42, // 131 :: rgb(251,146,19)
- 0x7F36, // 132 :: rgb(251,202,182)
- 0x7FDC, // 133 :: rgb(254,243,230)
- 0x7963, // 134 :: rgb(244,89,24)
- 0x7F0E, // 135 :: rgb(252,193,119)
- 0xFE87, // 136 :: rgb(251,164,57)
- 0x7A2B, // 137 :: rgb(247,138,92)
- 0xFA6E, // 138 :: rgb(249,157,119)
- 0xFF9B, // 139 :: rgb(253,229,219)
- 0x7920, // 140 :: rgb(244,74,3)
- 0xFFDE, // 141 :: rgb(254,246,243)
- 0xF964, // 142 :: rgb(245,95,32)
- 0xF921, // 143 :: rgb(244,76,6)
- 0xFAD3, // 144 :: rgb(250,183,155)
- 0xFFBA, // 145 :: rgb(254,237,216)
- 0xFAD3, // 146 :: rgb(250,182,154)
- 0xF985, // 147 :: rgb(245,103,44)
- 0x7FFE, // 148 :: rgb(255,252,250)
- 0x7FFE, // 149 :: rgb(255,251,250)
- 0x6800, // 150 :: rgb(212,1,1)
- 0x7B18, // 151 :: rgb(245,195,195)
- 0x7AD2, // 152 :: rgb(250,178,148)
- 0x7ECB, // 153 :: rgb(251,179,87)
- 0x7EA8, // 154 :: rgb(251,169,69)
- 0xFEAA, // 155 :: rgb(251,176,82)
- 0x7652, // 156 :: rgb(236,146,146)
- 0xF942, // 157 :: rgb(244,83,16)
- 0xF9E9, // 158 :: rgb(246,126,76)
- 0xFFDD, // 159 :: rgb(254,246,242)
- 0x71EF, // 160 :: rgb(231,120,120)
- 0xFB39, // 161 :: rgb(247,206,206)
- 0xFF37, // 162 :: rgb(252,208,190)
- 0x6D08, // 163 :: rgb(222,65,65)
- 0x7FDE, // 164 :: rgb(253,244,244)
- 0x7A4D, // 165 :: rgb(248,147,106)
- 0xFB5A, // 166 :: rgb(248,216,216)
- 0x7F79, // 167 :: rgb(253,220,206)
- 0xFAD3, // 168 :: rgb(250,181,153)
- 0x7F15, // 169 :: rgb(251,196,173)
- 0x7F31, // 170 :: rgb(252,201,137)
- 0xF9C8, // 171 :: rgb(246,116,62)
- 0xFAB2, // 172 :: rgb(250,176,145)
- 0xFF10, // 173 :: rgb(252,198,131)
- 0x7A6E, // 174 :: rgb(248,155,117)
- 0xFF9B, // 175 :: rgb(253,232,224)
- 0xFFBB, // 176 :: rgb(254,240,221)
- 0x7920, // 177 :: rgb(244,74,2)
- 0x7FDC, // 178 :: rgb(254,243,229)
- 0xFE21, // 179 :: rgb(251,141,6)
- 0x7F53, // 180 :: rgb(253,210,155)
- 0xF9E9, // 181 :: rgb(247,127,77)
- 0xFF58, // 182 :: rgb(252,213,197)
- 0xFE87, // 183 :: rgb(251,164,58)
- 0xFF54, // 184 :: rgb(253,213,164)
- 0xFEA9, // 185 :: rgb(251,174,78)
- 0xFE21, // 186 :: rgb(251,143,10)
- 0x79E8, // 187 :: rgb(246,120,67)
- 0x7E87, // 188 :: rgb(251,163,54)
- 0xFFDD, // 189 :: rgb(254,248,240)
- 0x7F57, // 190 :: rgb(252,210,193)
- 0xFF76, // 191 :: rgb(253,222,183)
- 0xC3E0, // 192 :: rgb(128,255,0)
- 0x0210, // 193 :: rgb(0,128,128)
- 0x7E00, // 194 :: rgb(255,128,0)
- 0x4030, // 195 :: rgb(128,8,128)
- 0x6800, // 196 :: rgb(212,0,0)
+// convpng
+#include <stdint.h>
+#include "logo_gfx.h"
+
+uint16_t logo_gfx_pal[197] = {
+ 0xFFFF, // 00 :: rgb(255,255,255)
+ 0x7C00, // 01 :: rgb(255,0,0)
+ 0x6800, // 02 :: rgb(212,2,2)
+ 0xE821, // 03 :: rgb(213,11,11)
+ 0xFFE0, // 04 :: rgb(255,255,0)
+ 0x83E0, // 05 :: rgb(0,255,0)
+ 0x001F, // 06 :: rgb(0,0,255)
+ 0x7E20, // 07 :: rgb(251,139,0)
+ 0x7920, // 08 :: rgb(244,72,0)
+ 0xFFFF, // 09 :: rgb(255,254,254)
+ 0x7E20, // 10 :: rgb(251,139,2)
+ 0x7E20, // 11 :: rgb(251,139,1)
+ 0xFFFF, // 12 :: rgb(255,253,253)
+ 0xFE20, // 13 :: rgb(251,140,4)
+ 0xFFFF, // 14 :: rgb(255,254,253)
+ 0xFECC, // 15 :: rgb(252,182,97)
+ 0x7A90, // 16 :: rgb(249,163,128)
+ 0x7FDC, // 17 :: rgb(254,244,231)
+ 0xF985, // 18 :: rgb(245,100,40)
+ 0x7F9A, // 19 :: rgb(253,225,213)
+ 0x7FDD, // 20 :: rgb(253,242,242)
+ 0x6D6B, // 21 :: rgb(226,90,90)
+ 0xFFBC, // 22 :: rgb(254,239,233)
+ 0xF921, // 23 :: rgb(244,77,7)
+ 0x7EED, // 24 :: rgb(252,187,107)
+ 0xFF99, // 25 :: rgb(254,231,203)
+ 0xFFFE, // 26 :: rgb(255,253,250)
+ 0xFF16, // 27 :: rgb(251,199,177)
+ 0xF921, // 28 :: rgb(244,78,8)
+ 0x7F31, // 29 :: rgb(253,204,143)
+ 0x7FDD, // 30 :: rgb(252,241,241)
+ 0xF18C, // 31 :: rgb(229,102,102)
+ 0x7B5A, // 32 :: rgb(247,212,212)
+ 0xFF76, // 33 :: rgb(253,221,181)
+ 0xF652, // 34 :: rgb(237,151,151)
+ 0x7652, // 35 :: rgb(236,145,145)
+ 0xE800, // 36 :: rgb(212,3,3)
+ 0x718C, // 37 :: rgb(228,98,98)
+ 0xFF54, // 38 :: rgb(253,214,165)
+ 0x7673, // 39 :: rgb(237,153,153)
+ 0xFF32, // 40 :: rgb(252,205,148)
+ 0x7EA8, // 41 :: rgb(251,169,68)
+ 0x6CC6, // 42 :: rgb(219,48,48)
+ 0x7FBA, // 43 :: rgb(254,234,211)
+ 0xE842, // 44 :: rgb(215,20,20)
+ 0xFB7B, // 45 :: rgb(250,224,224)
+ 0xFF77, // 46 :: rgb(253,224,187)
+ 0xF652, // 47 :: rgb(237,149,149)
+ 0x7F75, // 48 :: rgb(253,218,175)
+ 0x7FFE, // 49 :: rgb(254,249,249)
+ 0x7EEC, // 50 :: rgb(252,185,102)
+ 0x7FBD, // 51 :: rgb(252,236,236)
+ 0xFFFF, // 52 :: rgb(255,253,251)
+ 0x7EED, // 53 :: rgb(252,188,109)
+ 0x7FFF, // 54 :: rgb(254,252,252)
+ 0xFAF7, // 55 :: rgb(243,189,189)
+ 0x7B9B, // 56 :: rgb(250,225,225)
+ 0xFE87, // 57 :: rgb(251,164,56)
+ 0x7AD2, // 58 :: rgb(250,179,149)
+ 0xED09, // 59 :: rgb(224,70,70)
+ 0xECA5, // 60 :: rgb(218,43,43)
+ 0xFAF4, // 61 :: rgb(250,190,165)
+ 0x6D29, // 62 :: rgb(224,74,74)
+ 0x6D4A, // 63 :: rgb(225,82,82)
+ 0xED08, // 64 :: rgb(223,69,69)
+ 0x6D08, // 65 :: rgb(222,63,63)
+ 0x76D6, // 66 :: rgb(242,178,178)
+ 0xECC6, // 67 :: rgb(220,51,51)
+ 0xF1AD, // 68 :: rgb(229,109,109)
+ 0xFFDD, // 69 :: rgb(254,246,235)
+ 0x718C, // 70 :: rgb(228,97,97)
+ 0xFFBC, // 71 :: rgb(254,239,234)
+ 0xFF77, // 72 :: rgb(253,223,187)
+ 0x76D6, // 73 :: rgb(242,179,179)
+ 0x6863, // 74 :: rgb(216,26,26)
+ 0x7AB1, // 75 :: rgb(249,169,136)
+ 0xE843, // 76 :: rgb(215,21,21)
+ 0xFF9C, // 77 :: rgb(251,230,230)
+ 0xF9A6, // 78 :: rgb(245,108,51)
+ 0x7F97, // 79 :: rgb(253,225,189)
+ 0x7942, // 80 :: rgb(244,81,13)
+ 0x7FBA, // 81 :: rgb(254,236,215)
+ 0xFE21, // 82 :: rgb(251,143,11)
+ 0x7FBC, // 83 :: rgb(251,234,234)
+ 0xFB18, // 84 :: rgb(245,197,197)
+ 0x76D6, // 85 :: rgb(242,177,177)
+ 0x71AD, // 86 :: rgb(229,106,106)
+ 0xFAB2, // 87 :: rgb(249,176,144)
+ 0x7F9A, // 88 :: rgb(253,227,217)
+ 0x7FDD, // 89 :: rgb(254,242,237)
+ 0x7FDE, // 90 :: rgb(253,243,243)
+ 0x7AB1, // 91 :: rgb(249,171,139)
+ 0xFFBB, // 92 :: rgb(254,239,221)
+ 0xF694, // 93 :: rgb(240,167,167)
+ 0xFE87, // 94 :: rgb(251,167,61)
+ 0xFF7A, // 95 :: rgb(253,224,213)
+ 0x7F0E, // 96 :: rgb(253,193,117)
+ 0xFA6F, // 97 :: rgb(249,159,121)
+ 0x7FFE, // 98 :: rgb(255,251,247)
+ 0xFEAA, // 99 :: rgb(251,175,80)
+ 0x7694, // 100 :: rgb(239,161,161)
+ 0x7AF3, // 101 :: rgb(250,186,160)
+ 0xE801, // 102 :: rgb(213,5,5)
+ 0xFA6F, // 103 :: rgb(249,159,122)
+ 0x7FDB, // 104 :: rgb(254,241,224)
+ 0xF920, // 105 :: rgb(244,75,4)
+ 0x7A8F, // 106 :: rgb(249,160,123)
+ 0x7694, // 107 :: rgb(239,163,163)
+ 0x7B7B, // 108 :: rgb(249,220,220)
+ 0xE822, // 109 :: rgb(214,14,14)
+ 0x6D29, // 110 :: rgb(223,71,71)
+ 0xFAF7, // 111 :: rgb(244,192,192)
+ 0xFF55, // 112 :: rgb(253,215,169)
+ 0x7A8F, // 113 :: rgb(249,161,124)
+ 0xFF32, // 114 :: rgb(253,207,151)
+ 0x7FBB, // 115 :: rgb(253,233,224)
+ 0xF694, // 116 :: rgb(239,165,165)
+ 0xFFBC, // 117 :: rgb(254,238,231)
+ 0xFB39, // 118 :: rgb(247,208,208)
+ 0x7B38, // 119 :: rgb(246,201,201)
+ 0x6842, // 120 :: rgb(214,16,16)
+ 0x7FFF, // 121 :: rgb(254,251,251)
+ 0xFB7B, // 122 :: rgb(250,223,223)
+ 0xF16C, // 123 :: rgb(227,95,95)
+ 0x7672, // 124 :: rgb(237,152,152)
+ 0x7631, // 125 :: rgb(235,138,138)
+ 0xFE87, // 126 :: rgb(251,165,60)
+ 0xFFDD, // 127 :: rgb(254,245,240)
+ 0xFF33, // 128 :: rgb(252,208,154)
+ 0x7F79, // 129 :: rgb(252,220,207)
+ 0x7E41, // 130 :: rgb(251,144,12)
+ 0x7E42, // 131 :: rgb(251,146,19)
+ 0x7F36, // 132 :: rgb(251,202,182)
+ 0x7FDC, // 133 :: rgb(254,243,230)
+ 0x7963, // 134 :: rgb(244,89,24)
+ 0x7F0E, // 135 :: rgb(252,193,119)
+ 0xFE87, // 136 :: rgb(251,164,57)
+ 0x7A2B, // 137 :: rgb(247,138,92)
+ 0xFA6E, // 138 :: rgb(249,157,119)
+ 0xFF9B, // 139 :: rgb(253,229,219)
+ 0x7920, // 140 :: rgb(244,74,3)
+ 0xFFDE, // 141 :: rgb(254,246,243)
+ 0xF964, // 142 :: rgb(245,95,32)
+ 0xF921, // 143 :: rgb(244,76,6)
+ 0xFAD3, // 144 :: rgb(250,183,155)
+ 0xFFBA, // 145 :: rgb(254,237,216)
+ 0xFAD3, // 146 :: rgb(250,182,154)
+ 0xF985, // 147 :: rgb(245,103,44)
+ 0x7FFE, // 148 :: rgb(255,252,250)
+ 0x7FFE, // 149 :: rgb(255,251,250)
+ 0x6800, // 150 :: rgb(212,1,1)
+ 0x7B18, // 151 :: rgb(245,195,195)
+ 0x7AD2, // 152 :: rgb(250,178,148)
+ 0x7ECB, // 153 :: rgb(251,179,87)
+ 0x7EA8, // 154 :: rgb(251,169,69)
+ 0xFEAA, // 155 :: rgb(251,176,82)
+ 0x7652, // 156 :: rgb(236,146,146)
+ 0xF942, // 157 :: rgb(244,83,16)
+ 0xF9E9, // 158 :: rgb(246,126,76)
+ 0xFFDD, // 159 :: rgb(254,246,242)
+ 0x71EF, // 160 :: rgb(231,120,120)
+ 0xFB39, // 161 :: rgb(247,206,206)
+ 0xFF37, // 162 :: rgb(252,208,190)
+ 0x6D08, // 163 :: rgb(222,65,65)
+ 0x7FDE, // 164 :: rgb(253,244,244)
+ 0x7A4D, // 165 :: rgb(248,147,106)
+ 0xFB5A, // 166 :: rgb(248,216,216)
+ 0x7F79, // 167 :: rgb(253,220,206)
+ 0xFAD3, // 168 :: rgb(250,181,153)
+ 0x7F15, // 169 :: rgb(251,196,173)
+ 0x7F31, // 170 :: rgb(252,201,137)
+ 0xF9C8, // 171 :: rgb(246,116,62)
+ 0xFAB2, // 172 :: rgb(250,176,145)
+ 0xFF10, // 173 :: rgb(252,198,131)
+ 0x7A6E, // 174 :: rgb(248,155,117)
+ 0xFF9B, // 175 :: rgb(253,232,224)
+ 0xFFBB, // 176 :: rgb(254,240,221)
+ 0x7920, // 177 :: rgb(244,74,2)
+ 0x7FDC, // 178 :: rgb(254,243,229)
+ 0xFE21, // 179 :: rgb(251,141,6)
+ 0x7F53, // 180 :: rgb(253,210,155)
+ 0xF9E9, // 181 :: rgb(247,127,77)
+ 0xFF58, // 182 :: rgb(252,213,197)
+ 0xFE87, // 183 :: rgb(251,164,58)
+ 0xFF54, // 184 :: rgb(253,213,164)
+ 0xFEA9, // 185 :: rgb(251,174,78)
+ 0xFE21, // 186 :: rgb(251,143,10)
+ 0x79E8, // 187 :: rgb(246,120,67)
+ 0x7E87, // 188 :: rgb(251,163,54)
+ 0xFFDD, // 189 :: rgb(254,248,240)
+ 0x7F57, // 190 :: rgb(252,210,193)
+ 0xFF76, // 191 :: rgb(253,222,183)
+ 0xC3E0, // 192 :: rgb(128,255,0)
+ 0x0210, // 193 :: rgb(0,128,128)
+ 0x7E00, // 194 :: rgb(255,128,0)
+ 0x4030, // 195 :: rgb(128,8,128)
+ 0x6800, // 196 :: rgb(212,0,0)
}; \ No newline at end of file
diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h
index 96abca5..d444966 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h
@@ -1,17 +1,17 @@
-// convpng
-// this file contains all the graphics sources for easy inclusion in a project
-#ifndef __logo_gfx__
-#define __logo_gfx__
-#include <stdint.h>
-
-#define logo_gfx_transparent_color_index 0
-
-#define ubuntu_width 31
-#define ubuntu_height 30
-#define ubuntu_size 545
-extern uint8_t ubuntu_data[545];
-#define ubuntu ((gfx_rletsprite_t*)ubuntu_data)
-#define sizeof_logo_gfx_pal 394
-extern uint16_t logo_gfx_pal[197];
-
-#endif
+// convpng
+// this file contains all the graphics sources for easy inclusion in a project
+#ifndef __logo_gfx__
+#define __logo_gfx__
+#include <stdint.h>
+
+#define logo_gfx_transparent_color_index 0
+
+#define ubuntu_width 31
+#define ubuntu_height 30
+#define ubuntu_size 545
+extern uint8_t ubuntu_data[545];
+#define ubuntu ((gfx_rletsprite_t*)ubuntu_data)
+#define sizeof_logo_gfx_pal 394
+extern uint16_t logo_gfx_pal[197];
+
+#endif
diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c
index eed6d7a..18514e9 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c
@@ -1,25 +1,25 @@
-// convpng
-#include <stdint.h>
-#include "logo_gfx.h"
-
-// 8 bpp image
-uint8_t ubuntu_data[545] = {
- 31,30, // width,height
- 0x00,0x04,0xC0,0x04,0x04,0x04,0x17,0x04,0x04,0x04,0x04,0xC2,0x00,0x01,0x05,0x14,0x04,0x0C,0x42,0x23,0x6C,0x05,0x01,0x01,0x00,0x01,0x05,0x13,0x06,0x09,0x15,0xC4,
- 0xC4,0x03,0x6F,0x04,0x01,0x01,0x00,0x01,0x05,0x0C,0x0D,0x09,0x58,0x3D,0x4B,0x10,0x90,0x16,0xA6,0xC4,0xC4,0xC4,0xC4,0x3E,0x04,0x01,0x01,0x0C,0x0E,0x84,0x12,0x08,
- 0x08,0x08,0x08,0x08,0xA9,0xA1,0xC4,0xC4,0xC4,0xC4,0x40,0x05,0x0A,0x01,0x85,0x01,0x0E,0x8B,0x17,0x08,0x08,0x08,0x08,0x08,0xA5,0x09,0xA3,0xC4,0xC4,0x96,0x55,0x05,
- 0x09,0x03,0x80,0x83,0x11,0x01,0x0C,0x8A,0x08,0x08,0x08,0x08,0x08,0x17,0xA7,0xA4,0x9C,0xA0,0x97,0x06,0x08,0x04,0x70,0x0B,0x07,0x0F,0x01,0x0E,0x7F,0x86,0x69,0x8E,
- 0x93,0x1C,0x08,0x9D,0xA8,0x9F,0x95,0x13,0x5B,0x09,0x04,0x07,0x06,0x5C,0x52,0x07,0x07,0x0A,0x19,0x01,0x02,0x5F,0x59,0x02,0x09,0x94,0xA2,0x9E,0x08,0x08,0x8F,0x08,
- 0x08,0x3A,0x04,0x07,0x06,0x9B,0x07,0x07,0x07,0x07,0x87,0x07,0x08,0x09,0x92,0x8C,0x08,0x08,0x08,0x50,0x47,0x03,0x06,0x07,0xB0,0x0B,0x07,0x07,0x07,0x7E,0x1A,0x09,
- 0x06,0x57,0x08,0x08,0x08,0x08,0x10,0x03,0x06,0x06,0xB8,0x07,0x07,0x07,0x0A,0x51,0x0A,0x07,0x09,0x4E,0x08,0x08,0x08,0x12,0x09,0x02,0x02,0x04,0x8D,0xAC,0xAE,0xBE,
- 0x01,0x04,0x18,0x07,0x07,0x9A,0x0C,0x06,0x65,0x08,0x08,0x08,0x08,0x16,0x02,0x01,0x0A,0x0E,0xAB,0x08,0x08,0xB1,0x1B,0xBD,0xBA,0x07,0xAD,0x0C,0x06,0x75,0x71,0x6A,
- 0x67,0x61,0x73,0x02,0x01,0x06,0x81,0x08,0x08,0x08,0x08,0xBB,0x01,0x03,0xB7,0x07,0xB4,0x14,0x01,0x06,0x13,0x08,0x08,0x08,0x08,0xB5,0x01,0x03,0xBC,0x07,0xAA,0x0C,
- 0x06,0x5A,0x64,0x6B,0x74,0x5D,0x53,0x02,0x01,0x0A,0x09,0x89,0x08,0x08,0x1C,0xB6,0xB2,0xB3,0x07,0x99,0x0C,0x06,0x49,0xC4,0xC4,0xC4,0xC4,0x4D,0x02,0x02,0x0A,0x0E,
- 0x1B,0x98,0xAF,0x1A,0xB9,0x07,0x07,0x82,0x45,0x0B,0x06,0x3F,0xC4,0xC4,0xC4,0x4A,0x0C,0x02,0x06,0x06,0x19,0x07,0x07,0x07,0x07,0x32,0x0A,0x06,0x37,0x02,0xC4,0xC4,
- 0xC4,0x44,0x03,0x06,0x07,0x09,0x88,0x07,0x07,0x07,0x07,0x28,0x08,0x07,0x76,0x4C,0xC4,0xC4,0xC4,0x24,0x20,0x03,0x07,0x06,0x48,0x07,0x07,0x07,0x07,0x30,0x01,0x02,
- 0x31,0x09,0x03,0x08,0x14,0x7D,0x03,0xC4,0xC4,0xC4,0xC4,0x1F,0x04,0x08,0x13,0x35,0x07,0x07,0x29,0x09,0x36,0x2A,0x43,0x46,0x56,0x6E,0x6D,0xC4,0xC4,0x02,0x03,0xC4,
- 0x3C,0x1E,0x04,0x08,0x04,0x34,0x0F,0x0D,0x2B,0x01,0x0D,0x2F,0xC4,0xC4,0xC4,0xC4,0xC4,0xC4,0x78,0x7C,0x14,0x79,0x7A,0x38,0x05,0x0A,0x01,0x2E,0x01,0x0D,0x33,0x2C,
- 0xC4,0xC4,0xC4,0xC4,0xC4,0x66,0x77,0x62,0x72,0x60,0x4F,0x06,0x0C,0x0E,0x27,0x02,0xC4,0xC4,0xC4,0xC4,0xC4,0x7B,0x09,0x63,0x07,0x07,0x0B,0x26,0x05,0x0D,0x0D,0x2D,
- 0x22,0x25,0x3B,0x41,0x15,0x54,0x68,0x07,0x07,0x07,0x07,0x39,0x05,0x00,0x01,0x05,0x13,0x06,0x11,0x0A,0x07,0x07,0x07,0x5E,0x04,0x01,0x01,0x00,0x01,0x05,0x14,0x05,
- 0x18,0x07,0x07,0x0D,0xBF,0x04,0x01,0x01,0x00,0x01,0x05,0x15,0x03,0x21,0x1D,0x91,0x05,0x01,0x01,0x00,0x04,0xC1,0x06,0x06,0x06,0x17,0x04,0x06,0x06,0x06,0xC3,
-};
+// convpng
+#include <stdint.h>
+#include "logo_gfx.h"
+
+// 8 bpp image
+uint8_t ubuntu_data[545] = {
+ 31,30, // width,height
+ 0x00,0x04,0xC0,0x04,0x04,0x04,0x17,0x04,0x04,0x04,0x04,0xC2,0x00,0x01,0x05,0x14,0x04,0x0C,0x42,0x23,0x6C,0x05,0x01,0x01,0x00,0x01,0x05,0x13,0x06,0x09,0x15,0xC4,
+ 0xC4,0x03,0x6F,0x04,0x01,0x01,0x00,0x01,0x05,0x0C,0x0D,0x09,0x58,0x3D,0x4B,0x10,0x90,0x16,0xA6,0xC4,0xC4,0xC4,0xC4,0x3E,0x04,0x01,0x01,0x0C,0x0E,0x84,0x12,0x08,
+ 0x08,0x08,0x08,0x08,0xA9,0xA1,0xC4,0xC4,0xC4,0xC4,0x40,0x05,0x0A,0x01,0x85,0x01,0x0E,0x8B,0x17,0x08,0x08,0x08,0x08,0x08,0xA5,0x09,0xA3,0xC4,0xC4,0x96,0x55,0x05,
+ 0x09,0x03,0x80,0x83,0x11,0x01,0x0C,0x8A,0x08,0x08,0x08,0x08,0x08,0x17,0xA7,0xA4,0x9C,0xA0,0x97,0x06,0x08,0x04,0x70,0x0B,0x07,0x0F,0x01,0x0E,0x7F,0x86,0x69,0x8E,
+ 0x93,0x1C,0x08,0x9D,0xA8,0x9F,0x95,0x13,0x5B,0x09,0x04,0x07,0x06,0x5C,0x52,0x07,0x07,0x0A,0x19,0x01,0x02,0x5F,0x59,0x02,0x09,0x94,0xA2,0x9E,0x08,0x08,0x8F,0x08,
+ 0x08,0x3A,0x04,0x07,0x06,0x9B,0x07,0x07,0x07,0x07,0x87,0x07,0x08,0x09,0x92,0x8C,0x08,0x08,0x08,0x50,0x47,0x03,0x06,0x07,0xB0,0x0B,0x07,0x07,0x07,0x7E,0x1A,0x09,
+ 0x06,0x57,0x08,0x08,0x08,0x08,0x10,0x03,0x06,0x06,0xB8,0x07,0x07,0x07,0x0A,0x51,0x0A,0x07,0x09,0x4E,0x08,0x08,0x08,0x12,0x09,0x02,0x02,0x04,0x8D,0xAC,0xAE,0xBE,
+ 0x01,0x04,0x18,0x07,0x07,0x9A,0x0C,0x06,0x65,0x08,0x08,0x08,0x08,0x16,0x02,0x01,0x0A,0x0E,0xAB,0x08,0x08,0xB1,0x1B,0xBD,0xBA,0x07,0xAD,0x0C,0x06,0x75,0x71,0x6A,
+ 0x67,0x61,0x73,0x02,0x01,0x06,0x81,0x08,0x08,0x08,0x08,0xBB,0x01,0x03,0xB7,0x07,0xB4,0x14,0x01,0x06,0x13,0x08,0x08,0x08,0x08,0xB5,0x01,0x03,0xBC,0x07,0xAA,0x0C,
+ 0x06,0x5A,0x64,0x6B,0x74,0x5D,0x53,0x02,0x01,0x0A,0x09,0x89,0x08,0x08,0x1C,0xB6,0xB2,0xB3,0x07,0x99,0x0C,0x06,0x49,0xC4,0xC4,0xC4,0xC4,0x4D,0x02,0x02,0x0A,0x0E,
+ 0x1B,0x98,0xAF,0x1A,0xB9,0x07,0x07,0x82,0x45,0x0B,0x06,0x3F,0xC4,0xC4,0xC4,0x4A,0x0C,0x02,0x06,0x06,0x19,0x07,0x07,0x07,0x07,0x32,0x0A,0x06,0x37,0x02,0xC4,0xC4,
+ 0xC4,0x44,0x03,0x06,0x07,0x09,0x88,0x07,0x07,0x07,0x07,0x28,0x08,0x07,0x76,0x4C,0xC4,0xC4,0xC4,0x24,0x20,0x03,0x07,0x06,0x48,0x07,0x07,0x07,0x07,0x30,0x01,0x02,
+ 0x31,0x09,0x03,0x08,0x14,0x7D,0x03,0xC4,0xC4,0xC4,0xC4,0x1F,0x04,0x08,0x13,0x35,0x07,0x07,0x29,0x09,0x36,0x2A,0x43,0x46,0x56,0x6E,0x6D,0xC4,0xC4,0x02,0x03,0xC4,
+ 0x3C,0x1E,0x04,0x08,0x04,0x34,0x0F,0x0D,0x2B,0x01,0x0D,0x2F,0xC4,0xC4,0xC4,0xC4,0xC4,0xC4,0x78,0x7C,0x14,0x79,0x7A,0x38,0x05,0x0A,0x01,0x2E,0x01,0x0D,0x33,0x2C,
+ 0xC4,0xC4,0xC4,0xC4,0xC4,0x66,0x77,0x62,0x72,0x60,0x4F,0x06,0x0C,0x0E,0x27,0x02,0xC4,0xC4,0xC4,0xC4,0xC4,0x7B,0x09,0x63,0x07,0x07,0x0B,0x26,0x05,0x0D,0x0D,0x2D,
+ 0x22,0x25,0x3B,0x41,0x15,0x54,0x68,0x07,0x07,0x07,0x07,0x39,0x05,0x00,0x01,0x05,0x13,0x06,0x11,0x0A,0x07,0x07,0x07,0x5E,0x04,0x01,0x01,0x00,0x01,0x05,0x14,0x05,
+ 0x18,0x07,0x07,0x0D,0xBF,0x04,0x01,0x01,0x00,0x01,0x05,0x15,0x03,0x21,0x1D,0x91,0x05,0x01,0x01,0x00,0x04,0xC1,0x06,0x06,0x06,0x17,0x04,0x06,0x06,0x06,0xC3,
+};
diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c
index 8d4e485..696088c 100644
--- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c
+++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c
@@ -1,109 +1,109 @@
-#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 <limits.h>
-
-#include <graphx.h>
-
-/* Include the sprite data */
-#include "gfx/logo_gfx.h"
-
-#define w ubuntu_width
-#define h ubuntu_height
-
-#define xmin ((gfx_lcdWidth-w*6)/2)
-#define ymin ((gfx_lcdHeight-h*6)/2)
-#define xmax (xmin+w*6)
-#define ymax (ymin+h*6)
-
-#define xmin2 (xmin+w*7/2+4)
-#define ymin2 (ymin+h*2+4)
-#define xmax2 (xmin2+w-8)
-#define ymax2 (ymin2+h-8)
-
-/* For testing conversions */
-gfx_UninitedSprite(ubuntu_normal, w, h);
-gfx_UninitedRLETSprite(ubuntu_uninited, (w + 1) * h);
-
-void main(void) {
- /* For testing conversions */
- gfx_rletsprite_t *ubuntu_malloc;
-
- /* Initialize the 8bpp graphics */
- gfx_Begin();
-
- /* Set up the palette for our sprites */
- gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0);
- gfx_palette[255] = gfx_RGBTo1555(192, 192, 192);
-
- /* Set a centered 192*192 clip region, bordered by gray and filled with color index 0 */
- gfx_FillScreen(255);
- gfx_SetColor(0);
- gfx_FillRectangle_NoClip(xmin, ymin, xmax - xmin, ymax - ymin);
- gfx_SetClipRegion(xmin, ymin, xmax, ymax);
-
- /* Test no clipping */
- gfx_RLETSprite_NoClip(ubuntu, xmin + w * 3 / 2, ymin + h * 2);
- gfx_RLETSprite(ubuntu, xmin + w * 5 / 2, ymin + h * 2);
-
- /* Test top clipping */
- gfx_RLETSprite(ubuntu, xmin + w, ymin);
- gfx_RLETSprite(ubuntu, xmin + w * 2, ymin - h + 1);
- gfx_RLETSprite(ubuntu, xmin + w * 3, ymin - h);
- gfx_RLETSprite(ubuntu, xmin + w * 4, INT_MIN);
-
- /* Test bottom clipping */
- gfx_RLETSprite(ubuntu, xmin + w * 4, ymax - h);
- gfx_RLETSprite(ubuntu, xmin + w * 3, ymax - 1);
- gfx_RLETSprite(ubuntu, xmin + w * 2, ymax);
- gfx_RLETSprite(ubuntu, xmin + w, INT_MAX);
-
- /* Test right clipping */
- gfx_RLETSprite(ubuntu, xmax - w, ymin + h);
- gfx_RLETSprite(ubuntu, xmax - 1, ymin + h * 2);
- gfx_RLETSprite(ubuntu, xmax, ymin + h * 3);
- gfx_RLETSprite(ubuntu, INT_MAX, ymin + h * 4);
-
- /* Test left clipping */
- gfx_RLETSprite(ubuntu, xmin, ymin + h * 4);
- gfx_RLETSprite(ubuntu, xmin - w + 1, ymin + h * 3);
- gfx_RLETSprite(ubuntu, xmin - w, ymin + h * 2);
- gfx_RLETSprite(ubuntu, INT_MIN, ymin + h);
-
- /* Test corner clipping */
- gfx_RLETSprite(ubuntu, xmin - w + 1, ymin - h + 1);
- gfx_RLETSprite(ubuntu, xmax - 1, ymin - h + 1);
- gfx_RLETSprite(ubuntu, xmax - 1, ymax - 1);
- gfx_RLETSprite(ubuntu, xmin - w + 1, ymax - 1);
-
- /* Set a centered 16*16 clip region, bordered by gray and filled with color index 0 */
- gfx_SetColor(255);
- gfx_FillRectangle_NoClip(xmin2 - 4, ymin2 - 4, xmax2 - xmin2 + 8, ymax2 - ymin2 + 8);
- gfx_SetColor(0);
- gfx_FillRectangle_NoClip(xmin2, ymin2, xmax2 - xmin2, ymax2 - ymin2);
- gfx_SetClipRegion(xmin2, ymin2, xmax2, ymax2);
-
- /* Test all-around clipping */
- gfx_RLETSprite(ubuntu, xmin2 - 4, ymin2 - 4);
-
- /* Test conversions */
- gfx_SetTransparentColor(0);
- gfx_ConvertFromRLETSprite(ubuntu, ubuntu_normal);
- gfx_TransparentSprite_NoClip(ubuntu_normal, xmin + w * 3 / 2, ymin + h * 3);
- gfx_ConvertToRLETSprite(ubuntu_normal, ubuntu_uninited);
- gfx_RLETSprite_NoClip(ubuntu_uninited, xmin + w * 5 / 2, ymin + h * 3);
- ubuntu_malloc = gfx_ConvertMallocRLETSprite(ubuntu_normal); // Same as gfx_ConvertToNewRLETSprite(ubuntu_normal, malloc)
- gfx_RLETSprite_NoClip(ubuntu_malloc, xmin + w * 7 / 2, ymin + h * 3);
-
- /* Wait for a key to be pressed */
- 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 <limits.h>
+
+#include <graphx.h>
+
+/* Include the sprite data */
+#include "gfx/logo_gfx.h"
+
+#define w ubuntu_width
+#define h ubuntu_height
+
+#define xmin ((gfx_lcdWidth-w*6)/2)
+#define ymin ((gfx_lcdHeight-h*6)/2)
+#define xmax (xmin+w*6)
+#define ymax (ymin+h*6)
+
+#define xmin2 (xmin+w*7/2+4)
+#define ymin2 (ymin+h*2+4)
+#define xmax2 (xmin2+w-8)
+#define ymax2 (ymin2+h-8)
+
+/* For testing conversions */
+gfx_UninitedSprite(ubuntu_normal, w, h);
+gfx_UninitedRLETSprite(ubuntu_uninited, (w + 1) * h);
+
+void main(void) {
+ /* For testing conversions */
+ gfx_rletsprite_t *ubuntu_malloc;
+
+ /* Initialize the 8bpp graphics */
+ gfx_Begin();
+
+ /* Set up the palette for our sprites */
+ gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0);
+ gfx_palette[255] = gfx_RGBTo1555(192, 192, 192);
+
+ /* Set a centered 192*192 clip region, bordered by gray and filled with color index 0 */
+ gfx_FillScreen(255);
+ gfx_SetColor(0);
+ gfx_FillRectangle_NoClip(xmin, ymin, xmax - xmin, ymax - ymin);
+ gfx_SetClipRegion(xmin, ymin, xmax, ymax);
+
+ /* Test no clipping */
+ gfx_RLETSprite_NoClip(ubuntu, xmin + w * 3 / 2, ymin + h * 2);
+ gfx_RLETSprite(ubuntu, xmin + w * 5 / 2, ymin + h * 2);
+
+ /* Test top clipping */
+ gfx_RLETSprite(ubuntu, xmin + w, ymin);
+ gfx_RLETSprite(ubuntu, xmin + w * 2, ymin - h + 1);
+ gfx_RLETSprite(ubuntu, xmin + w * 3, ymin - h);
+ gfx_RLETSprite(ubuntu, xmin + w * 4, INT_MIN);
+
+ /* Test bottom clipping */
+ gfx_RLETSprite(ubuntu, xmin + w * 4, ymax - h);
+ gfx_RLETSprite(ubuntu, xmin + w * 3, ymax - 1);
+ gfx_RLETSprite(ubuntu, xmin + w * 2, ymax);
+ gfx_RLETSprite(ubuntu, xmin + w, INT_MAX);
+
+ /* Test right clipping */
+ gfx_RLETSprite(ubuntu, xmax - w, ymin + h);
+ gfx_RLETSprite(ubuntu, xmax - 1, ymin + h * 2);
+ gfx_RLETSprite(ubuntu, xmax, ymin + h * 3);
+ gfx_RLETSprite(ubuntu, INT_MAX, ymin + h * 4);
+
+ /* Test left clipping */
+ gfx_RLETSprite(ubuntu, xmin, ymin + h * 4);
+ gfx_RLETSprite(ubuntu, xmin - w + 1, ymin + h * 3);
+ gfx_RLETSprite(ubuntu, xmin - w, ymin + h * 2);
+ gfx_RLETSprite(ubuntu, INT_MIN, ymin + h);
+
+ /* Test corner clipping */
+ gfx_RLETSprite(ubuntu, xmin - w + 1, ymin - h + 1);
+ gfx_RLETSprite(ubuntu, xmax - 1, ymin - h + 1);
+ gfx_RLETSprite(ubuntu, xmax - 1, ymax - 1);
+ gfx_RLETSprite(ubuntu, xmin - w + 1, ymax - 1);
+
+ /* Set a centered 16*16 clip region, bordered by gray and filled with color index 0 */
+ gfx_SetColor(255);
+ gfx_FillRectangle_NoClip(xmin2 - 4, ymin2 - 4, xmax2 - xmin2 + 8, ymax2 - ymin2 + 8);
+ gfx_SetColor(0);
+ gfx_FillRectangle_NoClip(xmin2, ymin2, xmax2 - xmin2, ymax2 - ymin2);
+ gfx_SetClipRegion(xmin2, ymin2, xmax2, ymax2);
+
+ /* Test all-around clipping */
+ gfx_RLETSprite(ubuntu, xmin2 - 4, ymin2 - 4);
+
+ /* Test conversions */
+ gfx_SetTransparentColor(0);
+ gfx_ConvertFromRLETSprite(ubuntu, ubuntu_normal);
+ gfx_TransparentSprite_NoClip(ubuntu_normal, xmin + w * 3 / 2, ymin + h * 3);
+ gfx_ConvertToRLETSprite(ubuntu_normal, ubuntu_uninited);
+ gfx_RLETSprite_NoClip(ubuntu_uninited, xmin + w * 5 / 2, ymin + h * 3);
+ ubuntu_malloc = gfx_ConvertMallocRLETSprite(ubuntu_normal); // Same as gfx_ConvertToNewRLETSprite(ubuntu_normal, malloc)
+ gfx_RLETSprite_NoClip(ubuntu_malloc, xmin + w * 7 / 2, ymin + h * 3);
+
+ /* Wait for a key to be pressed */
+ while (!os_GetCSC());
+
+ /* Close the graphics */
+ gfx_End();
+}