From f22a207dd45bdcede0edc9dd9299b7e2dd66d123 Mon Sep 17 00:00:00 2001 From: Jason Bou-Samra <154414066+bou-samra@users.noreply.github.com> Date: Sat, 28 Sep 2024 09:46:53 +1000 Subject: [PATCH] Update main.c --- src/main.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main.c b/src/main.c index 8ddabaa..d412f70 100644 --- a/src/main.c +++ b/src/main.c @@ -16,13 +16,14 @@ #include "column.h" #include "sdl.h" #include "events.h" +#include "hiscore.h" ///////////////// MAIN MENU //////////////////////////// int menu(void) { quit = false; Ren_menu(); while (quit == false) { - SDL_Delay(20); +// SDL_Delay(20); SDL_PollEvent(&event); switch (event.type) { case SDL_KEYDOWN: @@ -47,10 +48,7 @@ int menu(void) { if (event.key.keysym.sym == SDLK_5) {speed = 3.0;} if (event.key.keysym.sym == SDLK_6) {speed = 3.5;} handle_events(); // game levels - reset(); - Ren_restart(); - check_key(); - restart = false; + end_game(); Ren_menu(); } } @@ -63,13 +61,13 @@ int main(void) { if (sodium_init() < 0) { // initialise sodium printf("error\n"); // -1 = failure } - - initSDL (); + initSDL(); init_gfx(); - research (); - eliminate_c (); + next_brick(); + initial_brick(); + col = new_column(); menu(); - shutdownSDL (); + shutdownSDL(); return 0; }