Identify some more labels, and make some more consistent

This commit is contained in:
Rangi 2020-11-01 12:36:38 -05:00
parent 4a323cf591
commit 6220200f0f
18 changed files with 121 additions and 116 deletions

View File

@ -114,20 +114,20 @@ _ExpPointsText::
text " EXP. Points!"
prompt
Text_GoMon::
_GoMonText::
text "Go! @"
text_end
Text_DoItMon::
_DoItMonText::
text "Do it! @"
text_end
Text_GoForItMon::
_GoForItMonText::
text "Go for it,"
line "@"
text_end
Text_YourFoesWeakGetmMon::
_YourFoesWeakGetmMonText::
text "Your foe's weak!"
line "Get'm, @"
text_end
@ -137,7 +137,7 @@ _BattleMonNicknameText::
text "!"
done
Text_BattleMonNickComma::
_BattleMonNickCommaText::
text_ram wBattleMonNick
text ",@"
text_end

View File

@ -7616,7 +7616,7 @@ SendOutMonText:
and a
jr z, .not_linked
ld hl, JumpText_GoMon ; If we're in a LinkBattle print just "Go <PlayerMon>"
ld hl, GoMonText ; If we're in a LinkBattle print just "Go <PlayerMon>"
ld a, [wBattleHasJustStarted] ; unless this (unidentified) variable is set
and a
@ -7627,7 +7627,7 @@ SendOutMonText:
ld hl, wEnemyMonHP
ld a, [hli]
or [hl]
ld hl, JumpText_GoMon
ld hl, GoMonText
jr z, .skip_to_textbox
; compute enemy helth remaining as a percentage
@ -7656,41 +7656,41 @@ SendOutMonText:
call Divide
ldh a, [hQuotient + 3]
ld hl, JumpText_GoMon
ld hl, GoMonText
cp 70
jr nc, .skip_to_textbox
ld hl, JumpText_DoItMon
ld hl, DoItMonText
cp 40
jr nc, .skip_to_textbox
ld hl, JumpText_GoForItMon
ld hl, GoForItMonText
cp 10
jr nc, .skip_to_textbox
ld hl, JumpText_YourFoesWeakGetmMon
ld hl, YourFoesWeakGetmMonText
.skip_to_textbox
jp BattleTextbox
JumpText_GoMon:
text_far Text_GoMon
GoMonText:
text_far _GoMonText
text_asm
jr Function_TextJump_BattleMonNick01
jr PrepareBattleMonNicknameText
JumpText_DoItMon:
text_far Text_DoItMon
DoItMonText:
text_far _DoItMonText
text_asm
jr Function_TextJump_BattleMonNick01
jr PrepareBattleMonNicknameText
JumpText_GoForItMon:
text_far Text_GoForItMon
GoForItMonText:
text_far _GoForItMonText
text_asm
jr Function_TextJump_BattleMonNick01
jr PrepareBattleMonNicknameText
JumpText_YourFoesWeakGetmMon:
text_far Text_YourFoesWeakGetmMon
YourFoesWeakGetmMonText:
text_far _YourFoesWeakGetmMonText
text_asm
Function_TextJump_BattleMonNick01:
PrepareBattleMonNicknameText:
ld hl, BattleMonNicknameText
ret
@ -7703,7 +7703,7 @@ WithdrawMonText:
jp BattleTextbox
.WithdrawMonText:
text_far Text_BattleMonNickComma
text_far _BattleMonNickCommaText
text_asm
; Print text to withdraw mon
; depending on HP the message is different

View File

@ -380,7 +380,8 @@ CopyTrainerName:
pop de
ret
Function39990: ; unreferenced
IncompleteCopyNameFunction: ; unreferenced
; Copy of CopyTrainerName but without "call CopyBytes"
ld de, wStringBuffer1
push de
ld bc, NAME_LENGTH

View File

@ -1531,7 +1531,7 @@ BattleTowerAction_UbersCheck:
ret
LoadOpponentTrainerAndPokemonWithOTSprite:
farcall Function_LoadOpponentTrainerAndPokemons
farcall LoadOpponentTrainerAndPokemon
ldh a, [rSVBK]
push af
ld a, BANK(wBT_OTTrainerClass)

View File

@ -1,4 +1,4 @@
Function_LoadOpponentTrainerAndPokemons:
LoadOpponentTrainerAndPokemon:
ldh a, [rSVBK]
push af
ld a, BANK(wBT_OTTrainer)
@ -68,7 +68,7 @@ endc
ld bc, NAME_LENGTH
call CopyBytes
call Function_LoadRandomBattleTowerMon
call LoadRandomBattleTowerMon
pop af
ld hl, BattleTowerTrainerData
@ -91,7 +91,7 @@ endc
ret
Function_LoadRandomBattleTowerMon:
LoadRandomBattleTowerMon:
ld c, BATTLETOWER_PARTY_LENGTH
.loop
push bc

