mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
through sub_800B1A0
This commit is contained in:
parent
85cf626316
commit
f21c5ebea5
@ -5264,7 +5264,7 @@ _08164D14:
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08164DB0
|
beq _08164DB0
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _08164DB0
|
bne _08164DB0
|
||||||
@ -5302,7 +5302,7 @@ _08164DB6:
|
|||||||
thumb_func_start sub_8164DCC
|
thumb_func_start sub_8164DCC
|
||||||
sub_8164DCC: @ 8164DCC
|
sub_8164DCC: @ 8164DCC
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08164DDA
|
beq _08164DDA
|
||||||
|
@ -516,7 +516,7 @@ _0807FBBE:
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807FC14
|
beq _0807FC14
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807FC14
|
beq _0807FC14
|
||||||
@ -1122,7 +1122,7 @@ _08080126:
|
|||||||
bne _0808016A
|
bne _0808016A
|
||||||
b _080804F8
|
b _080804F8
|
||||||
_0808016A:
|
_0808016A:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _08080174
|
bne _08080174
|
||||||
@ -3334,7 +3334,7 @@ sub_80814B0: @ 80814B0
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080814E4
|
beq _080814E4
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080814E4
|
beq _080814E4
|
||||||
@ -4706,7 +4706,7 @@ sub_8081F94: @ 8081F94
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08081FB8
|
beq _08081FB8
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08081FB8
|
beq _08081FB8
|
||||||
@ -4852,7 +4852,7 @@ _080820EC:
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0808218C
|
beq _0808218C
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0808218C
|
beq _0808218C
|
||||||
@ -4968,7 +4968,7 @@ _080821D4:
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08082254
|
beq _08082254
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08082254
|
beq _08082254
|
||||||
@ -6250,7 +6250,7 @@ sub_8082D28: @ 8082D28
|
|||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r1, r0, 24
|
lsrs r1, r0, 24
|
||||||
_08082D3C:
|
_08082D3C:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08082DCC
|
beq _08082DCC
|
||||||
|
@ -2172,7 +2172,7 @@ sub_80B360C: @ 80B360C
|
|||||||
movs r5, 0x1
|
movs r5, 0x1
|
||||||
eors r0, r5
|
eors r0, r5
|
||||||
bl sub_813C2A0
|
bl sub_813C2A0
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080B36B2
|
beq _080B36B2
|
||||||
@ -2512,7 +2512,7 @@ _080B391C:
|
|||||||
thumb_func_start sub_80B3924
|
thumb_func_start sub_80B3924
|
||||||
sub_80B3924: @ 80B3924
|
sub_80B3924: @ 80B3924
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080B3940
|
beq _080B3940
|
||||||
@ -2552,7 +2552,7 @@ sub_80B3968: @ 80B3968
|
|||||||
ldr r2, =0x00002211
|
ldr r2, =0x00002211
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
strh r0, [r1]
|
strh r0, [r1]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080B3994
|
beq _080B3994
|
||||||
@ -2661,7 +2661,7 @@ _080B3A62:
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080B3AA6
|
beq _080B3AA6
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080B3AA0
|
bne _080B3AA0
|
||||||
@ -2752,7 +2752,7 @@ _080B3B20:
|
|||||||
beq _080B3B9E
|
beq _080B3B9E
|
||||||
b _080B3BB8
|
b _080B3BB8
|
||||||
_080B3B2A:
|
_080B3B2A:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080B3B40
|
beq _080B3B40
|
||||||
@ -2825,7 +2825,7 @@ _080B3BB8:
|
|||||||
thumb_func_start sub_80B3BC4
|
thumb_func_start sub_80B3BC4
|
||||||
sub_80B3BC4: @ 80B3BC4
|
sub_80B3BC4: @ 80B3BC4
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080B3BD6
|
bne _080B3BD6
|
||||||
|
@ -147,7 +147,7 @@ sub_80FC5DC: @ 80FC5DC
|
|||||||
ldr r1, =gUnknown_02039F2A
|
ldr r1, =gUnknown_02039F2A
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0x1
|
cmp r0, 0x1
|
||||||
bne _080FC60C
|
bne _080FC60C
|
||||||
|
203
asm/link.s
203
asm/link.s
@ -5,197 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_800B138
|
|
||||||
sub_800B138: @ 800B138
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0xC
|
|
||||||
ldr r1, =g2BlankTilesGfx
|
|
||||||
movs r0, 0
|
|
||||||
movs r2, 0x20
|
|
||||||
movs r3, 0
|
|
||||||
bl LoadBgTiles
|
|
||||||
movs r0, 0x1
|
|
||||||
movs r1, 0
|
|
||||||
bl FillWindowPixelBuffer
|
|
||||||
movs r0, 0x2
|
|
||||||
movs r1, 0
|
|
||||||
bl FillWindowPixelBuffer
|
|
||||||
ldr r0, =gUnknown_082ED224
|
|
||||||
str r0, [sp]
|
|
||||||
movs r0, 0
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
ldr r0, =gText_CommErrorCheckConnections
|
|
||||||
str r0, [sp, 0x8]
|
|
||||||
movs r0, 0x1
|
|
||||||
movs r1, 0x3
|
|
||||||
movs r2, 0x2
|
|
||||||
movs r3, 0
|
|
||||||
bl box_print
|
|
||||||
movs r0, 0x1
|
|
||||||
bl PutWindowTilemap
|
|
||||||
movs r0, 0x2
|
|
||||||
bl PutWindowTilemap
|
|
||||||
movs r0, 0x1
|
|
||||||
movs r1, 0
|
|
||||||
bl CopyWindowToVram
|
|
||||||
movs r0, 0x2
|
|
||||||
movs r1, 0x3
|
|
||||||
bl CopyWindowToVram
|
|
||||||
add sp, 0xC
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_800B138
|
|
||||||
|
|
||||||
thumb_func_start sub_800B1A0
|
|
||||||
sub_800B1A0: @ 800B1A0
|
|
||||||
push {r4,lr}
|
|
||||||
sub sp, 0xC
|
|
||||||
ldr r0, =gMain
|
|
||||||
movs r1, 0x87
|
|
||||||
lsls r1, 3
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0x1E
|
|
||||||
beq _0800B20C
|
|
||||||
cmp r0, 0x1E
|
|
||||||
bgt _0800B1C4
|
|
||||||
cmp r0, 0
|
|
||||||
beq _0800B1D8
|
|
||||||
cmp r0, 0x2
|
|
||||||
beq _0800B1F2
|
|
||||||
b _0800B260
|
|
||||||
.pool
|
|
||||||
_0800B1C4:
|
|
||||||
cmp r0, 0x5A
|
|
||||||
beq _0800B20C
|
|
||||||
cmp r0, 0x5A
|
|
||||||
bgt _0800B1D2
|
|
||||||
cmp r0, 0x3C
|
|
||||||
beq _0800B20C
|
|
||||||
b _0800B260
|
|
||||||
_0800B1D2:
|
|
||||||
cmp r0, 0x82
|
|
||||||
beq _0800B214
|
|
||||||
b _0800B260
|
|
||||||
_0800B1D8:
|
|
||||||
ldr r0, =sLinkErrorBuffer
|
|
||||||
ldrb r0, [r0, 0x6]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _0800B1EC
|
|
||||||
bl sub_800B080
|
|
||||||
b _0800B260
|
|
||||||
.pool
|
|
||||||
_0800B1EC:
|
|
||||||
bl sub_800B138
|
|
||||||
b _0800B260
|
|
||||||
_0800B1F2:
|
|
||||||
movs r0, 0
|
|
||||||
bl ShowBg
|
|
||||||
ldr r0, =sLinkErrorBuffer
|
|
||||||
ldrb r0, [r0, 0x6]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _0800B260
|
|
||||||
movs r0, 0x1
|
|
||||||
bl ShowBg
|
|
||||||
b _0800B260
|
|
||||||
.pool
|
|
||||||
_0800B20C:
|
|
||||||
movs r0, 0x16
|
|
||||||
bl PlaySE
|
|
||||||
b _0800B260
|
|
||||||
_0800B214:
|
|
||||||
ldr r0, =gSerialIsRFU
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0x2
|
|
||||||
bne _0800B244
|
|
||||||
ldr r0, =gUnknown_082ED224
|
|
||||||
str r0, [sp]
|
|
||||||
movs r0, 0
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
ldr r0, =gText_ABtnTitleScreen
|
|
||||||
str r0, [sp, 0x8]
|
|
||||||
movs r0, 0
|
|
||||||
movs r1, 0x3
|
|
||||||
movs r2, 0x2
|
|
||||||
movs r3, 0x14
|
|
||||||
bl box_print
|
|
||||||
b _0800B260
|
|
||||||
.pool
|
|
||||||
_0800B244:
|
|
||||||
cmp r0, 0x1
|
|
||||||
bne _0800B260
|
|
||||||
ldr r0, =gUnknown_082ED224
|
|
||||||
str r0, [sp]
|
|
||||||
movs r0, 0
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
ldr r0, =gText_ABtnRegistrationCounter
|
|
||||||
str r0, [sp, 0x8]
|
|
||||||
movs r0, 0
|
|
||||||
movs r1, 0x3
|
|
||||||
movs r2, 0x2
|
|
||||||
movs r3, 0x14
|
|
||||||
bl box_print
|
|
||||||
_0800B260:
|
|
||||||
ldr r0, =gMain
|
|
||||||
movs r2, 0x87
|
|
||||||
lsls r2, 3
|
|
||||||
adds r1, r0, r2
|
|
||||||
ldrb r1, [r1]
|
|
||||||
cmp r1, 0xA0
|
|
||||||
bne _0800B2D0
|
|
||||||
ldr r4, =gSerialIsRFU
|
|
||||||
ldrb r2, [r4]
|
|
||||||
cmp r2, 0x1
|
|
||||||
bne _0800B2A8
|
|
||||||
ldrh r0, [r0, 0x2E]
|
|
||||||
ands r2, r0
|
|
||||||
cmp r2, 0
|
|
||||||
beq _0800B2C2
|
|
||||||
movs r0, 0x15
|
|
||||||
bl PlaySE
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r4]
|
|
||||||
ldr r1, =sLinkErrorBuffer
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1, 0x6]
|
|
||||||
bl sub_81700F8
|
|
||||||
b _0800B2C2
|
|
||||||
.pool
|
|
||||||
_0800B2A8:
|
|
||||||
cmp r2, 0x2
|
|
||||||
bne _0800B2C2
|
|
||||||
ldrh r1, [r0, 0x2E]
|
|
||||||
movs r0, 0x1
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, 0
|
|
||||||
beq _0800B2C2
|
|
||||||
bl rfu_REQ_stopMode
|
|
||||||
bl rfu_waitREQComplete
|
|
||||||
bl DoSoftReset
|
|
||||||
_0800B2C2:
|
|
||||||
ldr r0, =gMain
|
|
||||||
movs r2, 0x87
|
|
||||||
lsls r2, 3
|
|
||||||
adds r1, r0, r2
|
|
||||||
ldrb r1, [r1]
|
|
||||||
cmp r1, 0xA0
|
|
||||||
beq _0800B2DC
|
|
||||||
_0800B2D0:
|
|
||||||
movs r2, 0x87
|
|
||||||
lsls r2, 3
|
|
||||||
adds r1, r0, r2
|
|
||||||
ldrb r0, [r1]
|
|
||||||
adds r0, 0x1
|
|
||||||
strb r0, [r1]
|
|
||||||
_0800B2DC:
|
|
||||||
add sp, 0xC
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_800B1A0
|
|
||||||
|
|
||||||
thumb_func_start sub_800B2E8
|
thumb_func_start sub_800B2E8
|
||||||
sub_800B2E8: @ 800B2E8
|
sub_800B2E8: @ 800B2E8
|
||||||
ldr r0, =0x04000128
|
ldr r0, =0x04000128
|
||||||
@ -346,7 +155,7 @@ _0800B3F4:
|
|||||||
thumb_func_start HandleLinkConnection
|
thumb_func_start HandleLinkConnection
|
||||||
HandleLinkConnection: @ 800B40C
|
HandleLinkConnection: @ 800B40C
|
||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0800B45C
|
bne _0800B45C
|
||||||
@ -401,7 +210,7 @@ sub_800B488: @ 800B488
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0800B498
|
bne _0800B498
|
||||||
ldr r1, =gSerialIsRFU
|
ldr r1, =gWirelessCommType
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
_0800B498:
|
_0800B498:
|
||||||
@ -417,7 +226,7 @@ sub_800B4A4: @ 800B4A4
|
|||||||
ldrb r1, [r0]
|
ldrb r1, [r0]
|
||||||
cmp r1, 0
|
cmp r1, 0
|
||||||
bne _0800B4B2
|
bne _0800B4B2
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
strb r1, [r0]
|
strb r1, [r0]
|
||||||
_0800B4B2:
|
_0800B4B2:
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -432,7 +241,7 @@ sub_800B4C0: @ 800B4C0
|
|||||||
ldrb r1, [r0]
|
ldrb r1, [r0]
|
||||||
cmp r1, 0
|
cmp r1, 0
|
||||||
bne _0800B4CE
|
bne _0800B4CE
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
strb r1, [r0]
|
strb r1, [r0]
|
||||||
_0800B4CE:
|
_0800B4CE:
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -443,7 +252,7 @@ _0800B4CE:
|
|||||||
thumb_func_start sub_800B4DC
|
thumb_func_start sub_800B4DC
|
||||||
sub_800B4DC: @ 800B4DC
|
sub_800B4DC: @ 800B4DC
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0800B4FC
|
bne _0800B4FC
|
||||||
@ -477,7 +286,7 @@ _0800B514:
|
|||||||
|
|
||||||
thumb_func_start sub_800B518
|
thumb_func_start sub_800B518
|
||||||
sub_800B518: @ 800B518
|
sub_800B518: @ 800B518
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
bx lr
|
bx lr
|
||||||
.pool
|
.pool
|
||||||
|
@ -884,7 +884,7 @@ sub_800E3A8: @ 800E3A8
|
|||||||
mov r5, r8
|
mov r5, r8
|
||||||
push {r5-r7}
|
push {r5-r7}
|
||||||
sub sp, 0x20
|
sub sp, 0x20
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0800E3BE
|
bne _0800E3BE
|
||||||
@ -5967,7 +5967,7 @@ sub_8010DB4: @ 8010DB4
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08010DE4
|
beq _08010DE4
|
||||||
_08010DDE:
|
_08010DDE:
|
||||||
ldr r1, =gSerialIsRFU
|
ldr r1, =gWirelessCommType
|
||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
_08010DE4:
|
_08010DE4:
|
||||||
|
@ -621,7 +621,7 @@ _080E726C:
|
|||||||
bne _080E730A
|
bne _080E730A
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strh r0, [r5]
|
strh r0, [r5]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080E7296
|
bne _080E7296
|
||||||
@ -664,7 +664,7 @@ _080E72C0:
|
|||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
bl Free
|
bl Free
|
||||||
bl sub_808729C
|
bl sub_808729C
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080E72F8
|
beq _080E72F8
|
||||||
@ -2393,7 +2393,7 @@ _080E80C0:
|
|||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080E810A
|
bne _080E810A
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080E80E8
|
beq _080E80E8
|
||||||
|
18
asm/rom4.s
18
asm/rom4.s
@ -3395,7 +3395,7 @@ c2_8056854: @ 8086140
|
|||||||
ldr r0, =c1_link_related
|
ldr r0, =c1_link_related
|
||||||
bl set_callback1
|
bl set_callback1
|
||||||
bl sub_8086C2C
|
bl sub_8086C2C
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086174
|
beq _08086174
|
||||||
@ -3586,7 +3586,7 @@ sub_808631C: @ 808631C
|
|||||||
bne _0808632E
|
bne _0808632E
|
||||||
bl CloseLink
|
bl CloseLink
|
||||||
_0808632E:
|
_0808632E:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086348
|
beq _08086348
|
||||||
@ -3768,7 +3768,7 @@ _080864DA:
|
|||||||
bl cur_mapheader_run_tileset_funcs_after_some_cpuset
|
bl cur_mapheader_run_tileset_funcs_after_some_cpuset
|
||||||
b _08086506
|
b _08086506
|
||||||
_080864E0:
|
_080864E0:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086506
|
beq _08086506
|
||||||
@ -4056,7 +4056,7 @@ _08086766:
|
|||||||
bl cur_mapheader_run_tileset_funcs_after_some_cpuset
|
bl cur_mapheader_run_tileset_funcs_after_some_cpuset
|
||||||
b _08086792
|
b _08086792
|
||||||
_0808676C:
|
_0808676C:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086792
|
beq _08086792
|
||||||
@ -4565,7 +4565,7 @@ _08086BCA:
|
|||||||
thumb_func_start c1_link_related
|
thumb_func_start c1_link_related
|
||||||
c1_link_related: @ 8086BD8
|
c1_link_related: @ 8086BD8
|
||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086BF2
|
beq _08086BF2
|
||||||
@ -4631,7 +4631,7 @@ c1_link_related_func_set: @ 8086C50
|
|||||||
thumb_func_start sub_8086C64
|
thumb_func_start sub_8086C64
|
||||||
sub_8086C64: @ 8086C64
|
sub_8086C64: @ 8086C64
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086C82
|
beq _08086C82
|
||||||
@ -5029,7 +5029,7 @@ _08086FC0:
|
|||||||
movs r0, 0x11
|
movs r0, 0x11
|
||||||
strh r0, [r1]
|
strh r0, [r1]
|
||||||
_08086FC6:
|
_08086FC6:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08086FFC
|
beq _08086FFC
|
||||||
@ -5926,7 +5926,7 @@ _08087666:
|
|||||||
thumb_func_start sub_808766C
|
thumb_func_start sub_808766C
|
||||||
sub_808766C: @ 808766C
|
sub_808766C: @ 808766C
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _08087688
|
bne _08087688
|
||||||
@ -5946,7 +5946,7 @@ _0808768A:
|
|||||||
thumb_func_start sub_8087690
|
thumb_func_start sub_8087690
|
||||||
sub_8087690: @ 8087690
|
sub_8087690: @ 8087690
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080876B0
|
bne _080876B0
|
||||||
|
@ -11823,7 +11823,7 @@ _0813B790:
|
|||||||
b _0813B7C6
|
b _0813B7C6
|
||||||
.pool
|
.pool
|
||||||
_0813B7A8:
|
_0813B7A8:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0813B7B4
|
bne _0813B7B4
|
||||||
|
@ -27729,7 +27729,7 @@ sub_8020C70: @ 8020C70
|
|||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08020C8E
|
beq _08020C8E
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _08020CAC
|
bne _08020CAC
|
||||||
|
@ -1712,7 +1712,7 @@ _080A05AC:
|
|||||||
movs r2, 0x10
|
movs r2, 0x10
|
||||||
movs r3, 0
|
movs r3, 0
|
||||||
bl BeginNormalPaletteFade
|
bl BeginNormalPaletteFade
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080A0620
|
beq _080A0620
|
||||||
|
28
asm/trade.s
28
asm/trade.s
@ -135,7 +135,7 @@ _08077258:
|
|||||||
thumb_func_start sub_8077260
|
thumb_func_start sub_8077260
|
||||||
sub_8077260: @ 8077260
|
sub_8077260: @ 8077260
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08077280
|
beq _08077280
|
||||||
@ -409,7 +409,7 @@ _080774B2:
|
|||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
adds r0, 0xA8
|
adds r0, 0xA8
|
||||||
strb r2, [r0]
|
strb r2, [r0]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08077528
|
beq _08077528
|
||||||
@ -531,7 +531,7 @@ _08077600:
|
|||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
adds r0, 0xA8
|
adds r0, 0xA8
|
||||||
strb r2, [r0]
|
strb r2, [r0]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0807762A
|
bne _0807762A
|
||||||
@ -543,7 +543,7 @@ _0807762A:
|
|||||||
b _08077B46
|
b _08077B46
|
||||||
.pool
|
.pool
|
||||||
_08077648:
|
_08077648:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08077680
|
beq _08077680
|
||||||
@ -1182,7 +1182,7 @@ _08077C28:
|
|||||||
b _080780D8
|
b _080780D8
|
||||||
.pool
|
.pool
|
||||||
_08077C3C:
|
_08077C3C:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08077C50
|
beq _08077C50
|
||||||
@ -1780,7 +1780,7 @@ sub_807816C: @ 807816C
|
|||||||
adds r0, 0x7E
|
adds r0, 0x7E
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
strb r0, [r1, 0x1]
|
strb r0, [r1, 0x1]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080781B4
|
beq _080781B4
|
||||||
@ -1809,7 +1809,7 @@ sub_80781C8: @ 80781C8
|
|||||||
ldr r5, =gMain
|
ldr r5, =gMain
|
||||||
ldr r0, =sub_80773AC
|
ldr r0, =sub_80773AC
|
||||||
str r0, [r5, 0x8]
|
str r0, [r5, 0x8]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08078220
|
beq _08078220
|
||||||
@ -4004,7 +4004,7 @@ sub_8079490: @ 8079490
|
|||||||
ands r0, r1
|
ands r0, r1
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _080794C4
|
bne _080794C4
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080794B4
|
beq _080794B4
|
||||||
@ -4029,7 +4029,7 @@ _080794C4:
|
|||||||
thumb_func_start sub_80794CC
|
thumb_func_start sub_80794CC
|
||||||
sub_80794CC: @ 80794CC
|
sub_80794CC: @ 80794CC
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _08079518
|
beq _08079518
|
||||||
@ -7507,7 +7507,7 @@ _0807B0F0:
|
|||||||
ands r0, r1
|
ands r0, r1
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0807B116
|
bne _0807B116
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807B110
|
beq _0807B110
|
||||||
@ -13831,7 +13831,7 @@ _0807EDC0:
|
|||||||
movs r0, 0x15
|
movs r0, 0x15
|
||||||
bl IncrementGameStat
|
bl IncrementGameStat
|
||||||
_0807EDCE:
|
_0807EDCE:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807EDF6
|
beq _0807EDF6
|
||||||
@ -14044,7 +14044,7 @@ _0807EFA4:
|
|||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
cmp r0, 0x1
|
cmp r0, 0x1
|
||||||
bne _0807F03A
|
bne _0807F03A
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807EFD8
|
beq _0807EFD8
|
||||||
@ -14071,7 +14071,7 @@ _0807EFE4:
|
|||||||
b _0807F03A
|
b _0807F03A
|
||||||
.pool
|
.pool
|
||||||
_0807EFF0:
|
_0807EFF0:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807F028
|
beq _0807F028
|
||||||
@ -14141,7 +14141,7 @@ c2_080543C4: @ 807F068
|
|||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
bl Free
|
bl Free
|
||||||
str r5, [r4]
|
str r5, [r4]
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _0807F0B6
|
beq _0807F0B6
|
||||||
|
@ -187,7 +187,7 @@ _080C2830:
|
|||||||
bl sub_80C4630
|
bl sub_80C4630
|
||||||
b _080C28D4
|
b _080C28D4
|
||||||
_080C2836:
|
_080C2836:
|
||||||
ldr r0, =gSerialIsRFU
|
ldr r0, =gWirelessCommType
|
||||||
ldrb r0, [r0]
|
ldrb r0, [r0]
|
||||||
cmp r0, 0x1
|
cmp r0, 0x1
|
||||||
bne _080C2852
|
bne _080C2852
|
||||||
|
@ -16,7 +16,7 @@ gUnknown_030030EC
|
|||||||
gUnknown_030030F0
|
gUnknown_030030F0
|
||||||
gUnknown_030030F4
|
gUnknown_030030F4
|
||||||
gSuppressLinkErrorMessage
|
gSuppressLinkErrorMessage
|
||||||
gSerialIsRFU
|
gWirelessCommType
|
||||||
gSavedLinkPlayerCount
|
gSavedLinkPlayerCount
|
||||||
gSendCmd
|
gSendCmd
|
||||||
gSavedMultiplayerId
|
gSavedMultiplayerId
|
||||||
|
@ -163,7 +163,7 @@ extern u8 gShouldAdvanceLinkState;
|
|||||||
extern struct LinkPlayer gLinkPlayers[];
|
extern struct LinkPlayer gLinkPlayers[];
|
||||||
extern u16 word_3002910[];
|
extern u16 word_3002910[];
|
||||||
extern bool8 gReceivedRemoteLinkPlayers;
|
extern bool8 gReceivedRemoteLinkPlayers;
|
||||||
extern bool8 gSerialIsRFU;
|
extern bool8 gWirelessCommType;
|
||||||
|
|
||||||
void Task_DestroySelf(u8);
|
void Task_DestroySelf(u8);
|
||||||
void OpenLink(void);
|
void OpenLink(void);
|
||||||
@ -234,7 +234,7 @@ extern u8 gUnknown_030030EC[MAX_LINK_PLAYERS];
|
|||||||
extern u8 gUnknown_030030F0[MAX_LINK_PLAYERS];
|
extern u8 gUnknown_030030F0[MAX_LINK_PLAYERS];
|
||||||
extern u16 gUnknown_030030F4;
|
extern u16 gUnknown_030030F4;
|
||||||
extern u8 gSuppressLinkErrorMessage;
|
extern u8 gSuppressLinkErrorMessage;
|
||||||
extern bool8 gSerialIsRFU;
|
extern bool8 gWirelessCommType;
|
||||||
extern bool8 gSavedLinkPlayerCount;
|
extern bool8 gSavedLinkPlayerCount;
|
||||||
extern u8 gSavedMultiplayerId;
|
extern u8 gSavedMultiplayerId;
|
||||||
extern struct LinkTestBGInfo gLinkTestBGInfo;
|
extern struct LinkTestBGInfo gLinkTestBGInfo;
|
||||||
|
12
include/reset_save_heap.h
Normal file
12
include/reset_save_heap.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef GUARD_RESET_SAVE_HEAP_H
|
||||||
|
#define GUARD_RESET_SAVE_HEAP_H
|
||||||
|
|
||||||
|
// Exported type declarations
|
||||||
|
|
||||||
|
// Exported RAM declarations
|
||||||
|
|
||||||
|
// Exported ROM declarations
|
||||||
|
|
||||||
|
void sub_81700F8(void);
|
||||||
|
|
||||||
|
#endif //GUARD_RESET_SAVE_HEAP_H
|
@ -77,5 +77,8 @@ extern const u8 gText_RegisteredDataDeleted[];
|
|||||||
extern const u8 gUnknown_085EA79D[];
|
extern const u8 gUnknown_085EA79D[];
|
||||||
extern const u8 gText_CommErrorEllipsis[];
|
extern const u8 gText_CommErrorEllipsis[];
|
||||||
extern const u8 gText_MoveCloserToLinkPartner[];
|
extern const u8 gText_MoveCloserToLinkPartner[];
|
||||||
|
extern const u8 gText_CommErrorCheckConnections[];
|
||||||
|
extern const u8 gText_ABtnTitleScreen[];
|
||||||
|
extern const u8 gText_ABtnRegistrationCounter[];
|
||||||
|
|
||||||
#endif //GUARD_STRINGS_H
|
#endif //GUARD_STRINGS_H
|
||||||
|
@ -735,7 +735,7 @@ static void CB2_HandleStartBattle(void)
|
|||||||
sub_805EF14();
|
sub_805EF14();
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 1;
|
gBattleCommunication[MULTIUSE_STATE] = 1;
|
||||||
}
|
}
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800E0E8();
|
sub_800E0E8();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -759,7 +759,7 @@ static void CB2_HandleStartBattle(void)
|
|||||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 2;
|
gBattleCommunication[MULTIUSE_STATE] = 2;
|
||||||
}
|
}
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800DFB4(0, 0);
|
sub_800DFB4(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -930,7 +930,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
|||||||
sub_805EF14();
|
sub_805EF14();
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 1;
|
gBattleCommunication[MULTIUSE_STATE] = 1;
|
||||||
}
|
}
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800E0E8();
|
sub_800E0E8();
|
||||||
// fall through
|
// fall through
|
||||||
case 1:
|
case 1:
|
||||||
@ -961,7 +961,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
|||||||
gBattleCommunication[MULTIUSE_STATE] = 2;
|
gBattleCommunication[MULTIUSE_STATE] = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800DFB4(0, 0);
|
sub_800DFB4(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1238,14 +1238,14 @@ static void CB2_PreInitMultiBattle(void)
|
|||||||
if (sub_800A520() && !gPaletteFade.active)
|
if (sub_800A520() && !gPaletteFade.active)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800ADF8();
|
sub_800ADF8();
|
||||||
else
|
else
|
||||||
sub_800AC34();
|
sub_800AC34();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
if (sub_8010500())
|
if (sub_8010500())
|
||||||
{
|
{
|
||||||
@ -1330,7 +1330,7 @@ static void CB2_HandleStartMultiBattle(void)
|
|||||||
sub_805EF14();
|
sub_805EF14();
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 1;
|
gBattleCommunication[MULTIUSE_STATE] = 1;
|
||||||
}
|
}
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800E0E8();
|
sub_800E0E8();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -1348,7 +1348,7 @@ static void CB2_HandleStartMultiBattle(void)
|
|||||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
}
|
}
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800DFB4(0, 0);
|
sub_800DFB4(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2133,12 +2133,12 @@ static void sub_8038F34(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (!gSerialIsRFU)
|
if (!gWirelessCommType)
|
||||||
sub_800AC34();
|
sub_800AC34();
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
if (!gMain.field_439_x4 || gSerialIsRFU || gReceivedRemoteLinkPlayers != 1)
|
if (!gMain.field_439_x4 || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||||
{
|
{
|
||||||
gMain.field_439_x4 = 0;
|
gMain.field_439_x4 = 0;
|
||||||
SetMainCallback2(gMain.savedCallback);
|
SetMainCallback2(gMain.savedCallback);
|
||||||
@ -2317,13 +2317,13 @@ static void sub_803939C(void)
|
|||||||
case 8:
|
case 8:
|
||||||
if (--gBattleCommunication[1] == 0)
|
if (--gBattleCommunication[1] == 0)
|
||||||
{
|
{
|
||||||
if (gMain.field_439_x4 && !gSerialIsRFU)
|
if (gMain.field_439_x4 && !gWirelessCommType)
|
||||||
sub_800AC34();
|
sub_800AC34();
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
if (!gMain.field_439_x4 || gSerialIsRFU || gReceivedRemoteLinkPlayers != 1)
|
if (!gMain.field_439_x4 || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||||
{
|
{
|
||||||
gMain.field_439_x4 = 0;
|
gMain.field_439_x4 = 0;
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
|
@ -896,7 +896,7 @@ static void HandleMoveSwitchting(void)
|
|||||||
|
|
||||||
static void sub_80586F8(void)
|
static void sub_80586F8(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == 0)
|
if (gWirelessCommType == 0)
|
||||||
{
|
{
|
||||||
if (gReceivedRemoteLinkPlayers == 0)
|
if (gReceivedRemoteLinkPlayers == 0)
|
||||||
{
|
{
|
||||||
@ -932,7 +932,7 @@ void sub_80587B0(void)
|
|||||||
{
|
{
|
||||||
if (sub_800A520())
|
if (sub_800A520())
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == 0)
|
if (gWirelessCommType == 0)
|
||||||
sub_800AC34();
|
sub_800AC34();
|
||||||
else
|
else
|
||||||
sub_800ADF8();
|
sub_800ADF8();
|
||||||
|
@ -59,7 +59,7 @@ void HandleLinkBattleSetup(void)
|
|||||||
{
|
{
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800B488();
|
sub_800B488();
|
||||||
if (!gReceivedRemoteLinkPlayers)
|
if (!gReceivedRemoteLinkPlayers)
|
||||||
OpenLink();
|
OpenLink();
|
||||||
@ -780,7 +780,7 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
|||||||
gTasks[taskId].data[11]++;
|
gTasks[taskId].data[11]++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[11]++;
|
gTasks[taskId].data[11]++;
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
sub_800E0E8();
|
sub_800E0E8();
|
||||||
sub_800DFB4(0, 0);
|
sub_800DFB4(0, 0);
|
||||||
@ -1185,7 +1185,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
|||||||
case 5:
|
case 5:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
sub_800E084();
|
sub_800E084();
|
||||||
|
|
||||||
Free(GetBgTilemapBuffer(3));
|
Free(GetBgTilemapBuffer(3));
|
||||||
|
133
src/link.c
133
src/link.c
@ -3,6 +3,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "m4a.h"
|
#include "m4a.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
|
#include "reset_save_heap.h"
|
||||||
#include "save.h"
|
#include "save.h"
|
||||||
#include "bg.h"
|
#include "bg.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
@ -21,6 +22,7 @@
|
|||||||
#include "new_menu_helpers.h"
|
#include "new_menu_helpers.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
|
#include "songs.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trade.h"
|
#include "trade.h"
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
@ -84,7 +86,7 @@ bool8 gUnknown_030030EC[MAX_LINK_PLAYERS];
|
|||||||
bool8 gUnknown_030030F0[MAX_LINK_PLAYERS];
|
bool8 gUnknown_030030F0[MAX_LINK_PLAYERS];
|
||||||
u16 gUnknown_030030F4;
|
u16 gUnknown_030030F4;
|
||||||
u8 gSuppressLinkErrorMessage;
|
u8 gSuppressLinkErrorMessage;
|
||||||
bool8 gSerialIsRFU;
|
bool8 gWirelessCommType;
|
||||||
bool8 gSavedLinkPlayerCount;
|
bool8 gSavedLinkPlayerCount;
|
||||||
u16 gSendCmd[8];
|
u16 gSendCmd[8];
|
||||||
u8 gSavedMultiplayerId;
|
u8 gSavedMultiplayerId;
|
||||||
@ -148,7 +150,7 @@ static void sub_800AD88(void);
|
|||||||
static void sub_800AE30(void);
|
static void sub_800AE30(void);
|
||||||
static void sub_800AE5C(void);
|
static void sub_800AE5C(void);
|
||||||
static void sub_800AEB4(void);
|
static void sub_800AEB4(void);
|
||||||
void sub_800B1A0(void);
|
static void sub_800B1A0(void);
|
||||||
u8 sub_800B2F8(void);
|
u8 sub_800B2F8(void);
|
||||||
void sub_800B4A4(void);
|
void sub_800B4A4(void);
|
||||||
void DisableSerial(void);
|
void DisableSerial(void);
|
||||||
@ -340,7 +342,7 @@ void OpenLink(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!gSerialIsRFU)
|
if (!gWirelessCommType)
|
||||||
{
|
{
|
||||||
ResetSerial();
|
ResetSerial();
|
||||||
InitLink();
|
InitLink();
|
||||||
@ -372,7 +374,7 @@ void OpenLink(void)
|
|||||||
void CloseLink(void)
|
void CloseLink(void)
|
||||||
{
|
{
|
||||||
gReceivedRemoteLinkPlayers = FALSE;
|
gReceivedRemoteLinkPlayers = FALSE;
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
sub_800EDD4();
|
sub_800EDD4();
|
||||||
}
|
}
|
||||||
@ -692,7 +694,7 @@ void BuildSendCmd(u16 command)
|
|||||||
|
|
||||||
void sub_8009F18(void)
|
void sub_8009F18(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
sub_800F804();
|
sub_800F804();
|
||||||
}
|
}
|
||||||
@ -701,7 +703,7 @@ void sub_8009F18(void)
|
|||||||
|
|
||||||
bool32 sub_8009F3C(void)
|
bool32 sub_8009F3C(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
return sub_800F7E4();
|
return sub_800F7E4();
|
||||||
}
|
}
|
||||||
@ -722,7 +724,7 @@ static void sub_8009F70(void)
|
|||||||
|
|
||||||
void ClearLinkCallback(void)
|
void ClearLinkCallback(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
Rfu_set_zero();
|
Rfu_set_zero();
|
||||||
}
|
}
|
||||||
@ -734,7 +736,7 @@ void ClearLinkCallback(void)
|
|||||||
|
|
||||||
void ClearLinkCallback_2(void)
|
void ClearLinkCallback_2(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
Rfu_set_zero();
|
Rfu_set_zero();
|
||||||
}
|
}
|
||||||
@ -746,7 +748,7 @@ void ClearLinkCallback_2(void)
|
|||||||
|
|
||||||
u8 GetLinkPlayerCount(void)
|
u8 GetLinkPlayerCount(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
return sub_80104F4();
|
return sub_80104F4();
|
||||||
}
|
}
|
||||||
@ -1004,7 +1006,7 @@ static void sub_800A3F8(void)
|
|||||||
void sub_800A418(void)
|
void sub_800A418(void)
|
||||||
{
|
{
|
||||||
gUnknown_020223C0 = 0;
|
gUnknown_020223C0 = 0;
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
sub_800F850();
|
sub_800F850();
|
||||||
}
|
}
|
||||||
@ -1026,7 +1028,7 @@ void sub_800A458(void)
|
|||||||
|
|
||||||
u8 GetMultiplayerId(void)
|
u8 GetMultiplayerId(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
return rfu_get_multiplayer_id();
|
return rfu_get_multiplayer_id();
|
||||||
}
|
}
|
||||||
@ -1043,7 +1045,7 @@ u8 bitmask_all_link_players_but_self(void)
|
|||||||
|
|
||||||
bool8 SendBlock(u8 unused, const void *src, u16 size)
|
bool8 SendBlock(u8 unused, const void *src, u16 size)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
return sub_800FE84(src, size);
|
return sub_800FE84(src, size);
|
||||||
}
|
}
|
||||||
@ -1052,7 +1054,7 @@ bool8 SendBlock(u8 unused, const void *src, u16 size)
|
|||||||
|
|
||||||
bool8 sub_800A4D8(u8 a0)
|
bool8 sub_800A4D8(u8 a0)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
return sub_8010100(a0);
|
return sub_8010100(a0);
|
||||||
}
|
}
|
||||||
@ -1067,7 +1069,7 @@ bool8 sub_800A4D8(u8 a0)
|
|||||||
|
|
||||||
bool8 sub_800A520(void)
|
bool8 sub_800A520(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
return sub_8010500();
|
return sub_8010500();
|
||||||
}
|
}
|
||||||
@ -1076,7 +1078,7 @@ bool8 sub_800A520(void)
|
|||||||
|
|
||||||
u8 GetBlockReceivedStatus(void)
|
u8 GetBlockReceivedStatus(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
return sub_800FCD8();
|
return sub_800FCD8();
|
||||||
}
|
}
|
||||||
@ -1085,7 +1087,7 @@ u8 GetBlockReceivedStatus(void)
|
|||||||
|
|
||||||
static void SetBlockReceivedFlag(u8 who)
|
static void SetBlockReceivedFlag(u8 who)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
sub_800F6FC(who);
|
sub_800F6FC(who);
|
||||||
}
|
}
|
||||||
@ -1099,7 +1101,7 @@ void ResetBlockReceivedFlags(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
for (i = 0; i < MAX_RFU_PLAYERS; i ++)
|
for (i = 0; i < MAX_RFU_PLAYERS; i ++)
|
||||||
{
|
{
|
||||||
@ -1117,7 +1119,7 @@ void ResetBlockReceivedFlags(void)
|
|||||||
|
|
||||||
void ResetBlockReceivedFlag(u8 who)
|
void ResetBlockReceivedFlag(u8 who)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
sub_800F728(who);
|
sub_800F728(who);
|
||||||
}
|
}
|
||||||
@ -1394,7 +1396,7 @@ u8 GetLinkPlayerCount_2(void)
|
|||||||
|
|
||||||
bool8 IsLinkMaster(void)
|
bool8 IsLinkMaster(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
return Rfu_IsMaster();
|
return Rfu_IsMaster();
|
||||||
}
|
}
|
||||||
@ -1408,7 +1410,7 @@ u8 sub_800ABE8(void)
|
|||||||
|
|
||||||
void sub_800ABF4(u16 a0)
|
void sub_800ABF4(u16 a0)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
||||||
}
|
}
|
||||||
@ -1425,7 +1427,7 @@ void sub_800ABF4(u16 a0)
|
|||||||
|
|
||||||
void sub_800AC34(void)
|
void sub_800AC34(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
||||||
}
|
}
|
||||||
@ -1480,7 +1482,7 @@ static void sub_800ACAC(void)
|
|||||||
|
|
||||||
void sub_800AD10(void)
|
void sub_800AD10(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
task_add_05_task_del_08FA224_when_no_RfuFunc();
|
||||||
}
|
}
|
||||||
@ -1539,7 +1541,7 @@ static void sub_800AD88(void)
|
|||||||
|
|
||||||
void sub_800ADF8(void)
|
void sub_800ADF8(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU == TRUE)
|
if (gWirelessCommType == TRUE)
|
||||||
{
|
{
|
||||||
sub_8010434();
|
sub_8010434();
|
||||||
}
|
}
|
||||||
@ -1624,11 +1626,11 @@ void CB2_LinkError(void)
|
|||||||
FillPalette(0, 0, 2);
|
FillPalette(0, 0, 2);
|
||||||
ResetTasks();
|
ResetTasks();
|
||||||
remove_some_task();
|
remove_some_task();
|
||||||
if (gSerialIsRFU)
|
if (gWirelessCommType)
|
||||||
{
|
{
|
||||||
if (!sLinkErrorBuffer.unk_06)
|
if (!sLinkErrorBuffer.unk_06)
|
||||||
{
|
{
|
||||||
gSerialIsRFU = 3;
|
gWirelessCommType = 3;
|
||||||
}
|
}
|
||||||
sub_800E604();
|
sub_800E604();
|
||||||
}
|
}
|
||||||
@ -1677,3 +1679,84 @@ void sub_800B080(void)
|
|||||||
CopyWindowToVram(0, 0);
|
CopyWindowToVram(0, 0);
|
||||||
CopyWindowToVram(2, 3);
|
CopyWindowToVram(2, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sub_800B138(void)
|
||||||
|
{
|
||||||
|
LoadBgTiles(0, g2BlankTilesGfx, 0x20, 0);
|
||||||
|
FillWindowPixelBuffer(1, 0x00);
|
||||||
|
FillWindowPixelBuffer(2, 0x00);
|
||||||
|
box_print(1, 3, 2, 0, gUnknown_082ED224, 0, gText_CommErrorCheckConnections);
|
||||||
|
PutWindowTilemap(1);
|
||||||
|
PutWindowTilemap(2);
|
||||||
|
CopyWindowToVram(1, 0);
|
||||||
|
CopyWindowToVram(2, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sub_800B1A0(void)
|
||||||
|
{
|
||||||
|
switch (gMain.state)
|
||||||
|
{
|
||||||
|
case 00:
|
||||||
|
if (sLinkErrorBuffer.unk_06)
|
||||||
|
{
|
||||||
|
sub_800B080();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sub_800B138();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 02:
|
||||||
|
ShowBg(0);
|
||||||
|
if (sLinkErrorBuffer.unk_06)
|
||||||
|
{
|
||||||
|
ShowBg(1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
PlaySE(SE_BOO);
|
||||||
|
break;
|
||||||
|
case 60:
|
||||||
|
PlaySE(SE_BOO);
|
||||||
|
break;
|
||||||
|
case 90:
|
||||||
|
PlaySE(SE_BOO);
|
||||||
|
break;
|
||||||
|
case 130:
|
||||||
|
if (gWirelessCommType == 2)
|
||||||
|
{
|
||||||
|
box_print(0, 3, 2, 20, gUnknown_082ED224, 0, gText_ABtnTitleScreen);
|
||||||
|
}
|
||||||
|
else if (gWirelessCommType == 1)
|
||||||
|
{
|
||||||
|
box_print(0, 3, 2, 20, gUnknown_082ED224, 0, gText_ABtnRegistrationCounter);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (gMain.state == 160)
|
||||||
|
{
|
||||||
|
if (gWirelessCommType == 1)
|
||||||
|
{
|
||||||
|
if (gMain.newKeys & A_BUTTON)
|
||||||
|
{
|
||||||
|
PlaySE(SE_PIN);
|
||||||
|
gWirelessCommType = 0;
|
||||||
|
sLinkErrorBuffer.unk_06 = 0;
|
||||||
|
sub_81700F8();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (gWirelessCommType == 2)
|
||||||
|
{
|
||||||
|
if (gMain.newKeys & A_BUTTON)
|
||||||
|
{
|
||||||
|
rfu_REQ_stopMode();
|
||||||
|
rfu_waitREQComplete();
|
||||||
|
DoSoftReset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gMain.state != 160)
|
||||||
|
{
|
||||||
|
gMain.state ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -336,7 +336,7 @@ extern void ProcessDma3Requests(void);
|
|||||||
|
|
||||||
static void VBlankIntr(void)
|
static void VBlankIntr(void)
|
||||||
{
|
{
|
||||||
if (gSerialIsRFU != FALSE)
|
if (gWirelessCommType != FALSE)
|
||||||
LinkVSync();
|
LinkVSync();
|
||||||
else if (gLinkVSyncDisabled == FALSE)
|
else if (gLinkVSyncDisabled == FALSE)
|
||||||
sub_800B9B8();
|
sub_800B9B8();
|
||||||
|
@ -177,7 +177,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
|
|||||||
|
|
||||||
ActionSelectionCreateCursorAt(gActionSelectionCursor[gBankInMenu], 0);
|
ActionSelectionCreateCursorAt(gActionSelectionCursor[gBankInMenu], 0);
|
||||||
|
|
||||||
if (gSerialIsRFU != 0 && gReceivedRemoteLinkPlayers != 0)
|
if (gWirelessCommType != 0 && gReceivedRemoteLinkPlayers != 0)
|
||||||
{
|
{
|
||||||
sub_800E0E8();
|
sub_800E0E8();
|
||||||
sub_800DFB4(0, 0);
|
sub_800DFB4(0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user