ref: ce62dca69be6c316f0cd549a498ff04aaeef8d4d
parent: 223b7b21a45e93af4c66b050f0fe5779977df15a
author: Rangi <[email protected]>
date: Sun May 30 13:28:26 EDT 2021
Eliminate unnecessary data macros
--- a/data/events/prizes.asm
+++ b/data/events/prizes.asm
@@ -19,14 +19,14 @@
PrizeMenuMon1Cost:
IF DEF(_RED)
- coins 180
- coins 500
+ bcd2 180
+ bcd2 500
ENDC
IF DEF(_BLUE)
- coins 120
- coins 750
+ bcd2 120
+ bcd2 750
ENDC
- coins 1200
+ bcd2 1200
db "@"
PrizeMenuMon2Entries:
@@ -43,14 +43,14 @@
PrizeMenuMon2Cost:
IF DEF(_RED)
- coins 2800
- coins 5500
- coins 9999
+ bcd2 2800
+ bcd2 5500
+ bcd2 9999
ENDC
IF DEF(_BLUE)
- coins 2500
- coins 4600
- coins 6500
+ bcd2 2500
+ bcd2 4600
+ bcd2 6500
ENDC
db "@"
@@ -61,7 +61,7 @@
db "@"
PrizeMenuTMsCost:
- coins 3300
- coins 5500
- coins 7700
+ bcd2 3300
+ bcd2 5500
+ bcd2 7700
db "@"
--- a/data/items/prices.asm
+++ b/data/items/prices.asm
@@ -1,101 +1,101 @@
ItemPrices::
table_width 3, ItemPrices
- 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
+ bcd3 0 ; MASTER_BALL
+ bcd3 1200 ; ULTRA_BALL
+ bcd3 600 ; GREAT_BALL
+ bcd3 200 ; POKE_BALL
+ bcd3 0 ; TOWN_MAP
+ bcd3 0 ; BICYCLE
+ bcd3 0 ; SURFBOARD
+ bcd3 1000 ; SAFARI_BALL
+ bcd3 0 ; POKEDEX
+ bcd3 0 ; MOON_STONE
+ bcd3 100 ; ANTIDOTE
+ bcd3 250 ; BURN_HEAL
+ bcd3 250 ; ICE_HEAL
+ bcd3 200 ; AWAKENING
+ bcd3 200 ; PARLYZ_HEAL
+ bcd3 3000 ; FULL_RESTORE
+ bcd3 2500 ; MAX_POTION
+ bcd3 1500 ; HYPER_POTION
+ bcd3 700 ; SUPER_POTION
+ bcd3 300 ; POTION
+ bcd3 0 ; BOULDERBADGE
+ bcd3 0 ; CASCADEBADGE
+ bcd3 0 ; THUNDERBADGE
+ bcd3 0 ; RAINBOWBADGE
+ bcd3 0 ; SOULBADGE
+ bcd3 0 ; MARSHBADGE
+ bcd3 0 ; VOLCANOBADGE
+ bcd3 0 ; EARTHBADGE
+ bcd3 550 ; ESCAPE_ROPE
+ bcd3 350 ; REPEL
+ bcd3 0 ; OLD_AMBER
+ bcd3 2100 ; FIRE_STONE
+ bcd3 2100 ; THUNDER_STONE
+ bcd3 2100 ; WATER_STONE
+ bcd3 9800 ; HP_UP
+ bcd3 9800 ; PROTEIN
+ bcd3 9800 ; IRON
+ bcd3 9800 ; CARBOS
+ bcd3 9800 ; CALCIUM
+ bcd3 4800 ; RARE_CANDY
+ bcd3 0 ; DOME_FOSSIL
+ bcd3 0 ; HELIX_FOSSIL
+ bcd3 0 ; SECRET_KEY
+ bcd3 0 ; XXX
+ bcd3 0 ; BIKE_VOUCHER
+ bcd3 950 ; X_ACCURACY
+ bcd3 2100 ; LEAF_STONE
+ bcd3 0 ; CARD_KEY
+ bcd3 10000 ; NUGGET
+ bcd3 9800 ; XXX PP_UP
+ bcd3 1000 ; POKE_DOLL
+ bcd3 600 ; FULL_HEAL
+ bcd3 1500 ; REVIVE
+ bcd3 4000 ; MAX_REVIVE
+ bcd3 700 ; GUARD_SPEC
+ bcd3 500 ; SUPER_REPEL
+ bcd3 700 ; MAX_REPEL
+ bcd3 650 ; DIRE_HIT
+ bcd3 10 ; COIN
+ bcd3 200 ; FRESH_WATER
+ bcd3 300 ; SODA_POP
+ bcd3 350 ; LEMONADE
+ bcd3 0 ; S_S_TICKET
+ bcd3 0 ; GOLD_TEETH
+ bcd3 500 ; X_ATTACK
+ bcd3 550 ; X_DEFEND
+ bcd3 350 ; X_SPEED
+ bcd3 350 ; X_SPECIAL
+ bcd3 0 ; COIN_CASE
+ bcd3 0 ; OAKS_PARCEL
+ bcd3 0 ; ITEMFINDER
+ bcd3 0 ; SILPH_SCOPE
+ bcd3 0 ; POKE_FLUTE
+ bcd3 0 ; LIFT_KEY
+ bcd3 0 ; EXP_ALL
+ bcd3 0 ; OLD_ROD
+ bcd3 0 ; GOOD_ROD
+ bcd3 0 ; SUPER_ROD
+ bcd3 0 ; PP_UP
+ bcd3 0 ; ETHER
+ bcd3 0 ; MAX_ETHER
+ bcd3 0 ; ELIXER
+ bcd3 0 ; MAX_ELIXER
assert_table_length NUM_ITEMS
- money 0 ; FLOOR_B2F
- money 0 ; FLOOR_B1F
- money 0 ; FLOOR_1F
- money 0 ; FLOOR_2F
- money 0 ; FLOOR_3F
- money 0 ; FLOOR_4F
- money 0 ; FLOOR_5F
- money 0 ; FLOOR_6F
- money 0 ; FLOOR_7F
- money 0 ; FLOOR_8F
- money 0 ; FLOOR_9F
- money 0 ; FLOOR_10F
- money 0 ; FLOOR_11F
- money 0 ; FLOOR_B4F
+ bcd3 0 ; FLOOR_B2F
+ bcd3 0 ; FLOOR_B1F
+ bcd3 0 ; FLOOR_1F
+ bcd3 0 ; FLOOR_2F
+ bcd3 0 ; FLOOR_3F
+ bcd3 0 ; FLOOR_4F
+ bcd3 0 ; FLOOR_5F
+ bcd3 0 ; FLOOR_6F
+ bcd3 0 ; FLOOR_7F
+ bcd3 0 ; FLOOR_8F
+ bcd3 0 ; FLOOR_9F
+ bcd3 0 ; FLOOR_10F
+ bcd3 0 ; FLOOR_11F
+ bcd3 0 ; FLOOR_B4F
assert_table_length NUM_ITEMS + NUM_FLOORS
--- a/data/items/vending_prices.asm
+++ b/data/items/vending_prices.asm
@@ -1,6 +1,6 @@
vend_item: MACRO
db \1
- money \2
+ bcd3 \2
ENDM
VendingPrices:
--- a/data/trainers/pic_pointers_money.asm
+++ b/data/trainers/pic_pointers_money.asm
@@ -1,6 +1,6 @@
pic_money: MACRO
dw \1
- money \2
+ bcd3 \2
ENDM
TrainerPicAndMoneyPointers::
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -13,9 +13,6 @@
dn ((\1) / 10) % 10, (\1) % 10
ENDM
-coins EQUS "bcd2"
-money EQUS "bcd3"
-
; used in data/pokemon/base_stats/*.asm
tmhm: MACRO
; initialize bytes to 0
@@ -62,9 +59,4 @@
dab: MACRO
dwb \1, BANK(\1)
-ENDM
-
-dbbw: MACRO
- db \1, \2
- dw \3
ENDM