Verify uneven list sizes with list_start, li, and assert_list_length macros

This was discussed in #815
This commit is contained in:
Rangi 2021-03-22 17:15:21 -04:00
parent dbe2360ecd
commit 94057c7726
10 changed files with 663 additions and 618 deletions

View File

@ -18,7 +18,8 @@ DECOATTR_STRUCT_LENGTH EQU _RS
NUM_DECO_TYPES EQU const_value - 1 NUM_DECO_TYPES EQU const_value - 1
; DecorationNames indexes (see data/decorations/names.asm) ; DecorationNames indexes (see data/decorations/names.asm)
const_def 1 const_def
const CANCEL_DECO
const PUT_IT_AWAY const PUT_IT_AWAY
const MAGNAPLANT const MAGNAPLANT
const TROPICPLANT const TROPICPLANT
@ -44,6 +45,7 @@ NUM_DECO_TYPES EQU const_value - 1
const BLUE_CARPET const BLUE_CARPET
const YELLOW_CARPET const YELLOW_CARPET
const GREEN_CARPET const GREEN_CARPET
NUM_DECO_NAMES EQU const_value
; DoDecorationAction2.DecoActions indexes (see engine/overworld/decorations.asm) ; DoDecorationAction2.DecoActions indexes (see engine/overworld/decorations.asm)
const_def 1 const_def 1

View File

@ -1,10 +1,12 @@
StatNames: StatNames:
; entries correspond to stat ids ; entries correspond to stat ids
db "ATTACK@" list_start StatNames
db "DEFENSE@" li "ATTACK"
db "SPEED@" li "DEFENSE"
db "SPCL.ATK@" li "SPEED"
db "SPCL.DEF@" li "SPCL.ATK"
db "ACCURACY@" li "SPCL.DEF"
db "EVASION@" li "ACCURACY"
db "ABILITY@" ; used for BattleCommand_Curse li "EVASION"
li "ABILITY" ; used for BattleCommand_Curse
assert_list_length NUM_LEVEL_STATS

View File

@ -1,28 +1,30 @@
DecorationNames: DecorationNames:
; entries correspond to constants/deco_constants.asm ; entries correspond to constants/deco_constants.asm
db "CANCEL@" list_start DecorationNames
db "PUT IT AWAY@" li "CANCEL"
db "MAGNAPLANT@" li "PUT IT AWAY"
db "TROPICPLANT@" li "MAGNAPLANT"
db "JUMBOPLANT@" li "TROPICPLANT"
db "TOWN MAP@" li "JUMBOPLANT"
db "NES@" li "TOWN MAP"
db "SUPER NES@" li "NES"
db "NINTENDO 64@" li "SUPER NES"
db "VIRTUAL BOY@" li "NINTENDO 64"
db "GOLD TROPHY@" li "VIRTUAL BOY"
db "SILVER TROPHY@" li "GOLD TROPHY"
db "SURF PIKACHU DOLL@" li "SILVER TROPHY"
db " BED@" li "SURF PIKACHU DOLL"
db " CARPET@" li " BED"
db " POSTER@" li " CARPET"
db " DOLL@" li " POSTER"
db "BIG @" li " DOLL"
db "FEATHERY@" li "BIG "
db "PIKACHU@" li "FEATHERY"
db "PINK@" li "PIKACHU"
db "POLKADOT@" li "PINK"
db "RED@" li "POLKADOT"
db "BLUE@" li "RED"
db "YELLOW@" li "BLUE"
db "GREEN@" li "YELLOW"
li "GREEN"
assert_list_length NUM_DECO_NAMES

View File

