diff --git a/asm/berry_blender.s b/asm/berry_blender.s index e0571c653..bb9eb72ae 100644 --- a/asm/berry_blender.s +++ b/asm/berry_blender.s @@ -7,1773 +7,7 @@ - thumb_func_start sub_8080588 -sub_8080588: @ 8080588 - push {r4,lr} - movs r0, 0 - movs r1, 0 - bl SetGpuReg - bl ResetSpriteData - bl FreeAllSpritePalettes - bl ResetTasks - ldr r0, =VBlankCB0_BerryBlender - bl SetVBlankCallback - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =sBerryBlenderBgTemplates - movs r0, 0x1 - movs r2, 0x3 - bl InitBgsFromTemplates - ldr r4, =sBerryBlenderData - ldr r1, [r4] - movs r0, 0xDC - lsls r0, 1 - adds r1, r0 - movs r0, 0x1 - bl SetBgTilemapBuffer - ldr r1, [r4] - ldr r3, =0x000009b8 - adds r1, r3 - movs r0, 0x2 - bl SetBgTilemapBuffer - movs r0, 0 - movs r1, 0x1 - movs r2, 0xD0 - bl sub_809882C - movs r0, 0 - movs r1, 0x14 - movs r2, 0xF0 - bl copy_textbox_border_tile_patterns_to_vram - bl InitBerryBlenderWindows - ldr r2, [r4] - adds r0, r2, 0 - adds r0, 0x44 - movs r1, 0 - strh r1, [r0] - adds r0, 0x8 - strh r1, [r0] - subs r0, 0x2 - strh r1, [r0] - adds r0, 0x4 - strh r1, [r0] - movs r3, 0x8E - lsls r3, 1 - adds r0, r2, r3 - strh r1, [r0] - adds r3, 0x2 - adds r0, r2, r3 - strh r1, [r0] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080588 - thumb_func_start task_tutorial_oak_boy_girl -task_tutorial_oak_boy_girl: @ 8080624 - push {lr} - lsls r0, 16 - lsls r1, 24 - lsrs r0, 24 - adds r2, r0, 0 - adds r2, 0x18 - ldr r0, =sBerryBlenderData - ldr r0, [r0] - lsrs r1, 23 - adds r0, 0x96 - adds r0, r1 - ldrb r0, [r0] - ldr r1, =gUnknown_083399E7 - adds r0, r1 - ldrb r1, [r0] - cmp r2, r1 - bcc _0808066C - adds r0, r1, 0 - adds r0, 0x30 - cmp r2, r0 - bcs _0808066C - subs r0, 0x1C - cmp r2, r0 - bcc _08080668 - adds r0, 0x8 - cmp r2, r0 - bcs _08080668 - movs r0, 0x2 - b _0808066E - .pool -_08080668: - movs r0, 0x1 - b _0808066E -_0808066C: - movs r0, 0 -_0808066E: - pop {r1} - bx r1 - thumb_func_end task_tutorial_oak_boy_girl - - thumb_func_start sub_8080674 -sub_8080674: @ 8080674 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 24 - lsrs r1, 24 - movs r6, 0 - cmp r5, 0xAF - bne _080806AC - movs r4, 0 - subs r7, r1, 0x1 - adds r2, 0x9 -_08080690: - adds r0, r2, r6 - adds r1, r2, r4 - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bls _0808069E - adds r6, r4, 0 -_0808069E: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x4 - bls _08080690 - adds r0, r6, 0x5 - b _080806C4 -_080806AC: - adds r0, r5, 0 - subs r0, 0x85 - lsls r0, 16 - lsrs r6, r0, 16 - subs r7, r1, 0x1 - cmp r6, 0x4 - bls _080806C8 - adds r0, r6, 0 - movs r1, 0x5 - bl __umodsi3 - adds r0, 0x5 -_080806C4: - lsls r0, 16 - lsrs r6, r0, 16 -_080806C8: - movs r4, 0 - cmp r4, r7 - bge _08080734 - ldr r0, =gUnknown_08339CA0 - mov r9, r0 - adds r0, r5, 0 - subs r0, 0xA3 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 -_080806DC: - lsls r0, r6, 1 - adds r0, r6 - adds r0, r4, r0 - add r0, r9 - ldrb r5, [r0] - movs r0, 0xD0 - lsls r0, 2 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _0808071A - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x1 - bne _0808071A - adds r0, r6, 0 - movs r1, 0x5 - bl __umodsi3 - lsls r0, 16 - lsrs r6, r0, 16 - ldr r0, =gUnknown_08339CBE - adds r0, r6, r0 - ldrb r5, [r0] - mov r0, r8 - cmp r0, 0x4 - bhi _0808071A - subs r0, r5, 0x5 - lsls r0, 16 - lsrs r5, r0, 16 -_0808071A: - adds r4, 0x1 - lsls r0, r4, 24 - lsrs r0, 24 - adds r1, r5, 0 - adds r1, 0x85 - lsls r1, 16 - lsrs r1, 16 - bl sub_8082FDC - lsls r4, 16 - lsrs r4, 16 - cmp r4, r7 - blt _080806DC -_08080734: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080674 - - thumb_func_start sub_808074C -sub_808074C: @ 808074C - push {r4-r7,lr} - movs r4, 0 - ldr r7, =sBerryBlenderData - movs r6, 0xFF - ldr r5, =gUnknown_083399D0 -_08080756: - ldr r3, [r7] - lsls r2, r4, 1 - adds r0, r3, 0 - adds r0, 0x96 - adds r0, r2 - strh r6, [r0] - adds r1, r3, 0 - adds r1, 0x8E - adds r1, r2 - adds r0, r3, 0 - adds r0, 0x7C - ldrb r0, [r0] - subs r0, 0x2 - lsls r0, 2 - adds r0, r4, r0 - adds r0, r5 - ldrb r0, [r0] - strh r0, [r1] - adds r4, 0x1 - cmp r4, 0x3 - ble _08080756 - movs r3, 0 - ldr r7, =sBerryBlenderData -_08080784: - movs r4, 0 - adds r6, r3, 0x1 - lsls r5, r3, 1 -_0808078A: - ldr r2, [r7] - lsls r0, r4, 1 - adds r1, r2, 0 - adds r1, 0x8E - adds r1, r0 - ldrh r0, [r1] - cmp r0, r3 - bne _080807A2 - adds r0, r2, 0 - adds r0, 0x96 - adds r0, r5 - strh r4, [r0] -_080807A2: - adds r4, 0x1 - cmp r4, 0x3 - ble _0808078A - adds r3, r6, 0 - cmp r3, 0x3 - ble _08080784 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808074C - - thumb_func_start sub_80807BC -sub_80807BC: @ 80807BC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - movs r0, 0 - mov r10, r0 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - beq _080807DE - bl GetMultiplayerId - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 -_080807DE: - movs r6, 0 - ldr r7, =sBerryBlenderData - mov r8, r6 -_080807E4: - ldr r2, [r7] - lsls r5, r6, 1 - adds r0, r2, 0 - adds r0, 0x8E - adds r3, r0, r5 - ldrh r0, [r3] - cmp r0, 0xFF - beq _080808B6 - adds r1, r2, 0 - adds r1, 0x50 - ldrh r3, [r3] - adds r1, r3 - adds r0, r2, 0 - adds r0, 0x54 - adds r0, r6 - ldrb r0, [r0] - movs r2, 0 - mov r9, r2 - strb r0, [r1] - ldr r0, [r7] - adds r1, r0, 0 - adds r1, 0x8E - adds r1, r5 - adds r0, 0x50 - ldrh r1, [r1] - adds r0, r1 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - mov r1, r8 - lsrs r4, r1, 24 - adds r1, r4, 0 - bl StartSpriteAnim - add r1, sp, 0x8 - movs r0, 0xFF - strb r0, [r1] - ldr r0, [r7] - adds r0, 0x8E - adds r0, r5 - ldrh r0, [r0] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - ldr r0, =gLinkPlayers + 8 - adds r1, r0 - add r0, sp, 0x8 - bl StringCopy - movs r0, 0x1 - add r1, sp, 0x8 - movs r2, 0x38 - bl GetStringCenterAlignXOffset - adds r2, r0, 0 - ldr r0, [r7] - adds r0, 0x8E - adds r0, r5 - mov r5, r8 - ldrh r0, [r0] - cmp r10, r0 - bne _08080890 - lsls r2, 24 - lsrs r2, 24 - mov r0, r9 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - adds r0, r4, 0 - add r1, sp, 0x8 - movs r3, 0x1 - bl sub_80840D4 - b _080808A6 - .pool -_08080890: - lsls r2, 24 - lsrs r2, 24 - mov r1, r9 - str r1, [sp] - movs r0, 0x1 - str r0, [sp, 0x4] - adds r0, r4, 0 - add r1, sp, 0x8 - movs r3, 0x1 - bl sub_80840D4 -_080808A6: - lsrs r4, r5, 24 - adds r0, r4, 0 - bl PutWindowTilemap - adds r0, r4, 0 - movs r1, 0x3 - bl CopyWindowToVram -_080808B6: - movs r2, 0x80 - lsls r2, 17 - add r8, r2 - adds r6, 0x1 - cmp r6, 0x3 - ble _080807E4 - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_80807BC - - thumb_func_start sub_80808D4 -sub_80808D4: @ 80808D4 - push {r4-r7,lr} - sub sp, 0x4 - ldr r1, =sBerryBlenderData - ldr r0, [r1] - ldrb r0, [r0] - adds r2, r1, 0 - cmp r0, 0x15 - bls _080808E6 - b _08080DAE -_080808E6: - lsls r0, 2 - ldr r1, =_080808F8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080808F8: - .4byte _08080950 - .4byte _080809E4 - .4byte _08080A04 - .4byte _08080A58 - .4byte _08080A84 - .4byte _08080DAE - .4byte _08080DAE - .4byte _08080DAE - .4byte _08080ABC - .4byte _08080DAE - .4byte _08080DAE - .4byte _08080AEC - .4byte _08080B3C - .4byte _08080BB0 - .4byte _08080BDC - .4byte _08080C78 - .4byte _08080CA0 - .4byte _08080DAE - .4byte _08080CAE - .4byte _08080CAE - .4byte _08080CAE - .4byte _08080CC4 -_08080950: - bl sub_800B4C0 - bl sub_8080588 - ldr r4, =gSpecialVar_ItemId - ldrh r1, [r4] - movs r0, 0 - bl sub_8082FDC - ldr r5, =sBerryBlenderData - ldr r0, [r5] - movs r6, 0xAC - lsls r6, 1 - adds r0, r6 - ldrh r1, [r4] - bl Blender_CopyBerryData - ldrh r0, [r4] - ldr r2, [r5] - adds r1, r2, 0 - adds r1, 0x7C - ldrb r1, [r1] - adds r2, r6 - bl sub_8080674 - movs r4, 0 - movs r6, 0 - ldr r0, =gLinkType - mov r12, r0 - movs r7, 0x92 - lsls r7, 1 -_0808098E: - ldr r0, [r5] - lsls r1, r4, 1 - adds r0, 0x64 - adds r0, r1 - strh r6, [r0] - adds r3, r4, 0x1 - adds r1, r4 - lsls r1, 1 - movs r2, 0x2 -_080809A0: - ldr r0, [r5] - adds r0, r7 - adds r0, r1 - strh r6, [r0] - adds r1, 0x2 - subs r2, 0x1 - cmp r2, 0 - bge _080809A0 - adds r4, r3, 0 - cmp r4, 0x3 - ble _0808098E - ldr r4, =sBerryBlenderData - ldr r3, [r4] - adds r1, r3, 0 - adds r1, 0x70 - movs r2, 0 - movs r0, 0 - strh r0, [r1] - strb r2, [r3, 0x1] - ldr r1, =0x00004422 - adds r0, r1, 0 - mov r2, r12 - strh r0, [r2] - ldr r1, [r4] - b _08080CB2 - .pool -_080809E4: - bl LoadBerryBlenderGfx - lsls r0, 24 - cmp r0, 0 - bne _080809F0 - b _08080DAE -_080809F0: - ldr r0, =sBerryBlenderData - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - bl sub_8082D28 - b _08080DAE - .pool -_08080A04: - movs r4, 0 - ldr r5, =sBlenderSyncArrowsPos - ldr r6, =sBerryBlenderData -_08080A0A: - ldrb r1, [r5] - ldrb r2, [r5, 0x1] - ldr r0, =sBlenderSyncArrow_SpriteTemplate - movs r3, 0x1 - bl CreateSprite - ldr r1, [r6] - adds r1, 0x54 - adds r1, r4 - strb r0, [r1] - ldr r0, [r6] - adds r0, 0x54 - adds r0, r4 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - adds r1, r4, 0 - adds r1, 0x8 - lsls r1, 24 - lsrs r1, 24 - bl StartSpriteAnim - adds r5, 0x2 - adds r4, 0x1 - cmp r4, 0x3 - ble _08080A0A - b _08080CAE - .pool -_08080A58: - movs r0, 0x1 - negs r0, r0 - movs r4, 0 - str r4, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r2, =sBerryBlenderData - ldr r1, [r2] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r0, [r2] - movs r3, 0x84 - lsls r3, 1 - adds r0, r3 - str r4, [r0] - b _08080DAE - .pool -_08080A84: - ldr r4, =sBerryBlenderData - ldr r1, [r4] - movs r5, 0x84 - lsls r5, 1 - adds r1, r5 - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - cmp r0, 0x2 - bne _08080A9C - bl sub_807F9D0 -_08080A9C: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08080AAA - b _08080DAE -_08080AAA: - ldr r1, [r4] - movs r0, 0x8 - strb r0, [r1] - b _08080DAE - .pool -_08080ABC: - ldr r2, =sBerryBlenderData - ldr r1, [r2] - movs r3, 0 - movs r0, 0xB - strb r0, [r1] - ldr r0, [r2] - movs r1, 0x8A - lsls r1, 1 - adds r0, r1 - strb r3, [r0] - b _08080DAE - .pool -_08080AD8: - lsls r1, 1 - adds r0, r3, 0 - adds r0, 0x74 - adds r0, r1 - ldrh r0, [r0] - lsls r1, r4, 24 - lsrs r1, 24 - bl sub_807FD90 - b _08080B16 -_08080AEC: - movs r4, 0 - ldr r2, =gUnknown_083399D0 - ldr r0, =sBerryBlenderData - ldr r3, [r0] - adds r0, r3, 0 - adds r0, 0x7C - ldrb r0, [r0] - subs r0, 0x2 - lsls r0, 2 - movs r5, 0x8A - lsls r5, 1 - adds r1, r3, r5 - ldrb r1, [r1] - adds r0, r2 -_08080B08: - ldrb r2, [r0] - cmp r1, r2 - beq _08080AD8 - adds r0, 0x1 - adds r4, 0x1 - cmp r4, 0x3 - ble _08080B08 -_08080B16: - ldr r3, =sBerryBlenderData - ldr r1, [r3] - movs r5, 0x84 - lsls r5, 1 - adds r2, r1, r5 - movs r0, 0 - str r0, [r2] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r1, [r3] - movs r0, 0x8A - lsls r0, 1 - adds r1, r0 - b _08080CB2 - .pool -_08080B3C: - ldr r3, [r2] - movs r2, 0x84 - lsls r2, 1 - adds r1, r3, r2 - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - cmp r0, 0x3C - bgt _08080B50 - b _08080DAE -_08080B50: - movs r5, 0x8A - lsls r5, 1 - adds r0, r3, r5 - adds r4, r3, 0 - adds r4, 0x7C - ldrb r0, [r0] - ldrb r1, [r4] - cmp r0, r1 - bcc _08080B94 - ldr r2, =gUnknown_083399DC - ldr r1, =gUnknown_083399E4 - ldrb r0, [r4] - subs r0, 0x2 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 1 - adds r0, r2 - ldr r2, =0xffffa800 - adds r1, r2, 0 - ldrh r0, [r0] - adds r1, r0 - adds r0, r3, 0 - adds r0, 0x4A - strh r1, [r0] - ldrb r0, [r3] - adds r0, 0x1 - b _08080B98 - .pool -_08080B94: - ldrb r0, [r3] - subs r0, 0x1 -_08080B98: - strb r0, [r3] - ldr r0, =sBerryBlenderData - ldr r0, [r0] - movs r3, 0x84 - lsls r3, 1 - adds r0, r3 - movs r1, 0 - str r1, [r0] - b _08080DAE - .pool -_08080BB0: - ldr r4, =sBerryBlenderData - ldr r1, [r4] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - bl sub_808074C - movs r0, 0x2B - bl PlaySE - ldr r0, [r4] - movs r5, 0xA0 - lsls r5, 1 - adds r0, r5 - bl sub_8082CB4 - movs r0, 0x2 - bl ShowBg - b _08080DAE - .pool -_08080BDC: - movs r1, 0x80 - lsls r1, 3 - movs r0, 0 - bl SetGpuRegBits - ldr r4, =sBerryBlenderData - ldr r2, [r4] - adds r1, r2, 0 - adds r1, 0x4A - movs r3, 0x80 - lsls r3, 2 - adds r0, r3, 0 - ldrh r5, [r1] - adds r0, r5 - strh r0, [r1] - movs r0, 0x8D - lsls r0, 1 - adds r1, r2, r0 - ldrh r0, [r1] - adds r0, 0x4 - strh r0, [r1] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xFF - bls _08080C5C - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - ldr r3, [r4] - movs r2, 0x8D - lsls r2, 1 - adds r1, r3, r2 - movs r0, 0x80 - lsls r0, 1 - strh r0, [r1] - ldr r2, =gUnknown_083399DC - ldr r1, =gUnknown_083399E4 - adds r0, r3, 0 - adds r0, 0x7C - ldrb r0, [r0] - subs r0, 0x2 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - adds r0, r3, 0 - adds r0, 0x4A - strh r1, [r0] - movs r0, 0xC - movs r1, 0x2 - bl SetGpuRegBits - ldr r0, [r4] - movs r3, 0x84 - lsls r3, 1 - adds r0, r3 - movs r1, 0 - str r1, [r0] - movs r0, 0x34 - bl PlaySE - bl sub_80807BC -_08080C5C: - ldr r0, [r4] - movs r5, 0xA0 - lsls r5, 1 - adds r0, r5 - bl sub_8082CB4 - b _08080DAE - .pool -_08080C78: - bl sub_8083380 - lsls r0, 24 - cmp r0, 0 - beq _08080C8C - ldr r0, =sBerryBlenderData - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_08080C8C: - ldr r0, =sBerryBlenderData - ldr r0, [r0] - movs r1, 0xA0 - lsls r1, 1 - adds r0, r1 - bl sub_8082CB4 - b _08080DAE - .pool -_08080CA0: - ldr r0, =gUnknown_08339C2C - movs r2, 0x10 - negs r2, r2 - movs r1, 0x78 - movs r3, 0x3 - bl CreateSprite -_08080CAE: - ldr r0, =sBerryBlenderData - ldr r1, [r0] -_08080CB2: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08080DAE - .pool -_08080CC4: - bl sub_8080DF8 - ldr r5, =sBerryBlenderData - ldr r4, [r5] - adds r1, r4, 0 - adds r1, 0x4C - movs r3, 0 - movs r2, 0 - movs r0, 0x80 - strh r0, [r1] - movs r1, 0x82 - lsls r1, 1 - adds r0, r4, r1 - str r2, [r0] - ldr r2, =0x00000123 - adds r0, r4, r2 - strb r3, [r0] - ldr r0, [r5] - adds r0, 0x72 - strb r3, [r0] - ldr r0, =sub_8081898 - bl SetMainCallback2 - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x1 - bne _08080D44 - movs r0, 0xD0 - lsls r0, 2 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _08080D30 - ldr r0, =sub_8081224 - movs r1, 0xA - bl CreateTask - ldr r1, [r5] - movs r3, 0x90 - lsls r3, 1 - adds r1, r3 - b _08080D42 - .pool -_08080D30: - ldr r0, =gUnknown_083399EC - ldr r0, [r0] - movs r1, 0xA - bl CreateTask - ldr r1, [r5] - movs r5, 0x90 - lsls r5, 1 - adds r1, r5 -_08080D42: - strb r0, [r1] -_08080D44: - ldr r1, =gSpecialVar_0x8004 - ldrh r0, [r1] - cmp r0, 0x1 - bls _08080D80 - movs r4, 0 - ldrh r1, [r1] - cmp r4, r1 - bge _08080D80 - movs r5, 0xA0 - lsls r5, 20 - ldr r6, =gUnknown_083399EC -_08080D5A: - ldm r6!, {r0} - lsrs r1, r5, 24 - bl CreateTask - ldr r1, =sBerryBlenderData - ldr r1, [r1] - movs r2, 0x90 - lsls r2, 1 - adds r1, r2 - adds r1, r4 - strb r0, [r1] - movs r3, 0x80 - lsls r3, 17 - adds r5, r3 - adds r4, 0x1 - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r4, r0 - blt _08080D5A -_08080D80: - bl GetCurrentMapMusic - lsls r0, 16 - lsrs r0, 16 - ldr r4, =0x00000193 - cmp r0, r4 - beq _08080D9E - bl GetCurrentMapMusic - ldr r1, =sBerryBlenderData - ldr r1, [r1] - movs r5, 0xAA - lsls r5, 1 - adds r1, r5 - strh r0, [r1] -_08080D9E: - adds r0, r4, 0 - bl PlayBGM - movs r0, 0x35 - bl PlaySE - bl Blender_ControlHitPitch -_08080DAE: - ldr r0, =sBerryBlenderData - ldr r1, [r0] - movs r2, 0x8E - lsls r2, 1 - adds r0, r1, r2 - movs r3, 0 - ldrsh r0, [r0, r3] - movs r5, 0x8F - lsls r5, 1 - adds r1, r5 - movs r2, 0 - ldrsh r1, [r1, r2] - bl Blender_DummiedOutFunc - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl RunTextPrinters - bl UpdatePaletteFade - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80808D4 - - thumb_func_start sub_8080DF8 -sub_8080DF8: @ 8080DF8 - push {lr} - ldr r3, =gUnknown_03003110 - movs r0, 0 - ldr r1, =gUnknown_03003090 - movs r2, 0x3 -_08080E02: - strh r0, [r3] - strh r0, [r3, 0x4] - strh r0, [r1] - strh r0, [r1, 0x4] - adds r1, 0x10 - subs r2, 0x1 - cmp r2, 0 - bge _08080E02 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080DF8 - - thumb_func_start sub_8080E20 -sub_8080E20: @ 8080E20 - push {r4,lr} - lsls r0, 24 - lsrs r3, r0, 24 - ldr r1, =gTasks - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 3 - adds r2, r0, r1 - ldrh r0, [r2, 0x8] - adds r0, 0x1 - strh r0, [r2, 0x8] - lsls r0, 16 - asrs r0, 16 - movs r4, 0xA - ldrsh r1, [r2, r4] - cmp r0, r1 - ble _08080E58 - ldr r0, =gUnknown_03003090 - movs r4, 0xC - ldrsh r1, [r2, r4] - lsls r1, 4 - adds r0, 0x4 - adds r1, r0 - ldr r0, =0x00002345 - strh r0, [r1] - adds r0, r3, 0 - bl DestroyTask -_08080E58: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080E20 - - thumb_func_start sub_8080E6C -sub_8080E6C: @ 8080E6C - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - lsls r5, 24 - lsrs r5, 24 - lsls r4, 24 - lsrs r4, 24 - ldr r0, =sub_8080E20 - movs r1, 0x50 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - strh r4, [r1, 0xA] - strh r5, [r1, 0xC] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080E6C - - thumb_func_start sub_8080EA4 -sub_8080EA4: @ 8080EA4 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r4, =sBerryBlenderData - ldr r0, [r4] - adds r0, 0x4A - ldrh r0, [r0] - movs r1, 0x1 - bl task_tutorial_oak_boy_girl - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - beq _08080EC2 - b _08080FB8 -_08080EC2: - ldr r2, =gTasks - lsls r1, r5, 2 - adds r0, r1, r5 - lsls r0, 3 - adds r0, r2 - movs r2, 0x8 - ldrsh r0, [r0, r2] - adds r6, r1, 0 - cmp r0, 0 - beq _08080ED8 - b _08080FC6 -_08080ED8: - ldr r0, [r4] - ldr r1, =0x00000123 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08080F9A - bl Random - lsls r0, 16 - lsrs r0, 16 - ldr r1, =0x0000028f - bl __udivsi3 - lsls r0, 24 - lsrs r1, r0, 24 - adds r3, r1, 0 - ldr r0, [r4] - adds r0, 0x4C - movs r4, 0 - ldrsh r2, [r0, r4] - ldr r0, =0x000001f3 - cmp r2, r0 - bgt _08080F40 - cmp r1, 0x4B - bls _08080F2C - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 - b _08080F30 - .pool -_08080F2C: - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 -_08080F30: - strh r0, [r1, 0x14] - ldr r0, =0x00005432 - b _08080F9E - .pool -_08080F40: - ldr r0, =0x000005db - cmp r2, r0 - bgt _08080F6E - cmp r1, 0x50 - bhi _08080F9A - adds r0, r1, 0 - subs r0, 0x15 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3B - bhi _08080F68 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 - b _08080F9E - .pool -_08080F68: - cmp r1, 0x9 - bhi _08080FA0 - b _08080F90 -_08080F6E: - cmp r1, 0x5A - bhi _08080F9A - adds r0, r1, 0 - subs r0, 0x47 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x13 - bhi _08080F8C - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 - b _08080F9E - .pool -_08080F8C: - cmp r3, 0x1D - bhi _08080FA0 -_08080F90: - movs r0, 0x1 - movs r1, 0x5 - bl sub_8080E6C - b _08080FA0 -_08080F9A: - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 -_08080F9E: - strh r0, [r1, 0x14] -_08080FA0: - ldr r0, =gTasks - adds r1, r6, r5 - lsls r1, 3 - adds r1, r0 - movs r0, 0x1 - b _08080FC4 - .pool -_08080FB8: - ldr r0, =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r0 - movs r0, 0 -_08080FC4: - strh r0, [r1, 0x8] -_08080FC6: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080EA4 - - thumb_func_start sub_8080FD0 -sub_8080FD0: @ 8080FD0 - push {r4-r6,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r6, =sBerryBlenderData - ldr r3, [r6] - adds r0, r3, 0 - adds r0, 0x4A - ldrh r0, [r0] - movs r1, 0xC0 - lsls r1, 5 - adds r0, r1 - ldr r1, =0x0000ffff - ands r0, r1 - adds r1, r3, 0 - adds r1, 0x9A - ldrb r1, [r1] - lsrs r2, r0, 8 - ldr r0, =gUnknown_083399E7 - adds r1, r0 - ldrb r1, [r1] - adds r0, r1, 0 - adds r0, 0x14 - cmp r2, r0 - bls _080810E0 - adds r0, 0x14 - cmp r2, r0 - bcs _080810E0 - ldr r2, =gTasks - lsls r1, r4, 2 - adds r0, r1, r4 - lsls r0, 3 - adds r2, r0, r2 - movs r5, 0x8 - ldrsh r0, [r2, r5] - adds r5, r1, 0 - cmp r0, 0 - bne _080810EE - ldr r1, =0x00000123 - adds r0, r3, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080810CC - bl Random - lsls r0, 16 - lsrs r0, 16 - ldr r1, =0x0000028f - bl __udivsi3 - lsls r0, 24 - lsrs r2, r0, 24 - adds r3, r2, 0 - ldr r0, [r6] - adds r0, 0x4C - movs r6, 0 - ldrsh r1, [r0, r6] - ldr r0, =0x000001f3 - cmp r1, r0 - bgt _08081088 - cmp r2, 0x42 - bls _08081078 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 - strh r0, [r1, 0x24] - b _080810B0 - .pool -_08081078: - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 - strh r0, [r1, 0x24] - b _080810B0 - .pool -_08081088: - cmp r2, 0x41 - bls _08081092 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 - strh r0, [r1, 0x24] -_08081092: - adds r0, r2, 0 - subs r0, 0x29 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x18 - bhi _080810A4 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 - strh r0, [r1, 0x24] -_080810A4: - cmp r3, 0x9 - bhi _080810B0 - movs r0, 0x2 - movs r1, 0x5 - bl sub_8080E6C -_080810B0: - ldr r0, =gTasks - adds r1, r5, r4 - lsls r1, 3 - adds r1, r0 - movs r0, 0x1 - b _080810EC - .pool -_080810CC: - ldr r0, =gUnknown_03003090 - ldr r1, =0x00004523 - strh r1, [r0, 0x24] - movs r0, 0x1 - strh r0, [r2, 0x8] - b _080810EE - .pool -_080810E0: - ldr r0, =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - movs r0, 0 -_080810EC: - strh r0, [r1, 0x8] -_080810EE: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8080FD0 - - thumb_func_start sub_80810F8 -sub_80810F8: @ 80810F8 - push {r4-r6,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r5, =sBerryBlenderData - ldr r3, [r5] - adds r0, r3, 0 - adds r0, 0x4A - ldrh r0, [r0] - movs r1, 0xC0 - lsls r1, 5 - adds r0, r1 - ldr r1, =0x0000ffff - ands r0, r1 - adds r1, r3, 0 - adds r1, 0x9C - ldrb r1, [r1] - lsrs r2, r0, 8 - ldr r0, =gUnknown_083399E7 - adds r1, r0 - ldrb r1, [r1] - adds r0, r1, 0 - adds r0, 0x14 - cmp r2, r0 - bls _0808120C - adds r0, 0x14 - cmp r2, r0 - bcs _0808120C - ldr r2, =gTasks - lsls r1, r4, 2 - adds r0, r1, r4 - lsls r0, 3 - adds r2, r0, r2 - movs r6, 0x8 - ldrsh r0, [r2, r6] - adds r6, r1, 0 - cmp r0, 0 - bne _0808121A - ldr r1, =0x00000123 - adds r0, r3, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080811F8 - bl Random - lsls r0, 16 - lsrs r0, 16 - ldr r1, =0x0000028f - bl __udivsi3 - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, [r5] - adds r0, 0x4C - movs r3, 0 - ldrsh r1, [r0, r3] - ldr r0, =0x000001f3 - cmp r1, r0 - bgt _080811AC - cmp r2, 0x58 - bls _0808119C - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 - strh r0, [r1, 0x34] - b _080811DE - .pool -_0808119C: - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 - strh r0, [r1, 0x34] - b _080811DE - .pool -_080811AC: - cmp r2, 0x3C - bls _080811C0 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00004523 - b _080811D0 - .pool -_080811C0: - adds r0, r2, 0 - subs r0, 0x38 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bhi _080811D2 - ldr r1, =gUnknown_03003090 - ldr r0, =0x00005432 -_080811D0: - strh r0, [r1, 0x34] -_080811D2: - cmp r2, 0x4 - bhi _080811DE - movs r0, 0x3 - movs r1, 0x5 - bl sub_8080E6C -_080811DE: - ldr r0, =gTasks - adds r1, r6, r4 - lsls r1, 3 - adds r1, r0 - movs r0, 0x1 - b _08081218 - .pool -_080811F8: - ldr r0, =gUnknown_03003090 - ldr r1, =0x00004523 - strh r1, [r0, 0x34] - movs r0, 0x1 - strh r0, [r2, 0x8] - b _0808121A - .pool -_0808120C: - ldr r0, =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - movs r0, 0 -_08081218: - strh r0, [r1, 0x8] -_0808121A: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80810F8 - - thumb_func_start sub_8081224 -sub_8081224: @ 8081224 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, =sBerryBlenderData - ldr r0, [r0] - adds r0, 0x4A - ldrh r0, [r0] - movs r1, 0x1 - bl task_tutorial_oak_boy_girl - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _08081270 - ldr r0, =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r2, r1, r0 - movs r1, 0x8 - ldrsh r0, [r2, r1] - cmp r0, 0 - bne _0808127E - ldr r0, =gUnknown_03003090 - ldr r1, =0x00004523 - strh r1, [r0, 0x14] - movs r0, 0x1 - strh r0, [r2, 0x8] - b _0808127E - .pool -_08081270: - ldr r0, =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - movs r0, 0 - strh r0, [r1, 0x8] -_0808127E: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8081224 - - thumb_func_start sub_8081288 -sub_8081288: @ 8081288 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r7, r0, 16 - mov r8, r7 - lsls r1, 24 - ldr r0, =gUnknown_08339B40 - ldr r4, =sBlenderSyncArrowsPos - lsrs r1, 23 - adds r2, r1, r4 - ldrb r6, [r2] - ldr r5, =gUnknown_083399C0 - adds r2, r1, r5 - movs r3, 0 - ldrsb r3, [r2, r3] - lsls r2, r3, 2 - adds r2, r3 - lsls r2, 1 - subs r6, r2 - adds r4, 0x1 - adds r4, r1, r4 - ldrb r2, [r4] - adds r5, 0x1 - adds r1, r5 - movs r3, 0 - ldrsb r3, [r1, r3] - lsls r1, r3, 2 - adds r1, r3 - lsls r1, 1 - subs r2, r1 - adds r1, r6, 0 - movs r3, 0x1 - bl CreateSprite - lsls r0, 24 - lsrs r1, r0, 24 - adds r2, r1, 0 - ldr r0, =0x00004523 - cmp r7, r0 - bne _08081314 - lsls r4, r1, 4 - adds r4, r1 - lsls r4, 2 - ldr r5, =gSprites - adds r0, r4, r5 - movs r1, 0x2 - bl StartSpriteAnim - adds r5, 0x1C - adds r4, r5 - ldr r0, =sub_8082F9C - str r0, [r4] - movs r0, 0x28 - bl PlaySE - b _08081358 - .pool -_08081314: - ldr r0, =0x00005432 - cmp r7, r0 - bne _0808133C - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r1, 0 - bl StartSpriteAnim - movs r0, 0x1F - bl PlaySE - b _08081358 - .pool -_0808133C: - ldr r0, =0x00002345 - cmp r8, r0 - bne _08081358 - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r1, 0x1 - bl StartSpriteAnim - movs r0, 0x20 - bl PlaySE -_08081358: - bl sub_8082E84 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8081288 - - thumb_func_start sub_8081370 -sub_8081370: @ 8081370 - push {r4-r7,lr} - lsls r0, 16 - lsrs r4, r0, 16 - adds r5, r4, 0 - bl Blender_ControlHitPitch - ldr r0, =0x00004523 - cmp r4, r0 - beq _080813A4 - cmp r4, r0 - bgt _08081398 - ldr r0, =0x00002345 - cmp r4, r0 - beq _08081474 - b _080814A0 - .pool -_08081398: - ldr r0, =0x00005432 - cmp r5, r0 - beq _0808143C - b _080814A0 - .pool -_080813A4: - ldr r7, =sBerryBlenderData - ldr r4, [r7] - adds r5, r4, 0 - adds r5, 0x4C - ldrh r6, [r5] - movs r0, 0 - ldrsh r1, [r5, r0] - ldr r0, =0x000005db - cmp r1, r0 - bgt _080813E0 - ldr r1, =gUnknown_08339CC3 - adds r0, r4, 0 - adds r0, 0x7C - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - movs r0, 0xC0 - lsls r0, 1 - bl __divsi3 - adds r0, r6, r0 - strh r0, [r5] - b _080814A0 - .pool -_080813E0: - ldr r1, =gUnknown_08339CC3 - adds r0, r4, 0 - adds r0, 0x7C - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x80 - bl __divsi3 - adds r0, r6, r0 - strh r0, [r5] - movs r1, 0x8E - lsls r1, 1 - adds r4, r1 - movs r1, 0 - ldrsh r0, [r5, r1] - movs r1, 0x64 - bl __divsi3 - adds r1, r0, 0 - subs r1, 0xA - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl sub_80832BC - ldr r0, [r7] - movs r1, 0x8F - lsls r1, 1 - adds r4, r0, r1 - adds r0, 0x4C - movs r1, 0 - ldrsh r0, [r0, r1] - movs r1, 0x64 - bl __divsi3 - adds r1, r0, 0 - subs r1, 0xA - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl sub_80832BC - b _080814A0 - .pool -_0808143C: - ldr r0, =sBerryBlenderData - ldr r2, [r0] - adds r4, r2, 0 - adds r4, 0x4C - ldrh r5, [r4] - movs r0, 0 - ldrsh r1, [r4, r0] - ldr r0, =0x000005db - cmp r1, r0 - bgt _080814A0 - ldr r1, =gUnknown_08339CC3 - adds r0, r2, 0 - adds r0, 0x7C - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x80 - lsls r0, 1 - bl __divsi3 - adds r0, r5, r0 - b _0808149E - .pool -_08081474: - ldr r0, =sBerryBlenderData - ldr r0, [r0] - adds r4, r0, 0 - adds r4, 0x4C - ldr r1, =gUnknown_08339CC3 - adds r0, 0x7C - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x80 - lsls r0, 1 - bl __divsi3 - ldrh r1, [r4] - subs r1, r0 - strh r1, [r4] - lsls r1, 16 - asrs r1, 16 - cmp r1, 0x7F - bgt _080814A0 - movs r0, 0x80 -_0808149E: - strh r0, [r4] -_080814A0: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8081370 - - thumb_func_start sub_80814B0 -sub_80814B0: @ 80814B0 - push {lr} - lsls r0, 16 - lsrs r3, r0, 16 - lsls r1, 16 - lsrs r1, 16 - lsls r2, 16 - lsrs r2, 16 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - beq _080814E4 - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - beq _080814E4 - movs r0, 0xFF - lsls r0, 8 - ands r0, r3 - cmp r0, r2 - bne _080814EC - movs r0, 0x1 - b _080814EE - .pool -_080814E4: - cmp r3, r1 - bne _080814EC - movs r0, 0x1 - b _080814EE -_080814EC: - movs r0, 0 -_080814EE: - pop {r1} - bx r1 - thumb_func_end sub_80814B0 thumb_func_start sub_80814F4 sub_80814F4: @ 80814F4 @@ -1787,9 +21,9 @@ sub_80814F4: @ 80814F4 ldrh r0, [r0] cmp r0, 0 beq _0808153C - ldr r3, =gUnknown_03003110 + ldr r3, =gSendCmd ldrh r0, [r3, 0x4] - ldr r2, =gUnknown_03003090 + ldr r2, =gRecvCmds cmp r0, 0 beq _0808151C movs r1, 0 @@ -1798,7 +32,7 @@ sub_80814F4: @ 80814F4 strh r0, [r2] strh r1, [r3, 0x4] _0808151C: - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds ldr r3, =0x00004444 adds r1, r2, 0 adds r1, 0x10 @@ -1826,7 +60,7 @@ _0808153C: blt _0808154C b _080816F6 _0808154C: - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r2, r0, 0 adds r2, 0x20 str r2, [sp] @@ -2022,7 +256,7 @@ _080816F6: cmp r7, r0 bge _08081722 movs r2, 0 - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds _08081710: strh r2, [r1] strh r2, [r1, 0x4] @@ -2123,24 +357,24 @@ _080817BA: adds r0, 0x4A ldrh r0, [r0] adds r1, r6, 0 - bl task_tutorial_oak_boy_girl + bl sub_8080624 lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 bne _08081810 - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r0, =0x00004523 b _08081828 .pool _08081810: cmp r0, 0x1 bne _08081824 - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r0, =0x00005432 b _08081828 .pool _08081824: - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r0, =0x00002345 _08081828: strh r0, [r1, 0x4] @@ -3593,7 +1827,7 @@ _0808239E: b _0808249E .pool _080823B0: - ldr r6, =gUnknown_03003110 + ldr r6, =gSendCmd adds r0, r6, 0 bl sub_8081F94 ldr r4, =sBerryBlenderData @@ -4389,7 +2623,7 @@ sub_8082AD4: @ 8082AD4 bne _08082AE0 b _08082CA4 _08082AE0: - ldr r4, =gUnknown_03003090 + ldr r4, =gRecvCmds ldrh r0, [r4] ldr r1, =0x00002fff movs r2, 0xBC @@ -4468,7 +2702,7 @@ _08082B8A: b _08082BF4 .pool _08082B9C: - ldr r6, =gUnknown_03003090 + ldr r6, =gRecvCmds lsls r4, r5, 4 adds r0, r4, r6 ldrh r0, [r0] @@ -4563,7 +2797,7 @@ _08082C4E: cmp r0, r4 beq _08082C48 _08082C6A: - ldr r4, =gUnknown_03003110 + ldr r4, =gSendCmd adds r0, r4, 0 bl sub_8081F94 bl GetLinkPlayerCount @@ -4686,7 +2920,7 @@ _08082D3C: ldrh r1, [r2] adds r0, r1 strh r0, [r2] - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd movs r4, 0x8B lsls r4, 1 adds r0, r3, r4 @@ -4701,7 +2935,7 @@ _08082D3C: b _08082DEA .pool _08082D90: - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrh r0, [r3] movs r1, 0xFF lsls r1, 8 @@ -4993,8 +3227,8 @@ _08082FD4: .pool thumb_func_end sub_8082F9C - thumb_func_start sub_8082FDC -sub_8082FDC: @ 8082FDC + thumb_func_start Blender_SetBankBerryData +Blender_SetBankBerryData: @ 8082FDC push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -5018,7 +3252,7 @@ sub_8082FDC: @ 8082FDC pop {r0} bx r0 .pool - thumb_func_end sub_8082FDC + thumb_func_end Blender_SetBankBerryData thumb_func_start sub_8083010 sub_8083010: @ 8083010 @@ -5707,7 +3941,7 @@ _08083518: movs r0, 0x5 adds r1, r4, 0 movs r3, 0x1 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, =sBerryBlenderData ldr r0, [r1] adds r2, r0, 0 @@ -5772,7 +4006,7 @@ _08083564: movs r0, 0x5 movs r2, 0x8 adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [r7] adds r0, r1, 0 adds r0, 0x9F @@ -5802,7 +4036,7 @@ _08083564: movs r0, 0x5 movs r2, 0x54 adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter movs r1, 0x10 add r9, r1 mov r2, r8 @@ -5824,7 +4058,7 @@ _0808361A: movs r0, 0x5 movs r2, 0 movs r3, 0x51 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r6, =sBerryBlenderData ldr r0, [r6] adds r4, r0, 0 @@ -5879,7 +4113,7 @@ _0808361A: str r0, [sp, 0x4] movs r0, 0x5 movs r3, 0x51 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, =sText_Time mov r2, r10 str r2, [sp] @@ -5888,7 +4122,7 @@ _0808361A: movs r0, 0x5 movs r2, 0 movs r3, 0x61 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r5, [r6] movs r1, 0x82 lsls r1, 1 @@ -5941,7 +4175,7 @@ _0808361A: str r0, [sp, 0x4] movs r0, 0x5 movs r3, 0x61 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [r6] movs r3, 0x84 lsls r3, 1 @@ -6473,7 +4707,7 @@ _08083B9A: movs r0, 0x5 adds r1, r4, 0 movs r3, 0x1 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, =gUnknown_08339B40 mov r8, r1 mov r0, r8 @@ -6604,7 +4838,7 @@ _08083C84: movs r0, 0x5 movs r2, 0 adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [r7] adds r0, r1, 0 adds r0, 0x9F @@ -6628,7 +4862,7 @@ _08083C84: movs r0, 0x5 movs r2, 0x4E adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [r7] adds r0, r1, 0 adds r0, 0x9F @@ -6649,7 +4883,7 @@ _08083C84: movs r0, 0x5 movs r2, 0x6E adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [r7] adds r0, r1, 0 adds r0, 0x9F @@ -6670,7 +4904,7 @@ _08083C84: movs r0, 0x5 movs r2, 0x8E adds r3, r6, 0 - bl sub_80840D4 + bl Blender_AddTextPrinter ldr r1, [sp, 0x8] adds r1, 0x10 str r1, [sp, 0x8] @@ -7054,8 +5288,8 @@ _080840C6: bx r1 thumb_func_end sub_8083F94 - thumb_func_start sub_80840D4 -sub_80840D4: @ 80840D4 + thumb_func_start Blender_AddTextPrinter +Blender_AddTextPrinter: @ 80840D4 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -7145,7 +5379,7 @@ _08084148: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_80840D4 + thumb_func_end Blender_AddTextPrinter thumb_func_start Blender_PrintText Blender_PrintText: @ 808417C @@ -7173,7 +5407,7 @@ _08084194: adds r1, r7, 0 movs r2, 0 movs r3, 0x1 - bl sub_80840D4 + bl Blender_AddTextPrinter movs r0, 0x4 bl PutWindowTilemap movs r0, 0x4 diff --git a/asm/link.s b/asm/link.s index 9d6adff34..92fc95102 100644 --- a/asm/link.s +++ b/asm/link.s @@ -339,7 +339,7 @@ sub_80096BC: @ 80096BC sub_80096D0: @ 80096D0 push {lr} ldr r3, =gUnknown_020229C4 - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r2, =0x0000efff adds r0, r1, 0 adds r0, 0xE @@ -685,7 +685,7 @@ sub_80099E0: @ 80099E0 _080099F4: movs r1, 0 ldr r5, =gUnknown_03003084 - ldr r3, =gUnknown_03003110 + ldr r3, =gSendCmd movs r2, 0 _080099FC: lsls r0, r1, 1 @@ -781,7 +781,7 @@ _08009AAE: movs r0, 0 strh r0, [r3] lsls r4, r6, 4 - ldr r5, =gUnknown_03003090 + ldr r5, =gRecvCmds adds r2, r4, r5 ldrh r0, [r2] mov r12, r1 @@ -901,12 +901,12 @@ _08009BC4: adds r1, r0 movs r2, 0 strh r2, [r1] - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x2 adds r0, r4, r0 ldrh r0, [r0] strh r0, [r1, 0x2] - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x4 adds r0, r4, r0 ldrh r0, [r0] @@ -930,7 +930,7 @@ _08009BF0: mov r8, r0 movs r2, 0 adds r5, r3, 0 - ldr r7, =gUnknown_03003090 + ldr r7, =gRecvCmds adds r3, r4, 0 _08009C14: ldrh r1, [r5] @@ -955,7 +955,7 @@ _08009C40: ldr r1, =gBlockRecvBuffer mov r9, r1 adds r7, r3, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds mov r8, r3 lsls r5, r6, 8 adds r3, r4, 0 @@ -1069,7 +1069,7 @@ _08009D38: b _08009D6E _08009D3E: ldr r3, =gUnknown_082ED1A8 - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x2 adds r0, r4, r0 ldrh r2, [r0] @@ -1084,7 +1084,7 @@ _08009D3E: b _08009D6E .pool _08009D64: - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x2 adds r0, r4, r0 ldrh r0, [r0] @@ -1183,26 +1183,26 @@ _08009E2C: b _08009F06 .pool _08009E38: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] ldr r1, =gLinkType ldrh r1, [r1] b _08009F04 .pool _08009E4C: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] ldr r1, =gMain ldrh r1, [r1, 0x2C] b _08009F04 .pool _08009E60: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd movs r1, 0 b _08009F02 .pool _08009E6C: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] movs r1, 0 adds r3, r0, 0 @@ -1219,7 +1219,7 @@ _08009E76: b _08009F06 .pool _08009E8C: - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd strh r2, [r1] ldr r2, =gUnknown_03000D10 ldrh r0, [r2, 0x2] @@ -1230,28 +1230,28 @@ _08009E8C: b _08009F06 .pool _08009EA8: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] ldr r1, =gSpecialVar_ItemId ldrh r1, [r1] b _08009F04 .pool _08009EBC: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] ldr r1, =gUnknown_03003150 ldrb r1, [r1] b _08009F04 .pool _08009ED0: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] ldr r1, =gUnknown_030030F4 ldrh r1, [r1] b _08009F04 .pool _08009EE4: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd strh r2, [r0] b _08009F06 .pool @@ -1264,7 +1264,7 @@ _08009EF0: ldrb r0, [r0] cmp r0, 0 bne _08009F06 - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd _08009F02: strh r2, [r0] _08009F04: @@ -1863,7 +1863,7 @@ sub_800A388: @ 800A388 push {r4-r6,lr} ldr r0, =gUnknown_03000D10 ldr r5, [r0, 0x4] - ldr r2, =gUnknown_03003110 + ldr r2, =gSendCmd ldr r1, =0x00008888 strh r1, [r2] movs r3, 0 @@ -3861,8 +3861,8 @@ HandleLinkConnection: @ 800B40C cmp r0, 0 bne _0800B45C ldr r0, =gUnknown_03003144 - ldr r1, =gUnknown_03003110 - ldr r2, =gUnknown_03003090 + ldr r1, =gSendCmd + ldr r2, =gRecvCmds bl sub_800B638 ldr r4, =gUnknown_030030E0 str r0, [r4] @@ -10247,13 +10247,13 @@ _0800E64A: adds r0, r4, 0 bl sub_800D724 strh r5, [r7] - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r2, =0x01000008 adds r0, r7, 0 bl CpuSet mov r0, r8 strh r5, [r0] - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds ldr r2, =0x01000028 bl CpuSet mov r0, r9 @@ -11278,7 +11278,7 @@ sub_800EFB0: @ 800EFB0 push {r4-r7,lr} sub sp, 0x4 movs r2, 0 - ldr r7, =gUnknown_03003090 + ldr r7, =gRecvCmds ldr r0, =gUnknown_03005000 adds r6, r7, 0 ldr r1, =0x00000c87 @@ -11323,8 +11323,8 @@ _0800EFD0: thumb_func_start sub_800F014 sub_800F014: @ 800F014 push {lr} - ldr r3, =gUnknown_03003110 - ldr r2, =gUnknown_03003090 + ldr r3, =gSendCmd + ldr r2, =gRecvCmds movs r1, 0x6 _0800F01C: ldrh r0, [r3] @@ -11334,7 +11334,7 @@ _0800F01C: subs r1, 0x1 cmp r1, 0 bge _0800F01C - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd movs r2, 0 adds r0, r1, 0 adds r0, 0xC @@ -11413,7 +11413,7 @@ _0800F0C4: .pool _0800F0CC: movs r3, 0 - ldr r4, =gUnknown_03003090 + ldr r4, =gRecvCmds _0800F0D0: movs r2, 0 lsls r0, r3, 4 @@ -11681,7 +11681,7 @@ _0800F2E0: str r2, [sp, 0x4] adds r5, 0x1 str r5, [sp] - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds mov r9, r1 adds r5, r3, 0 adds r7, r4, 0 @@ -11908,7 +11908,7 @@ sub_800F4F0: @ 800F4F0 mov r1, sp bl sub_800D934 movs r1, 0 - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds mov r12, r0 _0800F506: movs r4, 0 @@ -12012,7 +12012,7 @@ _0800F5C0: ldrb r1, [r2] strb r0, [r2] bl sub_8010528 - ldr r5, =gUnknown_03003110 + ldr r5, =gSendCmd add r4, sp, 0x48 adds r0, r5, 0 adds r1, r4, 0 @@ -12306,7 +12306,7 @@ sub_800F820: @ 800F820 cmp r0, 0 bne _0800F83C bl sub_8082D18 - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd strh r0, [r1, 0xC] _0800F83C: ldr r1, =gUnknown_020223C0 @@ -12345,7 +12345,7 @@ sub_800F86C: @ 800F86C _0800F87A: mov r1, r8 lsls r0, r1, 4 - ldr r2, =gUnknown_03003090 + ldr r2, =gRecvCmds adds r1, r0, r2 ldrh r7, [r1] movs r3, 0xFF @@ -12555,7 +12555,7 @@ _0800FA0E: adds r2, r4, 0x1 lsls r0, r2, 1 adds r0, r3 - ldr r4, =gUnknown_03003090 + ldr r4, =gRecvCmds adds r0, r4 ldrh r0, [r0] strh r0, [r1] @@ -12686,7 +12686,7 @@ _0800FB10: adds r0, r7, r2 strb r1, [r0] _0800FB48: - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x6 adds r0, r5, r0 ldrh r0, [r0] @@ -12699,7 +12699,7 @@ _0800FB78: movs r0, 0xEE lsls r0, 8 bl sub_800FD14 - ldr r1, =gUnknown_03003110 + ldr r1, =gSendCmd ldr r3, =gUnknown_03003092 adds r0, r5, r3 ldrh r0, [r0] @@ -12708,7 +12708,7 @@ _0800FB78: adds r0, r5, r4 ldrh r0, [r0] strh r0, [r1, 0x4] - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds adds r0, 0x6 adds r0, r5, r0 ldrh r0, [r0] @@ -12910,7 +12910,7 @@ sub_800FD14: @ 800FD14 push {r4,r5,lr} lsls r0, 16 lsrs r1, r0, 16 - ldr r5, =gUnknown_03003110 + ldr r5, =gSendCmd strh r1, [r5] movs r0, 0xF0 lsls r0, 7 @@ -13063,7 +13063,7 @@ _0800FE46: sub_800FE50: @ 800FE50 push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0800FE76 @@ -13097,7 +13097,7 @@ sub_800FE84: @ 800FE84 ldr r0, [r5] cmp r0, 0 bne _0800FEB8 - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0800FEB8 @@ -13182,7 +13182,7 @@ _0800FF32: thumb_func_start rfufunc_80F9F44 rfufunc_80F9F44: @ 800FF4C push {r4,r5,lr} - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0800FFA0 @@ -13207,7 +13207,7 @@ rfufunc_80F9F44: @ 800FF4C .pool _0800FF84: bl GetMultiplayerId - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds lsls r0, 24 lsrs r0, 20 adds r0, r1 @@ -13233,7 +13233,7 @@ sub_800FFB0: @ 800FFB0 ldr r0, =gUnknown_03005000 mov r12, r0 ldr r5, [r0, 0x70] - ldr r3, =gUnknown_03003110 + ldr r3, =gSendCmd mov r2, r12 adds r2, 0x6C ldrh r1, [r2] @@ -13302,7 +13302,7 @@ rfufunc_80FA020: @ 8010028 ldrb r0, [r5, 0xC] cmp r0, 0 bne _080100F0 - ldr r3, =gUnknown_03003110 + ldr r3, =gSendCmd adds r2, r5, 0 adds r2, 0x6E ldrh r0, [r2] @@ -13313,7 +13313,7 @@ rfufunc_80FA020: @ 8010028 strh r0, [r3] movs r4, 0 mov r9, r5 - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds mov r12, r0 lsls r5, r6, 4 adds r7, r2, 0 @@ -13539,7 +13539,7 @@ _08010220: thumb_func_start sub_801022C sub_801022C: @ 801022C push {r4,lr} - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0801024E @@ -13694,7 +13694,7 @@ sub_8010358: @ 8010358 ldrb r0, [r0] cmp r0, 0 bne _0801037A - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0801037A @@ -13723,7 +13723,7 @@ sub_8010390: @ 8010390 ldrb r0, [r0] cmp r0, 0 bne _0801041E - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0801041E @@ -13766,7 +13766,7 @@ _080103FA: ldrb r0, [r0] cmp r0, 0 bne _0801041E - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _0801041E @@ -14404,7 +14404,7 @@ _080108F0: b _080109D2 .pool _08010904: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 bne _080109D2 @@ -14676,7 +14676,7 @@ _08010B28: .4byte _08010C0A .4byte _08010C94 _08010B40: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 beq _08010B4A @@ -14690,7 +14690,7 @@ _08010B4A: b _08010C4A .pool _08010B60: - ldr r0, =gUnknown_03003110 + ldr r0, =gSendCmd ldrh r0, [r0] cmp r0, 0 beq _08010B6A @@ -16575,7 +16575,7 @@ sub_8011AC8: @ 8011AC8 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds ldr r2, =0x05000014 mov r0, sp bl CpuSet @@ -16968,7 +16968,7 @@ sub_8011E2C: @ 8011E2C push {r4-r6,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r6, =gUnknown_03003110 + ldr r6, =gSendCmd ldrh r0, [r6] cmp r0, 0 bne _08011E7A @@ -25082,7 +25082,7 @@ _08016894: sub_801689C: @ 801689C push {r4,r5,lr} adds r2, r0, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrh r5, [r3, 0x12] adds r4, r5, 0 cmp r4, 0 @@ -28045,7 +28045,7 @@ _08017FC6: sub_8017FD8: @ 8017FD8 push {lr} adds r2, r0, 0 - ldr r0, =gUnknown_03003090 + ldr r0, =gRecvCmds ldrh r1, [r0, 0x2] cmp r1, 0 beq _08017FFC @@ -50249,7 +50249,7 @@ sub_802339C: @ 802339C mov r10, r3 _080233C0: lsls r0, r7, 4 - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds adds r2, r0, r1 ldrh r1, [r2] movs r0, 0xFF @@ -50858,7 +50858,7 @@ sub_802385C: @ 802385C push {r4,r5,lr} adds r5, r0, 0 movs r4, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrb r0, [r5, 0x9] cmp r4, r0 bcs _08023880 @@ -59626,7 +59626,7 @@ sub_8027DD0: @ 8027DD0 sub_8027DFC: @ 8027DFC push {lr} adds r2, r0, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrh r0, [r3] movs r1, 0xFF lsls r1, 8 @@ -60082,7 +60082,7 @@ sub_8028164: @ 8028164 mov r9, r0 adds r2, r7, 0 adds r2, 0x14 - ldr r4, =gUnknown_03003090 + ldr r4, =gRecvCmds ldrh r0, [r4] movs r1, 0xFF lsls r1, 8 @@ -60295,7 +60295,7 @@ sub_8028318: @ 8028318 push {r4,lr} adds r2, r0, 0 adds r4, r1, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrh r0, [r3] movs r1, 0xFF lsls r1, 8 @@ -60347,7 +60347,7 @@ sub_8028350: @ 8028350 sub_8028374: @ 8028374 push {lr} adds r2, r0, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds ldrh r0, [r3] movs r1, 0xFF lsls r1, 8 @@ -71819,7 +71819,7 @@ sub_802E0D0: @ 802E0D0 push {r4,lr} sub sp, 0xC adds r4, r1, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds lsls r2, r0, 4 adds r0, r2, r3 ldrh r1, [r0] @@ -71946,7 +71946,7 @@ sub_802E1BC: @ 802E1BC sub sp, 0xC adds r5, r0, 0 adds r4, r1, 0 - ldr r2, =gUnknown_03003090 + ldr r2, =gRecvCmds ldrh r0, [r2] movs r1, 0xFF lsls r1, 8 @@ -72036,7 +72036,7 @@ sub_802E264: @ 802E264 adds r4, r0, 0 adds r5, r2, 0 adds r6, r3, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds lsls r2, r1, 4 adds r0, r2, r3 ldrh r1, [r0] @@ -72091,7 +72091,7 @@ sub_802E2D0: @ 802E2D0 push {r4,lr} sub sp, 0xC adds r4, r0, 0 - ldr r3, =gUnknown_03003090 + ldr r3, =gRecvCmds lsls r2, r1, 4 adds r0, r2, r3 ldrh r1, [r0] @@ -73085,7 +73085,7 @@ sub_802EAB0: @ 802EAB0 ldrb r0, [r0] cmp r0, 0 beq _0802EB14 - ldr r1, =gUnknown_03003090 + ldr r1, =gRecvCmds ldrh r0, [r1, 0x2] ldr r5, =0x00007fff cmp r0, r5 diff --git a/include/link.h b/include/link.h index 7a6563144..b3f7c8d60 100644 --- a/include/link.h +++ b/include/link.h @@ -2,6 +2,7 @@ #define GUARD_LINK_H #define MAX_LINK_PLAYERS 4 +#define MAX_RFU_PLAYERS 5 #define CMD_LENGTH 8 #define QUEUE_CAPACITY 50 #define BLOCK_BUFFER_SIZE 0x100 @@ -131,7 +132,7 @@ struct BlockRequest extern const struct BlockRequest sBlockRequestLookupTable[5]; extern struct Link gLink; -extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS]; +extern u16 gRecvCmds[MAX_RFU_PLAYERS][CMD_LENGTH]; extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE]; extern u16 gLinkType; extern u32 gLinkStatus; diff --git a/src/berry_blender.c b/src/berry_blender.c index f626fef91..21706d4dc 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -20,6 +20,8 @@ #include "berry.h" #include "items.h" #include "string_util.h" +#include "international_string_util.h" +#include "rng.h" // Static type declarations #define BLENDER_SCORE_BEST 0 @@ -111,12 +113,10 @@ struct BerryBlenderData u8 field_41; u8 field_42; u8 field_43; - u8 field_44; - u8 field_45; + u16 field_44; u8 field_46; u8 field_47; - u8 field_48; - u8 field_49; + u16 field_48; u16 arrowPos; s16 field_4C; s16 field_4E; @@ -165,23 +165,8 @@ struct BerryBlenderData u8 field_8B; u8 field_8C; u8 field_8D; - u8 field_8E; - u8 field_8F; - - u8 field_90; - u8 field_91; - u8 field_92; - u8 field_93; - u8 field_94; - u8 field_95; - u8 field_96; - u8 field_97; - u8 field_98; - u8 field_99; - u8 field_9A; - u8 field_9B; - u8 field_9C; - u8 field_9D; + u16 field_8E[BLENDER_MAX_PLAYERS]; + u16 field_96[BLENDER_MAX_PLAYERS]; u8 field_9E; u8 field_9F; @@ -307,9 +292,7 @@ struct BerryBlenderData s16 field_11C; s16 field_11E; - u8 field_120; - u8 field_121; - u8 field_122; + u8 field_120[3]; u8 field_123; u16 scores[BLENDER_MAX_PLAYERS][BLENDER_SCORES_NO]; u8 field_13C; @@ -388,16 +371,19 @@ extern void sub_8197DF8(u8 windowId, bool8 copyToVram); extern void sub_809882C(u8, u16, u8); extern void copy_textbox_border_tile_patterns_to_vram(u8, u16, u8); extern void sub_81AABF0(void (*callback)(void)); +extern void sub_800B4C0(void); // this file's functions void BerryBlender_SetGpuRegs(void); void sub_8080EA4(u8 taskId); void sub_8080FD0(u8 taskId); void sub_80810F8(u8 taskId); +void sub_8081224(u8 taskId); void sub_80833F8(struct Sprite *sprite); void sub_8082F68(struct Sprite *sprite); void sub_8083010(struct Sprite *sprite); void sub_80830C0(struct Sprite *sprite); +void sub_8082F9C(struct Sprite *sprite); void Blender_SetPlayerNamesLocal(u8 opponentsNum); void sub_807FAC8(void); void sub_8082D28(void); @@ -410,8 +396,13 @@ void sub_8081898(void); void sub_8082CB4(struct BgAffineSrcData *bgAffineSrc); bool8 sub_8083380(void); void sub_808074C(void); -void sub_80807BC(void); +void Blender_PrintPlayerNames(void); void sub_8080588(void); +void Blender_SetBankBerryData(u8 bank, u16 itemId); +void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 width, s8 x, s8 y, s32 state); +void sub_8080DF8(void); +void sub_8082E84(void); +void sub_80832BC(s16* a0, u16 a1); extern struct BerryBlenderData *sBerryBlenderData; @@ -972,12 +963,12 @@ const s16 gUnknown_08339C78[][5] = {250, 140, 10, -2, -1}, }; -const u8 gUnknown_08339CA0[][3] = +static const u8 sOpponentBerrySets[][3] = { {4, 3, 2}, {0, 4, 3}, {1, 0, 4}, {2, 1, 0}, {3, 2, 1}, {0, 2, 3}, {1, 3, 4}, {2, 4, 0}, {3, 0, 1}, {4, 1, 2}, }; -const u8 gUnknown_08339CBE[] = {30, 31, 32, 33, 34}; +static const u8 sSpecialOpponentBerrySets[] = {30, 31, 32, 33, 34}; const u8 gUnknown_08339CC3[] = {1, 1, 2, 3, 4}; @@ -1471,7 +1462,7 @@ void sub_8080018(void) sBerryBlenderData->framesToWait = 0; PlaySE(SE_TRACK_DOOR); sub_808074C(); - sub_80807BC(); + Blender_PrintPlayerNames(); } sub_8082CB4(&sBerryBlenderData->bgAffineSrc); break; @@ -1520,3 +1511,642 @@ void sub_8080018(void) RunTextPrinters(); UpdatePaletteFade(); } + +void sub_8080588(void) +{ + SetGpuReg(REG_OFFSET_DISPCNT, 0); + + ResetSpriteData(); + FreeAllSpritePalettes(); + ResetTasks(); + + SetVBlankCallback(VBlankCB0_BerryBlender); + + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(1, sBerryBlenderBgTemplates, ARRAY_COUNT(sBerryBlenderBgTemplates)); + + SetBgTilemapBuffer(1, sBerryBlenderData->tilemapBuffers[0]); + SetBgTilemapBuffer(2, sBerryBlenderData->tilemapBuffers[1]); + + sub_809882C(0, 1, 0xD0); + copy_textbox_border_tile_patterns_to_vram(0, 0x14, 0xF0); + InitBerryBlenderWindows(); + + sBerryBlenderData->field_44 = 0; + sBerryBlenderData->field_4C = 0; + sBerryBlenderData->arrowPos = 0; + sBerryBlenderData->field_4E = 0; + sBerryBlenderData->field_11C = 0; + sBerryBlenderData->field_11E = 0; +} + +u8 sub_8080624(u16 arrowPos, u8 playerId) +{ + u32 var1 = (arrowPos / 256) + 24; + u8 arrID = sBerryBlenderData->field_96[playerId]; + u32 var2 = gUnknown_083399E7[arrID]; + + if (var1 >= var2 && var1 < var2 + 48) + { + if (var1 >= var2 + 20 && var1 < var2 + 28) + return 2; + else + return 1; + } + + return 0; +} + +void Blender_SetOpponentsBerryData(u16 playerBerryItemId, u8 playersNum, struct BlenderBerry* playerBerry) +{ + u16 opponentSetId = 0; + u16 opponentBerryId; + u16 var; + u16 i; + + if (playerBerryItemId == ITEM_ENIGMA_BERRY) + { + for (i = 0; i < FLAVOUR_COUNT; i++) + { + if (playerBerry->flavours[opponentSetId] > playerBerry->flavours[i]) + opponentSetId = i; + } + opponentSetId += 5; + } + else + { + opponentSetId = playerBerryItemId - FIRST_BERRY_INDEX; + if (opponentSetId >= 5) + opponentSetId = (opponentSetId % 5) + 5; + } + for (i = 0; i < playersNum - 1; i++) + { + opponentBerryId = sOpponentBerrySets[opponentSetId][i]; + var = playerBerryItemId - 163; + if (!FlagGet(0x340) && gSpecialVar_0x8004 == 1) + { + opponentSetId %= 5; + opponentBerryId = sSpecialOpponentBerrySets[opponentSetId]; + if (var <= 4) + opponentBerryId -= 5; + } + Blender_SetBankBerryData(i + 1, opponentBerryId + FIRST_BERRY_INDEX); + } +} + +void sub_808074C(void) +{ + s32 i, j; + + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + sBerryBlenderData->field_96[i] = 0xFF; + sBerryBlenderData->field_8E[i] = gUnknown_083399D0[sBerryBlenderData->playersNo - 2][i]; + } + for (j = 0; j < BLENDER_MAX_PLAYERS; j++) + { + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + if (sBerryBlenderData->field_8E[i] == j) + sBerryBlenderData->field_96[j] = i; + } + } +} + +void Blender_PrintPlayerNames(void) +{ + s32 i, width; + u32 multiplayerId = 0; + u8 text[20]; + + if (gReceivedRemoteLinkPlayers) + multiplayerId = GetMultiplayerId(); + + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + if (sBerryBlenderData->field_8E[i] != 0xFF) + { + sBerryBlenderData->syncArrowSpriteIds[sBerryBlenderData->field_8E[i]] = sBerryBlenderData->syncArrowSprite2Ids[i]; + StartSpriteAnim(&gSprites[sBerryBlenderData->syncArrowSpriteIds[sBerryBlenderData->field_8E[i]]], i); + + text[0] = EOS; + StringCopy(text, gLinkPlayers[sBerryBlenderData->field_8E[i]].name); + width = GetStringCenterAlignXOffset(1, text, 0x38); + + if (multiplayerId == sBerryBlenderData->field_8E[i]) + Blender_AddTextPrinter(i, text, width, 1, 0, 2); + else + Blender_AddTextPrinter(i, text, width, 1, 0, 1); + + PutWindowTilemap(i); + CopyWindowToVram(i, 3); + } + } +} + +void sub_80808D4(void) +{ + s32 i, j; + + switch (sBerryBlenderData->mainState) + { + case 0: + sub_800B4C0(); + sub_8080588(); + Blender_SetBankBerryData(0, gSpecialVar_ItemId); + Blender_CopyBerryData(&sBerryBlenderData->blendedBerries[0], gSpecialVar_ItemId); + Blender_SetOpponentsBerryData(gSpecialVar_ItemId, sBerryBlenderData->playersNo, &sBerryBlenderData->blendedBerries[0]); + + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + sBerryBlenderData->field_64[i] = 0; + for (j = 0; j < 3; j++) + { + sBerryBlenderData->scores[i][j] = 0; + } + } + + sBerryBlenderData->field_70 = 0; + sBerryBlenderData->loadGfxState = 0; + gLinkType = 0x4422; + sBerryBlenderData->mainState++; + break; + case 1: + if (LoadBerryBlenderGfx()) + { + sBerryBlenderData->mainState++; + sub_8082D28(); + } + break; + case 2: + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + sBerryBlenderData->syncArrowSprite2Ids[i] = CreateSprite(&sBlenderSyncArrow_SpriteTemplate, sBlenderSyncArrowsPos[i][0], sBlenderSyncArrowsPos[i][1], 1); + StartSpriteAnim(&gSprites[sBerryBlenderData->syncArrowSprite2Ids[i]], i + 8); + } + sBerryBlenderData->mainState++; + break; + case 3: + BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); + sBerryBlenderData->mainState++; + sBerryBlenderData->framesToWait = 0; + break; + case 4: + if (++sBerryBlenderData->framesToWait == 2) + sub_807F9D0(); + if (!gPaletteFade.active) + sBerryBlenderData->mainState = 8; + break; + case 8: + sBerryBlenderData->mainState = 11; + sBerryBlenderData->field_114 = 0; + break; + case 11: + for (i = 0; i < BLENDER_MAX_PLAYERS; i++) + { + u32 var = gUnknown_083399D0[sBerryBlenderData->playersNo - 2][i]; + if (sBerryBlenderData->field_114 == var) + { + sub_807FD90(sBerryBlenderData->chosenItemId[sBerryBlenderData->field_114], i); + break; + } + } + sBerryBlenderData->framesToWait = 0; + sBerryBlenderData->mainState++; + sBerryBlenderData->field_114++; + break; + case 12: + if (++sBerryBlenderData->framesToWait > 60) + { + if (sBerryBlenderData->field_114 >= sBerryBlenderData->playersNo) + { + sBerryBlenderData->arrowPos = gUnknown_083399DC[gUnknown_083399E4[sBerryBlenderData->playersNo - 2]] - 22528; + sBerryBlenderData->mainState++; + } + else + { + sBerryBlenderData->mainState--; + } + sBerryBlenderData->framesToWait = 0; + } + break; + case 13: + sBerryBlenderData->mainState++; + sub_808074C(); + PlaySE(SE_RU_HYUU); + sub_8082CB4(&sBerryBlenderData->bgAffineSrc); + ShowBg(2); + break; + case 14: + SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON); + sBerryBlenderData->arrowPos += 0x200; + sBerryBlenderData->field_11A += 4; + if (sBerryBlenderData->field_11A > 255) + { + sBerryBlenderData->mainState++; + sBerryBlenderData->field_11A = 256; + sBerryBlenderData->arrowPos = gUnknown_083399DC[gUnknown_083399E4[sBerryBlenderData->playersNo - 2]]; + SetGpuRegBits(REG_OFFSET_BG2CNT, 2); + sBerryBlenderData->framesToWait = 0; + PlaySE(SE_TRACK_DOOR); + Blender_PrintPlayerNames(); + } + sub_8082CB4(&sBerryBlenderData->bgAffineSrc); + break; + case 15: + if (sub_8083380()) + { + sBerryBlenderData->mainState++; + } + sub_8082CB4(&sBerryBlenderData->bgAffineSrc); + break; + case 16: + CreateSprite(&gUnknown_08339C2C, 120, -16, 3); + sBerryBlenderData->mainState++; + break; + case 18: + sBerryBlenderData->mainState++; + break; + case 19: + sBerryBlenderData->mainState++; + break; + case 20: + sBerryBlenderData->mainState++; + break; + case 21: + sub_8080DF8(); + sBerryBlenderData->field_4C = 128; + sBerryBlenderData->gameFrameTime = 0; + sBerryBlenderData->field_123 = 0; + sBerryBlenderData->field_72 = 0; + SetMainCallback2(sub_8081898); + + if (gSpecialVar_0x8004 == 1) + { + if (!FlagGet(FLAG_340)) + sBerryBlenderData->field_120[0] = CreateTask(sub_8081224, 10); + else + sBerryBlenderData->field_120[0] = CreateTask(gUnknown_083399EC[0], 10); + } + + if (gSpecialVar_0x8004 > 1) + { + for (i = 0; i < gSpecialVar_0x8004; i++) + sBerryBlenderData->field_120[i] = CreateTask(gUnknown_083399EC[i], 10 + i); + } + + if (GetCurrentMapMusic() != BGM_CYCLING) + sBerryBlenderData->field_154 = GetCurrentMapMusic(); + + PlayBGM(BGM_CYCLING); + PlaySE(SE_MOTER); + Blender_ControlHitPitch(); + break; + } + + Blender_DummiedOutFunc(sBerryBlenderData->field_11C, sBerryBlenderData->field_11E); + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + RunTextPrinters(); + UpdatePaletteFade(); +} + +void sub_8080DF8(void) +{ + s32 i; + for (i = 0; i < 4; i++) + { + gSendCmd[0] = 0; + gSendCmd[2] = 0; + gRecvCmds[i][0] = 0; + gRecvCmds[i][2] = 0; + } +} + +void sub_8080E20(u8 taskId) +{ + if(++gTasks[taskId].data[0] > gTasks[taskId].data[1]) + { + gRecvCmds[gTasks[taskId].data[2]][2] = 0x2345; + DestroyTask(taskId); + } +} + +void sub_8080E6C(u8 a0, u8 a1) +{ + u8 taskId = CreateTask(sub_8080E20, 80); + gTasks[taskId].data[1] = a1; + gTasks[taskId].data[2] = a0; +} + +void sub_8080EA4(u8 taskId) +{ + if (sub_8080624(sBerryBlenderData->arrowPos, 1) == 2) + { + if (gTasks[taskId].data[0] == 0) + { + if (sBerryBlenderData->field_123 == 0) + { + u8 rand = Random() / 655; + if (sBerryBlenderData->field_4C < 500) + { + if (rand > 75) + gRecvCmds[1][2] = 0x4523; + else + gRecvCmds[1][2] = 0x5432; + + gRecvCmds[1][2] = 0x5432; + } + else if (sBerryBlenderData->field_4C < 1500) + { + if (rand > 80) + { + gRecvCmds[1][2] = 0x4523; + } + else + { + u8 value = rand - 21; + if (value < 60) + gRecvCmds[1][2] = 0x5432; + else if (rand < 10) + sub_8080E6C(1, 5); + } + } + else if (rand <= 90) + { + u8 value = rand - 71; + if (value < 20) + gRecvCmds[1][2] = 0x5432; + else if (rand < 30) + sub_8080E6C(1, 5); + } + else + { + gRecvCmds[1][2] = 0x4523; + } + } + else + { + gRecvCmds[1][2] = 0x4523; + } + + gTasks[taskId].data[0] = 1; + } + } + else + { + gTasks[taskId].data[0] = 0; + } +} + +void sub_8080FD0(u8 taskId) +{ + u32 var1 = (sBerryBlenderData->arrowPos + 0x1800) & 0xFFFF; + u32 var2 = sBerryBlenderData->field_96[2] & 0xFF; + if ((var1 >> 8) > gUnknown_083399E7[var2] + 20 && (var1 >> 8) < gUnknown_083399E7[var2] + 40) + { + if (gTasks[taskId].data[0] == 0) + { + if (sBerryBlenderData->field_123 == 0) + { + u8 rand = Random() / 655; + if (sBerryBlenderData->field_4C < 500) + { + if (rand > 66) + gRecvCmds[2][2] = 0x4523; + else + gRecvCmds[2][2] = 0x5432; + } + else + { + u8 value; + if (rand > 65) + gRecvCmds[2][2] = 0x4523; + value = rand - 41; + if (value < 25) + gRecvCmds[2][2] = 0x5432; + if (rand < 10) + sub_8080E6C(2, 5); + } + + gTasks[taskId].data[0] = 1; + } + else + { + gRecvCmds[2][2] = 0x4523; + gTasks[taskId].data[0] = 1; + } + } + } + else + { + gTasks[taskId].data[0] = 0; + } +} + +void sub_80810F8(u8 taskId) +{ + u32 var1, var2; + + var1 = (sBerryBlenderData->arrowPos + 0x1800) & 0xFFFF; + var2 = sBerryBlenderData->field_96[3] & 0xFF; + if ((var1 >> 8) > gUnknown_083399E7[var2] + 20 && (var1 >> 8) < gUnknown_083399E7[var2] + 40) + { + if (gTasks[taskId].data[0] == 0) + { + if (sBerryBlenderData->field_123 == 0) + { + u8 rand = (Random() / 655); + if (sBerryBlenderData->field_4C < 500) + { + if (rand > 88) + gRecvCmds[3][2] = 0x4523; + else + gRecvCmds[3][2] = 0x5432; + } + else + { + if (rand > 60) + { + gRecvCmds[3][2] = 0x4523; + } + else + { + s8 value = rand - 56; // makes me wonder what the original code was + u8 value2 = value; + if (value2 < 5) + gRecvCmds[3][2] = 0x5432; + } + if (rand < 5) + sub_8080E6C(3, 5); + } + gTasks[taskId].data[0] = 1; + } + else + { + gRecvCmds[3][2] = 0x4523; + gTasks[taskId].data[0] = 1; + } + } + } + else + { + gTasks[taskId].data[0] = 0; + } +} + +void sub_8081224(u8 taskId) +{ + if (sub_8080624(sBerryBlenderData->arrowPos, 1) == 2) + { + if (gTasks[taskId].data[0] == 0) + { + gRecvCmds[1][2] = 0x4523; + gTasks[taskId].data[0] = 1; + } + } + else + { + gTasks[taskId].data[0] = 0; + } +} + +void sub_8081288(u16 a0, u8 a1) +{ + u8 spriteId; + + spriteId = CreateSprite(&gUnknown_08339B40, + sBlenderSyncArrowsPos[a1][0] - (10 * gUnknown_083399C0[a1][0]), + sBlenderSyncArrowsPos[a1][1] - (10 * gUnknown_083399C0[a1][1]), + 1); + if (a0 == 0x4523) + { + StartSpriteAnim(&gSprites[spriteId], 2); + gSprites[spriteId].callback = sub_8082F9C; + PlaySE(SE_RU_GASHIN); + } + else if (a0 == 0x5432) + { + StartSpriteAnim(&gSprites[spriteId], 0); + PlaySE(SE_SEIKAI); + } + else if (a0 == 0x2345) + { + StartSpriteAnim(&gSprites[spriteId], 1); + PlaySE(SE_HAZURE); + } + sub_8082E84(); +} + +void sub_8081370(u16 a0) +{ + Blender_ControlHitPitch(); + switch (a0) + { + case 0x4523: + if (sBerryBlenderData->field_4C < 1500) + sBerryBlenderData->field_4C += (384 / gUnknown_08339CC3[sBerryBlenderData->playersNo]); + else + { + sBerryBlenderData->field_4C += (128 / gUnknown_08339CC3[sBerryBlenderData->playersNo]); + sub_80832BC(&sBerryBlenderData->field_11C, (sBerryBlenderData->field_4C / 100) - 10); + sub_80832BC(&sBerryBlenderData->field_11E, (sBerryBlenderData->field_4C / 100) - 10); + } + break; + case 0x5432: + if (sBerryBlenderData->field_4C < 1500) + sBerryBlenderData->field_4C += (256 / gUnknown_08339CC3[sBerryBlenderData->playersNo]); + break; + case 0x2345: + sBerryBlenderData->field_4C -= (256 / gUnknown_08339CC3[sBerryBlenderData->playersNo]); + if (sBerryBlenderData->field_4C < 128) + sBerryBlenderData->field_4C = 128; + break; + } +} + +bool32 sub_80814B0(u16 arg0, u16 arg1, u16 arg2) +{ + if (gReceivedRemoteLinkPlayers != 0 && gLinkVSyncDisabled) + { + if ((arg0 & 0xFF00) == arg2) + return TRUE; + } + else + { + if (arg0 == arg1) + return TRUE; + } + + return FALSE; +} + +/* +void sub_80814B0(void) +{ + s32 i; + + if (gSpecialVar_0x8004 != 0) + { + if (gSendCmd[2] != 0) + { + gRecvCmds[2][0] = gSendCmd[2]; + gRecvCmds[0][0] = 0x4444; + gSendCmd[2] = 0; + } + for (i = 1; i < 4; i++) + { + if (gRecvCmds[2][i] != 0) + gRecvCmds[0][i] = 0x4444; + } + } + for (i = 0; i < gBerryBlenderData->playersNo; i++) + { + if (gRecvCmds[0][i] == 0x4444) + { + u32 var = gBerryBlenderData->field_A2[i]; + if (gRecvCmds[2][i] == 0x4523) + { + sub_804FD30(0x4523); + gBerryBlenderData->field_13E += (gBerryBlenderData->field_56 / 55); + if (gBerryBlenderData->field_13E >= 1000) + gBerryBlenderData->field_13E = 1000; + sub_804FC48(0x4523, var); + gBerryBlenderData->scores[i][BLENDER_SCORE_BEST]++; + } + else if (gRecvCmds[2][i] == 0x5432) + { + sub_804FD30(0x5432); + gBerryBlenderData->field_13E += (gBerryBlenderData->field_56 / 70); + sub_804FC48(0x5432, var); + gBerryBlenderData->scores[i][BLENDER_SCORE_GOOD]++; + } + else if (gRecvCmds[2][i] == 0x2345) + { + sub_804FC48(0x2345, var); + sub_804FD30(0x2345); + if (gBerryBlenderData->field_4.win_field_F > 1000) + gBerryBlenderData->field_13E = 1000; + if (gBerryBlenderData->scores[i][BLENDER_SCORE_MISS] < 999) + gBerryBlenderData->scores[i][BLENDER_SCORE_MISS]++; + } + if (gRecvCmds[2][i] == 0x2345 || gRecvCmds[2][i] == 0x4523 || gRecvCmds[2][i] == 0x5432) + { + if (gBerryBlenderData->field_56 > 1500) + m4aMPlayTempoControl(&gMPlay_BGM, ((gBerryBlenderData->field_56 - 750) / 20) + 256); + else + m4aMPlayTempoControl(&gMPlay_BGM, 256); + } + } + } + if (gSpecialVar_0x8004 != 0) + { + for (i = 0; i < gBerryBlenderData->playersNo; i++) + { + gRecvCmds[0][i] = 0; + gRecvCmds[2][i] = 0; + } + } +}*/ + diff --git a/sym_common.txt b/sym_common.txt index 82248165d..93b8431f4 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -75,7 +75,7 @@ gUnknown_0300307C: @ 300307C gUnknown_03003084: @ 3003084 .space 0xC -gUnknown_03003090: @ 3003090 +gRecvCmds: @ 3003090 .space 0x2 gUnknown_03003092: @ 3003092 @@ -111,7 +111,7 @@ gLinkVSyncDisabled: @ 30030FC gUnknown_03003100: @ 3003100 .space 0x10 -gUnknown_03003110: @ 3003110 +gSendCmd: @ 3003110 .space 0x10 gUnknown_03003120: @ 3003120