summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-02-22 12:00:53 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2021-02-22 12:02:52 -0500
commit4401d24074913b227ed246da02343cd875ee9fc0 (patch)
treeadfc2168bd2006b293984f68ecd1afaff2c95b42 /engine
parent3c3d87e765ffa17926b6a94bc061bb2dafc859e2 (diff)
Identify link sync buffers, separate from link action bytes
Fixes #803
Diffstat (limited to 'engine')
-rw-r--r--engine/link/link.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/link/link.asm b/engine/link/link.asm
index 1d8294747..de6ed239a 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -2554,20 +2554,20 @@ Link_ResetSerialRegistersAfterLinkClosure:
Link_EnsureSync:
add $d0
- ld [wPlayerLinkAction], a
- ld [wUnusedLinkAction], a
+ ld [wLinkPlayerSyncBuffer], a
+ ld [wLinkPlayerSyncBuffer + 1], a
ld a, $2
ldh [hVBlank], a
call DelayFrame
call DelayFrame
.receive_loop
- call Serial_ExchangeLinkMenuSelection
- ld a, [wOtherPlayerLinkMode]
+ call Serial_ExchangeSyncBytes
+ ld a, [wLinkReceivedSyncBuffer]
ld b, a
and $f0
cp $d0
jr z, .done
- ld a, [wOtherPlayerLinkAction]
+ ld a, [wLinkReceivedSyncBuffer + 1]
ld b, a
and $f0
cp $d0