summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-05-27 11:09:08 -0700
committeryenatch <yenatch@gmail.com>2014-05-27 11:16:05 -0700
commitea05c44163f753b9f507535d8ee549a4d43a4410 (patch)
treee7fd69b85e293071021489dd5bd049573d889e83
parentf16f07c5ca38fa269972dfecab7dbae50e0a73ff (diff)
Add macro TX_BCD for printing BCD numbers.
This fixes some more static wram addresses.
-rw-r--r--macros.asm6
-rw-r--r--text.asm17
-rw-r--r--text/maps/daycare_1.asm2
-rwxr-xr-xwram.asm1
4 files changed, 15 insertions, 11 deletions
diff --git a/macros.asm b/macros.asm
index 795230b0..c8164803 100644
--- a/macros.asm
+++ b/macros.asm
@@ -131,6 +131,12 @@ TX_RAM: MACRO
dw \1
ENDM
+TX_BCD: MACRO
+ db $2
+ dw \1
+ db \2
+ ENDM
+
; Predef macro.
PREDEF: MACRO
ld a, (\1 - PredefPointers) / 3
diff --git a/text.asm b/text.asm
index b89cfe42..0e93652b 100644
--- a/text.asm
+++ b/text.asm
@@ -992,13 +992,13 @@ _HiddenItemBagFullText:: ; 894e1 (22:54e1)
_FoundHiddenCoinsText:: ; 8950b (22:550b)
text $52, " found"
line "@"
- db $2, $a0, $ff, $c2 ; XXX $2
+ TX_BCD $ffa0, $c2
text " coins!@@"
_FoundHiddenCoins2Text:: ; 89523 (22:5523)
text $52, " found"
line "@"
- db $2, $a0, $ff, $c2 ; XXX $2 probably coins
+ TX_BCD $ffa0, $c2
text " coins!@@"
_DroppedHiddenCoinsText:: ; 8953b (22:553b)
@@ -1091,8 +1091,7 @@ _EnemyMonFaintedText:: ; 0x896c7
_MoneyForWinningText:: ; 896dd (22:56dd)
text $52, " got ¥@"
- ;XXX $2
- db $2, $79, $d0, $c3
+ TX_BCD wd079, $c3
db $0
line "for winning!"
prompt
@@ -1549,12 +1548,10 @@ _SafariZoneAngryText:: ; 89d6a (22:5d6a)
prompt
; money related
-; XXX $2 BCD macro
-; $2, pointer, byte
_PickUpPayDayMoneyText:: ; 89d80 (22:5d80)
text $52, " picked up"
line "¥@"
- db $2, $e5, $cc, $c3
+ TX_BCD wcce5, $c3
text "!"
prompt
@@ -2468,7 +2465,7 @@ _PokemartTellBuyPriceText:: ; a2619 (28:6619)
text "?"
line "That will be"
cont "¥@"
- db $2, $9f, $ff, $c3
+ TX_BCD $ff9f, $c3
text ". OK?"
done
@@ -2495,7 +2492,7 @@ _PokemonSellingGreetingText:: ; a2690 (28:6690)
_PokemartTellSellPriceText:: ; a26ae (28:66ae)
text "I can pay you"
line "¥@"
- db $2, $9f, $ff, $c3 ; XXX
+ TX_BCD $ff9f, $c3
text " for that."
done
@@ -2881,7 +2878,7 @@ _PlayedFluteHadEffectText:: ; a6928 (29:6928)
_CoinCaseNumCoinsText:: ; a6940 (29:6940)
text "Coins"
line "@"
- db $2, $a4, $d5, $c2 ; print BCD number
+ TX_BCD wPlayerCoins, $c2
text " "
prompt
diff --git a/text/maps/daycare_1.asm b/text/maps/daycare_1.asm
index 2c2314b2..a4182351 100644
--- a/text/maps/daycare_1.asm
+++ b/text/maps/daycare_1.asm
@@ -41,7 +41,7 @@ DayCareMText_8ac67:: ; 8ac67 (22:6c67)
_DayCareMText_56428:: ; 8ac7d (22:6c7d)
text "You owe me ¥@"
- db $2, $3f, $cd, $c2
+ TX_BCD wcd3f, $c2
db $0
line "for the return"
cont "of this #MON."
diff --git a/wram.asm b/wram.asm
index 40157540..16388d65 100755
--- a/wram.asm
+++ b/wram.asm
@@ -368,6 +368,7 @@ wTrainerSpriteOffset:: ; cd3d
wTrainerEngageDistance:: ; cd3e
ds 1
wTrainerFacingDirection:: ; cd3f
+wcd3f::
ds 1
wTrainerScreenY:: ; cd40
ds 1