summaryrefslogtreecommitdiff
path: root/scripts/mansion1.asm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mansion1.asm')
-rwxr-xr-xscripts/mansion1.asm13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm
index a9e2616a..7d349276 100755
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -13,8 +13,7 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
bit 5, [hl]
res 5, [hl]
ret z
- ld a, [wd796]
- bit 0, a
+ CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .asm_442ec
ld bc, $060c
call Mansion1Script_4430b
@@ -69,9 +68,9 @@ Mansion1TextPointers: ; 4432c (11:432c)
Mansion1TrainerHeaders: ; 44334 (11:4334)
Mansion1TrainerHeader0: ; 44334 (11:4334)
- db $1 ; flag's bit
+ dbEventFlagBit EVENT_BEAT_MANSION_1_TRAINER_0
db ($3 << 4) ; trainer's view range
- dw wd798 ; flag's byte
+ dwEventFlagAddress EVENT_BEAT_MANSION_1_TRAINER_0
dw Mansion1BattleText2 ; TextBeforeBattle
dw Mansion1AfterBattleText2 ; TextAfterBattle
dw Mansion1EndBattleText2 ; TextEndBattle
@@ -113,11 +112,9 @@ Mansion1Text4: ; 4435a (11:435a)
call PrintText
ld a, SFX_GO_INSIDE
call PlaySound
- ld hl, wd796
- bit 0, [hl]
- set 0, [hl]
+ CheckAndSetEvent EVENT_MANSION_SWITCH_ON
jr z, .asm_44392
- res 0, [hl]
+ ResetEventReuseHL EVENT_MANSION_SWITCH_ON
jr .asm_44392
.asm_4438c
ld hl, MansionSwitchNotPressedText