View File

@ -42,10 +42,10 @@ _CheckForBattleTowerRules:
dw .TextPointers
.Functions:
dw Function_PartyCountEq3
dw Function_PartySpeciesAreUnique
dw Function_PartyItemsAreUnique
dw Function_HasPartyAnEgg
dw CheckBTRule_PartyCountEq3
dw CheckBTRule_PartySpeciesAreUnique
dw CheckBTRule_PartyItemsAreUnique
dw CheckBTRule_HasPartyAnEgg
.TextPointers:
dw ExcuseMeYoureNotReadyText
@ -203,19 +203,19 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs:
cp BATTLETOWER_PARTY_LENGTH
ret
Function_PartyCountEq3:
CheckBTRule_PartyCountEq3:
ld a, [wPartyCount]
cp BATTLETOWER_PARTY_LENGTH
ret z
scf
ret
Function_PartySpeciesAreUnique:
CheckBTRule_PartySpeciesAreUnique:
ld hl, wPartyMon1Species
call VerifyUniqueness
call CheckPartyValueIsUnique
ret
VerifyUniqueness:
CheckPartyValueIsUnique:
ld de, wPartyCount
ld a, [de]
inc de
@ -276,12 +276,12 @@ VerifyUniqueness:
pop bc
ret
Function_PartyItemsAreUnique:
CheckBTRule_PartyItemsAreUnique:
ld hl, wPartyMon1Item
call VerifyUniqueness
call CheckPartyValueIsUnique
ret
Function_HasPartyAnEgg:
CheckBTRule_HasPartyAnEgg:
ld hl, wPartyCount
ld a, [hli]
ld c, a

View File

@ -171,7 +171,7 @@ PlaceStartCancelBoxBorder:
UnownPuzzleJumptable:
jumptable .Jumptable, wJumptableIndex
.Jumptable:
.Jumptable: ; redundant one-entry jumptable
dw .Function
.Function:

View File

@ -150,11 +150,11 @@ _CrystalCGB_MobileLayout1:
ld a, [wd002]
bit 6, a
jr z, .asm_49464
call Function49480
call .Function49480
jr .done
.asm_49464
call Function49496
call .Function49496
.done
farcall ApplyAttrmap
farcall ApplyPals
@ -165,7 +165,7 @@ _CrystalCGB_MobileLayout1:
.TextPalette:
INCLUDE "gfx/mystery_gift/mobile_text.pal"
Function49480:
.Function49480:
hlcoord 0, 0, wAttrmap
lb bc, 4, SCREEN_WIDTH
ld a, $7
@ -177,7 +177,7 @@ Function49480:
ld [hl], a
ret
Function49496:
.Function49496:
hlcoord 0, 0, wAttrmap
lb bc, 2, SCREEN_WIDTH
ld a, $7

View File

@ -1,11 +1,10 @@
Function88248: ; unreferenced
BetaLoadPlayerTrainerClass: ; unreferenced
ld c, CAL
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .okay
ld c, KAREN
.okay
jr z, .got_class
ld c, KAREN ; not KRIS?
.got_class
ld a, c
ld [wTrainerClass], a
ret
@ -59,9 +58,9 @@ ShowPlayerNamingChoices:
ld hl, ChrisNameMenuHeader
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotGender
jr z, .got_header
ld hl, KrisNameMenuHeader
.GotGender:
.got_header
call LoadMenuHeader
call VerticalMenu
ld a, [wMenuCursorY]
@ -77,38 +76,30 @@ GetPlayerNameArray: ; unreferenced
ld de, MalePlayerNameArray
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .done
jr z, .got_array
ld de, FemalePlayerNameArray
.done
.got_array
call InitName
ret
GetPlayerIcon:
; Get the player icon corresponding to gender
; Male
ld de, ChrisSpriteGFX
ld b, BANK(ChrisSpriteGFX)
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .done
; Female
jr z, .got_gfx
ld de, KrisSpriteGFX
ld b, BANK(KrisSpriteGFX)
.done
.got_gfx
ret
GetCardPic:
ld hl, ChrisCardPic
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotClass
jr z, .got_pic
ld hl, KrisCardPic
.GotClass:
.got_pic
ld de, vTiles2 tile $00
ld bc, $23 tiles
ld a, BANK(ChrisCardPic) ; aka BANK(KrisCardPic)
@ -148,26 +139,29 @@ HOF_LoadTrainerFrontpic:
call WaitBGMap
xor a
ldh [hBGMapMode], a
ld e, 0
; Get class
ld e, CHRIS
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotClass
ld e, 1
.GotClass:
jr z, .got_class
ld e, KRIS
.got_class
ld a, e
ld [wTrainerClass], a
; Load pic
ld de, ChrisPic
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotPic
jr z, .got_pic
ld de, KrisPic
.GotPic:
.got_pic
ld hl, vTiles2
ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7
call Get2bpp
call WaitBGMap
ld a, $1
ldh [hBGMapMode], a
@ -180,9 +174,9 @@ DrawIntroPlayerPic:
ld e, CHRIS
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotClass
jr z, .got_class
ld e, KRIS
.GotClass:
.got_class
ld a, e
ld [wTrainerClass], a
@ -190,9 +184,9 @@ DrawIntroPlayerPic:
ld de, ChrisPic
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .GotPic
jr z, .got_pic
ld de, KrisPic
.GotPic:
.got_pic
ld hl, vTiles2
ld b, BANK(ChrisPic) ; aka BANK(KrisPic)
ld c, 7 * 7 ; dimensions

