summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/events.asm6
-rw-r--r--engine/map_objects.asm2
-rw-r--r--engine/phone_scripts.asm6
-rw-r--r--engine/scripting.asm62
-rw-r--r--engine/std_scripts.asm10
5 files changed, 43 insertions, 43 deletions
diff --git a/engine/events.asm b/engine/events.asm
index 5849d6774..ae28e0c38 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -611,9 +611,9 @@ TryObjectEvent: ; 969b5
ld hl, OBJECT_MAP_OBJECT_INDEX
add hl, bc
ld a, [hl]
- ld [$ffe0], a
+ ld [hLastTalked], a
- ld a, [$ffe0]
+ ld a, [hLastTalked]
call GetMapObject
ld hl, MAPOBJECT_COLOR
add hl, bc
@@ -1094,7 +1094,7 @@ WarpToNewMapScript: ; 96c34
FallIntoMapScript: ; 96c38
newloadmap $f6
playsound SFX_KINESIS
- applymovement $0, MovementData_0x96c48
+ applymovement PLAYER, MovementData_0x96c48
playsound SFX_STRENGTH
scall UnknownScript_0x96c4a
end
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index 6cbdc87aa..28fadfd1a 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -2761,7 +2761,7 @@ Function5602: ; 5602
ld a, [wd459]
bit 7, a
jr z, .ok
- ld a, [$ffe0]
+ ld a, [hLastTalked]
and a
jr z, .ok
call Function5629
diff --git a/engine/phone_scripts.asm b/engine/phone_scripts.asm
index 9aba26450..597ee8372 100644
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -3167,11 +3167,11 @@ TalkToTrainerScript:: ; 0xbe66a
SeenByTrainerScript:: ; 0xbe675
loadtrainerdata
playrammusic
- showemote EMOTE_SHOCK, -2, 30
+ showemote EMOTE_SHOCK, LAST_TALKED, 30
callasm Function831e
applymovement2 MovementBuffer
- writepersonxy -2
- faceperson $0, -2
+ writepersonxy LAST_TALKED
+ faceperson PLAYER, LAST_TALKED
jump StartBattleWithMapTrainerScript
; 0xbe68a
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 709a75c25..65cf74b85 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1046,7 +1046,7 @@ Script_cry: ; 0x971d1
GetScriptPerson: ; 0x971e3
and a
ret z
- cp $fe
+ cp LAST_TALKED
ret z
dec a
ret
@@ -1059,7 +1059,7 @@ Script_setlasttalked: ; 0x971ea
call GetScriptByte
call GetScriptPerson
- ld [$ffe0], a
+ ld [hLastTalked], a
ret
; 0x971f3
@@ -1106,7 +1106,7 @@ Script_applymovement2: ; 0x97228
; parameters:
; data (MovementPointerLabelParam)
- ld a, [$ffe0]
+ ld a, [hLastTalked]
ld c, a
jp ApplyMovement
; 0x9722e
@@ -1114,11 +1114,11 @@ Script_applymovement2: ; 0x97228
Script_faceplayer: ; 0x9722e
; script command 0x6b
- ld a, [$ffe0]
+ ld a, [hLastTalked]
and a
ret z
ld d, $0
- ld a, [$ffe0]
+ ld a, [hLastTalked]
ld e, a
callba GetRelativeFacing
ld a, d
@@ -1126,7 +1126,7 @@ rept 2
add a
endr
ld e, a
- ld a, [$ffe0]
+ ld a, [hLastTalked]
ld d, a
call ApplyPersonFacing
ret
@@ -1140,17 +1140,17 @@ Script_faceperson: ; 0x97248
call GetScriptByte
call GetScriptPerson
- cp $fe
- jr c, .asm_97254 ; 0x97250 $2
- ld a, [$ffe0]
-.asm_97254
+ cp LAST_TALKED
+ jr c, .ok
+ ld a, [hLastTalked]
+.ok
ld e, a
call GetScriptByte
call GetScriptPerson
- cp $fe
- jr nz, .asm_97261 ; 0x9725d $2
- ld a, [$ffe0]
-.asm_97261
+ cp LAST_TALKED
+ jr nz, .ok2
+ ld a, [hLastTalked]
+.ok2
ld d, a
push de
callba GetRelativeFacing
@@ -1174,10 +1174,10 @@ Script_spriteface: ; 0x97274
call GetScriptByte
call GetScriptPerson
- cp $fe
- jr nz, .asm_97280 ; 0x9727c $2
- ld a, [$ffe0]
-.asm_97280
+ cp LAST_TALKED
+ jr nz, .ok
+ ld a, [hLastTalked]
+.ok
ld d, a
call GetScriptByte
rept 2
@@ -1271,10 +1271,10 @@ Script_disappear: ; 0x972ee
call GetScriptByte
call GetScriptPerson
- cp -2
- jr nz, .skip ; 0x972f6 $2
- ld a, [$ffe0]
-.skip
+ cp LAST_TALKED
+ jr nz, .ok
+ ld a, [hLastTalked]
+.ok
call DeleteObjectStruct
ld a, [$ffaf]
ld b, 1 ; set
@@ -1354,10 +1354,10 @@ Script_writepersonxy: ; 0x9735b
call GetScriptByte
call GetScriptPerson
- cp $fe
- jr nz, .asm_97367 ; 0x97363 $2
- ld a, [$ffe0]
-.asm_97367
+ cp LAST_TALKED
+ jr nz, .ok
+ ld a, [hLastTalked]
+.ok
ld b, a
callba Function80a1
ret
@@ -1405,10 +1405,10 @@ Script_showemote: ; 0x97396
ld [ScriptVar], a
call GetScriptByte
call GetScriptPerson
- cp $fe
- jr z, .asm_973a8 ; 0x973a4 $2
- ld [$ffe0], a
-.asm_973a8
+ cp LAST_TALKED
+ jr z, .ok
+ ld [hLastTalked], a
+.ok
call GetScriptByte
ld [ScriptDelay], a
ld b, BANK(ShowEmoteScript)
@@ -1454,7 +1454,7 @@ Script_earthquake: ; 0x973c7
; 0x973e6
UnknownScript_0x973e6: ; 973e6
- applymovement $0, wd002
+ applymovement PLAYER, wd002
end
; 973eb
diff --git a/engine/std_scripts.asm b/engine/std_scripts.asm
index aa0b879a7..7656cf184 100644
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -108,7 +108,7 @@ PokeCenterNurseScript:
farwritetext UnknownText_0x1b01bd
pause 20
special Mobile_HealParty
- spriteface $fe, LEFT
+ spriteface LAST_TALKED, LEFT
pause 10
special HealParty
playmusic MUSIC_NONE
@@ -116,7 +116,7 @@ PokeCenterNurseScript:
special HealMachineAnim
pause 30
special RestartMapMusic
- spriteface $fe, DOWN
+ spriteface LAST_TALKED, DOWN
pause 10
checkphonecall ; elm already called about pokerus
@@ -133,9 +133,9 @@ PokeCenterNurseScript:
.done
farwritetext UnknownText_0x1b020b
- spriteface $fe, UP
+ spriteface LAST_TALKED, UP
pause 10
- spriteface $fe, DOWN
+ spriteface LAST_TALKED, DOWN
pause 10
closetext
@@ -308,7 +308,7 @@ BugContestResultsWarpScript:
clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
warp GROUP_ROUTE_36_NATIONAL_PARK_GATE, MAP_ROUTE_36_NATIONAL_PARK_GATE, $0, $4
- applymovement $0, Movement_ContestResults_WalkAfterWarp
+ applymovement PLAYER, Movement_ContestResults_WalkAfterWarp
BugContestResultsScript:
clearflag ENGINE_BUG_CONTEST_TIMER