Browse Source

breakout score culmination bug fixed by nihilus

feature/2015
Christian Kroll 12 years ago
parent
commit
763cc08c28
  1. 1
      games/breakout/breakout.c
  2. 5
      games/breakout/score.h

1
games/breakout/breakout.c

@ -46,6 +46,7 @@ void borg_breakout(uint8_t demomode)
uint8_t level = demomode ? random8() % 5 : 0;
ball_t balls[1];
score_reset();
/* spawn a ball in the middle bottom of the field, let it move upwards with random speed & direction */
ball_spawn_default(&(balls[0]));
balls[0].strength = START_LIFES;

5
games/breakout/score.h

@ -21,6 +21,11 @@
#define SCORE_H
extern unsigned short score;
inline static void score_reset()
{
score = 0;
}
inline static void score_add (uint8_t in_score)
{
score += in_score;

Loading…
Cancel
Save