summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/daycarem.asm26
-rw-r--r--scripts/safarizoneentrance-yellow.asm18
-rwxr-xr-xscripts/safarizoneentrance.asm12
3 files changed, 28 insertions, 28 deletions
diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm
index 917a4c79..3eabb0bc 100755
--- a/scripts/daycarem.asm
+++ b/scripts/daycarem.asm
@@ -103,21 +103,21 @@ DayCareMText1: ; 56254 (15:6254)
ld a, [wPartyCount]
cp PARTY_LENGTH
ld hl, DayCareNoRoomForMonText
- jp z, .asm_56403
- ld de, wTrainerFacingDirection
+ jp z, .leaveMonInDayCare
+ ld de, wDayCareTotalCost
xor a
ld [de], a
inc de
ld [de], a
- ld hl, wTrainerScreenX
+ ld hl, wDayCarePerLevelCost
ld a, $1
ld [hli], a
ld [hl], $0
ld a, [wDayCareNumLevelsGrown]
inc a
ld b, a
- ld c, $2
-.asm_56357
+ ld c, 2
+.calcPriceLoop
push hl
push de
push bc
@@ -126,29 +126,29 @@ DayCareMText1: ; 56254 (15:6254)
pop de
pop hl
dec b
- jr nz, .asm_56357
+ jr nz, .calcPriceLoop
ld hl, DayCareOweMoneyText
call PrintText
- ld a, $13
+ ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
call YesNoChoice
ld hl, DayCareAllRightThenText
ld a, [wCurrentMenuItem]
and a
- jp nz, .asm_56403
- ld hl, wTrainerFacingDirection
+ jp nz, .leaveMonInDayCare
+ ld hl, wDayCareTotalCost
ld [hMoney], a
ld a, [hli]
ld [hMoney + 1], a
ld a, [hl]
ld [hMoney + 2], a
call HasEnoughMoney
- jr nc, .asm_56396
+ jr nc, .enoughMoney
ld hl, DayCareNotEnoughMoneyText
- jp .asm_56403
+ jp .leaveMonInDayCare
-.asm_56396
+.enoughMoney
xor a
ld [W_DAYCARE_IN_USE], a
ld hl, wDayCareNumLevelsGrown
@@ -202,7 +202,7 @@ DayCareMText1: ; 56254 (15:6254)
ld hl, DayCareGotMonBackText
jr .done
-.asm_56403
+.leaveMonInDayCare
ld a, [wDayCareStartLevel]
ld [wDayCareMonBoxLevel], a
diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm
index 6ff0e298..9d354cff 100644
--- a/scripts/safarizoneentrance-yellow.asm
+++ b/scripts/safarizoneentrance-yellow.asm
@@ -1,7 +1,7 @@
.xf1f77
ld hl,.ForJust500Text
call PrintText
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID
call YesNoChoice
@@ -21,11 +21,11 @@
.xf1f9f
xor a
- ld [$ff9f],a
+ ld [hMoney],a
ld a,$05
- ld [$ffa0],a
+ ld [hMoney + 1],a
ld a,$00
- ld [$ffa1],a
+ ld [hMoney + 2],a
call HasEnoughMoney
jr nc,.success
ld hl,.NotEnoughMoneyText
@@ -36,19 +36,19 @@
.success
xor a
- ld [wSubtrahend],a
+ ld [wPriceTemp],a
ld a,$05
- ld [wSubtrahend+1],a
+ ld [wPriceTemp + 1],a
ld a,$00
- ld [wSubtrahend+2],a
- ld hl,wTrainerFacingDirection
+ ld [wPriceTemp + 2],a
+ ld hl,wPriceTemp + 2
ld de,wPlayerMoney + 2
ld c,3
predef SubBCDPredef
ld a,$b2
call $3736
call $373e
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID
ld hl,.MakePaymentText
diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm
index 6ed62fd1..e4e2e2a8 100755
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -145,7 +145,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.SafariZoneEntranceText4
TX_FAR SafariZoneEntranceText_9e6e4
TX_ASM
- ld a, $13
+ ld a, MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID
call YesNoChoice
@@ -166,16 +166,16 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.success
xor a
- ld [wSubtrahend],a
+ ld [wPriceTemp],a
ld a,$05
- ld [wSubtrahend+1],a
+ ld [wPriceTemp + 1],a
ld a,$00
- ld [wSubtrahend+2],a
- ld hl,wTrainerFacingDirection
+ ld [wPriceTemp + 2],a
+ ld hl,wPriceTemp + 2
ld de,wPlayerMoney + 2
ld c,3
predef SubBCDPredef
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID
ld hl,.MakePaymentText