ref: c9bed2d44709a875dd2ed338ed192aec855ad6b2
parent: adc6a3aac7d883f9833c7da3f5896935715291e7
author: IIMarckus <iimarckus@gmail.com>
date: Fri Apr 8 16:16:42 EDT 2016
Add a TX_MART macro for inventories.
--- a/data/mart_inventories.asm
+++ b/data/mart_inventories.asm
@@ -1,75 +1,64 @@
; mart inventories are below
; they are texts
-; first byte $FE, next byte # of items, last byte $FF
; Viridian
ViridianCashierText::
- db $FE,4,POKE_BALL,ANTIDOTE,PARLYZ_HEAL,BURN_HEAL,$FF
+ TX_MART POKE_BALL, ANTIDOTE, PARLYZ_HEAL, BURN_HEAL
; Pewter
PewterCashierText::
- db $FE,7,POKE_BALL,POTION,ESCAPE_ROPE,ANTIDOTE,BURN_HEAL,AWAKENING
- db PARLYZ_HEAL,$FF
+ TX_MART POKE_BALL, POTION, ESCAPE_ROPE, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL
; Cerulean
CeruleanCashierText::
- db $FE,7,POKE_BALL,POTION,REPEL,ANTIDOTE,BURN_HEAL,AWAKENING
- db PARLYZ_HEAL,$FF
+ TX_MART POKE_BALL, POTION, REPEL, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL
; Bike shop
- db $FE,1,BICYCLE,$FF
+ TX_MART BICYCLE
; Vermilion
VermilionCashierText::
- db $FE,6,POKE_BALL,SUPER_POTION,ICE_HEAL,AWAKENING,PARLYZ_HEAL
- db REPEL,$FF
+ TX_MART POKE_BALL, SUPER_POTION, ICE_HEAL, AWAKENING, PARLYZ_HEAL, REPEL
; Lavender
LavenderCashierText::
- db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,ESCAPE_ROPE,SUPER_REPEL
- db ANTIDOTE,BURN_HEAL,ICE_HEAL,PARLYZ_HEAL,$FF
+ TX_MART GREAT_BALL, SUPER_POTION, REVIVE, ESCAPE_ROPE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, PARLYZ_HEAL
; Celadon Dept. Store 2F (1)
CeladonMart2Clerk1Text::
- db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,SUPER_REPEL,ANTIDOTE
- db BURN_HEAL,ICE_HEAL,AWAKENING,PARLYZ_HEAL,$FF
+ TX_MART GREAT_BALL, SUPER_POTION, REVIVE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, AWAKENING, PARLYZ_HEAL
; Celadon Dept. Store 2F (2)
CeladonMart2Clerk2Text::
- db $FE,9,TM_32,TM_33,TM_02,TM_07,TM_37,TM_01,TM_05,TM_09,TM_17,$FF
+ TX_MART TM_32, TM_33, TM_02, TM_07, TM_37, TM_01, TM_05, TM_09, TM_17
; Celadon Dept. Store 4F
CeladonMart4ClerkText::
- db $FE,5,POKE_DOLL,FIRE_STONE,THUNDER_STONE,WATER_STONE,LEAF_STONE,$FF
+ TX_MART POKE_DOLL, FIRE_STONE, THUNDER_STONE, WATER_STONE, LEAF_STONE
; Celadon Dept. Store 5F (1)
CeladonMart5Clerk1Text::
- db $FE,7,X_ACCURACY,GUARD_SPEC,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED
- db X_SPECIAL,$FF
+ TX_MART X_ACCURACY, GUARD_SPEC, DIRE_HIT, X_ATTACK, X_DEFEND, X_SPEED, X_SPECIAL
; Celadon Dept. Store 5F (2)
CeladonMart5Clerk2Text::
- db $FE,5,HP_UP,PROTEIN,IRON,CARBOS,CALCIUM,$FF
+ TX_MART HP_UP, PROTEIN, IRON, CARBOS, CALCIUM
; Fuchsia
FuchsiaCashierText::
- db $FE,6,ULTRA_BALL,GREAT_BALL,SUPER_POTION,REVIVE,FULL_HEAL
- db SUPER_REPEL,$FF
+ TX_MART ULTRA_BALL, GREAT_BALL, SUPER_POTION, REVIVE, FULL_HEAL, SUPER_REPEL
; unused?
- db $FE,5,GREAT_BALL,HYPER_POTION,SUPER_POTION,FULL_HEAL,REVIVE,$FF
+ TX_MART GREAT_BALL, HYPER_POTION, SUPER_POTION, FULL_HEAL, REVIVE
; Cinnabar
CinnabarCashierText::
- db $FE,7,ULTRA_BALL,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE
- db FULL_HEAL,REVIVE,$FF
+ TX_MART ULTRA_BALL, GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE
; Saffron
SaffronCashierText::
- db $FE,6,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL
- db REVIVE,$FF
+ TX_MART GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE
; Indigo
IndigoCashierText::
- db $FE,7,ULTRA_BALL,GREAT_BALL,FULL_RESTORE,MAX_POTION,FULL_HEAL
- db REVIVE,MAX_REPEL,$FF
+ TX_MART ULTRA_BALL, GREAT_BALL, FULL_RESTORE, MAX_POTION, FULL_HEAL, REVIVE, MAX_REPEL
--- a/macros.asm
+++ b/macros.asm
@@ -214,6 +214,15 @@
db $08
ENDM
+TX_MART: MACRO
+ db $FE, _NARG
+ rept _NARG
+ db \1
+ shift
+ endr
+ db $FF
+ ENDM
+
; Predef macro.
add_predef: MACRO
\1Predef::