Death screen: usa assets/claimed.png; Going Deeper ora testuale

- assets/claimed.png (160x144, 2-bit GB) usata come schermata di morte al
  posto dello schermo nero. Il tile data e' caricato con set_bkg_data
  e la mappa 20x18 con set_bkg_tiles; il GAME OVER metasprite resta
  sovrapposto sopra l'immagine.
- Going Deeper (game_over==2) ora usa una schermata testuale col font
  IBM ('GOING DEEPER / LEVEL N') invece dell'immagine next_level.png.
  Necessario per ridurre l'occupazione ROM (la ROM era >32KB con
  title_bg + next_level + claimed + maze + tutto il resto) e far
  entrare la schermata claimed. Rimosso next_level.c/.h e l'asset.
- engine.c: nuovi helper ending_putdigit per scrivere una cifra;
  game_over==2/3 entrambi usano il font IBM per le schermate di
  transizione.
- Makefile: rimosso next_level da SRCS e dal clean; aggiunto
  claimed.png/png2asset/-c claimed.c.

Verificato via PyBoy: schermata di morte mostra l'immagine claimed
(sfondo nero + carta 128x96 centrata), going deeper mostra il testo
'GOING DEEPER / LEVEL 2'.
This commit is contained in:
2026-06-24 16:58:16 +02:00
parent 238bef9672
commit b4f22b7100
5 changed files with 565 additions and 10 deletions
+3 -2
View File
@@ -9,7 +9,7 @@ SCRIPTS_DIR = scripts
BUILD_DIR = build
# C source files
SRCS = $(SRC_DIR)/main.c $(SRC_DIR)/engine.c $(SRC_DIR)/globals.c $(SRC_DIR)/maze.c $(SRC_DIR)/sound.c $(SRC_DIR)/render.c $(SRC_DIR)/player_logic.c $(SRC_DIR)/enemy_logic.c $(SRC_DIR)/tiles.c $(SRC_DIR)/player.c $(SRC_DIR)/enemy.c $(SRC_DIR)/gameover.c $(SRC_DIR)/next_level.c $(SRC_DIR)/stamina.c $(SRC_DIR)/level.c $(SRC_DIR)/title_bg.c
SRCS = $(SRC_DIR)/main.c $(SRC_DIR)/engine.c $(SRC_DIR)/globals.c $(SRC_DIR)/maze.c $(SRC_DIR)/sound.c $(SRC_DIR)/render.c $(SRC_DIR)/player_logic.c $(SRC_DIR)/enemy_logic.c $(SRC_DIR)/tiles.c $(SRC_DIR)/player.c $(SRC_DIR)/enemy.c $(SRC_DIR)/gameover.c $(SRC_DIR)/stamina.c $(SRC_DIR)/level.c $(SRC_DIR)/claimed.c $(SRC_DIR)/title_bg.c
all: $(BUILD_DIR)/hello_iso.gb $(BUILD_DIR)/test_gameover.gb $(BUILD_DIR)/test_finale.gb
@@ -29,6 +29,7 @@ generate_c_assets: generate_images
$(PNG2ASSET) $(ASSETS_DIR)/stamina.png -c $(SRC_DIR)/stamina.c -bpp 2 -noflip -keep_palette_order
$(PNG2ASSET) $(ASSETS_DIR)/level.png -c $(SRC_DIR)/level.c -sw 8 -sh 16 -bpp 2 -noflip -keep_palette_order -keep_duplicate_tiles
$(PNG2ASSET) $(ASSETS_DIR)/title_bg.png -c $(SRC_DIR)/title_bg.c -map -bpp 2 -noflip -keep_palette_order -max_palettes 1
$(PNG2ASSET) $(ASSETS_DIR)/claimed.png -c $(SRC_DIR)/claimed.c -map -bpp 2 -noflip -max_palettes 1
# Main ROM target
$(BUILD_DIR)/hello_iso.gb: generate_c_assets $(SRCS)
@@ -50,7 +51,7 @@ clean:
rm -f $(SRC_DIR)/player.c $(SRC_DIR)/player.h
rm -f $(SRC_DIR)/enemy.c $(SRC_DIR)/enemy.h
rm -f $(SRC_DIR)/gameover.c $(SRC_DIR)/gameover.h
rm -f $(SRC_DIR)/next_level.c $(SRC_DIR)/next_level.h
rm -f $(SRC_DIR)/stamina.c $(SRC_DIR)/stamina.h
rm -f $(SRC_DIR)/level.c $(SRC_DIR)/level.h
rm -f $(SRC_DIR)/claimed.c $(SRC_DIR)/claimed.h
rm -f $(SRC_DIR)/title_bg.c $(SRC_DIR)/title_bg.h
Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

