Chris Dick
/
Gameduino_Invaders_game
Invaders game for the Gameduino
main.cpp
- Committer:
- TheChrisyd
- Date:
- 2012-06-21
- Revision:
- 0:8a7c58553b44
- Child:
- 1:f44175dd69fd
File content as of revision 0:8a7c58553b44:
#include "mbed.h" #include "GD.h" /*--------------------------------------------------------- A Space Invaders clone for Gameduino http://www.artlum.com/gameduino/gameduino.html#invaders Version 0.9 alpha - Still seme things to add but I'm out of memory! Edit "joystick.cpp" if you have a custom joystick. ---------------------------------------------------------*/ #include <SPI.h> #include <GD.h> #include "game.h" #include "arduino.h" void setup() { GD.begin(); makeGraphics(); Coprocessor::reset(samplePlaybackBuffer); //randomSeed(GD.rd(FRAME)); resetGameSounds(); initGame(); } void loop() { GD.waitvblank(); updateGame(); updateGameSounds(); // Debugging/info if (0) { joystick.dump(0,33); // Show the joystick state int yline = Coprocessor::yline(); showNumber(yline,0,31); } // Screenshot when you press the select button if (0 and joystick.isPressed(Joystick::buttonSelect)) { sendScreenshot(); } } int main() { setup(); while (1) { loop(); } }