Make aspect global
This commit is contained in:
6
game.c
6
game.c
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user