summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/events.asm8
-rw-r--r--engine/map_objects.asm20
-rw-r--r--engine/map_setup.asm2
-rw-r--r--engine/predef.asm2
-rw-r--r--engine/scripting.asm14
5 files changed, 23 insertions, 23 deletions
diff --git a/engine/events.asm b/engine/events.asm
index 3fedf691d..cf8b4e647 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -121,7 +121,7 @@ StartMap: ; 96724
xor a
ld [ScriptRunning], a
ld hl, MapStatus
- ld bc, $3e
+ ld bc, $3e ; 62
call ByteFill
callba Function113e5
call ClearJoypad
@@ -137,13 +137,13 @@ EnterMap: ; 9673e
callba RunMapSetupScript
call ClearAllScriptFlags3
- ld a, [$ff9f]
+ ld a, [hMapEntryMethod]
cp $f7
jr nz, .dontset
call SetAll_ScriptFlags3
.dontset
- ld a, [$ff9f]
+ ld a, [hMapEntryMethod]
cp $f3
jr nz, .dontresetpoison
xor a
@@ -151,7 +151,7 @@ EnterMap: ; 9673e
.dontresetpoison
xor a
- ld [$ff9f], a
+ ld [hMapEntryMethod], a
ld a, 2 ; HandleMap
ld [MapStatus], a
ret
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index 888952ab8..d9282d965 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -1499,7 +1499,7 @@ Function4af0: ; 4af0
add hl, bc
ld [hl], 2
ld hl, wd4cf
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
cp [hl]
jr z, .ok
ld hl, OBJECT_09
@@ -2508,7 +2508,7 @@ Function54b8: ; 54b8
ret z
ld a, [wd4cd]
ld d, a
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
cp d
ret nz
ld a, e
@@ -2651,7 +2651,7 @@ Function5565: ; 5565
Function5579: ; 5579
push bc
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
ld c, a
call Function5582
pop bc
@@ -2712,7 +2712,7 @@ Function55b9: ; 55b9
ld [hli], a
ld a, [de]
ld [hli], a
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
ld [hli], a
push hl
ld hl, OBJECT_MAP_X
@@ -2737,7 +2737,7 @@ Function55e0:: ; 55e0
ld bc, ObjectStructs
xor a
.loop
- ld [$ffaf], a
+ ld [hConnectionStripLength], a
call GetObjectSprite
jr z, .ok
call Function565c
@@ -2747,7 +2747,7 @@ Function55e0:: ; 55e0
add hl, bc
ld b, h
ld c, l
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
inc a
cp NUM_OBJECT_STRUCTS
jr nz, .loop
@@ -2801,13 +2801,13 @@ Function5645: ; 5645
xor a
ld bc, ObjectStructs
.loop
- ld [$ffaf], a
+ ld [hConnectionStripLength], a
call Function5680
ld hl, OBJECT_STRUCT_LENGTH
add hl, bc
ld b, h
ld c, l
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
inc a
cp NUM_OBJECT_STRUCTS
jr nz, .loop
@@ -3032,7 +3032,7 @@ Function5781: ; 5781
ld bc, ObjectStructs
xor a
.loop
- ld [$ffaf], a
+ ld [hConnectionStripLength], a
call GetObjectSprite
jr z, .next
call Function437b
@@ -3042,7 +3042,7 @@ Function5781: ; 5781
add hl, bc
ld b, h
ld c, l
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
inc a
cp NUM_OBJECT_STRUCTS
jr nz, .loop
diff --git a/engine/map_setup.asm b/engine/map_setup.asm
index 9ac712872..f89d68a19 100644
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -1,6 +1,6 @@
RunMapSetupScript:: ; 15363
- ld a, [$ff9f]
+ ld a, [hMapEntryMethod]
and $f
dec a
ld c, a
diff --git a/engine/predef.asm b/engine/predef.asm
index 9ee46bf47..47bc2528a 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -36,7 +36,7 @@ PredefPointers:: ; 856b
add_predef FlagPredef
add_predef Functionc699
add_predef FillPP
- add_predef Functiond88c
+ add_predef TryAddMonToParty
add_predef Functionda96
add_predef Functiondb3f ; $8
add_predef SentPkmnIntoBox
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 3ef1c3853..f5e1347b8 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1258,7 +1258,7 @@ Script_appear: ; 0x972dd
call GetScriptByte
call GetScriptPerson
call _CopyObjectStruct
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
ld b, 0 ; clear
call ApplyEventActionAppearDisappear
ret
@@ -1276,7 +1276,7 @@ Script_disappear: ; 0x972ee
ld a, [hLastTalked]
.ok
call DeleteObjectStruct
- ld a, [$ffaf]
+ ld a, [hConnectionStripLength]
ld b, 1 ; set
call ApplyEventActionAppearDisappear
callba RefreshMapAppearDisappear
@@ -1584,7 +1584,7 @@ Script_reloadmap: ; 0x97491
xor a
ld [wd459], a
ld a, $f3
- ld [$ff9f], a
+ ld [hMapEntryMethod], a
ld a, $1
call LoadMapStatus
call StopScript
@@ -2839,7 +2839,7 @@ Script_warp: ; 0x97a1d
ld a, -1
ld [wd001], a
ld a, -15
- ld [$ff9f], a
+ ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
call StopScript
@@ -2851,7 +2851,7 @@ Script_warp: ; 0x97a1d
ld a, -1
ld [wd001], a
ld a, -5
- ld [$ff9f], a
+ ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
call StopScript
@@ -2994,7 +2994,7 @@ Script_newloadmap: ; 0x97b08
; which_method (SingleByteParam)
call GetScriptByte
- ld [$ff9f], a
+ ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
call StopScript
@@ -3198,7 +3198,7 @@ Script_halloffame: ; 0x97bd5
Script_credits: ; 0x97bf3
; script command 0xa2
- callba Function86455
+ callba RedCredits
; fallthrough
DisplayCredits: