summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FAQ.md2
-rw-r--r--INSTALL.md2
-rw-r--r--engine/battle/battle_transition.asm2
-rw-r--r--engine/battle_anims/functions.asm2
-rw-r--r--engine/events/print_unown.asm4
-rw-r--r--engine/games/card_flip.asm8
-rw-r--r--engine/gfx/load_push_oam.asm2
-rw-r--r--engine/link/mystery_gift.asm20
-rw-r--r--engine/menus/naming_screen.asm6
-rw-r--r--engine/menus/savemenu_copytilemapatonce.asm2
-rw-r--r--engine/movie/trade_animation.asm4
-rw-r--r--engine/overworld/init_map.asm4
-rw-r--r--engine/phone/phonering_copytilemapatonce.asm2
-rw-r--r--engine/printer/print_party.asm2
-rw-r--r--engine/rtc/timeset.asm4
-rw-r--r--home/lcd.asm4
-rw-r--r--home/palettes.asm4
-rw-r--r--home/tilemap.asm2
-rw-r--r--lib/mobile/main.asm12
-rw-r--r--maps/CeladonDeptStore6F.asm16
-rw-r--r--maps/CeladonGameCornerPrizeRoom.asm73
-rw-r--r--maps/GoldenrodDeptStore6F.asm16
-rw-r--r--maps/GoldenrodGameCorner.asm43
-rw-r--r--maps/GoldenrodUnderground.asm11
-rw-r--r--maps/MahoganyTown.asm6
-rw-r--r--maps/Route39Farmhouse.asm6
26 files changed, 144 insertions, 115 deletions
diff --git a/FAQ.md b/FAQ.md
index 948f373d6..a9f168442 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -32,7 +32,7 @@ You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Sel
### "ERROR: `UNION` already defined"
-Download [**rgbds 0.3.7**][rgbds]. Older versions will not work.
+Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.
### "Segmentation fault" from `rgbgfx`
diff --git a/INSTALL.md b/INSTALL.md
index e5e07a49b..0286f9ee5 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -38,7 +38,7 @@ Click once on the text that says "**Skip**" next to each package to select the m
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
-**Note: If you already have an older rgbds, you will need to update to 0.3.7.** Ignore this if you have never installed rgbds before. If a version newer than 0.3.7 does not work, try downloading 0.3.7.
+**Note: If you already have an older rgbds, you will need to update to 0.3.8.** Ignore this if you have never installed rgbds before. If a version newer than 0.3.8 does not work, try downloading 0.3.8.
Now open the **Cygwin terminal** and enter the following commands.
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm
index 654bc6da8..4df5aa808 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -6,7 +6,7 @@ BATTLETRANSITION_NO_CAVE_STRONGER EQU $18
BATTLETRANSITION_FINISH EQU $20
BATTLETRANSITION_END EQU $80
-BATTLETRANSITION_SQUARE EQUS "\"8\"" ; $fe
+BATTLETRANSITION_SQUARE EQU "8" ; $fe
DoBattleTransition:
call .InitGFX
diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm
index 6706bd364..fc1ef4766 100644
--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -2514,7 +2514,7 @@ BattleAnimFunction_25:
ld hl, BATTLEANIMSTRUCT_10
add hl, bc
ld e, [hl]
- ld hl, $ffa0
+ lb hl, -1, $a0
add hl, de
ld e, l
ld d, h
diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm
index ffb098745..9319ecb3e 100644
--- a/engine/events/print_unown.asm
+++ b/engine/events/print_unown.asm
@@ -1,5 +1,5 @@
-UNOWNSTAMP_BOLD_A EQUS "\"♂\"" ; $ef
-UNOWNSTAMP_BOLD_B EQUS "\"♀\"" ; $f5
+UNOWNSTAMP_BOLD_A EQU "♂" ; $ef
+UNOWNSTAMP_BOLD_B EQU "♀" ; $f5
_UnownPrinter:
ld a, [wUnownDex]
diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm
index 827d51af9..a87be3dae 100644
--- a/engine/games/card_flip.asm
+++ b/engine/games/card_flip.asm
@@ -1,5 +1,5 @@
-CARDFLIP_LIGHT_OFF EQUS "\"♂\"" ; $ef
-CARDFLIP_LIGHT_ON EQUS "\"♀\"" ; $f5
+CARDFLIP_LIGHT_OFF EQU "♂" ; $ef
+CARDFLIP_LIGHT_ON EQU "♀" ; $f5
CARDFLIP_DECK_SIZE EQU 4 * 6
@@ -46,9 +46,9 @@ _CardFlip:
call CardFlip_InitAttrPals
call EnableLCD
call WaitBGMap2
- ld a, $e4
+ ld a, %11100100
call DmgToCgbBGPals
- ld de, $e4e4
+ lb de, %11100100, %11100100
call DmgToCgbObjPals
call DelayFrame
xor a
diff --git a/engine/gfx/load_push_oam.asm b/engine/gfx/load_push_oam.asm
index 8fa69d0de..2e43c1ffe 100644
--- a/engine/gfx/load_push_oam.asm
+++ b/engine/gfx/load_push_oam.asm
@@ -4,7 +4,7 @@ WriteOAMDMACodeToHRAM::
ld hl, .PushOAM
.loop
ld a, [hli]
- ld [$ff00+c], a
+ ldh [c], a
inc c
dec b
jr nz, .loop
diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm
index a1228565d..840853a87 100644
--- a/engine/link/mystery_gift.asm
+++ b/engine/link/mystery_gift.asm
@@ -256,7 +256,7 @@ Function104a95:
jr c, .ly_loop
ld c, LOW(rRP)
ld a, $c0
- ld [$ff00+c], a
+ ldh [c], a
ld b, 240 ; This might have been intended as a 4-second timeout buffer.
; However, it is reset with each frame.
.loop3
@@ -267,14 +267,14 @@ Function104a95:
ld c, LOW(rRP)
; Delay frame
.ly_loop2
- ld a, [$ff00+c]
+ ldh a, [c]
and b
ld b, a
ldh a, [rLY]
cp LY_VBLANK
jr nc, .ly_loop2
.ly_loop3
- ld a, [$ff00+c]
+ ldh a, [c]
and b
ld b, a
ldh a, [rLY]
@@ -657,7 +657,7 @@ Function104da9:
xor a
ldh [rIF], a
halt
- ld a, [$ff00+c]
+ ldh a, [c]
bit 1, a
jr z, Function104da9
or a
@@ -669,7 +669,7 @@ Function104db7:
xor a
ldh [rIF], a
halt
- ld a, [$ff00+c]
+ ldh a, [c]
bit 1, a
jr nz, Function104db7
or a
@@ -677,7 +677,7 @@ Function104db7:
Function104dc5:
ld a, $c1
- ld [$ff00+c], a
+ ldh [c], a
.wait
dec d
ret z
@@ -688,7 +688,7 @@ Function104dc5:
Function104dd1:
ld a, $c0
- ld [$ff00+c], a
+ ldh [c], a
.wait
dec d
ret z
@@ -716,7 +716,7 @@ Function104ddd:
.next
bit 0, a
jr nz, Function104e3a
- ld a, [$ff00+c]
+ ldh a, [c]
and b
jr nz, .loop
@@ -997,14 +997,14 @@ Function104faf:
.asm_104fdb
inc d
jr z, .asm_104fe5
- ld a, [$ff00+c]
+ ldh a, [c]
bit 1, a
jr z, .asm_104fdb
ld d, $0
.asm_104fe5
inc d
jr z, .asm_104fed
- ld a, [$ff00+c]
+ ldh a, [c]
bit 1, a
jr nz, .asm_104fe5
.asm_104fed
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index 87e28263f..05c702cd0 100644
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -1,8 +1,8 @@
NAMINGSCREEN_CURSOR EQU $7e
-NAMINGSCREEN_BORDER EQUS "\"■\"" ; $60
-NAMINGSCREEN_MIDDLELINE EQUS "\"→\"" ; $eb
-NAMINGSCREEN_UNDERLINE EQUS "\"<DOT>\"" ; $f2
+NAMINGSCREEN_BORDER EQU "■" ; $60
+NAMINGSCREEN_MIDDLELINE EQU "→" ; $eb
+NAMINGSCREEN_UNDERLINE EQU "<DOT>" ; $f2
_NamingScreen:
call DisableSpriteUpdates
diff --git a/engine/menus/savemenu_copytilemapatonce.asm b/engine/menus/savemenu_copytilemapatonce.asm
index cfe922015..58c269afd 100644
--- a/engine/menus/savemenu_copytilemapatonce.asm
+++ b/engine/menus/savemenu_copytilemapatonce.asm
@@ -53,7 +53,7 @@ SaveMenu_CopyTilemapAtOnce:
rept SCREEN_WIDTH / 2
pop de
.loop\@
- ld a, [$ff00+c]
+ ldh a, [c]
and b
jr nz, .loop\@
ld [hl], e
diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm
index 2ecbe2060..21eb1fec9 100644
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -1,5 +1,5 @@
-TRADEANIM_RIGHT_ARROW EQUS "\"▶\"" ; $ed
-TRADEANIM_LEFT_ARROW EQUS "\"▼\"" ; $ee
+TRADEANIM_RIGHT_ARROW EQU "▶" ; $ed
+TRADEANIM_LEFT_ARROW EQU "▼" ; $ee
; TradeAnim_TubeAnimJumptable.Jumptable indexes
const_def
diff --git a/engine/overworld/init_map.asm b/engine/overworld/init_map.asm
index 5008270a2..fece592d0 100644
--- a/engine/overworld/init_map.asm
+++ b/engine/overworld/init_map.asm
@@ -90,9 +90,9 @@ HDMATransfer_FillBGMap0WithBlack:
ldh [rHDMA1], a
ld a, LOW(wDecompressScratch)
ldh [rHDMA2], a
- ld a, HIGH(vBGMap0 % $8000)
+ ld a, HIGH(vBGMap0 - VRAM_Begin)
ldh [rHDMA3], a
- ld a, LOW(vBGMap0 % $8000)
+ ld a, LOW(vBGMap0 - VRAM_Begin)
ldh [rHDMA4], a
ld a, $3f
ldh [hDMATransfer], a
diff --git a/engine/phone/phonering_copytilemapatonce.asm b/engine/phone/phonering_copytilemapatonce.asm
index 269e39465..dea305af1 100644
--- a/engine/phone/phonering_copytilemapatonce.asm
+++ b/engine/phone/phonering_copytilemapatonce.asm
@@ -56,7 +56,7 @@ PhoneRing_CopyTilemapAtOnce:
rept SCREEN_WIDTH / 2
pop de
.loop\@
- ld a, [$ff00+c]
+ ldh a, [c]
and b
jr nz, .loop\@
ld [hl], e
diff --git a/engine/printer/print_party.asm b/engine/printer/print_party.asm
index 04c70c1ce..caeb1eecd 100644
--- a/engine/printer/print_party.asm
+++ b/engine/printer/print_party.asm
@@ -1,4 +1,4 @@
-PRINTPARTY_HP EQUS "\"◀\"" ; $71
+PRINTPARTY_HP EQU "◀" ; $71
PrintPage1:
hlcoord 0, 0
diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm
index 3275d313a..3898249c7 100644
--- a/engine/rtc/timeset.asm
+++ b/engine/rtc/timeset.asm
@@ -1,5 +1,5 @@
-TIMESET_UP_ARROW EQUS "\"♂\"" ; $ef
-TIMESET_DOWN_ARROW EQUS "\"♀\"" ; $f5
+TIMESET_UP_ARROW EQU "♂" ; $ef
+TIMESET_DOWN_ARROW EQU "♀" ; $f5
InitClock:
; Ask the player to set the time.
diff --git a/home/lcd.asm b/home/lcd.asm
index 68edf9b0f..e50672f95 100644
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -6,7 +6,7 @@ Unreferenced_Function547::
ret nz
ld c, a
ld a, [wLYOverrides]
- ld [$ff00+c], a
+ ldh [c], a
ret
LCD::
@@ -25,7 +25,7 @@ LCD::
ldh a, [hLCDCPointer]
ld c, a
ld a, b
- ld [$ff00+c], a
+ ldh [c], a
pop bc
.done
diff --git a/home/palettes.asm b/home/palettes.asm
index d5c645d78..6391c7c27 100644
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -33,7 +33,7 @@ ForceUpdateCGBPals::
.bgp
rept (1 palettes) * 2
ld a, [hli]
- ld [$ff00+c], a
+ ldh [c], a
endr
dec b
@@ -49,7 +49,7 @@ endr
.obp
rept (1 palettes) * 2
ld a, [hli]
- ld [$ff00+c], a
+ ldh [c], a
endr
dec b
diff --git a/home/tilemap.asm b/home/tilemap.asm
index b8dfb7697..98362ec1f 100644
--- a/home/tilemap.asm
+++ b/home/tilemap.asm
@@ -119,7 +119,7 @@ rept SCREEN_WIDTH / 2
pop de
; if in v/hblank, wait until not in v/hblank
.loop\@
- ld a, [$ff00+c]
+ ldh a, [c]
and b
jr nz, .loop\@
; load BGMap0
diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm
index 493754cb2..2bf5eef23 100644
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -215,9 +215,9 @@ Function1100dc:
ld [$c815], a
ld c, $7
ld a, $2
- ld [$ff00+c], a
+ ldh [c], a
ld a, $6
- ld [$ff00+c], a
+ ldh [c], a
ret
Function110115:
@@ -604,9 +604,9 @@ Function11032c:
Function110393:
ld c, LOW(rIE)
- ld a, [$ff00+c]
+ ldh a, [c]
or $c
- ld [$ff00+c], a
+ ldh [c], a
ret
Function11039a:
@@ -3416,9 +3416,9 @@ Function111686:
xor a
ldh [rTAC], a
ld c, $ff
- ld a, [$ff00+c]
+ ldh a, [c]
and $f3
- ld [$ff00+c], a
+ ldh [c], a
ld a, [$cb48]
ld [$c86a], a
ld a, [$cb47]
diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm
index 2051c01dd..005cb68be 100644
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -1,3 +1,7 @@
+CELADONDEPTSTORE6F_FRESH_WATER_PRICE EQU 200
+CELADONDEPTSTORE6F_SODA_POP_PRICE EQU 300
+CELADONDEPTSTORE6F_LEMONADE_PRICE EQU 350
+
const_def 2 ; object constants
const CELADONDEPTSTORE6F_SUPER_NERD
const CELADONDEPTSTORE6F_YOUNGSTER
@@ -33,29 +37,29 @@ CeladonDeptStore6FVendingMachine:
end
.FreshWater:
- checkmoney YOUR_MONEY, 200
+ checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_FRESH_WATER_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem FRESH_WATER
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 200
+ takemoney YOUR_MONEY, CELADONDEPTSTORE6F_FRESH_WATER_PRICE
itemtotext FRESH_WATER, MEM_BUFFER_0
jump .VendItem
.SodaPop:
- checkmoney YOUR_MONEY, 300
+ checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_SODA_POP_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem SODA_POP
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 300
+ takemoney YOUR_MONEY, CELADONDEPTSTORE6F_SODA_POP_PRICE
itemtotext SODA_POP, MEM_BUFFER_0
jump .VendItem
.Lemonade:
- checkmoney YOUR_MONEY, 350
+ checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_LEMONADE_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem LEMONADE
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 350
+ takemoney YOUR_MONEY, CELADONDEPTSTORE6F_LEMONADE_PRICE
itemtotext LEMONADE, MEM_BUFFER_0
jump .VendItem
diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm
index 24846a784..14052d91d 100644
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -1,3 +1,10 @@
+CELADONGAMECORNERPRIZEROOM_TM32_COINS EQU 1500
+CELADONGAMECORNERPRIZEROOM_TM29_COINS EQU 3500
+CELADONGAMECORNERPRIZEROOM_TM15_COINS EQU 7500
+CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS EQU 2222
+CELADONGAMECORNERPRIZEROOM_PORYGON_COINS EQU 5555
+CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS EQU 8888
+
const_def 2 ; object constants
const CELADONGAMECORNERPRIZEROOM_GENTLEMAN
const CELADONGAMECORNERPRIZEROOM_PHARMACIST
@@ -26,42 +33,42 @@ CeladonPrizeRoom_tmcounterloop:
loadmenu CeladonPrizeRoom_TMMenuHeader
verticalmenu
closewindow
- ifequal 1, .doubleteam
- ifequal 2, .psychic
- ifequal 3, .hyperbeam
- jump CeladonPrizeRoom_cancel
+ ifequal 1, .DoubleTeam
+ ifequal 2, .Psychic
+ ifequal 3, .HyperBeam
+ jump CeladonPrizeRoom_CancelPurchaseScript
-.doubleteam
- checkcoins 1500
+.DoubleTeam:
+ checkcoins CELADONGAMECORNERPRIZEROOM_TM32_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
itemtotext TM_DOUBLE_TEAM, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_DOUBLE_TEAM
iffalse CeladonPrizeRoom_notenoughroom
- takecoins 1500
+ takecoins CELADONGAMECORNERPRIZEROOM_TM32_COINS
jump CeladonPrizeRoom_purchased
-.psychic
- checkcoins 3500
+.Psychic:
+ checkcoins CELADONGAMECORNERPRIZEROOM_TM29_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
itemtotext TM_PSYCHIC_M, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_PSYCHIC_M
iffalse CeladonPrizeRoom_notenoughroom
- takecoins 3500
+ takecoins CELADONGAMECORNERPRIZEROOM_TM29_COINS
jump CeladonPrizeRoom_purchased
-.hyperbeam
- checkcoins 7500
+.HyperBeam:
+ checkcoins CELADONGAMECORNERPRIZEROOM_TM15_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
itemtotext TM_HYPER_BEAM, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_HYPER_BEAM
iffalse CeladonPrizeRoom_notenoughroom
- takecoins 7500
+ takecoins CELADONGAMECORNERPRIZEROOM_TM15_COINS
jump CeladonPrizeRoom_purchased
CeladonPrizeRoom_askbuy:
@@ -88,7 +95,7 @@ CeladonPrizeRoom_notenoughroom:
closetext
end
-CeladonPrizeRoom_cancel:
+CeladonPrizeRoom_CancelPurchaseScript:
writetext CeladonPrizeRoom_ComeAgainText
waitbutton
closetext
@@ -127,19 +134,19 @@ CeladonGameCornerPrizeRoomPokemonVendor:
loadmenu .MenuHeader
verticalmenu
closewindow
- ifequal 1, .pikachu
- ifequal 2, .porygon
- ifequal 3, .larvitar
- jump CeladonPrizeRoom_cancel
+ ifequal 1, .Pikachu
+ ifequal 2, .Porygon
+ ifequal 3, .Larvitar
+ jump CeladonPrizeRoom_CancelPurchaseScript
-.pikachu
- checkcoins 2222
+.Pikachu:
+ checkcoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
pokenamemem PIKACHU, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
@@ -147,17 +154,17 @@ CeladonGameCornerPrizeRoomPokemonVendor:
writebyte PIKACHU
special GameCornerPrizeMonCheckDex
givepoke PIKACHU, 25
- takecoins 2222
+ takecoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
jump .loop
-.porygon
- checkcoins 5555
+.Porygon:
+ checkcoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
pokenamemem PORYGON, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
@@ -165,17 +172,17 @@ CeladonGameCornerPrizeRoomPokemonVendor:
writebyte PORYGON
special GameCornerPrizeMonCheckDex
givepoke PORYGON, 15
- takecoins 5555
+ takecoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
jump .loop
-.larvitar
- checkcoins 8888
+.Larvitar:
+ checkcoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
pokenamemem LARVITAR, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
- iffalse CeladonPrizeRoom_cancel
+ iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
@@ -183,7 +190,7 @@ CeladonGameCornerPrizeRoomPokemonVendor:
writebyte LARVITAR
special GameCornerPrizeMonCheckDex
givepoke LARVITAR, 40
- takecoins 8888
+ takecoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
jump .loop
.MenuHeader:
diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm
index 347e8b27a..6beaf9b8f 100644
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -1,3 +1,7 @@
+GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE EQU 200
+GOLDENRODDEPTSTORE6F_SODA_POP_PRICE EQU 300
+GOLDENRODDEPTSTORE6F_LEMONADE_PRICE EQU 350
+
const_def 2 ; object constants
const GOLDENRODDEPTSTORE6F_LASS
const GOLDENRODDEPTSTORE6F_SUPER_NERD
@@ -22,29 +26,29 @@ GoldenrodVendingMachine:
end
.FreshWater:
- checkmoney YOUR_MONEY, 200
+ checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem FRESH_WATER
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 200
+ takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE
itemtotext FRESH_WATER, MEM_BUFFER_0
jump .VendItem
.SodaPop:
- checkmoney YOUR_MONEY, 300
+ checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_SODA_POP_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem SODA_POP
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 300
+ takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_SODA_POP_PRICE
itemtotext SODA_POP, MEM_BUFFER_0
jump .VendItem
.Lemonade:
- checkmoney YOUR_MONEY, 350
+ checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_LEMONADE_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem LEMONADE
iffalse .NotEnoughSpace
- takemoney YOUR_MONEY, 350
+ takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_LEMONADE_PRICE
itemtotext LEMONADE, MEM_BUFFER_0
jump .VendItem
diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm
index 608b41d33..bd73a350e 100644
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -1,3 +1,10 @@
+GOLDENRODGAMECORNER_TM25_COINS EQU 5500
+GOLDENRODGAMECORNER_TM14_COINS EQU 5500
+GOLDENRODGAMECORNER_TM38_COINS EQU 5500
+GOLDENRODGAMECORNER_ABRA_COINS EQU 100
+GOLDENRODGAMECORNER_CUBONE_COINS EQU 800
+GOLDENRODGAMECORNER_WOBBUFFET_COINS EQU 1500
+
const_def 2 ; object constants
const GOLDENRODGAMECORNER_CLERK
const GOLDENRODGAMECORNER_RECEPTIONIST1
@@ -68,36 +75,36 @@ GoldenrodGameCornerTMVendor_LoopScript:
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
.Thunder:
- checkcoins 5500
+ checkcoins GOLDENRODGAMECORNER_TM25_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_THUNDER, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_THUNDER
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- takecoins 5500
+ takecoins GOLDENRODGAMECORNER_TM25_COINS
jump GoldenrodGameCornerTMVendor_FinishScript
.Blizzard:
- checkcoins 5500
+ checkcoins GOLDENRODGAMECORNER_TM14_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_BLIZZARD, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_BLIZZARD
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- takecoins 5500
+ takecoins GOLDENRODGAMECORNER_TM14_COINS
jump GoldenrodGameCornerTMVendor_FinishScript
.FireBlast:
- checkcoins 5500
+ checkcoins GOLDENRODGAMECORNER_TM38_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_FIRE_BLAST, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_FIRE_BLAST
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- takecoins 5500
+ takecoins GOLDENRODGAMECORNER_TM38_COINS
jump GoldenrodGameCornerTMVendor_FinishScript
GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript:
@@ -163,13 +170,13 @@ GoldenrodGameCornerPrizeMonVendorScript:
loadmenu .MenuHeader
verticalmenu
closewindow
- ifequal 1, .abra
- ifequal 2, .cubone
- ifequal 3, .wobbuffet
+ ifequal 1, .Abra
+ ifequal 2, .Cubone
+ ifequal 3, .Wobbuffet
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
-.abra
- checkcoins 100
+.Abra:
+ checkcoins GOLDENRODGAMECORNER_ABRA_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
@@ -183,11 +190,11 @@ GoldenrodGameCornerPrizeMonVendorScript:
writebyte ABRA
special GameCornerPrizeMonCheckDex
givepoke ABRA, 5
- takecoins 100
+ takecoins GOLDENRODGAMECORNER_ABRA_COINS
jump .loop
-.cubone
- checkcoins 800
+.Cubone:
+ checkcoins GOLDENRODGAMECORNER_CUBONE_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
@@ -201,11 +208,11 @@ GoldenrodGameCornerPrizeMonVendorScript:
writebyte CUBONE
special GameCornerPrizeMonCheckDex
givepoke CUBONE, 15
- takecoins 800
+ takecoins GOLDENRODGAMECORNER_CUBONE_COINS
jump .loop
-.wobbuffet
- checkcoins 1500
+.Wobbuffet:
+ checkcoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
@@ -219,7 +226,7 @@ GoldenrodGameCornerPrizeMonVendorScript:
writebyte WOBBUFFET
special GameCornerPrizeMonCheckDex
givepoke WOBBUFFET, 15
- takecoins 1500
+ takecoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
jump .loop
.MenuHeader:
diff --git a/maps/GoldenrodUnderground.asm b/maps/GoldenrodUnderground.asm
index c87b4f7fc..9a17a9590 100644
--- a/maps/GoldenrodUnderground.asm
+++ b/maps/GoldenrodUnderground.asm
@@ -1,3 +1,6 @@
+GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE EQU 500
+GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE EQU 300
+
const_def 2 ; object constants
const GOLDENRODUNDERGROUND_SUPER_NERD1
const GOLDENRODUNDERGROUND_SUPER_NERD2
@@ -194,7 +197,7 @@ OlderHaircutBrotherScript:
writetext UnknownText_0x7c5f9
yesorno
iffalse .Refused
- checkmoney YOUR_MONEY, 500
+ checkmoney YOUR_MONEY, GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
writetext UnknownText_0x7c69a
buttonsound
@@ -225,7 +228,7 @@ OlderHaircutBrotherScript:
jump .then
.then
- takemoney YOUR_MONEY, 500
+ takemoney YOUR_MONEY, GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE
special PlaceMoneyTopRight
writetext UnknownText_0x7c6b8
waitbutton
@@ -277,7 +280,7 @@ YoungerHaircutBrotherScript:
writetext UnknownText_0x7c75c
yesorno
iffalse .Refused
- checkmoney YOUR_MONEY, 300
+ checkmoney YOUR_MONEY, GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
writetext UnknownText_0x7c7f1
buttonsound
@@ -308,7 +311,7 @@ YoungerHaircutBrotherScript:
jump .then
.then
- takemoney YOUR_MONEY, 300
+ takemoney YOUR_MONEY, GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE
special PlaceMoneyTopRight
writetext UnknownText_0x7c80e
waitbutton
diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm
index 872303b06..bf28e5ad0 100644
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -1,3 +1,5 @@
+MAHOGANYTOWN_RAGECANDYBAR_PRICE EQU 300
+
const_def 2 ; object constants
const MAHOGANYTOWN_POKEFAN_M
const MAHOGANYTOWN_GRAMPS
@@ -54,13 +56,13 @@ RageCandyBarMerchantScript:
special PlaceMoneyTopRight
yesorno
iffalse .Refused
- checkmoney YOUR_MONEY, 300
+ checkmoney YOUR_MONEY, MAHOGANYTOWN_RAGECANDYBAR_PRICE
ifequal HAVE_LESS, .NotEnoughMoney
giveitem RAGECANDYBAR
iffalse .NoRoom
waitsfx
playsound SFX_TRANSACTION
- takemoney YOUR_MONEY, 300
+ takemoney YOUR_MONEY, MAHOGANYTOWN_RAGECANDYBAR_PRICE
special PlaceMoneyTopRight
writetext RageCandyBarMerchantSavorItText
waitbutton
diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm
index 510d6e5d5..a3f582de1 100644
--- a/maps/Route39Farmhouse.asm
+++ b/maps/Route39Farmhouse.asm
@@ -1,3 +1,5 @@
+ROUTE39FARMHOUSE_MILK_PRICE EQU 500
+
const_def 2 ; object constants
const ROUTE39FARMHOUSE_POKEFAN_M
const ROUTE39FARMHOUSE_POKEFAN_F
@@ -25,11 +27,11 @@ FarmerMScript_SellMilk:
special PlaceMoneyTopRight
yesorno
iffalse FarmerMScript_NoSale
- checkmoney YOUR_MONEY, 500
+ checkmoney YOUR_MONEY, ROUTE39FARMHOUSE_MILK_PRICE
ifequal HAVE_LESS, FarmerMScript_NoMoney
giveitem MOOMOO_MILK
iffalse FarmerMScript_NoRoom
- takemoney YOUR_MONEY, 500
+ takemoney YOUR_MONEY, ROUTE39FARMHOUSE_MILK_PRICE
special PlaceMoneyTopRight
waitsfx
playsound SFX_TRANSACTION