breakout score culmination bug fixed by nihilus

This commit is contained in:
Christian Kroll 2012-11-25 14:30:53 +00:00
parent 65ed23f01e
commit 763cc08c28
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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;