![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
Animation/Animation.cpp@52:beeffd296ea3, 2019-05-09 (annotated)
- Committer:
- adambakerwa
- Date:
- Thu May 09 12:19:36 2019 +0000
- Revision:
- 52:beeffd296ea3
- Parent:
- 50:9fc8edf722a8
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
adambakerwa | 50:9fc8edf722a8 | 1 | #include "Animation.h" |
adambakerwa | 50:9fc8edf722a8 | 2 | |
adambakerwa | 50:9fc8edf722a8 | 3 | // nothing doing in the constructor and destructor |
adambakerwa | 50:9fc8edf722a8 | 4 | Animation::Animation() |
adambakerwa | 50:9fc8edf722a8 | 5 | { |
adambakerwa | 50:9fc8edf722a8 | 6 | |
adambakerwa | 50:9fc8edf722a8 | 7 | } |
adambakerwa | 50:9fc8edf722a8 | 8 | |
adambakerwa | 50:9fc8edf722a8 | 9 | |
adambakerwa | 50:9fc8edf722a8 | 10 | |
adambakerwa | 50:9fc8edf722a8 | 11 | Animation::~Animation() |
adambakerwa | 50:9fc8edf722a8 | 12 | { |
adambakerwa | 50:9fc8edf722a8 | 13 | |
adambakerwa | 50:9fc8edf722a8 | 14 | } |
adambakerwa | 50:9fc8edf722a8 | 15 | |
adambakerwa | 50:9fc8edf722a8 | 16 | |
adambakerwa | 50:9fc8edf722a8 | 17 | |
adambakerwa | 50:9fc8edf722a8 | 18 | void Animation::standing(int x, int y, N5110 &lcd) //displays standing sprite |
adambakerwa | 50:9fc8edf722a8 | 19 | { |
adambakerwa | 50:9fc8edf722a8 | 20 | |
adambakerwa | 50:9fc8edf722a8 | 21 | const int standing[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 22 | |
adambakerwa | 50:9fc8edf722a8 | 23 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 24 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 25 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 26 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 27 | {1,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 28 | {1,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 29 | {1,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 30 | {1,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 31 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 32 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 33 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 34 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 35 | |
adambakerwa | 50:9fc8edf722a8 | 36 | }; |
adambakerwa | 50:9fc8edf722a8 | 37 | |
adambakerwa | 50:9fc8edf722a8 | 38 | lcd.drawSprite(x,y,12,9,(int *)standing); |
adambakerwa | 50:9fc8edf722a8 | 39 | |
adambakerwa | 50:9fc8edf722a8 | 40 | } |
adambakerwa | 50:9fc8edf722a8 | 41 | |
adambakerwa | 50:9fc8edf722a8 | 42 | |
adambakerwa | 50:9fc8edf722a8 | 43 | |
adambakerwa | 50:9fc8edf722a8 | 44 | void Animation::runRightOne(int x, int y, N5110 &lcd) //displays running right sprite one |
adambakerwa | 50:9fc8edf722a8 | 45 | { |
adambakerwa | 50:9fc8edf722a8 | 46 | |
adambakerwa | 50:9fc8edf722a8 | 47 | const int runRightOne[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 48 | |
adambakerwa | 50:9fc8edf722a8 | 49 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 50 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 51 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 52 | {1,1,1,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 53 | {1,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 54 | {1,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 55 | {0,0,1,1,1,1,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 56 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 57 | {0,0,1,0,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 58 | {0,0,1,0,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 59 | {1,1,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 60 | {0,0,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 61 | |
adambakerwa | 50:9fc8edf722a8 | 62 | }; |
adambakerwa | 50:9fc8edf722a8 | 63 | |
adambakerwa | 50:9fc8edf722a8 | 64 | lcd.drawSprite(x,y,12,9,(int *)runRightOne); |
adambakerwa | 50:9fc8edf722a8 | 65 | |
adambakerwa | 50:9fc8edf722a8 | 66 | } |
adambakerwa | 50:9fc8edf722a8 | 67 | |
adambakerwa | 50:9fc8edf722a8 | 68 | |
adambakerwa | 50:9fc8edf722a8 | 69 | |
adambakerwa | 50:9fc8edf722a8 | 70 | void Animation::runRightTwo(int x, int y, N5110 &lcd) //displays running right sprite two |
adambakerwa | 50:9fc8edf722a8 | 71 | { |
adambakerwa | 50:9fc8edf722a8 | 72 | |
adambakerwa | 50:9fc8edf722a8 | 73 | const int runRightTwo[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 74 | |
adambakerwa | 50:9fc8edf722a8 | 75 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 76 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 77 | {0,0,0,0,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 78 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 79 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 80 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 81 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 82 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 83 | {0,0,1,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 84 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 85 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 86 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 87 | |
adambakerwa | 50:9fc8edf722a8 | 88 | }; |
adambakerwa | 50:9fc8edf722a8 | 89 | |
adambakerwa | 50:9fc8edf722a8 | 90 | lcd.drawSprite(x,y,12,9,(int *)runRightTwo); |
adambakerwa | 50:9fc8edf722a8 | 91 | |
adambakerwa | 50:9fc8edf722a8 | 92 | } |
adambakerwa | 50:9fc8edf722a8 | 93 | |
adambakerwa | 50:9fc8edf722a8 | 94 | |
adambakerwa | 50:9fc8edf722a8 | 95 | |
adambakerwa | 50:9fc8edf722a8 | 96 | void Animation::runLeftOne(int x, int y, N5110 &lcd) //display running left sprite one |
adambakerwa | 50:9fc8edf722a8 | 97 | { |
adambakerwa | 50:9fc8edf722a8 | 98 | |
adambakerwa | 50:9fc8edf722a8 | 99 | const int runLeftOne[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 100 | |
adambakerwa | 50:9fc8edf722a8 | 101 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 102 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 103 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 104 | {0,0,0,0,0,0,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 105 | {0,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 106 | {0,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 107 | {1,1,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 108 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 109 | {0,1,0,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 110 | {0,1,0,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 111 | {1,0,0,0,0,0,0,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 112 | {1,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 113 | |
adambakerwa | 50:9fc8edf722a8 | 114 | }; |
adambakerwa | 50:9fc8edf722a8 | 115 | |
adambakerwa | 50:9fc8edf722a8 | 116 | lcd.drawSprite(x,y,12,9,(int *)runLeftOne); |
adambakerwa | 50:9fc8edf722a8 | 117 | |
adambakerwa | 50:9fc8edf722a8 | 118 | } |
adambakerwa | 50:9fc8edf722a8 | 119 | |
adambakerwa | 50:9fc8edf722a8 | 120 | |
adambakerwa | 50:9fc8edf722a8 | 121 | |
adambakerwa | 50:9fc8edf722a8 | 122 | void Animation::runLeftTwo(int x, int y, N5110 &lcd) //displays running left sprite two |
adambakerwa | 50:9fc8edf722a8 | 123 | { |
adambakerwa | 50:9fc8edf722a8 | 124 | |
adambakerwa | 50:9fc8edf722a8 | 125 | const int runLeftTwo[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 126 | |
adambakerwa | 50:9fc8edf722a8 | 127 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 128 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 129 | {0,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 130 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 131 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 132 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 133 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 134 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 135 | {0,0,0,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 136 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 137 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 138 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 139 | |
adambakerwa | 50:9fc8edf722a8 | 140 | }; |
adambakerwa | 50:9fc8edf722a8 | 141 | |
adambakerwa | 50:9fc8edf722a8 | 142 | lcd.drawSprite(x,y,12,9,(int *)runLeftTwo); |
adambakerwa | 50:9fc8edf722a8 | 143 | |
adambakerwa | 50:9fc8edf722a8 | 144 | } |
adambakerwa | 50:9fc8edf722a8 | 145 | |
adambakerwa | 50:9fc8edf722a8 | 146 | |
adambakerwa | 50:9fc8edf722a8 | 147 | |
adambakerwa | 50:9fc8edf722a8 | 148 | void Animation::walkRightOne(int x, int y, N5110 &lcd) //displays walking right sprite one |
adambakerwa | 50:9fc8edf722a8 | 149 | { |
adambakerwa | 50:9fc8edf722a8 | 150 | |
adambakerwa | 50:9fc8edf722a8 | 151 | const int walkRightOne[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 152 | |
adambakerwa | 50:9fc8edf722a8 | 153 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 154 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 155 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 156 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 157 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 158 | {0,1,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 159 | {0,1,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 160 | {0,1,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 161 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 162 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 163 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 164 | {0,1,0,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 165 | |
adambakerwa | 50:9fc8edf722a8 | 166 | }; |
adambakerwa | 50:9fc8edf722a8 | 167 | |
adambakerwa | 50:9fc8edf722a8 | 168 | lcd.drawSprite(x,y,12,9,(int *)walkRightOne); |
adambakerwa | 50:9fc8edf722a8 | 169 | |
adambakerwa | 50:9fc8edf722a8 | 170 | } |
adambakerwa | 50:9fc8edf722a8 | 171 | |
adambakerwa | 50:9fc8edf722a8 | 172 | |
adambakerwa | 50:9fc8edf722a8 | 173 | |
adambakerwa | 50:9fc8edf722a8 | 174 | void Animation::walkRightTwo(int x, int y, N5110 &lcd) //displays walking right sprite two |
adambakerwa | 50:9fc8edf722a8 | 175 | { |
adambakerwa | 50:9fc8edf722a8 | 176 | |
adambakerwa | 50:9fc8edf722a8 | 177 | const int walkRightTwo[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 178 | |
adambakerwa | 50:9fc8edf722a8 | 179 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 180 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 181 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 182 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 183 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 184 | {0,1,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 185 | {0,1,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 186 | {0,1,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 187 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 188 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 189 | {0,1,1,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 190 | {0,0,0,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 191 | |
adambakerwa | 50:9fc8edf722a8 | 192 | }; |
adambakerwa | 50:9fc8edf722a8 | 193 | |
adambakerwa | 50:9fc8edf722a8 | 194 | lcd.drawSprite(x,y,12,9,(int *)walkRightTwo); |
adambakerwa | 50:9fc8edf722a8 | 195 | |
adambakerwa | 50:9fc8edf722a8 | 196 | } |
adambakerwa | 50:9fc8edf722a8 | 197 | |
adambakerwa | 50:9fc8edf722a8 | 198 | |
adambakerwa | 50:9fc8edf722a8 | 199 | |
adambakerwa | 50:9fc8edf722a8 | 200 | void Animation::walkRightThree(int x, int y, N5110 &lcd) //displays walking right sprite three |
adambakerwa | 50:9fc8edf722a8 | 201 | { |
adambakerwa | 50:9fc8edf722a8 | 202 | |
adambakerwa | 50:9fc8edf722a8 | 203 | const int walkRightThree[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 204 | |
adambakerwa | 50:9fc8edf722a8 | 205 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 206 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 207 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 208 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 209 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 210 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 211 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 212 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 213 | {0,0,0,0,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 214 | {0,0,0,0,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 215 | {0,0,0,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 216 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 217 | |
adambakerwa | 50:9fc8edf722a8 | 218 | }; |
adambakerwa | 50:9fc8edf722a8 | 219 | |
adambakerwa | 50:9fc8edf722a8 | 220 | lcd.drawSprite(x,y,12,9,(int *)walkRightThree); |
adambakerwa | 50:9fc8edf722a8 | 221 | |
adambakerwa | 50:9fc8edf722a8 | 222 | } |
adambakerwa | 50:9fc8edf722a8 | 223 | |
adambakerwa | 50:9fc8edf722a8 | 224 | |
adambakerwa | 50:9fc8edf722a8 | 225 | |
adambakerwa | 50:9fc8edf722a8 | 226 | void Animation::walkRightFour(int x, int y, N5110 &lcd) //displays walking right sprite four |
adambakerwa | 50:9fc8edf722a8 | 227 | { |
adambakerwa | 50:9fc8edf722a8 | 228 | |
adambakerwa | 50:9fc8edf722a8 | 229 | const int walkRightFour[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 230 | |
adambakerwa | 50:9fc8edf722a8 | 231 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 232 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 233 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 234 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 235 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 236 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 237 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 238 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 239 | {0,0,0,1,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 240 | {0,0,0,1,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 241 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 242 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 243 | |
adambakerwa | 50:9fc8edf722a8 | 244 | }; |
adambakerwa | 50:9fc8edf722a8 | 245 | |
adambakerwa | 50:9fc8edf722a8 | 246 | lcd.drawSprite(x,y,12,9,(int *)walkRightFour); |
adambakerwa | 50:9fc8edf722a8 | 247 | |
adambakerwa | 50:9fc8edf722a8 | 248 | } |
adambakerwa | 50:9fc8edf722a8 | 249 | |
adambakerwa | 50:9fc8edf722a8 | 250 | |
adambakerwa | 50:9fc8edf722a8 | 251 | |
adambakerwa | 50:9fc8edf722a8 | 252 | void Animation::walkLeftOne(int x, int y, N5110 &lcd) //displays walking left sprite one |
adambakerwa | 50:9fc8edf722a8 | 253 | { |
adambakerwa | 50:9fc8edf722a8 | 254 | |
adambakerwa | 50:9fc8edf722a8 | 255 | const int walkLeftOne[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 256 | |
adambakerwa | 50:9fc8edf722a8 | 257 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 258 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 259 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 260 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 261 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 262 | {0,0,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 263 | {0,1,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 264 | {0,0,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 265 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 266 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 267 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 268 | {0,0,1,0,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 269 | |
adambakerwa | 50:9fc8edf722a8 | 270 | }; |
adambakerwa | 50:9fc8edf722a8 | 271 | |
adambakerwa | 50:9fc8edf722a8 | 272 | lcd.drawSprite(x,y,12,9,(int *)walkLeftOne); |
adambakerwa | 50:9fc8edf722a8 | 273 | |
adambakerwa | 50:9fc8edf722a8 | 274 | } |
adambakerwa | 50:9fc8edf722a8 | 275 | |
adambakerwa | 50:9fc8edf722a8 | 276 | |
adambakerwa | 50:9fc8edf722a8 | 277 | |
adambakerwa | 50:9fc8edf722a8 | 278 | void Animation::walkLeftTwo(int x, int y, N5110 &lcd) //displays walking left sprite two |
adambakerwa | 50:9fc8edf722a8 | 279 | { |
adambakerwa | 50:9fc8edf722a8 | 280 | |
adambakerwa | 50:9fc8edf722a8 | 281 | const int walkLeftTwo[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 282 | |
adambakerwa | 50:9fc8edf722a8 | 283 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 284 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 285 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 286 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 287 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 288 | {0,0,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 289 | {0,1,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 290 | {0,0,1,1,1,1,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 291 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 292 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 293 | {0,0,0,1,0,0,1,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 294 | {0,0,0,1,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 295 | |
adambakerwa | 50:9fc8edf722a8 | 296 | }; |
adambakerwa | 50:9fc8edf722a8 | 297 | |
adambakerwa | 50:9fc8edf722a8 | 298 | lcd.drawSprite(x,y,12,9,(int *)walkLeftTwo); |
adambakerwa | 50:9fc8edf722a8 | 299 | |
adambakerwa | 50:9fc8edf722a8 | 300 | } |
adambakerwa | 50:9fc8edf722a8 | 301 | |
adambakerwa | 50:9fc8edf722a8 | 302 | |
adambakerwa | 50:9fc8edf722a8 | 303 | |
adambakerwa | 50:9fc8edf722a8 | 304 | void Animation::walkLeftThree(int x, int y, N5110 &lcd) //displays walking left sprite three |
adambakerwa | 50:9fc8edf722a8 | 305 | { |
adambakerwa | 50:9fc8edf722a8 | 306 | |
adambakerwa | 50:9fc8edf722a8 | 307 | const int walkLeftThree[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 308 | |
adambakerwa | 50:9fc8edf722a8 | 309 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 310 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 311 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 312 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 313 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 314 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 315 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 316 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 317 | {0,0,0,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 318 | {0,0,0,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 319 | {0,0,0,0,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 320 | {0,0,0,0,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 321 | |
adambakerwa | 50:9fc8edf722a8 | 322 | }; |
adambakerwa | 50:9fc8edf722a8 | 323 | |
adambakerwa | 50:9fc8edf722a8 | 324 | lcd.drawSprite(x,y,12,9,(int *)walkLeftThree); |
adambakerwa | 50:9fc8edf722a8 | 325 | |
adambakerwa | 50:9fc8edf722a8 | 326 | } |
adambakerwa | 50:9fc8edf722a8 | 327 | |
adambakerwa | 50:9fc8edf722a8 | 328 | |
adambakerwa | 50:9fc8edf722a8 | 329 | |
adambakerwa | 50:9fc8edf722a8 | 330 | void Animation::walkLeftFour(int x, int y, N5110 &lcd) //displays walking left sprte four |
adambakerwa | 50:9fc8edf722a8 | 331 | { |
adambakerwa | 50:9fc8edf722a8 | 332 | |
adambakerwa | 50:9fc8edf722a8 | 333 | const int walkLeftFour[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 334 | |
adambakerwa | 50:9fc8edf722a8 | 335 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 336 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 337 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 338 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 339 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 340 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 341 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 342 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 343 | {0,0,1,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 344 | {0,0,1,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 345 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 346 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 347 | |
adambakerwa | 50:9fc8edf722a8 | 348 | }; |
adambakerwa | 50:9fc8edf722a8 | 349 | |
adambakerwa | 50:9fc8edf722a8 | 350 | lcd.drawSprite(x,y,12,9,(int *)walkLeftFour); |
adambakerwa | 50:9fc8edf722a8 | 351 | |
adambakerwa | 50:9fc8edf722a8 | 352 | } |
adambakerwa | 50:9fc8edf722a8 | 353 | |
adambakerwa | 50:9fc8edf722a8 | 354 | |
adambakerwa | 50:9fc8edf722a8 | 355 | |
adambakerwa | 50:9fc8edf722a8 | 356 | void Animation::falling(int x, int y, N5110 &lcd) //displays falling sprite |
adambakerwa | 50:9fc8edf722a8 | 357 | { |
adambakerwa | 50:9fc8edf722a8 | 358 | |
adambakerwa | 50:9fc8edf722a8 | 359 | const int falling[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 360 | {1,0,0,1,1,1,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 361 | {1,0,0,1,1,1,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 362 | {1,0,0,1,1,1,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 363 | {1,0,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 364 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 365 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 366 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 367 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 368 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 369 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 370 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 371 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 372 | |
adambakerwa | 50:9fc8edf722a8 | 373 | }; |
adambakerwa | 50:9fc8edf722a8 | 374 | |
adambakerwa | 50:9fc8edf722a8 | 375 | lcd.drawSprite(x,y,12,9,(int *)falling); |
adambakerwa | 50:9fc8edf722a8 | 376 | |
adambakerwa | 50:9fc8edf722a8 | 377 | } |
adambakerwa | 50:9fc8edf722a8 | 378 | |
adambakerwa | 50:9fc8edf722a8 | 379 | |
adambakerwa | 50:9fc8edf722a8 | 380 | |
adambakerwa | 50:9fc8edf722a8 | 381 | void Animation::fallingLeft(int x, int y, N5110 &lcd) //displays falling left sprite |
adambakerwa | 50:9fc8edf722a8 | 382 | { |
adambakerwa | 50:9fc8edf722a8 | 383 | |
adambakerwa | 50:9fc8edf722a8 | 384 | const int fallingLeft[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 385 | {1,0,1,1,1,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 386 | {1,0,1,1,1,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 387 | {1,0,1,1,1,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 388 | {1,0,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 389 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 390 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 391 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 392 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 393 | {0,1,0,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 394 | {0,1,0,0,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 395 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 396 | {0,0,0,1,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 397 | |
adambakerwa | 50:9fc8edf722a8 | 398 | }; |
adambakerwa | 50:9fc8edf722a8 | 399 | |
adambakerwa | 50:9fc8edf722a8 | 400 | lcd.drawSprite(x,y,12,9,(int *)fallingLeft); |
adambakerwa | 50:9fc8edf722a8 | 401 | |
adambakerwa | 50:9fc8edf722a8 | 402 | } |
adambakerwa | 50:9fc8edf722a8 | 403 | |
adambakerwa | 50:9fc8edf722a8 | 404 | |
adambakerwa | 50:9fc8edf722a8 | 405 | |
adambakerwa | 50:9fc8edf722a8 | 406 | void Animation::fallingRight(int x, int y, N5110 &lcd) //displays falling right sprite |
adambakerwa | 50:9fc8edf722a8 | 407 | { |
adambakerwa | 50:9fc8edf722a8 | 408 | |
adambakerwa | 50:9fc8edf722a8 | 409 | const int fallingRight[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 410 | {1,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 411 | {1,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 412 | {1,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 413 | {1,0,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 414 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 415 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 416 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 417 | {0,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 418 | {0,0,0,1,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 419 | {0,0,0,1,0,0,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 420 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 421 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 422 | |
adambakerwa | 50:9fc8edf722a8 | 423 | }; |
adambakerwa | 50:9fc8edf722a8 | 424 | |
adambakerwa | 50:9fc8edf722a8 | 425 | lcd.drawSprite(x,y,12,9,(int *)fallingRight); |
adambakerwa | 50:9fc8edf722a8 | 426 | |
adambakerwa | 50:9fc8edf722a8 | 427 | } |
adambakerwa | 50:9fc8edf722a8 | 428 | |
adambakerwa | 50:9fc8edf722a8 | 429 | |
adambakerwa | 50:9fc8edf722a8 | 430 | |
adambakerwa | 50:9fc8edf722a8 | 431 | void Animation::wallclingLeft(int x, int y, N5110 &lcd) //displays wall cligh left sprite |
adambakerwa | 50:9fc8edf722a8 | 432 | { |
adambakerwa | 50:9fc8edf722a8 | 433 | |
adambakerwa | 50:9fc8edf722a8 | 434 | const int wallclingLeft[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 435 | {1,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 436 | {1,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 437 | {1,0,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 438 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 439 | {1,1,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 440 | {1,1,1,1,1,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 441 | {1,1,1,1,1,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 442 | {1,1,1,1,1,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 443 | {0,1,0,1,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 444 | {1,0,0,1,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 445 | {1,0,1,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 446 | {1,1,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 447 | |
adambakerwa | 50:9fc8edf722a8 | 448 | }; |
adambakerwa | 50:9fc8edf722a8 | 449 | |
adambakerwa | 50:9fc8edf722a8 | 450 | lcd.drawSprite(x,y,12,9,(int *)wallclingLeft); |
adambakerwa | 50:9fc8edf722a8 | 451 | |
adambakerwa | 50:9fc8edf722a8 | 452 | } |
adambakerwa | 50:9fc8edf722a8 | 453 | |
adambakerwa | 50:9fc8edf722a8 | 454 | |
adambakerwa | 50:9fc8edf722a8 | 455 | |
adambakerwa | 50:9fc8edf722a8 | 456 | void Animation::wallclingRight(int x, int y, N5110 &lcd) //displays wall cling right sprite |
adambakerwa | 50:9fc8edf722a8 | 457 | { |
adambakerwa | 50:9fc8edf722a8 | 458 | |
adambakerwa | 50:9fc8edf722a8 | 459 | const int wallclingLeft[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 460 | {0,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 461 | {0,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 462 | {0,0,0,0,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 463 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 464 | {0,0,0,0,1,1,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 465 | {0,0,0,0,1,1,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 466 | {0,0,1,0,1,1,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 467 | {0,0,1,0,1,1,1,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 468 | {0,0,0,0,0,1,0,1,0}, |
adambakerwa | 50:9fc8edf722a8 | 469 | {0,0,0,0,0,1,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 470 | {0,0,0,0,0,0,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 471 | {0,0,0,0,0,0,0,1,1}, |
adambakerwa | 50:9fc8edf722a8 | 472 | |
adambakerwa | 50:9fc8edf722a8 | 473 | }; |
adambakerwa | 50:9fc8edf722a8 | 474 | |
adambakerwa | 50:9fc8edf722a8 | 475 | lcd.drawSprite(x,y,12,9,(int *)wallclingLeft); |
adambakerwa | 50:9fc8edf722a8 | 476 | |
adambakerwa | 50:9fc8edf722a8 | 477 | } |
adambakerwa | 50:9fc8edf722a8 | 478 | |
adambakerwa | 50:9fc8edf722a8 | 479 | |
adambakerwa | 50:9fc8edf722a8 | 480 | |
adambakerwa | 50:9fc8edf722a8 | 481 | void Animation::deathOne(int x, int y, N5110 &lcd) //displays death sprite one |
adambakerwa | 50:9fc8edf722a8 | 482 | { |
adambakerwa | 50:9fc8edf722a8 | 483 | |
adambakerwa | 50:9fc8edf722a8 | 484 | const int deathOne[12][9] = { |
adambakerwa | 50:9fc8edf722a8 | 485 | |
adambakerwa | 50:9fc8edf722a8 | 486 | {0,0,0,1,0,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 487 | {0,0,0,1,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 488 | {0,1,0,0,1,1,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 489 | {1,0,0,0,0,0,0,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 490 | {0,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 491 | {1,0,0,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 492 | {1,0,1,1,1,1,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 493 | {0,0,1,1,1,1,1,0,1}, |
adambakerwa | 50:9fc8edf722a8 | 494 | {0,0,1,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 495 | {0,0,0,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 496 | {0,0,1,0,0,0,0,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 497 | {0,0,0,0,0,0,1,0,0}, |
adambakerwa | 50:9fc8edf722a8 | 498 | |
adambakerwa | 50:9fc8edf722a8 | 499 | }; |
adambakerwa | 50:9fc8edf722a8 | 500 | |
adambakerwa | 50:9fc8edf722a8 | 501 | lcd.drawSprite(x,y,12,9,(int *)deathOne); |
adambakerwa | 50:9fc8edf722a8 | 502 | |
adambakerwa | 50:9fc8edf722a8 | 503 | } |
adambakerwa | 50:9fc8edf722a8 | 504 | |
adambakerwa | 50:9fc8edf722a8 | 505 | |
adambakerwa | 50:9fc8edf722a8 | 506 | |
adambakerwa | 50:9fc8edf722a8 | 507 | void Animation::deathTwo(int x, int y, N5110 &lcd) //displays death sprite two |
adambakerwa | 50:9fc8edf722a8 | 508 | { |
adambakerwa | 50:9fc8edf722a8 | 509 | |
adambakerwa | 50:9fc8edf722a8 | 510 | const int deathTwo[10][8] = { |
adambakerwa | 50:9fc8edf722a8 | 511 | |
adambakerwa | 50:9fc8edf722a8 | 512 | {0,0,0,0,0,1,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 513 | {0,0,1,1,1,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 514 | {0,0,0,0,1,0,0,1,}, |
adambakerwa | 50:9fc8edf722a8 | 515 | {0,0,0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 516 | {0,0,1,1,1,1,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 517 | {0,0,0,1,1,1,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 518 | {0,1,1,1,1,1,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 519 | {0,0,1,1,0,1,1,1,}, |
adambakerwa | 50:9fc8edf722a8 | 520 | {0,0,1,0,0,0,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 521 | {0,0,0,1,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 522 | |
adambakerwa | 50:9fc8edf722a8 | 523 | |
adambakerwa | 50:9fc8edf722a8 | 524 | }; |
adambakerwa | 50:9fc8edf722a8 | 525 | |
adambakerwa | 50:9fc8edf722a8 | 526 | lcd.drawSprite(x,y,10,8,(int *)deathTwo); |
adambakerwa | 50:9fc8edf722a8 | 527 | |
adambakerwa | 50:9fc8edf722a8 | 528 | } |
adambakerwa | 50:9fc8edf722a8 | 529 | |
adambakerwa | 50:9fc8edf722a8 | 530 | |
adambakerwa | 50:9fc8edf722a8 | 531 | |
adambakerwa | 50:9fc8edf722a8 | 532 | void Animation::deathThree(int x, int y, N5110 &lcd) //displays death sprite three |
adambakerwa | 50:9fc8edf722a8 | 533 | { |
adambakerwa | 50:9fc8edf722a8 | 534 | |
adambakerwa | 50:9fc8edf722a8 | 535 | const int deathThree[9][7] = { |
adambakerwa | 50:9fc8edf722a8 | 536 | |
adambakerwa | 50:9fc8edf722a8 | 537 | {0,0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 538 | {0,0,0,1,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 539 | {0,0,0,0,1,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 540 | {0,0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 541 | {0,0,0,1,1,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 542 | {0,0,0,1,0,1,1,}, |
adambakerwa | 50:9fc8edf722a8 | 543 | {0,0,1,1,1,0,1,}, |
adambakerwa | 50:9fc8edf722a8 | 544 | {0,0,0,1,0,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 545 | {0,0,1,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 546 | |
adambakerwa | 50:9fc8edf722a8 | 547 | |
adambakerwa | 50:9fc8edf722a8 | 548 | }; |
adambakerwa | 50:9fc8edf722a8 | 549 | |
adambakerwa | 50:9fc8edf722a8 | 550 | lcd.drawSprite(x,y,9,7,(int *)deathThree); |
adambakerwa | 50:9fc8edf722a8 | 551 | |
adambakerwa | 50:9fc8edf722a8 | 552 | } |
adambakerwa | 50:9fc8edf722a8 | 553 | |
adambakerwa | 50:9fc8edf722a8 | 554 | |
adambakerwa | 50:9fc8edf722a8 | 555 | |
adambakerwa | 50:9fc8edf722a8 | 556 | void Animation::deathFour(int x, int y, N5110 &lcd) //displays death sprite four |
adambakerwa | 50:9fc8edf722a8 | 557 | { |
adambakerwa | 50:9fc8edf722a8 | 558 | |
adambakerwa | 50:9fc8edf722a8 | 559 | const int deathFour[8][6] = { |
adambakerwa | 50:9fc8edf722a8 | 560 | |
adambakerwa | 50:9fc8edf722a8 | 561 | {0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 562 | {0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 563 | {0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 564 | {0,0,0,0,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 565 | {0,0,0,1,0,0,}, |
adambakerwa | 50:9fc8edf722a8 | 566 | {0,0,0,0,0,1,}, |
adambakerwa | 50:9fc8edf722a8 | 567 | {0,0,0,1,1,0,}, |
adambakerwa | 50:9fc8edf722a8 | 568 | {0,0,0,1,0,1,}, |
adambakerwa | 50:9fc8edf722a8 | 569 | |
adambakerwa | 50:9fc8edf722a8 | 570 | |
adambakerwa | 50:9fc8edf722a8 | 571 | }; |
adambakerwa | 50:9fc8edf722a8 | 572 | |
adambakerwa | 50:9fc8edf722a8 | 573 | lcd.drawSprite(x,y,8,6,(int *)deathFour); |
adambakerwa | 50:9fc8edf722a8 | 574 | |
adambakerwa | 50:9fc8edf722a8 | 575 | } |
adambakerwa | 50:9fc8edf722a8 | 576 | |
adambakerwa | 50:9fc8edf722a8 | 577 | |
adambakerwa | 50:9fc8edf722a8 | 578 | //output true if pixels beneath runner |
adambakerwa | 50:9fc8edf722a8 | 579 | bool Animation::pixelsDown(int x, int y, N5110 &lcd) |
adambakerwa | 50:9fc8edf722a8 | 580 | { |
adambakerwa | 50:9fc8edf722a8 | 581 | |
adambakerwa | 50:9fc8edf722a8 | 582 | if (lcd.getPixel(x,y+12) || lcd.getPixel(x+1,y+12) || lcd.getPixel(x+2,y+12) || lcd.getPixel(x+3,y+12) || lcd.getPixel(x+4,y+12) || lcd.getPixel(x+5,y+12) || lcd.getPixel(x+6,y+12) || lcd.getPixel(x+7,y+12) || lcd.getPixel(x+8,y+12)) { |
adambakerwa | 50:9fc8edf722a8 | 583 | return true; |
adambakerwa | 50:9fc8edf722a8 | 584 | } else { |
adambakerwa | 50:9fc8edf722a8 | 585 | return false; |
adambakerwa | 50:9fc8edf722a8 | 586 | } |
adambakerwa | 50:9fc8edf722a8 | 587 | |
adambakerwa | 50:9fc8edf722a8 | 588 | } |
adambakerwa | 50:9fc8edf722a8 | 589 | |
adambakerwa | 50:9fc8edf722a8 | 590 | |
adambakerwa | 50:9fc8edf722a8 | 591 | //output true if pixels above runner |
adambakerwa | 50:9fc8edf722a8 | 592 | bool Animation::pixelsUp(int x, int y, N5110 &lcd) |
adambakerwa | 50:9fc8edf722a8 | 593 | { |
adambakerwa | 50:9fc8edf722a8 | 594 | |
adambakerwa | 50:9fc8edf722a8 | 595 | if (lcd.getPixel(x,y-1) || lcd.getPixel(x+1,y-1) || lcd.getPixel(x+2,y-1) || lcd.getPixel(x+3,y-1) || lcd.getPixel(x+4,y-1) || lcd.getPixel(x+5,y-1) || lcd.getPixel(x+6,y-1) || lcd.getPixel(x+7,y-1) || lcd.getPixel(x+8,y-1)) { |
adambakerwa | 50:9fc8edf722a8 | 596 | return true; |
adambakerwa | 50:9fc8edf722a8 | 597 | } else { |
adambakerwa | 50:9fc8edf722a8 | 598 | return false; |
adambakerwa | 50:9fc8edf722a8 | 599 | } |
adambakerwa | 50:9fc8edf722a8 | 600 | } |
adambakerwa | 50:9fc8edf722a8 | 601 | |
adambakerwa | 50:9fc8edf722a8 | 602 | |
adambakerwa | 50:9fc8edf722a8 | 603 | //output true if pixels left of runner |
adambakerwa | 50:9fc8edf722a8 | 604 | bool Animation::pixelsLeft(int x, int y, N5110 &lcd) |
adambakerwa | 50:9fc8edf722a8 | 605 | { |
adambakerwa | 50:9fc8edf722a8 | 606 | |
adambakerwa | 50:9fc8edf722a8 | 607 | if (lcd.getPixel(x-1,y) || lcd.getPixel(x-1,y+1) || lcd.getPixel(x-1,y+2) || lcd.getPixel(x-1,y+3) || lcd.getPixel(x-1,y+4) || lcd.getPixel(x-1,y+5) || lcd.getPixel(x-1,y+6) || lcd.getPixel(x-1,y+7) || lcd.getPixel(x-1,y+8) || lcd.getPixel(x-1,y+9) || lcd.getPixel(x-1,y+10) || lcd.getPixel(x-1,y+11)) { |
adambakerwa | 50:9fc8edf722a8 | 608 | return true; |
adambakerwa | 50:9fc8edf722a8 | 609 | } else { |
adambakerwa | 50:9fc8edf722a8 | 610 | return false; |
adambakerwa | 50:9fc8edf722a8 | 611 | } |
adambakerwa | 50:9fc8edf722a8 | 612 | } |
adambakerwa | 50:9fc8edf722a8 | 613 | |
adambakerwa | 50:9fc8edf722a8 | 614 | |
adambakerwa | 50:9fc8edf722a8 | 615 | //output true if pixels right of runner |
adambakerwa | 50:9fc8edf722a8 | 616 | bool Animation::pixelsRight(int x, int y, N5110 &lcd) |
adambakerwa | 50:9fc8edf722a8 | 617 | { |
adambakerwa | 50:9fc8edf722a8 | 618 | |
adambakerwa | 50:9fc8edf722a8 | 619 | if (lcd.getPixel(x+9,y) || lcd.getPixel(x+9,y+1) || lcd.getPixel(x+9,y+2) || lcd.getPixel(x+9,y+3) || lcd.getPixel(x+9,y+4) || lcd.getPixel(x+9,y+5) || lcd.getPixel(x+9,y+6) || lcd.getPixel(x+9,y+7) || lcd.getPixel(x+9,y+8) || lcd.getPixel(x+9,y+9) || lcd.getPixel(x+9,y+10) || lcd.getPixel(x+9,y+11)) { |
adambakerwa | 50:9fc8edf722a8 | 620 | return true; |
adambakerwa | 50:9fc8edf722a8 | 621 | } else { |
adambakerwa | 50:9fc8edf722a8 | 622 | return false; |
adambakerwa | 50:9fc8edf722a8 | 623 | } |
adambakerwa | 50:9fc8edf722a8 | 624 | } |