Estrai schermate testuali in src/screens/ (un file per schermata)
Ogni schermata testuale (font IBM) ora vive in un file separato nella sottocartella src/screens/: - screens.h: dichiarazioni + helper (ending_puttext/putdigit) - screens.c: implementazione degli helper condivisi - instructions.c: schermata istruzioni (Window layer) - death.c: schermata di sconfitta (game_over==1) - going_deeper.c: transizione livello (game_over==2) - finale.c: finale tragico (game_over==3, spoiler) engine.c ora chiama show_instructions(), show_death(), show_going_deeper(), show_finale() invece di avere il codice inline. Il titolo resta un'immagine (title_bg.png), non testuale.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef SCREENS_H
|
||||
#define SCREENS_H
|
||||
|
||||
#include <gb/gb.h>
|
||||
#include <gbdk/font.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Schermate testuali (font IBM, palette invertita 0x1B = sfondo nero).
|
||||
* Ogni funzione renderizza la propria schermata nel map_buffer e la
|
||||
* flusha sulla BG map (o Window per l'hint). Il chiamante gestisce
|
||||
* BGP, font_init/font_load, HIDE/SHOW_SPRITES e il ripristino dei tile.
|
||||
*/
|
||||
|
||||
// Schermata del titolo ( chiamata da title_init )
|
||||
|
||||
// Schermata istruzioni (livello 1 / SELECT). Usa il Window layer.
|
||||
void show_instructions(void);
|
||||
|
||||
// Schermata di sconfitta (game_over == 1)
|
||||
void show_death(void);
|
||||
|
||||
// Schermata di transizione livello (game_over == 2)
|
||||
void show_going_deeper(void);
|
||||
|
||||
// Schermata del finale tragico (game_over == 3)
|
||||
void show_finale(void);
|
||||
|
||||
// Helper condivisi (definiti in screens.c)
|
||||
void ending_puttext(uint8_t col, uint8_t row, const char *s);
|
||||
void ending_putdigit(uint8_t col, uint8_t row, uint8_t digit);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user