summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/calculator/CEdev/examples/gfx_sprites_appvar/src')
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c8
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h16
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini32
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c8
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c8
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c54
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h36
-rw-r--r--frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c84
8 files changed, 123 insertions, 123 deletions
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c
index 9f77108..d1b789d 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c
@@ -1,4 +1,4 @@
-// convpng
-#include <stdint.h>
-#include "all_gfx.h"
-
+// convpng
+#include <stdint.h>
+#include "all_gfx.h"
+
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h
index 37f0480..9a60010 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h
@@ -1,8 +1,8 @@
-// convpng
-// this file contains all the graphics sources for easy inclusion in a project
-#ifndef __all_gfx__
-#define __all_gfx__
-#include <stdint.h>
-
-
-#endif
+// convpng
+// this file contains all the graphics sources for easy inclusion in a project
+#ifndef __all_gfx__
+#define __all_gfx__
+#include <stdint.h>
+
+
+#endif
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini
index 8dc89f4..34a3c4a 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini
@@ -1,16 +1,16 @@
-// #AppvarC -- The name of the appvar we are making
-// #IncludePalettes -- List of comma separated groups with palettes
-
-#AppvarC : var_gfx
-#IncludePalettes : all_gfx
-#PNGImages :
- ubuntu
- mint
-
-// The main conversion group
-
-#GroupC : all_gfx
-#PNGImages :
- ubuntu
- mint
-
+// #AppvarC -- The name of the appvar we are making
+// #IncludePalettes -- List of comma separated groups with palettes
+
+#AppvarC : var_gfx
+#IncludePalettes : all_gfx
+#PNGImages :
+ ubuntu
+ mint
+
+// The main conversion group
+
+#GroupC : all_gfx
+#PNGImages :
+ ubuntu
+ mint
+
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c
index 9f77108..d1b789d 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c
@@ -1,4 +1,4 @@
-// convpng
-#include <stdint.h>
-#include "all_gfx.h"
-
+// convpng
+#include <stdint.h>
+#include "all_gfx.h"
+
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c
index 9f77108..d1b789d 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c
@@ -1,4 +1,4 @@
-// convpng
-#include <stdint.h>
-#include "all_gfx.h"
-
+// convpng
+#include <stdint.h>
+#include "all_gfx.h"
+
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c
index b0d3117..c3641ca 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c
@@ -1,27 +1,27 @@
-// convpng
-#include <stdint.h>
-#include "var_gfx.h"
-
-#include <fileioc.h>
-uint8_t *var_gfx[3] = {
- (uint8_t*)0,
- (uint8_t*)1026,
- (uint8_t*)2052,
-};
-
-bool var_gfx_init(void) {
- unsigned int data, i;
- ti_var_t appvar;
-
- ti_CloseAll();
-
- appvar = ti_Open("var_gfx", "r");
- data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0];
- for (i = 0; i < var_gfx_num; i++) {
- var_gfx[i] += data;
- }
-
- ti_CloseAll();
-
- return (bool)appvar;
-}
+// convpng
+#include <stdint.h>
+#include "var_gfx.h"
+
+#include <fileioc.h>
+uint8_t *var_gfx[3] = {
+ (uint8_t*)0,
+ (uint8_t*)1026,
+ (uint8_t*)2052,
+};
+
+bool var_gfx_init(void) {
+ unsigned int data, i;
+ ti_var_t appvar;
+
+ ti_CloseAll();
+
+ appvar = ti_Open("var_gfx", "r");
+ data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0];
+ for (i = 0; i < var_gfx_num; i++) {
+ var_gfx[i] += data;
+ }
+
+ ti_CloseAll();
+
+ return (bool)appvar;
+}
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h
index 49afcb0..919da4b 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h
@@ -1,18 +1,18 @@
-// convpng
-// this file contains all the graphics sources for easy inclusion in a project
-#ifndef __var_gfx__
-#define __var_gfx__
-#include <stdint.h>
-
-#include <stdbool.h>
-
-#define var_gfx_num 3
-
-extern uint8_t *var_gfx[3];
-#define ubuntu ((gfx_sprite_t*)var_gfx[0])
-#define mint ((gfx_sprite_t*)var_gfx[1])
-#define sizeof_all_gfx_pal 512
-#define all_gfx_pal ((uint16_t*)var_gfx[2])
-bool var_gfx_init(void);
-
-#endif
+// convpng
+// this file contains all the graphics sources for easy inclusion in a project
+#ifndef __var_gfx__
+#define __var_gfx__
+#include <stdint.h>
+
+#include <stdbool.h>
+
+#define var_gfx_num 3
+
+extern uint8_t *var_gfx[3];
+#define ubuntu ((gfx_sprite_t*)var_gfx[0])
+#define mint ((gfx_sprite_t*)var_gfx[1])
+#define sizeof_all_gfx_pal 512
+#define all_gfx_pal ((uint16_t*)var_gfx[2])
+bool var_gfx_init(void);
+
+#endif
diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c
index 7c18c3a..98edbf9 100644
--- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c
+++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c
@@ -1,42 +1,42 @@
-#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>
-#include <fileioc.h>
-
-/* Include the sprite data */
-#include "gfx/all_gfx.h"
-#include "gfx/var_gfx.h"
-
-void main(void) {
- /* This function is automatically created by convpng */
- /* Simply call it to load in graphics from the appvar */
- /* The common function name is <appvar name>_init */
- var_gfx_init();
-
- /* Initialize the graphics */
- gfx_Begin();
-
- /* Set up the palette for the sprite */
- gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0);
-
- /* Fill the screen with color index 0 */
- gfx_FillScreen(0);
-
- /* Draw the sprites directly from the appvar */
- gfx_Sprite(ubuntu, LCD_WIDTH / 2 - 16, LCD_HEIGHT / 2 - 16);
- gfx_Sprite(mint, LCD_WIDTH / 2 + 16, LCD_HEIGHT / 2 - 16);
-
- /* 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 <graphx.h>
+#include <fileioc.h>
+
+/* Include the sprite data */
+#include "gfx/all_gfx.h"
+#include "gfx/var_gfx.h"
+
+void main(void) {
+ /* This function is automatically created by convpng */
+ /* Simply call it to load in graphics from the appvar */
+ /* The common function name is <appvar name>_init */
+ var_gfx_init();
+
+ /* Initialize the graphics */
+ gfx_Begin();
+
+ /* Set up the palette for the sprite */
+ gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0);
+
+ /* Fill the screen with color index 0 */
+ gfx_FillScreen(0);
+
+ /* Draw the sprites directly from the appvar */
+ gfx_Sprite(ubuntu, LCD_WIDTH / 2 - 16, LCD_HEIGHT / 2 - 16);
+ gfx_Sprite(mint, LCD_WIDTH / 2 + 16, LCD_HEIGHT / 2 - 16);
+
+ /* Wait for a key to be pressed */
+ while (!os_GetCSC());
+
+ /* Close the graphics */
+ gfx_End();
+}