"Lost treasure of mBedungu" 100 level puzzle game for RETRO
Dependencies: LCD_ST7735 RetroPlatform mbed
Revision 1:dcea5500a32d, committed 2015-03-01
- Comitter:
- Architect
- Date:
- Sun Mar 01 05:32:06 2015 +0000
- Parent:
- 0:f5f961973d01
- Commit message:
- Initial checkin
Changed in this revision
diff -r f5f961973d01 -r dcea5500a32d Game/GameScreen.cpp --- a/Game/GameScreen.cpp Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/GameScreen.cpp Sun Mar 01 05:32:06 2015 +0000 @@ -1,26 +1,68 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #include "GameScreen.h" #include "Retro.h" #include "Sprites.h" #include "Levels.h" +#include "Utils.h" + extern Retro retro; -#ifdef FULL_COLOR -const uint16_t * sprites[] = { -#else -const uint8_t * sprites[] = { -#endif - NULL, - wall, - barrel, - ladder, - key, - door, - left, - right, - crate, - totem, - rick + +const int soundfx[][8] = { + {0,24,1,1,1,4,4,9}, // gameover + {0,27,53,1,1,1,4,5}, // pickup + {0,23,60,1,1,1,4,5} // drop +}; + +void sfx(int fxno, int channel) +{ + sfx(soundfx[fxno], channel); +}; + +void sfx( const int * effect, int channel) +{ + retro.sound.command(0, effect[6], 0, channel); // set volume + retro.sound.command(1, effect[0], 0, channel); // set waveform + retro.sound.command(2, effect[5], -effect[4], channel); // set volume slide + retro.sound.command(3, effect[3], effect[2] - 58, channel); // set pitch slide + retro.sound.playNote(effect[1], effect[7], channel); // play note + +} + +Image sprites[] = { + {false, false, NULL}, + {false, false, wall}, + {false, false, barrel}, + {false, false, ladder}, + {false, false, key}, + {false, false, door}, + {false, false, left}, + {true, false, left}, + {false, false, crate}, + {false, false, totem}, + {false, true, rick}, + {false, false, rick_top}, + {false, false, rick_happy} }; GameScreen::GameScreen() @@ -30,6 +72,28 @@ _pocket[0] = 0; _pocket[1] = 0; _rickDirection = 0; + _gameOver = false; + + //for some reason writing to eeprom sometime hangs the program +// _gameData[0] = 0; +// _gameData[1] = 0; +// _gameData[2] = 0; +// _gameData[3] = 0; +// _gameData[4] = 0; +// _gameData[5] = 0; +// +// read_eeprom((char *)64, _gameData, 8); +// if( _gameData[0]=='R' && _gameData[1]=='I' && _gameData[2]=='C' && _gameData[3]=='K' ) +// { +// _level = _gameData[4]; +// _gameComplete = _gameData[5]; +// } +// +// _gameData[0]='R'; +// _gameData[1]='I'; +// _gameData[2]='C'; +// _gameData[3]='K'; + } bool GameScreen::isPocketFull() @@ -89,12 +153,12 @@ void GameScreen::moveleft() { - if( _rickDirection == 0 ) - { + if( _rickDirection == 0 ) { _rickDirection = 1; - drawSprite(_rickX,_rickY, CELL_RICK, _rickDirection == 1); + sprites[CELL_RICK].Mirrored = true;//(_rickDirection == 1); + drawSprite(_rickX,_rickY, CELL_RICK); } - + if( _rickX == 0 ) return; @@ -103,17 +167,32 @@ if( cell == CELL_KEY || cell == CELL_BARREL ) { if( putInPocket(cell) ) { + sfx(1,0); _maze[(_rickY<<3)+_rickX-1] = CELL_EMPTY; drawSprite((_rickX-1),_rickY, CELL_EMPTY); drawPocket(); + + //Fall any crates on top of that key or barrel + int y = _rickY; + while( y >= 0 ) { + fall(_rickX-1,y--); + } + } return; } - if( cell == CELL_CRATE && (_rickX-1)>0 ) - { - if( moveto(_rickX-1,_rickY, _rickX-2,_rickY) ) + if( (cell == CELL_CRATE) && ((_rickX-1)>0) ) { + if( moveto(_rickX-1,_rickY, _rickX-2,_rickY) ) { fall(_rickX-2,_rickY); + + int y = _rickY; + while( y >= 0 ) { + fall(_rickX-1,y--); + } + + } + return; } @@ -125,12 +204,12 @@ void GameScreen::moveright() { - if( _rickDirection == 1 ) - { + if( _rickDirection == 1 ) { _rickDirection = 0; - drawSprite(_rickX,_rickY, CELL_RICK, _rickDirection == 1); + sprites[CELL_RICK].Mirrored = false; + drawSprite(_rickX,_rickY, CELL_RICK); } - + if( _rickX == 7 ) return; @@ -138,17 +217,29 @@ if( cell == CELL_KEY || cell == CELL_BARREL ) { if( putInPocket(cell) ) { + sfx(1,0); _maze[(_rickY<<3)+_rickX+1] = CELL_EMPTY; drawSprite((_rickX+1),_rickY, CELL_EMPTY); drawPocket(); + + //Fall any crates on top of that key or barrel + int y = _rickY; + while( y >= 0 ) { + fall(_rickX+1,y--); + } } return; } - - if( cell == CELL_CRATE && (_rickX+1)<7 ) - { - if( moveto(_rickX+1,_rickY, _rickX+2,_rickY) ) + + if( (cell == CELL_CRATE) && ((_rickX+1)<7) ) { + if( moveto(_rickX+1,_rickY, _rickX+2,_rickY) ) { fall(_rickX+2,_rickY); + + int y = _rickY; + while( y >= 0 ) { + fall(_rickX+1,y--); + } + } return; } @@ -173,13 +264,14 @@ uint8_t y = _rickY; if( moveto(_rickX,_rickY,_rickX,_rickY-1) ) { if( getBarrelFromPocket() ) { + sfx(2,0); _maze[(y<<3)+x] = CELL_BARREL; drawSprite(x,y,CELL_BARREL); } else if( getKeyFromPocket() ) { + sfx(2,0); _maze[(y<<3)+x] = CELL_KEY; drawSprite(x,y,CELL_KEY); } - drawPocket(); } } @@ -187,37 +279,20 @@ void GameScreen::movedown() { - if( _rickY == 0 ) + if( _rickY == 7 ) return; -// uint8_t currentCell = _maze[((_rickY)<<3)+_rickX]; -// uint8_t belowCell = _maze[((_rickY+1)<<3)+_rickX]; - - if( moveto(_rickX,_rickY,_rickX,_rickY+1) ) - { - fall(_rickX,_rickY); + if( moveto(_rickX,_rickY,_rickX,_rickY+1) ) { + fall(_rickX,_rickY); } -// if( _rickY > 0 ) { -// uint8_t cellAbove = _maze[((_rickY-1)<<3)+_rickX]; -// if(cellAbove == CELL_EMPTY && !isPocketEmpty()) { -// if( getKeyFromPocket() ) { -// _maze[(_rickY<<3)+_rickX] = CELL_KEY; -// } else if( getBarrelFromPocket() ) -// _maze[(_rickY<<3)+_rickX] = CELL_BARREL; -// -// _rickY--; -// drawSprite(_rickX,_rickY+1, _maze[((_rickY+1)<<3)+_rickX]); -// drawSprite(_rickX,_rickY, CELL_RICK, _rickDirection == 1); -// drawPocket(); -// } -// } + } bool GameScreen::moveto(uint8_t fromX, uint8_t fromY, uint8_t toX, uint8_t toY) { - + bool isRick = false; if( fromX == _rickX && fromY == _rickY ) @@ -227,11 +302,21 @@ uint8_t toCell = _maze[((toY)<<3)+toX]; if( isRick ) { - if( toCell == CELL_EMPTY || toCell == CELL_LADDER || toCell == CELL_TOTEM ) { + if( toCell == CELL_EMPTY || toCell == CELL_LADDER ) { drawSprite(fromX,fromY, fromCell); _rickX = toX; _rickY = toY; - drawSprite(_rickX,_rickY, CELL_RICK, _rickDirection == 1); + drawSprite(_rickX,_rickY, CELL_RICK); + return true; + } + if( toCell == CELL_TOTEM ) + { + sfx(0,0); + _gameOver = true; + drawSprite(fromX,fromY, fromCell); + _rickX = toX; + _rickY = toY; + drawSprite(_rickX,_rickY, CELL_RICK); return true; } if( toCell == CELL_DOOR ) { @@ -240,16 +325,22 @@ _maze[((toY)<<3)+toX] = CELL_EMPTY; _rickX = toX; _rickY = toY; - drawSprite(_rickX,_rickY, CELL_RICK, _rickDirection == 1); + drawSprite(_rickX,_rickY, CELL_RICK); drawPocket(); return true; } } - }else if( fromCell == CELL_CRATE && toCell == CELL_EMPTY ) - { + if( (toCell == CELL_RIGHT && fromX < toX) || (toCell == CELL_LEFT && fromX > toX)) { + drawSprite(fromX,fromY, fromCell); + _rickX = toX; + _rickY = toY; + drawSprite(_rickX,_rickY, CELL_RICK); + return true; + } + } else if( fromCell == CELL_CRATE && toCell == CELL_EMPTY ) { _maze[((toY)<<3)+toX] = CELL_CRATE; _maze[((fromY)<<3)+fromX] = CELL_EMPTY; - + drawSprite(fromX,fromY, toCell); drawSprite(toX,toY, fromCell); return true; @@ -321,28 +412,21 @@ break; } } + + _state = 0; + _pocket[0] = 0; + _pocket[1] = 0; + _rickDirection = 0; + _gameOver = false; + + sprites[CELL_RICK].Mirrored = false; + + frame = 0; } void GameScreen::resetLevel() { unpackLevel(_level); - - _state = 0; - _pocket[0] = 0; - _pocket[1] = 0; - _rickDirection = 0; -} - -void GameScreen::drawSprite(int x, int y, int sprite, bool mirrored) -{ - int screenx = x<<4; - int screeny = y<<4; - if( sprite == 0 ) - retro.display.fillRect(screenx,screeny, screenx+15,screeny+15,0); - else - { - retro.display.drawBitmapIndexed(screenx,screeny, 16,16,sprites[sprite],palette, mirrored); - } } void GameScreen::drawPocket() @@ -350,12 +434,12 @@ if( _pocket[0] == 0 ) retro.display.fillRect(136,80,151,95,0); else - retro.display.drawBitmapIndexed(136,80, 16,16,sprites[_pocket[0]], palette); + retro.display.drawBitmapIndexed(136,80, 16,16,sprites[_pocket[0]].Sprite, palette); if( _pocket[1] == 0 ) retro.display.fillRect(136,96,151,111,0); else - retro.display.drawBitmapIndexed(136,96, 16,16,sprites[_pocket[1]], palette); + retro.display.drawBitmapIndexed(136,96, 16,16,sprites[_pocket[1]].Sprite, palette); } @@ -368,7 +452,7 @@ } //Put Rick on the map - drawSprite(_rickX, _rickY, CELL_RICK, _rickDirection == 1); + drawSprite(_rickX, _rickY, CELL_RICK); //Draw the statistics and "pocket" area for( int y = 0; y < 8; y++ ) { @@ -378,38 +462,94 @@ retro.display.drawBitmapIndexed(136,16, 16,16,totem,palette); retro.display.fillRect(132,32,155,39,0); - char buff[4]; - sprintf(buff,"%d",_level); - - drawString(132,32,buff); + drawLevelNumber(136,32,_level); drawPocket(); } + Screen GameScreen::Update() { + frame++; + if( _state == 0 ) { drawLevel(); _state = 1; } + + if( _gameOver ) + { + if( (frame % 3) == 0 ) + { + sprites[12].Mirrored = !sprites[12].Mirrored; + drawSprite(_rickX,_rickY,12); + } + } - if(retro.buttons.pressed(BTN_LEFT)) { - moveleft(); + if(retro.pressed(BTN_LEFT)) { + //sfx(0,0); + if( !_gameOver ) + moveleft(); } - if(retro.buttons.pressed(BTN_RIGHT)) { + if(retro.pressed(BTN_RIGHT)) { + //sfx(1,0); + if( !_gameOver ) moveright(); } - if(retro.buttons.pressed(BTN_UP)) { - moveup(); + if(retro.pressed(BTN_UP)) { + //sfx(2,0); + if( !_gameOver ) + moveup(); } - if(retro.buttons.pressed(BTN_DOWN)) { + if(retro.pressed(BTN_DOWN)) { + //sfx(3,0); + if( !_gameOver ) movedown(); } - if(retro.buttons.pressed(BTN_ROBOT)) { + if(retro.pressed(BTN_ROBOT)) { _state = 0; return Menu; } + + if(retro.pressed(BTN_SHIP)) { + if( _gameOver ) + { + if( _level < 99 ) + { + _level++; + resetLevel(); + +//for some reason writing to eeprom sometime hangs the program +// _gameData[4]= _level; +// _gameData[5] = _gameComplete; +// +// write_eeprom(_gameData, (char *)64, 8 ); + } + } + } return Game; +} + + +void drawSprite(int x, int y, int sprite) +{ + int screenx = x<<4; + int screeny = y<<4; + if( sprite == 0 ) + retro.display.fillRect(screenx,screeny, screenx+15,screeny+15,0); + else { + retro.display.drawBitmapIndexed(screenx,screeny, 16,16,sprites[sprite].Sprite, palette, sprites[sprite].Mirrored); + } +} + +void drawLevelNumber(int x, int y, int level) +{ + char buf[3]; + if( (level/10) > 0 ) + sprintf(buf,"%d",level); + else + sprintf(buf,"@%d",level); + drawString(x,y,buf, palette_orange); } \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d Game/GameScreen.h --- a/Game/GameScreen.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/GameScreen.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __GAME_SCREEN_H__ #define __GAME_SCREEN_H__ @@ -15,6 +35,9 @@ #define CELL_CRATE 8 #define CELL_TOTEM 9 #define CELL_RICK 10 +#define CELL_TOP 11 +#define CELL_HAPPY 12 + class GameScreen : public ScreenBase @@ -31,12 +54,21 @@ uint8_t _totemY; uint8_t _level; uint8_t _rickDirection; + + bool _gameOver; + bool _gameComplete; + + int frame; + + + char _gameData[8]; public: GameScreen(); virtual Screen Update(); void unpackLevel( int level ); void resetLevel(); + uint8_t getLevel(){ return _level; }; private: void next(); @@ -53,8 +85,7 @@ bool putInPocket( int item ); bool getKeyFromPocket(); bool getBarrelFromPocket(); - - void drawSprite(int x, int y, int sprite, bool mirrored = false); + void drawPocket(); void drawLevel(); };
diff -r f5f961973d01 -r dcea5500a32d Game/HelpScreen.cpp --- a/Game/HelpScreen.cpp Sat Feb 21 06:19:29 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#include "HelpScreen.h" - -HelpScreen::HelpScreen() -{ -} - -Screen HelpScreen::Update() -{ - return Help; -} \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d Game/HelpScreen.h --- a/Game/HelpScreen.h Sat Feb 21 06:19:29 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -#ifndef __HELP_SCREEN_H__ -#define __HELP_SCREEN_H__ - -#include "ScreenBase.h" - -class HelpScreen : public ScreenBase -{ - int _state; -public: - HelpScreen(); - virtual Screen Update(); -}; - -#endif //__HELP_SCREEN_H__
diff -r f5f961973d01 -r dcea5500a32d Game/IntroScreen.cpp --- a/Game/IntroScreen.cpp Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/IntroScreen.cpp Sun Mar 01 05:32:06 2015 +0000 @@ -1,10 +1,32 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #include "mbed.h" #include "IntroScreen.h" #include "Sprites.h" -//#include "font_OEM.h" #include "Retro.h" +const int letter_tick[8] = { + 0,1,57,0,0,0,7,1 +}; char title[] = { "@SOMEWHERE@IN@SOUTH@\r\n" \ @@ -19,7 +41,7 @@ }; char text2[] = { - "THE@LEGEND@SAIS@THAT\r\n" \ + "@@LEGEND@SAYS@THAT@@\r\n" \ "@@@THE@TOTEMS@ARE@@@\r\n" \ "@@@@HIDDEN@IN@AN@@@@\r\n" \ "@@UNDERGROUND@MAZE@@" @@ -54,7 +76,7 @@ { if( _state == 0 ) { retro.display.clearScreen(); - drawString(0,0, title); + drawString(0,0, title, palette); _state = 1; pText = text1; curText = 0; @@ -62,44 +84,63 @@ x=0; frame = 0; + drawSprite(4,3,12); + drawSprite(5,3,9); + + retro.display.fillRect(0,80,159,127,0); } else if( _state == 1 ) { frame++; + if( (frame % 3) == 0 ) { + sprites[12].Mirrored = !sprites[12].Mirrored; + drawSprite(4,3,12); + } + if( (frame % 2) == 0 ) { - frame = 0; + //frame = 0; if( *pText != 0 ) { -// while( *pText++ == '@' ) -// x+=8; + while( *pText == '@' ) { + drawChar(x, y, *pText++, palette); + x+=8; + } + + + if( *pText == 0 ) + _state = 2; + else { - if( *pText == 13 ) { - x = 0; - pText++; - } else if( *pText == 10 ) { - y += 8; - pText++; - } else { - drawChar(x, y, *pText++); - x+=8; + if( *pText == 13 ) { + x = 0; + pText++; + } else if( *pText == 10 ) { + y += 8; + pText++; + } else { + sfx(letter_tick,0); + + drawChar(x, y, *pText++, palette); + x+=8; + } } } else _state = 2; } } - if(retro.buttons.pressed(BTN_ROBOT)) { + if(retro.pressed(BTN_ROBOT)) { _state = 0; return Game; } - if(retro.buttons.pressed(BTN_SHIP)) { + if(retro.pressed(BTN_SHIP)) { if( _state == 1 ) { - drawString(0, 80, texts[curText]); + drawString(0, 80, texts[curText], palette); _state = 2; } else if( _state == 2 ) { if( curText < 2 ) {
diff -r f5f961973d01 -r dcea5500a32d Game/IntroScreen.h --- a/Game/IntroScreen.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/IntroScreen.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __INTRO_SCREEN_H__ #define __INTRO_SCREEN_H__
diff -r f5f961973d01 -r dcea5500a32d Game/LevelScreen.cpp --- a/Game/LevelScreen.cpp Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/LevelScreen.cpp Sun Mar 01 05:32:06 2015 +0000 @@ -1,21 +1,96 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #include "mbed.h" #include "LevelScreen.h" +#include "GameScreen.h" #include "Retro.h" -//#include "font_OEM.h" +#include "Color565.h" #include "Sprites.h" + extern Retro retro; +extern GameScreen * pGameScreen; LevelScreen::LevelScreen() { _state = 0; } + + + Screen LevelScreen::Update() -{ - if( _state == 0 ) - ; - - +{ + int x = 68; + int y = 60; + + if( _state == 0 ) { + + retro.display.clearScreen(); + drawString(0,0,"@@@@SELECT@LEVEL@@@@", palette); + drawLevelNumber(x,y,GameLevel); + + _state = 1; + } + + if(retro.pressed(BTN_SHIP)) { + _state = 0; + pGameScreen->unpackLevel(GameLevel); + return Game; + } else if( retro.pressed(BTN_ROBOT)) { + _state = 0; + return Game; + } + + + if(retro.pressed(BTN_UP)) { + + GameLevel+=5; + if( GameLevel > 99 ) + GameLevel = 99; + + drawLevelNumber(x,y,GameLevel); + + } else if(retro.pressed(BTN_DOWN)) { + GameLevel-=5; + if( GameLevel < 0 ) + GameLevel = 0; + + drawLevelNumber(x,y,GameLevel); + + } else if(retro.pressed(BTN_LEFT)) { + GameLevel--; + if( GameLevel < 0 ) + GameLevel = 0; + + drawLevelNumber(x,y,GameLevel); + + } else if(retro.pressed(BTN_RIGHT)) { + GameLevel++; + if( GameLevel > 99 ) + GameLevel = 99; + + drawLevelNumber(x,y,GameLevel); + } + + return Level; } \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d Game/LevelScreen.h --- a/Game/LevelScreen.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/LevelScreen.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __LEVEL_SCREEN_H__ #define __LEVEL_SCREEN_H__ @@ -5,7 +25,7 @@ class LevelScreen : public ScreenBase { - int _state; + int _state; public: int GameLevel; public:
diff -r f5f961973d01 -r dcea5500a32d Game/Levels.h --- a/Game/Levels.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/Levels.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __LEVELS_H__ #define __LEVELS_H__
diff -r f5f961973d01 -r dcea5500a32d Game/MenuScreen.cpp --- a/Game/MenuScreen.cpp Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/MenuScreen.cpp Sun Mar 01 05:32:06 2015 +0000 @@ -1,24 +1,45 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #include "mbed.h" #include "MenuScreen.h" #include "GameScreen.h" +#include "LevelScreen.h" #include "Retro.h" -//#include "font_OEM.h" #include "Sprites.h" char options[][13] = { + "BACK@@@@@@@@", "INTRO@@@@@@@", "RESET@@LEVEL", "SELECT@LEVEL", - "BACK@@@@@@@@" }; extern Retro retro; extern GameScreen * pGameScreen; +extern LevelScreen * pLevelScreen; MenuScreen::MenuScreen() { _oldSelection = 0; - _selection = 3; + _selection = 0; _state = 0; } @@ -30,7 +51,7 @@ retro.display.clearScreen(); for( int i = 0; i<4; i++) { - drawString(8+16, y, options[i]); + drawString(8+16, y, options[i], palette); y+=16; } _state = 1; @@ -43,7 +64,7 @@ _state = 2; } - if(retro.buttons.pressed(BTN_UP)) { + if(retro.pressed(BTN_UP)) { _oldSelection = _selection; if(_selection == 0) _selection = 3; @@ -51,7 +72,7 @@ _selection--; _state = 1; } - if(retro.buttons.pressed(BTN_DOWN)) { + if(retro.pressed(BTN_DOWN)) { _oldSelection = _selection; if(_selection == 3) _selection = 0; @@ -59,21 +80,27 @@ _selection++; _state = 1; } - if(retro.buttons.pressed(BTN_SHIP)) { + if(retro.pressed(BTN_SHIP)) { _state = 0; if( _selection == 0 ) + return Game; + if( _selection == 1 ) return Intro; - if( _selection == 1 ) + if( _selection == 2 ) { if( pGameScreen ) pGameScreen->resetLevel(); return Game; } if( _selection == 3 ) - return Game; - if( _selection == 2 ) + { + if( pLevelScreen == NULL ) + pLevelScreen = new LevelScreen(); + pLevelScreen->GameLevel = pGameScreen->getLevel(); + return Level; + } } return Menu; } \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d Game/MenuScreen.h --- a/Game/MenuScreen.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/MenuScreen.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __MENU_SCREEN_H__ #define __MENU_SCREEN_H__
diff -r f5f961973d01 -r dcea5500a32d Game/ScreenBase.h --- a/Game/ScreenBase.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/ScreenBase.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,3 +1,23 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __SCREEN_BASE_H__ #define __SCREEN_BASE_H__ @@ -15,4 +35,5 @@ virtual Screen Update() = 0; }; +void sfx( const int * effect, int channel); #endif //__SCREEN_BASE_H__ \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d Game/Sprites.h --- a/Game/Sprites.h Sat Feb 21 06:19:29 2015 +0000 +++ b/Game/Sprites.h Sun Mar 01 05:32:06 2015 +0000 @@ -1,439 +1,244 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #ifndef __SPRITES_H__ #define __SPRITES_H__ -//const uint16_t brick[] = { -// 16,16, -// 0xBDF7, 0xE71C, 0xDEFB, 0xDEFB, 0xDEFB, 0xDEFB, 0xEF5D, 0x6B6D, 0xC638, 0xE71C, 0xDEFB, 0xDEFB, 0xDEFB, 0xDEFB, 0xEF5D, 0x73AE, -// 0x94B2, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x7BCF, -// 0xA534, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x8410, -// 0x2104, 0x18E3, 0x18E3, 0x2945, 0x2104, 0x18E3, 0x2104, 0x0841, 0x2124, 0x18E3, 0x18E3, 0x2945, 0x2104, 0x18E3, 0x2104, 0x0841, -// 0xF79E, 0xF79E, 0xFFFF, 0x73AE, 0xD69A, 0xF7BE, 0xF79E, 0xF7BE, 0xF79E, 0xF79E, 0xFFFF, 0x73AE, 0xD69A, 0xF7BE, 0xF79E, 0xF7BE, -// 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, -// 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, -// 0x2104, 0x18E3, 0x2104, 0x0841, 0x2124, 0x18E3, 0x18E3, 0x2945, 0x2104, 0x18E3, 0x2104, 0x0841, 0x2124, 0x18E3, 0x18E3, 0x2945, -// 0xCE79, 0xF7BE, 0xF79E, 0xF7BE, 0xF79E, 0xF79E, 0xFFFF, 0x73AE, 0xD69A, 0xF7BE, 0xF79E, 0xF7BE, 0xF79E, 0xF79E, 0xFFFF, 0x7BEF, -// 0x94B2, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x7BCF, -// 0xA534, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x8410, -// 0x2104, 0x18E3, 0x18E3, 0x2945, 0x2104, 0x18E3, 0x2104, 0x0841, 0x2124, 0x18E3, 0x18E3, 0x2945, 0x2104, 0x18E3, 0x2104, 0x0841, -// 0xF79E, 0xF79E, 0xFFFF, 0x73AE, 0xD69A, 0xF7BE, 0xF79E, 0xF7BE, 0xF79E, 0xF79E, 0xFFFF, 0x73AE, 0xD69A, 0xF7BE, 0xF79E, 0xF7BE, -// 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, 0xB596, 0xB596, 0xBDD7, 0x73AE, 0x9CD3, 0xB5B6, 0xB596, 0xB596, -// 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, 0xC638, 0xC638, 0xCE79, 0x7BEF, 0xAD55, 0xCE59, 0xC638, 0xC638, -// 0x3186, 0x3186, 0x31A6, 0x18E3, 0x31A6, 0x3186, 0x3186, 0x3186, 0x3186, 0x3186, 0x31A6, 0x18E3, 0x31A6, 0x3186, 0x3186, 0x3186 -//}; -#ifdef FULL_COLOR - -const uint16_t wall[] = { - 16,16, - 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, - 0x0000, 0x4A49, 0x4A49, 0x0000, 0x0000, 0x0000, 0x4A49, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x6B6D, 0x4A49, 0x4A49, - 0x0000, 0x0000, 0x4A49, 0x6B6D, 0x9492, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x4A49, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, - 0x0000, 0x0000, 0x6B6D, 0x9492, 0xB5B6, 0x9492, 0x6B6D, 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, - 0x0000, 0x0000, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, - 0x6B6D, 0x4A49, 0x0000, 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x6B6D, - 0x9492, 0x6B6D, 0x4A49, 0x0000, 0x4A49, 0x4A49, 0x4A49, 0x0000, 0x0000, 0x4A49, 0x6B6D, 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0x9492, - 0x9492, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4A49, 0x6B6D, 0x9492, 0xB5B6, - 0x6B6D, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x9492, 0xB5B6, 0xB5B6, - 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x4A49, 0x4A49, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0xB5B6, 0x9492, - 0x6B6D, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0xB5B6, 0x9492, - 0x4A49, 0x4A49, 0x4A49, 0x6B6D, 0x9492, 0xB5B6, 0x9492, 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x6B6D, 0x9492, 0x6B6D, - 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x4A49, 0x6B6D, 0x6B6D, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x0000, 0x4A49, 0x4A49, - 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x6B6D, 0x9492, 0xB5B6, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x0000, 0x0000, 0x4A49, - 0x6B6D, 0x6B6D, 0x6B6D, 0x4A49, 0x4A49, 0x6B6D, 0x9492, 0x9492, 0x6B6D, 0x4A49, 0x4A49, 0x0000, 0x0000, 0x0000, 0x4A49, 0x6B6D -}; - -const uint16_t barrel[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0881, 0x2124, 0x2124, 0x2123, 0x2124, 0x2123, 0x2124, 0x0882, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0861, 0x3164, 0x5183, 0x92C9, 0xAB6E, 0x8A20, 0xAB4D, 0x8A20, 0x79E0, 0x4941, 0x2964, 0x0861, 0x0000, 0x0000, - 0x0000, 0x0861, 0x4162, 0x8267, 0x9B0C, 0x4184, 0x18C1, 0x2102, 0x20E1, 0x20E3, 0x3942, 0x7A00, 0x71C0, 0x3941, 0x0861, 0x0000, - 0x0000, 0x3164, 0x8267, 0x49E7, 0x08C3, 0x2902, 0x3921, 0x3101, 0x3101, 0x3101, 0x2102, 0x08E4, 0x4162, 0x8224, 0x3185, 0x0000, - 0x0881, 0x5183, 0x9B0C, 0x10C2, 0x3921, 0x3121, 0x2901, 0x61C1, 0x61C1, 0x3121, 0x69E1, 0x5181, 0x10E3, 0x8A86, 0x4961, 0x0882, - 0x2124, 0x92C9, 0x4184, 0x4100, 0x4920, 0x4920, 0x4900, 0x6180, 0x6180, 0x4920, 0x6980, 0x5940, 0x4100, 0x3121, 0x92A8, 0x2124, - 0x2124, 0xAB4D, 0x08C2, 0x1903, 0x18E3, 0x1903, 0x1903, 0x10E3, 0x10E3, 0x1903, 0x1903, 0x10E3, 0x1903, 0x08E3, 0xAB4D, 0x2124, - 0x2124, 0xAB4C, 0x18C1, 0x69A0, 0xA280, 0x5960, 0x8220, 0x9A60, 0x9A60, 0x8220, 0x5960, 0xA280, 0x69A0, 0x18C1, 0xAB4C, 0x2124, - 0x2124, 0xA32C, 0x18E2, 0x4100, 0x38E0, 0x4100, 0x38E0, 0x38E0, 0x38E0, 0x38E0, 0x4100, 0x38E0, 0x4100, 0x18E1, 0xAB4C, 0x2124, - 0x2123, 0x8A41, 0x10E4, 0x2123, 0x2103, 0x2943, 0x3163, 0x1903, 0x3143, 0x2943, 0x3143, 0x2943, 0x2103, 0x08C2, 0xAB4D, 0x2124, - 0x2124, 0x92C9, 0x3941, 0x4100, 0x4900, 0x71C0, 0x8A20, 0x4900, 0x8A00, 0x8A00, 0x8A00, 0x69A0, 0x4100, 0x4184, 0x92C9, 0x2124, - 0x0882, 0x4940, 0x7A00, 0x18E3, 0x3121, 0x2902, 0x2902, 0x3102, 0x2902, 0x2902, 0x2901, 0x3101, 0x10C2, 0x9B0C, 0x5183, 0x0881, - 0x0000, 0x2943, 0x7A02, 0x49E8, 0x18E2, 0x3101, 0x3121, 0x3121, 0x3121, 0x3921, 0x2902, 0x08E3, 0x49E7, 0x8267, 0x3164, 0x0000, - 0x0000, 0x0861, 0x4163, 0x79E2, 0x92A6, 0x49A5, 0x18E2, 0x2103, 0x2103, 0x20E3, 0x3941, 0x8A85, 0x8267, 0x4142, 0x0861, 0x0000, - 0x0000, 0x0000, 0x0861, 0x2943, 0x4982, 0x7A00, 0x8A20, 0x8A20, 0x8A20, 0x8A20, 0x79E0, 0x4962, 0x3165, 0x0861, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0882, 0x2123, 0x2123, 0x2123, 0x2123, 0x2123, 0x2124, 0x0882, 0x0000, 0x0000, 0x0000, 0x0000 -}; - - -const uint16_t crate[] = { - 16,16, - 0x5A00, 0x7B00, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x72E0, 0x7B00, 0x4140, - 0x7B00, 0xB3A0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xB3A0, 0x5A20, - 0x38C0, 0x41A0, 0x5200, 0x49C0, 0x49C0, 0x49C0, 0x5200, 0x4180, 0x41A0, 0x5200, 0x49C0, 0x49C0, 0x49C0, 0x49C0, 0x49C0, 0x0000, - 0x8300, 0xBC40, 0x5A00, 0x8320, 0x8B40, 0x9340, 0x4980, 0xC480, 0xABC0, 0x3140, 0x9360, 0x8B40, 0x8B40, 0x8300, 0xBC40, 0x6220, - 0x72E0, 0xAB80, 0x49E0, 0x72A0, 0x72E0, 0x7300, 0x3160, 0xB400, 0x9B40, 0x30A0, 0x7B00, 0x72E0, 0x72E0, 0x72E0, 0xAB80, 0x5200, - 0x72E0, 0xABA0, 0x49C0, 0xA380, 0xABA0, 0xB3A0, 0x6A20, 0xB400, 0x9B40, 0x4A00, 0xB3A0, 0xABA0, 0xB3A0, 0x6AC0, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x5200, 0x20E0, 0x41A0, 0x41A0, 0x0000, 0xB400, 0x9B60, 0x0000, 0x49C0, 0x4180, 0x4180, 0x7B00, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x4180, 0xC480, 0xB400, 0xB420, 0x6A80, 0xB400, 0x9340, 0x72A0, 0xB420, 0xB400, 0xABC0, 0x6AC0, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x41A0, 0xABC0, 0x9340, 0x9B60, 0x51C0, 0xB400, 0x9340, 0x5A00, 0x9B40, 0x9340, 0x8300, 0x72E0, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x4A00, 0x6A00, 0x6200, 0x6A20, 0x2040, 0xB400, 0x9B60, 0x3060, 0x7300, 0x72C0, 0x72E0, 0x72E0, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x49C0, 0xA380, 0xABA0, 0xB3C0, 0x6A20, 0xB400, 0x9B40, 0x4A00, 0xB3A0, 0xABA0, 0xB3A0, 0x6AC0, 0xABA0, 0x5200, - 0x72E0, 0xABA0, 0x5200, 0x2920, 0x41A0, 0x41A0, 0x0000, 0xB420, 0x9B60, 0x0000, 0x49C0, 0x4180, 0x3960, 0x7B00, 0xABA0, 0x5200, - 0x72A0, 0xA360, 0x20E0, 0xABE0, 0xB420, 0xBC20, 0x6A60, 0xABC0, 0x8300, 0x59E0, 0xBC20, 0xB400, 0xBC20, 0x6A60, 0xA360, 0x41A0, - 0x51C0, 0x72E0, 0x7B00, 0x6AC0, 0x6AC0, 0x6AC0, 0x72E0, 0x6AC0, 0x72E0, 0x7300, 0x6AC0, 0x6AC0, 0x6AC0, 0x72E0, 0x7300, 0x4120, - 0x7B00, 0xB3A0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xABA0, 0xB3A0, 0x5A20, - 0x4140, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x1060, -}; - -const uint16_t left[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xE8E4, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0x0000, 0x0000, - 0x0000, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0x0000, 0x0000, - 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xE8E4, 0xBBCA, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; - -const uint16_t right[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xE8E4, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0xBBCA, 0x0000, 0x0000, - 0x0000, 0x0000, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0x0000, - 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xBBCA, 0xE8E4, 0xE8E4, 0xE8E4, 0xBBCA, 0xBBCA, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0xBBCA, 0xE8E4, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBBCA, 0xBBCA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; - -const uint16_t ladder[] = { - 16,16, - 0x4920, 0x9240, 0xFC8D, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFC8D, 0xDB60, 0x4920, - 0xDB60, 0x9240, 0xDB60, 0x9240, 0xFC8D, 0x9240, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0x9240, 0xFC8D, 0x9240, 0xDB60, 0x9240, - 0x9240, 0xFC8D, 0x9240, 0xFC8D, 0x9240, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0x9240, 0xFC8D, 0x9240, 0xFC8D, - 0x9240, 0xDB60, 0xFC8D, 0x9240, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0x9240, 0xFC8D, 0xDB60, - 0x9240, 0xDB60, 0x9240, 0xDB60, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0xDB60, 0x9240, 0x9240, - 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, - 0x4920, 0x9240, 0xDB60, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4920, 0xDB60, 0x9240, 0x4920, - 0x4920, 0xDB60, 0x9240, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4920, 0x9240, 0xFC8D, 0x4920, - 0x4920, 0x9240, 0xFC8D, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFC8D, 0xDB60, 0x4920, - 0xDB60, 0x9240, 0xDB60, 0x9240, 0xFC8D, 0x9240, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0x9240, 0xFC8D, 0x9240, 0xDB60, 0x9240, - 0x9240, 0xFC8D, 0x9240, 0xFC8D, 0x9240, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0x9240, 0xFC8D, 0x9240, 0xFC8D, - 0x9240, 0xDB60, 0xFC8D, 0x9240, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0xDB60, 0x9240, 0xFC8D, 0xDB60, - 0x9240, 0xDB60, 0x9240, 0xDB60, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0x9240, 0xDB60, 0x9240, 0x9240, - 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, - 0x4920, 0x9240, 0xDB60, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4920, 0xDB60, 0x9240, 0x4920, - 0x4920, 0xDB60, 0x9240, 0x4920, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4920, 0x9240, 0xFC8D, 0x4920 -}; - -const uint16_t door[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x9492, 0x9492, 0x9492, 0x9492, 0x9492, 0x9492, 0x9492, 0x6B6D, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x2124, 0x4A49, 0x6B6D, 0x4A49, - 0x6B6D, 0x6B6D, 0x6B6D, 0x6B6D, 0x6B6D, 0x6B6D, 0x6B6D, 0x6B6D, 0x9492, 0x6B6D, 0x6B6D, 0x2124, 0x2124, 0x2124, 0x9492, 0x4A49, - 0x4A49, 0x4A49, 0x4A49, 0x4A49, 0x4A49, 0x4A49, 0x4A49, 0x4A49, 0x9492, 0x6B6D, 0x6B6D, 0x6B6D, 0x2124, 0x6B6D, 0x6B6D, 0x4A49, - 0x0000, 0x0000, 0x0000, 0x4A49, 0x2124, 0x0000, 0x0000, 0x0000, 0x9492, 0x6B6D, 0x6B6D, 0x4A49, 0x2124, 0x4A49, 0x6B6D, 0x4A49, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x2124, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x4A49, 0x4A49, 0x6B6D, 0x4A49, 0x4A49, 0x4A49, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4A49, 0x2124, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6B6D, 0x4A49, 0x0000, 0x0000, 0x0000 -}; - -const uint16_t key[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0x7BEF, 0x7BEF, 0x7BEF, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFE41, 0xFE41, 0xFE41, 0xFE41, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFE41, 0xFC8D, 0x7BEF, 0xFC8D, 0xFE41, 0xFE41, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0x7BEF, 0x0000, 0x7BEF, 0xFC8D, 0xFE41, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0x7BEF, 0x0000, 0x7BEF, 0xFC8D, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFC8D, 0xFC8D, 0x7BEF, 0xFC8D, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFC8D, 0xFC8D, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0xFC8D, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0xFC8D, 0xFC8D, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0xFE41, 0xFC8D, 0x7BEF, 0x7BEF, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7BEF, 0x7BEF, 0x7BEF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; - -const uint16_t rick[] = { - 16,16, - 0x0000, 0x0000, 0x2124, 0x4920, 0x9240, 0xDB60, 0xDB60, 0x9240, 0x4920, 0x4920, 0x9240, 0x9240, 0x2124, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x2124, 0x9240, 0x9240, 0x9240, 0xDB60, 0xDB60, 0x9240, 0x9240, 0x9240, 0xDB60, 0x4920, 0x2124, 0x0000, 0x0000, - 0x2124, 0x2124, 0x4920, 0xB36D, 0xB36D, 0xB36D, 0xB36D, 0xB36D, 0xB36D, 0xDB60, 0xFC8D, 0xB36D, 0x4920, 0x2124, 0x2124, 0x2124, - 0x2124, 0x2124, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x4920, 0x2124, 0x2124, - 0x0000, 0x2124, 0xB36D, 0xFC8D, 0x9240, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0x9240, 0xFC8D, 0xFC8D, 0xFC8D, 0xB36D, 0x2124, 0x0000, - 0x0000, 0x2124, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0x4A49, 0x9492, 0xFC8D, 0xB36D, 0x9240, 0x9240, 0x9240, 0x2124, 0x0000, 0x0000, - 0x0000, 0x2124, 0x4920, 0x4920, 0x4920, 0xFC8D, 0x4A49, 0x6B6D, 0xB5B6, 0x9492, 0xB5B6, 0x9492, 0x2124, 0x0000, 0x0000, 0x0000, - 0x2124, 0x4920, 0x4920, 0xDB60, 0x9240, 0x4920, 0xFC8D, 0x4A49, 0x6B6D, 0x4A49, 0xFC8D, 0xFC8D, 0x9240, 0x2124, 0x0000, 0x0000, - 0x2124, 0x4920, 0x4920, 0xDB60, 0x9240, 0x4920, 0xB36D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0xB36D, 0x4920, 0x2124, 0x0000, 0x0000, - 0x2124, 0x4920, 0x4920, 0x9240, 0x9240, 0x4920, 0x2124, 0x2124, 0x2124, 0x4A49, 0x6B6D, 0x2124, 0x2124, 0x0000, 0x0000, 0x0000, - 0x2124, 0x4920, 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, 0x9240, 0x9240, 0x4920, 0x9240, 0x4920, 0x2124, 0x0000, 0x0000, 0x0000, - 0x2124, 0xB36D, 0xFC8D, 0xFC8D, 0xFC8D, 0xFC8D, 0x4920, 0x4920, 0x9240, 0x4920, 0x4920, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x2124, 0xDB60, 0xFC8D, 0xFC8D, 0xB36D, 0x2124, 0x2124, 0x2124, 0x2124, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2124, 0x4A49, 0x4A49, 0xB5B6, 0x6B6D, 0x4A49, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2124, 0x4A49, 0x4A49, 0x6B6D, 0xB5B6, 0x4A49, 0x4A49, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2124, 0x4A49, 0x4A49, 0x4A49, 0x6B6D, 0xB5B6, 0x4A49, 0x4A49, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000 -}; - -const uint16_t totem[] = { - 16,16, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18C2, 0x0861, 0x0000, 0x0000, 0x0861, 0x18C2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7221, 0x49A2, 0x20C2, 0x20C2, 0x49A2, 0x7221, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x08C3, 0x0000, 0x92E8, 0x49C5, 0x5980, 0x5980, 0x49C5, 0x92E8, 0x0000, 0x08C3, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x2103, 0xBAE0, 0x49A3, 0x3121, 0xFC49, 0x8A40, 0x8A40, 0xFC49, 0x3121, 0x49A3, 0xBAE0, 0x2103, 0x0000, 0x0000, - 0x0000, 0x0041, 0x2922, 0xB2E4, 0xF426, 0x4960, 0x81E0, 0x9AE6, 0x9AE6, 0x81E0, 0x4960, 0xF426, 0xB2E4, 0x2922, 0x0041, 0x0000, - 0x10C2, 0x8A40, 0x10E4, 0x28C0, 0xDB83, 0xB2A0, 0xBB47, 0xDD53, 0xDD53, 0xBB47, 0xB2A0, 0xDB83, 0x28C0, 0x10E4, 0x8A40, 0x10C2, - 0x3122, 0xE3E8, 0xBB22, 0x7A21, 0x9220, 0x5140, 0xD320, 0xEC49, 0xEC49, 0xD320, 0x5140, 0x9220, 0x7A21, 0xBB22, 0xE3E8, 0x3122, - 0x0000, 0x3920, 0xCB87, 0x79C0, 0x3180, 0x2589, 0x3941, 0xDC26, 0xDC26, 0x3941, 0x2589, 0x3180, 0x79C0, 0xCB87, 0x3920, 0x0000, - 0x3965, 0xBB24, 0x5940, 0xD365, 0x6A60, 0x6260, 0x7A20, 0xFCCC, 0xFCCC, 0x7A20, 0x6260, 0x6A60, 0xD365, 0x5940, 0xBB24, 0x3965, - 0x3962, 0xF428, 0x8A20, 0xC2E0, 0xFC6B, 0xE3E7, 0x9220, 0x6181, 0x6181, 0x9220, 0xE3E7, 0xFC6B, 0xC2E0, 0x8A20, 0xF428, 0x3962, - 0x10A2, 0x4120, 0x8A20, 0xE3A1, 0x69C0, 0x4940, 0x28C0, 0xB322, 0xB322, 0x28C0, 0x4940, 0x69C0, 0xE3A1, 0x8A20, 0x4120, 0x10A2, - 0x2902, 0x9AA1, 0x8A43, 0xD3A7, 0x10E3, 0x1104, 0x08C4, 0x6286, 0x6286, 0x08C4, 0x1104, 0x10E3, 0xD3A7, 0x8A43, 0x9AA1, 0x2902, - 0x2923, 0x9A40, 0x71E2, 0xDBA7, 0x38E0, 0x18C2, 0xAAA0, 0x8A20, 0x8A20, 0xAAA0, 0x18C2, 0x38E0, 0xDBA7, 0x71E2, 0x9A40, 0x2923, - 0x0000, 0x00C5, 0x8200, 0xF405, 0xBB24, 0x79C0, 0xDB40, 0xCC2C, 0xCC2C, 0xDB40, 0x79C0, 0xBB24, 0xF405, 0x8200, 0x00C5, 0x0000, - 0x20C2, 0x7A42, 0x9240, 0xA260, 0xF405, 0x79C0, 0xA280, 0xCC6B, 0xCC6B, 0xA280, 0x79C0, 0xF405, 0xA260, 0x9240, 0x7A42, 0x20C2, - 0x2123, 0x9220, 0x9A60, 0x4100, 0x8A20, 0x08C4, 0x4100, 0xAA80, 0xAA80, 0x4100, 0x08C4, 0x8A20, 0x4100, 0x9A60, 0x9220, 0x2123, -}; - -#else - -const uint8_t wall[] = { - 0x05,0x05,0x01,0x01,0x00,0x01,0x05,0x02,0x05,0x05,0x01,0x00,0x05,0x05,0x01,0x00, - 0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x05,0x05,0x01,0x00,0x05,0x02,0x05,0x01,0x01, - 0x00,0x00,0x01,0x05,0x02,0x05,0x01,0x00,0x00,0x00,0x01,0x02,0x05,0x05,0x01,0x01, - 0x00,0x00,0x05,0x02,0x03,0x02,0x05,0x01,0x00,0x01,0x05,0x02,0x05,0x05,0x01,0x00, - 0x00,0x00,0x05,0x02,0x02,0x05,0x05,0x01,0x00,0x05,0x02,0x05,0x05,0x01,0x01,0x00, - 0x05,0x01,0x00,0x05,0x05,0x05,0x01,0x01,0x00,0x05,0x02,0x05,0x01,0x01,0x00,0x05, - 0x02,0x05,0x01,0x00,0x01,0x01,0x01,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x05,0x02, - 0x02,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x02,0x03, - 0x05,0x05,0x01,0x00,0x00,0x05,0x05,0x05,0x01,0x00,0x00,0x00,0x05,0x02,0x03,0x03, - 0x05,0x01,0x01,0x00,0x05,0x02,0x02,0x05,0x01,0x01,0x01,0x00,0x05,0x02,0x03,0x02, - 0x05,0x01,0x00,0x05,0x02,0x02,0x05,0x05,0x05,0x01,0x01,0x00,0x01,0x05,0x03,0x02, - 0x01,0x01,0x01,0x05,0x02,0x03,0x02,0x05,0x05,0x05,0x01,0x01,0x00,0x05,0x02,0x05, - 0x01,0x00,0x01,0x05,0x02,0x02,0x05,0x02,0x05,0x05,0x01,0x01,0x00,0x01,0x05,0x05, - 0x00,0x00,0x00,0x05,0x05,0x02,0x02,0x05,0x05,0x05,0x01,0x01,0x00,0x00,0x01,0x01, - 0x05,0x05,0x01,0x01,0x05,0x02,0x03,0x02,0x05,0x05,0x01,0x01,0x00,0x00,0x00,0x01, - 0x05,0x05,0x05,0x01,0x01,0x05,0x02,0x02,0x05,0x01,0x01,0x00,0x00,0x00,0x01,0x05 -}; - -const uint8_t barrel[] = { - 0x00,0x00,0x00,0x00,0x06,0x07,0x07,0x08,0x07,0x08,0x07,0x09,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x0F,0x11,0x12,0x13,0x0A,0x00,0x00, - 0x00,0x0A,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x0A,0x00, - 0x00,0x0B,0x15,0x20,0x21,0x22,0x23,0x24,0x24,0x24,0x19,0x25,0x14,0x26,0x27,0x00, - 0x06,0x0C,0x16,0x28,0x23,0x29,0x2A,0x2B,0x2B,0x29,0x2C,0x2D,0x2E,0x2F,0x30,0x09, - 0x07,0x0D,0x17,0x31,0x32,0x32,0x33,0x34,0x34,0x32,0x35,0x36,0x31,0x29,0x37,0x07, - 0x07,0x10,0x38,0x39,0x3A,0x39,0x39,0x2E,0x2E,0x39,0x39,0x2E,0x39,0x3B,0x10,0x07, - 0x07,0x3C,0x18,0x3D,0x3E,0x3F,0x40,0x41,0x41,0x40,0x3F,0x3E,0x3D,0x18,0x3C,0x07, - 0x07,0x42,0x43,0x31,0x44,0x31,0x44,0x44,0x44,0x44,0x31,0x44,0x31,0x45,0x3C,0x07, - 0x08,0x46,0x47,0x08,0x48,0x49,0x4A,0x39,0x4B,0x49,0x4B,0x49,0x48,0x38,0x10,0x07, - 0x07,0x0D,0x1F,0x31,0x33,0x1E,0x0F,0x33,0x4C,0x4C,0x4C,0x3D,0x31,0x17,0x0D,0x07, - 0x09,0x4D,0x1D,0x3A,0x29,0x22,0x22,0x4E,0x22,0x22,0x2A,0x24,0x28,0x16,0x0C,0x06, - 0x00,0x49,0x4F,0x50,0x43,0x24,0x29,0x29,0x29,0x23,0x22,0x3B,0x20,0x15,0x0B,0x00, - 0x00,0x0A,0x51,0x52,0x53,0x54,0x43,0x48,0x48,0x1B,0x1F,0x55,0x15,0x56,0x0A,0x00, - 0x00,0x00,0x0A,0x49,0x57,0x1D,0x0F,0x0F,0x0F,0x0F,0x11,0x58,0x59,0x0A,0x00,0x00, - 0x00,0x00,0x00,0x00,0x09,0x08,0x08,0x08,0x08,0x08,0x07,0x09,0x00,0x00,0x00,0x00 -}; - -const uint8_t left[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x5A,0x5B,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x5A,0x5A,0x5B,0x5B,0x5B,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x00,0x00, - 0x00,0x5A,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5A,0x00,0x00, - 0x00,0x00,0x5A,0x5A,0x5B,0x5B,0x5B,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x00,0x00, - 0x00,0x00,0x00,0x00,0x5A,0x5B,0x5A,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -const uint8_t right[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5B,0x5A,0x00,0x00,0x00,0x00, - 0x00,0x00,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5B,0x5B,0x5B,0x5A,0x5A,0x00,0x00, - 0x00,0x00,0x5A,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5B,0x5A,0x00, - 0x00,0x00,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5A,0x5B,0x5B,0x5B,0x5A,0x5A,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x5A,0x5B,0x5A,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x5A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -const uint8_t ladder[] = { - 0x32,0x5C,0x5D,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x5E,0x32, - 0x5E,0x5C,0x5E,0x5C,0x5D,0x5C,0x5E,0x5E,0x5E,0x5E,0x5E,0x5C,0x5D,0x5C,0x5E,0x5C, - 0x5C,0x5D,0x5C,0x5D,0x5C,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x5C,0x5D,0x5C,0x5D, - 0x5C,0x5E,0x5D,0x5C,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5C,0x5D,0x5E, - 0x5C,0x5E,0x5C,0x5E,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5E,0x5C,0x5C, - 0x32,0x32,0x5C,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x5C,0x32,0x32, - 0x32,0x5C,0x5E,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x5E,0x5C,0x32, - 0x32,0x5E,0x5C,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x5C,0x5D,0x32, - 0x32,0x5C,0x5D,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x5E,0x32, - 0x5E,0x5C,0x5E,0x5C,0x5D,0x5C,0x5E,0x5E,0x5E,0x5E,0x5E,0x5C,0x5D,0x5C,0x5E,0x5C, - 0x5C,0x5D,0x5C,0x5D,0x5C,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x5D,0x5C,0x5D,0x5C,0x5D, - 0x5C,0x5E,0x5D,0x5C,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x5C,0x5D,0x5E, - 0x5C,0x5E,0x5C,0x5E,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x5E,0x5C,0x5C, - 0x32,0x32,0x5C,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x5C,0x32,0x32, - 0x32,0x5C,0x5E,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x5E,0x5C,0x32, - 0x32,0x5E,0x5C,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x5C,0x5D,0x32 -}; - -const uint8_t crate[] = { - 0x5F,0x60,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x60,0x62, - 0x60,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x63,0x65, - 0x66,0x67,0x68,0x69,0x69,0x69,0x68,0x6A,0x67,0x68,0x69,0x69,0x69,0x69,0x69,0x00, - 0x6B,0x6C,0x5F,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x6E,0x6E,0x6B,0x6C,0x75, - 0x61,0x76,0x77,0x78,0x61,0x79,0x7A,0x7B,0x7C,0x7D,0x60,0x61,0x61,0x61,0x76,0x68, - 0x61,0x64,0x69,0x7E,0x64,0x63,0x7F,0x7B,0x7C,0x80,0x63,0x64,0x63,0x81,0x64,0x68, - 0x61,0x64,0x68,0x82,0x67,0x67,0x00,0x7B,0x83,0x00,0x69,0x6A,0x6A,0x60,0x64,0x68, - 0x61,0x64,0x6A,0x71,0x7B,0x84,0x85,0x7B,0x6F,0x78,0x84,0x7B,0x72,0x81,0x64,0x68, - 0x61,0x64,0x67,0x72,0x6F,0x83,0x86,0x7B,0x6F,0x5F,0x7C,0x6F,0x6B,0x61,0x64,0x68, - 0x61,0x64,0x80,0x87,0x88,0x7F,0x89,0x7B,0x83,0x8A,0x79,0x8B,0x61,0x61,0x64,0x68, - 0x61,0x64,0x69,0x7E,0x64,0x8C,0x7F,0x7B,0x7C,0x80,0x63,0x64,0x63,0x81,0x64,0x68, - 0x61,0x64,0x68,0x8D,0x67,0x67,0x00,0x84,0x83,0x00,0x69,0x6A,0x8E,0x60,0x64,0x68, - 0x78,0x8F,0x82,0x90,0x84,0x91,0x92,0x72,0x6B,0x93,0x91,0x7B,0x91,0x92,0x8F,0x67, - 0x86,0x61,0x60,0x81,0x81,0x81,0x61,0x81,0x61,0x79,0x81,0x81,0x81,0x61,0x79,0x94, - 0x60,0x63,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x63,0x65, - 0x62,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x95 +const uint8_t rick_top[] = { +0x00, 0x00, 0x45, 0x55, 0x55, 0x54, 0x00, 0x00, +0x00, 0x45, 0x97, 0x77, 0x77, 0x76, 0xC4, 0x00, +0x04, 0x67, 0x96, 0x96, 0x69, 0x99, 0x76, 0x40, +0x0C, 0x79, 0x97, 0x89, 0x98, 0x79, 0x97, 0x50, +0x49, 0x79, 0x77, 0x88, 0x78, 0x77, 0x97, 0x94, +0x59, 0x77, 0xD7, 0x78, 0x88, 0x7D, 0x77, 0x95, +0x59, 0x77, 0x7D, 0x77, 0x77, 0xD7, 0x77, 0x95, +0x46, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77, 0x64, +0x4C, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x50, +0x59, 0x76, 0x67, 0x77, 0x77, 0x76, 0x99, 0xC0, +0x49, 0x7D, 0x76, 0x66, 0x66, 0x67, 0x9C, 0x40, +0x05, 0x99, 0xC7, 0x77, 0x77, 0x76, 0xC4, 0x00, +0x00, 0x46, 0x97, 0x7D, 0x7D, 0x77, 0xC0, 0x00, +0x00, 0x4C, 0x97, 0x9C, 0x4C, 0xD6, 0xC4, 0x00, +0x00, 0x45, 0x1C, 0x44, 0x5F, 0x15, 0x40, 0x00, +0x00, 0x05, 0x55, 0x54, 0x55, 0x55, 0x50, 0x00 }; const uint8_t rick[] = { - 0x00,0x00,0x07,0x32,0x5C,0x5E,0x5E,0x5C,0x32,0x32,0x5C,0x5C,0x07,0x00,0x00,0x00, - 0x00,0x00,0x07,0x5C,0x5C,0x5C,0x5E,0x5E,0x5C,0x5C,0x5C,0x5E,0x32,0x07,0x00,0x00, - 0x07,0x07,0x32,0x96,0x96,0x96,0x96,0x96,0x96,0x5E,0x5D,0x96,0x32,0x07,0x07,0x07, - 0x07,0x07,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x07,0x07, - 0x00,0x07,0x96,0x5D,0x5C,0x5D,0x5D,0x5D,0x5D,0x5C,0x5D,0x5D,0x5D,0x96,0x07,0x00, - 0x00,0x07,0x5D,0x5D,0x5D,0x5D,0x01,0x02,0x5D,0x96,0x5C,0x5C,0x5C,0x07,0x00,0x00, - 0x00,0x07,0x32,0x32,0x32,0x5D,0x01,0x05,0x03,0x02,0x03,0x02,0x07,0x00,0x00,0x00, - 0x07,0x32,0x32,0x5E,0x5C,0x32,0x5D,0x01,0x05,0x01,0x5D,0x5D,0x5C,0x07,0x00,0x00, - 0x07,0x32,0x32,0x5E,0x5C,0x32,0x96,0x5D,0x5D,0x5D,0x5D,0x96,0x32,0x07,0x00,0x00, - 0x07,0x32,0x32,0x5C,0x5C,0x32,0x07,0x07,0x07,0x01,0x05,0x07,0x07,0x00,0x00,0x00, - 0x07,0x32,0x32,0x32,0x5C,0x32,0x32,0x5C,0x5C,0x32,0x5C,0x32,0x07,0x00,0x00,0x00, - 0x07,0x96,0x5D,0x5D,0x5D,0x5D,0x32,0x32,0x5C,0x32,0x32,0x07,0x00,0x00,0x00,0x00, - 0x00,0x07,0x5E,0x5D,0x5D,0x96,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x07,0x01,0x01,0x03,0x05,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x07,0x01,0x01,0x05,0x03,0x01,0x01,0x07,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x07,0x01,0x01,0x01,0x05,0x03,0x01,0x01,0x07,0x00,0x00,0x00,0x00 -}; +0x00, 0x56, 0x78, 0x87, 0x66, 0x77, 0x50, 0x00, +0x00, 0x57, 0x77, 0x88, 0x77, 0x78, 0x65, 0x00, +0x55, 0x6D, 0xDD, 0xDD, 0xD8, 0xBD, 0x65, 0x55, +0x55, 0x66, 0x66, 0x96, 0x96, 0x66, 0x66, 0x45, +0x05, 0xDB, 0x7B, 0xBB, 0xB7, 0xBB, 0xBD, 0x50, +0x05, 0xBB, 0xBB, 0x12, 0xBD, 0x77, 0x75, 0x00, +0x05, 0x66, 0x6B, 0x1A, 0x32, 0x32, 0x50, 0x00, +0x56, 0x68, 0x76, 0xB1, 0xA1, 0xBB, 0x75, 0x00, +0x56, 0x68, 0x76, 0xDB, 0xBB, 0xBD, 0x65, 0x00, +0x56, 0x67, 0x76, 0x55, 0x51, 0xA5, 0x50, 0x00, +0x46, 0x66, 0x76, 0x67, 0x76, 0x76, 0x50, 0x00, +0x5D, 0xBB, 0xBB, 0x66, 0x76, 0x65, 0x00, 0x00, +0x05, 0x8B, 0xBD, 0x55, 0x55, 0x50, 0x00, 0x00, +0x00, 0x05, 0x11, 0x3A, 0x14, 0x00, 0x00, 0x00, +0x00, 0x05, 0x11, 0xA3, 0x11, 0x50, 0x00, 0x00, +0x00, 0x04, 0x55, 0x55, 0x55, 0x54, 0x00, 0x00 +}; + +const uint8_t barrel[] = { +0x00, 0x00, 0x45, 0x55, 0x55, 0x54, 0x00, 0x00, +0x00, 0x45, 0x9D, 0xD7, 0xD7, 0x76, 0x54, 0x00, +0x04, 0xCD, 0xD5, 0x45, 0x44, 0xC7, 0x9C, 0x40, +0x05, 0x71, 0x4C, 0xCC, 0xCC, 0x54, 0xC7, 0x50, +0x49, 0xD4, 0xCC, 0xC9, 0x9C, 0x99, 0x4D, 0x64, +0x5D, 0x56, 0x66, 0x69, 0x96, 0x99, 0x6C, 0xD5, +0x5D, 0x45, 0x44, 0x54, 0x54, 0x54, 0x44, 0xD5, +0x5D, 0x49, 0x79, 0x77, 0x77, 0x97, 0x94, 0xD5, +0x5D, 0x56, 0x66, 0xC6, 0x6C, 0x66, 0x64, 0xD5, +0x57, 0x45, 0x45, 0xC4, 0x5C, 0x55, 0x54, 0xD5, +0x5D, 0xC6, 0x67, 0x76, 0x77, 0x79, 0x65, 0xD5, +0x46, 0x74, 0xCC, 0xCC, 0xCC, 0xCC, 0x4D, 0x64, +0x05, 0x91, 0x4C, 0xCC, 0xCC, 0xC4, 0x1D, 0x50, +0x04, 0xC7, 0xD5, 0x54, 0x54, 0xCD, 0x75, 0x40, +0x00, 0x45, 0x67, 0x77, 0x77, 0x7C, 0x50, 0x00, +0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00 +}; + +const uint8_t crate[] = { +0x97, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x76, +0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x89, +0xCC, 0x96, 0xC6, 0x6C, 0xC9, 0xC6, 0xC6, 0x60, +0x78, 0x97, 0x77, 0x98, 0x8C, 0x87, 0x77, 0x89, +0x78, 0x97, 0x77, 0xC8, 0x7C, 0x77, 0x77, 0x89, +0x78, 0xC8, 0x88, 0x98, 0x86, 0x88, 0x89, 0x89, +0x98, 0x94, 0xC6, 0x48, 0x74, 0xCC, 0xC7, 0x89, +0x78, 0xC8, 0x88, 0x98, 0x77, 0x88, 0x89, 0x89, +0x78, 0xC8, 0x78, 0x98, 0x89, 0x78, 0x77, 0x86, +0x78, 0x99, 0x99, 0x48, 0x7C, 0x79, 0x77, 0x89, +0x98, 0xC8, 0x88, 0x98, 0x79, 0x88, 0x89, 0x89, +0x78, 0x9C, 0xC6, 0x48, 0x84, 0x6C, 0xC7, 0x89, +0x77, 0x48, 0x88, 0x98, 0x79, 0x88, 0x89, 0x8C, +0x97, 0x77, 0x77, 0x79, 0x77, 0x77, 0x77, 0x7C, +0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x89, +0xC9, 0xCC, 0xCC, 0xC6, 0xCC, 0xCC, 0xCC, 0x64 +}; const uint8_t totem[] = { - 0x00,0x00,0x00,0x00,0x00,0x97,0x0A,0x00,0x00,0x0A,0x97,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x98,0x99,0x9A,0x9A,0x99,0x98,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x21,0x00,0x9B,0x9C,0x9D,0x9D,0x9C,0x9B,0x00,0x21,0x00,0x00,0x00, - 0x00,0x00,0x48,0x9E,0x9F,0x29,0xA0,0xA1,0xA1,0xA0,0x29,0x9F,0x9E,0x48,0x00,0x00, - 0x00,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA8,0xA7,0xA6,0xA5,0xA4,0xA3,0xA2,0x00, - 0x28,0xA1,0x47,0xA9,0xAA,0xAB,0xAC,0xAD,0xAD,0xAC,0xAB,0xAA,0xA9,0x47,0xA1,0x28, - 0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB5,0xB4,0xB3,0xB2,0xB1,0xB0,0xAF,0xAE, - 0x00,0xB6,0xB7,0xB8,0xB9,0xBA,0x1F,0xBB,0xBB,0x1F,0xBA,0xB9,0xB8,0xB7,0xB6,0x00, - 0xBC,0xBD,0x36,0xBE,0x92,0xBF,0xC0,0xC1,0xC1,0xC0,0xBF,0x92,0xBE,0x36,0xBD,0xBC, - 0xC2,0xC3,0x0F,0xC4,0xC5,0xC6,0xB2,0xC7,0xC7,0xB2,0xC6,0xC5,0xC4,0x0F,0xC3,0xC2, - 0xC8,0x94,0x0F,0xC9,0xCA,0x4D,0xA9,0xCB,0xCB,0xA9,0x4D,0xCA,0xC9,0x0F,0x94,0xC8, - 0x22,0xCC,0xCD,0xCE,0x2E,0xCF,0xD0,0xD1,0xD1,0xD0,0xCF,0x2E,0xCE,0xCD,0xCC,0x22, - 0xD2,0xD3,0xD4,0xD5,0x44,0x97,0xD6,0x0F,0x0F,0xD6,0x97,0x44,0xD5,0xD4,0xD3,0xD2, - 0x00,0xD7,0xD8,0xD9,0xBD,0xB8,0xDA,0xDB,0xDB,0xDA,0xB8,0xBD,0xD9,0xD8,0xD7,0x00, - 0x9A,0xDC,0x5C,0xDD,0xD9,0xB8,0x3E,0xDE,0xDE,0x3E,0xB8,0xD9,0xDD,0x5C,0xDC,0x9A, - 0x08,0xB2,0x41,0x31,0x0F,0xD0,0x31,0xDF,0xDF,0x31,0xD0,0x0F,0x31,0x41,0xB2,0x08 -}; +0x00, 0x00, 0x04, 0x40, 0x04, 0x40, 0x00, 0x00, +0x00, 0x00, 0x07, 0xC4, 0x49, 0x90, 0x00, 0x00, +0x00, 0x04, 0x0D, 0x19, 0x91, 0xD0, 0x40, 0x00, +0x00, 0x58, 0x6C, 0xB7, 0x7B, 0xC6, 0x85, 0x00, +0x00, 0x58, 0xB6, 0x7D, 0xD7, 0x6B, 0x84, 0x00, +0x47, 0x44, 0x88, 0xDB, 0x3D, 0x88, 0xC4, 0x74, +0xCB, 0x87, 0x76, 0x8B, 0xB8, 0x67, 0x98, 0xBC, +0x0C, 0xD7, 0xCE, 0x6B, 0x86, 0xE6, 0x7D, 0xC0, +0x58, 0x98, 0x79, 0x7B, 0xB7, 0x97, 0x89, 0x85, +0x5B, 0x78, 0xBB, 0x79, 0x97, 0xBB, 0x87, 0xBC, +0x46, 0x78, 0x96, 0xC8, 0x8C, 0x67, 0x87, 0x64, +0xC7, 0x7B, 0x54, 0x41, 0x14, 0x44, 0xB7, 0x7C, +0x57, 0x7D, 0x64, 0x87, 0x78, 0x4C, 0x87, 0x75, +0x04, 0x7B, 0x89, 0x8B, 0xD8, 0x7D, 0xB7, 0x40, +0x47, 0x77, 0xB7, 0x7B, 0xB7, 0x78, 0x77, 0x74, +0x47, 0x76, 0x70, 0xC7, 0x7C, 0x47, 0x67, 0x74 +}; const uint8_t door[] = { - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x02,0x05,0x05,0x01,0x07,0x01,0x05,0x01, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x02,0x05,0x05,0x07,0x07,0x07,0x02,0x01, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x05,0x05,0x05,0x07,0x05,0x05,0x01, - 0x00,0x00,0x00,0x01,0x07,0x00,0x00,0x00,0x02,0x05,0x05,0x01,0x07,0x01,0x05,0x01, - 0x00,0x00,0x00,0x05,0x07,0x00,0x00,0x00,0x05,0x01,0x01,0x01,0x05,0x01,0x01,0x01, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,0x00,0x00,0x00 -}; +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x22, 0x22, 0x22, 0x2A, +0x00, 0x0A, 0x10, 0x00, 0x2A, 0xA1, 0x51, 0xA1, +0xAA, 0xAA, 0xAA, 0xAA, 0x2A, 0xA5, 0x55, 0x21, +0x11, 0x11, 0x11, 0x11, 0x2A, 0xAA, 0x4A, 0xA1, +0x00, 0x01, 0x50, 0x00, 0x2A, 0xA1, 0x51, 0xA1, +0x00, 0x0A, 0x50, 0x00, 0xA1, 0x11, 0xA1, 0x11, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x01, 0x50, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x0A, 0x10, 0x00, 0x00, 0x0A, 0x10, 0x00, +0x00, 0x05, 0x50, 0x00, 0x00, 0x05, 0x50, 0x00 +}; const uint8_t key[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xE0,0xE1,0xE1,0xE1,0xE1,0xE1,0xE0,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xE0,0xE1,0xE1,0x5D,0xE0,0x5D,0xE1,0xE1,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xE0,0xE1,0x5D,0xE0,0x00,0xE0,0x5D,0xE1,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xE0,0xE1,0xE0,0x00,0x00,0x00,0xE0,0x5D,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xE0,0xE1,0x5D,0xE0,0x00,0xE0,0x5D,0x5D,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xE0,0x5D,0x5D,0xE0,0x5D,0x5D,0xE0,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xE0,0x5D,0x5D,0x5D,0xE0,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x5D,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x5D,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x5D,0x5D,0x5D,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x5D,0x5D,0x5D,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x5D,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x07, 0x77, 0x77, 0x00, 0x00, 0x00, +0x00, 0x00, 0x7B, 0xBB, 0xBB, 0x70, 0x00, 0x00, +0x00, 0x07, 0xBB, 0xB7, 0xBB, 0xB7, 0x00, 0x00, +0x00, 0x07, 0xBB, 0x70, 0x7B, 0xB7, 0x00, 0x00, +0x00, 0x07, 0xB7, 0x00, 0x07, 0xB7, 0x00, 0x00, +0x00, 0x07, 0xBB, 0x70, 0x7B, 0xB7, 0x00, 0x00, +0x00, 0x00, 0x7B, 0xB7, 0xBB, 0x70, 0x00, 0x00, +0x00, 0x00, 0x07, 0xBB, 0xB7, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7B, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7B, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7B, 0xBB, 0xB7, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7B, 0xBB, 0xB7, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7B, 0xB7, 0x77, 0x00, 0x00, +0x00, 0x00, 0x00, 0x77, 0x70, 0x00, 0x00, 0x00 +}; + +const uint8_t ladder[] = { +0x67, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x86, +0x87, 0x87, 0xB7, 0x88, 0x88, 0x87, 0xB7, 0x87, +0x7B, 0x7B, 0x7B, 0xBB, 0xBB, 0xBB, 0x7B, 0x7B, +0x78, 0xB7, 0x88, 0x88, 0x88, 0x88, 0x87, 0xB8, +0x78, 0x78, 0x77, 0x77, 0x77, 0x77, 0x78, 0x77, +0x66, 0x79, 0x66, 0x66, 0x66, 0x66, 0x67, 0x66, +0x67, 0x86, 0x00, 0x00, 0x00, 0x00, 0x68, 0x76, +0x68, 0x76, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB6, +0x67, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x86, +0x87, 0x87, 0xB7, 0x88, 0x88, 0x87, 0xB7, 0x87, +0x7B, 0x7B, 0x7B, 0xBB, 0xBB, 0xBB, 0x7B, 0x7B, +0x78, 0xB7, 0x88, 0x88, 0x88, 0x88, 0x87, 0xB8, +0x78, 0x78, 0x77, 0x77, 0x77, 0x77, 0x78, 0x77, +0x66, 0x76, 0x66, 0x66, 0x66, 0x66, 0x67, 0x66, +0x67, 0x86, 0x00, 0x00, 0x00, 0x00, 0x68, 0x76, +0x68, 0x76, 0x00, 0x00, 0x00, 0x00, 0x67, 0x76 +}; + +const uint8_t left[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x09, 0x90, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x9B, 0xB0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x99, 0xBB, 0xB9, 0x99, 0x99, 0x99, 0x00, +0x09, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB9, 0x00, +0x00, 0x99, 0xBB, 0xB9, 0x99, 0x99, 0x99, 0x00, +0x00, 0x00, 0x9B, 0xB0, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x09, 0x90, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00 }; +const uint8_t rick_happy[] = { +0x00, 0x00, 0x57, 0x89, 0x87, 0x60, 0x00, 0x00, +0x00, 0x40, 0x9D, 0x8D, 0x8B, 0x74, 0x40, 0x00, +0x04, 0x97, 0x77, 0xD7, 0x78, 0x77, 0x95, 0x00, +0x00, 0x44, 0x69, 0x69, 0x96, 0x65, 0x50, 0x00, +0x47, 0x04, 0xBB, 0xDB, 0x8B, 0xB1, 0x00, 0x00, +0xD8, 0xD0, 0xBD, 0xA2, 0x21, 0xB1, 0x00, 0x00, +0xDB, 0xD6, 0xBA, 0xDB, 0xD1, 0xB9, 0x44, 0x40, +0x5D, 0xC7, 0x5B, 0xBB, 0xBB, 0x17, 0x9D, 0x84, +0x00, 0x49, 0x45, 0x12, 0xA1, 0x46, 0x8B, 0xD1, +0x00, 0x04, 0x56, 0x77, 0x79, 0xC5, 0x4B, 0xD0, +0x00, 0x04, 0x97, 0x76, 0x77, 0x95, 0x00, 0x00, +0x00, 0x21, 0x69, 0xC4, 0xC9, 0x64, 0x25, 0x00, +0x01, 0x12, 0x51, 0x40, 0x05, 0x1A, 0xA1, 0x40, +0x00, 0x11, 0x14, 0x00, 0x04, 0x51, 0x15, 0x00, +0x00, 0x41, 0x50, 0x00, 0x00, 0x51, 0x50, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00 +}; + +const uint8_t wall[] = { +0xAA, 0x11, 0x01, 0xA2, 0xAA, 0x10, 0xAA, 0x10, +0x01, 0x10, 0x00, 0x1A, 0xA1, 0x0A, 0x2A, 0x11, +0x00, 0x1A, 0x2A, 0x10, 0x00, 0x12, 0xAA, 0x11, +0x00, 0xA2, 0x32, 0xA1, 0x01, 0xA2, 0xAA, 0x10, +0x00, 0xA2, 0x2A, 0xA1, 0x0A, 0x2A, 0xA1, 0x10, +0xA1, 0x0A, 0xAA, 0x11, 0x0A, 0x2A, 0x11, 0x0A, +0x2A, 0x10, 0x11, 0x10, 0x01, 0xA1, 0x01, 0xA2, +0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x23, +0xAA, 0x10, 0x0A, 0xAA, 0x10, 0x00, 0xA2, 0x33, +0xA1, 0x10, 0xA2, 0x2A, 0x11, 0x10, 0xA2, 0x32, +0xA1, 0x0A, 0x22, 0xAA, 0xA1, 0x10, 0x1A, 0x32, +0x11, 0x1A, 0x23, 0x2A, 0xAA, 0x11, 0x0A, 0x2A, +0x10, 0x1A, 0x22, 0xA2, 0xAA, 0x11, 0x01, 0xAA, +0x00, 0x0A, 0xA2, 0x2A, 0xAA, 0x11, 0x00, 0x11, +0xAA, 0x11, 0xA2, 0x32, 0xAA, 0x11, 0x00, 0x01, +0x5A, 0xA1, 0x1A, 0x22, 0xA1, 0x10, 0x00, 0x1A +}; + + const uint16_t palette[] = { - 0x0000,0x4A49,0x9492,0xB5B6,0xFFFF,0x6B6D,0x0881,0x2124,0x2123,0x0882,0x0861,0x3164,0x5183,0x92C9,0xAB6E,0x8A20, - 0xAB4D,0x79E0,0x4941,0x2964,0x4162,0x8267,0x9B0C,0x4184,0x18C1,0x2102,0x20E1,0x20E3,0x3942,0x7A00,0x71C0,0x3941, - 0x49E7,0x08C3,0x2902,0x3921,0x3101,0x08E4,0x8224,0x3185,0x10C2,0x3121,0x2901,0x61C1,0x69E1,0x5181,0x10E3,0x8A86, - 0x4961,0x4100,0x4920,0x4900,0x6180,0x6980,0x5940,0x92A8,0x08C2,0x1903,0x18E3,0x08E3,0xAB4C,0x69A0,0xA280,0x5960, - 0x8220,0x9A60,0xA32C,0x18E2,0x38E0,0x18E1,0x8A41,0x10E4,0x2103,0x2943,0x3163,0x3143,0x8A00,0x4940,0x3102,0x7A02, - 0x49E8,0x4163,0x79E2,0x92A6,0x49A5,0x8A85,0x4142,0x4982,0x4962,0x3165,0xBBCA,0xE8E4,0x9240,0xFC8D,0xDB60,0x5A00, - 0x7B00,0x72E0,0x4140,0xB3A0,0xABA0,0x5A20,0x38C0,0x41A0,0x5200,0x49C0,0x4180,0x8300,0xBC40,0x8320,0x8B40,0x9340, - 0x4980,0xC480,0xABC0,0x3140,0x9360,0x6220,0xAB80,0x49E0,0x72A0,0x7300,0x3160,0xB400,0x9B40,0x30A0,0xA380,0x6A20, - 0x4A00,0x6AC0,0x20E0,0x9B60,0xB420,0x6A80,0x51C0,0x6A00,0x6200,0x2040,0x3060,0x72C0,0xB3C0,0x2920,0x3960,0xA360, - 0xABE0,0xBC20,0x6A60,0x59E0,0x4120,0x1060,0xB36D,0x18C2,0x7221,0x49A2,0x20C2,0x92E8,0x49C5,0x5980,0xBAE0,0x49A3, - 0xFC49,0x8A40,0x0041,0x2922,0xB2E4,0xF426,0x4960,0x81E0,0x9AE6,0x28C0,0xDB83,0xB2A0,0xBB47,0xDD53,0x3122,0xE3E8, - 0xBB22,0x7A21,0x9220,0x5140,0xD320,0xEC49,0x3920,0xCB87,0x79C0,0x3180,0x2589,0xDC26,0x3965,0xBB24,0xD365,0x6260, - 0x7A20,0xFCCC,0x3962,0xF428,0xC2E0,0xFC6B,0xE3E7,0x6181,0x10A2,0xE3A1,0x69C0,0xB322,0x9AA1,0x8A43,0xD3A7,0x1104, - 0x08C4,0x6286,0x2923,0x9A40,0x71E2,0xDBA7,0xAAA0,0x00C5,0x8200,0xF405,0xDB40,0xCC2C,0x7A42,0xA260,0xCC6B,0xAA80, - 0x7BEF,0xFE41 + 0x0000,0x4A49,0x9492,0xB5B6, + 0x10C2,0x2144,0x4920,0x8A60, + 0xC380,0x59A0,0x6B6D,0xF46B, + 0x3101,0xA32A,0x2589,0x9CF3 }; -#endif +const uint16_t palette_orange[] = {0x0000, 0x61a0, 0xcb41, 0xf423 }; const uint8_t rick_font[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE4, 0x07, 0xC0, 0x1B, 0xE4, 0x1B, 0xE4, @@ -486,6 +291,17 @@ }; -void drawChar(int x, int y, char c); -void drawString(int x, int y, const char *pString); +struct Image { +public: + bool Mirrored; + bool Transparent; + const uint8_t * Sprite; +}; + +extern Image sprites[]; + +void drawChar(int x, int y, char c, const uint16_t *palette); +void drawSprite(int x, int y, int sprite); +void drawString(int x, int y, const char *pString, const uint16_t *palette); +void drawLevelNumber(int x, int y, int level); #endif //__SPRITES_H__ \ No newline at end of file
diff -r f5f961973d01 -r dcea5500a32d RetroPlatform.lib --- a/RetroPlatform.lib Sat Feb 21 06:19:29 2015 +0000 +++ b/RetroPlatform.lib Sun Mar 01 05:32:06 2015 +0000 @@ -1,1 +1,1 @@ -RetroPlatform#616d7b6d9ab2 +http://developer.mbed.org/users/Architect/code/RetroPlatform/#6f26c31d8573
diff -r f5f961973d01 -r dcea5500a32d main.cpp --- a/main.cpp Sat Feb 21 06:19:29 2015 +0000 +++ b/main.cpp Sun Mar 01 05:32:06 2015 +0000 @@ -1,25 +1,42 @@ +/* + * (C) Copyright 2015 Valentin Ivanov. All rights reserved. + * + * This file is part of the "Lost treasure of mBedungu" game application for Retro + * + * The "Lost treasure of mBedungu" application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + #include "mbed.h" #include "Retro.h" #include "GameScreen.h" #include "Levels.h" #include "Sprites.h" +#include "Utils.h" #include "IntroScreen.h" -#include "HelpScreen.h" #include "MenuScreen.h" #include "LevelScreen.h" IntroScreen * pIntroScreen = NULL; -HelpScreen * pHelpScreen = NULL; MenuScreen * pMenuScreen = NULL; GameScreen * pGameScreen = NULL; LevelScreen * pLevelScreen = NULL; Retro retro; -bool gameover = false; - uint8_t * pRickFont = NULL; void unpackFont() @@ -44,7 +61,7 @@ } } -void drawChar(int x, int y, char c) +void drawChar(int x, int y, char c, const uint16_t *palette) { if( pRickFont == NULL ) return; @@ -52,7 +69,7 @@ int index = c-44; retro.display.drawBitmapIndexed(x,y,376,8,index*8,0,8,8,pRickFont, palette); } -void drawString(int x, int y, const char *pString) +void drawString(int x, int y, const char *pString, const uint16_t *palette) { int i = 0; char *p = (char*)pString; @@ -71,29 +88,20 @@ continue; } - drawChar(x + i*8, y, *p++); + drawChar(x + i*8, y, *p++, palette); i++; } } main() { + unpackFont(); - //retro.leftEye = true; - - //Seed the randomizer - AnalogIn ain(P0_15); - srand(ain.read_u16()); - retro.initialize(); - - //retro.display.setPalette(palette); - - int curLevel = 44; - + pGameScreen = new GameScreen(); - pGameScreen->unpackLevel(curLevel); + pGameScreen->resetLevel(); Screen currentScreen = Intro;