diff options
Diffstat (limited to 'home/fade.asm')
-rw-r--r-- | home/fade.asm | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/home/fade.asm b/home/fade.asm index 3d0afdce..f5851099 100644 --- a/home/fade.asm +++ b/home/fade.asm @@ -1,5 +1,6 @@ -Function360:: ; 360 (0:0360) -; XXX +; Functions to fade the screen in and out. + +Unreferenced_Function48c:: ; TimeOfDayFade ld a, [wTimeOfDayPal] ld b, a @@ -9,6 +10,7 @@ Function360:: ; 360 (0:0360) ld l, a jr nc, .okay dec h + .okay ld a, [hli] ldh [rBGP], a @@ -42,8 +44,10 @@ RotateThreePalettesRight:: .dmg ld hl, IncGradGBPalTable_13 ld b, 3 + RotatePalettesRight:: -.loop +; Rotate palettes to the right and fill with loaded colors from the left +; If we're already at the leftmost color, fill with the leftmost color push de ld a, [hli] call DmgToCgbBGPals @@ -56,7 +60,7 @@ RotatePalettesRight:: call DelayFrames pop de dec b - jr nz, .loop + jr nz, RotatePalettesRight ret RotateFourPalettesLeft:: @@ -79,11 +83,14 @@ RotateThreePalettesLeft:: ld hl, IncGradGBPalTable_07 - 1 ld b, 3 jr RotatePalettesLeft + .dmg ld hl, IncGradGBPalTable_15 - 1 ld b, 3 + RotatePalettesLeft:: -.loop +; Rotate palettes to the left and fill with loaded colors from the right +; If we're already at the rightmost color, fill with the rightmost color push de ld a, [hld] ld d, a @@ -96,27 +103,27 @@ RotatePalettesLeft:: call DelayFrames pop de dec b - jr nz, .loop + jr nz, RotatePalettesLeft ret -IncGradGBPalTable_00:: db %11111111, %11111111, %11111111 -IncGradGBPalTable_01:: db %11111110, %11111110, %11111110 -IncGradGBPalTable_02:: db %11111001, %11111001, %11111001 -IncGradGBPalTable_03:: db %11100100, %11100100, %11100100 +IncGradGBPalTable_00:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3 +IncGradGBPalTable_01:: dc 3,3,3,2, 3,3,3,2, 3,3,3,2 +IncGradGBPalTable_02:: dc 3,3,2,1, 3,3,2,1, 3,3,2,1 +IncGradGBPalTable_03:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0 -IncGradGBPalTable_04:: db %11100100, %11100100, %11100100 -IncGradGBPalTable_05:: db %10010000, %10010000, %10010000 -IncGradGBPalTable_06:: db %01000000, %01000000, %01000000 +IncGradGBPalTable_04:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0 +IncGradGBPalTable_05:: dc 2,1,0,0, 2,1,0,0, 2,1,0,0 +IncGradGBPalTable_06:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0 -IncGradGBPalTable_07:: db %00000000, %00000000, %00000000 -; bgp obp1 obp2 -IncGradGBPalTable_08:: db %11111111, %11111111, %11111111 -IncGradGBPalTable_09:: db %11111110, %11111110, %11111000 -IncGradGBPalTable_10:: db %11111001, %11100100, %11100100 -IncGradGBPalTable_11:: db %11100100, %11010000, %11100000 +IncGradGBPalTable_07:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0 +; bgp obp1 obp2 +IncGradGBPalTable_08:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3 +IncGradGBPalTable_09:: dc 3,3,3,2, 3,3,3,2, 3,3,2,0 +IncGradGBPalTable_10:: dc 3,3,2,1, 3,2,1,0, 3,2,1,0 +IncGradGBPalTable_11:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0 -IncGradGBPalTable_12:: db %11100100, %11010000, %11100000 -IncGradGBPalTable_13:: db %10010000, %10000000, %10010000 -IncGradGBPalTable_14:: db %01000000, %01000000, %01000000 +IncGradGBPalTable_12:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0 +IncGradGBPalTable_13:: dc 2,1,0,0, 2,0,0,0, 2,1,0,0 +IncGradGBPalTable_14:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0 -IncGradGBPalTable_15:: db %00000000, %00000000, %00000000 +IncGradGBPalTable_15:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0
\ No newline at end of file |