summaryrefslogtreecommitdiff
path: root/scripts/lance.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-20 18:32:02 -0700
committerYamaArashi <shadow962@live.com>2015-07-20 18:32:26 -0700
commitfcab935a0f449246380480613ac0896e0b90a0d8 (patch)
tree60391cf3fa91cc8173d13cc9fd75c050d9898e0c /scripts/lance.asm
parent13e28b0ece7c7888cba792cc6f7219b384213427 (diff)
enumerate events
Diffstat (limited to 'scripts/lance.asm')
-rwxr-xr-xscripts/lance.asm17
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/lance.asm b/scripts/lance.asm
index 80780cd1..9d3a2f99 100755
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -13,8 +13,7 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4)
bit 5, [hl]
res 5, [hl]
ret z
- ld a, [wd866]
- bit 7, a
+ CheckEvent EVENT_8FF
jr nz, .asm_5a2da
ld a, $31
ld b, $32
@@ -52,8 +51,7 @@ LanceScript4: ; 5a304 (16:6304)
ret
LanceScript0: ; 5a305 (16:6305)
- ld a, [wd866]
- bit 6, a
+ CheckEvent EVENT_8FE
ret nz
ld hl, CoordsData_5a33e
call ArePlayerCoordsInArray
@@ -69,9 +67,7 @@ LanceScript0: ; 5a305 (16:6305)
.asm_5a325
cp $5
jr z, LanceScript_5a35b
- ld hl, wd866
- bit 7, [hl]
- set 7, [hl]
+ CheckAndSetEvent EVENT_8FF
ret nz
ld hl, wd126
set 5, [hl]
@@ -133,9 +129,9 @@ LanceTextPointers: ; 5a395 (16:6395)
LanceTrainerHeaders: ; 5a397 (16:6397)
LanceTrainerHeader0: ; 5a397 (16:6397)
- db $1 ; flag's bit
+ dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range
- dw wd866 ; flag's byte
+ dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0
dw LanceBeforeBattleText ; TextBeforeBattle
dw LanceAfterBattleText ; TextAfterBattle
dw LanceEndBattleText ; TextEndBattle
@@ -160,6 +156,5 @@ LanceEndBattleText: ; 5a3b3 (16:63b3)
LanceAfterBattleText: ; 5a3b8 (16:63b8)
TX_FAR _LanceAfterBattleText
TX_ASM
- ld hl, wd866
- set 6, [hl]
+ SetEvent EVENT_8FE
jp TextScriptEnd