From 5ea57b5c59e866215e9dff0f725c8fb431e2518a Mon Sep 17 00:00:00 2001 From: 8bitZeta Date: Sun, 14 Jan 2024 05:46:44 -0600 Subject: [PATCH] Revert "Re-arrange some pointer load for aesthetics" that load into h --- engine/battle/effect_commands.asm | 2 +- engine/games/card_flip.asm | 2 +- engine/link/link.asm | 2 +- home/game_time.asm | 2 +- home/predef.asm | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 99b26c3a1..4919634a2 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -2808,8 +2808,8 @@ SpeciesItemBoost: ; it's holding item d, double it. ld a, [hli] - ld h, a ld l, [hl] + ld h, a ; fallthrough DoubleStatIfSpeciesHoldingItem: diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index 9a1b9a9fe..4a4cf9434 100644 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -109,8 +109,8 @@ _CardFlip: .DeductCoins: ld hl, wCoins ld a, [hli] - ld h, a ld l, [hl] + ld h, a and a jr nz, .deduct ; You have at least 256 coins. ld a, l diff --git a/engine/link/link.asm b/engine/link/link.asm index 28f90abf6..07443d932 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -2800,8 +2800,8 @@ Link_CheckCommunicationError: vc_hook Wireless_prompt ld hl, wLinkTimeoutFrames ld a, [hli] - ld h, a ld l, [hl] + ld h, a push hl call .CheckConnected pop hl diff --git a/home/game_time.asm b/home/game_time.asm index cd3ebf3ea..a585fd58a 100644 --- a/home/game_time.asm +++ b/home/game_time.asm @@ -87,8 +87,8 @@ GameTimer:: ; +1 hour ld hl, wGameTimeHours ld a, [hli] - ld h, a ld l, [hl] + ld h, a inc hl ; Cap the timer after 1000 hours. diff --git a/home/predef.asm b/home/predef.asm index 7cdb601e7..4c4d6261e 100644 --- a/home/predef.asm +++ b/home/predef.asm @@ -22,15 +22,15 @@ Predef:: ; Call the Predef function ld hl, wPredefAddress ld a, [hli] - ld h, a ld l, [hl] + ld h, a push hl ; Get hl back ld hl, wPredefHL ld a, [hli] - ld h, a ld l, [hl] + ld h, a ret .Return: @@ -47,6 +47,6 @@ Predef:: ld hl, wPredefHL ld a, [hli] - ld h, a ld l, [hl] + ld h, a ret