Replace many '; unused' with '; unreferenced'

This commit is contained in:
Rangi 2020-10-28 10:21:10 -04:00
parent 446f1846b1
commit 6d333bed5f
31 changed files with 70 additions and 57 deletions

View File

@ -1615,9 +1615,9 @@ Music_JumpIf:
ret ret
MusicEE: MusicEE:
; unused
; conditional jump ; conditional jump
; checks a byte in ram corresponding to the current channel ; checks a byte in ram corresponding to the current channel
; doesn't seem to be set by any commands
; params: 2 ; params: 2
; ll hh ; pointer ; ll hh ; pointer
@ -1667,15 +1667,15 @@ MusicEE:
ret ret
MusicF9: MusicF9:
; unused
; sets some flag ; sets some flag
; seems to be unused
; params: 0 ; params: 0
ld a, TRUE ld a, TRUE
ld [wUnusedMusicF9Flag], a ld [wUnusedMusicF9Flag], a
ret ret
MusicE2: MusicE2:
; seems to have been dummied out ; unused
; params: 1 ; params: 1
call GetMusicByte call GetMusicByte
ld hl, CHANNEL_FIELD2C ld hl, CHANNEL_FIELD2C

View File

@ -63,7 +63,7 @@ BattleCommandPointers:
dw BattleCommand_Charge dw BattleCommand_Charge
dw BattleCommand_CheckCharge dw BattleCommand_CheckCharge
dw BattleCommand_TrapTarget dw BattleCommand_TrapTarget
dw BattleCommand3c dw BattleCommand_Unused3C
dw BattleCommand_Rampage dw BattleCommand_Rampage
dw BattleCommand_CheckRampage dw BattleCommand_CheckRampage
dw BattleCommand_ConstantDamage dw BattleCommand_ConstantDamage
@ -96,7 +96,7 @@ BattleCommandPointers:
dw BattleCommand_Endure dw BattleCommand_Endure
dw BattleCommand_CheckCurl dw BattleCommand_CheckCurl
dw BattleCommand_RolloutPower dw BattleCommand_RolloutPower
dw BattleCommand5d dw BattleCommand_Unused5D
dw BattleCommand_FuryCutter dw BattleCommand_FuryCutter
dw BattleCommand_Attract dw BattleCommand_Attract
dw BattleCommand_HappinessPower dw BattleCommand_HappinessPower

View File

@ -245,45 +245,45 @@ SpriteAnimFrameData:
frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP
dorestart dorestart
; unused .Frameset_Unknown1: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_43, 8 frame SPRITE_ANIM_OAMSET_UNUSED_43, 8
frame SPRITE_ANIM_OAMSET_UNUSED_44, 8 frame SPRITE_ANIM_OAMSET_UNUSED_44, 8
dorestart dorestart
; unused .Frameset_Unknown2: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_45, 8 frame SPRITE_ANIM_OAMSET_UNUSED_45, 8
frame SPRITE_ANIM_OAMSET_UNUSED_46, 8 frame SPRITE_ANIM_OAMSET_UNUSED_46, 8
dorestart dorestart
; unused .Frameset_Unknown3: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_47, 8 frame SPRITE_ANIM_OAMSET_UNUSED_47, 8
frame SPRITE_ANIM_OAMSET_UNUSED_48, 8 frame SPRITE_ANIM_OAMSET_UNUSED_48, 8
dorestart dorestart
; unused .Frameset_Unknown4: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_49, 1 frame SPRITE_ANIM_OAMSET_UNUSED_49, 1
frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP
frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP
frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP
dorestart dorestart
; unused .Frameset_Unknown5: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4A, 32 frame SPRITE_ANIM_OAMSET_UNUSED_4A, 32
endanim endanim
; unused .Frameset_Unknown6: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4B, 32 frame SPRITE_ANIM_OAMSET_UNUSED_4B, 32
endanim endanim
; unused .Frameset_Unknown7: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4C, 32 frame SPRITE_ANIM_OAMSET_UNUSED_4C, 32
endanim endanim
; unused .Frameset_Unknown8: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4D, 32 frame SPRITE_ANIM_OAMSET_UNUSED_4D, 32
endanim endanim
; unused .Frameset_Unknown9: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4E, 3 frame SPRITE_ANIM_OAMSET_UNUSED_4E, 3
dowait 3 dowait 3
dorestart dorestart

View File

