summaryrefslogtreecommitdiff
path: root/sprites
diff options
context:
space:
mode:
authorSimponic <loganthebean222@gmail.com>2020-08-07 22:40:00 -0600
committerSimponic <loganthebean222@gmail.com>2020-08-07 22:40:00 -0600
commit6a44a34e0ebb867753df26f1cb0a38f53420a606 (patch)
tree42eef181966046e4e3108b149738e70479e48c35 /sprites
downloadgeometry-dash-gba-6a44a34e0ebb867753df26f1cb0a38f53420a606.tar.gz
geometry-dash-gba-6a44a34e0ebb867753df26f1cb0a38f53420a606.zip
Added files
Diffstat (limited to 'sprites')
-rw-r--r--sprites/player.c64
-rw-r--r--sprites/player.h24
-rw-r--r--sprites/toolbox.c65
3 files changed, 153 insertions, 0 deletions
diff --git a/sprites/player.c b/sprites/player.c
new file mode 100644
index 0000000..1dafa3a
--- /dev/null
+++ b/sprites/player.c
@@ -0,0 +1,64 @@
+//======================================================================
+//
+// player, 16x16@4,
+// + palette 256 entries, not compressed
+// + 4 tiles not compressed
+// Total size: 512 + 128 = 640
+//
+// Time-stamp: 2020-08-07, 16:34:01
+// Exported by Cearn's Usenti v1.7.6
+// (comments, kudos, flames to "daytshen@hotmail.com")
+//
+//======================================================================
+
+const unsigned short playerPal[256]=
+{
+ 0x0000,0x031F,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+};
+
+const unsigned short playerTiles[64]=
+{
+ 0x0005,0x0000,0x1110,0x1111,0x1110,0x1111,0x1110,0x1111,
+ 0x1110,0x1222,0x1110,0x1222,0x1110,0x1222,0x1110,0x1111,
+ 0x0000,0x0000,0x1111,0x0111,0x1111,0x0111,0x1111,0x0111,
+ 0x2221,0x0111,0x2221,0x0111,0x2221,0x0111,0x1111,0x0111,
+ 0x1110,0x1111,0x1110,0x1111,0x1110,0x2222,0x1110,0x2221,
+ 0x1110,0x1111,0x1110,0x1111,0x1110,0x1111,0x0000,0x0000,
+ 0x1111,0x0111,0x1111,0x0111,0x2222,0x0111,0x1222,0x0111,
+ 0x1111,0x0111,0x1111,0x0111,0x1111,0x0111,0x0000,0x0000,
+};
+
diff --git a/sprites/player.h b/sprites/player.h
new file mode 100644
index 0000000..65f840a
--- /dev/null
+++ b/sprites/player.h
@@ -0,0 +1,24 @@
+//======================================================================
+//
+// player, 16x16@4,
+// + palette 256 entries, not compressed
+// + 4 tiles not compressed
+// Total size: 512 + 128 = 640
+//
+// Time-stamp: 2020-08-07, 16:34:01
+// Exported by Cearn's Usenti v1.7.6
+// (comments, kudos, flames to "daytshen@hotmail.com")
+//
+//======================================================================
+
+#ifndef __PLAYER__
+#define __PLAYER__
+
+#define playerPalLen 512
+extern const unsigned short playerPal[256];
+
+#define playerTilesLen 128
+extern const unsigned short playerTiles[64];
+
+#endif // __PLAYER__
+
diff --git a/sprites/toolbox.c b/sprites/toolbox.c
new file mode 100644
index 0000000..e58687c
--- /dev/null
+++ b/sprites/toolbox.c
@@ -0,0 +1,65 @@
+//
+// toolbox.c
+//
+// Tools source for obj_demo
+//
+// (20060922-20060924, cearn)
+//
+// === NOTES ===
+// * This is a _small_ set of typedefs, #defines and inlines that can
+// be found in tonclib, and might not represent the
+// final forms.
+
+#include "../include/toolbox.h"
+
+// === (tonc_core.c) ==================================================
+
+u16 __key_curr= 0, __key_prev= 0;
+
+// === (tonc_oam.c) ===================================================
+
+void oam_init(OBJ_ATTR *obj, u32 count)
+{
+ u32 nn= count;
+ u32 *dst= (u32*)obj;
+
+ // Hide each object
+ while(nn--)
+ {
+ *dst++= ATTR0_HIDE;
+ *dst++= 0;
+ }
+ // init oam
+ oam_copy(oam_mem, obj, count);
+}
+
+void oam_copy(OBJ_ATTR *dst, const OBJ_ATTR *src, u32 count)
+{
+
+// NOTE: while struct-copying is the Right Thing to do here,
+// there's a strange bug in DKP that sometimes makes it not work
+// If you see problems, just use the word-copy version.
+#if 1
+ while(count--)
+ *dst++ = *src++;
+#else
+ u32 *dstw= (u32*)dst, *srcw= (u32*)src;
+ while(count--)
+ {
+ *dstw++ = *srcw++;
+ *dstw++ = *srcw++;
+ }
+#endif
+
+}
+
+void obj_copy(OBJ_ATTR *dst, const OBJ_ATTR *src, u32 count)
+{
+ int ii;
+ for(ii=0; ii<count; ii++)
+ {
+ dst[ii].attr0= src[ii].attr0;
+ dst[ii].attr1= src[ii].attr1;
+ dst[ii].attr2= src[ii].attr2;
+ }
+}