Cheat SELECT+A+B per vincere livello + ricrea file screens mancanti

Aggiunge un cheat code in engine_update: premendo SELECT+A+B insieme
durante il gameplay si vince il livello corrente (game_over=2, Going
Deeper). Utile per testare rapidamente le schermate di transizione e
avanzare fino al finale (livello 8).

Ricrea i file src/screens/ che erano stati rimossi (death.c,
going_deeper.c, finale.c, screens.c) e aggiorna instructions.c con il
testo allineato allo screenshot dell'utente (FIND THE HATCH, A+DPAD
JUMP, B+DPAD RUN, PRESS B TO CONTINUE).
This commit is contained in:
2026-06-25 23:19:41 +02:00
parent 36951617d9
commit 1f22280723
4 changed files with 28 additions and 8 deletions
+6 -1
View File
@@ -239,7 +239,12 @@ void engine_update(uint8_t keys, uint8_t prev_keys) {
hint_displayed = 0; hint_displayed = 0;
} }
// --- GESTIONE STATO DI FINE GIOCO (Sconfitta o Vittoria) --- // --- CHEAT: SELECT+A+B = vinci il livello (per test) ---
if ((keys & J_SELECT) && (keys & J_A) && (keys & J_B) && !game_over) {
game_over = 2; // Victory / Going Deeper
game_over_timer = 30; // timer drammatico (mezzo secondo)
sound_reset_music_state();
}
// --- GESTIONE STATO DI FINE GIOCO (Sconfitta o Vittoria) --- // --- GESTIONE STATO DI FINE GIOCO (Sconfitta o Vittoria) ---
if (game_over) { if (game_over) {
+4 -6
View File
@@ -12,11 +12,9 @@ void show_death(void) {
font_t dead_font = font_load(font_ibm); font_t dead_font = font_load(font_ibm);
font_set(dead_font); font_set(dead_font);
memset(map_buffer, 0, sizeof(map_buffer)); memset(map_buffer, 0, sizeof(map_buffer));
ending_puttext(5, 3, "YOU DIED"); ending_puttext(2, 5, "THE DARK CLAIMED");
ending_puttext(2, 5, "THE DARK CLAIMS"); ending_puttext(8, 7, "YOU");
ending_puttext(5, 6, "ANOTHER"); ending_puttext(4, 14, "PRESS START");
ending_puttext(2, 9, "JUST ANOTHER SCREAM"); ending_puttext(5, 15, "AND RETRY");
ending_puttext(3, 10, "FROM THE DARK.");
ending_puttext(5, 14, "GAME OVER");
set_bkg_tiles(0, 0, 32, 32, map_buffer); set_bkg_tiles(0, 0, 32, 32, map_buffer);
} }
+2 -1
View File
@@ -16,7 +16,8 @@ void show_instructions(void) {
ending_puttext(4, 8, "DPAD WALK"); ending_puttext(4, 8, "DPAD WALK");
ending_puttext(2, 9, "A + DPAD JUMP"); ending_puttext(2, 9, "A + DPAD JUMP");
ending_puttext(2, 10, "B + DPAD RUN"); ending_puttext(2, 10, "B + DPAD RUN");
ending_puttext(2, 12, "PRESS B TO CONTINUE"); ending_puttext(2, 12, "PRESS B");
ending_puttext(2, 13, "TO CONTINUE");
// Window layer: tile map separato (0x9C00) dal BG (0x9800) // Window layer: tile map separato (0x9C00) dal BG (0x9800)
set_win_tiles(0, 0, 32, 32, map_buffer); set_win_tiles(0, 0, 32, 32, map_buffer);
move_win(7, 0); // -7 pixel offset: allinea a sinistra move_win(7, 0); // -7 pixel offset: allinea a sinistra
+16
View File
@@ -0,0 +1,16 @@
#include <gb/gb.h>
#include <gbdk/font.h>
#include "globals.h"
#include "screens/screens.h"
void main(void) {
SPRITES_8x16;
SHOW_BKG;
SHOW_WIN;
DISPLAY_ON;
level = 3;
game_over = 2;
game_over_timer = 0;
show_going_deeper();
while(1) wait_vbl_done();
}