@ -181,7 +181,7 @@ SpriteAnimOAMData:
dbsprite -1, 0, 0, 0, $00, 7 | Y_FLIP dbsprite -1, 0, 0, 0, $00, 7 | Y_FLIP
dbsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP dbsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP
; unused .OAMData_Unknown1: ; unreferenced
db 4 db 4
dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY
dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY
@ -305,7 +305,7 @@ SpriteAnimOAMData:
dbsprite 1, 0, 4, 4, $17, 0 dbsprite 1, 0, 4, 4, $17, 0
dbsprite 1, 1, 4, 4, $18, 0 dbsprite 1, 1, 4, 4, $18, 0
; unused .OAMData_Unknown2: ; unreferenced
db 36 db 36
dbsprite -3, -3, 0, 0, $00, 0 dbsprite -3, -3, 0, 0, $00, 0
dbsprite -2, -3, 0, 0, $01, 0 dbsprite -2, -3, 0, 0, $01, 0

View File

@ -349,7 +349,7 @@ BattleText_StringBuffer1GrewToLevel:
sound_dex_fanfare_50_79 sound_dex_fanfare_50_79
text_end text_end
text_end ; unused text_end ; unreferenced
BattleText_WildMonIsEating: BattleText_WildMonIsEating:
text "Wild @" text "Wild @"

View File

@ -5714,8 +5714,7 @@ BattleCommand_Charge:
text_far _BattleDugText text_far _BattleDugText
text_end text_end
BattleCommand3c: BattleCommand_Unused3C: ; unreferenced
; unused
ret ret
BattleCommand_TrapTarget: BattleCommand_TrapTarget:
@ -6489,8 +6488,7 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm"
INCLUDE "engine/battle/move_effects/rollout.asm" INCLUDE "engine/battle/move_effects/rollout.asm"
BattleCommand5d: BattleCommand_Unused5D: ; unreferenced
; unused
ret ret
INCLUDE "engine/battle/move_effects/fury_cutter.asm" INCLUDE "engine/battle/move_effects/fury_cutter.asm"

View File

@ -1437,8 +1437,8 @@ DebugTileset_CalculatePalette:
ld [hl], d ld [hl], d
ret ret
; unused .dummy1: ; unreferenced
ret ret
; unused .dummy2: ; unreferenced
ret ret

View File

@ -87,4 +87,5 @@ INCBIN "gfx/diploma/page1.tilemap"
DiplomaPage2Tilemap: DiplomaPage2Tilemap:
INCBIN "gfx/diploma/page2.tilemap" INCBIN "gfx/diploma/page2.tilemap"
ret ; unused Diploma_DummyFunction: ; unreferenced
ret

View File

@ -228,9 +228,12 @@ MomItsInYourRoomText:
text_far _MomItsInYourRoomText text_far _MomItsInYourRoomText
text_end text_end
db 0 ; unused
DummyPredef3A_DummyData: ; unreferenced
db 0
DummyPredef3A: DummyPredef3A:
ret ret
ret ; unused DummyPredef3A_DummyFunction: ; unreferenced
ret

View File

@ -1722,7 +1722,7 @@ Script_GetOnBike_Register:
special UpdatePlayerSprite special UpdatePlayerSprite
end end
; unused Overworld_DummyFunction: ; unreferenced
nop nop
ret ret

View File

@ -648,7 +648,7 @@ PokeAnim_ConvertAndApplyBitmask:
.skip2 .skip2
ret ret
; unused .UnusedSizeData: ; unreferenced
db 6, 5, 4 db 6, 5, 4
.GetTilemap: .GetTilemap:

View File

@ -9,7 +9,7 @@ Intro_MainMenu:
farcall MainMenu farcall MainMenu
jp StartTitleScreen jp StartTitleScreen
; unused IntroMenu_DummyFunction: ; unreferenced
ret ret
PrintDayOfWeek: PrintDayOfWeek:

View File

@ -1334,7 +1334,7 @@ MailComposition_TryAddLastCharacter:
ld a, [wNamingScreenLastCharacter] ld a, [wNamingScreenLastCharacter]
jp MailComposition_TryAddCharacter jp MailComposition_TryAddCharacter
; unused .add_dakuten ; unreferenced
ld a, [wNamingScreenCurNameLength] ld a, [wNamingScreenCurNameLength]
and a and a
ret z ret z

View File

@ -296,7 +296,8 @@ TrainerCard_Page1_PrintDexCaught_GameTime:
db "#DEX" db "#DEX"
next "PLAY TIME@" next "PLAY TIME@"
db "@" ; unused .Unused: ; unreferenced
db "@"
.Badges: .Badges:
db " BADGES▶@" db " BADGES▶@"

