summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 22:11:35 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 22:22:09 -0400
commit6ef36800b0dcb86100a7c716172015667e60dc99 (patch)
tree7e381171a7f42cadb6e619c839bfc4d3eb88e7d1 /scripts
parent35deb771130a9012ee4494b1db097761f2fe2919 (diff)
Replace raw hex values with HRAM constants
To do: turn constants into labels and use ldh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/BikeShop.asm2
-rwxr-xr-xscripts/BillsHouse.asm8
-rwxr-xr-xscripts/CinnabarGym.asm4
-rwxr-xr-xscripts/CopycatsHouse2F.asm2
-rwxr-xr-xscripts/OaksLab.asm8
-rwxr-xr-xscripts/PewterCity.asm16
-rwxr-xr-xscripts/Route5Gate.asm4
-rwxr-xr-xscripts/Route6Gate.asm2
-rwxr-xr-xscripts/Route7Gate.asm2
-rwxr-xr-xscripts/Route8Gate.asm2
-rwxr-xr-xscripts/SSAnne2F.asm4
-rwxr-xr-xscripts/SSAnneCaptainsRoom.asm2
-rwxr-xr-xscripts/SilphCo10F.asm2
-rwxr-xr-xscripts/SilphCo11F.asm8
-rwxr-xr-xscripts/SilphCo2F.asm8
-rwxr-xr-xscripts/SilphCo3F.asm2
-rwxr-xr-xscripts/SilphCo4F.asm8
-rwxr-xr-xscripts/SilphCo5F.asm2
-rwxr-xr-xscripts/SilphCo6F.asm2
-rwxr-xr-xscripts/SilphCo7F.asm8
-rwxr-xr-xscripts/SilphCo8F.asm8
-rwxr-xr-xscripts/SilphCo9F.asm8
-rwxr-xr-xscripts/ViridianCity.asm32
-rwxr-xr-xscripts/WardensHouse.asm2
24 files changed, 73 insertions, 73 deletions
diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm
index 71149759..2661ca70 100755
--- a/scripts/BikeShop.asm
+++ b/scripts/BikeShop.asm
@@ -23,7 +23,7 @@ BikeShopText1:
call GiveItem
jr nc, .BagFull
ld a, BIKE_VOUCHER
- ld [$ffdb], a
+ ld [hItemToRemoveID], a
callba RemoveItemByID
SetEvent EVENT_GOT_BICYCLE
ld hl, BikeShopText_1d824
diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm
index 0c8ca4de..395694a3 100755
--- a/scripts/BillsHouse.asm
+++ b/scripts/BillsHouse.asm
@@ -66,13 +66,13 @@ BillsHouseScript3:
ld a, $2
ld [wSpriteIndex], a
ld a, $c
- ld [$ffeb], a
+ ld [hSpriteScreenYCoord], a
ld a, $40
- ld [$ffec], a
+ ld [hSpriteScreenXCoord], a
ld a, $6
- ld [$ffed], a
+ ld [hSpriteMapYCoord], a
ld a, $5
- ld [$ffee], a
+ ld [hSpriteMapXCoord], a
call SetSpritePosition1
ld a, HS_BILL_1
ld [wMissableObjectIndex], a
diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm
index 1e92505a..08bbbe8b 100755
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -96,7 +96,7 @@ CinnabarGymScript2:
cp $ff
jp z, CinnabarGymScript_75792
ld a, [wTrainerHeaderFlagBit]
- ld [$ffdb], a
+ ld [hGymGateIndex], a
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
ld c, a
ld b, FLAG_TEST
@@ -111,7 +111,7 @@ CinnabarGymScript2:
call WaitForSoundToFinish
.asm_7581b
ld a, [wTrainerHeaderFlagBit]
- ld [$ffdb], a
+ ld [hGymGateIndex], a
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
ld c, a
ld b, FLAG_SET
diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm
index b43234c3..64612535 100755
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -29,7 +29,7 @@ CopycatsHouse2FText1:
ld hl, ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
- ld [$ffdb], a
+ ld [hItemToRemoveID], a
callba RemoveItemByID
SetEvent EVENT_GOT_TM31
jr .asm_62ecd
diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm
index a0383246..9bb84923 100755
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -672,9 +672,9 @@ OaksLabScript_RemoveParcel:
OaksLabScript_1d02b:
ld a, $7c
- ld [$ffeb], a
+ ld [hSpriteScreenYCoord], a
ld a, $8
- ld [$ffee], a
+ ld [hSpriteMapXCoord], a
ld a, [wYCoord]
cp $3
jr nz, .asm_1d045
@@ -703,9 +703,9 @@ OaksLabScript_1d02b:
.asm_1d066
ld a, $20
.asm_1d068
- ld [$ffec], a
+ ld [hSpriteScreenXCoord], a
ld a, b
- ld [$ffed], a
+ ld [hSpriteMapYCoord], a
ld a, $1
ld [wSpriteIndex], a
call SetSpritePosition1
diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm
index 1b658242..86037c13 100755
--- a/scripts/PewterCity.asm
+++ b/scripts/PewterCity.asm
@@ -58,13 +58,13 @@ PewterCityScript1:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
- ld [$ffeb], a
+ ld [hSpriteScreenYCoord], a
ld a, $30
- ld [$ffec], a
+ ld [hSpriteScreenXCoord], a
ld a, $c
- ld [$ffed], a
+ ld [hSpriteMapYCoord], a
ld a, $11
- ld [$ffee], a
+ ld [hSpriteMapXCoord], a
ld a, $3
ld [wSpriteIndex], a
call SetSpritePosition1
@@ -126,13 +126,13 @@ PewterCityScript4:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
- ld [$ffeb], a
+ ld [hSpriteScreenYCoord], a
ld a, $40
- ld [$ffec], a
+ ld [hSpriteScreenXCoord], a
ld a, $16
- ld [$ffed], a
+ ld [hSpriteMapYCoord], a
ld a, $10
- ld [$ffee], a
+ ld [hSpriteMapXCoord], a
ld a, $5
ld [wSpriteIndex], a
call SetSpritePosition1
diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm
index bc763dfd..e5d86b97 100755
--- a/scripts/Route5Gate.asm
+++ b/scripts/Route5Gate.asm
@@ -27,7 +27,7 @@ Route5GateScript0:
xor a
ld [hJoyHeld], a
callba RemoveGuardDrink
- ld a, [$ffdb]
+ ld a, [hItemToRemoveID]
and a
jr nz, .asm_1df82
ld a, $2
@@ -74,7 +74,7 @@ Route5GateText1:
bit 6, a
jr nz, .asm_88856
callba RemoveGuardDrink
- ld a, [$ffdb]
+ ld a, [hItemToRemoveID]
and a
jr nz, .asm_768a2
ld hl, Route5GateText2
diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm
index 348f61ac..6b00eddb 100755
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -21,7 +21,7 @@ Route6GateScript0:
xor a
ld [hJoyHeld], a
callba RemoveGuardDrink
- ld a, [$ffdb]
+ ld a, [hItemToRemoveID]
and a
jr nz, .asm_1e080
ld a, $2
diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm
index 724172c5..06c5c91b 100755
--- a/scripts/Route7Gate.asm
+++ b/scripts/Route7Gate.asm
@@ -33,7 +33,7 @@ Route7GateScript0:
xor a
ld [hJoyHeld], a
callba RemoveGuardDrink
- ld a, [$ffdb]
+ ld a, [hItemToRemoveID]
and a
jr nz, .asm_1e15a
ld a, $2
diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm
index 8ecea68e..80b8b9a4 100755
--- a/scripts/Route8Gate.asm
+++ b/scripts/Route8Gate.asm
@@ -32,7 +32,7 @@ Route8GateScript0:
xor a
ld [hJoyHeld], a
callba RemoveGuardDrink
- ld a, [$ffdb]
+ ld a, [hItemToRemoveID]
and a
jr nz, .asm_1e220
ld a, $2
diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm
index 203e9711..face08d8 100755
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -31,7 +31,7 @@ SSAnne2Script0:
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, [wCoordIndex]
- ld [$ffdb], a
+ ld [hSavedCoordIndex], a
ld a, HS_SS_ANNE_2F_RIVAL
ld [wMissableObjectIndex], a
predef ShowObject
@@ -43,7 +43,7 @@ SSAnne2Script0:
ld [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
- ld a, [$ffdb]
+ ld a, [hSavedCoordIndex]
cp $2
jr nz, .asm_61400
ld de, MovementData_6140c
diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm
index 5723c32d..6078ccf0 100755
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -51,7 +51,7 @@ SSAnne7RubText:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- ld a, Bank(Music_PkmnHealed)
+ ld a, BANK(Music_PkmnHealed)
ld [wAudioROMBank], a
.asm_61908
ld a, MUSIC_PKMN_HEALED
diff --git a/scripts/SilphCo10F.asm b/scripts/SilphCo10F.asm
index 40506682..92d95de1 100755
--- a/scripts/SilphCo10F.asm
+++ b/scripts/SilphCo10F.asm
@@ -28,7 +28,7 @@ SilphCo10GateCoords:
db $FF
SilphCo10Text_5a176:
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm
index 2f9d7924..116b528f 100755
--- a/scripts/SilphCo11F.asm
+++ b/scripts/SilphCo11F.asm
@@ -35,14 +35,14 @@ SilphCo11Script_62137:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_62143
ld a, [hli]
cp $ff
jr z, .asm_6215f
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -60,11 +60,11 @@ SilphCo11Script_62137:
ret
.asm_6215f
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo11Script_62163:
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
diff --git a/scripts/SilphCo2F.asm b/scripts/SilphCo2F.asm
index 5fd542cb..0ff7cee3 100755
--- a/scripts/SilphCo2F.asm
+++ b/scripts/SilphCo2F.asm
@@ -45,14 +45,14 @@ SilphCo2Script_59d43:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_59d4f
ld a, [hli]
cp $ff
jr z, .asm_59d6b
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -70,12 +70,12 @@ SilphCo2Script_59d43:
ret
.asm_59d6b
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo2Script_59d6f:
EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm
index 42b5d611..3b6b1da8 100755
--- a/scripts/SilphCo3F.asm
+++ b/scripts/SilphCo3F.asm
@@ -39,7 +39,7 @@ SilphCo3GateCoords:
SilphCo3Script_59fad:
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/SilphCo4F.asm b/scripts/SilphCo4F.asm
index 7d5072f6..61288277 100755
--- a/scripts/SilphCo4F.asm
+++ b/scripts/SilphCo4F.asm
@@ -45,14 +45,14 @@ SilphCo4Script_19d5d:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_19d69
ld a, [hli]
cp $ff
jr z, .asm_19d85
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -70,12 +70,12 @@ SilphCo4Script_19d5d:
ret
.asm_19d85
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo4Script_19d89:
EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/SilphCo5F.asm b/scripts/SilphCo5F.asm
index d9deda5b..39d7235b 100755
--- a/scripts/SilphCo5F.asm
+++ b/scripts/SilphCo5F.asm
@@ -49,7 +49,7 @@ SilphCo5GateCoords:
SilphCo5Script_19f9e:
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/SilphCo6F.asm b/scripts/SilphCo6F.asm
index ddbcba79..9e6ffaf1 100755
--- a/scripts/SilphCo6F.asm
+++ b/scripts/SilphCo6F.asm
@@ -28,7 +28,7 @@ SilphCo6GateCoords:
db $FF
SilphCo6Script_1a1e6:
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm
index 97dd09ea..4966bba6 100755
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -55,14 +55,14 @@ SilphCo7Text_51bc8:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_51bd4
ld a, [hli]
cp $ff
jr z, .asm_51bf0
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -80,12 +80,12 @@ SilphCo7Text_51bc8:
ret
.asm_51bf0
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo7Text_51bf4:
EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/SilphCo8F.asm b/scripts/SilphCo8F.asm
index ce6579f7..b1c32a34 100755
--- a/scripts/SilphCo8F.asm
+++ b/scripts/SilphCo8F.asm
@@ -35,14 +35,14 @@ SilphCo8Script_56541:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_5654d
ld a, [hli]
cp $ff
jr z, .asm_56569
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -60,11 +60,11 @@ SilphCo8Script_56541:
ret
.asm_56569
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo8Script_5656d:
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR
diff --git a/scripts/SilphCo9F.asm b/scripts/SilphCo9F.asm
index 66291e98..d9fdc625 100755
--- a/scripts/SilphCo9F.asm
+++ b/scripts/SilphCo9F.asm
@@ -65,14 +65,14 @@ SilphCo9Script_5d837:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
pop hl
.asm_5d843
ld a, [hli]
cp $ff
jr z, .asm_5d85f
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -90,12 +90,12 @@ SilphCo9Script_5d837:
ret
.asm_5d85f
xor a
- ld [$ffe0], a
+ ld [hUnlockedSilphCoDoors], a
ret
SilphCo9Script_5d863:
EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ld a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm
index 643431a4..c3eb9a79 100755
--- a/scripts/ViridianCity.asm
+++ b/scripts/ViridianCity.asm
@@ -59,14 +59,14 @@ ViridianCityScript_1903d:
ret
ViridianCityScript1:
- ld a, [wSpriteStateData1 + $34]
- ld [$ffeb], a
- ld a, [wSpriteStateData1 + $36]
- ld [$ffec], a
- ld a, [wSpriteStateData2 + $34]
- ld [$ffed], a
- ld a, [wSpriteStateData2 + $35]
- ld [$ffee], a
+ ld a, [wSprite03StateData1YPixels]
+ ld [hSpriteScreenYCoord], a
+ ld a, [wSprite03StateData1XPixels]
+ ld [hSpriteScreenXCoord], a
+ ld a, [wSprite03StateData2MapY]
+ ld [hSpriteMapYCoord], a
+ ld a, [wSprite03StateData2MapX]
+ ld [hSpriteMapXCoord], a
xor a
ld [wListScrollOffset], a
@@ -82,14 +82,14 @@ ViridianCityScript1:
ret
ViridianCityScript2:
- ld a, [$ffeb]
- ld [wSpriteStateData1 + $34], a
- ld a, [$ffec]
- ld [wSpriteStateData1 + $36], a
- ld a, [$ffed]
- ld [wSpriteStateData2 + $34], a
- ld a, [$ffee]
- ld [wSpriteStateData2 + $35], a
+ ld a, [hSpriteScreenYCoord]
+ ld [wSprite03StateData1YPixels], a
+ ld a, [hSpriteScreenXCoord]
+ ld [wSprite03StateData1XPixels], a
+ ld a, [hSpriteMapYCoord]
+ ld [wSprite03StateData2MapY], a
+ ld a, [hSpriteMapXCoord]
+ ld [wSprite03StateData2MapX], a
call UpdateSprites
call Delay3
xor a
diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm
index e6ca47b2..015d137f 100755
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -32,7 +32,7 @@ FuchsiaHouse2Text1:
ld hl, WardenTeethText1
call PrintText
ld a, GOLD_TEETH
- ld [$ffdb], a
+ ld [hItemToRemoveID], a
callba RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
.asm_60cba