#include "Pokitto.h" //mask needs a game object to draw to it Pokitto::Core game; #include "mask.h" const uint16_t p16_pal[] = { 59421,65184,64736,0,38912,54496,53248,65523,65535, }; const uint8_t p16[] = { 40,46, 0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,51,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,51,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,51,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 3,51,51,0,0,0,0,0,0,0,0,0,0,51,48,0,0,0,0,0, 3,51,51,0,0,0,0,0,0,0,0,3,51,51,51,48,0,0,0,0, 3,51,50,48,0,0,0,0,0,0,3,51,51,51,51,48,0,0,0,0, 3,35,50,48,0,0,0,0,0,68,35,51,51,51,51,0,0,0,0,0, 3,34,34,48,4,68,68,0,68,17,51,51,51,51,48,0,0,0,0,0, 0,50,34,68,87,119,17,84,17,19,51,51,51,51,0,0,0,68,0,0, 0,50,37,87,119,119,113,17,17,19,49,19,51,0,0,0,4,17,64,0, 0,3,81,119,119,119,17,17,17,17,19,48,0,0,0,0,65,17,20,0, 0,4,17,17,17,17,35,50,17,84,48,0,0,0,0,5,17,17,20,0, 0,53,50,17,17,17,56,51,17,19,0,0,0,0,0,81,17,17,17,64, 0,51,130,17,17,17,51,51,17,19,0,0,0,0,85,17,17,17,17,64, 0,51,49,19,81,17,35,50,17,20,0,0,0,4,17,17,17,17,17,64, 0,67,65,17,17,17,17,17,102,21,48,0,0,65,17,17,17,17,17,20, 3,17,17,19,69,17,17,22,102,98,48,0,4,17,17,17,17,17,17,20, 3,98,21,52,102,68,81,38,102,98,48,0,65,17,17,17,17,17,17,20, 3,98,34,36,102,100,34,38,102,98,48,0,66,17,17,17,17,17,17,48, 3,98,34,34,70,100,34,34,102,34,48,4,34,34,17,17,17,17,19,0, 0,66,34,34,70,100,34,34,34,34,48,66,34,34,34,17,17,19,48,0, 0,3,34,34,36,66,34,34,34,34,51,66,34,34,34,34,19,48,0,0, 0,3,34,34,34,34,34,34,34,34,19,3,34,34,34,35,48,0,0,0, 0,3,18,34,34,34,34,34,34,33,19,0,50,34,35,48,0,0,0,0, 0,3,17,18,34,34,34,34,34,17,19,0,3,34,64,0,0,0,0,0, 0,3,17,17,18,34,34,82,17,17,19,0,0,50,35,0,0,0,0,0, 0,3,17,17,17,17,21,17,17,17,19,0,3,82,35,0,0,0,0,0, 0,53,17,65,17,17,21,17,17,17,19,48,53,34,34,48,0,0,0,0, 0,49,17,81,17,17,65,17,17,33,17,48,85,82,83,48,0,0,0,0, 0,49,17,20,17,17,65,17,18,81,17,51,85,83,51,0,0,0,0,0, 0,53,17,20,17,20,17,17,20,17,18,53,85,80,0,0,0,0,0,0, 0,52,17,21,17,19,81,17,65,17,18,51,85,48,0,0,0,0,0,0, 0,52,17,17,65,17,49,84,17,17,34,35,52,67,0,0,0,0,0,0, 3,17,65,20,17,17,20,65,17,17,34,35,3,68,48,0,0,0,0,0, 52,17,20,65,17,17,17,17,17,18,34,35,52,68,48,0,0,0,0,0, 50,17,17,17,17,17,17,17,18,18,34,35,52,51,0,0,0,0,0,0, 50,33,17,17,17,17,17,17,33,33,34,34,51,0,0,0,0,0,0,0, 50,34,34,17,17,17,18,34,18,18,34,34,0,0,0,0,0,0,0,0, 4,34,34,34,34,34,34,34,34,34,34,35,0,0,0,0,0,0,0,0, 3,34,34,34,34,34,34,34,34,34,34,83,0,0,0,0,0,0,0,0, 0,51,34,37,83,51,51,34,34,34,37,48,0,0,0,0,0,0,0,0, 3,53,68,68,48,0,0,51,68,85,67,0,0,0,0,0,0,0,0,0, 49,65,83,51,0,0,0,3,51,34,36,48,0,0,0,0,0,0,0,0, 3,51,48,0,0,0,0,0,3,49,65,48,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,3,51,0,0,0,0,0,0,0,0,0, }; int main(){ game.display.invisiblecolor =0; game.begin(); game.display.load565Palette(p16_pal); mask mask; float r = 0; int x =30; int y= 40; while(game.isRunning()){ if(game.update()){ mask.clear(); mask.fillTriangle(x+cos(r)*20,y+sin(r)*20, x+cos(r+2.094395)*20,y+sin(r+2.094395)*20,x+cos(r+4.18879)*20,y+sin(r+4.18879)*20); r += 0.1; game.display.drawBitmap(30,10,p16); mask.drawSprite(20,10,p16); } } }