summaryrefslogtreecommitdiff
path: root/engine/tilesets/timeofday_pals.asm
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2018-06-24 16:09:41 +0200
committermid-kid <esteve.varela@gmail.com>2018-06-24 16:13:22 +0200
commit1d9a68dbdd0132035f1fc7b7ea8f7fdc24741507 (patch)
tree3af0a92f5f7dc10f32eed04d9daae52749fc33c2 /engine/tilesets/timeofday_pals.asm
parent131875d3e37044ec995287af7c93decd86a0d659 (diff)
Remove all address comments
Diffstat (limited to 'engine/tilesets/timeofday_pals.asm')
-rw-r--r--engine/tilesets/timeofday_pals.asm51
1 files changed, 17 insertions, 34 deletions
diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm
index b8d43d252..cda6e1e0d 100644
--- a/engine/tilesets/timeofday_pals.asm
+++ b/engine/tilesets/timeofday_pals.asm
@@ -1,18 +1,17 @@
-DummyPredef35: ; 8c000
+DummyPredef35:
DummyPredef36:
ret
-UpdateTimeOfDayPal:: ; 8c001
+UpdateTimeOfDayPal::
call UpdateTime
ld a, [wTimeOfDay]
ld [wCurTimeOfDay], a
call GetTimePalette
ld [wTimeOfDayPal], a
ret
-; 8c011
-_TimeOfDayPals:: ; 8c011
+_TimeOfDayPals::
; return carry if pals are changed
; forced pals?
@@ -109,34 +108,30 @@ _TimeOfDayPals:: ; 8c011
; no change occurred
and a
ret
-; 8c070
-_UpdateTimePals:: ; 8c070
+_UpdateTimePals::
ld c, $9 ; normal
call GetTimePalFade
call DmgToCgbTimePals
ret
-; 8c079
-FadeInPalettes:: ; 8c079
+FadeInPalettes::
ld c, $12
call GetTimePalFade
ld b, $4
call ConvertTimePalsDecHL
ret
-; 8c084
-FadeOutPalettes:: ; 8c084
+FadeOutPalettes::
call FillWhiteBGColor
ld c, $9
call GetTimePalFade
ld b, $4
call ConvertTimePalsIncHL
ret
-; 8c092
-BattleTowerFade: ; 8c092
+BattleTowerFade:
call FillWhiteBGColor
ld c, $9
call GetTimePalFade
@@ -151,26 +146,23 @@ BattleTowerFade: ; 8c092
dec b
jr nz, .asm_8c09c
ret
-; 8c0ab
-FadeInQuickly: ; 8c0ab
+FadeInQuickly:
ld c, $0
call GetTimePalFade
ld b, $4
call ConvertTimePalsIncHL
ret
-; 8c0b6
-FadeBlackQuickly: ; 8c0b6
+FadeBlackQuickly:
ld c, $9
call GetTimePalFade
ld b, $4
call ConvertTimePalsDecHL
ret
-; 8c0c1
-FillWhiteBGColor: ; 8c0c1
+FillWhiteBGColor:
ld a, [rSVBK]
push af
ld a, BANK(wBGPals1)
@@ -197,9 +189,8 @@ endr
pop af
ld [rSVBK], a
ret
-; 8c0e5
-ReplaceTimeOfDayPals: ; 8c0e5
+ReplaceTimeOfDayPals:
ld hl, .BrightnessLevels
ld a, [wMapTimeOfDay]
cp $4 ; Dark cave, needs Flash
@@ -226,9 +217,8 @@ ReplaceTimeOfDayPals: ; 8c0e5
ld a, %10101010 ; 2, 2, 2, 2
ld [wTimeOfDayPalset], a
ret
-; 8c10f (23:410f)
-.BrightnessLevels: ; 8c10f
+.BrightnessLevels:
dc 3, 2, 1, 0
dc 1, 1, 1, 1
dc 2, 2, 2, 2
@@ -237,9 +227,8 @@ ReplaceTimeOfDayPals: ; 8c0e5
dc 3, 2, 1, 0
dc 3, 2, 1, 0
dc 3, 2, 1, 0
-; 8c117
-GetTimePalette: ; 8c117
+GetTimePalette:
ld a, [wTimeOfDay]
ld e, a
ld d, 0
@@ -250,7 +239,6 @@ GetTimePalette: ; 8c117
ld h, [hl]
ld l, a
jp hl
-; 8c126
.TimePalettes:
dw .MorningPalette
@@ -282,10 +270,9 @@ GetTimePalette: ; 8c117
rlca
rlca
ret
-; 8c14e
-DmgToCgbTimePals: ; 8c14e
+DmgToCgbTimePals:
push hl
push de
ld a, [hli]
@@ -298,9 +285,8 @@ DmgToCgbTimePals: ; 8c14e
pop de
pop hl
ret
-; 8c15e
-ConvertTimePalsIncHL: ; 8c15e
+ConvertTimePalsIncHL:
.loop
call DmgToCgbTimePals
inc hl
@@ -311,9 +297,8 @@ ConvertTimePalsIncHL: ; 8c15e
dec b
jr nz, .loop
ret
-; 8c16d
-ConvertTimePalsDecHL: ; 8c16d
+ConvertTimePalsDecHL:
.loop
call DmgToCgbTimePals
dec hl
@@ -324,10 +309,9 @@ ConvertTimePalsDecHL: ; 8c16d
dec b
jr nz, .loop
ret
-; 8c17c
-GetTimePalFade: ; 8c17c
+GetTimePalFade:
; check cgb
ld a, [hCGB]
and a
@@ -412,4 +396,3 @@ GetTimePalFade: ; 8c17c
db %10010000, %10010000, %10010000
db %01000000, %01000000, %01000000
db %00000000, %00000000, %00000000
-; 8c20f