Space invaders with a nRF2401A wireless joypad
Dependencies: Gameduino mbed nRF2401A
Fork of Gameduino_Invaders_game by
Gameduino and an nRF2401A hooked up to an mbed on an mbeduino:
Diff: game.cpp
- Revision:
- 2:20a89dc286d5
- Parent:
- 1:f44175dd69fd
- Child:
- 4:bb78bedae411
--- a/game.cpp Sat Sep 29 13:01:42 2012 +0000 +++ b/game.cpp Thu Dec 20 21:33:52 2012 +0000 @@ -1,6 +1,6 @@ #include "game.h" - +extern GDClass GD; SPI spigame(ARD_MOSI, ARD_MISO, ARD_SCK); // mosi, miso, sclk /*--------------------------------------------- Trivia: There is NO random number generator @@ -114,7 +114,6 @@ static unsigned int previousPlayerScore, previousHighScore; void redrawScores() { - previousPlayerScore = previousHighScore = 0xffff; } @@ -282,7 +281,7 @@ if (status == S_DYING) { ypos = y; updateSprite(GR_BULLET,1); - GD.wr16(SCROLL_Y,GD.rd16(SCROLL_Y)+1); + //GD.wr16(SCROLL_Y,GD.rd16(SCROLL_Y)+1); } } // See if the bullet hit anything