@ -1,257 +1,262 @@
ItemNames:: ItemNames::
db "MASTER BALL@" list_start ItemNames
db "ULTRA BALL@" li "MASTER BALL"
db "BRIGHTPOWDER@" li "ULTRA BALL"
db "GREAT BALL@" li "BRIGHTPOWDER"
db "# BALL@" li "GREAT BALL"
db "TERU-SAMA@" li "# BALL"
db "BICYCLE@" li "TERU-SAMA"
db "MOON STONE@" li "BICYCLE"
db "ANTIDOTE@" li "MOON STONE"
db "BURN HEAL@" li "ANTIDOTE"
db "ICE HEAL@" li "BURN HEAL"
db "AWAKENING@" li "ICE HEAL"
db "PARLYZ HEAL@" li "AWAKENING"
db "FULL RESTORE@" li "PARLYZ HEAL"
db "MAX POTION@" li "FULL RESTORE"
db "HYPER POTION@" li "MAX POTION"
db "SUPER POTION@" li "HYPER POTION"
db "POTION@" li "SUPER POTION"
db "ESCAPE ROPE@" li "POTION"
db "REPEL@" li "ESCAPE ROPE"
db "MAX ELIXER@" li "REPEL"
db "FIRE STONE@" li "MAX ELIXER"
db "THUNDERSTONE@" li "FIRE STONE"
db "WATER STONE@" li "THUNDERSTONE"
db "TERU-SAMA@" li "WATER STONE"
db "HP UP@" li "TERU-SAMA"
db "PROTEIN@" li "HP UP"
db "IRON@" li "PROTEIN"
db "CARBOS@" li "IRON"
db "LUCKY PUNCH@" li "CARBOS"
db "CALCIUM@" li "LUCKY PUNCH"
db "RARE CANDY@" li "CALCIUM"
db "X ACCURACY@" li "RARE CANDY"
db "LEAF STONE@" li "X ACCURACY"
db "METAL POWDER@" li "LEAF STONE"
db "NUGGET@" li "METAL POWDER"
db "# DOLL@" li "NUGGET"
db "FULL HEAL@" li "# DOLL"
db "REVIVE@" li "FULL HEAL"
db "MAX REVIVE@" li "REVIVE"
db "GUARD SPEC.@" li "MAX REVIVE"
db "SUPER REPEL@" li "GUARD SPEC."
db "MAX REPEL@" li "SUPER REPEL"
db "DIRE HIT@" li "MAX REPEL"
db "TERU-SAMA@" li "DIRE HIT"
db "FRESH WATER@" li "TERU-SAMA"
db "SODA POP@" li "FRESH WATER"
db "LEMONADE@" li "SODA POP"
db "X ATTACK@" li "LEMONADE"
db "TERU-SAMA@" li "X ATTACK"
db "X DEFEND@" li "TERU-SAMA"
db "X SPEED@" li "X DEFEND"
db "X SPECIAL@" li "X SPEED"
db "COIN CASE@" li "X SPECIAL"
db "ITEMFINDER@" li "COIN CASE"
db "TERU-SAMA@" li "ITEMFINDER"
db "EXP.SHARE@" li "TERU-SAMA"
db "OLD ROD@" li "EXP.SHARE"
db "GOOD ROD@" li "OLD ROD"
db "SILVER LEAF@" li "GOOD ROD"
db "SUPER ROD@" li "SILVER LEAF"
db "PP UP@" li "SUPER ROD"
db "ETHER@" li "PP UP"
db "MAX ETHER@" li "ETHER"
db "ELIXER@" li "MAX ETHER"
db "RED SCALE@" li "ELIXER"
db "SECRETPOTION@" li "RED SCALE"
db "S.S.TICKET@" li "SECRETPOTION"
db "MYSTERY EGG@" li "S.S.TICKET"
db "CLEAR BELL@" li "MYSTERY EGG"
db "SILVER WING@" li "CLEAR BELL"
db "MOOMOO MILK@" li "SILVER WING"
db "QUICK CLAW@" li "MOOMOO MILK"
db "PSNCUREBERRY@" li "QUICK CLAW"
db "GOLD LEAF@" li "PSNCUREBERRY"
db "SOFT SAND@" li "GOLD LEAF"
db "SHARP BEAK@" li "SOFT SAND"
db "PRZCUREBERRY@" li "SHARP BEAK"
db "BURNT BERRY@" li "PRZCUREBERRY"
db "ICE BERRY@" li "BURNT BERRY"
db "POISON BARB@" li "ICE BERRY"
db "KING'S ROCK@" li "POISON BARB"
db "BITTER BERRY@" li "KING'S ROCK"
db "MINT BERRY@" li "BITTER BERRY"
db "RED APRICORN@" li "MINT BERRY"
db "TINYMUSHROOM@" li "RED APRICORN"
db "BIG MUSHROOM@" li "TINYMUSHROOM"
db "SILVERPOWDER@" li "BIG MUSHROOM"
db "BLU APRICORN@" li "SILVERPOWDER"
db "TERU-SAMA@" li "BLU APRICORN"
db "AMULET COIN@" li "TERU-SAMA"
db "YLW APRICORN@" li "AMULET COIN"
db "GRN APRICORN@" li "YLW APRICORN"
db "CLEANSE TAG@" li "GRN APRICORN"
db "MYSTIC WATER@" li "CLEANSE TAG"
db "TWISTEDSPOON@" li "MYSTIC WATER"
db "WHT APRICORN@" li "TWISTEDSPOON"
db "BLACKBELT@" li "WHT APRICORN"
db "BLK APRICORN@" li "BLACKBELT"
db "TERU-SAMA@" li "BLK APRICORN"
db "PNK APRICORN@" li "TERU-SAMA"
db "BLACKGLASSES@" li "PNK APRICORN"
db "SLOWPOKETAIL@" li "BLACKGLASSES"
db "PINK BOW@" li "SLOWPOKETAIL"
db "STICK@" li "PINK BOW"
db "SMOKE BALL@" li "STICK"
db "NEVERMELTICE@" li "SMOKE BALL"
db "MAGNET@" li "NEVERMELTICE"
db "MIRACLEBERRY@" li "MAGNET"
db "PEARL@" li "MIRACLEBERRY"
db "BIG PEARL@" li "PEARL"
db "EVERSTONE@" li "BIG PEARL"
db "SPELL TAG@" li "EVERSTONE"
db "RAGECANDYBAR@" li "SPELL TAG"
db "GS BALL@" li "RAGECANDYBAR"
db "BLUE CARD@" li "GS BALL"
db "MIRACLE SEED@" li "BLUE CARD"
db "THICK CLUB@" li "MIRACLE SEED"
db "FOCUS BAND@" li "THICK CLUB"
db "TERU-SAMA@" li "FOCUS BAND"
db "ENERGYPOWDER@" li "TERU-SAMA"
db "ENERGY ROOT@" li "ENERGYPOWDER"
db "HEAL POWDER@" li "ENERGY ROOT"
db "REVIVAL HERB@" li "HEAL POWDER"
db "HARD STONE@" li "REVIVAL HERB"
db "LUCKY EGG@" li "HARD STONE"
db "CARD KEY@" li "LUCKY EGG"
db "MACHINE PART@" li "CARD KEY"
db "EGG TICKET@" li "MACHINE PART"
db "LOST ITEM@" li "EGG TICKET"
db "STARDUST@" li "LOST ITEM"
db "STAR PIECE@" li "STARDUST"
db "BASEMENT KEY@" li "STAR PIECE"
db "PASS@" li "BASEMENT KEY"
db "TERU-SAMA@" li "PASS"
db "TERU-SAMA@" li "TERU-SAMA"
db "TERU-SAMA@" li "TERU-SAMA"
db "CHARCOAL@" li "TERU-SAMA"
db "BERRY JUICE@" li "CHARCOAL"
db "SCOPE LENS@" li "BERRY JUICE"
db "TERU-SAMA@" li "SCOPE LENS"
db "TERU-SAMA@" li "TERU-SAMA"
db "METAL COAT@" li "TERU-SAMA"
db "DRAGON FANG@" li "METAL COAT"
db "TERU-SAMA@" li "DRAGON FANG"
db "LEFTOVERS@" li "TERU-SAMA"
db "TERU-SAMA@" li "LEFTOVERS"
db "TERU-SAMA@" li "TERU-SAMA"
db "TERU-SAMA@" li "TERU-SAMA"
db "MYSTERYBERRY@" li "TERU-SAMA"
db "DRAGON SCALE@" li "MYSTERYBERRY"
db "BERSERK GENE@" li "DRAGON SCALE"
db "TERU-SAMA@" li "BERSERK GENE"
db "TERU-SAMA@" li "TERU-SAMA"
db "TERU-SAMA@" li "TERU-SAMA"
db "SACRED ASH@" li "TERU-SAMA"
db "HEAVY BALL@" li "SACRED ASH"
db "FLOWER MAIL@" li "HEAVY BALL"
db "LEVEL BALL@" li "FLOWER MAIL"
db "LURE BALL@" li "LEVEL BALL"
db "FAST BALL@" li "LURE BALL"
db "TERU-SAMA@" li "FAST BALL"
db "LIGHT BALL@" li "TERU-SAMA"
db "FRIEND BALL@" li "LIGHT BALL"
db "MOON BALL@" li "FRIEND BALL"
db "LOVE BALL@" li "MOON BALL"
db "NORMAL BOX@" li "LOVE BALL"
db "GORGEOUS BOX@" li "NORMAL BOX"
db "SUN STONE@" li "GORGEOUS BOX"
db "POLKADOT BOW@" li "SUN STONE"
db "TERU-SAMA@" li "POLKADOT BOW"
db "UP-GRADE@" li "TERU-SAMA"
db "BERRY@" li "UP-GRADE"
db "GOLD BERRY@" li "BERRY"
db "SQUIRTBOTTLE@" li "GOLD BERRY"
db "TERU-SAMA@" li "SQUIRTBOTTLE"
db "PARK BALL@" li "TERU-SAMA"
db "RAINBOW WING@" li "PARK BALL"
db "TERU-SAMA@" li "RAINBOW WING"
db "BRICK PIECE@" li "TERU-SAMA"
db "SURF MAIL@" li "BRICK PIECE"
db "LITEBLUEMAIL@" li "SURF MAIL"
db "PORTRAITMAIL@" li "LITEBLUEMAIL"
db "LOVELY MAIL@" li "PORTRAITMAIL"
db "EON MAIL@" li "LOVELY MAIL"
db "MORPH MAIL@" li "EON MAIL"
db "BLUESKY MAIL@" li "MORPH MAIL"
db "MUSIC MAIL@" li "BLUESKY MAIL"
db "MIRAGE MAIL@" li "MUSIC MAIL"
db "TERU-SAMA@" li "MIRAGE MAIL"
db "TM01@" li "TERU-SAMA"
db "TM02@" assert_list_length NUM_ITEMS
db "TM03@" li "TM01"
db "TM04@" li "TM02"
db "TERU-SAMA@" li "TM03"
db "TM05@" li "TM04"
db "TM06@" li "TERU-SAMA"
db "TM07@" li "TM05"
db "TM08@" li "TM06"
db "TM09@" li "TM07"
db "TM10@" li "TM08"
db "TM11@" li "TM09"
db "TM12@" li "TM10"
db "TM13@" li "TM11"
db "TM14@" li "TM12"
db "TM15@" li "TM13"
db "TM16@" li "TM14"
db "TM17@" li "TM15"
db "TM18@" li "TM16"
db "TM19@" li "TM17"
db "TM20@" li "TM18"
db "TM21@" li "TM19"
db "TM22@" li "TM20"
db "TM23@" li "TM21"
db "TM24@" li "TM22"
db "TM25@" li "TM23"
db "TM26@" li "TM24"
db "TM27@" li "TM25"
db "TM28@" li "TM26"
db "TERU-SAMA@" li "TM27"
db "TM29@" li "TM28"
db "TM30@" li "TERU-SAMA"
db "TM31@" li "TM29"
db "TM32@" li "TM30"
db "TM33@" li "TM31"
db "TM34@" li "TM32"
db "TM35@" li "TM33"
db "TM36@" li "TM34"
db "TM37@" li "TM35"
db "TM38@" li "TM36"
db "TM39@" li "TM37"
db "TM40@" li "TM38"
db "TM41@" li "TM39"
db "TM42@" li "TM40"
db "TM43@" li "TM41"
db "TM44@" li "TM42"
db "TM45@" li "TM43"
db "TM46@" li "TM44"
db "TM47@" li "TM45"
db "TM48@" li "TM46"
db "TM49@" li "TM47"
db "TM50@" li "TM48"
db "HM01@" li "TM49"
db "HM02@" li "TM50"
db "HM03@" assert_list_length NUM_ITEMS + NUM_TMS + 2 ; count ITEM_C3 and ITEM_DC
db "HM04@" li "HM01"
db "HM05@" li "HM02"
db "HM06@" li "HM03"
db "HM07@" li "HM04"
db "TERU-SAMA@" li "HM05"
db "TERU-SAMA@" li "HM06"
db "TERU-SAMA@" li "HM07"
db "TERU-SAMA@" assert_list_length NUM_ITEMS + NUM_TMS + 2 + NUM_HMS ; count ITEM_C3 and ITEM_DC
db "TERU-SAMA@" li "TERU-SAMA"
db "TERU-SAMA@" li "TERU-SAMA"
db "?@" li "TERU-SAMA"
li "TERU-SAMA"
li "TERU-SAMA"
li "TERU-SAMA"
li "?"
assert_list_length $100

