Great puzzle game by STUDIOCRAFTAPPS. Originally for Gamebuino, ported via automatic parser by Jonne

Dependencies:   PokittoLib

Fork of Asterocks by Pokitto Community Team

Committer:
Pokitto
Date:
Wed May 02 06:21:35 2018 +0000
Revision:
12:45be6b7542a2
Parent:
7:c167ef9d3f4b
New pokittolib with improved volume controls & better button handling

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pokitto 7:c167ef9d3f4b 1 #include "PokittoCore.h"
Pokitto 7:c167ef9d3f4b 2
Pokitto 7:c167ef9d3f4b 3 /* Auto-generated function declarations */
Pokitto 7:c167ef9d3f4b 4 byte getTile(byte,byte);
Pokitto 7:c167ef9d3f4b 5 byte getPreviewTile(byte,byte);
Pokitto 7:c167ef9d3f4b 6 void sfx(int,int);
Pokitto 7:c167ef9d3f4b 7 void ChangeDirection ();
Pokitto 7:c167ef9d3f4b 8 void DefinePos (byte,byte);
Pokitto 7:c167ef9d3f4b 9 byte GetPosX ();
Pokitto 7:c167ef9d3f4b 10 byte GetPosY ();
Pokitto 7:c167ef9d3f4b 11 boolean GetDirection ();
Pokitto 7:c167ef9d3f4b 12 void update ();
Pokitto 7:c167ef9d3f4b 13 void setup();
Pokitto 7:c167ef9d3f4b 14 void DrawPlayer ();
Pokitto 7:c167ef9d3f4b 15 void ClampCamera ();
Pokitto 7:c167ef9d3f4b 16 int ClampInt (int,int,int);
Pokitto 7:c167ef9d3f4b 17 byte GetTPSer1X(byte);
Pokitto 7:c167ef9d3f4b 18 byte GetTPSer1Y(byte);
Pokitto 7:c167ef9d3f4b 19 byte GetTPSer2X(byte);
Pokitto 7:c167ef9d3f4b 20 byte GetTPSer2Y(byte);
Pokitto 7:c167ef9d3f4b 21 void CheckForCollider ();
Pokitto 7:c167ef9d3f4b 22 void PrepareMap ();
Pokitto 7:c167ef9d3f4b 23 boolean inRay (byte,byte,byte);
Pokitto 7:c167ef9d3f4b 24 boolean inRange (byte,byte);
Pokitto 7:c167ef9d3f4b 25 void loop();
Pokitto 7:c167ef9d3f4b 26 void LoadCineStart();
Pokitto 7:c167ef9d3f4b 27 void LoadCineEnd();
Pokitto 7:c167ef9d3f4b 28 void SelectMap ();
Pokitto 7:c167ef9d3f4b 29 void Die ();
Pokitto 7:c167ef9d3f4b 30 void UnlockNext ();
Pokitto 7:c167ef9d3f4b 31
Pokitto 7:c167ef9d3f4b 32 Pokitto::Core gb;
Pokitto 7:c167ef9d3f4b 33
Pokitto 7:c167ef9d3f4b 34
Pokitto 7:c167ef9d3f4b 35
Pokitto 7:c167ef9d3f4b 36 int main () {
Pokitto 7:c167ef9d3f4b 37 setup();
Pokitto 7:c167ef9d3f4b 38 while (gb.isRunning()) {
Pokitto 7:c167ef9d3f4b 39 loop();
Pokitto 7:c167ef9d3f4b 40 }
Pokitto 7:c167ef9d3f4b 41 }
Pokitto 7:c167ef9d3f4b 42
Pokitto 7:c167ef9d3f4b 43 /*
Pokitto 7:c167ef9d3f4b 44 * (C) Create by STUDIOCRAFTapps
Pokitto 7:c167ef9d3f4b 45 *
Pokitto 7:c167ef9d3f4b 46 * You are free to modify this code as long as you keep this message.
Pokitto 7:c167ef9d3f4b 47 * Do not sell this game. Feel free to copy 'parts' of the game to
Pokitto 7:c167ef9d3f4b 48 * help you create your.
Pokitto 7:c167ef9d3f4b 49 *
Pokitto 7:c167ef9d3f4b 50 * Vous etes libre de modifier ce code aussi longtemps que vous garder
Pokitto 7:c167ef9d3f4b 51 * ce message. Vous ne devez pas vendre ce jeu. N'hésitez pas à copier
Pokitto 7:c167ef9d3f4b 52 * des parties de ce jeu pour créer le votre.
Pokitto 7:c167ef9d3f4b 53 *
Pokitto 7:c167ef9d3f4b 54 */
Pokitto 7:c167ef9d3f4b 55
Pokitto 7:c167ef9d3f4b 56
Pokitto 7:c167ef9d3f4b 57 #include <math.h>
Pokitto 7:c167ef9d3f4b 58 //#include <string>
Pokitto 7:c167ef9d3f4b 59
Pokitto 7:c167ef9d3f4b 60
Pokitto 7:c167ef9d3f4b 61 int CamX;
Pokitto 7:c167ef9d3f4b 62 int CamY;
Pokitto 7:c167ef9d3f4b 63 int Frame;
Pokitto 7:c167ef9d3f4b 64
Pokitto 7:c167ef9d3f4b 65 byte Mode = 0;
Pokitto 7:c167ef9d3f4b 66
Pokitto 7:c167ef9d3f4b 67 byte NbrOfLevel = 13;
Pokitto 7:c167ef9d3f4b 68 byte LevelsUnlock = 0;
Pokitto 7:c167ef9d3f4b 69 byte MapCursor = 0;
Pokitto 7:c167ef9d3f4b 70
Pokitto 7:c167ef9d3f4b 71 byte KeysGot = 0;
Pokitto 7:c167ef9d3f4b 72
Pokitto 7:c167ef9d3f4b 73 byte EnnemieCount;
Pokitto 7:c167ef9d3f4b 74
Pokitto 7:c167ef9d3f4b 75 byte CurrentLoadedMap = 0;
Pokitto 7:c167ef9d3f4b 76
Pokitto 7:c167ef9d3f4b 77 byte Scroll = 0;
Pokitto 7:c167ef9d3f4b 78 bool Found;
Pokitto 7:c167ef9d3f4b 79
Pokitto 7:c167ef9d3f4b 80 boolean last = false;
Pokitto 7:c167ef9d3f4b 81 boolean AC = false;
Pokitto 7:c167ef9d3f4b 82 byte ACT;
Pokitto 7:c167ef9d3f4b 83 boolean PistonPressed = false;
Pokitto 7:c167ef9d3f4b 84
Pokitto 7:c167ef9d3f4b 85 const byte TeleporterSerie1X[] PROGMEM {
Pokitto 7:c167ef9d3f4b 86 12,
Pokitto 7:c167ef9d3f4b 87 0,
Pokitto 7:c167ef9d3f4b 88 11,
Pokitto 7:c167ef9d3f4b 89 10
Pokitto 7:c167ef9d3f4b 90 };
Pokitto 7:c167ef9d3f4b 91 const byte TeleporterSerie1Y[] PROGMEM {
Pokitto 7:c167ef9d3f4b 92 7,
Pokitto 7:c167ef9d3f4b 93 3,
Pokitto 7:c167ef9d3f4b 94 15,
Pokitto 7:c167ef9d3f4b 95 13
Pokitto 7:c167ef9d3f4b 96 };
Pokitto 7:c167ef9d3f4b 97 const byte TeleporterSerie2X[] PROGMEM {
Pokitto 7:c167ef9d3f4b 98 12,
Pokitto 7:c167ef9d3f4b 99 0,
Pokitto 7:c167ef9d3f4b 100 11,
Pokitto 7:c167ef9d3f4b 101 11
Pokitto 7:c167ef9d3f4b 102 };
Pokitto 7:c167ef9d3f4b 103 const byte TeleporterSerie2Y[] PROGMEM {
Pokitto 7:c167ef9d3f4b 104 1,
Pokitto 7:c167ef9d3f4b 105 8,
Pokitto 7:c167ef9d3f4b 106 11,
Pokitto 7:c167ef9d3f4b 107 2
Pokitto 7:c167ef9d3f4b 108 };
Pokitto 7:c167ef9d3f4b 109
Pokitto 7:c167ef9d3f4b 110 byte TeleporterCount = 4;
Pokitto 7:c167ef9d3f4b 111
Pokitto 7:c167ef9d3f4b 112 byte* KeyX;
Pokitto 7:c167ef9d3f4b 113 byte* KeyY;
Pokitto 7:c167ef9d3f4b 114 bool* KeyGot;
Pokitto 7:c167ef9d3f4b 115 byte KeyCount;
Pokitto 7:c167ef9d3f4b 116
Pokitto 7:c167ef9d3f4b 117 byte* LockerX;
Pokitto 7:c167ef9d3f4b 118 byte* LockerY;
Pokitto 7:c167ef9d3f4b 119 bool* LockerGot;
Pokitto 7:c167ef9d3f4b 120 byte LockerCount;
Pokitto 7:c167ef9d3f4b 121
Pokitto 7:c167ef9d3f4b 122 /////////////////////////////////////
Pokitto 7:c167ef9d3f4b 123 ////Map stuf and sprite drawing V////
Pokitto 7:c167ef9d3f4b 124 /////////////////////////////////////
Pokitto 7:c167ef9d3f4b 125
Pokitto 7:c167ef9d3f4b 126 const byte Map0Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 127 2,0,0,
Pokitto 7:c167ef9d3f4b 128 3,0,9,
Pokitto 7:c167ef9d3f4b 129 2,1,1
Pokitto 7:c167ef9d3f4b 130 };
Pokitto 7:c167ef9d3f4b 131
Pokitto 7:c167ef9d3f4b 132 const byte Map1Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 133 2,0,0,
Pokitto 7:c167ef9d3f4b 134 3,0,2,
Pokitto 7:c167ef9d3f4b 135 0,0,3
Pokitto 7:c167ef9d3f4b 136 };
Pokitto 7:c167ef9d3f4b 137
Pokitto 7:c167ef9d3f4b 138 const byte Map2Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 139 0,0,2,
Pokitto 7:c167ef9d3f4b 140 19,0,20,
Pokitto 7:c167ef9d3f4b 141 10,12,11
Pokitto 7:c167ef9d3f4b 142 };
Pokitto 7:c167ef9d3f4b 143
Pokitto 7:c167ef9d3f4b 144 const byte Map3Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 145 0,0,0,
Pokitto 7:c167ef9d3f4b 146 23,0,9,
Pokitto 7:c167ef9d3f4b 147 2,26,2
Pokitto 7:c167ef9d3f4b 148 };
Pokitto 7:c167ef9d3f4b 149
Pokitto 7:c167ef9d3f4b 150 const byte Map4Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 151 21,0,21,
Pokitto 7:c167ef9d3f4b 152 3,0,3,
Pokitto 7:c167ef9d3f4b 153 3,26,3
Pokitto 7:c167ef9d3f4b 154 };
Pokitto 7:c167ef9d3f4b 155
Pokitto 7:c167ef9d3f4b 156 const byte Map5Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 157 2,1,2,
Pokitto 7:c167ef9d3f4b 158 15,0,28,
Pokitto 7:c167ef9d3f4b 159 27,1,4
Pokitto 7:c167ef9d3f4b 160 };
Pokitto 7:c167ef9d3f4b 161
Pokitto 7:c167ef9d3f4b 162 const byte Map6Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 163 0,0,21,
Pokitto 7:c167ef9d3f4b 164 0,0,2,
Pokitto 7:c167ef9d3f4b 165 26,0,3
Pokitto 7:c167ef9d3f4b 166 };
Pokitto 7:c167ef9d3f4b 167
Pokitto 7:c167ef9d3f4b 168 const byte Map7Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 169 0,0,0,
Pokitto 7:c167ef9d3f4b 170 0,9,0,
Pokitto 7:c167ef9d3f4b 171 21,21,21
Pokitto 7:c167ef9d3f4b 172 };
Pokitto 7:c167ef9d3f4b 173
Pokitto 7:c167ef9d3f4b 174 const byte Map8Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 175 0,0,0,
Pokitto 7:c167ef9d3f4b 176 0,9,0,
Pokitto 7:c167ef9d3f4b 177 10,12,11
Pokitto 7:c167ef9d3f4b 178 };
Pokitto 7:c167ef9d3f4b 179
Pokitto 7:c167ef9d3f4b 180 const byte Map9Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 181 0,30,0,
Pokitto 7:c167ef9d3f4b 182 0,29,0,
Pokitto 7:c167ef9d3f4b 183 0,14,0
Pokitto 7:c167ef9d3f4b 184 };
Pokitto 7:c167ef9d3f4b 185
Pokitto 7:c167ef9d3f4b 186 const byte Map10Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 187 0,35,0,
Pokitto 7:c167ef9d3f4b 188 0,35,0,
Pokitto 7:c167ef9d3f4b 189 39,37,40
Pokitto 7:c167ef9d3f4b 190 };
Pokitto 7:c167ef9d3f4b 191
Pokitto 7:c167ef9d3f4b 192 const byte Map11Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 193 35,30,0,
Pokitto 7:c167ef9d3f4b 194 33,34,0,
Pokitto 7:c167ef9d3f4b 195 23,23,23
Pokitto 7:c167ef9d3f4b 196 };
Pokitto 7:c167ef9d3f4b 197
Pokitto 7:c167ef9d3f4b 198 const byte Map12Preview[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 199 0,48,49,
Pokitto 7:c167ef9d3f4b 200 31,50,51,
Pokitto 7:c167ef9d3f4b 201 33,32,0
Pokitto 7:c167ef9d3f4b 202 };
Pokitto 7:c167ef9d3f4b 203
Pokitto 7:c167ef9d3f4b 204 const byte* MapsPreviews[13] = {
Pokitto 7:c167ef9d3f4b 205 Map0Preview,
Pokitto 7:c167ef9d3f4b 206 Map1Preview,
Pokitto 7:c167ef9d3f4b 207 Map2Preview,
Pokitto 7:c167ef9d3f4b 208 Map3Preview,
Pokitto 7:c167ef9d3f4b 209 Map4Preview,
Pokitto 7:c167ef9d3f4b 210 Map5Preview,
Pokitto 7:c167ef9d3f4b 211 Map6Preview,
Pokitto 7:c167ef9d3f4b 212 Map7Preview,
Pokitto 7:c167ef9d3f4b 213 Map8Preview,
Pokitto 7:c167ef9d3f4b 214 Map9Preview,
Pokitto 7:c167ef9d3f4b 215 Map10Preview,
Pokitto 7:c167ef9d3f4b 216 Map11Preview,
Pokitto 7:c167ef9d3f4b 217 Map12Preview
Pokitto 7:c167ef9d3f4b 218 };
Pokitto 7:c167ef9d3f4b 219
Pokitto 7:c167ef9d3f4b 220 const byte SpawnCoordX[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 221 10,
Pokitto 7:c167ef9d3f4b 222 2,
Pokitto 7:c167ef9d3f4b 223 7,
Pokitto 7:c167ef9d3f4b 224 9,
Pokitto 7:c167ef9d3f4b 225 2,
Pokitto 7:c167ef9d3f4b 226 7,
Pokitto 7:c167ef9d3f4b 227 2,
Pokitto 7:c167ef9d3f4b 228 4,
Pokitto 7:c167ef9d3f4b 229 1,
Pokitto 7:c167ef9d3f4b 230 2,
Pokitto 7:c167ef9d3f4b 231 3,
Pokitto 7:c167ef9d3f4b 232 1,
Pokitto 7:c167ef9d3f4b 233 1
Pokitto 7:c167ef9d3f4b 234 };
Pokitto 7:c167ef9d3f4b 235
Pokitto 7:c167ef9d3f4b 236 const byte SpawnCoordY[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 237 5,
Pokitto 7:c167ef9d3f4b 238 9,
Pokitto 7:c167ef9d3f4b 239 7,
Pokitto 7:c167ef9d3f4b 240 17,
Pokitto 7:c167ef9d3f4b 241 25,
Pokitto 7:c167ef9d3f4b 242 3,
Pokitto 7:c167ef9d3f4b 243 10,
Pokitto 7:c167ef9d3f4b 244 2,
Pokitto 7:c167ef9d3f4b 245 9,
Pokitto 7:c167ef9d3f4b 246 12,
Pokitto 7:c167ef9d3f4b 247 15,
Pokitto 7:c167ef9d3f4b 248 6,
Pokitto 7:c167ef9d3f4b 249 3
Pokitto 7:c167ef9d3f4b 250 };
Pokitto 7:c167ef9d3f4b 251
Pokitto 7:c167ef9d3f4b 252 const byte MapSizeX[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 253 13,
Pokitto 7:c167ef9d3f4b 254 19,
Pokitto 7:c167ef9d3f4b 255 16,
Pokitto 7:c167ef9d3f4b 256 21,
Pokitto 7:c167ef9d3f4b 257 12,
Pokitto 7:c167ef9d3f4b 258 16,
Pokitto 7:c167ef9d3f4b 259 21,
Pokitto 7:c167ef9d3f4b 260 9,
Pokitto 7:c167ef9d3f4b 261 19,
Pokitto 7:c167ef9d3f4b 262 20,
Pokitto 7:c167ef9d3f4b 263 19,
Pokitto 7:c167ef9d3f4b 264 19,
Pokitto 7:c167ef9d3f4b 265 22
Pokitto 7:c167ef9d3f4b 266 };
Pokitto 7:c167ef9d3f4b 267
Pokitto 7:c167ef9d3f4b 268 const byte MapSizeY[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 269 9,
Pokitto 7:c167ef9d3f4b 270 11,
Pokitto 7:c167ef9d3f4b 271 12,
Pokitto 7:c167ef9d3f4b 272 19,
Pokitto 7:c167ef9d3f4b 273 27,
Pokitto 7:c167ef9d3f4b 274 17,
Pokitto 7:c167ef9d3f4b 275 12,
Pokitto 7:c167ef9d3f4b 276 22,
Pokitto 7:c167ef9d3f4b 277 13,
Pokitto 7:c167ef9d3f4b 278 15,
Pokitto 7:c167ef9d3f4b 279 19,
Pokitto 7:c167ef9d3f4b 280 10,
Pokitto 7:c167ef9d3f4b 281 23
Pokitto 7:c167ef9d3f4b 282 };
Pokitto 7:c167ef9d3f4b 283
Pokitto 7:c167ef9d3f4b 284
Pokitto 7:c167ef9d3f4b 285
Pokitto 7:c167ef9d3f4b 286 const byte Logo[] PROGMEM = {64,30,0xAD,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xB5,0x0,0x0,0x0,0x77,0x70,0x0,0x0,0xAD,0x0,0x0,0x0,0x52,0x40,0x0,0x0,0xB5,0x0,0x0,0x0,0x62,0x50,0x0,0x0,0xAD,0x0,0x0,0x0,0x52,0x50,0x0,0x0,0xB5,0x0,0x0,0x0,0x77,0x70,0x0,0x0,0xAD,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xB5,0x0,0x0,0x0,0x74,0x27,0x50,0x0,0xAD,0x0,0x0,0x0,0x54,0x54,0x50,0x0,0xB5,0x0,0x0,0x0,0x64,0x74,0x60,0x0,0xAD,0x0,0x0,0x0,0x54,0x54,0x50,0x0,0xB5,0x0,0x0,0x0,0x77,0x57,0x50,0x0,0xAD,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xB5,0x0,0x0,0x0,0x77,0x50,0x0,0x0,0xAD,0x0,0xF,0xF0,0x55,0x50,0x0,0x0,0xB5,0x0,0xF,0xF0,0x65,0x20,0x20,0x0,0xAD,0x0,0xD,0xD0,0x55,0x50,0x0,0x0,0xB5,0x0,0xD,0xD0,0x77,0x50,0x40,0x0,0xAD,0x0,0xF,0xF0,0x0,0x0,0x20,0x0,0xB5,0x0,0xF,0xF0,0xFF,0x0,0xF0,0x0,0xAD,0x0,0xF,0xF0,0x81,0x0,0x60,0x0,0xB5,0x0,0xF,0xF0,0xBD,0x0,0x60,0x0,0xFF,0xFF,0xFF,0xFF,0xA5,0x0,0xF0,0x0,0xC3,0xA6,0x66,0x65,0xA5,0x1,0xB8,0x0,0xA5,0xB9,0x99,0x9D,0xA5,0x3,0x9C,0x0,0x99,0xA6,0x66,0x65,0xA5,0x3,0xC,0x0,0x99,0xB9,0x99,0x9D,0xA5,0x1,0xF8,0x0,0xA5,0xA6,0x66,0x65,0xA5,0x0,0x0,0x0,0xC3,0xB9,0x99,0x9D,0xA5,0x0,0x0,0x0,0xFF,0xA6,0x66,0x65,0xE7,0x0,0x0,0x0,};
Pokitto 7:c167ef9d3f4b 287
Pokitto 7:c167ef9d3f4b 288 const PROGMEM byte Back0[]
Pokitto 7:c167ef9d3f4b 289 {
Pokitto 7:c167ef9d3f4b 290 8,8,
Pokitto 7:c167ef9d3f4b 291 B01000000,
Pokitto 7:c167ef9d3f4b 292 B00000100,
Pokitto 7:c167ef9d3f4b 293 B00000000,
Pokitto 7:c167ef9d3f4b 294 B00000000,
Pokitto 7:c167ef9d3f4b 295 B01000000,
Pokitto 7:c167ef9d3f4b 296 B00000000,
Pokitto 7:c167ef9d3f4b 297 B00010000,
Pokitto 7:c167ef9d3f4b 298 B00000001,
Pokitto 7:c167ef9d3f4b 299 };
Pokitto 7:c167ef9d3f4b 300
Pokitto 7:c167ef9d3f4b 301 const PROGMEM byte Back1[]
Pokitto 7:c167ef9d3f4b 302 {
Pokitto 7:c167ef9d3f4b 303 8,8,
Pokitto 7:c167ef9d3f4b 304 B00001000,
Pokitto 7:c167ef9d3f4b 305 B01000000,
Pokitto 7:c167ef9d3f4b 306 B00000000,
Pokitto 7:c167ef9d3f4b 307 B00010000,
Pokitto 7:c167ef9d3f4b 308 B00000001,
Pokitto 7:c167ef9d3f4b 309 B00000000,
Pokitto 7:c167ef9d3f4b 310 B00100000,
Pokitto 7:c167ef9d3f4b 311 B10000000,
Pokitto 7:c167ef9d3f4b 312 };
Pokitto 7:c167ef9d3f4b 313
Pokitto 7:c167ef9d3f4b 314 const PROGMEM byte ExclPoint[]
Pokitto 7:c167ef9d3f4b 315 {
Pokitto 7:c167ef9d3f4b 316 8,8,
Pokitto 7:c167ef9d3f4b 317 B10000000,
Pokitto 7:c167ef9d3f4b 318 B10000000,
Pokitto 7:c167ef9d3f4b 319 B10000000,
Pokitto 7:c167ef9d3f4b 320 B10000000,
Pokitto 7:c167ef9d3f4b 321 B10000000,
Pokitto 7:c167ef9d3f4b 322 B10000000,
Pokitto 7:c167ef9d3f4b 323 B00000000,
Pokitto 7:c167ef9d3f4b 324 B10000000,
Pokitto 7:c167ef9d3f4b 325 };
Pokitto 7:c167ef9d3f4b 326
Pokitto 7:c167ef9d3f4b 327 const PROGMEM byte WhitePotion[]
Pokitto 7:c167ef9d3f4b 328 {
Pokitto 7:c167ef9d3f4b 329 8,8,
Pokitto 7:c167ef9d3f4b 330 B00111100,
Pokitto 7:c167ef9d3f4b 331 B00011000,
Pokitto 7:c167ef9d3f4b 332 B00011000,
Pokitto 7:c167ef9d3f4b 333 B01101110,
Pokitto 7:c167ef9d3f4b 334 B10000101,
Pokitto 7:c167ef9d3f4b 335 B10100001,
Pokitto 7:c167ef9d3f4b 336 B10001001,
Pokitto 7:c167ef9d3f4b 337 B01111110,
Pokitto 7:c167ef9d3f4b 338 };
Pokitto 7:c167ef9d3f4b 339
Pokitto 7:c167ef9d3f4b 340 const PROGMEM byte PlayerSprite[]
Pokitto 7:c167ef9d3f4b 341 {
Pokitto 7:c167ef9d3f4b 342 8,8,
Pokitto 7:c167ef9d3f4b 343 B11111111,
Pokitto 7:c167ef9d3f4b 344 B11111111,
Pokitto 7:c167ef9d3f4b 345 B11101101,
Pokitto 7:c167ef9d3f4b 346 B11101101,
Pokitto 7:c167ef9d3f4b 347 B11111111,
Pokitto 7:c167ef9d3f4b 348 B11111111,
Pokitto 7:c167ef9d3f4b 349 B11111111,
Pokitto 7:c167ef9d3f4b 350 B11111111,
Pokitto 7:c167ef9d3f4b 351 };
Pokitto 7:c167ef9d3f4b 352
Pokitto 7:c167ef9d3f4b 353 const PROGMEM byte EArrow1[]
Pokitto 7:c167ef9d3f4b 354 {
Pokitto 7:c167ef9d3f4b 355 8,8,
Pokitto 7:c167ef9d3f4b 356 B00000000,
Pokitto 7:c167ef9d3f4b 357 B01000000,
Pokitto 7:c167ef9d3f4b 358 B01100000,
Pokitto 7:c167ef9d3f4b 359 B01110000,
Pokitto 7:c167ef9d3f4b 360 B01110000,
Pokitto 7:c167ef9d3f4b 361 B01100000,
Pokitto 7:c167ef9d3f4b 362 B01000000,
Pokitto 7:c167ef9d3f4b 363 B00000000,
Pokitto 7:c167ef9d3f4b 364 };
Pokitto 7:c167ef9d3f4b 365
Pokitto 7:c167ef9d3f4b 366 const PROGMEM byte EArrow2[]
Pokitto 7:c167ef9d3f4b 367 {
Pokitto 7:c167ef9d3f4b 368 8,8,
Pokitto 7:c167ef9d3f4b 369 B00000000,
Pokitto 7:c167ef9d3f4b 370 B00000010,
Pokitto 7:c167ef9d3f4b 371 B00000110,
Pokitto 7:c167ef9d3f4b 372 B00001110,
Pokitto 7:c167ef9d3f4b 373 B00001110,
Pokitto 7:c167ef9d3f4b 374 B00000110,
Pokitto 7:c167ef9d3f4b 375 B00000010,
Pokitto 7:c167ef9d3f4b 376 B00000000,
Pokitto 7:c167ef9d3f4b 377 };
Pokitto 7:c167ef9d3f4b 378
Pokitto 7:c167ef9d3f4b 379 const PROGMEM byte ELocked[]
Pokitto 7:c167ef9d3f4b 380 {
Pokitto 7:c167ef9d3f4b 381 8,8,
Pokitto 7:c167ef9d3f4b 382 B00000000,
Pokitto 7:c167ef9d3f4b 383 B00110000,
Pokitto 7:c167ef9d3f4b 384 B01001000,
Pokitto 7:c167ef9d3f4b 385 B01111000,
Pokitto 7:c167ef9d3f4b 386 B01111000,
Pokitto 7:c167ef9d3f4b 387 B01111000,
Pokitto 7:c167ef9d3f4b 388 B00000000,
Pokitto 7:c167ef9d3f4b 389 B00000000,
Pokitto 7:c167ef9d3f4b 390 };
Pokitto 7:c167ef9d3f4b 391
Pokitto 7:c167ef9d3f4b 392 const PROGMEM byte EUnLocked[]
Pokitto 7:c167ef9d3f4b 393 {
Pokitto 7:c167ef9d3f4b 394 8,8,
Pokitto 7:c167ef9d3f4b 395 B00000000,
Pokitto 7:c167ef9d3f4b 396 B00000110,
Pokitto 7:c167ef9d3f4b 397 B00001001,
Pokitto 7:c167ef9d3f4b 398 B01111000,
Pokitto 7:c167ef9d3f4b 399 B01111000,
Pokitto 7:c167ef9d3f4b 400 B01111000,
Pokitto 7:c167ef9d3f4b 401 B00000000,
Pokitto 7:c167ef9d3f4b 402 B00000000,
Pokitto 7:c167ef9d3f4b 403 };
Pokitto 7:c167ef9d3f4b 404
Pokitto 7:c167ef9d3f4b 405 const PROGMEM byte Key[] = //ID: 19
Pokitto 7:c167ef9d3f4b 406 {
Pokitto 7:c167ef9d3f4b 407 8,8,
Pokitto 7:c167ef9d3f4b 408 B00000000,
Pokitto 7:c167ef9d3f4b 409 B00000110,
Pokitto 7:c167ef9d3f4b 410 B00001111,
Pokitto 7:c167ef9d3f4b 411 B11111101,
Pokitto 7:c167ef9d3f4b 412 B10101111,
Pokitto 7:c167ef9d3f4b 413 B00000110,
Pokitto 7:c167ef9d3f4b 414 B00000000,
Pokitto 7:c167ef9d3f4b 415 B00000000,
Pokitto 7:c167ef9d3f4b 416 };
Pokitto 7:c167ef9d3f4b 417
Pokitto 7:c167ef9d3f4b 418 const PROGMEM byte LockedBlock[] = //ID: 20
Pokitto 7:c167ef9d3f4b 419 {
Pokitto 7:c167ef9d3f4b 420 8,8,
Pokitto 7:c167ef9d3f4b 421 B01111110,
Pokitto 7:c167ef9d3f4b 422 B11011111,
Pokitto 7:c167ef9d3f4b 423 B10100011,
Pokitto 7:c167ef9d3f4b 424 B10100011,
Pokitto 7:c167ef9d3f4b 425 B11110111,
Pokitto 7:c167ef9d3f4b 426 B10110111,
Pokitto 7:c167ef9d3f4b 427 B11110111,
Pokitto 7:c167ef9d3f4b 428 B01111110,
Pokitto 7:c167ef9d3f4b 429 };
Pokitto 7:c167ef9d3f4b 430
Pokitto 7:c167ef9d3f4b 431 const PROGMEM byte Empty[] = //ID: 0
Pokitto 7:c167ef9d3f4b 432 {
Pokitto 7:c167ef9d3f4b 433 8,8,
Pokitto 7:c167ef9d3f4b 434 B00000000,
Pokitto 7:c167ef9d3f4b 435 B00000000,
Pokitto 7:c167ef9d3f4b 436 B00000000,
Pokitto 7:c167ef9d3f4b 437 B00000000,
Pokitto 7:c167ef9d3f4b 438 B00000000,
Pokitto 7:c167ef9d3f4b 439 B00000000,
Pokitto 7:c167ef9d3f4b 440 B00000000,
Pokitto 7:c167ef9d3f4b 441 B00000000,
Pokitto 7:c167ef9d3f4b 442 };
Pokitto 7:c167ef9d3f4b 443
Pokitto 7:c167ef9d3f4b 444 const PROGMEM byte Missing[]
Pokitto 7:c167ef9d3f4b 445 {
Pokitto 7:c167ef9d3f4b 446 8,8,
Pokitto 7:c167ef9d3f4b 447 B10101010,
Pokitto 7:c167ef9d3f4b 448 B00000001,
Pokitto 7:c167ef9d3f4b 449 B10000000,
Pokitto 7:c167ef9d3f4b 450 B00000001,
Pokitto 7:c167ef9d3f4b 451 B10000000,
Pokitto 7:c167ef9d3f4b 452 B00000001,
Pokitto 7:c167ef9d3f4b 453 B10000000,
Pokitto 7:c167ef9d3f4b 454 B01010101,
Pokitto 7:c167ef9d3f4b 455 };
Pokitto 7:c167ef9d3f4b 456
Pokitto 7:c167ef9d3f4b 457 const PROGMEM byte GroundLeft[] = //ID: 10
Pokitto 7:c167ef9d3f4b 458 {
Pokitto 7:c167ef9d3f4b 459 8,8,
Pokitto 7:c167ef9d3f4b 460 B11111111,
Pokitto 7:c167ef9d3f4b 461 B10111001,
Pokitto 7:c167ef9d3f4b 462 B10100110,
Pokitto 7:c167ef9d3f4b 463 B10111001,
Pokitto 7:c167ef9d3f4b 464 B10100110,
Pokitto 7:c167ef9d3f4b 465 B10111001,
Pokitto 7:c167ef9d3f4b 466 B10100110,
Pokitto 7:c167ef9d3f4b 467 B10111001,
Pokitto 7:c167ef9d3f4b 468 };
Pokitto 7:c167ef9d3f4b 469
Pokitto 7:c167ef9d3f4b 470 const PROGMEM byte GroundRight[] = //ID: 11
Pokitto 7:c167ef9d3f4b 471 {
Pokitto 7:c167ef9d3f4b 472 8,8,
Pokitto 7:c167ef9d3f4b 473 B11111111,
Pokitto 7:c167ef9d3f4b 474 B10011101,
Pokitto 7:c167ef9d3f4b 475 B01100101,
Pokitto 7:c167ef9d3f4b 476 B10011101,
Pokitto 7:c167ef9d3f4b 477 B01100101,
Pokitto 7:c167ef9d3f4b 478 B10011101,
Pokitto 7:c167ef9d3f4b 479 B01100101,
Pokitto 7:c167ef9d3f4b 480 B10011101,
Pokitto 7:c167ef9d3f4b 481 };
Pokitto 7:c167ef9d3f4b 482
Pokitto 7:c167ef9d3f4b 483 const PROGMEM byte GroundMiddle[] = //ID: 12
Pokitto 7:c167ef9d3f4b 484 {
Pokitto 7:c167ef9d3f4b 485 8,8,
Pokitto 7:c167ef9d3f4b 486 B11111111,
Pokitto 7:c167ef9d3f4b 487 B10011001,
Pokitto 7:c167ef9d3f4b 488 B01100110,
Pokitto 7:c167ef9d3f4b 489 B10011001,
Pokitto 7:c167ef9d3f4b 490 B01100110,
Pokitto 7:c167ef9d3f4b 491 B10011001,
Pokitto 7:c167ef9d3f4b 492 B01100110,
Pokitto 7:c167ef9d3f4b 493 B10011001,
Pokitto 7:c167ef9d3f4b 494 };
Pokitto 7:c167ef9d3f4b 495
Pokitto 7:c167ef9d3f4b 496 const PROGMEM byte Window[] = //ID: 13
Pokitto 7:c167ef9d3f4b 497 {
Pokitto 7:c167ef9d3f4b 498 8,8,
Pokitto 7:c167ef9d3f4b 499 B11111111,
Pokitto 7:c167ef9d3f4b 500 B10000001,
Pokitto 7:c167ef9d3f4b 501 B10000001,
Pokitto 7:c167ef9d3f4b 502 B10000001,
Pokitto 7:c167ef9d3f4b 503 B10000001,
Pokitto 7:c167ef9d3f4b 504 B10000001,
Pokitto 7:c167ef9d3f4b 505 B10000001,
Pokitto 7:c167ef9d3f4b 506 B11111111,
Pokitto 7:c167ef9d3f4b 507 };
Pokitto 7:c167ef9d3f4b 508
Pokitto 7:c167ef9d3f4b 509 const PROGMEM byte Brick[] = //ID: 1
Pokitto 7:c167ef9d3f4b 510 {
Pokitto 7:c167ef9d3f4b 511 8,8,
Pokitto 7:c167ef9d3f4b 512 B11111111,
Pokitto 7:c167ef9d3f4b 513 B00100001,
Pokitto 7:c167ef9d3f4b 514 B11111111,
Pokitto 7:c167ef9d3f4b 515 B10001000,
Pokitto 7:c167ef9d3f4b 516 B11111111,
Pokitto 7:c167ef9d3f4b 517 B00100001,
Pokitto 7:c167ef9d3f4b 518 B11111111,
Pokitto 7:c167ef9d3f4b 519 B10001000,
Pokitto 7:c167ef9d3f4b 520 };
Pokitto 7:c167ef9d3f4b 521
Pokitto 7:c167ef9d3f4b 522 const PROGMEM byte SharpBrick[]= //ID: 2
Pokitto 7:c167ef9d3f4b 523 {
Pokitto 7:c167ef9d3f4b 524 8,8,
Pokitto 7:c167ef9d3f4b 525 B11111111,
Pokitto 7:c167ef9d3f4b 526 B11000011,
Pokitto 7:c167ef9d3f4b 527 B10100101,
Pokitto 7:c167ef9d3f4b 528 B10011001,
Pokitto 7:c167ef9d3f4b 529 B10011001,
Pokitto 7:c167ef9d3f4b 530 B10100101,
Pokitto 7:c167ef9d3f4b 531 B11000011,
Pokitto 7:c167ef9d3f4b 532 B11111111,
Pokitto 7:c167ef9d3f4b 533 };
Pokitto 7:c167ef9d3f4b 534 const PROGMEM byte TowerBrick[]= //ID: 3
Pokitto 7:c167ef9d3f4b 535 {
Pokitto 7:c167ef9d3f4b 536 8,8,
Pokitto 7:c167ef9d3f4b 537 B10101101,
Pokitto 7:c167ef9d3f4b 538 B10110101,
Pokitto 7:c167ef9d3f4b 539 B10101101,
Pokitto 7:c167ef9d3f4b 540 B10110101,
Pokitto 7:c167ef9d3f4b 541 B10101101,
Pokitto 7:c167ef9d3f4b 542 B10110101,
Pokitto 7:c167ef9d3f4b 543 B10101101,
Pokitto 7:c167ef9d3f4b 544 B10110101,
Pokitto 7:c167ef9d3f4b 545 };
Pokitto 7:c167ef9d3f4b 546
Pokitto 7:c167ef9d3f4b 547 const PROGMEM byte Piston[]= //ID: 4
Pokitto 7:c167ef9d3f4b 548 {
Pokitto 7:c167ef9d3f4b 549 8,8,
Pokitto 7:c167ef9d3f4b 550 B11111111,
Pokitto 7:c167ef9d3f4b 551 B10000001,
Pokitto 7:c167ef9d3f4b 552 B11011011,
Pokitto 7:c167ef9d3f4b 553 B11011011,
Pokitto 7:c167ef9d3f4b 554 B00111100,
Pokitto 7:c167ef9d3f4b 555 B11100111,
Pokitto 7:c167ef9d3f4b 556 B10000001,
Pokitto 7:c167ef9d3f4b 557 B11111111,
Pokitto 7:c167ef9d3f4b 558 };
Pokitto 7:c167ef9d3f4b 559
Pokitto 7:c167ef9d3f4b 560 const PROGMEM byte Holder[]= //ID: 5
Pokitto 7:c167ef9d3f4b 561 {
Pokitto 7:c167ef9d3f4b 562 8,8,
Pokitto 7:c167ef9d3f4b 563 B11111111,
Pokitto 7:c167ef9d3f4b 564 B10100101,
Pokitto 7:c167ef9d3f4b 565 B11111111,
Pokitto 7:c167ef9d3f4b 566 B00000000,
Pokitto 7:c167ef9d3f4b 567 B00000000,
Pokitto 7:c167ef9d3f4b 568 B00000000,
Pokitto 7:c167ef9d3f4b 569 B00000000,
Pokitto 7:c167ef9d3f4b 570 B00000000,
Pokitto 7:c167ef9d3f4b 571 };
Pokitto 7:c167ef9d3f4b 572
Pokitto 7:c167ef9d3f4b 573 const PROGMEM byte Teleporter1[]= //ID: 6
Pokitto 7:c167ef9d3f4b 574 {
Pokitto 7:c167ef9d3f4b 575 8,8,
Pokitto 7:c167ef9d3f4b 576 B11111111,
Pokitto 7:c167ef9d3f4b 577 B10101011,
Pokitto 7:c167ef9d3f4b 578 B11010110,
Pokitto 7:c167ef9d3f4b 579 B10101100,
Pokitto 7:c167ef9d3f4b 580 B10101100,
Pokitto 7:c167ef9d3f4b 581 B11010110,
Pokitto 7:c167ef9d3f4b 582 B10101011,
Pokitto 7:c167ef9d3f4b 583 B11111111,
Pokitto 7:c167ef9d3f4b 584 };
Pokitto 7:c167ef9d3f4b 585
Pokitto 7:c167ef9d3f4b 586 const PROGMEM byte Teleporter0[]= //ID: 7
Pokitto 7:c167ef9d3f4b 587 {
Pokitto 7:c167ef9d3f4b 588 8,8,
Pokitto 7:c167ef9d3f4b 589 B11111111,
Pokitto 7:c167ef9d3f4b 590 B11010101,
Pokitto 7:c167ef9d3f4b 591 B01101011,
Pokitto 7:c167ef9d3f4b 592 B00110101,
Pokitto 7:c167ef9d3f4b 593 B00110101,
Pokitto 7:c167ef9d3f4b 594 B01101011,
Pokitto 7:c167ef9d3f4b 595 B11010101,
Pokitto 7:c167ef9d3f4b 596 B11111111,
Pokitto 7:c167ef9d3f4b 597 };
Pokitto 7:c167ef9d3f4b 598
Pokitto 7:c167ef9d3f4b 599 const PROGMEM byte Wall[]= //ID: 8
Pokitto 7:c167ef9d3f4b 600 {
Pokitto 7:c167ef9d3f4b 601 8,8,
Pokitto 7:c167ef9d3f4b 602 B11110000,
Pokitto 7:c167ef9d3f4b 603 B10010000,
Pokitto 7:c167ef9d3f4b 604 B10010000,
Pokitto 7:c167ef9d3f4b 605 B10010000,
Pokitto 7:c167ef9d3f4b 606 B10010000,
Pokitto 7:c167ef9d3f4b 607 B10010000,
Pokitto 7:c167ef9d3f4b 608 B10010000,
Pokitto 7:c167ef9d3f4b 609 B11110000,
Pokitto 7:c167ef9d3f4b 610 };
Pokitto 7:c167ef9d3f4b 611
Pokitto 7:c167ef9d3f4b 612 const PROGMEM byte Ennemie[]= //ID: 9
Pokitto 7:c167ef9d3f4b 613 {
Pokitto 7:c167ef9d3f4b 614 8,8,
Pokitto 7:c167ef9d3f4b 615 B00000000,
Pokitto 7:c167ef9d3f4b 616 B00000000,
Pokitto 7:c167ef9d3f4b 617 B00000000,
Pokitto 7:c167ef9d3f4b 618 B00000000,
Pokitto 7:c167ef9d3f4b 619 B00000000,
Pokitto 7:c167ef9d3f4b 620 B00000000,
Pokitto 7:c167ef9d3f4b 621 B00000000,
Pokitto 7:c167ef9d3f4b 622 B00000000,
Pokitto 7:c167ef9d3f4b 623 };
Pokitto 7:c167ef9d3f4b 624
Pokitto 7:c167ef9d3f4b 625 const PROGMEM byte End[]= //ID: 22
Pokitto 7:c167ef9d3f4b 626 {
Pokitto 7:c167ef9d3f4b 627 8,8,
Pokitto 7:c167ef9d3f4b 628 B00000000,
Pokitto 7:c167ef9d3f4b 629 B00110011,
Pokitto 7:c167ef9d3f4b 630 B11001100,
Pokitto 7:c167ef9d3f4b 631 B00000000,
Pokitto 7:c167ef9d3f4b 632 B00000000,
Pokitto 7:c167ef9d3f4b 633 B00000000,
Pokitto 7:c167ef9d3f4b 634 B00000000,
Pokitto 7:c167ef9d3f4b 635 B00000000,
Pokitto 7:c167ef9d3f4b 636 };
Pokitto 7:c167ef9d3f4b 637
Pokitto 7:c167ef9d3f4b 638 const PROGMEM byte EnnemieSprite[]=
Pokitto 7:c167ef9d3f4b 639 {
Pokitto 7:c167ef9d3f4b 640 8,8,
Pokitto 7:c167ef9d3f4b 641 B11111111,
Pokitto 7:c167ef9d3f4b 642 B10000001,
Pokitto 7:c167ef9d3f4b 643 B10010011,
Pokitto 7:c167ef9d3f4b 644 B10010011,
Pokitto 7:c167ef9d3f4b 645 B10000001,
Pokitto 7:c167ef9d3f4b 646 B10000001,
Pokitto 7:c167ef9d3f4b 647 B10000001,
Pokitto 7:c167ef9d3f4b 648 B11111111,
Pokitto 7:c167ef9d3f4b 649 };
Pokitto 7:c167ef9d3f4b 650 const PROGMEM byte EnnemieSprite1[]=
Pokitto 7:c167ef9d3f4b 651 {
Pokitto 7:c167ef9d3f4b 652 8,8,
Pokitto 7:c167ef9d3f4b 653 B11111111,
Pokitto 7:c167ef9d3f4b 654 B10000001,
Pokitto 7:c167ef9d3f4b 655 B11001001,
Pokitto 7:c167ef9d3f4b 656 B11001001,
Pokitto 7:c167ef9d3f4b 657 B10000001,
Pokitto 7:c167ef9d3f4b 658 B10000001,
Pokitto 7:c167ef9d3f4b 659 B10000001,
Pokitto 7:c167ef9d3f4b 660 B11111111,
Pokitto 7:c167ef9d3f4b 661 };
Pokitto 7:c167ef9d3f4b 662
Pokitto 7:c167ef9d3f4b 663 const PROGMEM byte Table[] = //ID: 14
Pokitto 7:c167ef9d3f4b 664 {
Pokitto 7:c167ef9d3f4b 665 8,8,
Pokitto 7:c167ef9d3f4b 666 B11111111,
Pokitto 7:c167ef9d3f4b 667 B10000001,
Pokitto 7:c167ef9d3f4b 668 B10111101,
Pokitto 7:c167ef9d3f4b 669 B10100101,
Pokitto 7:c167ef9d3f4b 670 B10100101,
Pokitto 7:c167ef9d3f4b 671 B10100101,
Pokitto 7:c167ef9d3f4b 672 B10100101,
Pokitto 7:c167ef9d3f4b 673 B11100111,
Pokitto 7:c167ef9d3f4b 674 };
Pokitto 7:c167ef9d3f4b 675
Pokitto 7:c167ef9d3f4b 676 const PROGMEM byte PistonExtension[] = //ID: 15
Pokitto 7:c167ef9d3f4b 677 {
Pokitto 7:c167ef9d3f4b 678 8,8,
Pokitto 7:c167ef9d3f4b 679 B11100111,
Pokitto 7:c167ef9d3f4b 680 B10011001,
Pokitto 7:c167ef9d3f4b 681 B11100111,
Pokitto 7:c167ef9d3f4b 682 B10011001,
Pokitto 7:c167ef9d3f4b 683 B11100111,
Pokitto 7:c167ef9d3f4b 684 B10011001,
Pokitto 7:c167ef9d3f4b 685 B11100111,
Pokitto 7:c167ef9d3f4b 686 B10011001,
Pokitto 7:c167ef9d3f4b 687 };
Pokitto 7:c167ef9d3f4b 688
Pokitto 7:c167ef9d3f4b 689 const PROGMEM byte Arrow1[]= //ID: 16
Pokitto 7:c167ef9d3f4b 690 {
Pokitto 7:c167ef9d3f4b 691 8,8,
Pokitto 7:c167ef9d3f4b 692 B11111110,
Pokitto 7:c167ef9d3f4b 693 B10010100,
Pokitto 7:c167ef9d3f4b 694 B10111000,
Pokitto 7:c167ef9d3f4b 695 B11111100,
Pokitto 7:c167ef9d3f4b 696 B10111110,
Pokitto 7:c167ef9d3f4b 697 B11011111,
Pokitto 7:c167ef9d3f4b 698 B10001111,
Pokitto 7:c167ef9d3f4b 699 B00000110,
Pokitto 7:c167ef9d3f4b 700 };
Pokitto 7:c167ef9d3f4b 701
Pokitto 7:c167ef9d3f4b 702 const PROGMEM byte Arrow2[]= //ID: 17
Pokitto 7:c167ef9d3f4b 703 {
Pokitto 7:c167ef9d3f4b 704 8,8,
Pokitto 7:c167ef9d3f4b 705 B01111111,
Pokitto 7:c167ef9d3f4b 706 B00101111,
Pokitto 7:c167ef9d3f4b 707 B00010111,
Pokitto 7:c167ef9d3f4b 708 B00101111,
Pokitto 7:c167ef9d3f4b 709 B01011111,
Pokitto 7:c167ef9d3f4b 710 B10111011,
Pokitto 7:c167ef9d3f4b 711 B11110001,
Pokitto 7:c167ef9d3f4b 712 B01100000,
Pokitto 7:c167ef9d3f4b 713 };
Pokitto 7:c167ef9d3f4b 714
Pokitto 7:c167ef9d3f4b 715 const PROGMEM byte PlantPot[] = //ID: 18
Pokitto 7:c167ef9d3f4b 716 {
Pokitto 7:c167ef9d3f4b 717 8,8,
Pokitto 7:c167ef9d3f4b 718 B00000000,
Pokitto 7:c167ef9d3f4b 719 B00101000,
Pokitto 7:c167ef9d3f4b 720 B00010100,
Pokitto 7:c167ef9d3f4b 721 B00001000,
Pokitto 7:c167ef9d3f4b 722 B00010000,
Pokitto 7:c167ef9d3f4b 723 B00111100,
Pokitto 7:c167ef9d3f4b 724 B00111100,
Pokitto 7:c167ef9d3f4b 725 B00011000,
Pokitto 7:c167ef9d3f4b 726 };
Pokitto 7:c167ef9d3f4b 727
Pokitto 7:c167ef9d3f4b 728 const PROGMEM byte Spike[] = //ID: 21
Pokitto 7:c167ef9d3f4b 729 {
Pokitto 7:c167ef9d3f4b 730 8,8,
Pokitto 7:c167ef9d3f4b 731 B00000000,
Pokitto 7:c167ef9d3f4b 732 B00100010,
Pokitto 7:c167ef9d3f4b 733 B00100010,
Pokitto 7:c167ef9d3f4b 734 B01010101,
Pokitto 7:c167ef9d3f4b 735 B01010101,
Pokitto 7:c167ef9d3f4b 736 B10001000,
Pokitto 7:c167ef9d3f4b 737 B10101010,
Pokitto 7:c167ef9d3f4b 738 B10101010,
Pokitto 7:c167ef9d3f4b 739 };
Pokitto 7:c167ef9d3f4b 740
Pokitto 7:c167ef9d3f4b 741 const PROGMEM byte ConveyerBeltR[] = //ID: 23
Pokitto 7:c167ef9d3f4b 742 {
Pokitto 7:c167ef9d3f4b 743 8,8,
Pokitto 7:c167ef9d3f4b 744 B01111110,
Pokitto 7:c167ef9d3f4b 745 B10100011,
Pokitto 7:c167ef9d3f4b 746 B11000101,
Pokitto 7:c167ef9d3f4b 747 B01111110,
Pokitto 7:c167ef9d3f4b 748 B00000000,
Pokitto 7:c167ef9d3f4b 749 B00000000,
Pokitto 7:c167ef9d3f4b 750 B00000000,
Pokitto 7:c167ef9d3f4b 751 B00000000,
Pokitto 7:c167ef9d3f4b 752 };
Pokitto 7:c167ef9d3f4b 753
Pokitto 7:c167ef9d3f4b 754 const PROGMEM byte ConveyerBeltL[] = //ID: 24
Pokitto 7:c167ef9d3f4b 755 {
Pokitto 7:c167ef9d3f4b 756 8,8,
Pokitto 7:c167ef9d3f4b 757 B01111110,
Pokitto 7:c167ef9d3f4b 758 B11000101,
Pokitto 7:c167ef9d3f4b 759 B10100011,
Pokitto 7:c167ef9d3f4b 760 B01111110,
Pokitto 7:c167ef9d3f4b 761 B00000000,
Pokitto 7:c167ef9d3f4b 762 B00000000,
Pokitto 7:c167ef9d3f4b 763 B00000000,
Pokitto 7:c167ef9d3f4b 764 B00000000,
Pokitto 7:c167ef9d3f4b 765 };
Pokitto 7:c167ef9d3f4b 766
Pokitto 7:c167ef9d3f4b 767 const PROGMEM byte TowerBrickHat[]= //ID: 25
Pokitto 7:c167ef9d3f4b 768 {
Pokitto 7:c167ef9d3f4b 769 8,8,
Pokitto 7:c167ef9d3f4b 770 B00000000,
Pokitto 7:c167ef9d3f4b 771 B00000000,
Pokitto 7:c167ef9d3f4b 772 B00000000,
Pokitto 7:c167ef9d3f4b 773 B11111111,
Pokitto 7:c167ef9d3f4b 774 B10000001,
Pokitto 7:c167ef9d3f4b 775 B11111111,
Pokitto 7:c167ef9d3f4b 776 B10101101,
Pokitto 7:c167ef9d3f4b 777 B10110101,
Pokitto 7:c167ef9d3f4b 778 };
Pokitto 7:c167ef9d3f4b 779
Pokitto 7:c167ef9d3f4b 780 const PROGMEM byte Trampoline[] = //ID: 26
Pokitto 7:c167ef9d3f4b 781 {
Pokitto 7:c167ef9d3f4b 782 8,8,
Pokitto 7:c167ef9d3f4b 783 B11111111,
Pokitto 7:c167ef9d3f4b 784 B00100100,
Pokitto 7:c167ef9d3f4b 785 B01000010,
Pokitto 7:c167ef9d3f4b 786 B10000001,
Pokitto 7:c167ef9d3f4b 787 B01000010,
Pokitto 7:c167ef9d3f4b 788 B00100100,
Pokitto 7:c167ef9d3f4b 789 B11111111,
Pokitto 7:c167ef9d3f4b 790 B11111111,
Pokitto 7:c167ef9d3f4b 791 };
Pokitto 7:c167ef9d3f4b 792
Pokitto 7:c167ef9d3f4b 793 const PROGMEM byte AntiPiston[]= //ID: 27
Pokitto 7:c167ef9d3f4b 794 {
Pokitto 7:c167ef9d3f4b 795 8,8,
Pokitto 7:c167ef9d3f4b 796 B11111111,
Pokitto 7:c167ef9d3f4b 797 B10000001,
Pokitto 7:c167ef9d3f4b 798 B11000011,
Pokitto 7:c167ef9d3f4b 799 B00100100,
Pokitto 7:c167ef9d3f4b 800 B00111100,
Pokitto 7:c167ef9d3f4b 801 B01000010,
Pokitto 7:c167ef9d3f4b 802 B10000001,
Pokitto 7:c167ef9d3f4b 803 B11000011,
Pokitto 7:c167ef9d3f4b 804 };
Pokitto 7:c167ef9d3f4b 805
Pokitto 7:c167ef9d3f4b 806 const PROGMEM byte Potion[]= //ID: 29
Pokitto 7:c167ef9d3f4b 807 {
Pokitto 7:c167ef9d3f4b 808 8,8,
Pokitto 7:c167ef9d3f4b 809 B00111100,
Pokitto 7:c167ef9d3f4b 810 B00011000,
Pokitto 7:c167ef9d3f4b 811 B00011000,
Pokitto 7:c167ef9d3f4b 812 B00111100,
Pokitto 7:c167ef9d3f4b 813 B01101110,
Pokitto 7:c167ef9d3f4b 814 B11100111,
Pokitto 7:c167ef9d3f4b 815 B11000011,
Pokitto 7:c167ef9d3f4b 816 B01111110,
Pokitto 7:c167ef9d3f4b 817 };
Pokitto 7:c167ef9d3f4b 818
Pokitto 7:c167ef9d3f4b 819 const PROGMEM byte Bubble[]= //ID: 30
Pokitto 7:c167ef9d3f4b 820 {
Pokitto 7:c167ef9d3f4b 821 8,8,
Pokitto 7:c167ef9d3f4b 822 B00000000,
Pokitto 7:c167ef9d3f4b 823 B00000000,
Pokitto 7:c167ef9d3f4b 824 B00000000,
Pokitto 7:c167ef9d3f4b 825 B00000000,
Pokitto 7:c167ef9d3f4b 826 B00001000,
Pokitto 7:c167ef9d3f4b 827 B00000000,
Pokitto 7:c167ef9d3f4b 828 B00010000,
Pokitto 7:c167ef9d3f4b 829 B00001000,
Pokitto 7:c167ef9d3f4b 830 };
Pokitto 7:c167ef9d3f4b 831
Pokitto 7:c167ef9d3f4b 832 const PROGMEM byte Pipe0[]= //ID: 31
Pokitto 7:c167ef9d3f4b 833 {
Pokitto 7:c167ef9d3f4b 834 8,8,
Pokitto 7:c167ef9d3f4b 835 B00000000,
Pokitto 7:c167ef9d3f4b 836 B00000000,
Pokitto 7:c167ef9d3f4b 837 B00001111,
Pokitto 7:c167ef9d3f4b 838 B00010000,
Pokitto 7:c167ef9d3f4b 839 B00100000,
Pokitto 7:c167ef9d3f4b 840 B00100011,
Pokitto 7:c167ef9d3f4b 841 B00100100,
Pokitto 7:c167ef9d3f4b 842 B00100100,
Pokitto 7:c167ef9d3f4b 843 };
Pokitto 7:c167ef9d3f4b 844
Pokitto 7:c167ef9d3f4b 845 const PROGMEM byte Pipe1[]= //ID: 32
Pokitto 7:c167ef9d3f4b 846 {
Pokitto 7:c167ef9d3f4b 847 8,8,
Pokitto 7:c167ef9d3f4b 848 B00000000,
Pokitto 7:c167ef9d3f4b 849 B00000000,
Pokitto 7:c167ef9d3f4b 850 B11110000,
Pokitto 7:c167ef9d3f4b 851 B00001000,
Pokitto 7:c167ef9d3f4b 852 B00000100,
Pokitto 7:c167ef9d3f4b 853 B11000100,
Pokitto 7:c167ef9d3f4b 854 B00100100,
Pokitto 7:c167ef9d3f4b 855 B00100100,
Pokitto 7:c167ef9d3f4b 856 };
Pokitto 7:c167ef9d3f4b 857
Pokitto 7:c167ef9d3f4b 858 const PROGMEM byte Pipe2[]= //ID: 33
Pokitto 7:c167ef9d3f4b 859 {
Pokitto 7:c167ef9d3f4b 860 8,8,
Pokitto 7:c167ef9d3f4b 861 B00100100,
Pokitto 7:c167ef9d3f4b 862 B00100100,
Pokitto 7:c167ef9d3f4b 863 B00100011,
Pokitto 7:c167ef9d3f4b 864 B00100000,
Pokitto 7:c167ef9d3f4b 865 B00010000,
Pokitto 7:c167ef9d3f4b 866 B00001111,
Pokitto 7:c167ef9d3f4b 867 B00000000,
Pokitto 7:c167ef9d3f4b 868 B00000000,
Pokitto 7:c167ef9d3f4b 869 };
Pokitto 7:c167ef9d3f4b 870
Pokitto 7:c167ef9d3f4b 871 const PROGMEM byte Pipe3[]= //ID: 34
Pokitto 7:c167ef9d3f4b 872 {
Pokitto 7:c167ef9d3f4b 873 8,8,
Pokitto 7:c167ef9d3f4b 874 B00100100,
Pokitto 7:c167ef9d3f4b 875 B00100100,
Pokitto 7:c167ef9d3f4b 876 B11000100,
Pokitto 7:c167ef9d3f4b 877 B00000100,
Pokitto 7:c167ef9d3f4b 878 B00001000,
Pokitto 7:c167ef9d3f4b 879 B11110000,
Pokitto 7:c167ef9d3f4b 880 B00000000,
Pokitto 7:c167ef9d3f4b 881 B00000000,
Pokitto 7:c167ef9d3f4b 882 };
Pokitto 7:c167ef9d3f4b 883
Pokitto 7:c167ef9d3f4b 884 const PROGMEM byte Pipe4[]= //ID: 35
Pokitto 7:c167ef9d3f4b 885 {
Pokitto 7:c167ef9d3f4b 886 8,8,
Pokitto 7:c167ef9d3f4b 887 B00100100,
Pokitto 7:c167ef9d3f4b 888 B00100100,
Pokitto 7:c167ef9d3f4b 889 B00100100,
Pokitto 7:c167ef9d3f4b 890 B00100100,
Pokitto 7:c167ef9d3f4b 891 B00100100,
Pokitto 7:c167ef9d3f4b 892 B00100100,
Pokitto 7:c167ef9d3f4b 893 B00100100,
Pokitto 7:c167ef9d3f4b 894 B00100100,
Pokitto 7:c167ef9d3f4b 895 };
Pokitto 7:c167ef9d3f4b 896
Pokitto 7:c167ef9d3f4b 897 const PROGMEM byte Pipe5[]= //ID: 36
Pokitto 7:c167ef9d3f4b 898 {
Pokitto 7:c167ef9d3f4b 899 8,8,
Pokitto 7:c167ef9d3f4b 900 B00000000,
Pokitto 7:c167ef9d3f4b 901 B00000000,
Pokitto 7:c167ef9d3f4b 902 B11111111,
Pokitto 7:c167ef9d3f4b 903 B00000000,
Pokitto 7:c167ef9d3f4b 904 B00000000,
Pokitto 7:c167ef9d3f4b 905 B11111111,
Pokitto 7:c167ef9d3f4b 906 B00000000,
Pokitto 7:c167ef9d3f4b 907 B00000000,
Pokitto 7:c167ef9d3f4b 908 };
Pokitto 7:c167ef9d3f4b 909
Pokitto 7:c167ef9d3f4b 910 const PROGMEM byte Stock0[]= //ID: 37
Pokitto 7:c167ef9d3f4b 911 {
Pokitto 7:c167ef9d3f4b 912 8,8,
Pokitto 7:c167ef9d3f4b 913 B01000010,
Pokitto 7:c167ef9d3f4b 914 B10000001,
Pokitto 7:c167ef9d3f4b 915 B00000000,
Pokitto 7:c167ef9d3f4b 916 B10011001,
Pokitto 7:c167ef9d3f4b 917 B01100110,
Pokitto 7:c167ef9d3f4b 918 B00000000,
Pokitto 7:c167ef9d3f4b 919 B11111111,
Pokitto 7:c167ef9d3f4b 920 B00000000,
Pokitto 7:c167ef9d3f4b 921 };
Pokitto 7:c167ef9d3f4b 922
Pokitto 7:c167ef9d3f4b 923 const PROGMEM byte Stock1[]= //ID: 38
Pokitto 7:c167ef9d3f4b 924 {
Pokitto 7:c167ef9d3f4b 925 8,8,
Pokitto 7:c167ef9d3f4b 926 B00000000,
Pokitto 7:c167ef9d3f4b 927 B11111111,
Pokitto 7:c167ef9d3f4b 928 B00000000,
Pokitto 7:c167ef9d3f4b 929 B10011001,
Pokitto 7:c167ef9d3f4b 930 B01100110,
Pokitto 7:c167ef9d3f4b 931 B00000000,
Pokitto 7:c167ef9d3f4b 932 B11111111,
Pokitto 7:c167ef9d3f4b 933 B00000000,
Pokitto 7:c167ef9d3f4b 934 };
Pokitto 7:c167ef9d3f4b 935
Pokitto 7:c167ef9d3f4b 936 const PROGMEM byte Stock2[]= //ID: 39
Pokitto 7:c167ef9d3f4b 937 {
Pokitto 7:c167ef9d3f4b 938 8,8,
Pokitto 7:c167ef9d3f4b 939 B00000000,
Pokitto 7:c167ef9d3f4b 940 B01111111,
Pokitto 7:c167ef9d3f4b 941 B10000000,
Pokitto 7:c167ef9d3f4b 942 B10011001,
Pokitto 7:c167ef9d3f4b 943 B11100110,
Pokitto 7:c167ef9d3f4b 944 B10000000,
Pokitto 7:c167ef9d3f4b 945 B01111111,
Pokitto 7:c167ef9d3f4b 946 B00000000,
Pokitto 7:c167ef9d3f4b 947 };
Pokitto 7:c167ef9d3f4b 948
Pokitto 7:c167ef9d3f4b 949 const PROGMEM byte Stock3[]= //ID: 40
Pokitto 7:c167ef9d3f4b 950 {
Pokitto 7:c167ef9d3f4b 951 8,8,
Pokitto 7:c167ef9d3f4b 952 B00000000,
Pokitto 7:c167ef9d3f4b 953 B11111110,
Pokitto 7:c167ef9d3f4b 954 B00000001,
Pokitto 7:c167ef9d3f4b 955 B10011001,
Pokitto 7:c167ef9d3f4b 956 B01100111,
Pokitto 7:c167ef9d3f4b 957 B00000001,
Pokitto 7:c167ef9d3f4b 958 B11111110,
Pokitto 7:c167ef9d3f4b 959 B00000000,
Pokitto 7:c167ef9d3f4b 960 };
Pokitto 7:c167ef9d3f4b 961
Pokitto 7:c167ef9d3f4b 962 const PROGMEM byte Controller0[]= //ID: 41
Pokitto 7:c167ef9d3f4b 963 {
Pokitto 7:c167ef9d3f4b 964 8,8,
Pokitto 7:c167ef9d3f4b 965 B00000000,
Pokitto 7:c167ef9d3f4b 966 B00000000,
Pokitto 7:c167ef9d3f4b 967 B00000000,
Pokitto 7:c167ef9d3f4b 968 B00000000,
Pokitto 7:c167ef9d3f4b 969 B00000000,
Pokitto 7:c167ef9d3f4b 970 B00000000,
Pokitto 7:c167ef9d3f4b 971 B00000000,
Pokitto 7:c167ef9d3f4b 972 B11100000,
Pokitto 7:c167ef9d3f4b 973 };
Pokitto 7:c167ef9d3f4b 974
Pokitto 7:c167ef9d3f4b 975 const PROGMEM byte Controller1[]= //ID: 42
Pokitto 7:c167ef9d3f4b 976 {
Pokitto 7:c167ef9d3f4b 977 8,8,
Pokitto 7:c167ef9d3f4b 978 B10110000,
Pokitto 7:c167ef9d3f4b 979 B10101000,
Pokitto 7:c167ef9d3f4b 980 B10101100,
Pokitto 7:c167ef9d3f4b 981 B10101010,
Pokitto 7:c167ef9d3f4b 982 B10101001,
Pokitto 7:c167ef9d3f4b 983 B11111111,
Pokitto 7:c167ef9d3f4b 984 B10000001,
Pokitto 7:c167ef9d3f4b 985 B11111111,
Pokitto 7:c167ef9d3f4b 986 };
Pokitto 7:c167ef9d3f4b 987
Pokitto 7:c167ef9d3f4b 988 const PROGMEM byte Crate[]= //ID: 43
Pokitto 7:c167ef9d3f4b 989 {
Pokitto 7:c167ef9d3f4b 990 8,8,
Pokitto 7:c167ef9d3f4b 991 B00000000,
Pokitto 7:c167ef9d3f4b 992 B00000000,
Pokitto 7:c167ef9d3f4b 993 B01111110,
Pokitto 7:c167ef9d3f4b 994 B01000010,
Pokitto 7:c167ef9d3f4b 995 B01110110,
Pokitto 7:c167ef9d3f4b 996 B01101110,
Pokitto 7:c167ef9d3f4b 997 B01000010,
Pokitto 7:c167ef9d3f4b 998 B01111110,
Pokitto 7:c167ef9d3f4b 999 };
Pokitto 7:c167ef9d3f4b 1000
Pokitto 7:c167ef9d3f4b 1001 const PROGMEM byte Experiment0[]= //ID: 44
Pokitto 7:c167ef9d3f4b 1002 {
Pokitto 7:c167ef9d3f4b 1003 8,8,
Pokitto 7:c167ef9d3f4b 1004 B00001111,
Pokitto 7:c167ef9d3f4b 1005 B00010000,
Pokitto 7:c167ef9d3f4b 1006 B00010011,
Pokitto 7:c167ef9d3f4b 1007 B00011100,
Pokitto 7:c167ef9d3f4b 1008 B00010000,
Pokitto 7:c167ef9d3f4b 1009 B00010000,
Pokitto 7:c167ef9d3f4b 1010 B00010000,
Pokitto 7:c167ef9d3f4b 1011 B00010111,
Pokitto 7:c167ef9d3f4b 1012 };
Pokitto 7:c167ef9d3f4b 1013
Pokitto 7:c167ef9d3f4b 1014 const PROGMEM byte Experiment1[]= //ID: 45
Pokitto 7:c167ef9d3f4b 1015 {
Pokitto 7:c167ef9d3f4b 1016 8,8,
Pokitto 7:c167ef9d3f4b 1017 B11110000,
Pokitto 7:c167ef9d3f4b 1018 B00001000,
Pokitto 7:c167ef9d3f4b 1019 B00001000,
Pokitto 7:c167ef9d3f4b 1020 B11001000,
Pokitto 7:c167ef9d3f4b 1021 B00111000,
Pokitto 7:c167ef9d3f4b 1022 B00001000,
Pokitto 7:c167ef9d3f4b 1023 B00001000,
Pokitto 7:c167ef9d3f4b 1024 B11101000,
Pokitto 7:c167ef9d3f4b 1025 };
Pokitto 7:c167ef9d3f4b 1026
Pokitto 7:c167ef9d3f4b 1027 const PROGMEM byte Experiment2[]= //ID: 46
Pokitto 7:c167ef9d3f4b 1028 {
Pokitto 7:c167ef9d3f4b 1029 8,8,
Pokitto 7:c167ef9d3f4b 1030 B00010011,
Pokitto 7:c167ef9d3f4b 1031 B00010011,
Pokitto 7:c167ef9d3f4b 1032 B11110111,
Pokitto 7:c167ef9d3f4b 1033 B00000111,
Pokitto 7:c167ef9d3f4b 1034 B00000111,
Pokitto 7:c167ef9d3f4b 1035 B11110110,
Pokitto 7:c167ef9d3f4b 1036 B00010000,
Pokitto 7:c167ef9d3f4b 1037 B00001111,
Pokitto 7:c167ef9d3f4b 1038 };
Pokitto 7:c167ef9d3f4b 1039
Pokitto 7:c167ef9d3f4b 1040 const PROGMEM byte Experiment3[]= //ID: 47
Pokitto 7:c167ef9d3f4b 1041 {
Pokitto 7:c167ef9d3f4b 1042 8,8,
Pokitto 7:c167ef9d3f4b 1043 B01101000,
Pokitto 7:c167ef9d3f4b 1044 B01101000,
Pokitto 7:c167ef9d3f4b 1045 B11101000,
Pokitto 7:c167ef9d3f4b 1046 B11101000,
Pokitto 7:c167ef9d3f4b 1047 B11101000,
Pokitto 7:c167ef9d3f4b 1048 B01101000,
Pokitto 7:c167ef9d3f4b 1049 B00001000,
Pokitto 7:c167ef9d3f4b 1050 B11110000,
Pokitto 7:c167ef9d3f4b 1051 };
Pokitto 7:c167ef9d3f4b 1052
Pokitto 7:c167ef9d3f4b 1053 //---
Pokitto 7:c167ef9d3f4b 1054
Pokitto 7:c167ef9d3f4b 1055 const PROGMEM byte Experiment4[]=
Pokitto 7:c167ef9d3f4b 1056 {
Pokitto 7:c167ef9d3f4b 1057 8,8,
Pokitto 7:c167ef9d3f4b 1058 B00001111,
Pokitto 7:c167ef9d3f4b 1059 B00010000,
Pokitto 7:c167ef9d3f4b 1060 B00010011,
Pokitto 7:c167ef9d3f4b 1061 B00011100,
Pokitto 7:c167ef9d3f4b 1062 B00010000,
Pokitto 7:c167ef9d3f4b 1063 B00010111,
Pokitto 7:c167ef9d3f4b 1064 B00010111,
Pokitto 7:c167ef9d3f4b 1065 B00010101
Pokitto 7:c167ef9d3f4b 1066 };
Pokitto 7:c167ef9d3f4b 1067
Pokitto 7:c167ef9d3f4b 1068 const PROGMEM byte Experiment5[]=
Pokitto 7:c167ef9d3f4b 1069 {
Pokitto 7:c167ef9d3f4b 1070 8,8,
Pokitto 7:c167ef9d3f4b 1071 B11111100,
Pokitto 7:c167ef9d3f4b 1072 B00000010,
Pokitto 7:c167ef9d3f4b 1073 B00110010,
Pokitto 7:c167ef9d3f4b 1074 B11001110,
Pokitto 7:c167ef9d3f4b 1075 B00000010,
Pokitto 7:c167ef9d3f4b 1076 B11111010,
Pokitto 7:c167ef9d3f4b 1077 B11111010,
Pokitto 7:c167ef9d3f4b 1078 B10111010
Pokitto 7:c167ef9d3f4b 1079 };
Pokitto 7:c167ef9d3f4b 1080
Pokitto 7:c167ef9d3f4b 1081 const PROGMEM byte Experiment6[]=
Pokitto 7:c167ef9d3f4b 1082 {
Pokitto 7:c167ef9d3f4b 1083 8,8,
Pokitto 7:c167ef9d3f4b 1084 B00010101,
Pokitto 7:c167ef9d3f4b 1085 B00010111,
Pokitto 7:c167ef9d3f4b 1086 B11110111,
Pokitto 7:c167ef9d3f4b 1087 B00000111,
Pokitto 7:c167ef9d3f4b 1088 B00000111,
Pokitto 7:c167ef9d3f4b 1089 B11110000,
Pokitto 7:c167ef9d3f4b 1090 B00010000,
Pokitto 7:c167ef9d3f4b 1091 B00011111
Pokitto 7:c167ef9d3f4b 1092 };
Pokitto 7:c167ef9d3f4b 1093
Pokitto 7:c167ef9d3f4b 1094 const PROGMEM byte Experiment7[]=
Pokitto 7:c167ef9d3f4b 1095 {
Pokitto 7:c167ef9d3f4b 1096 8,8,
Pokitto 7:c167ef9d3f4b 1097 B10111010,
Pokitto 7:c167ef9d3f4b 1098 B11111010,
Pokitto 7:c167ef9d3f4b 1099 B11111010,
Pokitto 7:c167ef9d3f4b 1100 B11111010,
Pokitto 7:c167ef9d3f4b 1101 B11111010,
Pokitto 7:c167ef9d3f4b 1102 B00000010,
Pokitto 7:c167ef9d3f4b 1103 B00000010,
Pokitto 7:c167ef9d3f4b 1104 B11111100
Pokitto 7:c167ef9d3f4b 1105 };
Pokitto 7:c167ef9d3f4b 1106
Pokitto 7:c167ef9d3f4b 1107 /*const PROGMEM byte Name[]= //ID: 40
Pokitto 7:c167ef9d3f4b 1108 {
Pokitto 7:c167ef9d3f4b 1109 8,8,
Pokitto 7:c167ef9d3f4b 1110 B00000000,
Pokitto 7:c167ef9d3f4b 1111 B00000000,
Pokitto 7:c167ef9d3f4b 1112 B00000000,
Pokitto 7:c167ef9d3f4b 1113 B00000000,
Pokitto 7:c167ef9d3f4b 1114 B00000000,
Pokitto 7:c167ef9d3f4b 1115 B00000000,
Pokitto 7:c167ef9d3f4b 1116 B00000000,
Pokitto 7:c167ef9d3f4b 1117 B00000000,
Pokitto 7:c167ef9d3f4b 1118 };*/
Pokitto 7:c167ef9d3f4b 1119
Pokitto 7:c167ef9d3f4b 1120 const byte Map0[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1121 0,0,0,0,0,0,0,0,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1122 2,1,2,5,5,0,0,0,0,0,0,0,6,
Pokitto 7:c167ef9d3f4b 1123 3,0,0,0,0,0,4,5,2,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1124 3,0,25,0,16,0,15,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1125 2,0,3,0,0,0,15,18,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1126 3,0,3,0,17,0,15,14,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1127 3,0,3,0,0,0,2,5,5,0,5,5,2,
Pokitto 7:c167ef9d3f4b 1128 3,0,3,0,9,0,3,0,9,0,0,0,6,
Pokitto 7:c167ef9d3f4b 1129 2,22,2,1,1,1,2,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1130 };
Pokitto 7:c167ef9d3f4b 1131
Pokitto 7:c167ef9d3f4b 1132 const byte Map1[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1133 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1134 2,1,2,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1135 3,0,0,0,0,0,0,0,0,8,0,2,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1136 3,0,0,0,21,0,0,0,0,8,0,3,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1137 3,0,0,5,5,5,5,0,0,0,0,2,0,0,5,5,5,0,3,
Pokitto 7:c167ef9d3f4b 1138 2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1139 3,0,0,0,2,0,0,0,3,0,0,0,0,0,0,21,0,0,3,
Pokitto 7:c167ef9d3f4b 1140 3,0,0,0,21,21,21,21,3,0,0,21,0,0,0,2,0,0,3,
Pokitto 7:c167ef9d3f4b 1141 3,0,0,0,2,2,2,2,2,0,5,5,5,0,0,3,0,0,3,
Pokitto 7:c167ef9d3f4b 1142 3,0,0,0,3,0,0,0,3,21,21,21,21,21,21,3,22,22,3,
Pokitto 7:c167ef9d3f4b 1143 2,1,1,1,2,0,0,0,2,1,1,1,1,1,1,2,1,1,2
Pokitto 7:c167ef9d3f4b 1144 };
Pokitto 7:c167ef9d3f4b 1145
Pokitto 7:c167ef9d3f4b 1146 const byte Map2[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1147 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1148 2,0,0,0,0,8,0,0,0,0,0,2,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1149 3,0,0,0,0,8,0,0,0,0,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1150 7,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1151 2,5,0,0,0,0,0,21,19,0,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1152 3,0,0,0,9,0,21,2,5,0,0,2,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1153 3,1,1,1,1,1,2,5,0,0,0,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1154 2,0,0,0,0,0,0,0,0,0,0,0,0,0,19,3,
Pokitto 7:c167ef9d3f4b 1155 7,0,0,19,0,0,0,0,0,21,0,17,0,2,1,2,
Pokitto 7:c167ef9d3f4b 1156 2,1,1,1,1,2,0,5,0,2,5,0,0,3,0,3,
Pokitto 7:c167ef9d3f4b 1157 3,0,20,20,20,0,0,0,0,3,0,0,0,3,0,3,
Pokitto 7:c167ef9d3f4b 1158 2,22,10,12,11,2,10,12,11,2,21,21,21,2,0,2,
Pokitto 7:c167ef9d3f4b 1159 };
Pokitto 7:c167ef9d3f4b 1160
Pokitto 7:c167ef9d3f4b 1161 const byte Map3[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1162 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1163 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1164 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1165 3,0,0,0,0,0,0,0,15,0,15,15,0,15,0,15,15,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1166 3,0,0,0,0,0,0,0,0,15,21,21,21,21,21,15,0,4,0,16,3,
Pokitto 7:c167ef9d3f4b 1167 3,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1168 3,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1169 3,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,2,5,3,
Pokitto 7:c167ef9d3f4b 1170 3,0,21,0,0,21,0,25,0,0,9,0,0,0,21,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1171 3,0,5,5,5,5,0,3,23,23,23,23,23,23,3,5,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1172 2,15,0,0,0,0,27,2,5,5,5,5,5,5,2,0,0,0,0,5,2,
Pokitto 7:c167ef9d3f4b 1173 3,5,0,0,0,0,2,21,0,0,0,0,0,21,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1174 3,4,0,0,0,0,1,2,1,1,1,1,1,2,0,17,0,0,9,0,3,
Pokitto 7:c167ef9d3f4b 1175 3,5,5,5,0,5,15,0,0,0,0,0,0,8,0,25,21,21,21,21,3,
Pokitto 7:c167ef9d3f4b 1176 2,0,0,0,0,2,0,25,0,0,0,0,19,8,0,2,1,2,5,5,2,
Pokitto 7:c167ef9d3f4b 1177 3,0,24,24,24,0,0,3,24,24,24,24,24,8,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1178 3,0,0,0,0,0,0,2,5,5,5,5,5,2,0,0,18,0,25,20,3,
Pokitto 7:c167ef9d3f4b 1179 3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,14,0,3,22,3,
Pokitto 7:c167ef9d3f4b 1180 2,1,1,1,1,1,26,2,10,12,12,12,11,2,26,2,10,12,12,11,2
Pokitto 7:c167ef9d3f4b 1181 };
Pokitto 7:c167ef9d3f4b 1182
Pokitto 7:c167ef9d3f4b 1183 const byte Map4[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1184 0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1185 2,1,1,1,1,1,2,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1186 3,0,0,0,0,0,3,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1187 3,0,0,0,0,0,1,1,2,0,0,0,
Pokitto 7:c167ef9d3f4b 1188 3,0,0,0,0,0,0,0,3,0,0,0,
Pokitto 7:c167ef9d3f4b 1189 3,0,0,0,21,0,0,0,2,1,1,2,
Pokitto 7:c167ef9d3f4b 1190 3,22,2,0,3,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1191 3,2,2,0,3,21,0,0,21,0,0,3,
Pokitto 7:c167ef9d3f4b 1192 3,0,0,0,5,5,5,5,2,0,0,3,
Pokitto 7:c167ef9d3f4b 1193 3,0,0,0,0,0,0,0,3,0,0,3,
Pokitto 7:c167ef9d3f4b 1194 3,0,0,0,0,0,0,0,3,0,0,2,
Pokitto 7:c167ef9d3f4b 1195 3,0,21,21,21,21,21,21,3,0,0,6,
Pokitto 7:c167ef9d3f4b 1196 3,21,2,1,1,1,1,1,1,2,21,3,
Pokitto 7:c167ef9d3f4b 1197 3,2,2,0,0,0,0,0,0,1,1,2,
Pokitto 7:c167ef9d3f4b 1198 2,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1199 3,0,0,0,21,0,0,21,0,0,0,6,
Pokitto 7:c167ef9d3f4b 1200 3,0,0,0,2,5,5,2,5,5,5,2,
Pokitto 7:c167ef9d3f4b 1201 3,0,0,0,0,0,0,3,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1202 2,0,0,0,0,0,0,2,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1203 3,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1204 3,0,0,0,21,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1205 3,0,21,21,3,0,0,21,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1206 2,1,1,1,2,1,1,2,17,0,0,3,
Pokitto 7:c167ef9d3f4b 1207 3,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1208 3,0,0,0,0,0,0,0,0,0,16,3,
Pokitto 7:c167ef9d3f4b 1209 3,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1210 2,1,1,1,2,21,21,21,26,21,21,2
Pokitto 7:c167ef9d3f4b 1211 };
Pokitto 7:c167ef9d3f4b 1212
Pokitto 7:c167ef9d3f4b 1213 const byte Map5[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1214 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1215 2,1,1,1,2,3,2,4,2,3,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1216 3,0,0,0,28,3,0,0,0,15,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1217 3,0,8,0,28,20,0,0,0,15,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1218 2,0,4,1,2,3,2,27,2,3,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1219 3,0,0,0,0,0,0,0,0,3,15,15,27,28,28,3,
Pokitto 7:c167ef9d3f4b 1220 3,16,0,0,0,0,0,0,0,3,0,0,15,0,0,3,
Pokitto 7:c167ef9d3f4b 1221 3,0,0,0,0,0,0,0,0,3,0,0,15,0,0,3,
Pokitto 7:c167ef9d3f4b 1222 3,0,0,21,0,21,0,0,0,3,28,28,4,15,15,4,
Pokitto 7:c167ef9d3f4b 1223 3,21,21,2,15,2,0,26,0,3,0,0,28,0,0,3,
Pokitto 7:c167ef9d3f4b 1224 3,5,5,5,0,5,5,5,5,3,0,0,28,0,0,3,
Pokitto 7:c167ef9d3f4b 1225 3,0,0,0,0,0,0,0,0,3,0,0,27,28,28,3,
Pokitto 7:c167ef9d3f4b 1226 3,0,0,0,0,18,0,0,0,3,0,0,15,0,0,3,
Pokitto 7:c167ef9d3f4b 1227 3,0,25,0,0,14,0,0,0,3,0,0,15,0,0,3,
Pokitto 7:c167ef9d3f4b 1228 3,0,2,5,5,2,5,20,5,2,1,1,1,2,28,3,
Pokitto 7:c167ef9d3f4b 1229 3,0,0,0,19,3,22,22,22,3,19,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1230 2,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2
Pokitto 7:c167ef9d3f4b 1231 };
Pokitto 7:c167ef9d3f4b 1232
Pokitto 7:c167ef9d3f4b 1233 const byte Map6[] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1234 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1235 2,1,1,1,2,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1236 3,0,0,0,0,0,0,0,0,3,21,21,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1237 3,0,0,0,0,0,0,0,0,2,1,2,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1238 3,0,0,0,21,0,0,0,0,0,0,8,17,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1239 3,0,0,0,2,0,0,0,0,0,0,8,0,21,0,0,21,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1240 3,0,0,0,3,0,0,0,0,21,0,0,0,2,0,0,2,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1241 3,0,0,0,3,21,21,21,21,2,0,0,0,3,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1242 3,0,0,0,3,5,5,5,5,3,0,0,0,3,21,21,21,21,21,0,3,
Pokitto 7:c167ef9d3f4b 1243 3,0,0,0,3,0,0,0,0,3,0,0,0,3,5,5,5,5,2,0,3,
Pokitto 7:c167ef9d3f4b 1244 3,0,26,0,3,0,0,0,0,3,0,26,0,3,0,0,0,0,3,22,3,
Pokitto 7:c167ef9d3f4b 1245 2,10,12,11,2,0,0,0,0,2,10,12,11,2,0,0,0,0,2,5,2
Pokitto 7:c167ef9d3f4b 1246 };
Pokitto 7:c167ef9d3f4b 1247
Pokitto 7:c167ef9d3f4b 1248 const byte Map7 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1249 0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1250 2,1,4,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1251 3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1252 3,28,28,28,28,28,28,28,3,
Pokitto 7:c167ef9d3f4b 1253 3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1254 3,0,0,0,0,0,21,21,3,
Pokitto 7:c167ef9d3f4b 1255 3,0,0,0,0,0,5,5,3,
Pokitto 7:c167ef9d3f4b 1256 3,21,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1257 3,5,21,0,0,0,0,16,3,
Pokitto 7:c167ef9d3f4b 1258 3,5,5,21,0,0,0,21,3,
Pokitto 7:c167ef9d3f4b 1259 3,5,5,5,21,0,21,5,3,
Pokitto 7:c167ef9d3f4b 1260 3,5,5,5,5,0,5,5,3,
Pokitto 7:c167ef9d3f4b 1261 3,0,0,0,0,0,2,0,3,
Pokitto 7:c167ef9d3f4b 1262 3,0,0,0,0,0,3,0,3,
Pokitto 7:c167ef9d3f4b 1263 3,0,21,21,21,21,2,0,3,
Pokitto 7:c167ef9d3f4b 1264 3,0,5,5,5,5,5,0,3,
Pokitto 7:c167ef9d3f4b 1265 3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1266 3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1267 3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1268 3,2,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1269 3,3,0,9,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1270 3,2,21,21,21,21,2,22,3,
Pokitto 7:c167ef9d3f4b 1271 2,1,1,1,1,1,1,1,2
Pokitto 7:c167ef9d3f4b 1272 };
Pokitto 7:c167ef9d3f4b 1273
Pokitto 7:c167ef9d3f4b 1274 const byte Map8 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1275 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1276 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
Pokitto 7:c167ef9d3f4b 1277 3,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1278 3,0,0,0,0,19,3,0,0,0,20,0,0,0,0,0,25,20,3,
Pokitto 7:c167ef9d3f4b 1279 3,0,5,5,5,5,5,0,0,0,25,0,0,0,0,0,3,22,3,
Pokitto 7:c167ef9d3f4b 1280 3,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,2,
Pokitto 7:c167ef9d3f4b 1281 3,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1282 2,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1283 3,0,0,0,3,0,0,0,25,0,9,0,25,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1284 3,0,0,0,5,0,0,0,3,5,5,5,5,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1285 3,5,5,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1286 3,0,0,9,0,0,0,0,3,19,0,0,9,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1287 2,10,12,11,2,10,12,11,2,10,12,11,2,10,12,11,2,1,2
Pokitto 7:c167ef9d3f4b 1288 };
Pokitto 7:c167ef9d3f4b 1289
Pokitto 7:c167ef9d3f4b 1290 const byte Map9 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1291 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1292 02,04,01,02,01,01,02,01,01,01,02,01,01,01,01,02,00,35,00,00,
Pokitto 7:c167ef9d3f4b 1293 03,00,00,03,00,00,03,27,00,00,03,07,00,15,00,03,00,33,36,32,
Pokitto 7:c167ef9d3f4b 1294 03,00,00,03,00,00,02,00,00,00,02,05,00,15,00,03,00,30,00,35,
Pokitto 7:c167ef9d3f4b 1295 03,00,00,03,17,00,28,00,00,00,00,00,05,02,00,02,00,29,00,35,
Pokitto 7:c167ef9d3f4b 1296 03,00,00,27,00,00,28,00,00,00,00,00,00,03,00,03,00,14,00,35,
Pokitto 7:c167ef9d3f4b 1297 03,00,00,03,00,00,02,00,00,21,00,00,00,03,00,02,01,01,02,35,
Pokitto 7:c167ef9d3f4b 1298 03,00,00,02,00,00,03,05,05,02,21,00,00,02,00,00,00,00,03,35,
Pokitto 7:c167ef9d3f4b 1299 03,00,00,28,00,00,03,00,00,03,05,21,00,03,05,05,05,00,03,35,
Pokitto 7:c167ef9d3f4b 1300 03,00,00,28,00,00,03,32,00,03,05,05,00,03,00,00,00,00,02,35,
Pokitto 7:c167ef9d3f4b 1301 03,00,00,02,21,21,02,35,00,02,00,00,00,02,22,22,22,22,03,35,
Pokitto 7:c167ef9d3f4b 1302 03,00,00,03,05,05,03,35,00,03,00,00,00,03,05,05,05,05,05,35,
Pokitto 7:c167ef9d3f4b 1303 03,00,00,03,00,00,03,35,00,03,00,00,00,03,00,00,31,36,36,34,
Pokitto 7:c167ef9d3f4b 1304 03,21,26,03,00,00,03,33,36,03,07,00,00,03,39,38,37,38,38,40,
Pokitto 7:c167ef9d3f4b 1305 02,10,12,02,00,00,02,00,00,02,01,01,01,02,01,01,01,01,01,01,
Pokitto 7:c167ef9d3f4b 1306 };
Pokitto 7:c167ef9d3f4b 1307
Pokitto 7:c167ef9d3f4b 1308 const byte Map10 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1309 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1310 02,01,01,01,01,02,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1311 03,00,00,20,20,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1312 02,22,02,01,01,02,00,00,00,00,00,00,00,00,00,30,00,19,00,
Pokitto 7:c167ef9d3f4b 1313 00,02,00,00,31,32,00,00,00,00,00,00,00,00,00,33,03,05,00,
Pokitto 7:c167ef9d3f4b 1314 00,00,00,00,35,35,00,00,21,00,00,00,00,00,00,00,05,00,00,
Pokitto 7:c167ef9d3f4b 1315 36,36,36,36,34,33,36,36,02,00,9,00,00,02,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1316 00,00,39,38,38,40,00,00,05,05,05,05,05,05,00,00,00,00,21,
Pokitto 7:c167ef9d3f4b 1317 00,31,36,32,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,
Pokitto 7:c167ef9d3f4b 1318 00,35,39,37,38,38,40,00,00,00,00,00,00,00,00,00,00,00,03,
Pokitto 7:c167ef9d3f4b 1319 36,34,00,00,00,00,00,00,00,00,00,21,41,00,00,00,21,00,03,
Pokitto 7:c167ef9d3f4b 1320 00,00,00,00,00,00,00,00,00,00,00,02,42,00,9,00,02,00,03,
Pokitto 7:c167ef9d3f4b 1321 00,00,00,00,00,00,00,00,00,00,00,03,05,05,05,05,03,19,03,
Pokitto 7:c167ef9d3f4b 1322 00,00,00,00,00,00,00,00,00,00,00,03,00,43,00,00,03,05,02,
Pokitto 7:c167ef9d3f4b 1323 36,36,32,00,00,00,00,26,00,00,00,03,00,14,00,00,03,00,00,
Pokitto 7:c167ef9d3f4b 1324 00,39,37,40,00,00,02,01,02,00,00,02,05,05,05,05,02,00,00,
Pokitto 7:c167ef9d3f4b 1325 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1326 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
Pokitto 7:c167ef9d3f4b 1327 21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
Pokitto 7:c167ef9d3f4b 1328 };
Pokitto 7:c167ef9d3f4b 1329
Pokitto 7:c167ef9d3f4b 1330 const byte Map11 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1331 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Pokitto 7:c167ef9d3f4b 1332 2,0,0,0,0,35,0,0,0,0,0,0,0,0,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1333 3,0,0,0,0,35,0,0,0,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1334 3,22,8,21,0,33,32,0,21,0,0,0,21,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1335 3,2,1,1,1,2,35,0,5,0,0,2,1,8,0,0,0,0,2,
Pokitto 7:c167ef9d3f4b 1336 3,0,0,0,0,0,35,0,30,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1337 3,0,0,0,0,0,35,0,35,0,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1338 3,5,0,0,0,0,33,36,34,21,0,0,0,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1339 3,0,0,0,0,9,0,0,0,3,0,0,21,21,0,25,0,0,3,
Pokitto 7:c167ef9d3f4b 1340 2,23,23,23,23,23,23,23,23,2,23,23,23,23,23,2,21,21,2
Pokitto 7:c167ef9d3f4b 1341 };
Pokitto 7:c167ef9d3f4b 1342
Pokitto 7:c167ef9d3f4b 1343 const byte Map12 [] PROGMEM = {
Pokitto 7:c167ef9d3f4b 1344 0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
Pokitto 7:c167ef9d3f4b 1345 2,1,2,1,2,1,2,0,0,0,0,0,0,0,0,0,0,2,0,4,0,2,
Pokitto 7:c167ef9d3f4b 1346 3,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,15,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1347 3,0,0,0,0,0,3,19,0,25,0,9,0,0,8,0,0,15,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1348 2,1/*1*/,2,1,2,0,3,5,5,5,5,5,5,5,8,0,0,2,28,28,28,3,
Pokitto 7:c167ef9d3f4b 1349 0,0,0,0,3,0,3,0,0,0,0,0,0,0,5,0,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1350 0,0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1351 0,0,0,0,3,0,0,0,0,21,0,0,0,0,0,0,0,3,0,21,0,3,
Pokitto 7:c167ef9d3f4b 1352 0,0,0,0,3,0,21,0,0,3,0,0,21,21,0,25,0,3,0,2,0,3,
Pokitto 7:c167ef9d3f4b 1353 0,0,0,0,3,0,2,23,23,3,23,23,23,23,23,3,5,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1354 0,0,0,0,3,21,3,0,0,3,0,43,0,0,0,3,0,3,21,0,21,3,
Pokitto 7:c167ef9d3f4b 1355 2,1/*1*/,1,1,2,5,2,1,1,2,1,1,1,1,1,2,1,2,2,0,2,2,
Pokitto 7:c167ef9d3f4b 1356 3,35,0,0,35,0,0,35,0,0,0,0,0,33,32,3,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1357 3,35,44,45,35,48,49,35,48,49,0,0,0,31,34,3,0,0,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1358 3,33,46,47,33,50,51,33,50,51,0,0,39,37,40,3,0,21,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1359 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1360 3,1,1,1,1,1,1,1,2,0,0,0,0,0,30,3,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1361 3,0,0,0,0,0,0,0,0,0,0,0,0,0,33,3,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1362 3,0,0,0,0,0,0,0,0,0,5,5,5,0,0,3,0,3,21,0,21,3,
Pokitto 7:c167ef9d3f4b 1363 3,0,0,30,0,0,0,0,0,0,0,0,0,0,43,3,0,3,5,0,5,3,
Pokitto 7:c167ef9d3f4b 1364 3,0,0,29,0,0,0,41,0,0,0,0,0,0,5,2,0,3,0,0,0,3,
Pokitto 7:c167ef9d3f4b 1365 3,0,0,14,0,9,2,42,0,0,0,0,0,0,0,20,0,3,0,26,0,3,
Pokitto 7:c167ef9d3f4b 1366 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,2
Pokitto 7:c167ef9d3f4b 1367 };
Pokitto 7:c167ef9d3f4b 1368
Pokitto 7:c167ef9d3f4b 1369 const byte* GetMap[] {
Pokitto 7:c167ef9d3f4b 1370 Map0,
Pokitto 7:c167ef9d3f4b 1371 Map1,
Pokitto 7:c167ef9d3f4b 1372 Map2,
Pokitto 7:c167ef9d3f4b 1373 Map3,
Pokitto 7:c167ef9d3f4b 1374 Map4,
Pokitto 7:c167ef9d3f4b 1375 Map5,
Pokitto 7:c167ef9d3f4b 1376 Map6,
Pokitto 7:c167ef9d3f4b 1377 Map7,
Pokitto 7:c167ef9d3f4b 1378 Map8,
Pokitto 7:c167ef9d3f4b 1379 Map9,
Pokitto 7:c167ef9d3f4b 1380 Map10,
Pokitto 7:c167ef9d3f4b 1381 Map11,
Pokitto 7:c167ef9d3f4b 1382 Map12
Pokitto 7:c167ef9d3f4b 1383 };
Pokitto 7:c167ef9d3f4b 1384
Pokitto 7:c167ef9d3f4b 1385 //////////////////////////////////////////////
Pokitto 7:c167ef9d3f4b 1386 ////Var Initi. for physics and grounding V////
Pokitto 7:c167ef9d3f4b 1387 //////////////////////////////////////////////
Pokitto 7:c167ef9d3f4b 1388
Pokitto 7:c167ef9d3f4b 1389 #define LCDWidth 84
Pokitto 7:c167ef9d3f4b 1390 #define LCDHeight 48
Pokitto 7:c167ef9d3f4b 1391
Pokitto 7:c167ef9d3f4b 1392 #define BouncyMath1 0.0322580//6452
Pokitto 7:c167ef9d3f4b 1393 #define BouncyMath2 -0.0483870f//9677
Pokitto 7:c167ef9d3f4b 1394 #define BouncyMath3 -0.0393700f//7874
Pokitto 7:c167ef9d3f4b 1395 #define BouncyMath4 0.0236220f//4724
Pokitto 7:c167ef9d3f4b 1396
Pokitto 7:c167ef9d3f4b 1397 byte MapHeigth = 9;
Pokitto 7:c167ef9d3f4b 1398 byte MapWidth = 13;
Pokitto 7:c167ef9d3f4b 1399
Pokitto 7:c167ef9d3f4b 1400 boolean GoingRight = true;
Pokitto 7:c167ef9d3f4b 1401
Pokitto 7:c167ef9d3f4b 1402 boolean GroundedDown = false;
Pokitto 7:c167ef9d3f4b 1403 boolean GroundedRight = false;
Pokitto 7:c167ef9d3f4b 1404 boolean GroundedLeft = false;
Pokitto 7:c167ef9d3f4b 1405
Pokitto 7:c167ef9d3f4b 1406 boolean IsPlaying = false;
Pokitto 7:c167ef9d3f4b 1407
Pokitto 7:c167ef9d3f4b 1408 /////////////////////
Pokitto 7:c167ef9d3f4b 1409 ////Block Setup V////
Pokitto 7:c167ef9d3f4b 1410 /////////////////////
Pokitto 7:c167ef9d3f4b 1411
Pokitto 7:c167ef9d3f4b 1412 const byte* sprites[52] = {
Pokitto 7:c167ef9d3f4b 1413 Empty,
Pokitto 7:c167ef9d3f4b 1414 Brick,
Pokitto 7:c167ef9d3f4b 1415 SharpBrick,
Pokitto 7:c167ef9d3f4b 1416 TowerBrick,
Pokitto 7:c167ef9d3f4b 1417 Piston,
Pokitto 7:c167ef9d3f4b 1418 Holder,
Pokitto 7:c167ef9d3f4b 1419 Teleporter0,
Pokitto 7:c167ef9d3f4b 1420 Teleporter1,
Pokitto 7:c167ef9d3f4b 1421 Wall,
Pokitto 7:c167ef9d3f4b 1422 Ennemie,
Pokitto 7:c167ef9d3f4b 1423 GroundLeft,
Pokitto 7:c167ef9d3f4b 1424 GroundRight,
Pokitto 7:c167ef9d3f4b 1425 GroundMiddle,
Pokitto 7:c167ef9d3f4b 1426 Window,
Pokitto 7:c167ef9d3f4b 1427 Table,
Pokitto 7:c167ef9d3f4b 1428 PistonExtension,
Pokitto 7:c167ef9d3f4b 1429 Arrow1,
Pokitto 7:c167ef9d3f4b 1430 Arrow2,
Pokitto 7:c167ef9d3f4b 1431 PlantPot,
Pokitto 7:c167ef9d3f4b 1432 Key,
Pokitto 7:c167ef9d3f4b 1433 LockedBlock,
Pokitto 7:c167ef9d3f4b 1434 Spike,
Pokitto 7:c167ef9d3f4b 1435 End,
Pokitto 7:c167ef9d3f4b 1436 ConveyerBeltR,
Pokitto 7:c167ef9d3f4b 1437 ConveyerBeltL,
Pokitto 7:c167ef9d3f4b 1438 TowerBrickHat,
Pokitto 7:c167ef9d3f4b 1439 Trampoline,
Pokitto 7:c167ef9d3f4b 1440 AntiPiston,
Pokitto 7:c167ef9d3f4b 1441 Missing,
Pokitto 7:c167ef9d3f4b 1442 Potion,
Pokitto 7:c167ef9d3f4b 1443 Bubble,
Pokitto 7:c167ef9d3f4b 1444 Pipe0,
Pokitto 7:c167ef9d3f4b 1445 Pipe1,
Pokitto 7:c167ef9d3f4b 1446 Pipe2,
Pokitto 7:c167ef9d3f4b 1447 Pipe3,
Pokitto 7:c167ef9d3f4b 1448 Pipe4,
Pokitto 7:c167ef9d3f4b 1449 Pipe5,
Pokitto 7:c167ef9d3f4b 1450 Stock0,
Pokitto 7:c167ef9d3f4b 1451 Stock1,
Pokitto 7:c167ef9d3f4b 1452 Stock2,
Pokitto 7:c167ef9d3f4b 1453 Stock3,
Pokitto 7:c167ef9d3f4b 1454 Controller0,
Pokitto 7:c167ef9d3f4b 1455 Controller1,
Pokitto 7:c167ef9d3f4b 1456 Crate,
Pokitto 7:c167ef9d3f4b 1457 Experiment0,
Pokitto 7:c167ef9d3f4b 1458 Experiment1,
Pokitto 7:c167ef9d3f4b 1459 Experiment2,
Pokitto 7:c167ef9d3f4b 1460 Experiment3,
Pokitto 7:c167ef9d3f4b 1461 Experiment4,
Pokitto 7:c167ef9d3f4b 1462 Experiment5,
Pokitto 7:c167ef9d3f4b 1463 Experiment6,
Pokitto 7:c167ef9d3f4b 1464 Experiment7
Pokitto 7:c167ef9d3f4b 1465 };
Pokitto 7:c167ef9d3f4b 1466
Pokitto 7:c167ef9d3f4b 1467 const byte coltype[52] = { //0 = empty 1 = block
Pokitto 7:c167ef9d3f4b 1468 0,
Pokitto 7:c167ef9d3f4b 1469 1,
Pokitto 7:c167ef9d3f4b 1470 1,
Pokitto 7:c167ef9d3f4b 1471 1,
Pokitto 7:c167ef9d3f4b 1472 9,
Pokitto 7:c167ef9d3f4b 1473 2, //2
Pokitto 7:c167ef9d3f4b 1474 3,
Pokitto 7:c167ef9d3f4b 1475 4,
Pokitto 7:c167ef9d3f4b 1476 5, //5
Pokitto 7:c167ef9d3f4b 1477 0,
Pokitto 7:c167ef9d3f4b 1478 1,
Pokitto 7:c167ef9d3f4b 1479 1,
Pokitto 7:c167ef9d3f4b 1480 1,
Pokitto 7:c167ef9d3f4b 1481 0,
Pokitto 7:c167ef9d3f4b 1482 0,
Pokitto 7:c167ef9d3f4b 1483 6,
Pokitto 7:c167ef9d3f4b 1484 0,
Pokitto 7:c167ef9d3f4b 1485 0,
Pokitto 7:c167ef9d3f4b 1486 0,
Pokitto 7:c167ef9d3f4b 1487 7,
Pokitto 7:c167ef9d3f4b 1488 8,
Pokitto 7:c167ef9d3f4b 1489 10,
Pokitto 7:c167ef9d3f4b 1490 11,
Pokitto 7:c167ef9d3f4b 1491 12,
Pokitto 7:c167ef9d3f4b 1492 13,
Pokitto 7:c167ef9d3f4b 1493 14,
Pokitto 7:c167ef9d3f4b 1494 15,
Pokitto 7:c167ef9d3f4b 1495 16,
Pokitto 7:c167ef9d3f4b 1496 17,
Pokitto 7:c167ef9d3f4b 1497 18,
Pokitto 7:c167ef9d3f4b 1498 0,
Pokitto 7:c167ef9d3f4b 1499 0,
Pokitto 7:c167ef9d3f4b 1500 0,
Pokitto 7:c167ef9d3f4b 1501 0,
Pokitto 7:c167ef9d3f4b 1502 0,
Pokitto 7:c167ef9d3f4b 1503 0,
Pokitto 7:c167ef9d3f4b 1504 0,
Pokitto 7:c167ef9d3f4b 1505 //0,
Pokitto 7:c167ef9d3f4b 1506 1,
Pokitto 7:c167ef9d3f4b 1507 1,
Pokitto 7:c167ef9d3f4b 1508 1,
Pokitto 7:c167ef9d3f4b 1509 1,
Pokitto 7:c167ef9d3f4b 1510 0,
Pokitto 7:c167ef9d3f4b 1511 0,
Pokitto 7:c167ef9d3f4b 1512 0,
Pokitto 7:c167ef9d3f4b 1513 0,
Pokitto 7:c167ef9d3f4b 1514 0,
Pokitto 7:c167ef9d3f4b 1515 0,
Pokitto 7:c167ef9d3f4b 1516 0,
Pokitto 7:c167ef9d3f4b 1517 0,
Pokitto 7:c167ef9d3f4b 1518 0,
Pokitto 7:c167ef9d3f4b 1519 0,
Pokitto 7:c167ef9d3f4b 1520 0
Pokitto 7:c167ef9d3f4b 1521 };
Pokitto 7:c167ef9d3f4b 1522
Pokitto 7:c167ef9d3f4b 1523 const byte coltypeSys[52] = { //0 = empty 1 = block
Pokitto 7:c167ef9d3f4b 1524 0,
Pokitto 7:c167ef9d3f4b 1525 1,
Pokitto 7:c167ef9d3f4b 1526 1,
Pokitto 7:c167ef9d3f4b 1527 1,
Pokitto 7:c167ef9d3f4b 1528 1,
Pokitto 7:c167ef9d3f4b 1529 1, //2
Pokitto 7:c167ef9d3f4b 1530 1,
Pokitto 7:c167ef9d3f4b 1531 1,
Pokitto 7:c167ef9d3f4b 1532 1, //5
Pokitto 7:c167ef9d3f4b 1533 1,
Pokitto 7:c167ef9d3f4b 1534 1,
Pokitto 7:c167ef9d3f4b 1535 1,
Pokitto 7:c167ef9d3f4b 1536 1,
Pokitto 7:c167ef9d3f4b 1537 1,
Pokitto 7:c167ef9d3f4b 1538 1,
Pokitto 7:c167ef9d3f4b 1539 1,
Pokitto 7:c167ef9d3f4b 1540 1,
Pokitto 7:c167ef9d3f4b 1541 1,
Pokitto 7:c167ef9d3f4b 1542 1,
Pokitto 7:c167ef9d3f4b 1543 1,
Pokitto 7:c167ef9d3f4b 1544 1,
Pokitto 7:c167ef9d3f4b 1545 1,
Pokitto 7:c167ef9d3f4b 1546 1,
Pokitto 7:c167ef9d3f4b 1547 1,
Pokitto 7:c167ef9d3f4b 1548 1,
Pokitto 7:c167ef9d3f4b 1549 1,
Pokitto 7:c167ef9d3f4b 1550 1,
Pokitto 7:c167ef9d3f4b 1551 1,
Pokitto 7:c167ef9d3f4b 1552 1,
Pokitto 7:c167ef9d3f4b 1553 1,
Pokitto 7:c167ef9d3f4b 1554 1,
Pokitto 7:c167ef9d3f4b 1555 1,
Pokitto 7:c167ef9d3f4b 1556 1,
Pokitto 7:c167ef9d3f4b 1557 1,
Pokitto 7:c167ef9d3f4b 1558 1,
Pokitto 7:c167ef9d3f4b 1559 1,
Pokitto 7:c167ef9d3f4b 1560 1,
Pokitto 7:c167ef9d3f4b 1561 1,
Pokitto 7:c167ef9d3f4b 1562 1,
Pokitto 7:c167ef9d3f4b 1563 1,
Pokitto 7:c167ef9d3f4b 1564 1,
Pokitto 7:c167ef9d3f4b 1565 1,
Pokitto 7:c167ef9d3f4b 1566 1,
Pokitto 7:c167ef9d3f4b 1567 1,
Pokitto 7:c167ef9d3f4b 1568 1,
Pokitto 7:c167ef9d3f4b 1569 1,
Pokitto 7:c167ef9d3f4b 1570 1,
Pokitto 7:c167ef9d3f4b 1571 1,
Pokitto 7:c167ef9d3f4b 1572 1,
Pokitto 7:c167ef9d3f4b 1573 1,
Pokitto 7:c167ef9d3f4b 1574 1,
Pokitto 7:c167ef9d3f4b 1575 1
Pokitto 7:c167ef9d3f4b 1576 };
Pokitto 7:c167ef9d3f4b 1577
Pokitto 7:c167ef9d3f4b 1578 //////////////////////////////
Pokitto 7:c167ef9d3f4b 1579 ////GetTile & Var initi. V////
Pokitto 7:c167ef9d3f4b 1580 //////////////////////////////
Pokitto 7:c167ef9d3f4b 1581
Pokitto 7:c167ef9d3f4b 1582
Pokitto 7:c167ef9d3f4b 1583 byte getTile(byte x, byte y){
Pokitto 7:c167ef9d3f4b 1584 return pgm_read_byte(GetMap[MapCursor] + (x+y*MapWidth));
Pokitto 7:c167ef9d3f4b 1585 //return (Maps[CurrentLoadedMap])[x+y*MapWidth];
Pokitto 7:c167ef9d3f4b 1586 }
Pokitto 7:c167ef9d3f4b 1587
Pokitto 7:c167ef9d3f4b 1588 byte getPreviewTile(byte x, byte y){
Pokitto 7:c167ef9d3f4b 1589 return pgm_read_byte(MapsPreviews[MapCursor] + (x+y*3));
Pokitto 7:c167ef9d3f4b 1590 //return MapsPreviews[MapCursor][(x+y*MapWidth)];
Pokitto 7:c167ef9d3f4b 1591 }
Pokitto 7:c167ef9d3f4b 1592
Pokitto 7:c167ef9d3f4b 1593 ///////Sound////////
Pokitto 7:c167ef9d3f4b 1594
Pokitto 7:c167ef9d3f4b 1595 const int soundfx[8][8] = {
Pokitto 7:c167ef9d3f4b 1596 {1,27,90,2,7,7,3,7}, //jump <
Pokitto 7:c167ef9d3f4b 1597 {1,27,112,1,1,1,6,4}, // walljump <
Pokitto 7:c167ef9d3f4b 1598 {0,27,57,1,1,1,6,4}, // unlockdoor <
Pokitto 7:c167ef9d3f4b 1599 {0,9,57,1,6,8,7,8}, // land
Pokitto 7:c167ef9d3f4b 1600 {0,46,57,1,0,18,7,47}, // getkey <
Pokitto 7:c167ef9d3f4b 1601 {0,38,79,3,6,7,7,20}, // finish <
Pokitto 7:c167ef9d3f4b 1602 {0,30,68,3,0,0,7,5}, // click <
Pokitto 7:c167ef9d3f4b 1603 {0,30,55,1,7,0,7,15} //Death <
Pokitto 7:c167ef9d3f4b 1604 };
Pokitto 7:c167ef9d3f4b 1605
Pokitto 7:c167ef9d3f4b 1606 void sfx(int fxno, int channel) {
Pokitto 7:c167ef9d3f4b 1607 gb.sound.command(0, soundfx[fxno][6], 0, channel); // set volume
Pokitto 7:c167ef9d3f4b 1608 gb.sound.command(1, soundfx[fxno][0], 0, channel); // set waveform
Pokitto 7:c167ef9d3f4b 1609 gb.sound.command(2, soundfx[fxno][5], -soundfx[fxno][4], channel); // set volume slide
Pokitto 7:c167ef9d3f4b 1610 gb.sound.command(3, soundfx[fxno][3], soundfx[fxno][2] - 58, channel); // set pitch slide
Pokitto 7:c167ef9d3f4b 1611 gb.sound.playNote(soundfx[fxno][1], soundfx[fxno][7], channel); // play note
Pokitto 7:c167ef9d3f4b 1612 //WAVEFORM, PITCH, PMD, PMT, VMD, VMT, VOL, LENGTH
Pokitto 7:c167ef9d3f4b 1613 }
Pokitto 7:c167ef9d3f4b 1614
Pokitto 7:c167ef9d3f4b 1615 int CPosX = 0; //Cam Position
Pokitto 7:c167ef9d3f4b 1616 int CPosY = 0;
Pokitto 7:c167ef9d3f4b 1617
Pokitto 7:c167ef9d3f4b 1618 float PPosX = 0; //Player Position
Pokitto 7:c167ef9d3f4b 1619 float PPosY = 0;
Pokitto 7:c167ef9d3f4b 1620
Pokitto 7:c167ef9d3f4b 1621 byte SquisheVertical = 8; //Player squishness :)
Pokitto 7:c167ef9d3f4b 1622 byte SquisheHorizontal = 8;
Pokitto 7:c167ef9d3f4b 1623
Pokitto 7:c167ef9d3f4b 1624 signed char VelocityX; //Velocity (used for physics)
Pokitto 7:c167ef9d3f4b 1625 signed char VelocityY;
Pokitto 7:c167ef9d3f4b 1626
Pokitto 7:c167ef9d3f4b 1627 ///////////////////
Pokitto 7:c167ef9d3f4b 1628 ////EnnemieAi V////
Pokitto 7:c167ef9d3f4b 1629 ///////////////////
Pokitto 7:c167ef9d3f4b 1630
Pokitto 7:c167ef9d3f4b 1631 class EnnemieAI {
Pokitto 7:c167ef9d3f4b 1632 private:
Pokitto 7:c167ef9d3f4b 1633 byte PosX;
Pokitto 7:c167ef9d3f4b 1634 byte PosY;
Pokitto 7:c167ef9d3f4b 1635
Pokitto 7:c167ef9d3f4b 1636 byte Progress;
Pokitto 7:c167ef9d3f4b 1637
Pokitto 7:c167ef9d3f4b 1638 boolean GoRight;
Pokitto 7:c167ef9d3f4b 1639 boolean Pre;
Pokitto 7:c167ef9d3f4b 1640
Pokitto 7:c167ef9d3f4b 1641 void ChangeDirection () {
Pokitto 7:c167ef9d3f4b 1642 GoRight = !GoRight;
Pokitto 7:c167ef9d3f4b 1643 }
Pokitto 7:c167ef9d3f4b 1644
Pokitto 7:c167ef9d3f4b 1645 bool SimplePixInColl (byte PIMX, byte PIMY) { //PIM = Pos in map (0-255), PIC = Pos in cube (0-8)
Pokitto 7:c167ef9d3f4b 1646 byte GlobalColiderType = coltype[getTile(PIMX,PIMY)];
Pokitto 7:c167ef9d3f4b 1647
Pokitto 7:c167ef9d3f4b 1648 if(GlobalColiderType == 0) {
Pokitto 7:c167ef9d3f4b 1649 return false;
Pokitto 7:c167ef9d3f4b 1650 } else if(GlobalColiderType == 16 || GlobalColiderType == 17) {
Pokitto 7:c167ef9d3f4b 1651 return false;
Pokitto 7:c167ef9d3f4b 1652 } else if(GlobalColiderType == 15) {
Pokitto 7:c167ef9d3f4b 1653 return false;
Pokitto 7:c167ef9d3f4b 1654 } else {
Pokitto 7:c167ef9d3f4b 1655 return true;
Pokitto 7:c167ef9d3f4b 1656 }
Pokitto 7:c167ef9d3f4b 1657 }
Pokitto 7:c167ef9d3f4b 1658
Pokitto 7:c167ef9d3f4b 1659 public:
Pokitto 7:c167ef9d3f4b 1660 EnnemieAI() {
Pokitto 7:c167ef9d3f4b 1661 Progress = 0;
Pokitto 7:c167ef9d3f4b 1662 GoRight = true;
Pokitto 7:c167ef9d3f4b 1663 Pre = false;
Pokitto 7:c167ef9d3f4b 1664 }
Pokitto 7:c167ef9d3f4b 1665
Pokitto 7:c167ef9d3f4b 1666 void DefinePos (byte PositionX, byte PositionY) {
Pokitto 7:c167ef9d3f4b 1667 PosX = PositionX;
Pokitto 7:c167ef9d3f4b 1668 PosY = PositionY;
Pokitto 7:c167ef9d3f4b 1669 }
Pokitto 7:c167ef9d3f4b 1670
Pokitto 7:c167ef9d3f4b 1671 byte GetPosX () {
Pokitto 7:c167ef9d3f4b 1672 return PosX;
Pokitto 7:c167ef9d3f4b 1673 }
Pokitto 7:c167ef9d3f4b 1674
Pokitto 7:c167ef9d3f4b 1675 byte GetPosY () {
Pokitto 7:c167ef9d3f4b 1676 return PosY;
Pokitto 7:c167ef9d3f4b 1677 }
Pokitto 7:c167ef9d3f4b 1678
Pokitto 7:c167ef9d3f4b 1679 boolean GetDirection () {
Pokitto 7:c167ef9d3f4b 1680 return GoRight;
Pokitto 7:c167ef9d3f4b 1681 }
Pokitto 7:c167ef9d3f4b 1682
Pokitto 7:c167ef9d3f4b 1683 void update () {
Pokitto 7:c167ef9d3f4b 1684 if(Progress > 2) {
Pokitto 7:c167ef9d3f4b 1685 Progress = 0;
Pokitto 7:c167ef9d3f4b 1686 } else {
Pokitto 7:c167ef9d3f4b 1687 Progress++;
Pokitto 7:c167ef9d3f4b 1688 if(GoRight) {
Pokitto 7:c167ef9d3f4b 1689 if(!SimplePixInColl((floor((PosX + 5) / 8.0)) , (floor((PosY + 3) / 8.0)))) {
Pokitto 7:c167ef9d3f4b 1690 PosX++;
Pokitto 7:c167ef9d3f4b 1691 } else {
Pokitto 7:c167ef9d3f4b 1692 ChangeDirection();
Pokitto 7:c167ef9d3f4b 1693 }
Pokitto 7:c167ef9d3f4b 1694 }
Pokitto 7:c167ef9d3f4b 1695 if(!GoRight) {
Pokitto 7:c167ef9d3f4b 1696 if(!SimplePixInColl((floor((PosX - 5) / 8.0)) , (floor((PosY + 3) / 8.0)))) {
Pokitto 7:c167ef9d3f4b 1697 PosX--;
Pokitto 7:c167ef9d3f4b 1698 } else {
Pokitto 7:c167ef9d3f4b 1699 ChangeDirection();
Pokitto 7:c167ef9d3f4b 1700 }
Pokitto 7:c167ef9d3f4b 1701 }
Pokitto 7:c167ef9d3f4b 1702 }
Pokitto 7:c167ef9d3f4b 1703 Pre = false;
Pokitto 7:c167ef9d3f4b 1704 byte ColY[8];
Pokitto 7:c167ef9d3f4b 1705 for(int yd=0; yd < 8; yd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 1706 ColY[yd] = SimplePixInColl((floor((PosX - 3 + yd) / 8.0)) , (floor((PosY + /*4*/4 + 0) / 8.0)));
Pokitto 7:c167ef9d3f4b 1707 }
Pokitto 7:c167ef9d3f4b 1708 for(int yd=0; yd < 8; yd++) {
Pokitto 7:c167ef9d3f4b 1709 if(ColY[yd] == 1) {
Pokitto 7:c167ef9d3f4b 1710 Pre = true;
Pokitto 7:c167ef9d3f4b 1711 break;
Pokitto 7:c167ef9d3f4b 1712 }
Pokitto 7:c167ef9d3f4b 1713 }
Pokitto 7:c167ef9d3f4b 1714 if(!Pre) {
Pokitto 7:c167ef9d3f4b 1715 PosY++;
Pokitto 7:c167ef9d3f4b 1716 }
Pokitto 7:c167ef9d3f4b 1717 }
Pokitto 7:c167ef9d3f4b 1718 };
Pokitto 7:c167ef9d3f4b 1719
Pokitto 7:c167ef9d3f4b 1720 EnnemieAI* ennemieArray;
Pokitto 7:c167ef9d3f4b 1721
Pokitto 7:c167ef9d3f4b 1722 ///////////////////////////////
Pokitto 7:c167ef9d3f4b 1723 ////Setup & PlayerDrawing V////
Pokitto 7:c167ef9d3f4b 1724 ///////////////////////////////
Pokitto 7:c167ef9d3f4b 1725
Pokitto 7:c167ef9d3f4b 1726 void setup() {
Pokitto 7:c167ef9d3f4b 1727 // put your setup code here, to run once:
Pokitto 7:c167ef9d3f4b 1728 gb.begin();
Pokitto 7:c167ef9d3f4b 1729 gb.display.palette[0]=COLOR_MAGENTA;
Pokitto 7:c167ef9d3f4b 1730 gb.display.palette[1]=COLOR_BLACK;
Pokitto 7:c167ef9d3f4b 1731 gb.titleScreen(("v1.0"),Logo);
Pokitto 7:c167ef9d3f4b 1732 gb.battery.show = false;
Pokitto 7:c167ef9d3f4b 1733 gb.setFrameRate(20);
Pokitto 7:c167ef9d3f4b 1734
Pokitto 7:c167ef9d3f4b 1735 //LevelsUnlock = EEPROM.read(0);
Pokitto 7:c167ef9d3f4b 1736 }
Pokitto 7:c167ef9d3f4b 1737
Pokitto 7:c167ef9d3f4b 1738 void DrawPlayer () { //Draw player based on squisness
Pokitto 7:c167ef9d3f4b 1739 if(GoingRight == true) {
Pokitto 7:c167ef9d3f4b 1740 gb.display.fillRect(CPosX - (PPosX + SquisheHorizontal/2.0) + 8, CPosY - (PPosY + SquisheVertical/2.0) + 8, SquisheHorizontal, SquisheVertical);
Pokitto 7:c167ef9d3f4b 1741 gb.display.setColor(WHITE,WHITE);
Pokitto 7:c167ef9d3f4b 1742 gb.display.drawFastVLine(CPosX - (PPosX + SquisheHorizontal/2.0) + 6 + SquisheHorizontal, CPosY - (PPosY + SquisheVertical/2.0) + 10, 2);
Pokitto 7:c167ef9d3f4b 1743 gb.display.drawFastVLine(CPosX - (PPosX + SquisheHorizontal/2.0) + 3 + SquisheHorizontal, CPosY - (PPosY + SquisheVertical/2.0) + 10, 2);
Pokitto 7:c167ef9d3f4b 1744 gb.display.setColor(BLACK,WHITE);
Pokitto 7:c167ef9d3f4b 1745 } else {
Pokitto 7:c167ef9d3f4b 1746 gb.display.fillRect(CPosX - (PPosX + SquisheHorizontal/2.0) + 8, CPosY - (PPosY + SquisheVertical/2.0) + 8, SquisheHorizontal, SquisheVertical);
Pokitto 7:c167ef9d3f4b 1747 gb.display.setColor(WHITE,WHITE);
Pokitto 7:c167ef9d3f4b 1748 gb.display.drawFastVLine(CPosX - (PPosX + SquisheHorizontal/2.0) + 9, CPosY - (PPosY + SquisheVertical/2.0) + 10, 2);
Pokitto 7:c167ef9d3f4b 1749 gb.display.drawFastVLine(CPosX - (PPosX + SquisheHorizontal/2.0) + 12, CPosY - (PPosY + SquisheVertical/2.0) + 10, 2);
Pokitto 7:c167ef9d3f4b 1750 gb.display.setColor(BLACK,WHITE);
Pokitto 7:c167ef9d3f4b 1751 }
Pokitto 7:c167ef9d3f4b 1752 }
Pokitto 7:c167ef9d3f4b 1753
Pokitto 7:c167ef9d3f4b 1754 ////////////////
Pokitto 7:c167ef9d3f4b 1755 ////Camera V////
Pokitto 7:c167ef9d3f4b 1756 ////////////////
Pokitto 7:c167ef9d3f4b 1757
Pokitto 7:c167ef9d3f4b 1758
Pokitto 7:c167ef9d3f4b 1759
Pokitto 7:c167ef9d3f4b 1760 int ClampInt (int minv, int maxv, int value) {
Pokitto 7:c167ef9d3f4b 1761 if(value < minv)
Pokitto 7:c167ef9d3f4b 1762 return minv;
Pokitto 7:c167ef9d3f4b 1763 else if(value >= maxv)
Pokitto 7:c167ef9d3f4b 1764 return maxv;
Pokitto 7:c167ef9d3f4b 1765 else
Pokitto 7:c167ef9d3f4b 1766 return value;
Pokitto 7:c167ef9d3f4b 1767 }
Pokitto 7:c167ef9d3f4b 1768
Pokitto 7:c167ef9d3f4b 1769 void ClampCamera () { //Clamp the camera in the world
Pokitto 7:c167ef9d3f4b 1770 if(MapWidth < 11) {
Pokitto 7:c167ef9d3f4b 1771 CPosX = (LCDWIDTH - MapWidth*8)/2;
Pokitto 7:c167ef9d3f4b 1772 } else {
Pokitto 7:c167ef9d3f4b 1773 CPosX = ClampInt(-(8*MapWidth-LCDWidth),0,PPosX+(LCDWIDTH/2)-8);
Pokitto 7:c167ef9d3f4b 1774 }
Pokitto 7:c167ef9d3f4b 1775 CPosY = ClampInt(-(8*MapHeigth-LCDHeight),-8,PPosY+(LCDHEIGHT/2)-8);
Pokitto 7:c167ef9d3f4b 1776 }
Pokitto 7:c167ef9d3f4b 1777 ///////////////////
Pokitto 7:c167ef9d3f4b 1778 ////Colliding V////
Pokitto 7:c167ef9d3f4b 1779 ///////////////////
Pokitto 7:c167ef9d3f4b 1780
Pokitto 7:c167ef9d3f4b 1781 byte GetTPSer1X(byte i) {
Pokitto 7:c167ef9d3f4b 1782 return pgm_read_byte(TeleporterSerie1X + i);
Pokitto 7:c167ef9d3f4b 1783 }
Pokitto 7:c167ef9d3f4b 1784
Pokitto 7:c167ef9d3f4b 1785 byte GetTPSer1Y(byte i) {
Pokitto 7:c167ef9d3f4b 1786 return pgm_read_byte(TeleporterSerie1Y + i);
Pokitto 7:c167ef9d3f4b 1787 }
Pokitto 7:c167ef9d3f4b 1788
Pokitto 7:c167ef9d3f4b 1789 byte GetTPSer2X(byte i) {
Pokitto 7:c167ef9d3f4b 1790 return pgm_read_byte(TeleporterSerie2X + i);
Pokitto 7:c167ef9d3f4b 1791 }
Pokitto 7:c167ef9d3f4b 1792
Pokitto 7:c167ef9d3f4b 1793 byte GetTPSer2Y(byte i) {
Pokitto 7:c167ef9d3f4b 1794 return pgm_read_byte(TeleporterSerie2Y + i);
Pokitto 7:c167ef9d3f4b 1795 }
Pokitto 7:c167ef9d3f4b 1796
Pokitto 7:c167ef9d3f4b 1797 int PixelInCollider (byte PIMX, byte PIMY, byte PICX, byte PICY) { //PIM = Pos in map (0-255), PIC = Pos in cube (0-8)
Pokitto 7:c167ef9d3f4b 1798
Pokitto 7:c167ef9d3f4b 1799 byte GlobalColiderType = coltype[getTile(PIMX,PIMY)];
Pokitto 7:c167ef9d3f4b 1800
Pokitto 7:c167ef9d3f4b 1801 byte x1;
Pokitto 7:c167ef9d3f4b 1802 byte y1;
Pokitto 7:c167ef9d3f4b 1803 byte x2;
Pokitto 7:c167ef9d3f4b 1804 byte y2;
Pokitto 7:c167ef9d3f4b 1805
Pokitto 7:c167ef9d3f4b 1806 byte Value = 0;
Pokitto 7:c167ef9d3f4b 1807 switch (GlobalColiderType) {
Pokitto 7:c167ef9d3f4b 1808 case 0:
Pokitto 7:c167ef9d3f4b 1809 Value = 1;
Pokitto 7:c167ef9d3f4b 1810 break;
Pokitto 7:c167ef9d3f4b 1811 case 1:
Pokitto 7:c167ef9d3f4b 1812 Value = 2;
Pokitto 7:c167ef9d3f4b 1813 break;
Pokitto 7:c167ef9d3f4b 1814 case 2:
Pokitto 7:c167ef9d3f4b 1815 x1 = 1;
Pokitto 7:c167ef9d3f4b 1816 y1 = 0;
Pokitto 7:c167ef9d3f4b 1817 x2 = 6;
Pokitto 7:c167ef9d3f4b 1818 y2 = 3;
Pokitto 7:c167ef9d3f4b 1819 break;
Pokitto 7:c167ef9d3f4b 1820 case 3:
Pokitto 7:c167ef9d3f4b 1821 //Teleporter0
Pokitto 7:c167ef9d3f4b 1822 for(int a = 0; a < TeleporterCount; a++) {
Pokitto 7:c167ef9d3f4b 1823 if(GetTPSer1X(a) == PIMX && GetTPSer1Y(a) == PIMY) {
Pokitto 7:c167ef9d3f4b 1824 //Found = true;
Pokitto 7:c167ef9d3f4b 1825 PPosX = -((float)GetTPSer2X(a)*8) + 13;
Pokitto 7:c167ef9d3f4b 1826 PPosY = -((float)GetTPSer2Y(a)*8) + 4; //Reverse
Pokitto 7:c167ef9d3f4b 1827 VelocityX = 63;
Pokitto 7:c167ef9d3f4b 1828 VelocityY = 40;
Pokitto 7:c167ef9d3f4b 1829 }
Pokitto 7:c167ef9d3f4b 1830 if(GetTPSer2X(a) == PIMX && GetTPSer2Y(a) == PIMY) {
Pokitto 7:c167ef9d3f4b 1831 //Found = true;
Pokitto 7:c167ef9d3f4b 1832 PPosX = -((float)GetTPSer1X(a)*8) + 13;
Pokitto 7:c167ef9d3f4b 1833 PPosY = -((float)GetTPSer1Y(a)*8) + 4;
Pokitto 7:c167ef9d3f4b 1834 VelocityX = 63;
Pokitto 7:c167ef9d3f4b 1835 VelocityY = 40;
Pokitto 7:c167ef9d3f4b 1836 }
Pokitto 7:c167ef9d3f4b 1837 }
Pokitto 7:c167ef9d3f4b 1838 break;
Pokitto 7:c167ef9d3f4b 1839 case 4:
Pokitto 7:c167ef9d3f4b 1840 //Teleporter0
Pokitto 7:c167ef9d3f4b 1841 for(int a = 0; a < TeleporterCount; a++) {
Pokitto 7:c167ef9d3f4b 1842 if(GetTPSer1X(a) == PIMX && GetTPSer1Y(a) == PIMY) {
Pokitto 7:c167ef9d3f4b 1843 //Found = true;
Pokitto 7:c167ef9d3f4b 1844 PPosX = -((float)GetTPSer2X(a)*8) - 5;
Pokitto 7:c167ef9d3f4b 1845 PPosY = -((float)GetTPSer2Y(a)*8) + 4; //Reverse
Pokitto 7:c167ef9d3f4b 1846 VelocityX = -63;
Pokitto 7:c167ef9d3f4b 1847 AC = true;
Pokitto 7:c167ef9d3f4b 1848 VelocityY = 40;
Pokitto 7:c167ef9d3f4b 1849 }
Pokitto 7:c167ef9d3f4b 1850 if(GetTPSer2X(a) == PIMX && GetTPSer2Y(a) == PIMY) {
Pokitto 7:c167ef9d3f4b 1851 //Found = true;
Pokitto 7:c167ef9d3f4b 1852 PPosX = -((float)GetTPSer1X(a)*8) - 5;
Pokitto 7:c167ef9d3f4b 1853 PPosY = -((float)GetTPSer1Y(a)*8) + 4;
Pokitto 7:c167ef9d3f4b 1854 VelocityX = -63;
Pokitto 7:c167ef9d3f4b 1855 AC = true;
Pokitto 7:c167ef9d3f4b 1856 VelocityY = 40;
Pokitto 7:c167ef9d3f4b 1857 }
Pokitto 7:c167ef9d3f4b 1858 }
Pokitto 7:c167ef9d3f4b 1859 break;
Pokitto 7:c167ef9d3f4b 1860 case 5:
Pokitto 7:c167ef9d3f4b 1861 x1 = 0;
Pokitto 7:c167ef9d3f4b 1862 y1 = 0;
Pokitto 7:c167ef9d3f4b 1863 x2 = 4;
Pokitto 7:c167ef9d3f4b 1864 y2 = 8;
Pokitto 7:c167ef9d3f4b 1865 break;
Pokitto 7:c167ef9d3f4b 1866 case 6:
Pokitto 7:c167ef9d3f4b 1867 if(PistonPressed) {
Pokitto 7:c167ef9d3f4b 1868 Value = 2;
Pokitto 7:c167ef9d3f4b 1869 } else {
Pokitto 7:c167ef9d3f4b 1870 Value = 1;
Pokitto 7:c167ef9d3f4b 1871 }
Pokitto 7:c167ef9d3f4b 1872 break;
Pokitto 7:c167ef9d3f4b 1873 case 7:
Pokitto 7:c167ef9d3f4b 1874 //That's the key
Pokitto 7:c167ef9d3f4b 1875 Value = 1;
Pokitto 7:c167ef9d3f4b 1876 for(int a = 0; a < KeyCount; a++) {
Pokitto 7:c167ef9d3f4b 1877 if(KeyX[a] == PIMX && KeyY[a] == PIMY) {
Pokitto 7:c167ef9d3f4b 1878 if(!KeyGot[a]) {
Pokitto 7:c167ef9d3f4b 1879 sfx(4, 1);
Pokitto 7:c167ef9d3f4b 1880 KeysGot++;
Pokitto 7:c167ef9d3f4b 1881 KeyGot[a] = true;
Pokitto 7:c167ef9d3f4b 1882 break;
Pokitto 7:c167ef9d3f4b 1883 }
Pokitto 7:c167ef9d3f4b 1884 }
Pokitto 7:c167ef9d3f4b 1885 }
Pokitto 7:c167ef9d3f4b 1886 break;
Pokitto 7:c167ef9d3f4b 1887 case 8:
Pokitto 7:c167ef9d3f4b 1888 //That's the locker
Pokitto 7:c167ef9d3f4b 1889 if(KeysGot > 0) {
Pokitto 7:c167ef9d3f4b 1890 for(int a = 0; a < LockerCount; a++) {
Pokitto 7:c167ef9d3f4b 1891 if(LockerX[a] == PIMX && LockerY[a] == PIMY) {
Pokitto 7:c167ef9d3f4b 1892 if(LockerGot[a] == false) {
Pokitto 7:c167ef9d3f4b 1893 sfx(2, 1);
Pokitto 7:c167ef9d3f4b 1894 LockerGot[a] = true;
Pokitto 7:c167ef9d3f4b 1895 KeysGot--;
Pokitto 7:c167ef9d3f4b 1896 break;
Pokitto 7:c167ef9d3f4b 1897 }
Pokitto 7:c167ef9d3f4b 1898 }
Pokitto 7:c167ef9d3f4b 1899 }
Pokitto 7:c167ef9d3f4b 1900 }
Pokitto 7:c167ef9d3f4b 1901 for(int a = 0; a < LockerCount; a++) {
Pokitto 7:c167ef9d3f4b 1902 if(LockerX[a] == PIMX && LockerY[a] == PIMY) {
Pokitto 7:c167ef9d3f4b 1903 if(LockerGot[a]) {
Pokitto 7:c167ef9d3f4b 1904 Value = 1;
Pokitto 7:c167ef9d3f4b 1905 } else {
Pokitto 7:c167ef9d3f4b 1906 Value = 2;
Pokitto 7:c167ef9d3f4b 1907 }
Pokitto 7:c167ef9d3f4b 1908 break;
Pokitto 7:c167ef9d3f4b 1909 } else {
Pokitto 7:c167ef9d3f4b 1910 Value = 2;
Pokitto 7:c167ef9d3f4b 1911 }
Pokitto 7:c167ef9d3f4b 1912 }
Pokitto 7:c167ef9d3f4b 1913 break;
Pokitto 7:c167ef9d3f4b 1914 case 9:
Pokitto 7:c167ef9d3f4b 1915 x1 = 0;
Pokitto 7:c167ef9d3f4b 1916 y1 = 0;
Pokitto 7:c167ef9d3f4b 1917 x2 = 7;
Pokitto 7:c167ef9d3f4b 1918 y2 = 7;
Pokitto 7:c167ef9d3f4b 1919 PistonPressed = true;
Pokitto 7:c167ef9d3f4b 1920 break;
Pokitto 7:c167ef9d3f4b 1921 case 10:
Pokitto 7:c167ef9d3f4b 1922 x1 = 2;
Pokitto 7:c167ef9d3f4b 1923 y1 = 5;
Pokitto 7:c167ef9d3f4b 1924 x2 = 7;
Pokitto 7:c167ef9d3f4b 1925 y2 = 7;
Pokitto 7:c167ef9d3f4b 1926 if(7-PICX >= x1 && 7-PICX <= x2 && 7-PICY>= y1 && 7-PICY<= y2) {
Pokitto 7:c167ef9d3f4b 1927 sfx(7, 1);
Pokitto 7:c167ef9d3f4b 1928 Die();
Pokitto 7:c167ef9d3f4b 1929 }
Pokitto 7:c167ef9d3f4b 1930 break;
Pokitto 7:c167ef9d3f4b 1931 case 11:
Pokitto 7:c167ef9d3f4b 1932 sfx(5, 2);
Pokitto 7:c167ef9d3f4b 1933 UnlockNext();
Pokitto 7:c167ef9d3f4b 1934 break;
Pokitto 7:c167ef9d3f4b 1935 case 12:
Pokitto 7:c167ef9d3f4b 1936 x1 = 0;
Pokitto 7:c167ef9d3f4b 1937 y1 = 0;
Pokitto 7:c167ef9d3f4b 1938 x2 = 7;
Pokitto 7:c167ef9d3f4b 1939 y2 = 4;
Pokitto 7:c167ef9d3f4b 1940 if(7-PICX >= x1 && 7-PICX <= x2 && 7-PICY>= y1 && 7-PICY<= y2) {
Pokitto 7:c167ef9d3f4b 1941 VelocityX = 30;
Pokitto 7:c167ef9d3f4b 1942 ACT = 0;
Pokitto 7:c167ef9d3f4b 1943 }
Pokitto 7:c167ef9d3f4b 1944 break;
Pokitto 7:c167ef9d3f4b 1945 case 13:
Pokitto 7:c167ef9d3f4b 1946 x1 = 0;
Pokitto 7:c167ef9d3f4b 1947 y1 = 0;
Pokitto 7:c167ef9d3f4b 1948 x2 = 7;
Pokitto 7:c167ef9d3f4b 1949 y2 = 4;
Pokitto 7:c167ef9d3f4b 1950 if(7-PICX >= x1 && 7-PICX <= x2 && 7-PICY>= y1 && 7-PICY<= y2) {
Pokitto 7:c167ef9d3f4b 1951 VelocityY = -30;
Pokitto 7:c167ef9d3f4b 1952 ACT = 1;
Pokitto 7:c167ef9d3f4b 1953 }
Pokitto 7:c167ef9d3f4b 1954 break;
Pokitto 7:c167ef9d3f4b 1955 case 14:
Pokitto 7:c167ef9d3f4b 1956 x1 = 0;
Pokitto 7:c167ef9d3f4b 1957 y1 = 3;
Pokitto 7:c167ef9d3f4b 1958 x2 = 7;
Pokitto 7:c167ef9d3f4b 1959 y2 = 7;
Pokitto 7:c167ef9d3f4b 1960 break;
Pokitto 7:c167ef9d3f4b 1961 case 15:
Pokitto 7:c167ef9d3f4b 1962 x1 = 0;
Pokitto 7:c167ef9d3f4b 1963 y1 = 0;
Pokitto 7:c167ef9d3f4b 1964 x2 = 7;
Pokitto 7:c167ef9d3f4b 1965 y2 = 7;
Pokitto 7:c167ef9d3f4b 1966 VelocityY = 110;
Pokitto 7:c167ef9d3f4b 1967 ACT = 2;
Pokitto 7:c167ef9d3f4b 1968 break;
Pokitto 7:c167ef9d3f4b 1969 case 16:
Pokitto 7:c167ef9d3f4b 1970 x1 = 0;
Pokitto 7:c167ef9d3f4b 1971 y1 = 0;
Pokitto 7:c167ef9d3f4b 1972 x2 = 7;
Pokitto 7:c167ef9d3f4b 1973 y2 = 7;
Pokitto 7:c167ef9d3f4b 1974 PistonPressed = false;
Pokitto 7:c167ef9d3f4b 1975 break;
Pokitto 7:c167ef9d3f4b 1976 case 17:
Pokitto 7:c167ef9d3f4b 1977 if(!PistonPressed) {
Pokitto 7:c167ef9d3f4b 1978 Value = 2;
Pokitto 7:c167ef9d3f4b 1979 } else {
Pokitto 7:c167ef9d3f4b 1980 Value = 1;
Pokitto 7:c167ef9d3f4b 1981 }
Pokitto 7:c167ef9d3f4b 1982 break;
Pokitto 7:c167ef9d3f4b 1983 case 18:
Pokitto 7:c167ef9d3f4b 1984 LoadCineEnd();
Pokitto 7:c167ef9d3f4b 1985 break;
Pokitto 7:c167ef9d3f4b 1986 default:
Pokitto 7:c167ef9d3f4b 1987 Value = 1;
Pokitto 7:c167ef9d3f4b 1988 break;
Pokitto 7:c167ef9d3f4b 1989 }
Pokitto 7:c167ef9d3f4b 1990
Pokitto 7:c167ef9d3f4b 1991 if(Value == 0) {
Pokitto 7:c167ef9d3f4b 1992 if(7-PICX >= x1 && 7-PICX <= x2 && 7-PICY>= y1 && 7-PICY<= y2) {
Pokitto 7:c167ef9d3f4b 1993 Value = 2;
Pokitto 7:c167ef9d3f4b 1994 } else {
Pokitto 7:c167ef9d3f4b 1995 Value = 1;
Pokitto 7:c167ef9d3f4b 1996 }
Pokitto 7:c167ef9d3f4b 1997 }
Pokitto 7:c167ef9d3f4b 1998 return Value - 1;
Pokitto 7:c167ef9d3f4b 1999 }
Pokitto 7:c167ef9d3f4b 2000
Pokitto 7:c167ef9d3f4b 2001 void CheckForCollider () { //Based on current velocity //Need improvement to support BigWhiteBox
Pokitto 7:c167ef9d3f4b 2002 if(VelocityX != 0) {
Pokitto 7:c167ef9d3f4b 2003 byte ColX[8];
Pokitto 7:c167ef9d3f4b 2004 if(VelocityX > 0) {
Pokitto 7:c167ef9d3f4b 2005 for(int xd=0; xd < 8; xd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 2006 ColX[xd] = PixelInCollider( (-(floor((PPosX + 5 + 0) / 8.0))) , (-(floor((PPosY - 3 + xd) / 8.0))) , -(-(PPosX + 5/*e5<4*/ + 0) - (-(floor((PPosX + 5/*e5<4*/ + 0) / 8.0)))*8) , -(-(PPosY - 3 + xd) - (-(floor((PPosY - 3 + xd) / 8.0)))*8) );
Pokitto 7:c167ef9d3f4b 2007 }
Pokitto 7:c167ef9d3f4b 2008 for(int xd=0; xd < 8; xd++) {
Pokitto 7:c167ef9d3f4b 2009 if(ColX[xd] == 1) {
Pokitto 7:c167ef9d3f4b 2010 //gb.popup(F("A wall has been detected"), 20);
Pokitto 7:c167ef9d3f4b 2011 VelocityX = 0;
Pokitto 7:c167ef9d3f4b 2012 GroundedLeft = true;
Pokitto 7:c167ef9d3f4b 2013 }
Pokitto 7:c167ef9d3f4b 2014 }
Pokitto 7:c167ef9d3f4b 2015 }
Pokitto 7:c167ef9d3f4b 2016
Pokitto 7:c167ef9d3f4b 2017 if(VelocityX < 0) {
Pokitto 7:c167ef9d3f4b 2018 for(int xd=0; xd < 8; xd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 2019 ColX[xd] = PixelInCollider( (-(floor((PPosX - 4 + 0) / 8.0))) , (-(floor((PPosY - 3 + xd) / 8.0))) , -(-(PPosX - 4 + 0) - (-(floor((PPosX - 4 + 0) / 8.0)))*8) , -(-(PPosY - 3 + xd) - (-(floor((PPosY - 3 + xd) / 8.0)))*8) );
Pokitto 7:c167ef9d3f4b 2020 }
Pokitto 7:c167ef9d3f4b 2021 }
Pokitto 7:c167ef9d3f4b 2022 for(int xd=0; xd < 8; xd++) {
Pokitto 7:c167ef9d3f4b 2023 if(ColX[xd] == 1) {
Pokitto 7:c167ef9d3f4b 2024 //gb.popup(F("A wall has been detected"), 20);
Pokitto 7:c167ef9d3f4b 2025 VelocityX = 0;
Pokitto 7:c167ef9d3f4b 2026 GroundedRight = true;
Pokitto 7:c167ef9d3f4b 2027 }
Pokitto 7:c167ef9d3f4b 2028 }
Pokitto 7:c167ef9d3f4b 2029 }
Pokitto 7:c167ef9d3f4b 2030
Pokitto 7:c167ef9d3f4b 2031
Pokitto 7:c167ef9d3f4b 2032 //working stuff V
Pokitto 7:c167ef9d3f4b 2033
Pokitto 7:c167ef9d3f4b 2034
Pokitto 7:c167ef9d3f4b 2035 if(VelocityY != 0) {
Pokitto 7:c167ef9d3f4b 2036 byte ColY[8];
Pokitto 7:c167ef9d3f4b 2037 if(VelocityY > 0) {
Pokitto 7:c167ef9d3f4b 2038 for(int yd=0; yd < 8; yd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 2039 ColY[yd] = PixelInCollider((-(floor((PPosX - 3 + yd) / 8.0))) , (-(floor((PPosY + 5 + 0) / 8.0))) , -(-(PPosX - 3 + yd) - (-(floor((PPosX - 3 + yd) / 8.0)))*8) , -(-(PPosY + 5/*e5*/ + 0) - (-(floor((PPosY + 5/*e5*/ + 0) / 8.0)))*8));
Pokitto 7:c167ef9d3f4b 2040 }
Pokitto 7:c167ef9d3f4b 2041 for(int yd=0; yd < 8; yd++) {
Pokitto 7:c167ef9d3f4b 2042 if(ColY[yd] == 1) {
Pokitto 7:c167ef9d3f4b 2043 VelocityY = 0;
Pokitto 7:c167ef9d3f4b 2044 }
Pokitto 7:c167ef9d3f4b 2045 }
Pokitto 7:c167ef9d3f4b 2046 }
Pokitto 7:c167ef9d3f4b 2047 if(VelocityY < 0) {
Pokitto 7:c167ef9d3f4b 2048 for(int yd=0; yd < 8; yd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 2049 ColY[yd] = PixelInCollider((-(floor((PPosX - 3 + yd) / 8.0))) , (-(floor((PPosY - 4 + 0) / 8.0))) , -(-(PPosX - 3/*e3*/ + yd) - (-(floor((PPosX - 3/*e3*/ + yd) / 8.0)))*8) , -(-(PPosY - 4/*e4*/ + 0) - (-(floor((PPosY - 4/*e4*/ + 0) / 8.0)))*8));
Pokitto 7:c167ef9d3f4b 2050 }
Pokitto 7:c167ef9d3f4b 2051 for(int yd=0; yd < 8; yd++) {
Pokitto 7:c167ef9d3f4b 2052 if(ColY[yd] == 1) {
Pokitto 7:c167ef9d3f4b 2053 VelocityY = 0;
Pokitto 7:c167ef9d3f4b 2054 GroundedDown = true;
Pokitto 7:c167ef9d3f4b 2055 }
Pokitto 7:c167ef9d3f4b 2056 }
Pokitto 7:c167ef9d3f4b 2057 }
Pokitto 7:c167ef9d3f4b 2058 }
Pokitto 7:c167ef9d3f4b 2059
Pokitto 7:c167ef9d3f4b 2060 byte ColG[6];
Pokitto 7:c167ef9d3f4b 2061
Pokitto 7:c167ef9d3f4b 2062 for(int yd=0; yd < 6; yd++) { //yd = Y Down
Pokitto 7:c167ef9d3f4b 2063 ColG[yd] = PixelInCollider((-(floor((PPosX - 2 + yd) / 8.0))) , (-(floor((PPosY - 3 + 0) / 8.0))) , -(-(PPosX - 2/*e3*/ + yd) - (-(floor((PPosX - 2/*e3*/ + yd) / 8.0)))*8) , -(-(PPosY - 3/*e4*/ + 0) - (-(floor((PPosY - 3/*e4*/ + 0) / 8.0)))*8));
Pokitto 7:c167ef9d3f4b 2064 }
Pokitto 7:c167ef9d3f4b 2065 for(int yd=0; yd < 6; yd++) {
Pokitto 7:c167ef9d3f4b 2066 if(ColG[yd] == 1) {
Pokitto 7:c167ef9d3f4b 2067 VelocityY = 30;
Pokitto 7:c167ef9d3f4b 2068 }
Pokitto 7:c167ef9d3f4b 2069 }
Pokitto 7:c167ef9d3f4b 2070 }
Pokitto 7:c167ef9d3f4b 2071
Pokitto 7:c167ef9d3f4b 2072 //////////////////////
Pokitto 7:c167ef9d3f4b 2073 ////PreparingMap V////
Pokitto 7:c167ef9d3f4b 2074 //////////////////////
Pokitto 7:c167ef9d3f4b 2075
Pokitto 7:c167ef9d3f4b 2076 void PrepareMap () {
Pokitto 7:c167ef9d3f4b 2077 //PPosX = (8*SpawnCoordX[CurrentLoadedMap]);
Pokitto 7:c167ef9d3f4b 2078 //PPosY = (8*SpawnCoordY[CurrentLoadedMap]);
Pokitto 7:c167ef9d3f4b 2079 PPosX = -(8*pgm_read_byte(SpawnCoordX + CurrentLoadedMap)) + 4; //Convert Spawnpos to Worldpos
Pokitto 7:c167ef9d3f4b 2080 PPosY = -(8*pgm_read_byte(SpawnCoordY + CurrentLoadedMap)) + 4;
Pokitto 7:c167ef9d3f4b 2081
Pokitto 7:c167ef9d3f4b 2082 VelocityX = 0;
Pokitto 7:c167ef9d3f4b 2083 VelocityY = 0;
Pokitto 7:c167ef9d3f4b 2084 PistonPressed = false;
Pokitto 7:c167ef9d3f4b 2085 IsPlaying = true;
Pokitto 7:c167ef9d3f4b 2086 MapWidth = pgm_read_byte(MapSizeX + CurrentLoadedMap);
Pokitto 7:c167ef9d3f4b 2087 MapHeigth = pgm_read_byte(MapSizeY + CurrentLoadedMap);
Pokitto 7:c167ef9d3f4b 2088
Pokitto 7:c167ef9d3f4b 2089 KeysGot = 0;
Pokitto 7:c167ef9d3f4b 2090
Pokitto 7:c167ef9d3f4b 2091 byte EnnemieC = 0;
Pokitto 7:c167ef9d3f4b 2092 KeyCount = 0;
Pokitto 7:c167ef9d3f4b 2093 LockerCount = 0;
Pokitto 7:c167ef9d3f4b 2094
Pokitto 7:c167ef9d3f4b 2095 for(byte x = 0; x < MapWidth; x++) { //Draw maps
Pokitto 7:c167ef9d3f4b 2096 for(byte y = 0; y < MapHeigth; y++) {
Pokitto 7:c167ef9d3f4b 2097 if(getTile(x,y)==9) {
Pokitto 7:c167ef9d3f4b 2098 EnnemieC++;
Pokitto 7:c167ef9d3f4b 2099 }
Pokitto 7:c167ef9d3f4b 2100 if(getTile(x,y) == 19) {
Pokitto 7:c167ef9d3f4b 2101 KeyCount++;
Pokitto 7:c167ef9d3f4b 2102 }
Pokitto 7:c167ef9d3f4b 2103 if(getTile(x,y) == 20) {
Pokitto 7:c167ef9d3f4b 2104 LockerCount++;
Pokitto 7:c167ef9d3f4b 2105 }
Pokitto 7:c167ef9d3f4b 2106 }
Pokitto 7:c167ef9d3f4b 2107 }
Pokitto 7:c167ef9d3f4b 2108
Pokitto 7:c167ef9d3f4b 2109 EnnemieCount = EnnemieC;
Pokitto 7:c167ef9d3f4b 2110
Pokitto 7:c167ef9d3f4b 2111 ennemieArray = new EnnemieAI[EnnemieCount];
Pokitto 7:c167ef9d3f4b 2112
Pokitto 7:c167ef9d3f4b 2113 KeyX = new byte[KeyCount];
Pokitto 7:c167ef9d3f4b 2114 KeyY = new byte[KeyCount];
Pokitto 7:c167ef9d3f4b 2115 KeyGot = new bool[KeyCount];
Pokitto 7:c167ef9d3f4b 2116 for(int q = 0; q < KeyCount; q++) {
Pokitto 7:c167ef9d3f4b 2117 KeyGot[q] = false;
Pokitto 7:c167ef9d3f4b 2118 }
Pokitto 7:c167ef9d3f4b 2119
Pokitto 7:c167ef9d3f4b 2120 LockerX = new byte[LockerCount];
Pokitto 7:c167ef9d3f4b 2121 LockerY = new byte[LockerCount];
Pokitto 7:c167ef9d3f4b 2122 LockerGot = new bool[LockerCount];
Pokitto 7:c167ef9d3f4b 2123 for(int q = 0; q < LockerCount; q++) {
Pokitto 7:c167ef9d3f4b 2124 LockerGot[q] = false;
Pokitto 7:c167ef9d3f4b 2125 }
Pokitto 7:c167ef9d3f4b 2126
Pokitto 7:c167ef9d3f4b 2127 int i = 0;
Pokitto 7:c167ef9d3f4b 2128 int a = 0;
Pokitto 7:c167ef9d3f4b 2129 int b = 0;
Pokitto 7:c167ef9d3f4b 2130 for(byte x = 0; x < MapWidth; x++) { //Draw maps
Pokitto 7:c167ef9d3f4b 2131 for(byte y = 0; y < MapHeigth; y++) {
Pokitto 7:c167ef9d3f4b 2132 if(getTile(x,y)==9) {
Pokitto 7:c167ef9d3f4b 2133 ennemieArray[i].DefinePos(x*8+0,y*8+0);
Pokitto 7:c167ef9d3f4b 2134 i++;
Pokitto 7:c167ef9d3f4b 2135 }
Pokitto 7:c167ef9d3f4b 2136 if(getTile(x,y) == 19) {
Pokitto 7:c167ef9d3f4b 2137 KeyX[a] = x;
Pokitto 7:c167ef9d3f4b 2138 KeyY[a] = y;
Pokitto 7:c167ef9d3f4b 2139 a++;
Pokitto 7:c167ef9d3f4b 2140 }
Pokitto 7:c167ef9d3f4b 2141 if(getTile(x,y) == 20) {
Pokitto 7:c167ef9d3f4b 2142 LockerX[b] = x;
Pokitto 7:c167ef9d3f4b 2143 LockerY[b] = y;
Pokitto 7:c167ef9d3f4b 2144 b++;
Pokitto 7:c167ef9d3f4b 2145 }
Pokitto 7:c167ef9d3f4b 2146 }
Pokitto 7:c167ef9d3f4b 2147 }
Pokitto 7:c167ef9d3f4b 2148
Pokitto 7:c167ef9d3f4b 2149 if(CurrentLoadedMap == 0) {
Pokitto 7:c167ef9d3f4b 2150 LoadCineStart();
Pokitto 7:c167ef9d3f4b 2151 }
Pokitto 7:c167ef9d3f4b 2152 }
Pokitto 7:c167ef9d3f4b 2153
Pokitto 7:c167ef9d3f4b 2154 //////////////////
Pokitto 7:c167ef9d3f4b 2155 ////Updating V////
Pokitto 7:c167ef9d3f4b 2156 //////////////////
Pokitto 7:c167ef9d3f4b 2157
Pokitto 7:c167ef9d3f4b 2158 boolean inRay (byte Min, byte Max, byte Value) {
Pokitto 7:c167ef9d3f4b 2159 return Value <= Max && Value >= Min;
Pokitto 7:c167ef9d3f4b 2160 }
Pokitto 7:c167ef9d3f4b 2161
Pokitto 7:c167ef9d3f4b 2162 boolean inRange (byte r, byte v) {
Pokitto 7:c167ef9d3f4b 2163 return inRay(r,r+8,v+2) || inRay(r,r+8,v+6);
Pokitto 7:c167ef9d3f4b 2164 }
Pokitto 7:c167ef9d3f4b 2165
Pokitto 7:c167ef9d3f4b 2166 void loop() {
Pokitto 7:c167ef9d3f4b 2167 // put your main code here, to run repeatedly:
Pokitto 7:c167ef9d3f4b 2168 if(gb.update()) {
Pokitto 7:c167ef9d3f4b 2169
Pokitto 7:c167ef9d3f4b 2170 if(IsPlaying) {
Pokitto 7:c167ef9d3f4b 2171 GroundedDown = false;
Pokitto 7:c167ef9d3f4b 2172 GroundedRight = false;
Pokitto 7:c167ef9d3f4b 2173 GroundedLeft = false;
Pokitto 7:c167ef9d3f4b 2174
Pokitto 7:c167ef9d3f4b 2175 if(last == false && GroundedDown == true) {
Pokitto 7:c167ef9d3f4b 2176 sfx(3, 3);
Pokitto 7:c167ef9d3f4b 2177 }
Pokitto 7:c167ef9d3f4b 2178
Pokitto 7:c167ef9d3f4b 2179 last = GroundedDown;
Pokitto 7:c167ef9d3f4b 2180
Pokitto 7:c167ef9d3f4b 2181 if(!(gb.buttons.timeHeld(BTN_RIGHT) > 0) && !(gb.buttons.timeHeld(BTN_LEFT) > 0)) {
Pokitto 7:c167ef9d3f4b 2182 VelocityX = VelocityX * 0.6f;
Pokitto 7:c167ef9d3f4b 2183 }
Pokitto 7:c167ef9d3f4b 2184
Pokitto 7:c167ef9d3f4b 2185 if(VelocityY - 3 > -127) {
Pokitto 7:c167ef9d3f4b 2186 VelocityY = VelocityY - 3;
Pokitto 7:c167ef9d3f4b 2187 } else {
Pokitto 7:c167ef9d3f4b 2188 VelocityY = -127;
Pokitto 7:c167ef9d3f4b 2189 }
Pokitto 7:c167ef9d3f4b 2190
Pokitto 7:c167ef9d3f4b 2191 if(gb.buttons.timeHeld(BTN_RIGHT) > 0) {
Pokitto 7:c167ef9d3f4b 2192 if(VelocityX - 4 > -30) {
Pokitto 7:c167ef9d3f4b 2193 VelocityX -= 4;
Pokitto 7:c167ef9d3f4b 2194 }
Pokitto 7:c167ef9d3f4b 2195 GoingRight = true;
Pokitto 7:c167ef9d3f4b 2196 }
Pokitto 7:c167ef9d3f4b 2197 if(gb.buttons.timeHeld(BTN_LEFT) > 0) {
Pokitto 7:c167ef9d3f4b 2198 if(VelocityX + 4 < 30) {
Pokitto 7:c167ef9d3f4b 2199 VelocityX += 4;
Pokitto 7:c167ef9d3f4b 2200 }
Pokitto 7:c167ef9d3f4b 2201 GoingRight = false;
Pokitto 7:c167ef9d3f4b 2202 }
Pokitto 7:c167ef9d3f4b 2203
Pokitto 7:c167ef9d3f4b 2204 ACT = 3;
Pokitto 7:c167ef9d3f4b 2205
Pokitto 7:c167ef9d3f4b 2206 CheckForCollider();
Pokitto 7:c167ef9d3f4b 2207
Pokitto 7:c167ef9d3f4b 2208 if(gb.buttons.pressed(BTN_A) && GroundedDown) {
Pokitto 7:c167ef9d3f4b 2209 sfx(0, 0);
Pokitto 7:c167ef9d3f4b 2210 VelocityY = 66;
Pokitto 7:c167ef9d3f4b 2211 }
Pokitto 7:c167ef9d3f4b 2212
Pokitto 7:c167ef9d3f4b 2213 if(gb.buttons.pressed(BTN_A) && GroundedRight && !GroundedDown) {
Pokitto 7:c167ef9d3f4b 2214 VelocityX = 60;
Pokitto 7:c167ef9d3f4b 2215 VelocityY = 56;
Pokitto 7:c167ef9d3f4b 2216 sfx(1, 0);
Pokitto 7:c167ef9d3f4b 2217 }
Pokitto 7:c167ef9d3f4b 2218
Pokitto 7:c167ef9d3f4b 2219 if(gb.buttons.pressed(BTN_A) && GroundedLeft && !GroundedDown) {
Pokitto 7:c167ef9d3f4b 2220 VelocityX = -60;
Pokitto 7:c167ef9d3f4b 2221 VelocityY = 56;
Pokitto 7:c167ef9d3f4b 2222 sfx(1, 0);
Pokitto 7:c167ef9d3f4b 2223 }
Pokitto 7:c167ef9d3f4b 2224
Pokitto 7:c167ef9d3f4b 2225 if(gb.buttons.pressed(BTN_C)) {
Pokitto 7:c167ef9d3f4b 2226 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2227 SelectMap();
Pokitto 7:c167ef9d3f4b 2228 }
Pokitto 7:c167ef9d3f4b 2229
Pokitto 7:c167ef9d3f4b 2230 if(AC == true) {
Pokitto 7:c167ef9d3f4b 2231 VelocityX = -63;
Pokitto 7:c167ef9d3f4b 2232 AC = false;
Pokitto 7:c167ef9d3f4b 2233 }
Pokitto 7:c167ef9d3f4b 2234 if(ACT == 0) {
Pokitto 7:c167ef9d3f4b 2235 VelocityX = -23;
Pokitto 7:c167ef9d3f4b 2236 } else if(ACT == 1){
Pokitto 7:c167ef9d3f4b 2237 VelocityX = 23;
Pokitto 7:c167ef9d3f4b 2238 } else if (ACT == 2 && gb.buttons.pressed(BTN_A)) {
Pokitto 7:c167ef9d3f4b 2239 VelocityY = 110;
Pokitto 7:c167ef9d3f4b 2240 }
Pokitto 7:c167ef9d3f4b 2241
Pokitto 7:c167ef9d3f4b 2242 PPosX += VelocityX / 127.0F * 3;
Pokitto 7:c167ef9d3f4b 2243 PPosY += VelocityY / 127.0F * 3;
Pokitto 7:c167ef9d3f4b 2244
Pokitto 7:c167ef9d3f4b 2245 if(VelocityY > 0) {
Pokitto 7:c167ef9d3f4b 2246 //ex: 62 to 0 is flat to normal
Pokitto 7:c167ef9d3f4b 2247 if(VelocityY > 62) {
Pokitto 7:c167ef9d3f4b 2248 SquisheVertical = 5;
Pokitto 7:c167ef9d3f4b 2249 SquisheHorizontal = 10;
Pokitto 7:c167ef9d3f4b 2250 } else {
Pokitto 7:c167ef9d3f4b 2251 SquisheVertical = 8+(VelocityY*BouncyMath2);
Pokitto 7:c167ef9d3f4b 2252 SquisheHorizontal = 8+(VelocityY*BouncyMath1);
Pokitto 7:c167ef9d3f4b 2253 }
Pokitto 7:c167ef9d3f4b 2254 }
Pokitto 7:c167ef9d3f4b 2255 if(VelocityY < 0) {
Pokitto 7:c167ef9d3f4b 2256 //ex: 0 to -127 is normal to verticaly flat
Pokitto 7:c167ef9d3f4b 2257 SquisheVertical = 8+(VelocityY*BouncyMath3);
Pokitto 7:c167ef9d3f4b 2258 SquisheHorizontal = 8+(VelocityY*BouncyMath4);
Pokitto 7:c167ef9d3f4b 2259 }
Pokitto 7:c167ef9d3f4b 2260 if(VelocityY == 0) {
Pokitto 7:c167ef9d3f4b 2261 SquisheVertical = 8;
Pokitto 7:c167ef9d3f4b 2262 SquisheHorizontal = 8;
Pokitto 7:c167ef9d3f4b 2263 }
Pokitto 7:c167ef9d3f4b 2264
Pokitto 7:c167ef9d3f4b 2265 DrawPlayer();
Pokitto 7:c167ef9d3f4b 2266 ClampCamera();
Pokitto 7:c167ef9d3f4b 2267
Pokitto 7:c167ef9d3f4b 2268 for(byte c = 0; c < EnnemieCount; c++) {
Pokitto 7:c167ef9d3f4b 2269 ennemieArray[c].update();
Pokitto 7:c167ef9d3f4b 2270 if(ennemieArray[c].GetDirection()) {
Pokitto 7:c167ef9d3f4b 2271 gb.display.drawBitmap(CPosX + ennemieArray[c].GetPosX() - 4, CPosY + ennemieArray[c].GetPosY() - 4, EnnemieSprite);
Pokitto 7:c167ef9d3f4b 2272 } else {
Pokitto 7:c167ef9d3f4b 2273 gb.display.drawBitmap(CPosX + ennemieArray[c].GetPosX() - 4, CPosY + ennemieArray[c].GetPosY() - 4, EnnemieSprite1);
Pokitto 7:c167ef9d3f4b 2274 }
Pokitto 7:c167ef9d3f4b 2275 if(inRange(ennemieArray[c].GetPosX() - 8, -PPosX) && inRange(ennemieArray[c].GetPosY() - 8, -PPosY)) {
Pokitto 7:c167ef9d3f4b 2276 sfx(7, 1);
Pokitto 7:c167ef9d3f4b 2277 Die();
Pokitto 7:c167ef9d3f4b 2278 }
Pokitto 7:c167ef9d3f4b 2279 }
Pokitto 7:c167ef9d3f4b 2280
Pokitto 7:c167ef9d3f4b 2281 /*gb.display.setColor(GRAY, WHITE);
Pokitto 7:c167ef9d3f4b 2282 for(byte x = 0; x < MapWidth; x++) { //Draw maps
Pokitto 7:c167ef9d3f4b 2283 for(byte y = 0; y < MapHeigth; y++) {
Pokitto 7:c167ef9d3f4b 2284 if((x+y*MapWidth) % 2 == 0) {
Pokitto 7:c167ef9d3f4b 2285 gb.display.drawBitmap(CPosX*(float)0.7 + x*8, CPosY*(float)0.7 + y*8, Back0);
Pokitto 7:c167ef9d3f4b 2286 } else {
Pokitto 7:c167ef9d3f4b 2287 gb.display.drawBitmap(CPosX*(float)0.7 + x*8, CPosY*(float)0.7 + y*8, Back1);
Pokitto 7:c167ef9d3f4b 2288 }
Pokitto 7:c167ef9d3f4b 2289 }
Pokitto 7:c167ef9d3f4b 2290 }
Pokitto 7:c167ef9d3f4b 2291
Pokitto 7:c167ef9d3f4b 2292 gb.display.setColor(BLACK, WHITE);*/
Pokitto 7:c167ef9d3f4b 2293 for(byte x = 0; x < MapWidth; x++) { //Draw maps
Pokitto 7:c167ef9d3f4b 2294 for(byte y = 0; y < MapHeigth; y++) {
Pokitto 7:c167ef9d3f4b 2295 if(getTile(x,y) == 15) {
Pokitto 7:c167ef9d3f4b 2296 if(PistonPressed) {
Pokitto 7:c167ef9d3f4b 2297 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[15]);
Pokitto 7:c167ef9d3f4b 2298 } else {
Pokitto 7:c167ef9d3f4b 2299 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, Missing);
Pokitto 7:c167ef9d3f4b 2300 }
Pokitto 7:c167ef9d3f4b 2301 } else if(getTile(x,y) == 19) {
Pokitto 7:c167ef9d3f4b 2302 for(int a = 0; a < KeyCount; a++) {
Pokitto 7:c167ef9d3f4b 2303 if(KeyX[a] == x && KeyY[a] == y) {
Pokitto 7:c167ef9d3f4b 2304 if(KeyGot[a] == true) {
Pokitto 7:c167ef9d3f4b 2305 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, Empty);
Pokitto 7:c167ef9d3f4b 2306 } else {
Pokitto 7:c167ef9d3f4b 2307 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[19]);
Pokitto 7:c167ef9d3f4b 2308 }
Pokitto 7:c167ef9d3f4b 2309 break;
Pokitto 7:c167ef9d3f4b 2310 } else {
Pokitto 7:c167ef9d3f4b 2311 if(a >= KeyCount) {
Pokitto 7:c167ef9d3f4b 2312 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[19]);
Pokitto 7:c167ef9d3f4b 2313 }
Pokitto 7:c167ef9d3f4b 2314 }
Pokitto 7:c167ef9d3f4b 2315 }
Pokitto 7:c167ef9d3f4b 2316 } else if(getTile(x,y) == 20) {
Pokitto 7:c167ef9d3f4b 2317 for(int a = 0; a < LockerCount; a++) {
Pokitto 7:c167ef9d3f4b 2318 if(LockerX[a] == x && LockerY[a] == y) {
Pokitto 7:c167ef9d3f4b 2319 if(LockerGot[a]) {
Pokitto 7:c167ef9d3f4b 2320 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, Empty);
Pokitto 7:c167ef9d3f4b 2321 } else {
Pokitto 7:c167ef9d3f4b 2322 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[20]);
Pokitto 7:c167ef9d3f4b 2323 }
Pokitto 7:c167ef9d3f4b 2324 break;
Pokitto 7:c167ef9d3f4b 2325 } else {
Pokitto 7:c167ef9d3f4b 2326 if(a >= LockerCount) {
Pokitto 7:c167ef9d3f4b 2327 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[20]);
Pokitto 7:c167ef9d3f4b 2328 }
Pokitto 7:c167ef9d3f4b 2329 }
Pokitto 7:c167ef9d3f4b 2330 }
Pokitto 7:c167ef9d3f4b 2331 } else if(getTile(x,y) == 28) {
Pokitto 7:c167ef9d3f4b 2332 if(!PistonPressed) {
Pokitto 7:c167ef9d3f4b 2333 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[15]);
Pokitto 7:c167ef9d3f4b 2334 } else {
Pokitto 7:c167ef9d3f4b 2335 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, Missing);
Pokitto 7:c167ef9d3f4b 2336 }
Pokitto 7:c167ef9d3f4b 2337 } else {
Pokitto 7:c167ef9d3f4b 2338 gb.display.drawBitmap(CPosX + x*8, CPosY + y*8, sprites[getTile(x,y)]);
Pokitto 7:c167ef9d3f4b 2339 }
Pokitto 7:c167ef9d3f4b 2340 }
Pokitto 7:c167ef9d3f4b 2341 }
Pokitto 7:c167ef9d3f4b 2342
Pokitto 7:c167ef9d3f4b 2343 } else {
Pokitto 7:c167ef9d3f4b 2344 if(Mode == 0) {
Pokitto 7:c167ef9d3f4b 2345 SelectMap();
Pokitto 7:c167ef9d3f4b 2346 } else if(Mode == 1) {
Pokitto 7:c167ef9d3f4b 2347 for(byte x = 0; x < 3; x++) {
Pokitto 7:c167ef9d3f4b 2348 for(byte y = 0; y < 3; y++) {
Pokitto 7:c167ef9d3f4b 2349 if(getPreviewTile(x,y) == 9) {
Pokitto 7:c167ef9d3f4b 2350 gb.display.drawBitmap(30 + x*8, 12 + y*8, EnnemieSprite);
Pokitto 7:c167ef9d3f4b 2351 } else {
Pokitto 7:c167ef9d3f4b 2352 gb.display.drawBitmap(30 + x*8, 12 + y*8, sprites[getPreviewTile(x,y)]);
Pokitto 7:c167ef9d3f4b 2353 }
Pokitto 7:c167ef9d3f4b 2354 }
Pokitto 7:c167ef9d3f4b 2355 }
Pokitto 7:c167ef9d3f4b 2356 if(MapCursor <= LevelsUnlock) {
Pokitto 7:c167ef9d3f4b 2357 gb.display.drawBitmap(0,0,EUnLocked);
Pokitto 7:c167ef9d3f4b 2358 if(gb.buttons.pressed(BTN_A)) {
Pokitto 7:c167ef9d3f4b 2359 CurrentLoadedMap = MapCursor;
Pokitto 7:c167ef9d3f4b 2360 IsPlaying = true;
Pokitto 7:c167ef9d3f4b 2361 PrepareMap();
Pokitto 7:c167ef9d3f4b 2362 }
Pokitto 7:c167ef9d3f4b 2363 } else {
Pokitto 7:c167ef9d3f4b 2364 gb.display.drawBitmap(0,0,ELocked);
Pokitto 7:c167ef9d3f4b 2365 }
Pokitto 7:c167ef9d3f4b 2366 if(MapCursor - 1 >= 0) {
Pokitto 7:c167ef9d3f4b 2367 gb.display.drawBitmap(0,20,EArrow2);
Pokitto 7:c167ef9d3f4b 2368 if(gb.buttons.pressed(BTN_LEFT)) {
Pokitto 7:c167ef9d3f4b 2369 sfx(6, 2);
Pokitto 7:c167ef9d3f4b 2370 MapCursor--;
Pokitto 7:c167ef9d3f4b 2371 }
Pokitto 7:c167ef9d3f4b 2372 }
Pokitto 7:c167ef9d3f4b 2373 if(MapCursor + 1 < NbrOfLevel) {
Pokitto 7:c167ef9d3f4b 2374 gb.display.drawBitmap(76,20,EArrow1);
Pokitto 7:c167ef9d3f4b 2375 if(gb.buttons.pressed(BTN_RIGHT)) {
Pokitto 7:c167ef9d3f4b 2376 sfx(6, 2);
Pokitto 7:c167ef9d3f4b 2377 MapCursor++;
Pokitto 7:c167ef9d3f4b 2378 }
Pokitto 7:c167ef9d3f4b 2379 }
Pokitto 7:c167ef9d3f4b 2380 if(gb.buttons.pressed(BTN_C)) {
Pokitto 7:c167ef9d3f4b 2381 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2382 gb.begin();
Pokitto 7:c167ef9d3f4b 2383 gb.titleScreen(("v1.0"),Logo);
Pokitto 7:c167ef9d3f4b 2384 gb.battery.show = false;
Pokitto 7:c167ef9d3f4b 2385 }
Pokitto 7:c167ef9d3f4b 2386 } else if(Mode == 2) {
Pokitto 7:c167ef9d3f4b 2387
Pokitto 7:c167ef9d3f4b 2388 if(Scroll < 13) {
Pokitto 7:c167ef9d3f4b 2389 Scroll++;
Pokitto 7:c167ef9d3f4b 2390 }
Pokitto 7:c167ef9d3f4b 2391 gb.display.fontSize = 2;
Pokitto 7:c167ef9d3f4b 2392
Pokitto 7:c167ef9d3f4b 2393 gb.display.cursorX = 2;
Pokitto 7:c167ef9d3f4b 2394 gb.display.cursorY = (-10+Scroll);
Pokitto 7:c167ef9d3f4b 2395
Pokitto 7:c167ef9d3f4b 2396 gb.display.print(("Blackout!"));
Pokitto 7:c167ef9d3f4b 2397
Pokitto 7:c167ef9d3f4b 2398 gb.display.fontSize = 1;
Pokitto 7:c167ef9d3f4b 2399
Pokitto 7:c167ef9d3f4b 2400 gb.display.cursorX = 2;
Pokitto 7:c167ef9d3f4b 2401 gb.display.cursorY = (18+(Scroll*0.5f));
Pokitto 7:c167ef9d3f4b 2402
Pokitto 7:c167ef9d3f4b 2403 gb.display.print(("Press A to continue"));
Pokitto 7:c167ef9d3f4b 2404 if(gb.buttons.pressed(BTN_A)) {
Pokitto 7:c167ef9d3f4b 2405 SelectMap();
Pokitto 7:c167ef9d3f4b 2406 }
Pokitto 7:c167ef9d3f4b 2407 } else if(Mode == 3) {
Pokitto 7:c167ef9d3f4b 2408 if(Scroll < 13) {
Pokitto 7:c167ef9d3f4b 2409 Scroll++;
Pokitto 7:c167ef9d3f4b 2410 }
Pokitto 7:c167ef9d3f4b 2411 gb.display.fontSize = 2;
Pokitto 7:c167ef9d3f4b 2412
Pokitto 7:c167ef9d3f4b 2413 gb.display.cursorX = 2;
Pokitto 7:c167ef9d3f4b 2414 gb.display.cursorY = (-10+Scroll);
Pokitto 7:c167ef9d3f4b 2415
Pokitto 7:c167ef9d3f4b 2416 gb.display.print(("Good Job!"));
Pokitto 7:c167ef9d3f4b 2417
Pokitto 7:c167ef9d3f4b 2418 gb.display.fontSize = 1;
Pokitto 7:c167ef9d3f4b 2419
Pokitto 7:c167ef9d3f4b 2420 gb.display.cursorX = 2;
Pokitto 7:c167ef9d3f4b 2421 gb.display.cursorY = (18+(Scroll*0.5f));
Pokitto 7:c167ef9d3f4b 2422
Pokitto 7:c167ef9d3f4b 2423 gb.display.print(("Press A to continue"));
Pokitto 7:c167ef9d3f4b 2424 if(gb.buttons.pressed(BTN_A)) {
Pokitto 7:c167ef9d3f4b 2425 SelectMap();
Pokitto 7:c167ef9d3f4b 2426 }
Pokitto 7:c167ef9d3f4b 2427 } else if(Mode == 4) {
Pokitto 7:c167ef9d3f4b 2428 if(gb.buttons.pressed(BTN_A)) {
Pokitto 7:c167ef9d3f4b 2429 IsPlaying = true;
Pokitto 7:c167ef9d3f4b 2430 Frame = 0;
Pokitto 7:c167ef9d3f4b 2431 }
Pokitto 7:c167ef9d3f4b 2432 //Start - WhitePotion, Potion, Brick, EnnemieSprite, PlayerSprite, End, ExclPoint
Pokitto 7:c167ef9d3f4b 2433 if(Frame < 45) {
Pokitto 7:c167ef9d3f4b 2434 //Potion is falling and the ennemie is normal
Pokitto 7:c167ef9d3f4b 2435 gb.display.drawBitmap((LCDWIDTH/2-4)+CamX,((Frame)-8+CamY)-8, WhitePotion); //Potion
Pokitto 7:c167ef9d3f4b 2436 gb.display.drawBitmap((LCDWIDTH/2-4)+CamX,(LCDHEIGHT-8+CamY)-8, PlayerSprite); //Ennemie
Pokitto 7:c167ef9d3f4b 2437 for(int i = 0; i < 14; i++) { //Ground
Pokitto 7:c167ef9d3f4b 2438 if(i==0||i==13) {
Pokitto 7:c167ef9d3f4b 2439 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, SharpBrick);
Pokitto 7:c167ef9d3f4b 2440 } else {
Pokitto 7:c167ef9d3f4b 2441 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, Brick);
Pokitto 7:c167ef9d3f4b 2442 }
Pokitto 7:c167ef9d3f4b 2443 }
Pokitto 7:c167ef9d3f4b 2444 } else if(Frame < 80){
Pokitto 7:c167ef9d3f4b 2445 //Ennemie is White, Cam scroll to the player, player has ExclamationPoint
Pokitto 7:c167ef9d3f4b 2446 gb.display.drawBitmap((LCDWIDTH/2-4)+CamX,(LCDHEIGHT-8+CamY)-8, EnnemieSprite); //Ennemie
Pokitto 7:c167ef9d3f4b 2447 gb.display.drawBitmap(-8+CamX,(LCDHEIGHT-8+CamY)-8,PlayerSprite); //Player
Pokitto 7:c167ef9d3f4b 2448 gb.display.drawBitmap(-8+CamX+4,(LCDHEIGHT-8+CamY - 9)-8,ExclPoint); //ExclamationPoint
Pokitto 7:c167ef9d3f4b 2449 for(int i = 0; i < 14; i++) { //Ground
Pokitto 7:c167ef9d3f4b 2450 if(i==0||i==13) {
Pokitto 7:c167ef9d3f4b 2451 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, SharpBrick);
Pokitto 7:c167ef9d3f4b 2452 } else {
Pokitto 7:c167ef9d3f4b 2453 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, Brick);
Pokitto 7:c167ef9d3f4b 2454 }
Pokitto 7:c167ef9d3f4b 2455 }
Pokitto 7:c167ef9d3f4b 2456 gb.display.drawBitmap(-24-16+CamX,LCDHEIGHT-8,End); //Display Water
Pokitto 7:c167ef9d3f4b 2457 gb.display.drawBitmap(-24-8+CamX,LCDHEIGHT-8,End); //Display Water
Pokitto 7:c167ef9d3f4b 2458 CamX++;
Pokitto 7:c167ef9d3f4b 2459 } else if(Frame < 110) {
Pokitto 7:c167ef9d3f4b 2460 //Cam stop scroll, Player turn his big fat square face (replace face by something else) wait few frames
Pokitto 7:c167ef9d3f4b 2461 gb.display.drawBitmap((LCDWIDTH/2-4)+CamX,(LCDHEIGHT-8+CamY)-8, EnnemieSprite); //Ennemie
Pokitto 7:c167ef9d3f4b 2462 gb.display.drawBitmap(-8+CamX,(LCDHEIGHT-8+CamY)-8,PlayerSprite, NOROT, FLIPH); //Player
Pokitto 7:c167ef9d3f4b 2463 for(int i = 0; i < 14; i++) { //Ground
Pokitto 7:c167ef9d3f4b 2464 if(i==0||i==13) {
Pokitto 7:c167ef9d3f4b 2465 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, SharpBrick);
Pokitto 7:c167ef9d3f4b 2466 } else {
Pokitto 7:c167ef9d3f4b 2467 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, Brick);
Pokitto 7:c167ef9d3f4b 2468 }
Pokitto 7:c167ef9d3f4b 2469 }
Pokitto 7:c167ef9d3f4b 2470 gb.display.drawBitmap(-24-16+CamX,LCDHEIGHT-8,End); //Display Water
Pokitto 7:c167ef9d3f4b 2471 gb.display.drawBitmap(-24-8+CamX,LCDHEIGHT-8,End); //Display Water
Pokitto 7:c167ef9d3f4b 2472 } else {
Pokitto 7:c167ef9d3f4b 2473 //Jumpin'n'dat water.
Pokitto 7:c167ef9d3f4b 2474 gb.display.drawBitmap((LCDWIDTH/2-4)+CamX,(LCDHEIGHT-8+CamY)-8, EnnemieSprite); //Ennemie
Pokitto 7:c167ef9d3f4b 2475 gb.display.drawBitmap(-8+CamX - (int)((Frame - 110)/(float)(140-110)*30),(LCDHEIGHT-8+CamY)-8 + (int)-(cos( ( (( ((float)Frame - 110)/((float)140-110))*180-90 )*(float)/*57.2958f*/0.0174533))*(float)16),PlayerSprite, NOROT, FLIPH); //Player
Pokitto 7:c167ef9d3f4b 2476 for(int i = 0; i < 14; i++) { //Ground
Pokitto 7:c167ef9d3f4b 2477 if(i==0||i==13) {
Pokitto 7:c167ef9d3f4b 2478 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, SharpBrick);
Pokitto 7:c167ef9d3f4b 2479 } else {
Pokitto 7:c167ef9d3f4b 2480 gb.display.drawBitmap(-24+(i*8)+CamX,LCDHEIGHT-8, Brick);
Pokitto 7:c167ef9d3f4b 2481 }
Pokitto 7:c167ef9d3f4b 2482 }
Pokitto 7:c167ef9d3f4b 2483 gb.display.drawBitmap(-24-16+CamX,LCDHEIGHT-8,End); //Display Water (For the one who want to know why "Water" end a level? It's a one way teleporter!)
Pokitto 7:c167ef9d3f4b 2484 gb.display.drawBitmap(-24-8+CamX,LCDHEIGHT-8,End); //Display Water
Pokitto 7:c167ef9d3f4b 2485 }
Pokitto 7:c167ef9d3f4b 2486
Pokitto 7:c167ef9d3f4b 2487 if(Frame >= 150) {
Pokitto 7:c167ef9d3f4b 2488 IsPlaying = true;
Pokitto 7:c167ef9d3f4b 2489 Frame = 0;
Pokitto 7:c167ef9d3f4b 2490 }
Pokitto 7:c167ef9d3f4b 2491 Frame++;
Pokitto 7:c167ef9d3f4b 2492 } else if(Mode == 5) {
Pokitto 7:c167ef9d3f4b 2493 //End - Potion, Table, EnnemieSprite(Reverse), PlayerSprite
Pokitto 7:c167ef9d3f4b 2494 if(Frame < 50) {
Pokitto 7:c167ef9d3f4b 2495 for(int i = 0; i < 11; i++) {
Pokitto 7:c167ef9d3f4b 2496 if(i==0||i==10) {
Pokitto 7:c167ef9d3f4b 2497 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,SharpBrick);
Pokitto 7:c167ef9d3f4b 2498 } else {
Pokitto 7:c167ef9d3f4b 2499 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,Brick);
Pokitto 7:c167ef9d3f4b 2500 }
Pokitto 7:c167ef9d3f4b 2501 }
Pokitto 7:c167ef9d3f4b 2502
Pokitto 7:c167ef9d3f4b 2503 gb.display.drawBitmap(38+CamX,LCDHEIGHT-16+CamY,Table);
Pokitto 7:c167ef9d3f4b 2504
Pokitto 7:c167ef9d3f4b 2505 if(Frame < 25) {
Pokitto 7:c167ef9d3f4b 2506 gb.display.drawBitmap(38+CamX,LCDHEIGHT-24+CamY,Potion);
Pokitto 7:c167ef9d3f4b 2507 } else {
Pokitto 7:c167ef9d3f4b 2508 gb.display.drawBitmap(38+CamX+((Frame-25)*(float)0.2),LCDHEIGHT-24+CamY-((Frame-25)*(float)0.1),Potion);
Pokitto 7:c167ef9d3f4b 2509 }
Pokitto 7:c167ef9d3f4b 2510
Pokitto 7:c167ef9d3f4b 2511 gb.display.drawBitmap(26+CamX + (Frame*(float)0.2),LCDHEIGHT-16+CamY - (Frame*(float)0.2),PlayerSprite);
Pokitto 7:c167ef9d3f4b 2512 gb.display.drawBitmap(50+CamX,LCDHEIGHT-16+CamY,EnnemieSprite, NOROT, FLIPH);
Pokitto 7:c167ef9d3f4b 2513 } else if(Frame < 90) {
Pokitto 7:c167ef9d3f4b 2514 for(int i = 0; i < 11; i++) {
Pokitto 7:c167ef9d3f4b 2515 if(i==0||i==10) {
Pokitto 7:c167ef9d3f4b 2516 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,SharpBrick);
Pokitto 7:c167ef9d3f4b 2517 } else {
Pokitto 7:c167ef9d3f4b 2518 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,Brick);
Pokitto 7:c167ef9d3f4b 2519 }
Pokitto 7:c167ef9d3f4b 2520 }
Pokitto 7:c167ef9d3f4b 2521
Pokitto 7:c167ef9d3f4b 2522 gb.display.drawBitmap(38+CamX,LCDHEIGHT-16+CamY,Table);
Pokitto 7:c167ef9d3f4b 2523
Pokitto 7:c167ef9d3f4b 2524 gb.display.drawBitmap(48+CamX+((Frame-90)*(float)0.075),LCDHEIGHT-16/*22*/+CamY-((Frame-90)*(float)-0.2),Potion);
Pokitto 7:c167ef9d3f4b 2525
Pokitto 7:c167ef9d3f4b 2526 gb.display.drawBitmap(26+CamX + ((Frame-90)*(float)-0.2),LCDHEIGHT-14/*22*/+CamY - ((Frame-90)*(float)-0.2),PlayerSprite);
Pokitto 7:c167ef9d3f4b 2527 gb.display.drawBitmap(50+CamX,LCDHEIGHT-16+CamY,EnnemieSprite, NOROT, FLIPH);
Pokitto 7:c167ef9d3f4b 2528 } else if(Frame >= 90 && Frame < 94) {
Pokitto 7:c167ef9d3f4b 2529 gb.display.setColor(BLACK);
Pokitto 7:c167ef9d3f4b 2530 gb.display.setColor(INVERT);
Pokitto 7:c167ef9d3f4b 2531 gb.display.fillRect(0,0,84,48);
Pokitto 7:c167ef9d3f4b 2532 for(int i = 0; i < 11; i++) {
Pokitto 7:c167ef9d3f4b 2533 if(i==0||i==10) {
Pokitto 7:c167ef9d3f4b 2534 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,SharpBrick);
Pokitto 7:c167ef9d3f4b 2535 } else {
Pokitto 7:c167ef9d3f4b 2536 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,Brick);
Pokitto 7:c167ef9d3f4b 2537 }
Pokitto 7:c167ef9d3f4b 2538 }
Pokitto 7:c167ef9d3f4b 2539 gb.display.drawBitmap(38+CamX,LCDHEIGHT-16+CamY,Table);
Pokitto 7:c167ef9d3f4b 2540 gb.display.drawBitmap(26+CamX,LCDHEIGHT-16+CamY,PlayerSprite);
Pokitto 7:c167ef9d3f4b 2541 gb.display.drawBitmap(50+CamX,LCDHEIGHT-16+CamY,EnnemieSprite, NOROT, FLIPH);
Pokitto 7:c167ef9d3f4b 2542 gb.display.setColor(BLACK);
Pokitto 7:c167ef9d3f4b 2543 } else {
Pokitto 7:c167ef9d3f4b 2544 for(int i = 0; i < 11; i++) {
Pokitto 7:c167ef9d3f4b 2545 if(i==0||i==10) {
Pokitto 7:c167ef9d3f4b 2546 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,SharpBrick);
Pokitto 7:c167ef9d3f4b 2547 } else {
Pokitto 7:c167ef9d3f4b 2548 gb.display.drawBitmap(i*8+CamX,LCDHEIGHT-8+CamY,Brick);
Pokitto 7:c167ef9d3f4b 2549 }
Pokitto 7:c167ef9d3f4b 2550 }
Pokitto 7:c167ef9d3f4b 2551 gb.display.drawBitmap(38+CamX,LCDHEIGHT-16+CamY,Table);
Pokitto 7:c167ef9d3f4b 2552 gb.display.drawBitmap(26+CamX,LCDHEIGHT-16+CamY,PlayerSprite);
Pokitto 7:c167ef9d3f4b 2553 gb.display.drawBitmap(50+CamX,LCDHEIGHT-16+CamY, PlayerSprite, NOROT, FLIPH);
Pokitto 7:c167ef9d3f4b 2554
Pokitto 7:c167ef9d3f4b 2555 gb.display.fontSize = 2;
Pokitto 7:c167ef9d3f4b 2556
Pokitto 7:c167ef9d3f4b 2557 gb.display.cursorX = 2;
Pokitto 7:c167ef9d3f4b 2558 gb.display.cursorY = (-10+13);
Pokitto 7:c167ef9d3f4b 2559
Pokitto 7:c167ef9d3f4b 2560 gb.display.print(("The end."));
Pokitto 7:c167ef9d3f4b 2561 }
Pokitto 7:c167ef9d3f4b 2562
Pokitto 7:c167ef9d3f4b 2563 if(Frame >= 500) {
Pokitto 7:c167ef9d3f4b 2564 Frame = 0;
Pokitto 7:c167ef9d3f4b 2565 SelectMap();
Pokitto 7:c167ef9d3f4b 2566 }
Pokitto 7:c167ef9d3f4b 2567 Frame+=3;
Pokitto 7:c167ef9d3f4b 2568 }
Pokitto 7:c167ef9d3f4b 2569 }
Pokitto 7:c167ef9d3f4b 2570 }
Pokitto 7:c167ef9d3f4b 2571 }
Pokitto 7:c167ef9d3f4b 2572
Pokitto 7:c167ef9d3f4b 2573 void LoadCineStart() {
Pokitto 7:c167ef9d3f4b 2574 Frame = 0;
Pokitto 7:c167ef9d3f4b 2575 CamX = 0;
Pokitto 7:c167ef9d3f4b 2576 CamY = 0;
Pokitto 7:c167ef9d3f4b 2577 Mode = 4;
Pokitto 7:c167ef9d3f4b 2578 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2579 }
Pokitto 7:c167ef9d3f4b 2580
Pokitto 7:c167ef9d3f4b 2581 void LoadCineEnd() {
Pokitto 7:c167ef9d3f4b 2582 Frame = 0;
Pokitto 7:c167ef9d3f4b 2583 CamX = 0;
Pokitto 7:c167ef9d3f4b 2584 CamY = 0;
Pokitto 7:c167ef9d3f4b 2585 Mode = 5;
Pokitto 7:c167ef9d3f4b 2586 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2587 }
Pokitto 7:c167ef9d3f4b 2588
Pokitto 7:c167ef9d3f4b 2589 void SelectMap () {
Pokitto 7:c167ef9d3f4b 2590 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2591 Mode = 1;
Pokitto 7:c167ef9d3f4b 2592 }
Pokitto 7:c167ef9d3f4b 2593
Pokitto 7:c167ef9d3f4b 2594 void Die () {
Pokitto 7:c167ef9d3f4b 2595 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2596 Mode = 2;
Pokitto 7:c167ef9d3f4b 2597 Scroll = 0;
Pokitto 7:c167ef9d3f4b 2598 }
Pokitto 7:c167ef9d3f4b 2599
Pokitto 7:c167ef9d3f4b 2600 void UnlockNext () {
Pokitto 7:c167ef9d3f4b 2601 if(CurrentLoadedMap == LevelsUnlock) {
Pokitto 7:c167ef9d3f4b 2602 LevelsUnlock++;
Pokitto 7:c167ef9d3f4b 2603 }
Pokitto 7:c167ef9d3f4b 2604 //EEPROM.update(0, LevelsUnlock);
Pokitto 7:c167ef9d3f4b 2605 Mode = 3;
Pokitto 7:c167ef9d3f4b 2606 IsPlaying = false;
Pokitto 7:c167ef9d3f4b 2607 }