From fcab935a0f449246380480613ac0896e0b90a0d8 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 20 Jul 2015 18:32:02 -0700 Subject: enumerate events --- scripts/fanclub.asm | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'scripts/fanclub.asm') diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index 79621fce..45298c0b 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -3,8 +3,7 @@ FanClubScript: ; 59b70 (16:5b70) FanClubBikeInBag: ; check if any bike paraphernalia in bag - ld a, [wd771] - bit 1, a ; got bike voucher? + CheckEvent EVENT_GOT_BIKE_VOUCHER ret nz ld b, BICYCLE call IsItemInBag @@ -25,19 +24,16 @@ FanClubTextPointers: ; 59b84 (16:5b84) FanClubText1: ; pikachu fan TX_ASM - ld a, [wd771] - bit 7, a + CheckEvent EVENT_157 jr nz, .mineisbetter ld hl, .normaltext call PrintText - ld hl, wd771 - set 6, [hl] + SetEvent EVENT_156 jr .done .mineisbetter ld hl, .bettertext call PrintText - ld hl, wd771 - res 7, [hl] + ResetEvent EVENT_157 .done jp TextScriptEnd @@ -52,19 +48,16 @@ FanClubText1: FanClubText2: ; seel fan TX_ASM - ld a, [wd771] - bit 6, a + CheckEvent EVENT_156 jr nz, .mineisbetter ld hl, .normaltext call PrintText - ld hl, wd771 - set 7, [hl] + SetEvent EVENT_157 jr .done .mineisbetter ld hl, .bettertext call PrintText - ld hl, wd771 - res 6, [hl] + ResetEvent EVENT_156 .done jp TextScriptEnd @@ -125,8 +118,7 @@ FanClubText5: jr nc, .BagFull ld hl, .receivedvouchertext call PrintText - ld hl, wd771 - set 1, [hl] + SetEvent EVENT_GOT_BIKE_VOUCHER jr .done .BagFull ld hl, .bagfulltext -- cgit v1.2.3 From 73171bfff573fa8900563319c014f3e626db6b3e Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Tue, 21 Jul 2015 10:36:03 -0700 Subject: named most of the used events --- scripts/fanclub.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/fanclub.asm') diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index 45298c0b..adde809f 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -24,16 +24,16 @@ FanClubTextPointers: ; 59b84 (16:5b84) FanClubText1: ; pikachu fan TX_ASM - CheckEvent EVENT_157 + CheckEvent EVENT_PIKACHU_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - SetEvent EVENT_156 + SetEvent EVENT_SEEL_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ResetEvent EVENT_157 + ResetEvent EVENT_PIKACHU_FAN_BOAST .done jp TextScriptEnd @@ -48,16 +48,16 @@ FanClubText1: FanClubText2: ; seel fan TX_ASM - CheckEvent EVENT_156 + CheckEvent EVENT_SEEL_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - SetEvent EVENT_157 + SetEvent EVENT_PIKACHU_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ResetEvent EVENT_156 + ResetEvent EVENT_SEEL_FAN_BOAST .done jp TextScriptEnd -- cgit v1.2.3