Comment, remove, or revise many unreferenced labels

This commit is contained in:
Rangi
2020-10-26 15:45:57 -04:00
parent a2b6befd7d
commit 9dcdad5e60
180 changed files with 810 additions and 1032 deletions

View File

@@ -549,7 +549,7 @@ GetDecoName:
ld a, e
jr .getpokename
.unused
.unused ; unreferenced
push de
call .getdeconame
pop de
@@ -939,7 +939,7 @@ GetDecorationID:
pop hl
ret
SetAllDecorationFlags:
SetAllDecorationFlags: ; unreferenced
ld hl, DecorationIDs
.loop
ld a, [hli]

View File

@@ -25,76 +25,76 @@ OverworldLoop::
DisableEvents:
xor a
ld [wScriptFlags3], a
ld [wScriptFlags2], a
ret
EnableEvents::
ld a, $ff
ld [wScriptFlags3], a
ld [wScriptFlags2], a
ret
CheckBit5_ScriptFlags3:
ld hl, wScriptFlags3
CheckBit5_ScriptFlags2:
ld hl, wScriptFlags2
bit 5, [hl]
ret
DisableWarpsConnxns:
ld hl, wScriptFlags3
DisableWarpsConnxns: ; unreferenced
ld hl, wScriptFlags2
res 2, [hl]
ret
DisableCoordEvents:
ld hl, wScriptFlags3
DisableCoordEvents: ; unreferenced
ld hl, wScriptFlags2
res 1, [hl]
ret
DisableStepCount:
ld hl, wScriptFlags3
DisableStepCount: ; unreferenced
ld hl, wScriptFlags2
res 0, [hl]
ret
DisableWildEncounters:
ld hl, wScriptFlags3
DisableWildEncounters: ; unreferenced
ld hl, wScriptFlags2
res 4, [hl]
ret
EnableWarpsConnxns:
ld hl, wScriptFlags3
EnableWarpsConnxns: ; unreferenced
ld hl, wScriptFlags2
set 2, [hl]
ret
EnableCoordEvents:
ld hl, wScriptFlags3
EnableCoordEvents: ; unreferenced
ld hl, wScriptFlags2
set 1, [hl]
ret
EnableStepCount:
ld hl, wScriptFlags3
EnableStepCount: ; unreferenced
ld hl, wScriptFlags2
set 0, [hl]
ret
EnableWildEncounters:
ld hl, wScriptFlags3
ld hl, wScriptFlags2
set 4, [hl]
ret
CheckWarpConnxnScriptFlag:
ld hl, wScriptFlags3
ld hl, wScriptFlags2
bit 2, [hl]
ret
CheckCoordEventScriptFlag:
ld hl, wScriptFlags3
ld hl, wScriptFlags2
bit 1, [hl]
ret
CheckStepCountScriptFlag:
ld hl, wScriptFlags3
ld hl, wScriptFlags2
bit 0, [hl]
ret
CheckWildEncountersScriptFlag:
ld hl, wScriptFlags3
ld hl, wScriptFlags2
bit 4, [hl]
ret
@@ -135,7 +135,7 @@ EnterMap:
ld [wMapStatus], a
ret
UnusedWait30Frames:
UnusedWait30Frames: ; unreferenced
ld c, 30
call DelayFrames
ret
@@ -248,7 +248,7 @@ PlayerEvents:
and a
ret nz
call Dummy_CheckScriptFlags3Bit5 ; This is a waste of time
call Dummy_CheckScriptFlags2Bit5 ; This is a waste of time
call CheckTrainerBattle_GetPlayerEvent
jr c, .ok
@@ -395,8 +395,8 @@ SetMinTwoStepWildEncounterCooldown:
ld [wWildEncounterCooldown], a
ret
Dummy_CheckScriptFlags3Bit5:
call CheckBit5_ScriptFlags3
Dummy_CheckScriptFlags2Bit5:
call CheckBit5_ScriptFlags2
ret z
call SetXYCompareFlags
ret
@@ -480,8 +480,8 @@ CheckTimeEvents:
scf
ret
.unused
ld a, 8
.unused ; unreferenced
ld a, $8 ; ???
scf
ret

View File

@@ -2894,20 +2894,20 @@ InitSprites:
ldh [hCurSpriteTile], a
xor a
bit 7, [hl]
jr nz, .skip1
jr nz, .not_vram1
or VRAM_BANK_1
.skip1
.not_vram1
ld hl, OBJECT_FLAGS2
add hl, bc
ld e, [hl]
bit OBJ_FLAGS2_7, e
jr z, .skip2
jr z, .not_priority
or PRIORITY
.skip2
.not_priority
bit USE_OBP1_F, e
jr z, .skip3
jr z, .not_obp_num
or OBP_NUM
.skip3
.not_obp_num
ld hl, OBJECT_PALETTE
add hl, bc
ld d, a
@@ -2917,9 +2917,9 @@ InitSprites:
ld d, a
xor a
bit OVERHEAD_F, e
jr z, .skip4
jr z, .not_overhead
or PRIORITY
.skip4
.not_overhead
ldh [hCurSpriteOAMFlags], a
ld hl, OBJECT_SPRITE_X
add hl, bc

View File

@@ -2173,8 +2173,7 @@ Script_warpcheck:
farcall EnableEvents
ret
Script_enableevents:
; unused
Script_enableevents: ; unreferenced
farcall EnableEvents
ret

View File

@@ -203,7 +203,7 @@ CheckPokerusTick::
xor a
ret
SetUnusedTwoDayTimer:
SetUnusedTwoDayTimer: ; unreferenced
ld a, 2
ld hl, wUnusedTwoDayTimer
ld [hl], a
@@ -308,7 +308,7 @@ UpdateTimeRemaining:
scf
ret
GetSecondsSinceIfLessThan60:
GetSecondsSinceIfLessThan60: ; unreferenced
ld a, [wDaysSince]
and a
jr nz, GetTimeElapsed_ExceedsUnitLimit
@@ -330,7 +330,7 @@ GetMinutesSinceIfLessThan60:
ld a, [wMinutesSince]
ret
GetHoursSinceIfLessThan24:
GetHoursSinceIfLessThan24: ; unreferenced
ld a, [wDaysSince]
and a
jr nz, GetTimeElapsed_ExceedsUnitLimit
@@ -349,7 +349,7 @@ CalcDaysSince:
xor a
jr _CalcDaysSince
CalcHoursDaysSince:
CalcHoursDaysSince: ; unreferenced
inc hl
xor a
jr _CalcHoursDaysSince
@@ -423,7 +423,7 @@ CopyDayToHL:
ld [hl], a
ret
CopyDayHourToHL:
CopyDayHourToHL: ; unreferenced
ld a, [wCurDay]
ld [hli], a
ldh a, [hHours]