Skip to content

Commit

Permalink
Replace many '; unused' with '; unreferenced'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 28, 2020
1 parent 446f184 commit 6d333be
Show file tree
Hide file tree
Showing 31 changed files with 70 additions and 57 deletions.
6 changes: 3 additions & 3 deletions audio/engine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1615,9 +1615,9 @@ Music_JumpIf:
ret

MusicEE:
; unused
; conditional jump
; checks a byte in ram corresponding to the current channel
; doesn't seem to be set by any commands
; params: 2
; ll hh ; pointer

Expand Down Expand Up @@ -1667,15 +1667,15 @@ MusicEE:
ret

MusicF9:
; unused
; sets some flag
; seems to be unused
; params: 0
ld a, TRUE
ld [wUnusedMusicF9Flag], a
ret

MusicE2:
; seems to have been dummied out
; unused
; params: 1
call GetMusicByte
ld hl, CHANNEL_FIELD2C
Expand Down
4 changes: 2 additions & 2 deletions data/battle/effect_command_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ BattleCommandPointers:
dw BattleCommand_Charge
dw BattleCommand_CheckCharge
dw BattleCommand_TrapTarget
dw BattleCommand3c
dw BattleCommand_Unused3C
dw BattleCommand_Rampage
dw BattleCommand_CheckRampage
dw BattleCommand_ConstantDamage
Expand Down Expand Up @@ -96,7 +96,7 @@ BattleCommandPointers:
dw BattleCommand_Endure
dw BattleCommand_CheckCurl
dw BattleCommand_RolloutPower
dw BattleCommand5d
dw BattleCommand_Unused5D
dw BattleCommand_FuryCutter
dw BattleCommand_Attract
dw BattleCommand_HappinessPower
Expand Down
18 changes: 9 additions & 9 deletions data/sprite_anims/framesets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -245,45 +245,45 @@ SpriteAnimFrameData:
frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP
dorestart

; unused
.Frameset_Unknown1: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_43, 8
frame SPRITE_ANIM_OAMSET_UNUSED_44, 8
dorestart

; unused
.Frameset_Unknown2: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_45, 8
frame SPRITE_ANIM_OAMSET_UNUSED_46, 8
dorestart

; unused
.Frameset_Unknown3: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_47, 8
frame SPRITE_ANIM_OAMSET_UNUSED_48, 8
dorestart

; unused
.Frameset_Unknown4: ; unreferenced
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, OAM_Y_FLIP
frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP
dorestart

; unused
.Frameset_Unknown5: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4A, 32
endanim

; unused
.Frameset_Unknown6: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4B, 32
endanim

; unused
.Frameset_Unknown7: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4C, 32
endanim

; unused
.Frameset_Unknown8: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4D, 32
endanim

; unused
.Frameset_Unknown9: ; unreferenced
frame SPRITE_ANIM_OAMSET_UNUSED_4E, 3
dowait 3
dorestart
Expand Down
4 changes: 2 additions & 2 deletions data/sprite_anims/oam.asm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ SpriteAnimOAMData:
dbsprite -1, 0, 0, 0, $00, 7 | Y_FLIP
dbsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP

; unused
.OAMData_Unknown1: ; unreferenced
db 4
dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY
dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY
Expand Down Expand Up @@ -305,7 +305,7 @@ SpriteAnimOAMData:
dbsprite 1, 0, 4, 4, $17, 0
dbsprite 1, 1, 4, 4, $18, 0

; unused
.OAMData_Unknown2: ; unreferenced
db 36
dbsprite -3, -3, 0, 0, $00, 0
dbsprite -2, -3, 0, 0, $01, 0
Expand Down
2 changes: 1 addition & 1 deletion data/text/battle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ BattleText_StringBuffer1GrewToLevel:
sound_dex_fanfare_50_79
text_end

text_end ; unused
text_end ; unreferenced

BattleText_WildMonIsEating:
text "Wild @"
Expand Down
6 changes: 2 additions & 4 deletions engine/battle/effect_commands.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5714,8 +5714,7 @@ BattleCommand_Charge:
text_far _BattleDugText
text_end

BattleCommand3c:
; unused
BattleCommand_Unused3C: ; unreferenced
ret

BattleCommand_TrapTarget:
Expand Down Expand Up @@ -6489,8 +6488,7 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm"

INCLUDE "engine/battle/move_effects/rollout.asm"

BattleCommand5d:
; unused
BattleCommand_Unused5D: ; unreferenced
ret

INCLUDE "engine/battle/move_effects/fury_cutter.asm"
Expand Down
4 changes: 2 additions & 2 deletions engine/debug/color_picker.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,8 @@ DebugTileset_CalculatePalette:
ld [hl], d
ret

; unused
.dummy1: ; unreferenced
ret

; unused
.dummy2: ; unreferenced
ret
3 changes: 2 additions & 1 deletion engine/events/diploma.asm
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ INCBIN "gfx/diploma/page1.tilemap"
DiplomaPage2Tilemap:
INCBIN "gfx/diploma/page2.tilemap"

ret ; unused
Diploma_DummyFunction: ; unreferenced
ret
7 changes: 5 additions & 2 deletions engine/events/mom_phone.asm
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ MomItsInYourRoomText:
text_far _MomItsInYourRoomText
text_end

db 0 ; unused

DummyPredef3A_DummyData: ; unreferenced
db 0

DummyPredef3A:
ret

ret ; unused
DummyPredef3A_DummyFunction: ; unreferenced
ret
2 changes: 1 addition & 1 deletion engine/events/overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ Script_GetOnBike_Register:
special UpdatePlayerSprite
end

