diff options
author | YamaArashi <shadow962@live.com> | 2015-07-20 18:32:02 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-07-20 18:32:26 -0700 |
commit | fcab935a0f449246380480613ac0896e0b90a0d8 (patch) | |
tree | 60391cf3fa91cc8173d13cc9fd75c050d9898e0c /scripts/silphco9.asm | |
parent | 13e28b0ece7c7888cba792cc6f7219b384213427 (diff) |
enumerate events
Diffstat (limited to 'scripts/silphco9.asm')
-rwxr-xr-x | scripts/silphco9.asm | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index b19dbde4..2c41e019 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -16,8 +16,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld hl, DataTable_5d82e call SilphCo9Script_5d837 call SilphCo9Script_5d863 - ld a, [wd834] - bit 0, a + CheckEvent EVENT_768 jr nz, .asm_5d7f8 push af ld a, $5f @@ -91,28 +90,28 @@ SilphCo9Script_5d837: ; 5d837 (17:5837) ret SilphCo9Script_5d863: ; 5d863 (17:5863) - ld hl, wd834 + EventFlagAddress hl, EVENT_768 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_5d871 - set 0, [hl] + jr nz, .next1 + SetEventReuseHL EVENT_768 ret -.asm_5d871 +.next1 cp $2 - jr nz, .asm_5d878 - set 1, [hl] + jr nz, .next2 + SetEventAfterBranchReuseHL EVENT_769, EVENT_768 ret -.asm_5d878 +.next2 cp $3 - jr nz, .asm_5d87f - set 2, [hl] + jr nz, .next3 + SetEventAfterBranchReuseHL EVENT_76A, EVENT_768 ret -.asm_5d87f +.next3 cp $4 ret nz - set 3, [hl] + SetEventAfterBranchReuseHL EVENT_76B, EVENT_768 ret SilphCo9ScriptPointers: ; 5d885 (17:5885) @@ -128,27 +127,27 @@ SilphCo9TextPointers: ; 5d88b (17:588b) SilphCo9TrainerHeaders: ; 5d893 (17:5893) SilphCo9TrainerHeader0: ; 5d893 (17:5893) - db $2 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_0 db ($4 << 4) ; trainer's view range - dw wd833 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_0 dw SilphCo9BattleText1 ; TextBeforeBattle dw SilphCo9AfterBattleText1 ; TextAfterBattle dw SilphCo9EndBattleText1 ; TextEndBattle dw SilphCo9EndBattleText1 ; TextEndBattle SilphCo9TrainerHeader1: ; 5d89f (17:589f) - db $3 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_1 db ($2 << 4) ; trainer's view range - dw wd833 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_1 dw SilphCo9BattleText2 ; TextBeforeBattle dw SilphCo9AfterBattleText2 ; TextAfterBattle dw SilphCo9EndBattleText2 ; TextEndBattle dw SilphCo9EndBattleText2 ; TextEndBattle SilphCo9TrainerHeader2: ; 5d8ab (17:58ab) - db $4 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_2 db ($4 << 4) ; trainer's view range - dw wd833 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_2 dw SilphCo9BattleText3 ; TextBeforeBattle dw SilphCo9AfterBattleText3 ; TextAfterBattle dw SilphCo9EndBattleText3 ; TextEndBattle @@ -158,8 +157,7 @@ SilphCo9TrainerHeader2: ; 5d8ab (17:58ab) SilphCo9Text1: ; 5d8b8 (17:58b8) TX_ASM - ld a, [wd838] - bit 7, a + CheckEvent EVENT_78F jr nz, .asm_5d8dc ld hl, SilphCo9Text_5d8e5 call PrintText |