Make aspect global

This commit is contained in:
Camden Dixie O'Brien
2025-10-16 14:28:41 +01:00
parent 03f1bedc61
commit 34e32c6a46
7 changed files with 14 additions and 21 deletions

6
game.c
View File

@@ -119,7 +119,6 @@ static shape_t shapes[MAX_SHAPES];
static unsigned entity_count;
static unsigned shape_count;
static float aspect;
static unsigned level;
static bool dead;
@@ -516,12 +515,11 @@ static void pause()
counter = 0;
}
void game_init(float _aspect)
void game_init()
{
input_on_shoot(shoot);
input_on_restart(reset);
input_on_pause(pause);
aspect = _aspect;
reset();
}
@@ -578,7 +576,7 @@ void game_draw()
shapes[i].connect);
}
text_draw_score(aspect, score);
text_draw_score(score);
if (paused && !(counter & COUNTER_MASK)) {
text_draw_centre("PAUSED");