Identify more unnamed labels

This commit is contained in:
Rangi 2020-10-04 22:34:50 -04:00
parent e475ce6fda
commit d9603e3e33
9 changed files with 89 additions and 73 deletions

View File

@ -980,7 +980,7 @@ Functioncd557:
ret ret
.negative .negative
and $3f and %00111111
cp $20 cp $20
jr nc, .minus_256 jr nc, .minus_256
cp $18 cp $18
@ -1995,7 +1995,7 @@ BattleAnimFunction_Kick:
dw .one dw .one
dw .two ; Jump Kick, Hi Jump Kick dw .two ; Jump Kick, Hi Jump Kick
dw .three ; Rolling Kick dw .three ; Rolling Kick
dw .four dw .four ; Rolling Kick (continued)
.zero .zero
ret ret
@ -2005,13 +2005,13 @@ BattleAnimFunction_Kick:
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $30 cp $30
jr c, .unknown_cdb24 jr c, .move_down
ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
ret ret
.unknown_cdb24 .move_down
add $4 add $4
ld [hl], a ld [hl], a
ret ret

View File

@ -233,28 +233,28 @@ _PlayersPC:
ld [wWhichIndexSet], a ld [wWhichIndexSet], a
ld hl, PlayersPCAskWhatDoText ld hl, PlayersPCAskWhatDoText
call PC_DisplayTextWaitMenu call PC_DisplayTextWaitMenu
call Function15715 call .PlayersPC
call ExitMenu call ExitMenu
ret ret
Function15715: .PlayersPC:
xor a xor a
ld [wPCItemsCursor], a ld [wPCItemsCursor], a
ld [wPCItemsScrollPosition], a ld [wPCItemsScrollPosition], a
ld hl, PlayersPCMenuData ld hl, PlayersPCMenuData
call LoadMenuHeader call LoadMenuHeader
.asm_15722 .loop
call UpdateTimePals call UpdateTimePals
call DoNthMenu call DoNthMenu
jr c, .asm_15731 jr c, .turn_off
call MenuJumptable call MenuJumptable
jr nc, .asm_15722 jr nc, .loop
jr .asm_15732 jr .done
.asm_15731 .turn_off
xor a xor a
.asm_15732 .done
call ExitMenu call ExitMenu
ret ret

View File

@ -185,7 +185,7 @@ SlotsLoop:
ld [wCurSpriteOAMAddr], a ld [wCurSpriteOAMAddr], a
callfar DoNextFrameForFirst16Sprites callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout call .PrintCoinsAndPayout
call .Stubbed_Function927d3 call .Stubbed_AlternateMatchingSevensPalette
call DelayFrame call DelayFrame
and a and a
ret ret
@ -194,7 +194,7 @@ SlotsLoop:
scf scf
ret ret
.Stubbed_Function927d3: .Stubbed_AlternateMatchingSevensPalette:
; dummied out ; dummied out
ret ret
ld a, [wReel1ReelAction] ld a, [wReel1ReelAction]
@ -206,7 +206,7 @@ SlotsLoop:
ld a, [wFirstTwoReelsMatchingSevens] ld a, [wFirstTwoReelsMatchingSevens]
and a and a
jr nz, .matching_sevens jr nz, .matching_sevens
ld a, %11100100 ld a, %11100100 ; alternates two palettes
call DmgToCgbBGPals call DmgToCgbBGPals
ret ret
@ -849,17 +849,22 @@ Function92bbe: ; unreferenced
push hl push hl
srl a srl a
srl a srl a
add LOW(.Unknown_92bce) add LOW(.data)
ld l, a ld l, a
ld a, 0 ld a, 0
adc HIGH(.Unknown_92bce) adc HIGH(.data)
ld h, a ld h, a
ld a, [hl] ld a, [hl]
pop hl pop hl
ret ret
.Unknown_92bce: .data:
db 0, 1, 2, 3, 4, 5 db 0 ; SLOTS_SEVEN
db 1 ; SLOTS_POKEBALL
db 2 ; SLOTS_CHERRY
db 3 ; SLOTS_PIKACHU
db 4 ; SLOTS_SQUIRTLE
db 5 ; SLOTS_STARYU
ReelActionJumptable: ReelActionJumptable:
ld hl, REEL_ACTION ld hl, REEL_ACTION
@ -1090,11 +1095,11 @@ ReelAction_WaitReel2SkipTo7:
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_92d02 jr z, .ready
dec [hl] dec [hl]
ret ret
.asm_92d02 .ready
ld a, SFX_THROW_BALL ld a, SFX_THROW_BALL
call Slots_PlaySFX call Slots_PlaySFX
ld hl, REEL_ACTION ld hl, REEL_ACTION