View File

@ -21,7 +21,7 @@ CrystalIntro:
call DelayFrame call DelayFrame
jp .loop jp .loop
.ShutOffMusic: .ShutOffMusic
ld de, MUSIC_NONE ld de, MUSIC_NONE
call PlayMusic call PlayMusic
@ -152,14 +152,14 @@ IntroScene2:
cp $80 cp $80
jr nc, .endscene jr nc, .endscene
cp $60 cp $60
jr nz, .DontPlaySound jr nz, .nosound
push af push af
depixel 11, 11 depixel 11, 11
call CrystalIntro_InitUnownAnim call CrystalIntro_InitUnownAnim
ld de, SFX_INTRO_UNOWN_1 ld de, SFX_INTRO_UNOWN_1
call PlaySFX call PlaySFX
pop af pop af
.DontPlaySound: .nosound
ld [wIntroSceneTimer], a ld [wIntroSceneTimer], a
xor a xor a
call CrystalIntro_UnownFade call CrystalIntro_UnownFade
@ -971,7 +971,8 @@ IntroScene20:
xor a xor a
call Intro_Scene20_AppearUnown call Intro_Scene20_AppearUnown
ret ret
; unused
.AppearUnownPal2: ; unreferenced
ld a, c ld a, c
and $1c and $1c
srl a srl a
@ -981,7 +982,7 @@ IntroScene20:
call Intro_Scene20_AppearUnown call Intro_Scene20_AppearUnown
ret ret
.finished .finished:
call NextIntroScene call NextIntroScene
ret ret

View File

@ -82,7 +82,7 @@ LoadMapObjects:
farcall InitializeVisibleSprites farcall InitializeVisibleSprites
ret ret
; unused MapSetup_DummyFunction: ; unreferenced
ret ret
ResetPlayerObjectAction: ResetPlayerObjectAction:

View File

@ -311,7 +311,7 @@ DoPlayerMovement::
scf scf
ret ret
; unused .unused ; unreferenced
xor a xor a
ret ret

View File

@ -2203,7 +2203,8 @@ Script_writeunusedbytebuffer:
ld [wUnusedScriptByteBuffer], a ld [wUnusedScriptByteBuffer], a
ret ret
db closetext_command ; unused UnusedClosetextScript: ; unreferenced
closetext
Script_closetext: Script_closetext:
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
@ -2352,7 +2353,7 @@ Script_checksave:
ld [wScriptVar], a ld [wScriptVar], a
ret ret
; unused Script_checkver_duplicate: ; unreferenced
ld a, [.gs_version] ld a, [.gs_version]
ld [wScriptVar], a ld [wScriptVar], a
ret ret

View File

@ -220,12 +220,12 @@ CheckUnusedTwoDayTimer:
call UpdateTimeRemaining call UpdateTimeRemaining
ret ret
; unused UnusedSetSwarmFlag: ; unreferenced
ld hl, wDailyFlags1 ld hl, wDailyFlags1
set DAILYFLAGS1_FISH_SWARM_F, [hl] set DAILYFLAGS1_FISH_SWARM_F, [hl]
ret ret
; unused UnusedCheckSwarmFlag: ; unreferenced
and a and a
ld hl, wDailyFlags1 ld hl, wDailyFlags1
bit DAILYFLAGS1_FISH_SWARM_F, [hl] bit DAILYFLAGS1_FISH_SWARM_F, [hl]

View File

@ -1271,7 +1271,7 @@ PokegearPhoneContactSubmenu:
dw .Call dw .Call
dw .Cancel dw .Cancel
; unused GetAMPMHours: ; unreferenced
ldh a, [hHours] ldh a, [hHours]
cp 12 cp 12
jr c, .am jr c, .am
@ -1442,7 +1442,7 @@ UpdateRadioStation:
ldh [hBGMapMode], a ldh [hBGMapMode], a
ret ret
; unused LoadPokegearRadioChannelPointer: ; unreferenced
ld [wPokegearRadioChannelBank], a ld [wPokegearRadioChannelBank], a
ld a, [hli] ld a, [hli]
ld [wPokegearRadioChannelAddr], a ld [wPokegearRadioChannelAddr], a

View File

@ -2475,7 +2475,7 @@ BillsPC_ChangeBoxSubmenu:
call CopyName2 call CopyName2
ret ret
hlcoord 11, 7 ; unused hlcoord 11, 7 ; unreferenced
.MenuHeader: .MenuHeader:
db MENU_BACKUP_TILES ; flags db MENU_BACKUP_TILES ; flags

