add bright version of the game sprites
authorJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 31 Oct 2022 22:38:36 +0000 (00:38 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 31 Oct 2022 22:38:36 +0000 (00:38 +0200)
Makefile
src/data.h
src/data.s
src/gamescr.c

index 5eb729d..f6b89a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,8 @@ elf = $(name).elf
 bin = $(name).gba
 
 data = data/color.raw data/color.pal data/color.gpal data/height.raw \
-          data/spr_game.raw data/spr_game.pal data/spr_logo.raw data/spr_logo.pal \
+          data/spr_game.raw data/spr_game.pal data/spr_game.gpal \
+          data/spr_logo.raw data/spr_logo.pal \
           data/menuscr.raw data/menuscr.pal data/menuscr.gpal \
           data/spr_menu.raw data/spr_menu.pal
 
index 0021ef9..461c1e6 100644 (file)
@@ -46,6 +46,7 @@ extern unsigned char height_pixels[];
 
 extern unsigned char spr_game_pixels[];
 extern unsigned char spr_game_cmap[];
+extern unsigned char spr_game_gba_cmap[];
 
 /* menu screen assets */
 extern unsigned char menuscr_pixels[];
index 7240060..990b0c9 100644 (file)
@@ -6,6 +6,7 @@
        .globl height_pixels
        .globl spr_game_pixels
        .globl spr_game_cmap
+       .globl spr_game_gba_cmap
        .globl menuscr_pixels
        .globl menuscr_cmap
        .globl menuscr_gba_cmap
@@ -39,6 +40,10 @@ spr_game_cmap:
        .incbin "data/spr_game.pal"
 
        .align 1
+spr_game_gba_cmap:
+       .incbin "data/spr_game.gpal"
+
+       .align 1
 menuscr_pixels:
        .incbin "data/menuscr.raw"
 
index 62c16a9..7d0e051 100644 (file)
@@ -109,8 +109,6 @@ static void setup_palette(void)
        int i;
        unsigned char *cmap = gba_colors ? color_gba_cmap : color_cmap;
 
-       emuprint("setting up %s palette", gba_colors ? "GBA" : "NDS/Emu");
-
        for(i=0; i<256; i++) {
                int r = cmap[i * 3];
                int g = cmap[i * 3 + 1];
@@ -145,7 +143,7 @@ static int gamescr_start(void)
        /* setup color image palette */
        setup_palette();
 
-       spr_setup(16, 16, spr_game_pixels, spr_game_cmap);
+       spr_setup(16, 16, spr_game_pixels, gba_colors ? spr_game_gba_cmap : spr_game_cmap);
        wait_vblank();
        spr_clear();