View File

@ -1249,7 +1249,7 @@ LinkTradeOTPartymonMenuLoop:
.not_d_up
bit D_DOWN_F, a
jp z, LinkTradePartiesMenuMasterLoop
jp LinkTradeCheckCancel
jp LinkTradeOTPartymonMenuCheckCancel
LinkTrade_PlayerPartyMenu:
farcall InitMG_Mobile_LinkTradePalMap
@ -1323,7 +1323,7 @@ LinkTradePartymonMenuLoop:
ld [hl], " "
pop bc
pop hl
jp Function28ade
jp LinkTradePartymonMenuCheckCancel
LinkTradePartiesMenuMasterLoop:
ld a, [wMonType]
@ -1501,11 +1501,12 @@ LinkTrade_TradeStatsMenu:
text_far _LinkAbnormalMonText
text_end
LinkTradeCheckCancel:
LinkTradeOTPartymonMenuCheckCancel:
ld a, [wMenuCursorY]
cp 1
jp nz, LinkTradePartiesMenuMasterLoop
call HideCursor
push hl
push bc
ld bc, NAME_LENGTH
@ -1513,7 +1514,9 @@ LinkTradeCheckCancel:
ld [hl], " "
pop bc
pop hl
Function28ade:
; fallthrough
LinkTradePartymonMenuCheckCancel:
.loop1
ld a, "▶"
ldcoord_a 9, 17
@ -1548,6 +1551,8 @@ Function28ade:
ld a, [wOtherPlayerLinkMode]
cp $f
jr nz, .loop1
; fallthrough
ExitLinkCommunications:
call RotateThreePalettesRight
call ClearScreen

View File

@ -8,20 +8,23 @@ __LoadTradeScreenBorderGFX:
call Get2bpp
ret
Function16d42e:
ld hl, Tilemap_MobileTradeBorderFullscreen
LoadMobileTradeBorderTilemap:
ld hl, MobileTradeBorderTilemap
decoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyBytes
ret
Function16d43b: ; unreferenced
TestMobileTradeBorderTilemap: ; unreferenced
; Loads the mobile trade border graphics and tilemap,
; with a placeholder SCGB_DIPLOMA layout, and exits
; after pressing A or B. Possibly used for testing.
call LoadStandardMenuHeader
call ClearBGPalettes
call ClearTilemap
call ClearSprites
farcall __LoadTradeScreenBorderGFX ; useless to farcall
farcall Function16d42e ; useless to farcall
farcall LoadMobileTradeBorderTilemap ; useless to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
@ -30,13 +33,13 @@ Function16d43b: ; unreferenced
call Call_ExitMenu
ret
Tilemap_MobileTradeBorderFullscreen:
INCBIN "gfx/trade/border_mobile_fullscreen.tilemap"
MobileTradeBorderTilemap:
INCBIN "gfx/trade/border_mobile.tilemap"
Tilemap_CableTradeBorderTop:
CableTradeBorderTopTilemap:
INCBIN "gfx/trade/border_cable_top.tilemap"
Tilemap_CableTradeBorderBottom:
CableTradeBorderBottomTilemap:
INCBIN "gfx/trade/border_cable_bottom.tilemap"
_LinkTextbox:
@ -111,7 +114,7 @@ _LinkTextbox:
InitTradeSpeciesList:
call _LoadTradeScreenBorderGFX
call Function16d6ae
call LoadCableTradeBorderTilemap
farcall InitMG_Mobile_LinkTradePalMap
farcall PlaceTradePartnerNamesAndParty
hlcoord 10, 17
@ -137,13 +140,13 @@ LoadTradeRoomBGPals:
farcall _LoadTradeRoomBGPals
ret
Function16d6ae:
call Function16d42e
ld hl, Tilemap_CableTradeBorderTop
LoadCableTradeBorderTilemap:
call LoadMobileTradeBorderTilemap
ld hl, CableTradeBorderTopTilemap
decoord 0, 0
ld bc, 2 * SCREEN_WIDTH
call CopyBytes
ld hl, Tilemap_CableTradeBorderBottom
ld hl, CableTradeBorderBottomTilemap
decoord 0, 16
ld bc, 2 * SCREEN_WIDTH
call CopyBytes

