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

View File

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

View File

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

View File

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

View File

@ -1267,7 +1267,7 @@ ResetClock:
farcall _ResetClock
jp Init
Function639b: ; unreferenced
UpdateTitleTrailSprite: ; unreferenced
; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
ld a, [wTitleScreenTimer]
and %00000011
@ -1279,9 +1279,9 @@ Function639b: ; unreferenced
ld h, 0
add hl, hl
add hl, hl
ld de, .Data_63ca
ld de, .TitleTrailCoords
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]
and %00000100
srl a
@ -1299,14 +1299,25 @@ Function639b: ; unreferenced
call InitSpriteAnimStruct
ret
.Data_63ca:
; frame 0 y, x; frame 1 y, x
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 15 * 8
db 11 * 8 + 4, 17 * 8, 11 * 8 + 4, 15 * 8
db 0 * 8, 0 * 8, 11 * 8 + 4, 15 * 8
db 0 * 8, 0 * 8, 11 * 8 + 4, 11 * 8
.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
trail_coords 11, 10, 0, 0
trail_coords 11, 13, 11, 11
trail_coords 11, 13, 11, 15
trail_coords 11, 17, 11, 15
trail_coords 0, 0, 11, 15
trail_coords 0, 0, 11, 11
Copyright:
call ClearTilemap

View File

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

View File

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

View File

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

View File

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