added randomInit and increased speed

This commit is contained in:
ranzwertig 2011-08-12 18:15:29 +02:00 committed by Stefan `Sec` Zehl
parent 36f8eb4292
commit 8f4d81f8f4
2 changed files with 11 additions and 8 deletions

View File

@ -91,6 +91,7 @@ GetVoltage
isNight
_timectr
crc16
randomInit
getRandom
getSeconds
iapReadSerialNumber

View File

@ -42,8 +42,8 @@
#define SHOT_DELAY 12
#define ASTEROID_FREQ 25
#define SCROLL_SPEED 20
#define ASTEROID_MIN_SPEED 6
#define ASTEROID_MAX_SPEED 5
#define ASTEROID_MIN_SPEED 5
#define ASTEROID_MAX_SPEED 4
#define SHIP_SAVE_TICKS 240
#define INCREASE_GAME_SPEED 50
@ -180,9 +180,11 @@ static void draw_splash(void){
bool step = false;
while(key==0) {
lcdFill(0);
DoString (16,15, "GAME OVER");
if (highscore_set(game.score, GLOBAL(nickname)))
DoString (16,25,"HIGHSCORE!");
if (highscore_set(game.score, GLOBAL(nickname))){
DoString (16,15,"HIGHSCORE!");
} else {
DoString (16,15, "GAME OVER");
}
DoString (24,40, "GAME BY");
DoString (10,50, "@RANZWERTIG");
lcdDisplay();
@ -214,6 +216,8 @@ static uint32_t highscore_get(char nick[]){
}
static void init_game(void) {
randomInit();
game.ticks = 0;
game.ships = 3;
@ -484,6 +488,4 @@ static void conrtols(void){
} else if (gpioGetValue(RB_BTN4)==0) {
shoot();
}
}
}