View File

@ -7,16 +7,19 @@
const MONMENUVALUE_MOVE ; 5 const MONMENUVALUE_MOVE ; 5
const MONMENUVALUE_MAIL ; 6 const MONMENUVALUE_MAIL ; 6
const MONMENUVALUE_ERROR ; 7 const MONMENUVALUE_ERROR ; 7
NUM_MONMENUVALUES EQU const_value - 1
MonMenuOptionStrings: MonMenuOptionStrings:
; entries correspond to MONMENUVALUE_* constants ; entries correspond to MONMENUVALUE_* constants
db "STATS@" list_start MonMenuOptionStrings
db "SWITCH@" li "STATS"
db "ITEM@" li "SWITCH"
db "CANCEL@" li "ITEM"
db "MOVE@" li "CANCEL"
db "MAIL@" li "MOVE"
db "ERROR!@" li "MAIL"
li "ERROR!"
assert_list_length NUM_MONMENUVALUES
MonMenuOptions: MonMenuOptions:
; category, item, value; actions are in PokemonActionSubmenu (see engine/pokemon/mon_menu.asm) ; category, item, value; actions are in PokemonActionSubmenu (see engine/pokemon/mon_menu.asm)

View File

@ -1,252 +1,254 @@
MoveNames:: MoveNames::
db "POUND@" list_start MoveNames
db "KARATE CHOP@" li "POUND"
db "DOUBLESLAP@" li "KARATE CHOP"
db "COMET PUNCH@" li "DOUBLESLAP"
db "MEGA PUNCH@" li "COMET PUNCH"
db "PAY DAY@" li "MEGA PUNCH"
db "FIRE PUNCH@" li "PAY DAY"
db "ICE PUNCH@" li "FIRE PUNCH"
db "THUNDERPUNCH@" li "ICE PUNCH"
db "SCRATCH@" li "THUNDERPUNCH"
db "VICEGRIP@" li "SCRATCH"
db "GUILLOTINE@" li "VICEGRIP"
db "RAZOR WIND@" li "GUILLOTINE"
db "SWORDS DANCE@" li "RAZOR WIND"
db "CUT@" li "SWORDS DANCE"
db "GUST@" li "CUT"
db "WING ATTACK@" li "GUST"
db "WHIRLWIND@" li "WING ATTACK"
db "FLY@" li "WHIRLWIND"
db "BIND@" li "FLY"
db "SLAM@" li "BIND"
db "VINE WHIP@" li "SLAM"
db "STOMP@" li "VINE WHIP"
db "DOUBLE KICK@" li "STOMP"
db "MEGA KICK@" li "DOUBLE KICK"
db "JUMP KICK@" li "MEGA KICK"
db "ROLLING KICK@" li "JUMP KICK"
db "SAND-ATTACK@" li "ROLLING KICK"
db "HEADBUTT@" li "SAND-ATTACK"
db "HORN ATTACK@" li "HEADBUTT"
db "FURY ATTACK@" li "HORN ATTACK"
db "HORN DRILL@" li "FURY ATTACK"
db "TACKLE@" li "HORN DRILL"
db "BODY SLAM@" li "TACKLE"
db "WRAP@" li "BODY SLAM"
db "TAKE DOWN@" li "WRAP"
db "THRASH@" li "TAKE DOWN"
db "DOUBLE-EDGE@" li "THRASH"
db "TAIL WHIP@" li "DOUBLE-EDGE"
db "POISON STING@" li "TAIL WHIP"
db "TWINEEDLE@" li "POISON STING"
db "PIN MISSILE@" li "TWINEEDLE"
db "LEER@" li "PIN MISSILE"
db "BITE@" li "LEER"
db "GROWL@" li "BITE"
db "ROAR@" li "GROWL"
db "SING@" li "ROAR"
db "SUPERSONIC@" li "SING"
db "SONICBOOM@" li "SUPERSONIC"
db "DISABLE@" li "SONICBOOM"
db "ACID@" li "DISABLE"
db "EMBER@" li "ACID"
db "FLAMETHROWER@" li "EMBER"
db "MIST@" li "FLAMETHROWER"
db "WATER GUN@" li "MIST"
db "HYDRO PUMP@" li "WATER GUN"
db "SURF@" li "HYDRO PUMP"
db "ICE BEAM@" li "SURF"
db "BLIZZARD@" li "ICE BEAM"
db "PSYBEAM@" li "BLIZZARD"
db "BUBBLEBEAM@" li "PSYBEAM"
db "AURORA BEAM@" li "BUBBLEBEAM"
db "HYPER BEAM@" li "AURORA BEAM"
db "PECK@" li "HYPER BEAM"
db "DRILL PECK@" li "PECK"
db "SUBMISSION@" li "DRILL PECK"
db "LOW KICK@" li "SUBMISSION"
db "COUNTER@" li "LOW KICK"
db "SEISMIC TOSS@" li "COUNTER"
db "STRENGTH@" li "SEISMIC TOSS"
db "ABSORB@" li "STRENGTH"
db "MEGA DRAIN@" li "ABSORB"
db "LEECH SEED@" li "MEGA DRAIN"
db "GROWTH@" li "LEECH SEED"
db "RAZOR LEAF@" li "GROWTH"
db "SOLARBEAM@" li "RAZOR LEAF"
db "POISONPOWDER@" li "SOLARBEAM"
db "STUN SPORE@" li "POISONPOWDER"
db "SLEEP POWDER@" li "STUN SPORE"
db "PETAL DANCE@" li "SLEEP POWDER"
db "STRING SHOT@" li "PETAL DANCE"
db "DRAGON RAGE@" li "STRING SHOT"
db "FIRE SPIN@" li "DRAGON RAGE"
db "THUNDERSHOCK@" li "FIRE SPIN"
db "THUNDERBOLT@" li "THUNDERSHOCK"
db "THUNDER WAVE@" li "THUNDERBOLT"
db "THUNDER@" li "THUNDER WAVE"
db "ROCK THROW@" li "THUNDER"
db "EARTHQUAKE@" li "ROCK THROW"
db "FISSURE@" li "EARTHQUAKE"
db "DIG@" li "FISSURE"
db "TOXIC@" li "DIG"
db "CONFUSION@" li "TOXIC"
db "PSYCHIC@" li "CONFUSION"
db "HYPNOSIS@" li "PSYCHIC"
db "MEDITATE@" li "HYPNOSIS"
db "AGILITY@" li "MEDITATE"
db "QUICK ATTACK@" li "AGILITY"
db "RAGE@" li "QUICK ATTACK"
db "TELEPORT@" li "RAGE"
db "NIGHT SHADE@" li "TELEPORT"
db "MIMIC@" li "NIGHT SHADE"
db "SCREECH@" li "MIMIC"
db "DOUBLE TEAM@" li "SCREECH"
db "RECOVER@" li "DOUBLE TEAM"
db "HARDEN@" li "RECOVER"
db "MINIMIZE@" li "HARDEN"
db "SMOKESCREEN@" li "MINIMIZE"
db "CONFUSE RAY@" li "SMOKESCREEN"
db "WITHDRAW@" li "CONFUSE RAY"
db "DEFENSE CURL@" li "WITHDRAW"
db "BARRIER@" li "DEFENSE CURL"
db "LIGHT SCREEN@" li "BARRIER"
db "HAZE@" li "LIGHT SCREEN"
db "REFLECT@" li "HAZE"
db "FOCUS ENERGY@" li "REFLECT"
db "BIDE@" li "FOCUS ENERGY"
db "METRONOME@" li "BIDE"
db "MIRROR MOVE@" li "METRONOME"
db "SELFDESTRUCT@" li "MIRROR MOVE"
db "EGG BOMB@" li "SELFDESTRUCT"
db "LICK@" li "EGG BOMB"
db "SMOG@" li "LICK"
db "SLUDGE@" li "SMOG"
db "BONE CLUB@" li "SLUDGE"
db "FIRE BLAST@" li "BONE CLUB"
db "WATERFALL@" li "FIRE BLAST"
db "CLAMP@" li "WATERFALL"
db "SWIFT@" li "CLAMP"
db "SKULL BASH@" li "SWIFT"
db "SPIKE CANNON@" li "SKULL BASH"
db "CONSTRICT@" li "SPIKE CANNON"
db "AMNESIA@" li "CONSTRICT"
db "KINESIS@" li "AMNESIA"
db "SOFTBOILED@" li "KINESIS"
db "HI JUMP KICK@" li "SOFTBOILED"
db "GLARE@" li "HI JUMP KICK"
db "DREAM EATER@" li "GLARE"
db "POISON GAS@" li "DREAM EATER"
db "BARRAGE@" li "POISON GAS"
db "LEECH LIFE@" li "BARRAGE"
db "LOVELY KISS@" li "LEECH LIFE"
db "SKY ATTACK@" li "LOVELY KISS"
db "TRANSFORM@" li "SKY ATTACK"
db "BUBBLE@" li "TRANSFORM"
db "DIZZY PUNCH@" li "BUBBLE"
db "SPORE@" li "DIZZY PUNCH"
db "FLASH@" li "SPORE"
db "PSYWAVE@" li "FLASH"
db "SPLASH@" li "PSYWAVE"
db "ACID ARMOR@" li "SPLASH"
db "CRABHAMMER@" li "ACID ARMOR"
db "EXPLOSION@" li "CRABHAMMER"
db "FURY SWIPES@" li "EXPLOSION"
db "BONEMERANG@" li "FURY SWIPES"
db "REST@" li "BONEMERANG"
db "ROCK SLIDE@" li "REST"
db "HYPER FANG@" li "ROCK SLIDE"
db "SHARPEN@" li "HYPER FANG"
db "CONVERSION@" li "SHARPEN"
db "TRI ATTACK@" li "CONVERSION"
db "SUPER FANG@" li "TRI ATTACK"
db "SLASH@" li "SUPER FANG"
db "SUBSTITUTE@" li "SLASH"
db "STRUGGLE@" li "SUBSTITUTE"
db "SKETCH@" li "STRUGGLE"
db "TRIPLE KICK@" li "SKETCH"
db "THIEF@" li "TRIPLE KICK"
db "SPIDER WEB@" li "THIEF"
db "MIND READER@" li "SPIDER WEB"
db "NIGHTMARE@" li "MIND READER"
db "FLAME WHEEL@" li "NIGHTMARE"
db "SNORE@" li "FLAME WHEEL"
db "CURSE@" li "SNORE"
db "FLAIL@" li "CURSE"
db "CONVERSION2@" li "FLAIL"
db "AEROBLAST@" li "CONVERSION2"
db "COTTON SPORE@" li "AEROBLAST"
db "REVERSAL@" li "COTTON SPORE"
db "SPITE@" li "REVERSAL"
db "POWDER SNOW@" li "SPITE"
db "PROTECT@" li "POWDER SNOW"
db "MACH PUNCH@" li "PROTECT"
db "SCARY FACE@" li "MACH PUNCH"
db "FAINT ATTACK@" li "SCARY FACE"
db "SWEET KISS@" li "FAINT ATTACK"
db "BELLY DRUM@" li "SWEET KISS"
db "SLUDGE BOMB@" li "BELLY DRUM"
db "MUD-SLAP@" li "SLUDGE BOMB"
db "OCTAZOOKA@" li "MUD-SLAP"
db "SPIKES@" li "OCTAZOOKA"
db "ZAP CANNON@" li "SPIKES"
db "FORESIGHT@" li "ZAP CANNON"
db "DESTINY BOND@" li "FORESIGHT"
db "PERISH SONG@" li "DESTINY BOND"
db "ICY WIND@" li "PERISH SONG"
db "DETECT@" li "ICY WIND"
db "BONE RUSH@" li "DETECT"
db "LOCK-ON@" li "BONE RUSH"
db "OUTRAGE@" li "LOCK-ON"
db "SANDSTORM@" li "OUTRAGE"
db "GIGA DRAIN@" li "SANDSTORM"
db "ENDURE@" li "GIGA DRAIN"
db "CHARM@" li "ENDURE"
db "ROLLOUT@" li "CHARM"
db "FALSE SWIPE@" li "ROLLOUT"
db "SWAGGER@" li "FALSE SWIPE"
db "MILK DRINK@" li "SWAGGER"
db "SPARK@" li "MILK DRINK"
db "FURY CUTTER@" li "SPARK"
db "STEEL WING@" li "FURY CUTTER"
db "MEAN LOOK@" li "STEEL WING"
db "ATTRACT@" li "MEAN LOOK"
db "SLEEP TALK@" li "ATTRACT"
db "HEAL BELL@" li "SLEEP TALK"
db "RETURN@" li "HEAL BELL"
db "PRESENT@" li "RETURN"
db "FRUSTRATION@" li "PRESENT"
db "SAFEGUARD@" li "FRUSTRATION"
db "PAIN SPLIT@" li "SAFEGUARD"
db "SACRED FIRE@" li "PAIN SPLIT"
db "MAGNITUDE@" li "SACRED FIRE"
db "DYNAMICPUNCH@" li "MAGNITUDE"
db "MEGAHORN@" li "DYNAMICPUNCH"
db "DRAGONBREATH@" li "MEGAHORN"
db "BATON PASS@" li "DRAGONBREATH"
db "ENCORE@" li "BATON PASS"
db "PURSUIT@" li "ENCORE"
db "RAPID SPIN@" li "PURSUIT"
db "SWEET SCENT@" li "RAPID SPIN"
db "IRON TAIL@" li "SWEET SCENT"
db "METAL CLAW@" li "IRON TAIL"
db "VITAL THROW@" li "METAL CLAW"
db "MORNING SUN@" li "VITAL THROW"
db "SYNTHESIS@" li "MORNING SUN"
db "MOONLIGHT@" li "SYNTHESIS"
db "HIDDEN POWER@" li "MOONLIGHT"
db "CROSS CHOP@" li "HIDDEN POWER"
db "TWISTER@" li "CROSS CHOP"
db "RAIN DANCE@" li "TWISTER"
db "SUNNY DAY@" li "RAIN DANCE"
db "CRUNCH@" li "SUNNY DAY"
db "MIRROR COAT@" li "CRUNCH"
db "PSYCH UP@" li "MIRROR COAT"
db "EXTREMESPEED@" li "PSYCH UP"
db "ANCIENTPOWER@" li "EXTREMESPEED"
db "SHADOW BALL@" li "ANCIENTPOWER"
db "FUTURE SIGHT@" li "SHADOW BALL"
db "ROCK SMASH@" li "FUTURE SIGHT"
db "WHIRLPOOL@" li "ROCK SMASH"
db "BEAT UP@" li "WHIRLPOOL"
li "BEAT UP"
assert_list_length NUM_ATTACKS

