Skip to content

Commit

Permalink
Identify some more labels (a few link-related)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 22, 2020
1 parent 3a2932c commit ae4fe08
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
4 changes: 2 additions & 2 deletions data/text/battle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ SentAllToMomText:
text "Sent all to MOM!"
prompt

BattleText_0x80a4f:
UnusedRivalLossText: ; unreferenced
text "<RIVAL>: Huh? I"
line "should've chosen"
cont "your #MON!"
Expand All @@ -215,7 +215,7 @@ BattleText_UseNextMon:
text "Use next #MON?"
done

BattleText_0x80a93:
UnusedRivalWinText: ; unreferenced
text "<RIVAL>: Yes!"
line "I guess I chose a"
cont "good #MON!"
Expand Down
14 changes: 7 additions & 7 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8470,7 +8470,7 @@ ReadAndPrintLinkBattleRecord:
call .PrintBattleRecord
hlcoord 0, 8
ld b, NUM_LINK_BATTLE_RECORDS
ld de, sLinkBattleRecord + 2
ld de, sLinkBattleRecord1Name
.loop
push bc
push hl
Expand All @@ -8485,35 +8485,35 @@ ReadAndPrintLinkBattleRecord:
push hl
ld h, d
ld l, e
ld de, wd002
ld de, wLinkBattleRecordName
ld bc, NAME_LENGTH - 1
call CopyBytes
ld a, "@"
ld [de], a
inc de
inc de ; wLinkBattleRecordWins
ld bc, 6
call CopyBytes
ld de, wd002
ld de, wLinkBattleRecordName
pop hl
call PlaceString
pop hl
ld de, 26
add hl, de
push hl
ld de, wd00d
ld de, wLinkBattleRecordWins
lb bc, 2, 4
call PrintNum
pop hl
ld de, 5
add hl, de
push hl
ld de, wd00f
ld de, wLinkBattleRecordLosses
lb bc, 2, 4
call PrintNum
pop hl
ld de, 5
add hl, de
ld de, wd011
ld de, wLinkBattleRecordDraws
lb bc, 2, 4
call PrintNum
jr .next
Expand Down
10 changes: 5 additions & 5 deletions engine/link/link.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ SetBitsForBattleRequest:
ret

SetBitsForTimeCapsuleRequest:
ld a, $2
ld a, USING_INTERNAL_CLOCK
ldh [rSB], a
xor a
ldh [hSerialReceive], a
Expand All @@ -2176,7 +2176,7 @@ WaitForLinkedFriend:
ld a, [wPlayerLinkAction]
and a
jr z, .no_link_action
ld a, $2
ld a, USING_INTERNAL_CLOCK
ldh [rSB], a
xor a
ldh [hSerialReceive], a
Expand All @@ -2201,7 +2201,7 @@ WaitForLinkedFriend:
jr z, .connected
ld a, CONNECTION_NOT_ESTABLISHED
ldh [hSerialConnectionStatus], a
ld a, $2
ld a, USING_INTERNAL_CLOCK
ldh [rSB], a
xor a
ldh [hSerialReceive], a
Expand All @@ -2219,7 +2219,7 @@ WaitForLinkedFriend:
jr z, .done

.not_done
ld a, $1
ld a, USING_EXTERNAL_CLOCK
ldh [rSB], a
ld a, (0 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
Expand Down Expand Up @@ -2464,7 +2464,7 @@ Link_ResetSerialRegistersAfterLinkClosure:
call DelayFrames
ld a, CONNECTION_NOT_ESTABLISHED
ldh [hSerialConnectionStatus], a
ld a, $2
ld a, USING_INTERNAL_CLOCK
ldh [rSB], a
xor a
ldh [hSerialReceive], a
Expand Down
3 changes: 2 additions & 1 deletion home/serial.asm
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ LinkDataReceived::
ldh [rSC], a
ret

Function919:: ; unreferenced
SetBitsForTimeCapsuleRequestIfNotLinked:: ; unreferenced
; Similar to SetBitsForTimeCapsuleRequest (see engine/link/link.asm).
ld a, [wLinkMode]
and a
ret nz
Expand Down
2 changes: 1 addition & 1 deletion macros/wram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ hall_of_fame: MACRO
ENDM

link_battle_record: MACRO
\1Name:: ds NAME_LENGTH - 1
\1ID:: dw
\1Name:: ds NAME_LENGTH - 1
\1Wins:: dw
\1Losses:: dw
\1Draws:: dw
Expand Down
26 changes: 17 additions & 9 deletions wram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,13 @@ ENDU

NEXTU
; mystery gift data
wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
wMysteryGiftStaging::
UNION
wMysteryGiftPartyTemp:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH

NEXTU
wMysteryGiftStaging:: ds 80

NEXTU
wc800:: ds 1
wc801:: ds 1
wc802:: ds 1
Expand All @@ -1076,6 +1081,7 @@ wMobileSDK_SendCommandID:: db
wc820:: ds 1
wc821:: ds 1
wc822:: ds 46
ENDU

UNION
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
Expand Down Expand Up @@ -1829,6 +1835,13 @@ wSuicuneFrame::
wStartFlypoint:: db
wEndFlypoint:: db

NEXTU
; link battle record data
wLinkBattleRecordName:: ds NAME_LENGTH
wLinkBattleRecordWins:: dw
wLinkBattleRecordLosses:: dw
wLinkBattleRecordDraws:: dw

NEXTU
; unidentified
wd002:: db
Expand All @@ -1837,13 +1850,9 @@ wd004:: db

; mobile?
ds 1
wd006:: ds 2
wd008:: ds 2
ds 2
wd00c:: ds 1
wd00d:: ds 1
ds 1
wd00f:: ds 1
wd008:: ds 2
ds 6
wd010:: ds 1
wd011:: ds 1
wd012:: ds 1
Expand Down Expand Up @@ -2331,7 +2340,6 @@ wPutativeTMHMMove:: db
wInitListType:: db
wBattleHasJustStarted:: db

; wd265 has many different short-term uses
wNamedObjectIndexBuffer::
wDeciramBuffer::
wTempByteValue::
Expand Down

0 comments on commit ae4fe08

Please sign in to comment.