You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
896 B

15 years ago
#include <stdint.h>
15 years ago
#include "common.h"
void borg_breakout();
#ifdef MENU_SUPPORT
15 years ago
//static uint8_t breakout_icon[8] PROGMEM = {0x03, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; /* our Icon */
static uint8_t breakout_icon[8] PROGMEM = {0x03, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; /* our Icon */
15 years ago
game_descriptor_t breakout_game_descriptor __attribute__((section(".game_descriptors"))) =
{
&borg_breakout,
15 years ago
breakout_icon
};
#endif
void borg_breakout()
{
uint8_t rungame = 1, num_balls = 1;
ball_t balls[1];
15 years ago
rebound_init();
/* spawn a ball in the middle bottom of the field, let it move upwards with random speed & x-direction */
15 years ago
ball_spawn (&balls[0], (NUM_COLS / 2) << 8, (NUM_ROWS-2) << 8, - (random8() % 8), (random8() % 8), START_LIFES);
level_init(1);
while (rungame)
{
15 years ago
wait(50);
15 years ago
rebound_tick();
15 years ago
ball_think(&balls[0]);
playfield_draw();
15 years ago
ball_draw(&balls[0]);
}
}