Skip to content

Commit

Permalink
Merge pull request #2095 from DizzyEggg/transition
Browse files Browse the repository at this point in the history
Fix CaveTransition pals
  • Loading branch information
mrgriffin authored Jan 15, 2025
2 parents 1c765d1 + 9385dfe commit 9952b67
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
10 changes: 9 additions & 1 deletion graphics/cave_transition/enter.pal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
JASC-PAL
0100
8
16
148 197 172
16 16 16
32 32 32
Expand All @@ -9,3 +9,11 @@ JASC-PAL
82 82 82
98 98 98
115 115 115
131 131 131
148 148 148
164 164 164
180 180 180
197 197 197
213 213 213
230 230 230
255 255 255
11 changes: 0 additions & 11 deletions graphics/cave_transition/exit.pal

This file was deleted.

8 changes: 4 additions & 4 deletions src/fldeff_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/cave_tran
static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/cave_transition/black.gbapal");

static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/cave_transition/enter.gbapal");
static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/cave_transition/exit.gbapal");

static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/cave_transition/tilemap.bin.lz");
static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/cave_transition/tiles.4bpp.lz");

Expand Down Expand Up @@ -219,7 +219,7 @@ static void Task_ExitCaveTransition2(u8 taskId)
LZ77UnCompVram(sCaveTransitionTiles, (void *)(VRAM + 0xC000));
LZ77UnCompVram(sCaveTransitionTilemap, (void *)(VRAM + 0xF800));
LoadPalette(sCaveTransitionPalette_White, BG_PLTT_ID(14), PLTT_SIZE_4BPP);
LoadPalette(sCaveTransitionPalette_Exit, BG_PLTT_ID(14), PLTT_SIZEOF(8));
LoadPalette(&sCaveTransitionPalette_Enter[8], BG_PLTT_ID(14), PLTT_SIZEOF(8));
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0
| BLDCNT_EFFECT_BLEND
| BLDCNT_TGT2_BG1
Expand Down Expand Up @@ -249,7 +249,7 @@ static void Task_ExitCaveTransition3(u8 taskId)
u16 blend = count + 0x1000;

SetGpuReg(REG_OFFSET_BLDALPHA, blend);
if (count <= 0x10)
if (count <= 16)
{
gTasks[taskId].data[1]++;
}
Expand All @@ -270,7 +270,7 @@ static void Task_ExitCaveTransition4(u8 taskId)
if (count < 8)
{
gTasks[taskId].data[2]++;
LoadPalette(&sCaveTransitionPalette_Exit[count], BG_PLTT_ID(14), sizeof(sCaveTransitionPalette_Exit) - PLTT_SIZEOF(count));
LoadPalette(&sCaveTransitionPalette_Enter[8 + count], BG_PLTT_ID(14), PLTT_SIZEOF(8) - PLTT_SIZEOF(count));
}
else
{
Expand Down

0 comments on commit 9952b67

Please sign in to comment.