+509
View File
@@ -0,0 +1,509 @@
//AUTOGENERATED FILE FROM png2asset
#include <stdint.h>
#include <gbdk/platform.h>
#include <gbdk/metasprites.h>
BANKREF(claimed)
const palette_color_t claimed_palettes[4] = {
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33)
};
const uint8_t claimed_tiles[1888] = {
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfd,0xff,
0xfd,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xf2,0xf9,
0xf2,0xf9,0xf2,0xf9,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xb3,0xf6,
0xf6,0xba,0xb4,0xf8,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0x36,0xb6,
0xb4,0xb6,0x37,0x35,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xe7,0xaf,
0xcf,0x9f,0xef,0xaf,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xf3,0xfb,0xf2,0xfa,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x70,0x39,0xf7,0xb3,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xfe,0xfc,0xfd,
0xfd,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x33,0x37,0xf3,0xf7,
0xf2,0xf9,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,
0xde,0xcc,0x97,0xef,
0xfd,0xff,0xfe,0xff,
0xfe,0xff,0xfd,0xff,
0xff,0xff,0xe7,0xff,
0x15,0x24,0x3f,0x60,
0xb1,0xf5,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x84,0x84,0xbd,0xbd,
0xd4,0xf5,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x7f,0x3f,0xbf,0xff,
0xe7,0xb7,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x32,0xb4,0xcf,0xed,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x6d,0x2d,0xad,0xed,
0xc2,0xc2,0xf1,0xf9,
0xf1,0xf9,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfc,0xf9,0xf6,0xd6,
0xd1,0xd8,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfc,0xfd,0xfc,0xfe,
0xff,0xfe,0xfe,0xff,
0xfe,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,
0xf3,0xf7,0xc3,0xf7,
0x20,0x30,0xef,0xff,
0xe7,0xff,0x73,0xff,
0x3b,0xff,0xdf,0xff,
0xb7,0xf7,0x3e,0xb3,
0x32,0xb8,0x7e,0xff,
0x7c,0xff,0xed,0xff,
0x0d,0xff,0x5f,0xff,
0x70,0x6a,0x74,0x6e,
0x35,0x2e,0xf3,0xff,
0xe7,0xff,0xef,0xff,
0xcf,0xff,0xfe,0xff,
0x8d,0x85,0xbd,0xbd,
0x80,0x84,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xbf,0xbf,
0x7f,0x3f,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xcf,0xdd,0xdd,0xdd,
0xde,0xdc,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xad,0xed,0xa5,0xad,
0x61,0x33,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xdf,0xff,0xe5,0xff,
0xf0,0xff,0xf3,0xff,
0xfd,0xff,0xfa,0xff,
0xff,0xff,0xf3,0xff,
0x7b,0xff,0x73,0xff,
0x23,0xff,0xcd,0xff,
0xdd,0xfb,0xff,0xf3,
0xfd,0xff,0xfb,0xff,
0xfd,0xff,0xff,0xff,
0xf7,0xff,0xff,0xff,
0x3f,0xff,0x7f,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xf7,0xff,0xf3,0xff,
0xfb,0xff,0x9f,0xff,
0x85,0xff,0xf3,0xff,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xef,
0xff,0xff,0xff,0xff,
0xff,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x8f,0xfe,0xff,0xe9,
0xff,0x9b,0xfb,0x7f,
0xff,0x7f,0xff,0xff,
0xff,0xff,0xff,0xef,
0xff,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,
0xdf,0xff,0xff,0xbf,
0xff,0xff,0xdf,0x7f,
0xfb,0xff,0xff,0xff,
0xe7,0xff,0xe3,0xff,
0xf3,0xff,0xf3,0xff,
0xf1,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x3f,0xff,0xff,0xff,
0x7f,0xff,0x7f,0xff,
0xff,0xff,0xfb,0xff,
0xff,0xf5,0xf3,0xdd,
0xf9,0x4f,0xff,0x90,
0xf9,0xc6,0xf6,0xf9,
0xfd,0xf3,0xff,0xc7,
0xff,0xff,0xff,0xff,
0xff,0xff,0xbf,0x7f,
0xff,0x3f,0x31,0xcf,
0x39,0xc7,0xc5,0xff,
0xff,0xf6,0xff,0xff,
0xf8,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xdf,0xff,0x3f,0xff,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfc,0xff,
0xf8,0xff,0xf1,0xff,
0xe2,0xff,0xcf,0xff,
0xc3,0xff,0xc7,0xff,
0x37,0xff,0x67,0xff,
0xcf,0xff,0xbf,0xff,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfe,0xff,0xff,0xff,
0xfc,0xff,0xfc,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,
0x19,0xff,0x3f,0xf3,
0xbe,0xe6,0x7b,0xc4,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x3f,0x5f,0xf3,0x0f,
0xfb,0xff,0xff,0xff,
0xfc,0xff,0xfc,0xff,
0xf9,0xff,0xff,0xff,
0xff,0xff,0xe3,0xff,
0x7f,0xff,0x3f,0xff,
0x7f,0xff,0xff,0xff,
0xfd,0xff,0xfb,0xff,
0xff,0xfb,0xfb,0xf7,
0xff,0xff,0xfc,0xff,
0xfc,0xff,0xc0,0xff,
0xc8,0xff,0xcc,0xff,
0xdf,0xff,0xbb,0xff,
0x8f,0xff,0x0f,0xff,
0x3f,0xff,0x7f,0xff,
0xff,0xff,0xff,0xff,
0xfd,0xff,0xf8,0xff,
0xff,0xff,0xfc,0xff,
0xf9,0xff,0x82,0xff,
0x03,0xff,0x87,0xff,
0xd7,0xff,0xff,0xff,
0xff,0xff,0x3f,0xff,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfc,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfe,0xff,0xc7,0xff,
0x79,0xce,0xbe,0xef,
0x5c,0xef,0xeb,0xf4,
0xbf,0xf8,0xfc,0xff,
0xff,0xfa,0xff,0xff,
0xfb,0x1f,0xda,0x29,
0xfd,0x1b,0x87,0x7b,
0xb2,0x4f,0x84,0xff,
0xf2,0x7f,0xff,0xff,
0xfc,0xff,0xf8,0xff,
0x38,0xcf,0x56,0xbf,
0xa4,0x7f,0xc0,0xff,
0x01,0xff,0x0f,0xff,
0x3f,0xf7,0x57,0xff,
0xcd,0xff,0x05,0xff,
0x00,0xff,0x0c,0xff,
0x23,0xff,0xcc,0xff,
0x7a,0xff,0xba,0x7f,
0x7f,0xf6,0x7f,0xf7,
0xd7,0xff,0xdf,0xff,
0x33,0xff,0xef,0xff,
0xfb,0xff,0xff,0xff,
0x70,0xff,0xec,0xff,
0x78,0xff,0x60,0xff,
0x40,0xff,0xdc,0xff,
0xff,0xff,0xfe,0xff,
0x60,0xff,0x60,0xff,
0x70,0xff,0x31,0xff,
0x3e,0xff,0xff,0xff,
0xff,0xff,0x03,0xff,
0x0f,0xff,0x2f,0xff,
0x7a,0xff,0x3c,0xff,
0xfe,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xbf,0xff,0xf7,0xff,
0x37,0xff,0xee,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfe,0xff,0xbc,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xfa,0xfd,0xff,0xfe,
0xff,0xfe,0xea,0xff,
0xcf,0xff,0xfe,0xff,
0xfd,0xfe,0xe3,0xfd,
0x4f,0xbf,0xbe,0x7f,
0xfe,0x7f,0xcb,0xff,
0xcf,0xff,0x57,0xbf,
0xbf,0x7f,0xff,0xff,
0xff,0xff,0xf0,0xff,
0x7f,0xbf,0xf7,0xcf,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0x10,0xff,
0xff,0xff,0xf9,0xff,
0xfc,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0x0d,0xff,
0xff,0xff,0xe6,0xfd,
0x3f,0xff,0xc0,0xff,
0x80,0xff,0x80,0xff,
0xfc,0xff,0x7f,0xff,
0xff,0xff,0xe1,0xff,
0xfb,0xff,0xff,0xff,
0x3f,0xff,0x1f,0xff,
0x08,0xff,0xa0,0xff,
0xe0,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xfe,0xff,0xfc,
0x3f,0xfc,0x2f,0xd0,
0x5f,0xe0,0xfc,0xff,
0xde,0xff,0xbf,0x7f,
0x7f,0xff,0xff,0xff,
0x9f,0x63,0xbf,0x7f,
0xf3,0x0f,0xf2,0x0f,
0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xf3,0xff,0x7f,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfe,0xff,
0xfc,0xff,0xff,0xff,
0xdc,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0x2f,0xff,
0x47,0xff,0xff,0xff,
0x21,0xff,0x83,0xff,
0xc3,0xff,0xff,0xff,
0xff,0xff,0xcf,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xfc,0xff,
0xfe,0xff,0xff,0xff,
0xe3,0xff,0x87,0xff,
0xff,0xff,0xdd,0xff,
0xbc,0xff,0x5c,0xff,
0x80,0xff,0xff,0xff,
0x87,0xff,0xc4,0xff,
0xff,0xff,0x78,0xff,
0x20,0xff,0x00,0xff,
0x00,0xff,0x80,0xff,
0xfb,0xff,0x05,0xff,
0xff,0xff,0x30,0xff,
0x48,0xff,0x00,0xff,
0x00,0xff,0x01,0xff,
0xce,0xff,0x00,0xff,
0xe1,0xff,0x1e,0xff,
0x10,0xff,0x40,0xff,
0xc0,0xff,0x80,0xff,
0x0c,0xff,0x1a,0xfd,
0xfc,0xff,0x00,0xff,
0x00,0xff,0x01,0xfe,
0x03,0xfc,0x03,0xfc,
0x01,0xff,0x00,0xff,
0x1f,0xff,0x00,0xff,
0x00,0xff,0x80,0x7f,
0x00,0xff,0x80,0x7f,
0xdf,0xff,0x3c,0xff,
0xff,0xff,0x00,0xff,
0x00,0xff,0xfa,0xff,
0x00,0xff,0x03,0xff,
0xff,0xff,0xfd,0xff,
0x80,0xff,0x7f,0xff,
0x1f,0xff,0x0f,0xff,
0x38,0xff,0xc3,0xff,
0x3c,0xff,0xd9,0xff,
0xef,0xff,0xff,0xff,
0x1f,0xff,0x80,0xff,
0xc0,0xff,0xe0,0xff,
0xf1,0xfe,0xfc,0xff,
0xde,0xff,0x36,0x4f,
0x43,0x3f,0xde,0xe7,
0x3c,0xfc,0xfc,0xfe,
0xff,0xff,0x43,0xff,
0x6b,0xf7,0xfb,0xc7,
0xcb,0xf7,0x07,0x7b,
0x13,0xef,0x07,0x3f,
0xfc,0xff,0xe1,0xff,
0x63,0xff,0xbf,0xff,
0xc1,0xff,0xbf,0xff,
0xc3,0xff,0x01,0xff,
0x07,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,
0xff,0xff,0x3f,0xff,
0xbf,0xff,0xbf,0xff,
0xf8,0xff,0xcc,0xff,
0xe8,0xff,0xfc,0xff,
0xfc,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0x03,0xff,0x00,0xff,
0x20,0xff,0x01,0xff,
0x01,0xff,0xff,0xff,
0xf0,0xff,0xfc,0xff,
0xff,0xff,0x38,0xff,
0x20,0xff,0xc0,0xff,
0x80,0xff,0x80,0xfe,
0x00,0xff,0x00,0xff,
0xfb,0xfb,0x00,0xff,
0x00,0xff,0x00,0xdf,
0x00,0x3f,0x00,0x7f,
0xe0,0xff,0x28,0xf7,
0xf6,0xf8,0x06,0xf8,
0x04,0xf9,0x01,0xfe,
0x00,0xff,0x00,0xff,
0x00,0xff,0x03,0xff,
0xc7,0x3f,0x21,0x1f,
0x63,0x9f,0x07,0xff,
0x07,0xff,0x00,0xff,
0x00,0xff,0xff,0xff,
0xe0,0xff,0xff,0xff,
0xff,0xff,0xe0,0xff,
0x80,0xff,0x00,0xff,
0x02,0xff,0xff,0xff,
0x3f,0xff,0xff,0xff,
0xc0,0xff,0x00,0xff,
0x00,0xff,0x00,0xff,
0x0f,0xff,0xfc,0xff,
0xc0,0xff,0xff,0xff,
0x1c,0xff,0x10,0xff,
0x30,0xff,0x30,0xff,
0xf0,0xff,0x01,0xff,
0xdf,0xff,0xff,0xff,
0x00,0xff,0x3f,0xff,
0xfc,0xff,0x03,0xff,
0x00,0xff,0xff,0xff,
0xfc,0xff,0xff,0xff,
0x00,0xff,0x27,0xff,
0xc0,0xff,0x00,0xff,
0x03,0xff,0xff,0xff,
0x01,0xff,0xff,0xff,
0xf0,0xff,0xc7,0xff,
0xef,0xff,0xe7,0xff,
0xef,0xff,0xff,0xff,
0xcf,0xff,0xff,0xff,
0x1f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xf0,0xf9,
0xf6,0xfa,0xf6,0xfa,
0xf7,0xfb,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0x9c,0x88,
0xb7,0xab,0xb7,0xa8,
0x9f,0xab,0xff,0xff,
0xff,0xff,0xff,0xff,
0x00,0xff,0x69,0xc4,
0xf5,0xff,0xed,0xdc,
0xf7,0xf7,0xff,0xff,
0xff,0xff,0xff,0xff,
0x40,0xff,0x02,0x7c,
0x78,0xbd,0xe6,0xfc,
0x7f,0xbd,0xff,0xff,
0xff,0xff,0xff,0xff,
0x00,0xff,0x00,0x03,
0x40,0xb7,0xb5,0x76,
0xf7,0xb6,0xff,0xff,
0xff,0xff,0xff,0xff,
0x03,0xff,0xd1,0x22,
0xd3,0x2d,0x1b,0xe5,
0xf6,0xef,0xff,0xff,
0xff,0xff,0xff,0xff,
0xc0,0xff,0x00,0x1f,
0x00,0xbf,0x00,0xbf,
0x03,0xbf,0xff,0xff,
0xff,0xff,0xff,0xff,
0x24,0xff,0x85,0x08,
0x00,0xfa,0x06,0xfa,
0xd2,0xfa,0xff,0xff,
0xff,0xff,0xff,0xff,
0x00,0xff,0x04,0xf8,
0x04,0xfb,0x7a,0xff,
0xf8,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,
0x01,0xff,0x80,0x44,
0x7c,0x7e,0x44,0x46,
0x7e,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,
0xb2,0xff,0x04,0x01,
0x98,0xda,0xdb,0xda,
0xdb,0xd7,0xff,0xff,
0xff,0xff,0xff,0xff,
0x3b,0xff,0xbf,0xff,
0xbf,0xbf,0xbf,0x7f,
0x7f,0x7f,0xff,0xff,
0xff,0xff,0xff,0xff
};
const unsigned char claimed_map[360] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x1c,0x1d,0x1e,0x1f,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x22,0x23,0x24,0x25,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x00,0x00,0x00,
0x00,0x00,0x00,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x00,0x00,0x00,0x00,
0x00,0x00,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
+27
View File
@@ -0,0 +1,27 @@
//AUTOGENERATED FILE FROM png2asset
#ifndef METASPRITE_claimed_H
#define METASPRITE_claimed_H
#include <stdint.h>
#include <gbdk/platform.h>
#include <gbdk/metasprites.h>
#define claimed_TILE_ORIGIN 0
#define claimed_TILE_W 8
#define claimed_TILE_H 8
#define claimed_WIDTH 160
#define claimed_HEIGHT 144
#define claimed_TILE_COUNT 118
#define claimed_PALETTE_COUNT 1
#define claimed_COLORS_PER_PALETTE 4
#define claimed_TOTAL_COLORS 4
#define claimed_MAP_ATTRIBUTES 0
extern const unsigned char claimed_map[360];
#define claimed_map_attributes claimed_map
BANKREF_EXTERN(claimed)
extern const palette_color_t claimed_palettes[4];
extern const uint8_t claimed_tiles[1888];
#endif
+26 -8
View File
@@ -17,9 +17,9 @@
#include "player.h"
#include "enemy.h"
#include "gameover.h"
#include "next_level.h"
#include "stamina.h"
#include "level.h"
#include "claimed.h"
#include "title_bg.h"
/**
@@ -205,6 +205,12 @@ static void ending_puttext(uint8_t col, uint8_t row, const char *s) {
}
}
static void ending_putdigit(uint8_t col, uint8_t row, uint8_t digit) {
if (col < 32) {
map_buffer[(uint16_t)row * 32 + col] = (uint8_t)(digit + ('0' - ' '));
}
}
/**
* Loop Principale di Aggiornamento del Gioco (chiamato ad ogni Frame ~60 FPS).
* Questo metodo funge da "Direttore d'Orchestra", delegando i compiti ai moduli specializzati.
@@ -222,16 +228,28 @@ void engine_update(uint8_t keys, uint8_t prev_keys) {
// Quando scade il timer drammatico...
if (game_over_timer == 0) {
if (game_over == 1) {
// ...Svuota lo schermo
memset(map_buffer, 0, sizeof(map_buffer));
set_bkg_tiles(0, 0, 32, 32, map_buffer);
} else if (game_over == 2) {
// Mostra la schermata "Going Deeper"
// Sconfitta: schermata "claimed" a tutto schermo + metasprite GAME OVER
HIDE_SPRITES;
SCX_REG = 0;
SCY_REG = 0;
set_bkg_data(0, next_level_TILE_COUNT, next_level_tiles);
set_bkg_tiles(0, 0, 20, 18, next_level_map);
BGP_REG = 0xE4; // palette standard (claimed ha la sua)
set_bkg_data(0, claimed_TILE_COUNT, claimed_tiles);
set_bkg_tiles(0, 0, 20, 18, claimed_map);
} else if (game_over == 2) {
// Going Deeper: schermata di transizione testuale (font IBM).
// (Era un'immagine, sostituita con testo per ridurre l'occupazione ROM
// e fare spazio alla schermata "claimed" della morte.)
HIDE_SPRITES;
SCX_REG = 0;
SCY_REG = 0;
font_init();
font_t gd_font = font_load(font_ibm);
font_set(gd_font);
memset(map_buffer, 0, sizeof(map_buffer));
ending_puttext(2, 7, "GOING DEEPER");
ending_puttext(3, 9, "LEVEL");
ending_putdigit(9, 9, (uint8_t)(level + 1));
set_bkg_tiles(0, 0, 32, 32, map_buffer);
} else if (game_over == 3) {
// FINALE TRAGICO: livello 8 superato, ma non e' una fuga. La traccia
// si e' esaurita, sei intrappolato. Sfondo nero (BGP invertito) + testo