Stephane Cote / LoveRush2_Demo

Dependencies:   PokittoLib

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "Pokitto.h"
00002 #include "loverushtitle.h"
00003 
00004 Pokitto::Core mygame;
00005 
00006 int main () 
00007 {
00008     mygame.begin();
00009     mygame.display.load565Palette(loverushtitle_pal); //load the palette for the image
00010     mygame.display.bgcolor=1; // set color 1 (purple) as background
00011     /* the "while" loop runs as long as the program is running */
00012     while (mygame.isRunning()) {
00013         /* mygame.update() is processed whenever it is time to update the screen */
00014         if (mygame.update()) {
00015             mygame.display.drawBitmap(0,0,loverushtitle); // draw the pokitto_icon graphic
00016             }
00017         }
00018  
00019     return 0; // this is "good programming manners". Program informs it ended without errors
00020 }