|
@ -1,13 +1,13 @@ |
|
|
|
|
|
#include "common.h" |
|
|
#include "../../menu/menu.h" |
|
|
void borg_breakout(); |
|
|
|
|
|
|
|
|
#ifdef MENU_SUPPORT |
|
|
#ifdef MENU_SUPPORT |
|
|
static uint8_t icon[8] PROGMEM = |
|
|
const uint8_t breakout_icon[8] PROGMEM = {0x03, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; /* our Icon */ |
|
|
{0x03, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; /* our Icon */ |
|
|
|
|
|
|
|
|
|
|
|
game_descriptor_t invaders_game_descriptor __attribute__((section(".game_descriptors"))) ={ |
|
|
game_descriptor_t breakout_game_descriptor __attribute__((section(".game_descriptors"))) = |
|
|
|
|
|
{ |
|
|
&borg_breakout, |
|
|
&borg_breakout, |
|
|
icon, |
|
|
breakout_icon, |
|
|
}; |
|
|
}; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ void borg_breakout() |
|
|
ball_t balls[1]; |
|
|
ball_t balls[1]; |
|
|
|
|
|
|
|
|
ball_init (balls[0]); |
|
|
ball_init (balls[0]); |
|
|
|
|
|
rebound_init(); |
|
|
|
|
|
|
|
|
/* spawn a ball in the middle bottom of the field, let it move upwards with random speed & x-direction */ |
|
|
/* spawn a ball in the middle bottom of the field, let it move upwards with random speed & x-direction */ |
|
|
ball_spawn (balls[0], (NUM_COLS / 2) << 8, (NUM_ROWS-2) << 8, - random8(), random8(), START_LIFES); |
|
|
ball_spawn (balls[0], (NUM_COLS / 2) << 8, (NUM_ROWS-2) << 8, - random8(), random8(), START_LIFES); |
|
@ -24,6 +25,7 @@ void borg_breakout() |
|
|
|
|
|
|
|
|
while (rungame) |
|
|
while (rungame) |
|
|
{ |
|
|
{ |
|
|
|
|
|
rebound_tick(); |
|
|
ball_think(balls[0]); |
|
|
ball_think(balls[0]); |
|
|
playfield_draw(); |
|
|
playfield_draw(); |
|
|
ball_draw(balls[0]); |
|
|
ball_draw(balls[0]); |
|
|