View File

@ -14,7 +14,7 @@ MalePlayerNameArray:
db "MAT@" db "MAT@"
db "ALLAN@" db "ALLAN@"
db "JON@" db "JON@"
db 2 ; displacement db 2 ; title indent
db " NAME @" ; title db " NAME @" ; title
KrisNameMenuHeader: KrisNameMenuHeader:

View File

@ -1,69 +1,71 @@
TrainerClassNames:: TrainerClassNames::
; entries correspond to trainer classes (see constants/trainer_constants.asm) ; entries correspond to trainer classes (see constants/trainer_constants.asm)
db "LEADER@" list_start TrainerClassNames
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "RIVAL@" li "LEADER"
db "#MON PROF.@" li "RIVAL"
db "ELITE FOUR@" li "#MON PROF."
db "<PKMN> TRAINER@" li "ELITE FOUR"
db "ELITE FOUR@" li "<PKMN> TRAINER"
db "ELITE FOUR@" li "ELITE FOUR"
db "ELITE FOUR@" li "ELITE FOUR"
db "CHAMPION@" li "ELITE FOUR"
db "LEADER@" li "CHAMPION"
db "LEADER@" li "LEADER"
db "LEADER@" li "LEADER"
db "SCIENTIST@" li "LEADER"
db "LEADER@" li "SCIENTIST"
db "YOUNGSTER@" li "LEADER"
db "SCHOOLBOY@" li "YOUNGSTER"
db "BIRD KEEPER@" li "SCHOOLBOY"
db "LASS@" li "BIRD KEEPER"
db "LEADER@" li "LASS"
db "COOLTRAINER@" li "LEADER"
db "COOLTRAINER@" li "COOLTRAINER"
db "BEAUTY@" li "COOLTRAINER"
db "#MANIAC@" li "BEAUTY"
db "ROCKET@" li "#MANIAC"
db "GENTLEMAN@" li "ROCKET"
db "SKIER@" li "GENTLEMAN"
db "TEACHER@" li "SKIER"
db "LEADER@" li "TEACHER"
db "BUG CATCHER@" li "LEADER"
db "FISHER@" li "BUG CATCHER"
db "SWIMMER♂@" li "FISHER"
db "SWIMMER♀@" li "SWIMMER♂"
db "SAILOR@" li "SWIMMER♀"
db "SUPER NERD@" li "SAILOR"
db "RIVAL@" li "SUPER NERD"
db "GUITARIST@" li "RIVAL"
db "HIKER@" li "GUITARIST"
db "BIKER@" li "HIKER"
db "LEADER@" li "BIKER"
db "BURGLAR@" li "LEADER"
db "FIREBREATHER@" li "BURGLAR"
db "JUGGLER@" li "FIREBREATHER"
db "BLACKBELT@" li "JUGGLER"
db "ROCKET@" li "BLACKBELT"
db "PSYCHIC@" li "ROCKET"
db "PICNICKER@" li "PSYCHIC"
db "CAMPER@" li "PICNICKER"
db "ROCKET@" li "CAMPER"
db "SAGE@" li "ROCKET"
db "MEDIUM@" li "SAGE"
db "BOARDER@" li "MEDIUM"
db "#FAN@" li "BOARDER"
db "KIMONO GIRL@" li "#FAN"
db "TWINS@" li "KIMONO GIRL"
db "#FAN@" li "TWINS"
db "<PKMN> TRAINER@" li "#FAN"
db "LEADER@" li "<PKMN> TRAINER"
db "OFFICER@" li "LEADER"
db "ROCKET@" li "OFFICER"
db "MYSTICALMAN@" li "ROCKET"
li "MYSTICALMAN"
assert_list_length NUM_TRAINER_CLASSES

