ref: e2838892d69c12fdafe3a40bd7386e7b26506282
parent: dbe2360ecd3eb11fd144168427e1323f5e1b2ec2
parent: 94057c7726995b0da484a39c22497876b7c22997
author: Rangi <[email protected]>
date: Tue Mar 23 05:38:23 EDT 2021
Merge pull request #816 from Rangi42/lists Verify uneven list sizes with list_start, li, and assert_list_length macros
--- a/constants/deco_constants.asm
+++ b/constants/deco_constants.asm
@@ -18,7 +18,8 @@
NUM_DECO_TYPES EQU const_value - 1
; DecorationNames indexes (see data/decorations/names.asm)
- const_def 1
+ const_def
+ const CANCEL_DECO
const PUT_IT_AWAY
const MAGNAPLANT
const TROPICPLANT
@@ -44,6 +45,7 @@
const BLUE_CARPET
const YELLOW_CARPET
const GREEN_CARPET
+NUM_DECO_NAMES EQU const_value
; DoDecorationAction2.DecoActions indexes (see engine/overworld/decorations.asm)
const_def 1
--- a/data/battle/stat_names.asm
+++ b/data/battle/stat_names.asm
@@ -1,10 +1,12 @@
StatNames:
; entries correspond to stat ids
- db "ATTACK@"
- db "DEFENSE@"
- db "SPEED@"
- db "SPCL.ATK@"
- db "SPCL.DEF@"
- db "ACCURACY@"
- db "EVASION@"
- db "ABILITY@" ; used for BattleCommand_Curse
+ list_start StatNames
+ li "ATTACK"
+ li "DEFENSE"
+ li "SPEED"
+ li "SPCL.ATK"
+ li "SPCL.DEF"
+ li "ACCURACY"
+ li "EVASION"
+ li "ABILITY" ; used for BattleCommand_Curse
+ assert_list_length NUM_LEVEL_STATS
--- a/data/decorations/names.asm
+++ b/data/decorations/names.asm
@@ -1,28 +1,30 @@
DecorationNames:
; entries correspond to constants/deco_constants.asm
- db "CANCEL@"
- db "PUT IT AWAY@"
- db "MAGNAPLANT@"
- db "TROPICPLANT@"
- db "JUMBOPLANT@"
- db "TOWN MAP@"
- db "NES@"
- db "SUPER NES@"
- db "NINTENDO 64@"
- db "VIRTUAL BOY@"
- db "GOLD TROPHY@"
- db "SILVER TROPHY@"
- db "SURF PIKACHU DOLL@"
- db " BED@"
- db " CARPET@"
- db " POSTER@"
- db " DOLL@"
- db "BIG @"
- db "FEATHERY@"
- db "PIKACHU@"
- db "PINK@"
- db "POLKADOT@"
- db "RED@"
- db "BLUE@"
- db "YELLOW@"
- db "GREEN@"
+ list_start DecorationNames
+ li "CANCEL"
+ li "PUT IT AWAY"
+ li "MAGNAPLANT"
+ li "TROPICPLANT"
+ li "JUMBOPLANT"
+ li "TOWN MAP"
+ li "NES"
+ li "SUPER NES"
+ li "NINTENDO 64"
+ li "VIRTUAL BOY"
+ li "GOLD TROPHY"
+ li "SILVER TROPHY"
+ li "SURF PIKACHU DOLL"
+ li " BED"
+ li " CARPET"
+ li " POSTER"
+ li " DOLL"
+ li "BIG "
+ li "FEATHERY"
+ li "PIKACHU"
+ li "PINK"
+ li "POLKADOT"
+ li "RED"
+ li "BLUE"
+ li "YELLOW"
+ li "GREEN"
+ assert_list_length NUM_DECO_NAMES
--- a/data/items/names.asm
+++ b/data/items/names.asm
@@ -1,257 +1,262 @@
ItemNames::
- db "MASTER BALL@"
- db "ULTRA BALL@"
- db "BRIGHTPOWDER@"
- db "GREAT BALL@"
- db "# BALL@"
- db "TERU-SAMA@"
- db "BICYCLE@"
- db "MOON STONE@"
- db "ANTIDOTE@"
- db "BURN HEAL@"
- db "ICE HEAL@"
- db "AWAKENING@"
- db "PARLYZ HEAL@"
- db "FULL RESTORE@"
- db "MAX POTION@"
- db "HYPER POTION@"
- db "SUPER POTION@"
- db "POTION@"
- db "ESCAPE ROPE@"
- db "REPEL@"
- db "MAX ELIXER@"
- db "FIRE STONE@"
- db "THUNDERSTONE@"
- db "WATER STONE@"
- db "TERU-SAMA@"
- db "HP UP@"
- db "PROTEIN@"
- db "IRON@"
- db "CARBOS@"
- db "LUCKY PUNCH@"
- db "CALCIUM@"
- db "RARE CANDY@"
- db "X ACCURACY@"
- db "LEAF STONE@"
- db "METAL POWDER@"
- db "NUGGET@"
- db "# DOLL@"
- db "FULL HEAL@"
- db "REVIVE@"
- db "MAX REVIVE@"
- db "GUARD SPEC.@"
- db "SUPER REPEL@"
- db "MAX REPEL@"
- db "DIRE HIT@"
- db "TERU-SAMA@"
- db "FRESH WATER@"
- db "SODA POP@"
- db "LEMONADE@"
- db "X ATTACK@"
- db "TERU-SAMA@"
- db "X DEFEND@"
- db "X SPEED@"
- db "X SPECIAL@"
- db "COIN CASE@"
- db "ITEMFINDER@"
- db "TERU-SAMA@"
- db "EXP.SHARE@"
- db "OLD ROD@"
- db "GOOD ROD@"
- db "SILVER LEAF@"
- db "SUPER ROD@"
- db "PP UP@"
- db "ETHER@"
- db "MAX ETHER@"
- db "ELIXER@"
- db "RED SCALE@"
- db "SECRETPOTION@"
- db "S.S.TICKET@"
- db "MYSTERY EGG@"
- db "CLEAR BELL@"
- db "SILVER WING@"
- db "MOOMOO MILK@"
- db "QUICK CLAW@"
- db "PSNCUREBERRY@"
- db "GOLD LEAF@"
- db "SOFT SAND@"
- db "SHARP BEAK@"
- db "PRZCUREBERRY@"
- db "BURNT BERRY@"
- db "ICE BERRY@"
- db "POISON BARB@"
- db "KING'S ROCK@"
- db "BITTER BERRY@"
- db "MINT BERRY@"
- db "RED APRICORN@"
- db "TINYMUSHROOM@"
- db "BIG MUSHROOM@"
- db "SILVERPOWDER@"
- db "BLU APRICORN@"
- db "TERU-SAMA@"
- db "AMULET COIN@"
- db "YLW APRICORN@"
- db "GRN APRICORN@"
- db "CLEANSE TAG@"
- db "MYSTIC WATER@"
- db "TWISTEDSPOON@"
- db "WHT APRICORN@"
- db "BLACKBELT@"
- db "BLK APRICORN@"
- db "TERU-SAMA@"
- db "PNK APRICORN@"
- db "BLACKGLASSES@"
- db "SLOWPOKETAIL@"
- db "PINK BOW@"
- db "STICK@"
- db "SMOKE BALL@"
- db "NEVERMELTICE@"
- db "MAGNET@"
- db "MIRACLEBERRY@"
- db "PEARL@"
- db "BIG PEARL@"
- db "EVERSTONE@"
- db "SPELL TAG@"
- db "RAGECANDYBAR@"
- db "GS BALL@"
- db "BLUE CARD@"
- db "MIRACLE SEED@"
- db "THICK CLUB@"
- db "FOCUS BAND@"
- db "TERU-SAMA@"
- db "ENERGYPOWDER@"
- db "ENERGY ROOT@"
- db "HEAL POWDER@"
- db "REVIVAL HERB@"
- db "HARD STONE@"
- db "LUCKY EGG@"
- db "CARD KEY@"
- db "MACHINE PART@"
- db "EGG TICKET@"
- db "LOST ITEM@"
- db "STARDUST@"
- db "STAR PIECE@"
- db "BASEMENT KEY@"
- db "PASS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "CHARCOAL@"
- db "BERRY JUICE@"
- db "SCOPE LENS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "METAL COAT@"
- db "DRAGON FANG@"
- db "TERU-SAMA@"
- db "LEFTOVERS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "MYSTERYBERRY@"
- db "DRAGON SCALE@"
- db "BERSERK GENE@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "SACRED ASH@"
- db "HEAVY BALL@"
- db "FLOWER MAIL@"
- db "LEVEL BALL@"
- db "LURE BALL@"
- db "FAST BALL@"
- db "TERU-SAMA@"
- db "LIGHT BALL@"
- db "FRIEND BALL@"
- db "MOON BALL@"
- db "LOVE BALL@"
- db "NORMAL BOX@"
- db "GORGEOUS BOX@"
- db "SUN STONE@"
- db "POLKADOT BOW@"
- db "TERU-SAMA@"
- db "UP-GRADE@"
- db "BERRY@"
- db "GOLD BERRY@"
- db "SQUIRTBOTTLE@"
- db "TERU-SAMA@"
- db "PARK BALL@"
- db "RAINBOW WING@"
- db "TERU-SAMA@"
- db "BRICK PIECE@"
- db "SURF MAIL@"
- db "LITEBLUEMAIL@"
- db "PORTRAITMAIL@"
- db "LOVELY MAIL@"
- db "EON MAIL@"
- db "MORPH MAIL@"
- db "BLUESKY MAIL@"
- db "MUSIC MAIL@"
- db "MIRAGE MAIL@"
- db "TERU-SAMA@"
- db "TM01@"
- db "TM02@"
- db "TM03@"
- db "TM04@"
- db "TERU-SAMA@"
- db "TM05@"
- db "TM06@"
- db "TM07@"
- db "TM08@"
- db "TM09@"
- db "TM10@"
- db "TM11@"
- db "TM12@"
- db "TM13@"
- db "TM14@"
- db "TM15@"
- db "TM16@"
- db "TM17@"
- db "TM18@"
- db "TM19@"
- db "TM20@"
- db "TM21@"
- db "TM22@"
- db "TM23@"
- db "TM24@"
- db "TM25@"
- db "TM26@"
- db "TM27@"
- db "TM28@"
- db "TERU-SAMA@"
- db "TM29@"
- db "TM30@"
- db "TM31@"
- db "TM32@"
- db "TM33@"
- db "TM34@"
- db "TM35@"
- db "TM36@"
- db "TM37@"
- db "TM38@"
- db "TM39@"
- db "TM40@"
- db "TM41@"
- db "TM42@"
- db "TM43@"
- db "TM44@"
- db "TM45@"
- db "TM46@"
- db "TM47@"
- db "TM48@"
- db "TM49@"
- db "TM50@"
- db "HM01@"
- db "HM02@"
- db "HM03@"
- db "HM04@"
- db "HM05@"
- db "HM06@"
- db "HM07@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "?@"
+ list_start ItemNames
+ li "MASTER BALL"
+ li "ULTRA BALL"
+ li "BRIGHTPOWDER"
+ li "GREAT BALL"
+ li "# BALL"
+ li "TERU-SAMA"
+ li "BICYCLE"
+ li "MOON STONE"
+ li "ANTIDOTE"
+ li "BURN HEAL"
+ li "ICE HEAL"
+ li "AWAKENING"
+ li "PARLYZ HEAL"
+ li "FULL RESTORE"
+ li "MAX POTION"
+ li "HYPER POTION"
+ li "SUPER POTION"
+ li "POTION"
+ li "ESCAPE ROPE"
+ li "REPEL"
+ li "MAX ELIXER"
+ li "FIRE STONE"
+ li "THUNDERSTONE"
+ li "WATER STONE"
+ li "TERU-SAMA"
+ li "HP UP"
+ li "PROTEIN"
+ li "IRON"
+ li "CARBOS"
+ li "LUCKY PUNCH"
+ li "CALCIUM"
+ li "RARE CANDY"
+ li "X ACCURACY"
+ li "LEAF STONE"
+ li "METAL POWDER"
+ li "NUGGET"
+ li "# DOLL"
+ li "FULL HEAL"
+ li "REVIVE"
+ li "MAX REVIVE"
+ li "GUARD SPEC."
+ li "SUPER REPEL"
+ li "MAX REPEL"
+ li "DIRE HIT"
+ li "TERU-SAMA"
+ li "FRESH WATER"
+ li "SODA POP"
+ li "LEMONADE"
+ li "X ATTACK"
+ li "TERU-SAMA"
+ li "X DEFEND"
+ li "X SPEED"
+ li "X SPECIAL"
+ li "COIN CASE"
+ li "ITEMFINDER"
+ li "TERU-SAMA"
+ li "EXP.SHARE"
+ li "OLD ROD"
+ li "GOOD ROD"
+ li "SILVER LEAF"
+ li "SUPER ROD"
+ li "PP UP"
+ li "ETHER"
+ li "MAX ETHER"
+ li "ELIXER"
+ li "RED SCALE"
+ li "SECRETPOTION"
+ li "S.S.TICKET"
+ li "MYSTERY EGG"
+ li "CLEAR BELL"
+ li "SILVER WING"
+ li "MOOMOO MILK"
+ li "QUICK CLAW"
+ li "PSNCUREBERRY"
+ li "GOLD LEAF"
+ li "SOFT SAND"
+ li "SHARP BEAK"
+ li "PRZCUREBERRY"
+ li "BURNT BERRY"
+ li "ICE BERRY"
+ li "POISON BARB"
+ li "KING'S ROCK"
+ li "BITTER BERRY"
+ li "MINT BERRY"
+ li "RED APRICORN"
+ li "TINYMUSHROOM"
+ li "BIG MUSHROOM"
+ li "SILVERPOWDER"
+ li "BLU APRICORN"
+ li "TERU-SAMA"
+ li "AMULET COIN"
+ li "YLW APRICORN"
+ li "GRN APRICORN"
+ li "CLEANSE TAG"
+ li "MYSTIC WATER"
+ li "TWISTEDSPOON"
+ li "WHT APRICORN"
+ li "BLACKBELT"
+ li "BLK APRICORN"
+ li "TERU-SAMA"
+ li "PNK APRICORN"
+ li "BLACKGLASSES"
+ li "SLOWPOKETAIL"
+ li "PINK BOW"
+ li "STICK"
+ li "SMOKE BALL"
+ li "NEVERMELTICE"
+ li "MAGNET"
+ li "MIRACLEBERRY"
+ li "PEARL"
+ li "BIG PEARL"
+ li "EVERSTONE"
+ li "SPELL TAG"
+ li "RAGECANDYBAR"
+ li "GS BALL"
+ li "BLUE CARD"
+ li "MIRACLE SEED"
+ li "THICK CLUB"
+ li "FOCUS BAND"
+ li "TERU-SAMA"
+ li "ENERGYPOWDER"
+ li "ENERGY ROOT"
+ li "HEAL POWDER"
+ li "REVIVAL HERB"
+ li "HARD STONE"
+ li "LUCKY EGG"
+ li "CARD KEY"
+ li "MACHINE PART"
+ li "EGG TICKET"
+ li "LOST ITEM"
+ li "STARDUST"
+ li "STAR PIECE"
+ li "BASEMENT KEY"
+ li "PASS"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "CHARCOAL"
+ li "BERRY JUICE"
+ li "SCOPE LENS"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "METAL COAT"
+ li "DRAGON FANG"
+ li "TERU-SAMA"
+ li "LEFTOVERS"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "MYSTERYBERRY"
+ li "DRAGON SCALE"
+ li "BERSERK GENE"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "SACRED ASH"
+ li "HEAVY BALL"
+ li "FLOWER MAIL"
+ li "LEVEL BALL"
+ li "LURE BALL"
+ li "FAST BALL"
+ li "TERU-SAMA"
+ li "LIGHT BALL"
+ li "FRIEND BALL"
+ li "MOON BALL"
+ li "LOVE BALL"
+ li "NORMAL BOX"
+ li "GORGEOUS BOX"
+ li "SUN STONE"
+ li "POLKADOT BOW"
+ li "TERU-SAMA"
+ li "UP-GRADE"
+ li "BERRY"
+ li "GOLD BERRY"
+ li "SQUIRTBOTTLE"
+ li "TERU-SAMA"
+ li "PARK BALL"
+ li "RAINBOW WING"
+ li "TERU-SAMA"
+ li "BRICK PIECE"
+ li "SURF MAIL"
+ li "LITEBLUEMAIL"
+ li "PORTRAITMAIL"
+ li "LOVELY MAIL"
+ li "EON MAIL"
+ li "MORPH MAIL"
+ li "BLUESKY MAIL"
+ li "MUSIC MAIL"
+ li "MIRAGE MAIL"
+ li "TERU-SAMA"
+ assert_list_length NUM_ITEMS
+ li "TM01"
+ li "TM02"
+ li "TM03"
+ li "TM04"
+ li "TERU-SAMA"
+ li "TM05"
+ li "TM06"
+ li "TM07"
+ li "TM08"
+ li "TM09"
+ li "TM10"
+ li "TM11"
+ li "TM12"
+ li "TM13"
+ li "TM14"
+ li "TM15"
+ li "TM16"
+ li "TM17"
+ li "TM18"
+ li "TM19"
+ li "TM20"
+ li "TM21"
+ li "TM22"
+ li "TM23"
+ li "TM24"
+ li "TM25"
+ li "TM26"
+ li "TM27"
+ li "TM28"
+ li "TERU-SAMA"
+ li "TM29"
+ li "TM30"
+ li "TM31"
+ li "TM32"
+ li "TM33"
+ li "TM34"
+ li "TM35"
+ li "TM36"
+ li "TM37"
+ li "TM38"
+ li "TM39"
+ li "TM40"
+ li "TM41"
+ li "TM42"
+ li "TM43"
+ li "TM44"
+ li "TM45"
+ li "TM46"
+ li "TM47"
+ li "TM48"
+ li "TM49"
+ li "TM50"
+ assert_list_length NUM_ITEMS + NUM_TMS + 2 ; count ITEM_C3 and ITEM_DC
+ li "HM01"
+ li "HM02"
+ li "HM03"
+ li "HM04"
+ li "HM05"
+ li "HM06"
+ li "HM07"
+ assert_list_length NUM_ITEMS + NUM_TMS + 2 + NUM_HMS ; count ITEM_C3 and ITEM_DC
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "TERU-SAMA"
+ li "?"
+ assert_list_length $100
--- a/data/mon_menu.asm
+++ b/data/mon_menu.asm
@@ -7,16 +7,19 @@
const MONMENUVALUE_MOVE ; 5
const MONMENUVALUE_MAIL ; 6
const MONMENUVALUE_ERROR ; 7
+NUM_MONMENUVALUES EQU const_value - 1
MonMenuOptionStrings:
; entries correspond to MONMENUVALUE_* constants
- db "STATS@"
- db "SWITCH@"
- db "ITEM@"
- db "CANCEL@"
- db "MOVE@"
- db "MAIL@"
- db "ERROR!@"
+ list_start MonMenuOptionStrings
+ li "STATS"
+ li "SWITCH"
+ li "ITEM"
+ li "CANCEL"
+ li "MOVE"
+ li "MAIL"
+ li "ERROR!"
+ assert_list_length NUM_MONMENUVALUES
MonMenuOptions:
; category, item, value; actions are in PokemonActionSubmenu (see engine/pokemon/mon_menu.asm)
--- a/data/moves/names.asm
+++ b/data/moves/names.asm
@@ -1,252 +1,254 @@
MoveNames::
- db "POUND@"
- db "KARATE CHOP@"
- db "DOUBLESLAP@"
- db "COMET PUNCH@"
- db "MEGA PUNCH@"
- db "PAY DAY@"
- db "FIRE PUNCH@"
- db "ICE PUNCH@"
- db "THUNDERPUNCH@"
- db "SCRATCH@"
- db "VICEGRIP@"
- db "GUILLOTINE@"
- db "RAZOR WIND@"
- db "SWORDS DANCE@"
- db "CUT@"
- db "GUST@"
- db "WING ATTACK@"
- db "WHIRLWIND@"
- db "FLY@"
- db "BIND@"
- db "SLAM@"
- db "VINE WHIP@"
- db "STOMP@"
- db "DOUBLE KICK@"
- db "MEGA KICK@"
- db "JUMP KICK@"
- db "ROLLING KICK@"
- db "SAND-ATTACK@"
- db "HEADBUTT@"
- db "HORN ATTACK@"
- db "FURY ATTACK@"
- db "HORN DRILL@"
- db "TACKLE@"
- db "BODY SLAM@"
- db "WRAP@"
- db "TAKE DOWN@"
- db "THRASH@"
- db "DOUBLE-EDGE@"
- db "TAIL WHIP@"
- db "POISON STING@"
- db "TWINEEDLE@"
- db "PIN MISSILE@"
- db "LEER@"
- db "BITE@"
- db "GROWL@"
- db "ROAR@"
- db "SING@"
- db "SUPERSONIC@"
- db "SONICBOOM@"
- db "DISABLE@"
- db "ACID@"
- db "EMBER@"
- db "FLAMETHROWER@"
- db "MIST@"
- db "WATER GUN@"
- db "HYDRO PUMP@"
- db "SURF@"
- db "ICE BEAM@"
- db "BLIZZARD@"
- db "PSYBEAM@"
- db "BUBBLEBEAM@"
- db "AURORA BEAM@"
- db "HYPER BEAM@"
- db "PECK@"
- db "DRILL PECK@"
- db "SUBMISSION@"
- db "LOW KICK@"
- db "COUNTER@"
- db "SEISMIC TOSS@"
- db "STRENGTH@"
- db "ABSORB@"
- db "MEGA DRAIN@"
- db "LEECH SEED@"
- db "GROWTH@"
- db "RAZOR LEAF@"
- db "SOLARBEAM@"
- db "POISONPOWDER@"
- db "STUN SPORE@"
- db "SLEEP POWDER@"
- db "PETAL DANCE@"
- db "STRING SHOT@"
- db "DRAGON RAGE@"
- db "FIRE SPIN@"
- db "THUNDERSHOCK@"
- db "THUNDERBOLT@"
- db "THUNDER WAVE@"
- db "THUNDER@"
- db "ROCK THROW@"
- db "EARTHQUAKE@"
- db "FISSURE@"
- db "DIG@"
- db "TOXIC@"
- db "CONFUSION@"
- db "PSYCHIC@"
- db "HYPNOSIS@"
- db "MEDITATE@"
- db "AGILITY@"
- db "QUICK ATTACK@"
- db "RAGE@"
- db "TELEPORT@"
- db "NIGHT SHADE@"
- db "MIMIC@"
- db "SCREECH@"
- db "DOUBLE TEAM@"
- db "RECOVER@"
- db "HARDEN@"
- db "MINIMIZE@"
- db "SMOKESCREEN@"
- db "CONFUSE RAY@"
- db "WITHDRAW@"
- db "DEFENSE CURL@"
- db "BARRIER@"
- db "LIGHT SCREEN@"
- db "HAZE@"
- db "REFLECT@"
- db "FOCUS ENERGY@"
- db "BIDE@"
- db "METRONOME@"
- db "MIRROR MOVE@"
- db "SELFDESTRUCT@"
- db "EGG BOMB@"
- db "LICK@"
- db "SMOG@"
- db "SLUDGE@"
- db "BONE CLUB@"
- db "FIRE BLAST@"
- db "WATERFALL@"
- db "CLAMP@"
- db "SWIFT@"
- db "SKULL BASH@"
- db "SPIKE CANNON@"
- db "CONSTRICT@"
- db "AMNESIA@"
- db "KINESIS@"
- db "SOFTBOILED@"
- db "HI JUMP KICK@"
- db "GLARE@"
- db "DREAM EATER@"
- db "POISON GAS@"
- db "BARRAGE@"
- db "LEECH LIFE@"
- db "LOVELY KISS@"
- db "SKY ATTACK@"
- db "TRANSFORM@"
- db "BUBBLE@"
- db "DIZZY PUNCH@"
- db "SPORE@"
- db "FLASH@"
- db "PSYWAVE@"
- db "SPLASH@"
- db "ACID ARMOR@"
- db "CRABHAMMER@"
- db "EXPLOSION@"
- db "FURY SWIPES@"
- db "BONEMERANG@"
- db "REST@"
- db "ROCK SLIDE@"
- db "HYPER FANG@"
- db "SHARPEN@"
- db "CONVERSION@"
- db "TRI ATTACK@"
- db "SUPER FANG@"
- db "SLASH@"
- db "SUBSTITUTE@"
- db "STRUGGLE@"
- db "SKETCH@"
- db "TRIPLE KICK@"
- db "THIEF@"
- db "SPIDER WEB@"
- db "MIND READER@"
- db "NIGHTMARE@"
- db "FLAME WHEEL@"
- db "SNORE@"
- db "CURSE@"
- db "FLAIL@"
- db "CONVERSION2@"
- db "AEROBLAST@"
- db "COTTON SPORE@"
- db "REVERSAL@"
- db "SPITE@"
- db "POWDER SNOW@"
- db "PROTECT@"
- db "MACH PUNCH@"
- db "SCARY FACE@"
- db "FAINT ATTACK@"
- db "SWEET KISS@"
- db "BELLY DRUM@"
- db "SLUDGE BOMB@"
- db "MUD-SLAP@"
- db "OCTAZOOKA@"
- db "SPIKES@"
- db "ZAP CANNON@"
- db "FORESIGHT@"
- db "DESTINY BOND@"
- db "PERISH SONG@"
- db "ICY WIND@"
- db "DETECT@"
- db "BONE RUSH@"
- db "LOCK-ON@"
- db "OUTRAGE@"
- db "SANDSTORM@"
- db "GIGA DRAIN@"
- db "ENDURE@"
- db "CHARM@"
- db "ROLLOUT@"
- db "FALSE SWIPE@"
- db "SWAGGER@"
- db "MILK DRINK@"
- db "SPARK@"
- db "FURY CUTTER@"
- db "STEEL WING@"
- db "MEAN LOOK@"
- db "ATTRACT@"
- db "SLEEP TALK@"
- db "HEAL BELL@"
- db "RETURN@"
- db "PRESENT@"
- db "FRUSTRATION@"
- db "SAFEGUARD@"
- db "PAIN SPLIT@"
- db "SACRED FIRE@"
- db "MAGNITUDE@"
- db "DYNAMICPUNCH@"
- db "MEGAHORN@"
- db "DRAGONBREATH@"
- db "BATON PASS@"
- db "ENCORE@"
- db "PURSUIT@"
- db "RAPID SPIN@"
- db "SWEET SCENT@"
- db "IRON TAIL@"
- db "METAL CLAW@"
- db "VITAL THROW@"
- db "MORNING SUN@"
- db "SYNTHESIS@"
- db "MOONLIGHT@"
- db "HIDDEN POWER@"
- db "CROSS CHOP@"
- db "TWISTER@"
- db "RAIN DANCE@"
- db "SUNNY DAY@"
- db "CRUNCH@"
- db "MIRROR COAT@"
- db "PSYCH UP@"
- db "EXTREMESPEED@"
- db "ANCIENTPOWER@"
- db "SHADOW BALL@"
- db "FUTURE SIGHT@"
- db "ROCK SMASH@"
- db "WHIRLPOOL@"
- db "BEAT UP@"
+ list_start MoveNames
+ li "POUND"
+ li "KARATE CHOP"
+ li "DOUBLESLAP"
+ li "COMET PUNCH"
+ li "MEGA PUNCH"
+ li "PAY DAY"
+ li "FIRE PUNCH"
+ li "ICE PUNCH"
+ li "THUNDERPUNCH"
+ li "SCRATCH"
+ li "VICEGRIP"
+ li "GUILLOTINE"
+ li "RAZOR WIND"
+ li "SWORDS DANCE"
+ li "CUT"
+ li "GUST"
+ li "WING ATTACK"
+ li "WHIRLWIND"
+ li "FLY"
+ li "BIND"
+ li "SLAM"
+ li "VINE WHIP"
+ li "STOMP"
+ li "DOUBLE KICK"
+ li "MEGA KICK"
+ li "JUMP KICK"
+ li "ROLLING KICK"
+ li "SAND-ATTACK"
+ li "HEADBUTT"
+ li "HORN ATTACK"
+ li "FURY ATTACK"
+ li "HORN DRILL"
+ li "TACKLE"
+ li "BODY SLAM"
+ li "WRAP"
+ li "TAKE DOWN"
+ li "THRASH"
+ li "DOUBLE-EDGE"
+ li "TAIL WHIP"
+ li "POISON STING"
+ li "TWINEEDLE"
+ li "PIN MISSILE"
+ li "LEER"
+ li "BITE"
+ li "GROWL"
+ li "ROAR"
+ li "SING"
+ li "SUPERSONIC"
+ li "SONICBOOM"
+ li "DISABLE"
+ li "ACID"
+ li "EMBER"
+ li "FLAMETHROWER"
+ li "MIST"
+ li "WATER GUN"
+ li "HYDRO PUMP"
+ li "SURF"
+ li "ICE BEAM"
+ li "BLIZZARD"
+ li "PSYBEAM"
+ li "BUBBLEBEAM"
+ li "AURORA BEAM"
+ li "HYPER BEAM"
+ li "PECK"
+ li "DRILL PECK"
+ li "SUBMISSION"
+ li "LOW KICK"
+ li "COUNTER"
+ li "SEISMIC TOSS"
+ li "STRENGTH"
+ li "ABSORB"
+ li "MEGA DRAIN"
+ li "LEECH SEED"
+ li "GROWTH"
+ li "RAZOR LEAF"
+ li "SOLARBEAM"
+ li "POISONPOWDER"
+ li "STUN SPORE"
+ li "SLEEP POWDER"
+ li "PETAL DANCE"
+ li "STRING SHOT"
+ li "DRAGON RAGE"
+ li "FIRE SPIN"
+ li "THUNDERSHOCK"
+ li "THUNDERBOLT"
+ li "THUNDER WAVE"
+ li "THUNDER"
+ li "ROCK THROW"
+ li "EARTHQUAKE"
+ li "FISSURE"
+ li "DIG"
+ li "TOXIC"
+ li "CONFUSION"
+ li "PSYCHIC"
+ li "HYPNOSIS"
+ li "MEDITATE"
+ li "AGILITY"
+ li "QUICK ATTACK"
+ li "RAGE"
+ li "TELEPORT"
+ li "NIGHT SHADE"
+ li "MIMIC"
+ li "SCREECH"
+ li "DOUBLE TEAM"
+ li "RECOVER"
+ li "HARDEN"
+ li "MINIMIZE"
+ li "SMOKESCREEN"
+ li "CONFUSE RAY"
+ li "WITHDRAW"
+ li "DEFENSE CURL"
+ li "BARRIER"
+ li "LIGHT SCREEN"
+ li "HAZE"
+ li "REFLECT"
+ li "FOCUS ENERGY"
+ li "BIDE"
+ li "METRONOME"
+ li "MIRROR MOVE"
+ li "SELFDESTRUCT"
+ li "EGG BOMB"
+ li "LICK"
+ li "SMOG"
+ li "SLUDGE"
+ li "BONE CLUB"
+ li "FIRE BLAST"
+ li "WATERFALL"
+ li "CLAMP"
+ li "SWIFT"
+ li "SKULL BASH"
+ li "SPIKE CANNON"
+ li "CONSTRICT"
+ li "AMNESIA"
+ li "KINESIS"
+ li "SOFTBOILED"
+ li "HI JUMP KICK"
+ li "GLARE"
+ li "DREAM EATER"
+ li "POISON GAS"
+ li "BARRAGE"
+ li "LEECH LIFE"
+ li "LOVELY KISS"
+ li "SKY ATTACK"
+ li "TRANSFORM"
+ li "BUBBLE"
+ li "DIZZY PUNCH"
+ li "SPORE"
+ li "FLASH"
+ li "PSYWAVE"
+ li "SPLASH"
+ li "ACID ARMOR"
+ li "CRABHAMMER"
+ li "EXPLOSION"
+ li "FURY SWIPES"
+ li "BONEMERANG"
+ li "REST"
+ li "ROCK SLIDE"
+ li "HYPER FANG"
+ li "SHARPEN"
+ li "CONVERSION"
+ li "TRI ATTACK"
+ li "SUPER FANG"
+ li "SLASH"
+ li "SUBSTITUTE"
+ li "STRUGGLE"
+ li "SKETCH"
+ li "TRIPLE KICK"
+ li "THIEF"
+ li "SPIDER WEB"
+ li "MIND READER"
+ li "NIGHTMARE"
+ li "FLAME WHEEL"
+ li "SNORE"
+ li "CURSE"
+ li "FLAIL"
+ li "CONVERSION2"
+ li "AEROBLAST"
+ li "COTTON SPORE"
+ li "REVERSAL"
+ li "SPITE"
+ li "POWDER SNOW"
+ li "PROTECT"
+ li "MACH PUNCH"
+ li "SCARY FACE"
+ li "FAINT ATTACK"
+ li "SWEET KISS"
+ li "BELLY DRUM"
+ li "SLUDGE BOMB"
+ li "MUD-SLAP"
+ li "OCTAZOOKA"
+ li "SPIKES"
+ li "ZAP CANNON"
+ li "FORESIGHT"
+ li "DESTINY BOND"
+ li "PERISH SONG"
+ li "ICY WIND"
+ li "DETECT"
+ li "BONE RUSH"
+ li "LOCK-ON"
+ li "OUTRAGE"
+ li "SANDSTORM"
+ li "GIGA DRAIN"
+ li "ENDURE"
+ li "CHARM"
+ li "ROLLOUT"
+ li "FALSE SWIPE"
+ li "SWAGGER"
+ li "MILK DRINK"
+ li "SPARK"
+ li "FURY CUTTER"
+ li "STEEL WING"
+ li "MEAN LOOK"
+ li "ATTRACT"
+ li "SLEEP TALK"
+ li "HEAL BELL"
+ li "RETURN"
+ li "PRESENT"
+ li "FRUSTRATION"
+ li "SAFEGUARD"
+ li "PAIN SPLIT"
+ li "SACRED FIRE"
+ li "MAGNITUDE"
+ li "DYNAMICPUNCH"
+ li "MEGAHORN"
+ li "DRAGONBREATH"
+ li "BATON PASS"
+ li "ENCORE"
+ li "PURSUIT"
+ li "RAPID SPIN"
+ li "SWEET SCENT"
+ li "IRON TAIL"
+ li "METAL CLAW"
+ li "VITAL THROW"
+ li "MORNING SUN"
+ li "SYNTHESIS"
+ li "MOONLIGHT"
+ li "HIDDEN POWER"
+ li "CROSS CHOP"
+ li "TWISTER"
+ li "RAIN DANCE"
+ li "SUNNY DAY"
+ li "CRUNCH"
+ li "MIRROR COAT"
+ li "PSYCH UP"
+ li "EXTREMESPEED"
+ li "ANCIENTPOWER"
+ li "SHADOW BALL"
+ li "FUTURE SIGHT"
+ li "ROCK SMASH"
+ li "WHIRLPOOL"
+ li "BEAT UP"
+ assert_list_length NUM_ATTACKS
--- a/data/player_names.asm
+++ b/data/player_names.asm
@@ -14,7 +14,7 @@
db "MAT@"
db "ALLAN@"
db "JON@"
- db 2 ; displacement
+ db 2 ; title indent
db " NAME @" ; title
KrisNameMenuHeader:
--- a/data/trainers/class_names.asm
+++ b/data/trainers/class_names.asm
@@ -1,69 +1,71 @@
TrainerClassNames::
; entries correspond to trainer classes (see constants/trainer_constants.asm)
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "RIVAL@"
- db "#MON PROF.@"
- db "ELITE FOUR@"
- db "<PKMN> TRAINER@"
- db "ELITE FOUR@"
- db "ELITE FOUR@"
- db "ELITE FOUR@"
- db "CHAMPION@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "SCIENTIST@"
- db "LEADER@"
- db "YOUNGSTER@"
- db "SCHOOLBOY@"
- db "BIRD KEEPER@"
- db "LASS@"
- db "LEADER@"
- db "COOLTRAINER@"
- db "COOLTRAINER@"
- db "BEAUTY@"
- db "#MANIAC@"
- db "ROCKET@"
- db "GENTLEMAN@"
- db "SKIER@"
- db "TEACHER@"
- db "LEADER@"
- db "BUG CATCHER@"
- db "FISHER@"
- db "SWIMMER♂@"
- db "SWIMMER♀@"
- db "SAILOR@"
- db "SUPER NERD@"
- db "RIVAL@"
- db "GUITARIST@"
- db "HIKER@"
- db "BIKER@"
- db "LEADER@"
- db "BURGLAR@"
- db "FIREBREATHER@"
- db "JUGGLER@"
- db "BLACKBELT@"
- db "ROCKET@"
- db "PSYCHIC@"
- db "PICNICKER@"
- db "CAMPER@"
- db "ROCKET@"
- db "SAGE@"
- db "MEDIUM@"
- db "BOARDER@"
- db "#FAN@"
- db "KIMONO GIRL@"
- db "TWINS@"
- db "#FAN@"
- db "<PKMN> TRAINER@"
- db "LEADER@"
- db "OFFICER@"
- db "ROCKET@"
- db "MYSTICALMAN@"
+ list_start TrainerClassNames
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "RIVAL"
+ li "#MON PROF."
+ li "ELITE FOUR"
+ li "<PKMN> TRAINER"
+ li "ELITE FOUR"
+ li "ELITE FOUR"
+ li "ELITE FOUR"
+ li "CHAMPION"
+ li "LEADER"
+ li "LEADER"
+ li "LEADER"
+ li "SCIENTIST"
+ li "LEADER"
+ li "YOUNGSTER"
+ li "SCHOOLBOY"
+ li "BIRD KEEPER"
+ li "LASS"
+ li "LEADER"
+ li "COOLTRAINER"
+ li "COOLTRAINER"
+ li "BEAUTY"
+ li "#MANIAC"
+ li "ROCKET"
+ li "GENTLEMAN"
+ li "SKIER"
+ li "TEACHER"
+ li "LEADER"
+ li "BUG CATCHER"
+ li "FISHER"
+ li "SWIMMER♂"
+ li "SWIMMER♀"
+ li "SAILOR"
+ li "SUPER NERD"
+ li "RIVAL"
+ li "GUITARIST"
+ li "HIKER"
+ li "BIKER"
+ li "LEADER"
+ li "BURGLAR"
+ li "FIREBREATHER"
+ li "JUGGLER"
+ li "BLACKBELT"
+ li "ROCKET"
+ li "PSYCHIC"
+ li "PICNICKER"
+ li "CAMPER"
+ li "ROCKET"
+ li "SAGE"
+ li "MEDIUM"
+ li "BOARDER"
+ li "#FAN"
+ li "KIMONO GIRL"
+ li "TWINS"
+ li "#FAN"
+ li "<PKMN> TRAINER"
+ li "LEADER"
+ li "OFFICER"
+ li "ROCKET"
+ li "MYSTICALMAN"
+ assert_list_length NUM_TRAINER_CLASSES
--- a/data/wild/roammon_maps.asm
+++ b/data/wild/roammon_maps.asm
@@ -9,10 +9,11 @@
shift
endr
db 0
+list_index = list_index + 1
ENDM
RoamMaps:
-; there are NUM_ROAMMON_MAPS entries
+ list_start RoamMaps
; start map, ...other maps
roam_map ROUTE_29, ROUTE_30, ROUTE_46
roam_map ROUTE_30, ROUTE_29, ROUTE_31
@@ -30,4 +31,5 @@
roam_map ROUTE_44, ROUTE_42, ROUTE_43, ROUTE_45
roam_map ROUTE_45, ROUTE_44, ROUTE_46
roam_map ROUTE_46, ROUTE_45, ROUTE_29
+ assert_list_length NUM_ROAMMON_MAPS
db -1 ; end
--- a/macros/asserts.asm
+++ b/macros/asserts.asm
@@ -19,6 +19,31 @@
"{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes"
ENDM
+list_start: MACRO
+list_index = 0
+if DEF(CURRENT_LIST_START)
+PURGE CURRENT_LIST_START
+endc
+if _NARG == 1
+CURRENT_LIST_START EQUS "\1"
+else
+CURRENT_LIST_START EQUS "._list_start\@"
+CURRENT_LIST_START:
+endc
+ENDM
+
+li: MACRO
+ assert !STRIN(\1, "@"), STRCAT("String terminator \"@\" in list entry: ", \1)
+ db \1, "@"
+list_index = list_index + 1
+ENDM
+
+assert_list_length: MACRO
+x = \1
+ assert x == list_index, \
+ "{CURRENT_LIST_START}: expected {d:x} entries, got {d:list_index}"
+ENDM
+
def_grass_wildmons: MACRO
;\1: map id
if DEF(CURRENT_GRASS_WILDMONS_MAP)