Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass redundant label names to table_width and list_start #1160

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion audio/cry_pointers.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Cries:
; entries correspond to CRY_* constants (see constants/cry_constants.asm)
table_width 3, Cries
table_width 3
dba Cry_Nidoran_M
dba Cry_Nidoran_F
dba Cry_Slowpoke
Expand Down
6 changes: 3 additions & 3 deletions audio/engine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ UpdateChannels:
jp hl

.ChannelFunctions:
table_width 2, UpdateChannels.ChannelFunctions
table_width 2
; music channels
dw .Channel1
dw .Channel2
Expand Down Expand Up @@ -1371,7 +1371,7 @@ ParseMusicCommand:

MusicCommands:
; entries correspond to audio constants (see macros/scripts/audio.asm)
table_width 2, MusicCommands
table_width 2
dw Music_Octave8
dw Music_Octave7
dw Music_Octave6
Expand Down Expand Up @@ -2783,7 +2783,7 @@ StereoTracks:
db $11, $22, $44, $88

ChannelPointers:
table_width 2, ChannelPointers
table_width 2
; music channels
dw wChannel1
dw wChannel2
Expand Down
2 changes: 1 addition & 1 deletion audio/music_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Music:
; entries correspond to MUSIC_* constants
table_width 3, Music
table_width 3
dba Music_Nothing
dba Music_TitleScreen
dba Music_Route1
Expand Down
2 changes: 1 addition & 1 deletion audio/notes.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FrequencyTable:
table_width 2, FrequencyTable
table_width 2
dw 0 ; __
dw $f82c ; C_
dw $f89d ; C#
Expand Down
2 changes: 1 addition & 1 deletion audio/sfx_pointers.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SFX:
; entries correspond to SFX_* constants
table_width 3, SFX
table_width 3
dba Sfx_DexFanfare5079
dba Sfx_Item
dba Sfx_CaughtMon
Expand Down
2 changes: 1 addition & 1 deletion data/battle/effect_command_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

BattleCommandPointers:
; entries correspond to macros/scripts/battle_commands.asm
table_width 2, BattleCommandPointers
table_width 2
dw BattleCommand_CheckTurn
dw BattleCommand_CheckObedience
dw BattleCommand_UsedMoveText
Expand Down
2 changes: 1 addition & 1 deletion data/battle/stat_names.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
StatNames:
; entries correspond to stat ids
list_start StatNames
list_start
li "ATTACK"
li "DEFENSE"
li "SPEED"
Expand Down
2 changes: 1 addition & 1 deletion data/battle_anims/framesets.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BattleAnimFrameData:
; entries correspond to BATTLE_ANIM_FRAMESET_* constants
table_width 2, BattleAnimFrameData
table_width 2
dw .Frameset_HitBig ; BATTLE_ANIM_FRAMESET_HIT_BIG
dw .Frameset_Hit ; BATTLE_ANIM_FRAMESET_HIT
dw .Frameset_HitSmall ; BATTLE_ANIM_FRAMESET_HIT_SMALL
Expand Down
2 changes: 1 addition & 1 deletion data/battle_anims/oam.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENDM

BattleAnimOAMData:
; entries correspond to BATTLE_ANIM_OAMSET_* constants
table_width 4, BattleAnimOAMData
table_width 4
battleanimoam $00, 16, .OAMData_00 ; BATTLE_ANIM_OAMSET_00
battleanimoam $04, 9, .OAMData_01 ; BATTLE_ANIM_OAMSET_01
battleanimoam $08, 4, .OAMData_02 ; BATTLE_ANIM_OAMSET_02
Expand Down
2 changes: 1 addition & 1 deletion data/battle_anims/object_gfx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENDM

AnimObjGFX:
; entries correspond to BATTLE_ANIM_GFX_* constants
table_width 4, AnimObjGFX
table_width 4
anim_obj_gfx 0, AnimObj00GFX
anim_obj_gfx 21, AnimObjHitGFX
anim_obj_gfx 6, AnimObjCutGFX
Expand Down
2 changes: 1 addition & 1 deletion data/battle_anims/objects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENDM

BattleAnimObjects:
; entries correspond to BATTLE_ANIM_OBJ_* constants
table_width BATTLEANIMOBJ_LENGTH, BattleAnimObjects
table_width BATTLEANIMOBJ_LENGTH
; BATTLE_ANIM_OBJ_HIT_BIG_YFIX
battleanimobj RELATIVE_X, $ff, BATTLE_ANIM_FRAMESET_HIT_BIG, BATTLE_ANIM_FUNC_NULL, PAL_BATTLE_OB_GRAY, BATTLE_ANIM_GFX_HIT
; BATTLE_ANIM_OBJ_HIT_YFIX
Expand Down
2 changes: 1 addition & 1 deletion data/battle_tower/classes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BattleTowerTrainers:
; The trainer class is not used in Crystal 1.0 due to a bug.
; Instead, the sixth character in the trainer's name is used.
; See BattleTowerText in engine/events/battle_tower/trainer_text.asm.
table_width (NAME_LENGTH - 1) + 1, BattleTowerTrainers
table_width (NAME_LENGTH - 1) + 1
; name, class
db "HANSON@@@@", FISHER
db "SAWYER@@@@", POKEMANIAC
Expand Down
2 changes: 1 addition & 1 deletion data/battle_tower/parties.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BattleTowerMons:
; 10 groups (one per floor level) of 21 mons (BATTLETOWER_NUM_UNIQUE_MON).
table_width NICKNAMED_MON_STRUCT_LENGTH, BattleTowerMons
table_width NICKNAMED_MON_STRUCT_LENGTH

