Identify more unnamed labels

This commit is contained in:
Rangi 2020-10-05 16:15:57 -04:00
parent ff2d850219
commit 6b7ade66da
13 changed files with 43 additions and 30 deletions

View File

@ -758,7 +758,14 @@ EnemyUsedDireHit:
ld a, DIRE_HIT ld a, DIRE_HIT
jp PrintText_UsedItemOn_AND_AIUpdateHUD jp PrintText_UsedItemOn_AND_AIUpdateHUD
Function3851e: ; unreferenced AICheckEnemyFractionMaxHP: ; unreferenced
; Input: a = divisor
; Work: bc = [wEnemyMonMaxHP] / a
; Work: de = [wEnemyMonHP]
; Output:
; - c, nz if [wEnemyMonHP] > [wEnemyMonMaxHP] / a
; - nc, z if [wEnemyMonHP] = [wEnemyMonMaxHP] / a
; - nc, nz if [wEnemyMonHP] < [wEnemyMonMaxHP] / a
ldh [hDivisor], a ldh [hDivisor], a
ld hl, wEnemyMonMaxHP ld hl, wEnemyMonMaxHP
ld a, [hli] ld a, [hli]

View File

@ -826,9 +826,9 @@ ENDM
jr nz, .row jr nz, .row
ret ret
Function8c7c9: ; unreferenced UnusedWaitBGMapOnce: ; unreferenced
ld a, 1 ld a, 1
ldh [hBGMapMode], a ldh [hBGMapMode], a ; redundant
call WaitBGMap call WaitBGMap
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a

View File

@ -8201,7 +8201,7 @@ InitEnemyWildmon:
predef PlaceGraphic predef PlaceGraphic
ret ret
Function3f662: ; unreferenced FillEnemyMovesFromMoveIndicesBuffer: ; unreferenced
ld hl, wEnemyMonMoves ld hl, wEnemyMonMoves
ld de, wListMoves_MoveIndicesBuffer ld de, wListMoves_MoveIndicesBuffer
ld b, NUM_MOVES ld b, NUM_MOVES

View File

@ -216,16 +216,18 @@ ClearActorHud:
call ClearBox call ClearBox
ret ret
Functioncc220: ; unreferenced PlaceWindowOverBattleTextbox: ; unreferenced
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
ld a, LOW(vBGMap0 tile $28) ; bgcoord hBGMapAddress, 0, 20
ld a, LOW(vBGMap0 + 20 * BG_MAP_WIDTH)
ldh [hBGMapAddress], a ldh [hBGMapAddress], a
ld a, HIGH(vBGMap0 tile $28) ld a, HIGH(vBGMap0 + 20 * BG_MAP_WIDTH)
ldh [hBGMapAddress + 1], a ldh [hBGMapAddress + 1], a
call WaitBGMap2 call WaitBGMap2
ld a, $60 ld a, (SCREEN_HEIGHT - TEXTBOX_HEIGHT) * TILE_WIDTH
ldh [hWY], a ldh [hWY], a
; bgcoord hBGMapAddress, 0, 0
xor a ; LOW(vBGMap0) xor a ; LOW(vBGMap0)
ldh [hBGMapAddress], a ldh [hBGMapAddress], a
ld a, HIGH(vBGMap0) ld a, HIGH(vBGMap0)

View File

@ -312,14 +312,14 @@ CopyTradeName:
call CopyBytes call CopyBytes
ret ret
Functionfcdfb: ; unreferenced Trade_CopyFourCharString: ; unreferenced
ld bc, 4 ld bc, 4
call CopyBytes call CopyBytes
ld a, "@" ld a, "@"
ld [de], a ld [de], a
ret ret
Functionfce05: ; unreferenced Trade_CopyThreeCharString: ; unreferenced
ld bc, 3 ld bc, 3
call CopyBytes call CopyBytes
ld a, "@" ld a, "@"

View File

@ -230,8 +230,7 @@ SlotsLoop:
call PrintNum call PrintNum
ret ret
Function92811: ; unreferenced DebugPrintSlotBias: ; unreferenced
; debug function?
ld a, [wSlotBias] ld a, [wSlotBias]
add 0 add 0
daa daa
@ -248,8 +247,8 @@ Function92811: ; unreferenced
ld [hl], a ld [hl], a
ret ret
Function9282c: ; unreferenced AnimateSlotReelIcons: ; unreferenced
; animate OAM tiles? ; This animation was present in pokegold-spaceworld.
ld hl, wcf66 ld hl, wcf66
ld a, [hl] ld a, [hl]
inc [hl] inc [hl]
@ -259,7 +258,7 @@ Function9282c: ; unreferenced
ld c, NUM_SPRITE_OAM_STRUCTS - 16 ld c, NUM_SPRITE_OAM_STRUCTS - 16
.loop .loop
ld a, [hl] ld a, [hl]
xor %00100000 xor $20 ; alternate between $00-$1f and $20-$3f
ld [hli], a ; tile id ld [hli], a ; tile id
rept SPRITEOAMSTRUCT_LENGTH - 1 rept SPRITEOAMSTRUCT_LENGTH - 1
inc hl inc hl
@ -845,7 +844,9 @@ Slots_UpdateReelPositionAndOAM:
jr nz, .loop jr nz, .loop
ret ret
Function92bbe: ; unreferenced GetUnknownSlotReelData: ; unreferenced
; Used to get OAM attribute values for slot reels?
; (final Slots_UpdateReelPositionAndOAM above reuses tile IDs as OAM palettes)
push hl push hl
srl a srl a
srl a srl a

View File

