ref: 59ee673775b20b4859842c98b8199991fa55790c
parent: e29a1f8f948a5353c1ba8d631aa9352185ca6e29
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sat Dec 9 17:24:43 EST 2017
Consistent pointer labels in WRAM
--- a/engine/phone.asm
+++ b/engine/phone.asm
@@ -381,11 +381,11 @@
.DoPhoneCall:
ld a, b
- ld [wd002], a
+ ld [PhoneScriptBank], a
ld a, l
- ld [wd003], a
+ ld [PhoneCaller], a
ld a, h
- ld [wd004], a
+ ld [PhoneCaller + 1], a
ld b, BANK(UnknownScript_0x90205)
ld de, UnknownScript_0x90205
call ExecuteCallbackScript
@@ -495,9 +495,9 @@
ld a, b
ld [PhoneScriptBank], a
ld a, e
- ld [PhoneCallerLo], a
+ ld [PhoneCaller], a
ld a, d
- ld [PhoneCallerHi], a
+ ld [PhoneCaller + 1], a
call Phone_FirstOfTwoRings
call Phone_FirstOfTwoRings
callba TrainerRankings_PhoneCalls
@@ -523,9 +523,9 @@
inc hl
ld a, [PhoneScriptBank]
ld b, a
- ld a, [PhoneCallerLo]
+ ld a, [PhoneCaller]
ld e, a
- ld a, [PhoneCallerHi]
+ ld a, [PhoneCaller + 1]
ld d, a
call FarPlaceString
ret
--- a/event/elevator.asm
+++ b/event/elevator.asm
@@ -21,9 +21,9 @@
ld a, b
ld [wElevatorPointerBank], a
ld a, e
- ld [wElevatorPointerLo], a
+ ld [wElevatorPointer], a
ld a, d
- ld [wElevatorPointerHi], a
+ ld [wElevatorPointer + 1], a
call .LoadFloors
ret
; 1345a
@@ -31,7 +31,7 @@
.LoadFloors: ; 1345a
ld de, CurElevator
ld bc, 4
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -52,7 +52,7 @@
; 1347d
.FindCurrentFloor: ; 1347d
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -102,7 +102,7 @@
Elevator_GoToFloor: ; 134c0
push af
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
--- a/wram.asm
+++ b/wram.asm
@@ -1565,8 +1565,7 @@
NEXTU ; d002
; phone call data
PhoneScriptBank:: db
-PhoneCallerLo:: db
-PhoneCallerHi:: db
+PhoneCaller:: dw
NEXTU ; d002
; radio data
@@ -1685,8 +1684,7 @@
NEXTU ; d03e
; elevator data
wElevatorPointerBank:: db
-wElevatorPointerLo:: db
-wElevatorPointerHi:: db
+wElevatorPointer:: dw
wElevatorOriginFloor:: db
NEXTU ; d03e
@@ -1716,8 +1714,7 @@
; trainer data
ds 3
wTempTrainerHeader::
-wTempTrainerEventFlagLo:: db
-wTempTrainerEventFlagHi:: db
+wTempTrainerEventFlag:: dw
wTempTrainerClass:: db
wTempTrainerID:: db
wSeenTextPointer:: dw