; BattleTowerMons group 1

Expand Down
2 changes: 1 addition & 1 deletion data/battle_tower/unknown.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BattleTowerTrainerData:: ; ???
; 70 tables (BATTLETOWER_NUM_UNIQUE_TRAINERS) of 18 two-argument entries (total size BATTLETOWER_TRAINERDATALENGTH).
; Second argument points to an entry in Unknown_170470, to which the first argument is compared.
table_width BATTLETOWER_TRAINERDATALENGTH, BattleTowerTrainerData
table_width BATTLETOWER_TRAINERDATALENGTH

; BattleTowerTrainerData table 1:
db $37, 3
Expand Down
2 changes: 1 addition & 1 deletion data/collision/collision_permissions.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CollisionPermissionTable::
; entries correspond to COLL_* constants
table_width 1, CollisionPermissionTable
table_width 1
db LAND_TILE ; COLL_FLOOR
db LAND_TILE ; COLL_01
db LAND_TILE ; 02
Expand Down
2 changes: 1 addition & 1 deletion data/credits_strings.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CreditsStringsPointers:
; entries correspond to constants/credits_constants.asm
table_width 2, CreditsStringsPointers
table_width 2
dw .SatoshiTajiri
dw .JunichiMasuda
dw .TetsuyaWatanabe
Expand Down
2 changes: 1 addition & 1 deletion data/decorations/attributes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENDM

DecorationAttributes:
; entries correspond to deco constants
table_width DECOATTR_STRUCT_LENGTH, DecorationAttributes
table_width DECOATTR_STRUCT_LENGTH
decoration DECO_PLANT, 0, 0, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_BED, FEATHERY_BED, SET_UP_BED, EVENT_DECO_BED_1, $1b
Expand Down
2 changes: 1 addition & 1 deletion data/decorations/decorations.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DecorationIDs:
; see constants/deco_constants.asm
table_width 1, DecorationIDs
table_width 1

db DECO_FEATHERY_BED ; 2
db DECO_PINK_BED ; 3
Expand Down
2 changes: 1 addition & 1 deletion data/decorations/names.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DecorationNames:
; entries correspond to constants/deco_constants.asm
list_start DecorationNames
list_start
li "CANCEL"
li "PUT IT AWAY"
li "MAGNAPLANT"
Expand Down
2 changes: 1 addition & 1 deletion data/events/bug_contest_flags.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BugCatchingContestantEventFlagTable:
table_width 2, BugCatchingContestantEventFlagTable
table_width 2
dw EVENT_BUG_CATCHING_CONTESTANT_1A
dw EVENT_BUG_CATCHING_CONTESTANT_2A
dw EVENT_BUG_CATCHING_CONTESTANT_3A
Expand Down
2 changes: 1 addition & 1 deletion data/events/bug_contest_winners.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BugContestantPointers:
table_width 2, BugContestantPointers
table_width 2
dw BugContestant_BugCatcherDon ; this reverts back to the player
dw BugContestant_BugCatcherDon
dw BugContestant_BugCatcherEd
Expand Down
2 changes: 1 addition & 1 deletion data/events/elevator_floors.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ElevatorFloorNames:
; entries correspond to FLOOR_* constants
table_width 2, ElevatorFloorNames
table_width 2
dw .B4F
dw .B3F
dw .B2F
Expand Down
2 changes: 1 addition & 1 deletion data/events/engine_flags.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENDM

EngineFlags:
; entries correspond to ENGINE_* constants
table_width 3, EngineFlags
table_width 3

; pokegear
engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F
Expand Down
2 changes: 1 addition & 1 deletion data/events/happiness_changes.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
HappinessChanges:
; entries correspond to HAPPINESS_* constants
table_width 3, HappinessChanges
table_width 3
; change if happiness < 100, change if happiness < 200, change otherwise
db +5, +3, +2 ; Gained a level
db +5, +3, +2 ; Vitamin
Expand Down
2 changes: 1 addition & 1 deletion data/events/npc_trades.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENDM

NPCTrades:
; entries correspond to NPCTRADE_* constants
table_width NPCTRADE_STRUCT_LENGTH, NPCTrades
table_width NPCTRADE_STRUCT_LENGTH
npctrade TRADE_DIALOGSET_COLLECTOR, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_HAPPY, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_GENDER_EITHER
Expand Down
4 changes: 2 additions & 2 deletions data/events/odd_eggs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENDM

