summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/battlecenterm.asm4
-rwxr-xr-xscripts/billshouse.asm7
-rwxr-xr-xscripts/copycatshouse2f.asm6
-rwxr-xr-xscripts/mansion1.asm2
-rwxr-xr-xscripts/mansion2.asm2
-rwxr-xr-xscripts/mansion3.asm2
-rwxr-xr-xscripts/mansion4.asm2
-rwxr-xr-xscripts/oakslab.asm7
-rwxr-xr-xscripts/pallettown.asm2
-rwxr-xr-xscripts/pokemontower7.asm2
-rwxr-xr-xscripts/redshouse1f.asm6
-rwxr-xr-xscripts/route11gateupstairs.asm6
-rwxr-xr-xscripts/route12gateupstairs.asm16
-rwxr-xr-xscripts/route15gateupstairs.asm2
-rwxr-xr-xscripts/route16gateupstairs.asm4
-rwxr-xr-xscripts/route18gateupstairs.asm4
-rwxr-xr-xscripts/route22.asm14
-rwxr-xr-xscripts/safarizoneentrance.asm4
-rwxr-xr-xscripts/vermilioncity.asm6
19 files changed, 50 insertions, 48 deletions
diff --git a/scripts/battlecenterm.asm b/scripts/battlecenterm.asm
index 997be7c1..dcb20d83 100755
--- a/scripts/battlecenterm.asm
+++ b/scripts/battlecenterm.asm
@@ -19,14 +19,14 @@ BattleCenterMScript: ; 4fd10 (13:7d10)
ld [hli], a
ld a, $a
ld [hl], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + $19], a
ld a, [$ffaa]
cp $2
ret z
ld a, $7
ld [wSpriteStateData2 + $15], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + $19], a
ret
diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm
index df608de3..1db6934a 100755
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -17,11 +17,11 @@ BillsHouseScript0: ; 1e782 (7:6782)
BillsHouseScript1: ; 1e783 (7:6783)
ld a, [wSpriteStateData1 + 9]
- and a
+ and a ; cp SPRITE_FACING_DOWN
ld de, MovementData_1e79c
- jr nz, .asm_1e78f
+ jr nz, .notDown
ld de, MovementData_1e7a0
-.asm_1e78f
+.notDown
ld a, $1
ld [$ff8c], a
call MoveSprite
@@ -32,6 +32,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
MovementData_1e79c: ; 1e79c (7:679c)
db $40,$40,$40,$FF
+; make Bill walk around the player
MovementData_1e7a0: ; 1e7a0 (7:67a0)
db $C0,$40,$40,$80,$40,$FF
diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm
index 6a9c2236..51a633b1 100755
--- a/scripts/copycatshouse2f.asm
+++ b/scripts/copycatshouse2f.asm
@@ -85,11 +85,11 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe)
CopycatsHouse2FText7: ; 5cd03 (17:4d03)
TX_ASM
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ld hl, CopycatsHouse2FText_5cd1c
- jr nz, .asm_399a4
+ jr nz, .notUp
ld hl, CopycatsHouse2FText_5cd17
-.asm_399a4
+.notUp
call PrintText
jp TextScriptEnd
diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm
index e5c7eb0a..d658b425 100755
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -48,7 +48,7 @@ Mansion1ReplaceBlock: ; 44310 (11:4310)
Mansion1Script_Switches: ; 44316 (11:4316)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm
index 334753df..40827be1 100755
--- a/scripts/mansion2.asm
+++ b/scripts/mansion2.asm
@@ -44,7 +44,7 @@ Mansion2Script_5202f: ; 5202f (14:602f)
Mansion2Script_Switches: ; 52037 (14:6037)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm
index d7c0d6ef..dfecde99 100755
--- a/scripts/mansion3.asm
+++ b/scripts/mansion3.asm
@@ -75,7 +75,7 @@ Mansion3Script_5225b: ; 5225b (14:625b)
Mansion3Script_Switches: ; 5227a (14:627a)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm
index 4f1bd742..c23cb2d7 100755
--- a/scripts/mansion4.asm
+++ b/scripts/mansion4.asm
@@ -46,7 +46,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf)
Mansion4Script_Switches: ; 52420 (14:6420)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index ceb8a761..7c99d802 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -454,6 +454,7 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
ld a, $12
ld [W_OAKSLABCURSCRIPT], a
jr .done
+; make the player keep facing the rival as he walks away
.asm_1ce8c
ld a, [wcf0f]
cp $5
@@ -461,17 +462,17 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
ld a, [W_XCOORD]
cp $4
jr nz, .asm_1cea1
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a
jr .done
.asm_1cea1
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + 9], a
jr .done
.asm_1cea8
cp $4
ret nz
- xor a
+ xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9], a
.done
ret
diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm
index c05b87c1..d625a7be 100755
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -97,7 +97,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
ld a,[wd730]
bit 0,a
ret nz
- xor a
+ xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9],a
ld a,1
ld [wcf0d],a
diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm
index 4462fb78..ab96fd9b 100755
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -69,7 +69,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ld a, HS_POKEMONTOWER_7_MR_FUJI
ld [wcc4d], a
predef HideObject
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a
ld a, LAVENDER_HOUSE_1
ld [H_DOWNARROWBLINKCNT1], a
diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm
index b630fffe..0f5251b8 100755
--- a/scripts/redshouse1f.asm
+++ b/scripts/redshouse1f.asm
@@ -52,11 +52,11 @@ MomHealText2: ; 481c1 (12:41c1)
RedsHouse1FText2: ; 0x481c6 TV
TX_ASM
ld a,[wSpriteStateData1 + 9]
- cp 4
+ cp SPRITE_FACING_UP
ld hl,TVWrongSideText
- jr nz,.done ; if player is not facing up
+ jr nz,.notUp
ld hl,StandByMeText
-.done
+.notUp
call PrintText
jp TextScriptEnd
diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm
index abea062c..eded4165 100755
--- a/scripts/route11gateupstairs.asm
+++ b/scripts/route11gateupstairs.asm
@@ -50,8 +50,8 @@ Route11GateUpstairsText_494a3: ; 494a3 (12:54a3)
Route11GateUpstairsText3: ; 494a8 (12:54a8)
TX_ASM
ld a, [wSpriteStateData1 + 9]
- cp $4
- jp nz, Route12GateUpstairsScript_495c9
+ cp SPRITE_FACING_UP
+ jp nz, GateUpstairsScript_PrintIfFacingUp
ld a, [wd7d8]
bit 7, a ; fought snorlax?
ld hl, BinocularsSnorlaxText
@@ -72,7 +72,7 @@ BinocularsNoSnorlaxText:
Route11GateUpstairsText4: ; 494ce (12:54ce)
TX_ASM
ld hl, Route11GateUpstairsText_494d5
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route11GateUpstairsText_494d5: ; 494d5 (12:54d5)
TX_FAR _Route11GateUpstairsText_494d5
diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm
index 6ec8cfe3..d4e8e983 100755
--- a/scripts/route12gateupstairs.asm
+++ b/scripts/route12gateupstairs.asm
@@ -50,7 +50,7 @@ TM39NoRoomText: ; 495ac (12:55ac)
Route12GateUpstairsText2: ; 495b1 (12:55b1)
TX_ASM
ld hl, Route12GateUpstairsText_495b8
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
TX_FAR _Route12GateUpstairsText_495b8
@@ -59,21 +59,21 @@ Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
Route12GateUpstairsText3: ; 495bd (12:55bd)
TX_ASM
ld hl, Route12GateUpstairsText_495c4
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495c4: ; 495c4 (12:55c4)
TX_FAR _Route12GateUpstairsText_495c4
db "@"
-Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9)
+GateUpstairsScript_PrintIfFacingUp: ; 495c9 (12:55c9)
ld a, [wSpriteStateData1 + 9]
- cp $4
- jr z, .asm_495d4
+ cp SPRITE_FACING_UP
+ jr z, .up
ld a, $1
- jr .asm_495d8
-.asm_495d4
+ jr .done
+.up
call PrintText
xor a
-.asm_495d8
+.done
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm
index 05bcbeea..8969fd74 100755
--- a/scripts/route15gateupstairs.asm
+++ b/scripts/route15gateupstairs.asm
@@ -39,7 +39,7 @@ Route15GateUpstairsText_4968c: ; 4968c (12:568c)
Route15GateUpstairsText2: ; 49691 (12:5691)
TX_ASM
ld hl, Route15GateUpstairsText_49698
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route15GateUpstairsText_49698: ; 49698 (12:5698)
TX_FAR _Route15GateUpstairsText_49698
diff --git a/scripts/route16gateupstairs.asm b/scripts/route16gateupstairs.asm
index 6027d57b..64b43e10 100755
--- a/scripts/route16gateupstairs.asm
+++ b/scripts/route16gateupstairs.asm
@@ -30,7 +30,7 @@ Route16GateUpstairsText_4982f: ; 4982f (12:582f)
Route16GateUpstairsText3: ; 49834 (12:5834)
TX_ASM
ld hl, Route16GateUpstairsText_4983b
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_4983b: ; 4983b (12:583b)
TX_FAR _Route16GateUpstairsText_4983b
@@ -39,7 +39,7 @@ Route16GateUpstairsText_4983b: ; 4983b (12:583b)
Route16GateUpstairsText4: ; 49840 (12:5840)
TX_ASM
ld hl, Route16GateUpstairsText_49847
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_49847: ; 49847 (12:5847)
TX_FAR _Route16GateUpstairsText_49847
diff --git a/scripts/route18gateupstairs.asm b/scripts/route18gateupstairs.asm
index 7fc76eda..4e1014e0 100755
--- a/scripts/route18gateupstairs.asm
+++ b/scripts/route18gateupstairs.asm
@@ -16,7 +16,7 @@ Route18GateUpstairsText1: ; 4997e (12:597e)
Route18GateUpstairsText2: ; 4998c (12:598c)
TX_ASM
ld hl, Route18GateUpstairsText_49993
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_49993: ; 49993 (12:5993)
TX_FAR _Route18GateUpstairsText_49993
@@ -25,7 +25,7 @@ Route18GateUpstairsText_49993: ; 49993 (12:5993)
Route18GateUpstairsText3: ; 49998 (12:5998)
TX_ASM
ld hl, Route18GateUpstairsText_4999f
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_4999f: ; 4999f (12:599f)
TX_FAR _Route18GateUpstairsText_4999f
diff --git a/scripts/route22.asm b/scripts/route22.asm
index 88f69bea..7d70924b 100755
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -148,13 +148,13 @@ Route22Script2: ; 50fb5 (14:4fb5)
cp $ff
jp z, Route22Script_50ece
ld a, [wSpriteStateData1 + 9]
- and a
- jr nz, .asm_50fc7
- ld a, $4
- jr .asm_50fc9
-.asm_50fc7
- ld a, $c
-.asm_50fc9
+ and a ; cp SPRITE_FACING_DOWN
+ jr nz, .notDown
+ ld a, SPRITE_FACING_UP
+ jr .done
+.notDown
+ ld a, SPRITE_FACING_RIGHT
+.done
ld [$ff8d], a
ld a, $1
ld [$ff8c], a
diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm
index 6b9029f6..b64868e5 100755
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -24,7 +24,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld [wJoyIgnore], a
xor a
ld [hJoyHeld], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a
ld a, [wWhichTrade]
cp $1
@@ -247,7 +247,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.asm_7539c
ld hl, .SafariZoneEntranceText_753c0
call PrintText
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a
ld a, $40
ld c, $1
diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm
index 9fd05776..0f71a4d0 100755
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -40,7 +40,7 @@ VermilionCityScriptPointers: ; 197dc (6:57dc)
VermilionCityScript0: ; 197e6 (6:57e6)
ld a, [wSpriteStateData1 + 9]
- and a
+ and a ; cp SPRITE_FACING_DOWN
ret nz
ld hl, CoordsData_19823
call ArePlayerCoordsInArray
@@ -54,7 +54,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)
ld a, [wd803]
bit 2, a
jr nz, .asm_19810
- ld b, $3f
+ ld b, S_S__TICKET
predef IsItemInBag_
ld a, b
and a
@@ -162,7 +162,7 @@ VermilionCityText3: ; 198b1 (6:58b1)
bit 2, a
jr nz, .asm_198f6
ld a, [wSpriteStateData1 + 9]
- cp $c
+ cp SPRITE_FACING_RIGHT
jr z, .asm_198c8
ld hl, VermilionCityCoords1
call ArePlayerCoordsInArray