diff options
author | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-22 10:24:00 -0500 |
---|---|---|
committer | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-22 10:24:00 -0500 |
commit | c34156c5fb333864c1ae85036ea587c9f615a65a (patch) | |
tree | 70a98bceda2ec783da896bf3eb4efd1b0861c2a3 /scripts/lance.asm | |
parent | a6f04b434980f2176cb275a7c3ba50d5cbcd6ace (diff) | |
parent | dcc7f3bc9f41f2d5e0f7448b4688c1058da0040b (diff) |
Merge pull request #107 from YamaArashi/master
enumerate events
Diffstat (limited to 'scripts/lance.asm')
-rwxr-xr-x | scripts/lance.asm | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/lance.asm b/scripts/lance.asm index 80780cd1..4d0072be 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_LANCES_ROOM_LOCK_DOOR 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_BEAT_LANCE 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_LANCES_ROOM_LOCK_DOOR 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_BEAT_LANCE jp TextScriptEnd |