From 6d16ba6e27c24ab9cab178452789fbe43b1c7c5d Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Wed, 15 Oct 2025 14:04:42 +0100 Subject: [PATCH] Add "clear" text when all asteroids destroyed --- game.c | 2 ++ text.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/game.c b/game.c index 760de80..0045d70 100644 --- a/game.c +++ b/game.c @@ -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"); } diff --git a/text.c b/text.c index cf87e51..4494f4c 100644 --- a/text.c +++ b/text.c @@ -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 },