Qulqy (plyr0, BSD-3-Clause), commit 6d1e676: build without the GB Compo 2025 logo screen. The game opens on the GB Compo 2025 logo (a third-party mark) and waits for Start. This patch drops the screen: the show_splash() call and its waitpad(), the function itself and the logo object in the Makefile. build-qulqy.sh also deletes the logo files (src/res/gbcompo2c.c/.h, res/gbcompo2c.png, res/old/gbcompo2.png, res/png.txt). The logo screen was also the only wait between power-on and loading a saved game, and that load seeds the random generator with clock(). Without the wait the seed of a resumed game would be the same on every power-on, so the patch reseeds once on the first move after loading. Nothing else changes. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ SRC = ./src OBJS = main.o \ balls.o \ letters.o \ - gbcompo2c.o \ astar.o \ drawing.o \ definitions.o \ diff --git a/src/drawing.c b/src/drawing.c --- a/src/drawing.c +++ b/src/drawing.c @@ -10,7 +10,6 @@ #include "definitions.h" #include "res/balls.h" #include "res/cursor.h" -#include "res/gbcompo2c.h" #include "res/letters.h" #include "res/tray.h" #include "res/shapes.h" @@ -465,17 +464,6 @@ selection_clear (void) move_sprite(19, 0, 0); } -void -show_splash (void) -{ - if (CGB_TYPE == _cpu) - { - set_bkg_palette(0, 1, gbcompo2c_palettes); - } - set_bkg_data(0, gbcompo2c_TILE_COUNT, gbcompo2c_tiles); - set_bkg_tiles(0, 0, 20, 18, gbcompo2c_map); -} - void transfer_future (uint8_t cell, uint8_t future, uint8_t color) { diff --git a/src/drawing.h b/src/drawing.h --- a/src/drawing.h +++ b/src/drawing.h @@ -30,7 +30,6 @@ void print_text_vert(uint8_t x, uint8_t y, const char *text, uint8_t color); void selection_move(uint8_t x, uint8_t y); void selection_clear(void); void selection_init(uint8_t x, uint8_t y, uint8_t color); -void show_splash(void); void transfer_future(uint8_t cell, uint8_t future, uint8_t color); #endif diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -47,6 +47,9 @@ bool hint = true; level_t level = LEVEL_SANE; bool is_saved; bool save_enabled; +/* Without the logo screen a saved game is loaded at the same moment after every power-on, so + clock() would give it the same seed each time: reseed on the first move after loading. */ +bool reseed_on_move = false; uint8_t parents[81]; @@ -78,10 +81,7 @@ main (void) { SHOW_SPRITES; SHOW_BKG; - show_splash(); DISPLAY_ON; - waitpad(J_START); - waitpadup(); init_bkg(0); init_sprites(); @@ -288,6 +288,7 @@ init_load_game (void) { game_state = GAME_STARTING; initrand(clock()); + reseed_on_move = true; do_load_game(&score, futureballs, game_board, &level, &hint); @@ -535,6 +536,11 @@ new_game (void) void place_futures (void) { + if (reseed_on_move) + { + initrand(clock()); + reseed_on_move = false; + } uint8_t futuresleft = my_min(empty_cells(), RAND_BALLS); cursor_hide(); while (futuresleft > 0)