This is a basic example how to draw a bitmap on Pokitto screen
Dependencies: PokittoLib
bitmap.cpp
00001 /* Pokitto drawBitmap example - draws a Pokitto icon by @trelemar */ 00002 00003 #include "Pokitto.h" // include Pokitto library 00004 #include "pokitto_icon.h" // include the Pokitto icon graphics file 00005 00006 Pokitto::Core mygame; //create Pokitto application instance 00007 00008 int main () { 00009 mygame.begin(); // start the application 00010 mygame.display.load565Palette(pokitto_icon_pal); //load the palette for the image 00011 mygame.display.bgcolor=0; 00012 /* the "while" loop runs as long as the program is running */ 00013 while (mygame.isRunning()) { 00014 /* mygame.update() is processed whenever it is time to update the screen */ 00015 if (mygame.update()) { 00016 mygame.display.drawBitmap(0,0,pokitto_icon); // draw the pokitto_icon graphic 00017 } 00018 } 00019 00020 return 0; // this is "good programming manners". Program informs it ended without errors 00021 } 00022
Generated on Thu Jul 14 2022 23:55:06 by 1.7.2