View File

@ -133,7 +133,7 @@ SGB_ApplyPartyMenuHPPals:
ld [hl], e ld [hl], e
ret ret
Function8b07: ; unreferenced Intro_LoadMagikarpPalettes: ; unreferenced
call CheckCGB call CheckCGB
ret z ret z
; CGB only ; CGB only
@ -166,7 +166,7 @@ Function8b07: ; unreferenced
RGB 08, 16, 28 RGB 08, 16, 28
RGB 00, 00, 00 RGB 00, 00, 00
Function8b3f: ; unreferenced Intro_LoadAllPal0: ; unreferenced
call CheckCGB call CheckCGB
ret nz ret nz
ldh a, [hSGB] ldh a, [hSGB]
@ -175,7 +175,7 @@ Function8b3f: ; unreferenced
ld hl, BlkPacket_AllPal0 ld hl, BlkPacket_AllPal0
jp PushSGBPals jp PushSGBPals
Function8b4d: ; unreferenced Intro_LoadBetaIntroVenusaurPalettes: ; unreferenced
call CheckCGB call CheckCGB
jr nz, .cgb jr nz, .cgb
ldh a, [hSGB] ldh a, [hSGB]
@ -190,7 +190,7 @@ Function8b4d: ; unreferenced
call GetPredefPal call GetPredefPal
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
Function8b67: ; unreferenced Intro_LoadPackPalettes: ; unreferenced
call CheckCGB call CheckCGB
jr nz, .cgb jr nz, .cgb
ldh a, [hSGB] ldh a, [hSGB]
@ -273,7 +273,7 @@ LoadNthMiddleBGPal:
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
ret ret
Function8bec: ; unreferenced LoadBetaPokerPalettes: ; unreferenced
ldh a, [hCGB] ldh a, [hCGB]
and a and a
jr nz, .cgb jr nz, .cgb

View File

@ -1267,7 +1267,7 @@ ResetClock:
farcall _ResetClock farcall _ResetClock
jp Init jp Init
Function639b: ; unreferenced UpdateTitleTrailSprite: ; unreferenced
; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here. ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
ld a, [wTitleScreenTimer] ld a, [wTitleScreenTimer]
and %00000011 and %00000011
@ -1279,9 +1279,9 @@ Function639b: ; unreferenced
ld h, 0 ld h, 0
add hl, hl add hl, hl
add hl, hl add hl, hl
ld de, .Data_63ca ld de, .TitleTrailCoords
add hl, de add hl, de
; If bit 2 of [wTitleScreenTimer] is set, get the second dw; else, get the first dw ; If bit 2 of [wTitleScreenTimer] is set, get the second coords; else, get the first coords
ld a, [wTitleScreenTimer] ld a, [wTitleScreenTimer]
and %00000100 and %00000100
srl a srl a
@ -1299,14 +1299,25 @@ Function639b: ; unreferenced
call InitSpriteAnimStruct call InitSpriteAnimStruct
ret ret
.Data_63ca: .TitleTrailCoords:
trail_coords: MACRO
rept _NARG / 2
_dx = 4
if \1 == 0 && \2 == 0
_dx = 0
endc
dbpixel \1, \2, _dx, 0
shift
shift
endr
ENDM
; frame 0 y, x; frame 1 y, x ; frame 0 y, x; frame 1 y, x
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8 trail_coords 11, 10, 0, 0
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8 trail_coords 11, 13, 11, 11
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 15 * 8 trail_coords 11, 13, 11, 15
db 11 * 8 + 4, 17 * 8, 11 * 8 + 4, 15 * 8 trail_coords 11, 17, 11, 15
db 0 * 8, 0 * 8, 11 * 8 + 4, 15 * 8 trail_coords 0, 0, 11, 15
db 0 * 8, 0 * 8, 11 * 8 + 4, 11 * 8 trail_coords 0, 0, 11, 11
Copyright: Copyright:
call ClearTilemap call ClearTilemap

View File

