aboutsummaryrefslogtreecommitdiffstats
path: root/bounce.cpp
diff options
context:
space:
mode:
authorMatt Kohls <mattkohls13@gmail.com>2019-03-08 02:10:49 -0500
committerMatt Kohls <mattkohls13@gmail.com>2019-03-08 02:10:49 -0500
commit549bc32d822958a635c32f2fdd34f0395c34e50c (patch)
tree45da1e31e80f2fadf3490cfd64b7dd3cadfd3874 /bounce.cpp
parent71d06c64855dc10dcf2de81dc226c729660b4daf (diff)
downloadbounce-549bc32d822958a635c32f2fdd34f0395c34e50c.tar.gz
bounce-549bc32d822958a635c32f2fdd34f0395c34e50c.tar.bz2
bounce-549bc32d822958a635c32f2fdd34f0395c34e50c.zip
Prepping to make ball a sprite
Diffstat (limited to 'bounce.cpp')
-rw-r--r--bounce.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/bounce.cpp b/bounce.cpp
index 97f009f..6f5e66a 100644
--- a/bounce.cpp
+++ b/bounce.cpp
@@ -27,6 +27,50 @@ const uint16_t SCREEN_HEIGHT = 100;
const uint16_t POSX = 10;
const uint16_t POSY = 10;
+// Sprite Data
+const uint16_t BALL_SIZE = 15; // Number of lines in sprite
+
+/* Line data
+ *
+ * 2x:
+ * 00000000 00000000 | 0x0000
+ * 00000000 00000000 | 0x0000
+ *
+ * 00000011 10000000 | 0x0380
+ * 00000000 00000000 | 0x0000
+ *
+ * 00001111 11100000 | 0x0FE0
+ * 00000000 00000000 | 0x0000
+ *
+ * 2x:
+ * 00011111 11110000 | 0x1FF0
+ * 00000000 00000000 | 0x0000
+ * 3x:
+ * 00111111 11111000 | 0x3FF8
+ * 00000000 00000000 | 0x0000
+ *
+ */
+
+// This should get placed in chip memory by compiler
+__chip WORD ballSprite[] = { 0x0000, 0x0000,
+ 0x0000, 0x0000,
+ 0x0000, 0x0380,
+ 0x0000, 0x0FE0,
+ 0x0000, 0x1FF0,
+ 0x0000, 0x1FF0,
+ 0x0000, 0x3FF8,
+ 0x0000, 0x3FF8,
+ 0x0000, 0x3FF8,
+ 0x0000, 0x1FF0,
+ 0x0000, 0x1FF0,
+ 0x0000, 0x0FE0,
+ 0x0000, 0x0380,
+ 0x0000, 0x0000,
+ 0x0000, 0x0000 };
+
+WORD ballColors[] = { 0x0000, 0x00F0, 0x0F00 };
+
+
/**
* WindowPos
* Keeps track of window position