diff --git a/common.mk b/common.mk index 0496535..4103d94 100644 --- a/common.mk +++ b/common.mk @@ -1,4 +1,4 @@ -VERSION = 0.4 +VERSION = 0.41 REVISION = $(shell date +"%y%m%d") DEBUG = 0 diff --git a/src/battle/battle.c b/src/battle/battle.c index 1c9aade..c048684 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -52,6 +52,8 @@ void initBattle(void) initStars(); + initBullets(); + initBackground(); initEffects(); diff --git a/src/battle/battle.h b/src/battle/battle.h index 3b26ef1..0554f28 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -72,6 +72,7 @@ extern void initMessageBox(void); extern void doMessageBox(void); extern void drawMessageBox(void); extern void resetMessageBox(void); +extern void initBullets(void); extern App app; extern Battle battle; diff --git a/src/battle/bullets.c b/src/battle/bullets.c index 2b8009a..897afc0 100644 --- a/src/battle/bullets.c +++ b/src/battle/bullets.c @@ -27,6 +27,13 @@ static Bullet bulletDef[BT_MAX]; static Bullet *bulletsToDraw[MAX_BULLETS_TO_DRAW]; static int incomingMissile; +void initBullets(void) +{ + incomingMissile = 0; + + memset(bulletsToDraw, 0, sizeof(Bullet*) * MAX_BULLETS_TO_DRAW); +} + void initBulletDefs(void) { cJSON *root, *node;