View File

@ -9,10 +9,11 @@ rept _NARG - 1
shift shift
endr endr
db 0 db 0
list_index = list_index + 1
ENDM ENDM
RoamMaps: RoamMaps:
; there are NUM_ROAMMON_MAPS entries list_start RoamMaps
; start map, ...other maps ; start map, ...other maps
roam_map ROUTE_29, ROUTE_30, ROUTE_46 roam_map ROUTE_29, ROUTE_30, ROUTE_46
roam_map ROUTE_30, ROUTE_29, ROUTE_31 roam_map ROUTE_30, ROUTE_29, ROUTE_31
@ -30,4 +31,5 @@ RoamMaps:
roam_map ROUTE_44, ROUTE_42, ROUTE_43, ROUTE_45 roam_map ROUTE_44, ROUTE_42, ROUTE_43, ROUTE_45
roam_map ROUTE_45, ROUTE_44, ROUTE_46 roam_map ROUTE_45, ROUTE_44, ROUTE_46
roam_map ROUTE_46, ROUTE_45, ROUTE_29 roam_map ROUTE_46, ROUTE_45, ROUTE_29
assert_list_length NUM_ROAMMON_MAPS
db -1 ; end db -1 ; end

View File

@ -19,6 +19,31 @@ x = \1
"{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes" "{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes"
ENDM 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 def_grass_wildmons: MACRO
;\1: map id ;\1: map id
if DEF(CURRENT_GRASS_WILDMONS_MAP) if DEF(CURRENT_GRASS_WILDMONS_MAP)