summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-26 20:33:41 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-26 20:33:41 -0500
commitb3f0e11567ca84b855c233c0621d18f3aaac8495 (patch)
tree6290e30bd2e27eca2d78aa7628341fa7c045222e /engine
parent82591369114ea1d7723e433c7b9e49a639b4919b (diff)
Various cleanup
Diffstat (limited to 'engine')
-rwxr-xr-xengine/mail.asm6
-rw-r--r--engine/timeofdaypals.asm13
2 files changed, 9 insertions, 10 deletions
diff --git a/engine/mail.asm b/engine/mail.asm
index 392405b20..90fcc5548 100755
--- a/engine/mail.asm
+++ b/engine/mail.asm
@@ -383,7 +383,7 @@ MailboxPC_PrintMailAuthor: ; 0x447fb
MailboxPC: ; 0x44806
xor a
- ld [OBPals + 8 * 6], a
+ ld [OBPals palette 6], a
ld a, 1
ld [wCurMessageIndex], a
.loop
@@ -397,11 +397,11 @@ MailboxPC: ; 0x44806
ld a, [wCurMessageIndex]
ld [wMenuCursorBuffer], a
- ld a, [OBPals + 8 * 6]
+ ld a, [OBPals palette 6]
ld [wMenuScrollPosition], a
call ScrollingMenu
ld a, [wMenuScrollPosition]
- ld [OBPals + 8 * 6], a
+ ld [OBPals palette 6], a
ld a, [wMenuCursorY]
ld [wCurMessageIndex], a
diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm
index a4a07bc4d..7fc364f70 100644
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -41,19 +41,18 @@ _TimeOfDayPals:: ; 8c011
; update palette id
ld [TimeOfDayPal], a
-
-; save bg palette 8
- ld hl, UnknBGPals + 8 * 7 ; UnknBGPals + 7 pals
+; save bg palette 7
+ ld hl, UnknBGPals palette PAL_BG_TEXT
; save wram bank
ld a, [rSVBK]
ld b, a
; wram bank 5
- ld a, 5
+ ld a, $5
ld [rSVBK], a
; push palette
- ld c, 4 ; NUM_PAL_COLORS
+ ld c, NUM_PAL_COLORS
.push
ld d, [hl]
inc hl
@@ -73,7 +72,7 @@ _TimeOfDayPals:: ; 8c011
call GetSGBLayout
-; restore bg palette 8
+; restore bg palette 7
ld hl, UnknOBPals - 1 ; last byte in UnknBGPals
; save wram bank
@@ -84,7 +83,7 @@ _TimeOfDayPals:: ; 8c011
ld [rSVBK], a
; pop palette
- ld e, 4 ; NUM_PAL_COLORS
+ ld e, NUM_PAL_COLORS
.pop
pop bc
ld [hl], c