linije

Клон игре Color lines
git clone https://git.sr.ht/~strahinja/linije
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување ffed8d4efc94dbd3218767b9918f40fd4316331f
родитељ 82968c79e439473a6fe7e3327063b5c854267658
Аутор: Страхиња Радић <sr@strahinja.org>
Датум:   Thu,  6 Aug 2026 17:47:31 +0000

Minor source code cleanup

Diffstat:
Mhiscore.c | 2+-
Mlinije.c | 38+++++++++++++++++++-------------------
измењених датотека: 2, додавања: 20(+), брисања: 20(-)

diff --git a/hiscore.c b/hiscore.c @@ -189,7 +189,7 @@ hs_get_hofdir_error: * ,-----------------------------------------------------------. * | name (HI_SCORE_NAME_MAX unsigned chars) | * |-----------------------------------------------------------| - * | score 4-byte unsigned long int BE | + * | score 4-byte unsigned long int BE | * `-----------------------------------------------------------' */ int diff --git a/linije.c b/linije.c @@ -1534,25 +1534,6 @@ prepare_hof_dialog_malloc_error: } void -quit_callback(struct State* state) -{ - assert(state != NULL); - UNUSED(state); - state->query_callback = NULL; - state->running = 0; -} - -void -really_quit(struct State* state) -{ - assert(state != NULL); - state->query_shown = 1; - state->query_callback = quit_callback; - prepare_dialog(state, QUIT_MSGBOX_WIDTH, QUIT_MSGBOX_HEIGHT, - quit_msgbox_text, 0, 1); -} - -void print_matrix(const struct Cell* M) { const struct Cell* c = NULL; @@ -1592,6 +1573,25 @@ print_path(struct Cell* c) } void +quit_callback(struct State* state) +{ + assert(state != NULL); + UNUSED(state); + state->query_callback = NULL; + state->running = 0; +} + +void +really_quit(struct State* state) +{ + assert(state != NULL); + state->query_shown = 1; + state->query_callback = quit_callback; + prepare_dialog(state, QUIT_MSGBOX_WIDTH, QUIT_MSGBOX_HEIGHT, + quit_msgbox_text, 0, 1); +} + +void render_background(struct State* state, SDL_FRect* bg_rect) { const SDL_DisplayMode* mode;