extracted gItemMenuTable

This commit is contained in:
Henny022p 2021-10-24 16:29:35 +02:00
parent e65b27be08
commit fd131b8694
5 changed files with 180 additions and 164 deletions

View File

@ -3196,7 +3196,7 @@ sub_080A529C: @ 0x080A529C
str r0, [r1, #0xc] str r0, [r1, #0xc]
ldrb r4, [r1, #3] ldrb r4, [r1, #3]
lsls r1, r4, #3 lsls r1, r4, #3
ldr r0, _080A52D8 @ =gUnk_08128B64 ldr r0, _080A52D8 @ =gItemMenuTable
adds r1, r1, r0 adds r1, r1, r0
ldr r0, _080A52DC @ =gInput ldr r0, _080A52DC @ =gInput
ldrh r2, [r0, #2] ldrh r2, [r0, #2]
@ -3214,7 +3214,7 @@ sub_080A529C: @ 0x080A529C
.align 2, 0 .align 2, 0
_080A52D0: .4byte gMenu _080A52D0: .4byte gMenu
_080A52D4: .4byte gUnk_08128BF4 _080A52D4: .4byte gUnk_08128BF4
_080A52D8: .4byte gUnk_08128B64 _080A52D8: .4byte gItemMenuTable
_080A52DC: .4byte gInput _080A52DC: .4byte gInput
_080A52E0: _080A52E0:
cmp r4, #0x10 cmp r4, #0x10
@ -3347,7 +3347,7 @@ _080A4BC8:
ldrb r0, [r2] ldrb r0, [r2]
cmp r0, #0 cmp r0, #0
beq _080A4C68 beq _080A4C68
ldr r0, _080A4C20 @ =gUnk_08128B64 ldr r0, _080A4C20 @ =gItemMenuTable
adds r1, r6, r0 adds r1, r6, r0
ldrb r0, [r1, #6] ldrb r0, [r1, #6]
ldr r3, _080A4C14EU @ =gOamCmd ldr r3, _080A4C14EU @ =gOamCmd
@ -3384,7 +3384,7 @@ _080A4BF4:
_080A4C14EU: .4byte gOamCmd _080A4C14EU: .4byte gOamCmd
_080A4C18: .4byte gSave _080A4C18: .4byte gSave
_080A4C1C: .4byte gChooseFileState _080A4C1C: .4byte gChooseFileState
_080A4C20: .4byte gUnk_08128B64 _080A4C20: .4byte gItemMenuTable
_080A4C24: .4byte gBombBagSizes _080A4C24: .4byte gBombBagSizes
_080A4C28: _080A4C28:
cmp r3, #0xa cmp r3, #0xa
@ -3442,7 +3442,7 @@ _080A4C68:
movs r1, #0x11 movs r1, #0x11
_080A4C8E: _080A4C8E:
lsls r0, r1, #3 lsls r0, r1, #3
ldr r1, _080A4D54EU @ =gUnk_08128B64 ldr r1, _080A4D54EU @ =gItemMenuTable
mov r8, r1 mov r8, r1
adds r1, r0, r1 adds r1, r0, r1
mov r4, sb mov r4, sb
@ -3534,7 +3534,7 @@ _080A4D44: .4byte gOamCmd
_080A4D48: .4byte gUnk_080FDFD8 _080A4D48: .4byte gUnk_080FDFD8
_080A4D4C: .4byte 0x00000141 _080A4D4C: .4byte 0x00000141
_080A4D50EU: .4byte gChooseFileState _080A4D50EU: .4byte gChooseFileState
_080A4D54EU: .4byte gUnk_08128B64 _080A4D54EU: .4byte gItemMenuTable
_080A4D58: .4byte gMain _080A4D58: .4byte gMain
_080A4D5C: .4byte gSave _080A4D5C: .4byte gSave
.else .else
@ -3569,7 +3569,7 @@ _080A53B4:
ldrb r0, [r2] ldrb r0, [r2]
cmp r0, #0 cmp r0, #0
beq _080A5456 beq _080A5456
ldr r0, _080A540C @ =gUnk_08128B64 ldr r0, _080A540C @ =gItemMenuTable
adds r1, r6, r0 adds r1, r6, r0
ldrb r0, [r1, #6] ldrb r0, [r1, #6]
ldr r3, _080A5400 @ =gOamCmd ldr r3, _080A5400 @ =gOamCmd
@ -3606,7 +3606,7 @@ _080A53E0:
_080A5400: .4byte gOamCmd _080A5400: .4byte gOamCmd
_080A5404: .4byte gSave _080A5404: .4byte gSave
_080A5408: .4byte gMenu _080A5408: .4byte gMenu
_080A540C: .4byte gUnk_08128B64 _080A540C: .4byte gItemMenuTable
_080A5410: .4byte gBombBagSizes _080A5410: .4byte gBombBagSizes
_080A5414: _080A5414:
cmp r3, #0xa cmp r3, #0xa
@ -3665,7 +3665,7 @@ _080A5456:
movs r1, #0x11 movs r1, #0x11
_080A547C: _080A547C:
lsls r0, r1, #3 lsls r0, r1, #3
ldr r1, _080A553C @ =gUnk_08128B64 ldr r1, _080A553C @ =gItemMenuTable
mov r8, r1 mov r8, r1
adds r1, r0, r1 adds r1, r0, r1
mov r4, sb mov r4, sb
@ -3755,7 +3755,7 @@ _080A552C: .4byte gQuiverSizes
_080A5530: .4byte gOamCmd _080A5530: .4byte gOamCmd
_080A5534: .4byte gUnk_080FDFD8 _080A5534: .4byte gUnk_080FDFD8
_080A5538: .4byte gMenu _080A5538: .4byte gMenu
_080A553C: .4byte gUnk_08128B64 _080A553C: .4byte gItemMenuTable
_080A5540: .4byte gMain _080A5540: .4byte gMain
_080A5544: .4byte 0x000001FB _080A5544: .4byte 0x000001FB
_080A5548: .4byte gSave _080A5548: .4byte gSave

View File

@ -733,157 +733,3 @@ gUnk_08128B48:: @ 08128B48
gUnk_08128B50:: @ 08128B50 gUnk_08128B50:: @ 08128B50
.incbin "baserom.gba", 0x128B50, 0x0000014 .incbin "baserom.gba", 0x128B50, 0x0000014
gUnk_08128B64:: @ 08128B64
.incbin "baserom.gba", 0x128B64, 0x0000090
gUnk_08128BF4:: @ 08128BF4
.incbin "baserom.gba", 0x128BF4, 0x0000004
gUnk_08128BF8:: @ 08128BF8
.4byte sub_080A5594
.4byte sub_080A56A0
gUnk_08128C00:: @ 08128C00
.incbin "baserom.gba", 0x128C00, 0x0000004
gUnk_08128C04:: @ 08128C04
.incbin "baserom.gba", 0x128C04, 0x0000010
gUnk_08128C14:: @ 08128C14
.incbin "baserom.gba", 0x128C14, 0x0000080
gUnk_08128C94:: @ 08128C94
.incbin "baserom.gba", 0x128C94, 0x0000080
gUnk_08128D14:: @ 08128D14
.4byte sub_080A59AC
.4byte sub_080A59C8
.4byte sub_080A5A54
.4byte sub_080A5A90
gUnk_08128D24:: @ 08128D24
.4byte sub_080A5AF4
.4byte sub_080A5B34
.4byte sub_080A5BB8
gUnk_08128D30:: @ 08128D30
.4byte sub_080A5C44
.4byte sub_080A5C9C
gUnk_08128D38:: @ 08128D38
.incbin "baserom.gba", 0x128D38, 0x0000004
gUnk_08128D3C:: @ 08128D3C
.incbin "baserom.gba", 0x128D3C, 0x0000007
gUnk_08128D43:: @ 08128D43
.incbin "baserom.gba", 0x128D43, 0x000000E
gUnk_08128D51:: @ 08128D51
.incbin "baserom.gba", 0x128D51, 0x0000007
gUnk_08128D58:: @ 08128D58
.4byte sub_080A6024
.4byte sub_080A6044
gUnk_08128D60:: @ 08128D60
.incbin "baserom.gba", 0x128D60, 0x0000010
gUnk_08128D70:: @ 08128D70
.incbin "baserom.gba", 0x128D70, 0x0000040
gUnk_08128DB0:: @ 08128DB0
.4byte sub_080A6108
.4byte sub_080A612C
gUnk_08128DB8:: @ 08128DB8
.incbin "baserom.gba", 0x128DB8, 0x0000004
gUnk_08128DBC:: @ 08128DBC
.incbin "baserom.gba", 0x128DBC, 0x0000010
gUnk_08128DCC:: @ 08128DCC
.4byte sub_080A6290
.4byte sub_080A62E0
gUnk_08128DD4:: @ 08128DD4
.incbin "baserom.gba", 0x128DD4, 0x0000004
gUnk_08128DD8:: @ 08128DD8
.incbin "baserom.gba", 0x128DD8, 0x0000010
gUnk_08128DE8:: @ 08128DE8
.incbin "baserom.gba", 0x128DE8, 0x0000088
gUnk_08128E70:: @ 08128E70
.4byte sub_080A6534
.4byte sub_080A65AC
gUnk_08128E78:: @ 08128E78
.4byte sub_080A6650
.4byte sub_080A667C
gUnk_08128E80:: @ 08128E80
.incbin "baserom.gba", 0x128E80, 0x0000004
gUnk_08128E84:: @ 08128E84
.incbin "baserom.gba", 0x128E84, 0x0000010
gUnk_08128E94:: @ 08128E94
.incbin "baserom.gba", 0x128E94, 0x0000088
gUnk_08128F1C:: @ 08128F1C
.4byte sub_080A6B04
.4byte sub_080A6C1C
gUnk_08128F24:: @ 08128F24
.4byte sub_080A6CA8
.4byte sub_080A6CD8
.4byte sub_080A6DD0
.4byte sub_080A6DF8
.4byte sub_080A6E44
gUnk_08128F38:: @ 08128F38
.incbin "baserom.gba", 0x128F38, 0x0000014
gUnk_08128F4C:: @ 08128F4C
.incbin "baserom.gba", 0x128F4C, 0x000000C
gUnk_08128F58:: @ 08128F58
.incbin "baserom.gba", 0x128F58, 0x0000050
gUnk_08128FA8:: @ 08128FA8
.incbin "baserom.gba", 0x128FA8, 0x0000018
gUnk_08128FC0:: @ 08128FC0
.incbin "baserom.gba", 0x128FC0, 0x0000018
gUnk_08128FD8:: @ 08128FD8
.incbin "baserom.gba", 0x128FD8, 0x0000018
gUnk_08128FF0:: @ 08128FF0
.incbin "baserom.gba", 0x128FF0, 0x0000014
gUnk_08129004:: @ 08129004
.incbin "baserom.gba", 0x129004, 0x0000018
gUnk_0812901C:: @ 0812901C
.4byte sub_080A7250
.4byte sub_080A7328
.4byte sub_080A7528
.4byte sub_080A73A8
.4byte sub_080A74C8
gUnk_08129030:: @ 08129030
.4byte sub_080A71DC
.4byte sub_080A4EA0
.4byte sub_080A71DC
.4byte sub_080A64FC
.4byte DrawKinstoneMenu
.4byte sub_08051E68
.4byte sub_0804AB54
.4byte sub_080A45A4
.4byte sub_08054870
.4byte sub_080A6C74
.4byte sub_080A6AB8

156
data/data_08128BF4.s Normal file
View File

@ -0,0 +1,156 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08128BF4:: @ 08128BF4
.incbin "baserom.gba", 0x128BF4, 0x0000004
gUnk_08128BF8:: @ 08128BF8
.4byte sub_080A5594
.4byte sub_080A56A0
gUnk_08128C00:: @ 08128C00
.incbin "baserom.gba", 0x128C00, 0x0000004
gUnk_08128C04:: @ 08128C04
.incbin "baserom.gba", 0x128C04, 0x0000010
gUnk_08128C14:: @ 08128C14
.incbin "baserom.gba", 0x128C14, 0x0000080
gUnk_08128C94:: @ 08128C94
.incbin "baserom.gba", 0x128C94, 0x0000080
gUnk_08128D14:: @ 08128D14
.4byte sub_080A59AC
.4byte sub_080A59C8
.4byte sub_080A5A54
.4byte sub_080A5A90
gUnk_08128D24:: @ 08128D24
.4byte sub_080A5AF4
.4byte sub_080A5B34
.4byte sub_080A5BB8
gUnk_08128D30:: @ 08128D30
.4byte sub_080A5C44
.4byte sub_080A5C9C
gUnk_08128D38:: @ 08128D38
.incbin "baserom.gba", 0x128D38, 0x0000004
gUnk_08128D3C:: @ 08128D3C
.incbin "baserom.gba", 0x128D3C, 0x0000007
gUnk_08128D43:: @ 08128D43
.incbin "baserom.gba", 0x128D43, 0x000000E
gUnk_08128D51:: @ 08128D51
.incbin "baserom.gba", 0x128D51, 0x0000007
gUnk_08128D58:: @ 08128D58
.4byte sub_080A6024
.4byte sub_080A6044
gUnk_08128D60:: @ 08128D60
.incbin "baserom.gba", 0x128D60, 0x0000010
gUnk_08128D70:: @ 08128D70
.incbin "baserom.gba", 0x128D70, 0x0000040
gUnk_08128DB0:: @ 08128DB0
.4byte sub_080A6108
.4byte sub_080A612C
gUnk_08128DB8:: @ 08128DB8
.incbin "baserom.gba", 0x128DB8, 0x0000004
gUnk_08128DBC:: @ 08128DBC
.incbin "baserom.gba", 0x128DBC, 0x0000010
gUnk_08128DCC:: @ 08128DCC
.4byte sub_080A6290
.4byte sub_080A62E0
gUnk_08128DD4:: @ 08128DD4
.incbin "baserom.gba", 0x128DD4, 0x0000004
gUnk_08128DD8:: @ 08128DD8
.incbin "baserom.gba", 0x128DD8, 0x0000010
gUnk_08128DE8:: @ 08128DE8
.incbin "baserom.gba", 0x128DE8, 0x0000088
gUnk_08128E70:: @ 08128E70
.4byte sub_080A6534
.4byte sub_080A65AC
gUnk_08128E78:: @ 08128E78
.4byte sub_080A6650
.4byte sub_080A667C
gUnk_08128E80:: @ 08128E80
.incbin "baserom.gba", 0x128E80, 0x0000004
gUnk_08128E84:: @ 08128E84
.incbin "baserom.gba", 0x128E84, 0x0000010
gUnk_08128E94:: @ 08128E94
.incbin "baserom.gba", 0x128E94, 0x0000088
gUnk_08128F1C:: @ 08128F1C
.4byte sub_080A6B04
.4byte sub_080A6C1C
gUnk_08128F24:: @ 08128F24
.4byte sub_080A6CA8
.4byte sub_080A6CD8
.4byte sub_080A6DD0
.4byte sub_080A6DF8
.4byte sub_080A6E44
gUnk_08128F38:: @ 08128F38
.incbin "baserom.gba", 0x128F38, 0x0000014
gUnk_08128F4C:: @ 08128F4C
.incbin "baserom.gba", 0x128F4C, 0x000000C
gUnk_08128F58:: @ 08128F58
.incbin "baserom.gba", 0x128F58, 0x0000050
gUnk_08128FA8:: @ 08128FA8
.incbin "baserom.gba", 0x128FA8, 0x0000018
gUnk_08128FC0:: @ 08128FC0
.incbin "baserom.gba", 0x128FC0, 0x0000018
gUnk_08128FD8:: @ 08128FD8
.incbin "baserom.gba", 0x128FD8, 0x0000018
gUnk_08128FF0:: @ 08128FF0
.incbin "baserom.gba", 0x128FF0, 0x0000014
gUnk_08129004:: @ 08129004
.incbin "baserom.gba", 0x129004, 0x0000018
gUnk_0812901C:: @ 0812901C
.4byte sub_080A7250
.4byte sub_080A7328
.4byte sub_080A7528
.4byte sub_080A73A8
.4byte sub_080A74C8
gUnk_08129030:: @ 08129030
.4byte sub_080A71DC
.4byte sub_080A4EA0
.4byte sub_080A71DC
.4byte sub_080A64FC
.4byte DrawKinstoneMenu
.4byte sub_08051E68
.4byte sub_0804AB54
.4byte sub_080A45A4
.4byte sub_08054870
.4byte sub_080A6C74
.4byte sub_080A6AB8

View File

@ -1653,6 +1653,8 @@ data/const/object/object1D.o(.rodata);
data/const/demoScreen.o(.rodata); data/const/demoScreen.o(.rodata);
#endif #endif
data/data_08127280.o(.rodata); data/data_08127280.o(.rodata);
src/itemMenuTable.o(.rodata);
data/data_08128BF4.o(.rodata);
data/const/playerItem/playerItemSword.o(.rodata); data/const/playerItem/playerItemSword.o(.rodata);
data/data_08129320.o(.rodata); data/data_08129320.o(.rodata);
src/projectile/darkNutSwordSlash.o(.rodata); src/projectile/darkNutSwordSlash.o(.rodata);

12
src/itemMenuTable.c Normal file
View File

@ -0,0 +1,12 @@
#include "global.h"
const u8 gItemMenuTable[] = { 0x0c, 0x04, 0x03, 0x01, 0x01, 0x0c, 0x42, 0x33, 0x0d, 0x05, 0x00, 0x02, 0x01, 0x10, 0x66,
0x33, 0x0f, 0x06, 0x01, 0x03, 0x01, 0x14, 0x8a, 0x33, 0x10, 0x07, 0x02, 0x00, 0x01, 0x15,
0xae, 0x33, 0x00, 0x08, 0x07, 0x05, 0x01, 0x16, 0x42, 0x4b, 0x01, 0x09, 0x04, 0x06, 0x01,
0x17, 0x66, 0x4b, 0x02, 0x0a, 0x05, 0x07, 0x01, 0x00, 0x8a, 0x4b, 0x03, 0x0b, 0x06, 0x04,
0x01, 0x00, 0xae, 0x4b, 0x04, 0x0c, 0x0b, 0x09, 0x01, 0x00, 0x42, 0x63, 0x05, 0x0d, 0x08,
0x0a, 0x01, 0x00, 0x66, 0x63, 0x06, 0x0f, 0x09, 0x0b, 0x01, 0x00, 0x8a, 0x63, 0x07, 0x10,
0x0a, 0x08, 0x01, 0x00, 0xae, 0x63, 0x08, 0x00, 0x10, 0x0d, 0x01, 0x00, 0x42, 0x7b, 0x09,
0x01, 0x0c, 0x0e, 0x01, 0x00, 0x5a, 0x7b, 0x09, 0x01, 0x0d, 0x0f, 0x01, 0x00, 0x72, 0x7b,
0x0a, 0x02, 0x0e, 0x10, 0x01, 0x00, 0x8a, 0x7b, 0x0b, 0x03, 0x0f, 0x0c, 0x03, 0x00, 0xb5,
0x75, 0x0b, 0x03, 0x0f, 0x0c, 0x05, 0x00, 0xb5, 0x75 };