@ -311,7 +311,7 @@ SpecialCallWhereverYouAre:
scf scf
ret ret
Function90199: MakePhoneCallFromPokegear:
; Don't do the call if you're in a link communication ; Don't do the call if you're in a link communication
ld a, [wLinkMode] ld a, [wLinkMode]
and a and a
@ -465,7 +465,7 @@ RingTwice_StartCall:
Phone_CallerTextboxWithName: Phone_CallerTextboxWithName:
ld a, [wCurCaller] ld a, [wCurCaller]
ld b, a ld b, a
call Function90363 call Phone_TextboxWithName
ret ret
PhoneCall:: PhoneCall::
@ -575,7 +575,7 @@ Phone_Wait20Frames:
farcall PhoneRing_CopyTilemapAtOnce farcall PhoneRing_CopyTilemapAtOnce
ret ret
Function90363: Phone_TextboxWithName:
push bc push bc
call Phone_CallerTextbox call Phone_CallerTextbox
hlcoord 1, 1 hlcoord 1, 1
@ -585,7 +585,7 @@ Function90363:
ld d, h ld d, h
ld e, l ld e, l
pop bc pop bc
call Function90380 call GetCallerClassAndName
ret ret
Phone_CallerTextbox: Phone_CallerTextbox:
@ -595,7 +595,7 @@ Phone_CallerTextbox:
call Textbox call Textbox
ret ret
Function90380: GetCallerClassAndName:
ld h, d ld h, d
ld l, e ld l, e
ld a, b ld a, b

View File

@ -905,7 +905,7 @@ PokegearPhone_MakePhoneCall:
call WaitSFX call WaitSFX
ld a, [wPokegearPhoneSelectedPerson] ld a, [wPokegearPhoneSelectedPerson]
ld b, a ld b, a
call Function90199 call MakePhoneCallFromPokegear
ld c, 10 ld c, 10
call DelayFrames call DelayFrames
ld hl, wOptions ld hl, wOptions
@ -1050,7 +1050,7 @@ PokegearPhone_UpdateDisplayList:
ld e, l ld e, l
pop af pop af
ld b, a ld b, a
call Function90380 call GetCallerClassAndName
pop hl pop hl
ld a, [wPokegearPhoneLoadNameBuffer] ld a, [wPokegearPhoneLoadNameBuffer]
inc a inc a

View File

@ -346,11 +346,11 @@ TakePartyItem:
call GetPartyItemLocation call GetPartyItemLocation
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_12c8c jr z, .not_holding_item
ld [wCurItem], a ld [wCurItem], a
call ReceiveItemFromPokemon call ReceiveItemFromPokemon
jr nc, .asm_12c94 jr nc, .item_storage_full
farcall ItemIsMail farcall ItemIsMail
call GetPartyItemLocation call GetPartyItemLocation
@ -360,18 +360,18 @@ TakePartyItem:
call GetItemName call GetItemName
ld hl, PokemonTookItemText ld hl, PokemonTookItemText
call MenuTextboxBackup call MenuTextboxBackup
jr .asm_12c9a jr .done
.asm_12c8c .not_holding_item
ld hl, PokemonNotHoldingText ld hl, PokemonNotHoldingText
call MenuTextboxBackup call MenuTextboxBackup
jr .asm_12c9a jr .done
.asm_12c94 .item_storage_full
ld hl, ItemStorageFullText ld hl, ItemStorageFullText
call MenuTextboxBackup call MenuTextboxBackup
.asm_12c9a .done
ret ret
GiveTakeItemMenuData: GiveTakeItemMenuData:

View File