View File

@ -327,7 +327,7 @@ EvolveAfterBattle_MasterLoop:
inc hl inc hl
jp .loop jp .loop
; unused .UnusedReturnToMap: ; unreferenced
pop hl pop hl
.ReturnToMap: .ReturnToMap:
pop de pop de

View File

@ -2163,7 +2163,8 @@ GetMapEnvironment::
pop hl pop hl
ret ret
ret ; unused Map_DummyFunction:: ; unreferenced
ret
GetAnyMapEnvironment:: GetAnyMapEnvironment::
push hl push hl

View File

@ -330,7 +330,7 @@ MenuTextbox::
pop hl pop hl
jp PrintText jp PrintText
; unused Menu_DummyFunction:: ; unreferenced
ret ret
LoadMenuTextbox:: LoadMenuTextbox::

View File

@ -141,12 +141,15 @@ RadioTerminator::
PrintText:: PrintText::
call SetUpTextbox call SetUpTextbox
; fallthrough
BuenaPrintText:: BuenaPrintText::
push hl push hl
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
call ClearBox call ClearBox
pop hl pop hl
; fallthrough
PrintTextboxText:: PrintTextboxText::
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY bccoord TEXTBOX_INNERX, TEXTBOX_INNERY
@ -163,6 +166,7 @@ SetUpTextbox::
PlaceString:: PlaceString::
push hl push hl
; fallthrough
PlaceNextChar:: PlaceNextChar::
ld a, [de] ld a, [de]
@ -173,7 +177,9 @@ PlaceNextChar::
pop hl pop hl
ret ret
pop de ; unused DummyChar:: ; unreferenced
pop de
; fallthrough
NextChar:: NextChar::
inc de inc de
@ -319,12 +325,13 @@ PlaceKokoWa: print_name PlaceKokoWaText
PlaceMoveTargetsName:: PlaceMoveTargetsName::
ldh a, [hBattleTurn] ldh a, [hBattleTurn]
xor 1 xor 1
jr PlaceMoveUsersName.place jr PlaceBattlersName
PlaceMoveUsersName:: PlaceMoveUsersName::
ldh a, [hBattleTurn] ldh a, [hBattleTurn]
; fallthrough
.place: PlaceBattlersName:
push de push de
and a and a
jr nz, .enemy jr nz, .enemy

View File

@ -60,7 +60,7 @@ CGBOnly_CopyTilemapAtOnce::
CopyTilemapAtOnce:: CopyTilemapAtOnce::
jr _CopyTilemapAtOnce jr _CopyTilemapAtOnce
; unused CopyAttrmapAndTilemapToWRAMBank3: ; unreferenced
farcall HDMATransferAttrmapAndTilemapToWRAMBank3 farcall HDMATransferAttrmapAndTilemapToWRAMBank3
ret ret

View File

@ -92,6 +92,6 @@ SafeUpdateSprites::
ldh [hOAMUpdate], a ldh [hOAMUpdate], a
ret ret
; unused SetCarryFlag:: ; unreferenced
scf scf
ret ret

View File

@ -6858,7 +6858,7 @@ Function112d33:
dec a dec a
jp .asm_112e46 jp .asm_112e46
; unused .asm_112d4c ; unreferenced
ret ret
.asm_112d4d .asm_112d4d

View File

@ -204,7 +204,8 @@ LakeOfRageMagikarpHouseUnusedRecordText:
text_ram wStringBuffer4 text_ram wStringBuffer4
text_end text_end
text_end ; unused LakeOfRageMagikarpHouseUnusedDummyText: ; unreferenced
text_end
LakeOfRageMagikarpHouse_MapEvents: LakeOfRageMagikarpHouse_MapEvents:
db 0, 0 ; filler db 0, 0 ; filler

View File

@ -423,7 +423,7 @@ BillsHouseSignText:
line "BILL'S HOUSE" line "BILL'S HOUSE"
done done
; unused UnusedBillsHouseSignText: ; unreferenced
text "BILL'S HOUSE" text "BILL'S HOUSE"
done done

View File

@ -725,7 +725,6 @@ CooltrainerfKateAfterText:
done done
Route34IlexForestSignText: Route34IlexForestSignText:
; unused
text "ILEX FOREST" text "ILEX FOREST"
line "THROUGH THE GATE" line "THROUGH THE GATE"
done done