@ -719,12 +719,13 @@ GetMonPalettePointer:
call _GetMonPalettePointer call _GetMonPalettePointer
ret ret
Function9779: ; unreferenced CGBCopyBattleObjectPals: ; unreferenced
; dummied out
ret ret
call CheckCGB call CheckCGB
ret z ret z
ld hl, BattleObjectPals ld hl, BattleObjectPals
ld a, $90 ld a, (1 << rOBPI_AUTO_INCREMENT) | $10
ldh [rOBPI], a ldh [rOBPI], a
ld c, 6 palettes ld c, 6 palettes
.loop .loop
@ -745,7 +746,7 @@ INCLUDE "gfx/battle_anims/battle_anims.pal"
Function97cc: ; unreferenced Function97cc: ; unreferenced
call CheckCGB call CheckCGB
ret z ret z
ld a, $90 ld a, (1 << rOBPI_AUTO_INCREMENT) | $10
ldh [rOBPI], a ldh [rOBPI], a
ld a, PREDEFPAL_TRADE_TUBE ld a, PREDEFPAL_TRADE_TUBE
call GetPredefPal call GetPredefPal
@ -952,7 +953,7 @@ _InitSGBBorderPals:
dw DataSndPacket7 dw DataSndPacket7
dw DataSndPacket8 dw DataSndPacket8
Function9911: ; unreferenced UpdateSGBBorder: ; unreferenced
di di
xor a xor a
ldh [rJOYP], a ldh [rJOYP], a

View File

@ -484,7 +484,7 @@ TMHM_PlaySFX_ReadText2:
pop de pop de
ret ret
Function2cadf: ; unreferenced VerboseReceiveTMHM: ; unreferenced
call ConvertCurItemIntoCurTMHM call ConvertCurItemIntoCurTMHM
call .CheckHaveRoomForTMHM call .CheckHaveRoomForTMHM
ld hl, .NoRoomTMHMText ld hl, .NoRoomTMHMText
@ -510,7 +510,7 @@ Function2cadf: ; unreferenced
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
inc a inc a
cp NUM_TMS * 2 cp MAX_ITEM_STACK + 1
ret nc ret nc
ld [hl], a ld [hl], a
ret ret

View File

@ -26,7 +26,7 @@ DeleteMapObject::
pop bc pop bc
ret ret
Function437b: HandleObjectStep:
call .CheckObjectStillVisible call .CheckObjectStillVisible
ret c ret c
call .HandleStepType call .HandleStepType
@ -609,7 +609,7 @@ MapObjectMovementPattern:
ret ret
.ObeyDPad: .ObeyDPad:
ld hl, Function5000 ld hl, ApplyPlayerMovementByte
jp HandleMovementData jp HandleMovementData
.Movement08: .Movement08:
@ -630,7 +630,7 @@ MapObjectMovementPattern:
jp _GetMovementObject jp _GetMovementObject
.Movement0d: .Movement0d:
ld hl, Function5000 ld hl, ApplyPlayerMovementByte
jp HandleMovementData jp HandleMovementData
.Movement0e: .Movement0e:
@ -1823,7 +1823,7 @@ UpdateJumpPosition:
db -4, -6, -8, -10, -11, -12, -12, -12 db -4, -6, -8, -10, -11, -12, -12, -12
db -11, -10, -9, -8, -6, -4, 0, 0 db -11, -10, -9, -8, -6, -4, 0, 0
Function5000: ; unscripted? ApplyPlayerMovementByte:
; copy [wPlayerNextMovement] to [wPlayerMovement] ; copy [wPlayerNextMovement] to [wPlayerMovement]
ld a, [wPlayerNextMovement] ld a, [wPlayerNextMovement]
ld hl, wPlayerMovement ld hl, wPlayerMovement
@ -2419,7 +2419,7 @@ HandleNPCStep::
ldh [hMapObjectIndexBuffer], a ldh [hMapObjectIndexBuffer], a
call DoesObjectHaveASprite call DoesObjectHaveASprite
jr z, .next jr z, .next
call Function437b call HandleObjectStep
.next .next
ld hl, OBJECT_LENGTH ld hl, OBJECT_LENGTH
add hl, bc add hl, bc

View File

@ -528,7 +528,7 @@ Phone_CallEnd:
call HangUp_Wait20Frames call HangUp_Wait20Frames
ret ret
Function90316: HangUp_ShutDown: ; unreferenced
ld de, SFX_SHUT_DOWN_PC ld de, SFX_SHUT_DOWN_PC
call PlaySFX call PlaySFX
ret ret

View File

@ -2789,7 +2789,7 @@ INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp"
FlyMapLabelBorderGFX: FlyMapLabelBorderGFX:
INCBIN "gfx/pokegear/flymap_label_border.1bpp" INCBIN "gfx/pokegear/flymap_label_border.1bpp"
Function92311: Function92311: ; unreferenced
xor a xor a
ld [wTownMapPlayerIconLandmark], a ld [wTownMapPlayerIconLandmark], a
call ClearBGPalettes call ClearBGPalettes

View File

@ -483,7 +483,8 @@ StatsScreen_InitUpperHalf:
dw sBoxMonNicknames dw sBoxMonNicknames
dw wBufferMonNick dw wBufferMonNick
Function4df7f: ; unreferenced StatsScreen_PlaceVerticalDivider: ; unreferenced
; The Japanese stats screen has a vertical divider.
hlcoord 7, 0 hlcoord 7, 0
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
ld d, SCREEN_HEIGHT ld d, SCREEN_HEIGHT

View File

@ -1,4 +1,5 @@
Function1dd6a9: ; unreferenced Function1dd6a9: ; unreferenced
; Debug function?
ld a, b ld a, b
ld b, c ld b, c
ld c, a ld c, a