diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2018-08-25 22:23:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-25 22:23:45 -0400 |
commit | 3eacab563d0e1ab5557c2443556a7a5e58d14cad (patch) | |
tree | 3d747166409fdc94f0fd1aa760693a7ee5bd2156 /engine/tilesets/timeofday_pals.asm | |
parent | 89681d231611938a791f4256e602c88c2f9aa3e1 (diff) | |
parent | b2adcd6d6ff91efc764a6ecc65147be7b9cda9e8 (diff) |
Merge pull request #555 from Rangi42/ldh
Use real labels for HRAM instead of constants, and the ldh instruction
Diffstat (limited to 'engine/tilesets/timeofday_pals.asm')
-rw-r--r-- | engine/tilesets/timeofday_pals.asm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm index 58bbe9183..99437cfe0 100644 --- a/engine/tilesets/timeofday_pals.asm +++ b/engine/tilesets/timeofday_pals.asm @@ -43,11 +43,11 @@ _TimeOfDayPals:: ld hl, wBGPals1 palette PAL_BG_TEXT ; save wram bank - ld a, [rSVBK] + ldh a, [rSVBK] ld b, a ld a, BANK(wBGPals1) - ld [rSVBK], a + ldh [rSVBK], a ; push palette ld c, NUM_PAL_COLORS @@ -62,7 +62,7 @@ _TimeOfDayPals:: ; restore wram bank ld a, b - ld [rSVBK], a + ldh [rSVBK], a ; update sgb pals ld b, SCGB_MAPPALS @@ -72,11 +72,11 @@ _TimeOfDayPals:: ld hl, wOBPals1 - 1 ; last byte in wBGPals1 ; save wram bank - ld a, [rSVBK] + ldh a, [rSVBK] ld d, a ld a, BANK(wOBPals1) - ld [rSVBK], a + ldh [rSVBK], a ; pop palette ld e, NUM_PAL_COLORS @@ -91,7 +91,7 @@ _TimeOfDayPals:: ; restore wram bank ld a, d - ld [rSVBK], a + ldh [rSVBK], a ; update palettes call _UpdateTimePals @@ -158,10 +158,10 @@ FadeBlackQuickly: ret FillWhiteBGColor: - ld a, [rSVBK] + ldh a, [rSVBK] push af ld a, BANK(wBGPals1) - ld [rSVBK], a + ldh [rSVBK], a ld hl, wBGPals1 ld a, [hli] @@ -182,7 +182,7 @@ endr jr nz, .loop pop af - ld [rSVBK], a + ldh [rSVBK], a ret ReplaceTimeOfDayPals: @@ -306,7 +306,7 @@ ConvertTimePalsDecHL: GetTimePalFade: ; check cgb - ld a, [hCGB] + ldh a, [hCGB] and a jr nz, .cgb |