Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HelloWorld by
Diff: main.cpp
- Revision:
- 9:2ce6a69010cb
- Parent:
- 5:c4a0391b43ac
--- a/main.cpp Mon Jan 01 11:51:20 2018 +0000
+++ b/main.cpp Sun Mar 11 09:21:58 2018 +0000
@@ -1,13 +1,50 @@
#include "Pokitto.h"
+#include "flight.h"
-Pokitto::Core mygame;
+Pokitto::Core game;
+//#define PROJ_HIRES 0
+#define BLINKYPERIOD 500
+
+
+
int main () {
- mygame.begin();
- while (mygame.isRunning()) {
- if (mygame.update()) {
- mygame.display.print("Hello World!");
- }
- }
-
-}
\ No newline at end of file
+game.begin();
+//game.sound.playTone(1,440,1,0);
+//game.sound.playMusicStream("feelgood.snd");
+// Next 4 lines are just to show the C64 font, you can comment them out by adding // in the start of the line
+//game.display.setFont(fontC64);
+//game.display.palette[0] = game.display.RGBto565(0x42, 0x42, 0xe7); //default background is palette[0]
+//game.display.palette[1] = game.display.RGBto565(0xa5, 0xa5, 0xff); //default foreground is palette[1]
+//game.display.charSpacingAdjust = 0; //needed for the non-proportional C64 font (normal value=1)
+//int blinkybox = 0;
+//long blinkytime = game.getTime();
+//int i = 0;
+flight air1;
+
+while (game.isRunning()) {
+ if (game.update()) {
+ air1.move();
+ air1.display();
+
+
+
+ // game.display.print("Hello World!");
+ // game.display.print("**** COMMODORE 64 LIVES ****\n\n");
+ // game.display.println(" 32K RAM POKITTO SYSTEM \n");
+ //game.display.println("READY.GOGOGOGOG");
+ /*if (game.getTime()>blinkytime+BLINKYPERIOD) {
+ blinkybox = 1 - blinkybox; //toggle blinky
+ blinkytime = game.getTime(); // store new time
+ }
+ if (blinkybox) {
+ //game.display.bgcolor = 1; // reverse whitespace color
+ game.display.drawPixel(xcol-1,ycol+3,2);
+ game.display.drawPixel(xcol+1,ycol+3,2);
+ //game.display.bgcolor = 0; // put color the right way again
+ }*/
+ }
+}
+
+return 1;
+}