OddEggProbabilities:
; entries correspond to OddEggs (below)
table_width 2, OddEggProbabilities
table_width 2
DEF prob_total = 0
; Pichu
prob 8
Expand All @@ -34,7 +34,7 @@ DEF prob_total = 0
assert prob_total == 100, "OddEggProbabilities do not sum to 100%!"

OddEggs:
table_width NICKNAMED_MON_STRUCT_LENGTH, OddEggs
table_width NICKNAMED_MON_STRUCT_LENGTH

db PICHU
db NO_ITEM
Expand Down
4 changes: 2 additions & 2 deletions data/events/unown_walls.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ DEF UNOWNWORD_{d:UNOWNWORDS_HO_OH} EQUS "HO-OH"

UnownWalls:
; entries correspond to UNOWNWORDS_* constants
list_start UnownWalls
list_start
for x, NUM_UNOWN_WALLS
li "{UNOWNWORD_{d:x}}"
endr
assert_list_length NUM_UNOWN_WALLS

MenuHeaders_UnownWalls:
; entries correspond to UNOWNWORDS_* constants
table_width UNOWN_WALL_MENU_HEADER_SIZE, MenuHeaders_UnownWalls
table_width UNOWN_WALL_MENU_HEADER_SIZE
for x, NUM_UNOWN_WALLS
DEF n = CHARLEN("{UNOWNWORD_{d:x}}")
db MENU_BACKUP_TILES ; flags
Expand Down
2 changes: 1 addition & 1 deletion data/growth_rates.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENDM

GrowthRates:
; entries correspond to GROWTH_* (see constants/pokemon_data_constants.asm)
table_width 4, GrowthRates
table_width 4
growth_rate 1, 1, 0, 0, 0 ; Medium Fast
growth_rate 3, 4, 10, 0, 30 ; Slightly Fast
growth_rate 3, 4, 20, 0, 70 ; Slightly Slow
Expand Down
2 changes: 1 addition & 1 deletion data/icon_pointers.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IconPointers:
; entries correspond to ICON_* constants (see constants/icon_constants.asm)
table_width 2, IconPointers
table_width 2
dw NullIcon
dw PoliwagIcon
dw JigglypuffIcon
Expand Down
2 changes: 1 addition & 1 deletion data/items/attributes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENDM

ItemAttributes:
; entries correspond to item ids (see constants/item_constants.asm)
table_width ITEMATTR_STRUCT_LENGTH, ItemAttributes
table_width ITEMATTR_STRUCT_LENGTH
; MASTER_BALL
item_attribute 0, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
; ULTRA_BALL
Expand Down
2 changes: 1 addition & 1 deletion data/items/buena_prizes.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BuenaPrizeItems:
table_width 2, BuenaPrizeItems
table_width 2
db ULTRA_BALL, 2
db FULL_RESTORE, 2
db NUGGET, 3
Expand Down
2 changes: 1 addition & 1 deletion data/items/descriptions.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ItemDescriptions:
; entries correspond to item ids (see constants/item_constants.asm)
table_width 2, ItemDescriptions
table_width 2
dw MasterBallDesc
dw UltraBallDesc
dw BrightpowderDesc
Expand Down
2 changes: 1 addition & 1 deletion data/items/fruit_trees.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FruitTreeItems:
; entries correspond to FRUITTREE_* constants
table_width 1, FruitTreeItems
table_width 1
db BERRY ; ROUTE_29
db BERRY ; ROUTE_30_1
db BERRY ; ROUTE_38
Expand Down
2 changes: 1 addition & 1 deletion data/items/marts.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Marts:
; entries correspond to MART_* constants (see constants/mart_constants.asm)
table_width 2, Marts
table_width 2
dw MartCherrygrove
dw MartCherrygroveDex
dw MartViolet
Expand Down
2 changes: 1 addition & 1 deletion data/items/names.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ItemNames::
list_start ItemNames
list_start
li "MASTER BALL"
li "ULTRA BALL"
li "BRIGHTPOWDER"
Expand Down
2 changes: 1 addition & 1 deletion data/items/pocket_names.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ItemPocketNames:
; entries correspond to item type constants
table_width 2, ItemPocketNames
table_width 2
dw .Item
dw .Key
dw .Ball
Expand Down
2 changes: 1 addition & 1 deletion data/maps/environment_colors.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
EnvironmentColorsPointers:
; entries correspond to environment constants (see constants/map_data_constants.asm)
table_width 2, EnvironmentColorsPointers
table_width 2
dw .OutdoorColors ; unused
dw .OutdoorColors ; TOWN
dw .OutdoorColors ; ROUTE
Expand Down
2 changes: 1 addition & 1 deletion data/maps/landmarks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENDM

Landmarks:
; entries correspond to constants/landmark_constants.asm
table_width 4, Landmarks
table_width 4
landmark -8, -16, SpecialMapName
landmark 140, 100, NewBarkTownName
landmark 128, 100, Route29Name
Expand Down
Loading
Loading