@ -8,12 +8,12 @@ PrintPage1:
hlcoord 17, 1, wPrinterTilemapBuffer hlcoord 17, 1, wPrinterTilemapBuffer
ld a, $62 ld a, $62
ld [hli], a ld [hli], a
inc a inc a ; $63
ld [hl], a ld [hl], a
hlcoord 17, 2, wPrinterTilemapBuffer hlcoord 17, 2, wPrinterTilemapBuffer
ld a, $64 ld a, $64
ld [hli], a ld [hli], a
inc a inc a ; $65
ld [hl], a ld [hl], a
hlcoord 1, 9, wPrinterTilemapBuffer hlcoord 1, 9, wPrinterTilemapBuffer
ld a, " " ld a, " "
@ -173,7 +173,7 @@ PrintPartyMonPage1:
ld [wNamedObjectIndexBuffer], a ld [wNamedObjectIndexBuffer], a
ld [wCurSpecies], a ld [wCurSpecies], a
ld hl, wPartyMonNicknames ld hl, wPartyMonNicknames
call Function1dc50e call GetCurPartyMonName
hlcoord 8, 4 hlcoord 8, 4
call PlaceString call PlaceString
hlcoord 9, 6 hlcoord 9, 6
@ -190,26 +190,26 @@ PrintPartyMonPage1:
lb bc, PRINTNUM_LEADINGZEROS | 1, 3 lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum call PrintNum
hlcoord 1, 9 hlcoord 1, 9
ld de, String1dc550 ld de, PrintParty_OTString
call PlaceString call PlaceString
ld hl, wPartyMonOT ld hl, wPartyMonOT
call Function1dc50e call GetCurPartyMonName
hlcoord 4, 9 hlcoord 4, 9
call PlaceString call PlaceString
hlcoord 1, 11 hlcoord 1, 11
ld de, String1dc559 ld de, PrintParty_IDNoString
call PlaceString call PlaceString
hlcoord 4, 11 hlcoord 4, 11
ld de, wTempMonID ld de, wTempMonID
lb bc, PRINTNUM_LEADINGZEROS | 2, 5 lb bc, PRINTNUM_LEADINGZEROS | 2, 5
call PrintNum call PrintNum
hlcoord 1, 14 hlcoord 1, 14
ld de, String1dc554 ld de, PrintParty_MoveString
call PlaceString call PlaceString
hlcoord 7, 14 hlcoord 7, 14
ld a, [wTempMonMoves + 0] ld a, [wTempMonMoves + 0]
call Function1dc51a call PlaceMoveNameString
call Function1dc52c call PlaceGenderAndShininess
ld hl, wTempMonDVs ld hl, wTempMonDVs
predef GetUnownLetter predef GetUnownLetter
ld hl, wBoxAlignment ld hl, wBoxAlignment
@ -249,15 +249,15 @@ PrintPartyMonPage2:
call CopyBytes call CopyBytes
hlcoord 7, 0 hlcoord 7, 0
ld a, [wTempMonMoves + 1] ld a, [wTempMonMoves + 1]
call Function1dc51a call PlaceMoveNameString
hlcoord 7, 2 hlcoord 7, 2
ld a, [wTempMonMoves + 2] ld a, [wTempMonMoves + 2]
call Function1dc51a call PlaceMoveNameString
hlcoord 7, 4 hlcoord 7, 4
ld a, [wTempMonMoves + 3] ld a, [wTempMonMoves + 3]
call Function1dc51a call PlaceMoveNameString
hlcoord 7, 7 hlcoord 7, 7
ld de, String1dc55d ld de, PrintParty_StatsString
call PlaceString call PlaceString
hlcoord 16, 7 hlcoord 16, 7
ld de, wTempMonAttack ld de, wTempMonAttack
@ -285,7 +285,7 @@ PrintPartyMonPage2:
call PrintNum call PrintNum
ret ret
Function1dc50e: GetCurPartyMonName:
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
ld a, [wCurPartyMon] ld a, [wCurPartyMon]
call AddNTimes call AddNTimes
@ -293,7 +293,7 @@ Function1dc50e:
ld d, h ld d, h
ret ret
Function1dc51a: PlaceMoveNameString:
and a and a
jr z, .no_move jr z, .no_move
@ -302,13 +302,13 @@ Function1dc51a:
jr .got_string jr .got_string
.no_move .no_move
ld de, String1dc584 ld de, PrintParty_NoMoveString
.got_string .got_string
call PlaceString call PlaceString
ret ret
Function1dc52c: PlaceGenderAndShininess:
farcall GetGender farcall GetGender
ld a, " " ld a, " "
jr c, .got_gender jr c, .got_gender
@ -326,16 +326,16 @@ Function1dc52c:
ld [hl], "⁂" ld [hl], "⁂"
ret ret
String1dc550: PrintParty_OTString:
db "OT/@" db "OT/@"
String1dc554: PrintParty_MoveString:
db "MOVE@" db "MOVE@"
String1dc559: PrintParty_IDNoString:
db "<ID>№.@" db "<ID>№.@"
String1dc55d: PrintParty_StatsString:
db "ATTACK" db "ATTACK"
next "DEFENSE" next "DEFENSE"
next "SPCL.ATK" next "SPCL.ATK"
@ -343,7 +343,7 @@ String1dc55d:
next "SPEED" next "SPEED"
db "@" db "@"
String1dc584: PrintParty_NoMoveString:
db "------------@" db "------------@"
GBPrinterHPIcon: GBPrinterHPIcon: