ref: 6143848c7e7569021978bed733375c97d24f8ac4
parent: 95f4f7b41fbb45f6e8efb42b19a5535e52c1dbb7
author: Marcus Huderle <huderlem@gmail.com>
date: Tue Feb 3 14:45:55 EST 2015
Added bcd macros with coins and money aliases.
--- a/data/item_prices.asm
+++ b/data/item_prices.asm
@@ -1,98 +1,98 @@
ItemPrices: ; 4608 (1:4608)
- db $00,$00,$00
- db $00,$12,$00
- db $00,$06,$00
- db $00,$02,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$10,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$01,$00
- db $00,$02,$50
- db $00,$02,$50
- db $00,$02,$00
- db $00,$02,$00
- db $00,$30,$00
- db $00,$25,$00
- db $00,$15,$00
- db $00,$07,$00
- db $00,$03,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$05,$50
- db $00,$03,$50
- db $00,$00,$00
- db $00,$21,$00
- db $00,$21,$00
- db $00,$21,$00
- db $00,$98,$00
- db $00,$98,$00
- db $00,$98,$00
- db $00,$98,$00
- db $00,$98,$00
- db $00,$48,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$09,$50
- db $00,$21,$00
- db $00,$00,$00
- db $01,$00,$00
- db $00,$98,$00
- db $00,$10,$00
- db $00,$06,$00
- db $00,$15,$00
- db $00,$40,$00
- db $00,$07,$00
- db $00,$05,$00
- db $00,$07,$00
- db $00,$06,$50
- db $00,$00,$10
- db $00,$02,$00
- db $00,$03,$00
- db $00,$03,$50
- db $00,$00,$00
- db $00,$00,$00
- db $00,$05,$00
- db $00,$05,$50
- db $00,$03,$50
- db $00,$03,$50
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
- db $00,$00,$00
+ money 0 ; MASTER_BALL
+ money 1200 ; ULTRA_BALL
+ money 600 ; GREAT_BALL
+ money 200 ; POKE_BALL
+ money 0 ; TOWN_MAP
+ money 0 ; BICYCLE
+ money 0 ; SURFBOARD
+ money 1000 ; SAFARI_BALL
+ money 0 ; POKEDEX
+ money 0 ; MOON_STONE
+ money 100 ; ANTIDOTE
+ money 250 ; BURN_HEAL
+ money 250 ; ICE_HEAL
+ money 200 ; AWAKENING
+ money 200 ; PARLYZ_HEAL
+ money 3000 ; FULL_RESTORE
+ money 2500 ; MAX_POTION
+ money 1500 ; HYPER_POTION
+ money 700 ; SUPER_POTION
+ money 300 ; POTION
+ money 0 ; BOULDERBADGE
+ money 0 ; CASCADEBADGE
+ money 0 ; THUNDERBADGE
+ money 0 ; RAINBOWBADGE
+ money 0 ; SOULBADGE
+ money 0 ; MARSHBADGE
+ money 0 ; VOLCANOBADGE
+ money 0 ; EARTHBADGE
+ money 550 ; ESCAPE_ROPE
+ money 350 ; REPEL
+ money 0 ; OLD_AMBER
+ money 2100 ; FIRE_STONE
+ money 2100 ; THUNDER_STONE
+ money 2100 ; WATER_STONE
+ money 9800 ; HP_UP
+ money 9800 ; PROTEIN
+ money 9800 ; IRON
+ money 9800 ; CARBOS
+ money 9800 ; CALCIUM
+ money 4800 ; RARE_CANDY
+ money 0 ; DOME_FOSSIL
+ money 0 ; HELIX_FOSSIL
+ money 0 ; SECRET_KEY
+ money 0 ; XXX
+ money 0 ; BIKE_VOUCHER
+ money 950 ; X_ACCURACY
+ money 2100 ; LEAF_STONE
+ money 0 ; CARD_KEY
+ money 10000 ; NUGGET
+ money 9800 ; XXX PP_UP
+ money 1000 ; POKE_DOLL
+ money 600 ; FULL_HEAL
+ money 1500 ; REVIVE
+ money 4000 ; MAX_REVIVE
+ money 700 ; GUARD_SPEC_
+ money 500 ; SUPER_REPEL
+ money 700 ; MAX_REPEL
+ money 650 ; DIRE_HIT
+ money 10 ; COIN
+ money 200 ; FRESH_WATER
+ money 300 ; SODA_POP
+ money 350 ; LEMONADE
+ money 0 ; S_S__TICKET
+ money 0 ; GOLD_TEETH
+ money 500 ; X_ATTACK
+ money 550 ; X_DEFEND
+ money 350 ; X_SPEED
+ money 350 ; X_SPECIAL
+ money 0 ; COIN_CASE
+ money 0 ; OAKS_PARCEL
+ money 0 ; ITEMFINDER
+ money 0 ; SILPH_SCOPE
+ money 0 ; POKE_FLUTE
+ money 0 ; LIFT_KEY
+ money 0 ; EXP__ALL
+ money 0 ; OLD_ROD
+ money 0 ; GOOD_ROD
+ money 0 ; SUPER_ROD
+ money 0 ; PP_UP
+ money 0 ; ETHER
+ money 0 ; MAX_ETHER
+ money 0 ; ELIXER
+ money 0 ; MAX_ELIXER
+ money 0 ; B2F
+ money 0 ; B1F
+ money 0 ; 1F
+ money 0 ; 2F
+ money 0 ; 3F
+ money 0 ; 4F
+ money 0 ; 5F
+ money 0 ; 6F
+ money 0 ; 7F
+ money 0 ; 8F
+ money 0 ; 9F
+ money 0 ; 10F
+ money 0 ; 11F
+ money 0 ; B4F
--- a/data/prizes.asm
+++ b/data/prizes.asm
@@ -24,14 +24,14 @@
PrizeMenuMon1Cost: ; 5285d (14:685d)
IF DEF(_RED)
- db $01,$80 ; 180 Coins
- db $05,$00 ; 500 Coins
+ coins 180
+ coins 500
ENDC
IF DEF(_BLUE)
- db $01,$20 ; 120 Coins
- db $07,$50 ; 750 Coins
+ coins 120
+ coins 750
ENDC
- db $12,$00 ; 1200 Coins
+ coins 1200
db "@"
PrizeMenuMon2Entries: ; 52864 (14:6864)
@@ -48,14 +48,14 @@
PrizeMenuMon2Cost: ; 52868 (14:6868)
IF DEF(_RED)
- db $28,$00 ; 2800 Coins
- db $55,$00 ; 5500 Coins
- db $99,$99 ; 9999 Coins
+ coins 2800
+ coins 5500
+ coins 9999
ENDC
IF DEF(_BLUE)
- db $25,$00 ; 2500 Coins
- db $46,$00 ; 4600 Coins
- db $65,$00 ; 6500 Coins
+ coins 2500
+ coins 4600
+ coins 6500
ENDC
db "@"
@@ -66,7 +66,7 @@
db "@"
PrizeMenuTMsCost: ; 52873 (14:6873)
- db $33,$00 ; 3300 Coins
- db $55,$00 ; 5500 Coins
- db $77,$00 ; 7700 Coins
+ coins 3300
+ coins 5500
+ coins 7700
db "@"
--- a/macros.asm
+++ b/macros.asm
@@ -49,6 +49,20 @@
call Bankswitch
ENDM
+bcd2: MACRO
+ dn ((\1) / 1000) % 10, ((\1) / 100) % 10
+ dn ((\1) / 10) % 10, (\1) % 10
+ ENDM
+
+bcd3: MACRO
+ dn ((\1) / 100000) % 10, ((\1) / 10000) % 10
+ dn ((\1) / 1000) % 10, ((\1) / 100) % 10
+ dn ((\1) / 10) % 10, (\1) % 10
+ ENDM
+
+coins equs "bcd2"
+money equs "bcd3"
+
;\1 = X
;\2 = Y
hlCoord: MACRO