; unused
Overworld_DummyFunction: ; unreferenced
nop
ret

Expand Down
2 changes: 1 addition & 1 deletion engine/gfx/pic_animation.asm
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ PokeAnim_ConvertAndApplyBitmask:
.skip2
ret

; unused
.UnusedSizeData: ; unreferenced
db 6, 5, 4

.GetTilemap:
Expand Down
2 changes: 1 addition & 1 deletion engine/menus/intro_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Intro_MainMenu:
farcall MainMenu
jp StartTitleScreen

; unused
IntroMenu_DummyFunction: ; unreferenced
ret

PrintDayOfWeek:
Expand Down
2 changes: 1 addition & 1 deletion engine/menus/naming_screen.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ MailComposition_TryAddLastCharacter:
ld a, [wNamingScreenLastCharacter]
jp MailComposition_TryAddCharacter

; unused
.add_dakuten ; unreferenced
ld a, [wNamingScreenCurNameLength]
and a
ret z
Expand Down
3 changes: 2 additions & 1 deletion engine/menus/trainer_card.asm
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ TrainerCard_Page1_PrintDexCaught_GameTime:
db "#DEX"
next "PLAY TIME@"

db "@" ; unused
.Unused: ; unreferenced
db "@"

.Badges:
db " BADGES▶@"
Expand Down
11 changes: 6 additions & 5 deletions engine/movie/intro.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CrystalIntro:
call DelayFrame
jp .loop

.ShutOffMusic:
.ShutOffMusic
ld de, MUSIC_NONE
call PlayMusic

Expand Down Expand Up @@ -152,14 +152,14 @@ IntroScene2:
cp $80
jr nc, .endscene
cp $60
jr nz, .DontPlaySound
jr nz, .nosound
push af
depixel 11, 11
call CrystalIntro_InitUnownAnim
ld de, SFX_INTRO_UNOWN_1
call PlaySFX
pop af
.DontPlaySound:
.nosound
ld [wIntroSceneTimer], a
xor a
call CrystalIntro_UnownFade
Expand Down Expand Up @@ -971,7 +971,8 @@ IntroScene20:
xor a
call Intro_Scene20_AppearUnown
ret
; unused

.AppearUnownPal2: ; unreferenced
ld a, c
and $1c
srl a
Expand All @@ -981,7 +982,7 @@ IntroScene20:
call Intro_Scene20_AppearUnown
ret

.finished
.finished:
call NextIntroScene
ret

Expand Down
2 changes: 1 addition & 1 deletion engine/overworld/map_setup.asm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ LoadMapObjects:
farcall InitializeVisibleSprites
ret

; unused
MapSetup_DummyFunction: ; unreferenced
ret

ResetPlayerObjectAction:
Expand Down
2 changes: 1 addition & 1 deletion engine/overworld/player_movement.asm
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ DoPlayerMovement::
scf
ret

; unused
.unused ; unreferenced
xor a
ret

Expand Down
5 changes: 3 additions & 2 deletions engine/overworld/scripting.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2203,7 +2203,8 @@ Script_writeunusedbytebuffer:
ld [wUnusedScriptByteBuffer], a
ret

db closetext_command ; unused
UnusedClosetextScript: ; unreferenced
closetext

Script_closetext:
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
Expand Down Expand Up @@ -2352,7 +2353,7 @@ Script_checksave:
ld [wScriptVar], a
ret

; unused
Script_checkver_duplicate: ; unreferenced
ld a, [.gs_version]
ld [wScriptVar], a
ret
Expand Down
4 changes: 2 additions & 2 deletions engine/overworld/time.asm
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ CheckUnusedTwoDayTimer:
call UpdateTimeRemaining
ret

; unused
UnusedSetSwarmFlag: ; unreferenced
ld hl, wDailyFlags1
set DAILYFLAGS1_FISH_SWARM_F, [hl]
ret

; unused
UnusedCheckSwarmFlag: ; unreferenced
and a
ld hl, wDailyFlags1
bit DAILYFLAGS1_FISH_SWARM_F, [hl]
Expand Down
4 changes: 2 additions & 2 deletions engine/pokegear/pokegear.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ PokegearPhoneContactSubmenu:
dw .Call
dw .Cancel

; unused
GetAMPMHours: ; unreferenced
ldh a, [hHours]
cp 12
jr c, .am
Expand Down Expand Up @@ -1442,7 +1442,7 @@ UpdateRadioStation:
ldh [hBGMapMode], a
ret

; unused
LoadPokegearRadioChannelPointer: ; unreferenced
ld [wPokegearRadioChannelBank], a
ld a, [hli]
ld [wPokegearRadioChannelAddr], a
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/bills_pc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,7 @@ BillsPC_ChangeBoxSubmenu:
call CopyName2
ret

hlcoord 11, 7 ; unused
hlcoord 11, 7 ; unreferenced

.MenuHeader:
db MENU_BACKUP_TILES ; flags
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/evolve.asm
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ EvolveAfterBattle_MasterLoop:
inc hl
jp .loop

; unused
.UnusedReturnToMap: ; unreferenced
pop hl
.ReturnToMap:
pop de
Expand Down
3 changes: 2 additions & 1 deletion home/map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,8 @@ GetMapEnvironment::
pop hl
ret

ret ; unused
Map_DummyFunction:: ; unreferenced
ret

GetAnyMapEnvironment::
push hl
Expand Down
2 changes: 1 addition & 1 deletion home/menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ MenuTextbox::
pop hl
jp PrintText

; unused
Menu_DummyFunction:: ; unreferenced
ret

LoadMenuTextbox::
Expand Down
Loading

0 comments on commit 6d333be

Please sign in to comment.