Add "clear" text when all asteroids destroyed

This commit is contained in:
2025-10-18 17:43:22 +01:00
parent 88f49dab91
commit 79ac5a489d
2 changed files with 16 additions and 0 deletions

2
game.c
View File

@@ -494,6 +494,8 @@ void game_draw()
shapes[i].connect);
}
if (asteroid_count == 0)
text_draw("CLEAR");
if (dead && !(counter & COUNTER_MASK))
text_draw("GAME OVER");
}

14
text.c
View File

@@ -34,6 +34,13 @@ static const glyph_t font[] = {
{ { -0.75, -2 }, { 0.75, -2 } },
},
},
['C'] = {
.line_count = 1,
.line_lens = { 4 },
.lines = {
{ { 1, 4 }, { -1, 4 }, { -1, -4 }, { 1, -4 } },
},
},
['E'] = {
.line_count = 2,
.line_lens = { 4, 2 },
@@ -49,6 +56,13 @@ static const glyph_t font[] = {
{ { 1, 4 }, { -1, 4 }, { -1, -4 }, { 1, -4 }, { 1, -2 } },
},
},
['L'] = {
.line_count = 1,
.line_lens = { 3 },
.lines = {
{ { -1, 4 }, { -1, -4 }, { 1, -4 } },
},
},
['M'] = {
.line_count = 1,
.line_lens = { 5 },