View File

@ -1049,7 +1049,8 @@ RunTitleScreen:
scf
ret
Function6292: ; unreferenced
UnusedTitlePerspectiveScroll: ; unreferenced
; Similar behavior to Intro_PerspectiveScrollBG.
ldh a, [hVBlankCounter]
and $7
ret nz

View File

@ -391,24 +391,19 @@ EraseHallOfFame:
jp CloseSRAM
Function14d18: ; unreferenced
ld a, BANK(s4_a007)
ld a, BANK(s4_a007) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call OpenSRAM
ld hl, .Data
ld de, s4_a007
ld bc, .DataEnd - .Data
ld bc, 4 * 12
call CopyBytes
jp CloseSRAM
.Data:
db $0d, $02, $00, $05, $00, $00
db $22, $02, $01, $05, $00, $00
db $03, $04, $05, $08, $03, $05
db $0e, $06, $03, $02, $00, $00
db $39, $07, $07, $04, $00, $05
db $04, $07, $01, $05, $00, $00
db $0f, $05, $14, $07, $05, $05
db $11, $0c, $0c, $06, $06, $04
.DataEnd
db $0d, $02, $00, $05, $00, $00, $22, $02, $01, $05, $00, $00
db $03, $04, $05, $08, $03, $05, $0e, $06, $03, $02, $00, $00
db $39, $07, $07, $04, $00, $05, $04, $07, $01, $05, $00, $00
db $0f, $05, $14, $07, $05, $05, $11, $0c, $0c, $06, $06, $04
EraseBattleTowerStatus:
ld a, BANK(sBattleTowerChallengeState)

View File

@ -154,13 +154,15 @@ UnusedTitleFG_OAM:
dbsprite 13, 11, 0, 0, $4c, 1
dbsprite 14, 11, 0, 0, $4e, 1
Function10ed51: ; unreferenced
TestCrystalTitleScreen: ; unreferenced
; Runs the title screen until A is pressed.
; Possibly used for testing.
call _TitleScreen
.loop
call JoyTextDelay
ldh a, [hJoyLast]
ld b, a
and 1
and A_BUTTON
jr nz, .done
call SuicuneFrameIterator
call DelayFrame

View File

@ -323,7 +323,11 @@ ListMovePP:
jr nz, .load_loop
ret
Function50cd0: ; unreferenced
BrokenPlacePPUnits: ; unreferenced
; Probably would have these parameters:
; hl = starting coordinate
; de = SCREEN_WIDTH or SCREEN_WIDTH * 2
; c = the number of moves (1-4)
.loop
ld [hl], $32 ; typo for P?
inc hl

View File

@ -339,7 +339,7 @@ Function11c1b9:
Function11c254:
push af
ld a, $4
ld a, BANK(s4_a007)
call OpenSRAM
ld hl, s4_a007
pop af
@ -349,7 +349,7 @@ Function11c254:
sla a
add c
ld c, a
ld b, $0
ld b, 0
add hl, bc
ld de, wcd36
ld bc, 12
@ -1762,7 +1762,7 @@ Function11cb66:
ld a, [hl]
and a
jr nz, .asm_11cbd4
ld a, $4
ld a, BANK(s4_a007)
call OpenSRAM
ld hl, s4_a007
ld a, [wMenuCursorY]
@ -1773,10 +1773,10 @@ Function11cb66:
sla a
add c
ld c, a
ld b, $0
ld b, 0
add hl, bc
ld de, wcd36
ld c, $c
ld c, 12
.asm_11cba2
ld a, [de]
ld [hli], a

View File

@ -6496,7 +6496,7 @@ Function102e3e:
db "CANCEL@"
Function102e4f:
farcall Function16d42e
farcall LoadMobileTradeBorderTilemap
farcall _InitMG_Mobile_LinkTradePalMap
ld de, wPlayerName
hlcoord 4, 0