diff --git a/firmware/l0dable/EXPORTS b/firmware/l0dable/EXPORTS index d4936d2..66917af 100644 --- a/firmware/l0dable/EXPORTS +++ b/firmware/l0dable/EXPORTS @@ -91,6 +91,7 @@ GetVoltage isNight _timectr crc16 +randomInit getRandom getSeconds iapReadSerialNumber diff --git a/firmware/l0dable/r0type.c b/firmware/l0dable/r0type.c index e4218f1..52216e6 100644 --- a/firmware/l0dable/r0type.c +++ b/firmware/l0dable/r0type.c @@ -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(); } -} - - +} \ No newline at end of file