efxutils decompiled, add banim script format macros

This commit is contained in:
MokhaLeee 2023-10-18 11:30:28 +00:00
parent 1d30fef9b6
commit 6bbc071610
21 changed files with 1238 additions and 995 deletions

View File

@ -2,493 +2,6 @@
.SYNTAX UNIFIED
THUMB_FUNC_START sub_80717D4
sub_80717D4: @ 0x080717D4
lsrs r1, r0, #0x1e
movs r2, #0xc0
lsls r2, r2, #8
ands r2, r0
ldr r0, _080717EC @ gUnknown_080E13D4
lsls r1, r1, #1
lsrs r2, r2, #0xb
adds r1, r1, r2
adds r1, r1, r0
movs r2, #0
ldrsh r0, [r1, r2]
bx lr
.align 2, 0
_080717EC: .4byte gUnknown_080E13D4
THUMB_FUNC_END sub_80717D4
THUMB_FUNC_START sub_80717F0
sub_80717F0: @ 0x080717F0
lsrs r1, r0, #0x1e
movs r2, #0xc0
lsls r2, r2, #8
ands r2, r0
ldr r0, _08071808 @ gUnknown_080E13F4
lsls r1, r1, #1
lsrs r2, r2, #0xb
adds r1, r1, r2
adds r1, r1, r0
movs r2, #0
ldrsh r0, [r1, r2]
bx lr
.align 2, 0
_08071808: .4byte gUnknown_080E13F4
THUMB_FUNC_END sub_80717F0
THUMB_FUNC_START EkrGetUnitSpriteDataMaybe
EkrGetUnitSpriteDataMaybe: @ 0x0807180C
push {r4, r5, r6, r7, lr}
mov r7, r9
mov r6, r8
push {r6, r7}
sub sp, #8
adds r6, r1, #0
lsls r2, r2, #0x10
lsrs r2, r2, #0x10
mov r8, r2
adds r7, r0, #0
ldr r1, _08071984 @ 0xFFFF0000
ldr r0, [sp, #4]
ands r0, r1
str r0, [sp, #4]
lsls r3, r3, #0x10
mov r9, r3
mov r0, r8
orrs r0, r3
str r0, [sp]
ldr r4, _08071988 @ 0xFFFF0004
adds r1, r6, #0
stm r1!, {r4}
mov r0, sp
movs r2, #1
movs r3, #2
bl ObjAffineSet
adds r5, r6, #0
adds r5, #0xc
str r4, [r6, #0xc]
adds r1, r6, #0
adds r1, #0x10
mov r0, sp
movs r2, #1
movs r3, #2
bl ObjAffineSet
ldrh r0, [r5, #4]
negs r0, r0
strh r0, [r5, #4]
ldrh r0, [r5, #6]
negs r0, r0
strh r0, [r5, #6]
adds r5, #0xc
str r4, [r6, #0x18]
adds r1, r6, #0
adds r1, #0x1c
mov r0, sp
movs r2, #1
movs r3, #2
bl ObjAffineSet
ldrh r0, [r5, #8]
negs r0, r0
strh r0, [r5, #8]
ldrh r0, [r5, #0xa]
negs r0, r0
strh r0, [r5, #0xa]
adds r5, #0xc
str r4, [r6, #0x24]
adds r1, r6, #0
adds r1, #0x28
mov r0, sp
movs r2, #1
movs r3, #2
bl ObjAffineSet
ldrh r0, [r5, #4]
negs r0, r0
strh r0, [r5, #4]
ldrh r0, [r5, #6]
negs r0, r0
strh r0, [r5, #6]
ldrh r0, [r5, #8]
negs r0, r0
strh r0, [r5, #8]
ldrh r0, [r5, #0xa]
negs r0, r0
strh r0, [r5, #0xa]
adds r6, #0x30
ldr r0, [r7]
cmp r0, #1
beq _08071964
mov r1, r8
lsls r0, r1, #0x10
asrs r0, r0, #0x10
mov r8, r0
mov r2, r9
asrs r5, r2, #0x10
_080718BE:
ldr r2, [r7]
movs r0, #0x80
lsls r0, r0, #0x15
ands r0, r2
negs r0, r0
asrs r1, r0, #0x1f
movs r0, #0x80
lsls r0, r0, #0x12
ands r1, r0
movs r0, #0x80
lsls r0, r0, #0x16
ands r0, r2
cmp r0, #0
beq _080718E0
movs r3, #0x80
lsls r3, r3, #0x13
adds r1, r1, r3
_080718E0:
ldr r0, _0807198C @ 0xC1FFFFFF
ands r0, r2
movs r3, #0x80
lsls r3, r3, #1
adds r1, r1, r3
adds r0, r0, r1
str r0, [r6]
ldrh r0, [r7, #4]
strh r0, [r6, #4]
adds r0, r2, #0
bl sub_80717D4
adds r4, r0, #0
lsls r4, r4, #0x10
asrs r4, r4, #0x11
lsls r1, r4, #8
adds r0, r1, #0
mov r1, r8
bl Div
subs r1, r4, r0
movs r2, #6
ldrsh r0, [r7, r2]
subs r4, r0, r1
lsls r1, r0, #8
adds r0, r1, #0
mov r1, r8
bl Div
adds r1, r0, #0
movs r3, #6
ldrsh r0, [r7, r3]
subs r1, r0, r1
subs r4, r4, r1
strh r4, [r6, #6]
ldr r0, [r7]
bl sub_80717F0
adds r4, r0, #0
lsls r4, r4, #0x10
asrs r4, r4, #0x11
lsls r1, r4, #8
adds r0, r1, #0
adds r1, r5, #0
bl Div
subs r1, r4, r0
movs r2, #8
ldrsh r0, [r7, r2]
subs r4, r0, r1
lsls r1, r0, #8
adds r0, r1, #0
adds r1, r5, #0
bl Div
adds r1, r0, #0
movs r3, #8
ldrsh r0, [r7, r3]
subs r1, r0, r1
subs r4, r4, r1
strh r4, [r6, #8]
adds r6, #0xc
adds r7, #0xc
ldr r0, [r7]
cmp r0, #1
bne _080718BE
_08071964:
ldr r0, [r7]
str r0, [r6]
ldrh r0, [r7, #4]
strh r0, [r6, #4]
ldrh r0, [r7, #6]
strh r0, [r6, #6]
ldrh r0, [r7, #8]
strh r0, [r6, #8]
add sp, #8
pop {r3, r4}
mov r8, r3
mov r9, r4
pop {r4, r5, r6, r7}
pop {r0}
bx r0
.align 2, 0
_08071984: .4byte 0xFFFF0000
_08071988: .4byte 0xFFFF0004
_0807198C: .4byte 0xC1FFFFFF
THUMB_FUNC_END EkrGetUnitSpriteDataMaybe
THUMB_FUNC_START EfxPlaySE
EfxPlaySE: @ 0x08071990
push {r4, r5, r6, lr}
adds r6, r0, #0
adds r5, r1, #0
ldr r0, _080719D0 @ gBmSt
ldrb r1, [r0, #4]
movs r0, #0x20
ands r0, r1
lsls r0, r0, #0x18
lsrs r4, r0, #0x18
cmp r4, #0
bne _080719E6
bl sub_8071AA4
cmp r0, #0
bne _080719D8
bl sub_8071A98
adds r0, r5, #0
bl Sound_SetBGMVolume
ldr r0, _080719D4 @ gPlaySt
adds r0, #0x41
ldrb r0, [r0]
lsls r0, r0, #0x1e
cmp r0, #0
blt _080719E6
lsls r0, r6, #0x10
lsrs r0, r0, #0x10
bl m4aSongNumStart
b _080719E6
.align 2, 0
_080719D0: .4byte gBmSt
_080719D4: .4byte gPlaySt
_080719D8:
ldr r0, _080719EC @ ProcScr_efxSoundSE
movs r1, #3
bl Proc_Start
str r5, [r0, #0x44]
str r6, [r0, #0x48]
strh r4, [r0, #0x2c]
_080719E6:
pop {r4, r5, r6}
pop {r0}
bx r0
.align 2, 0
_080719EC: .4byte ProcScr_efxSoundSE
THUMB_FUNC_END EfxPlaySE
THUMB_FUNC_START Loop6C_efxSoundSE
Loop6C_efxSoundSE: @ 0x080719F0
push {r4, lr}
adds r4, r0, #0
ldrh r0, [r4, #0x2c]
adds r0, #1
strh r0, [r4, #0x2c]
lsls r0, r0, #0x10
asrs r0, r0, #0x10
cmp r0, #5
bne _08071A0A
adds r0, r4, #0
bl Proc_Break
b _08071A38
_08071A0A:
bl sub_8071AA4
cmp r0, #0
bne _08071A38
bl sub_8071A98
ldr r0, [r4, #0x44]
bl Sound_SetBGMVolume
ldr r0, _08071A40 @ gPlaySt
adds r0, #0x41
ldrb r0, [r0]
lsls r0, r0, #0x1e
cmp r0, #0
blt _08071A32
ldr r0, [r4, #0x48]
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
bl m4aSongNumStart
_08071A32:
adds r0, r4, #0
bl Proc_Break
_08071A38:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08071A40: .4byte gPlaySt
THUMB_FUNC_END Loop6C_efxSoundSE
THUMB_FUNC_START DoM4aSongNumStop
DoM4aSongNumStop: @ 0x08071A44
push {lr}
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
bl m4aSongNumStop
pop {r0}
bx r0
THUMB_FUNC_END DoM4aSongNumStop
THUMB_FUNC_START sub_8071A54
sub_8071A54: @ 0x08071A54
push {r4, lr}
adds r4, r0, #0
adds r2, r1, #0
ldr r0, _08071A78 @ gBmSt
ldrb r1, [r0, #4]
movs r0, #0x20
ands r0, r1
cmp r0, #0
bne _08071A72
adds r0, r2, #0
bl Sound_SetSEVolume
adds r0, r4, #0
bl OverrideBgm
_08071A72:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08071A78: .4byte gBmSt
THUMB_FUNC_END sub_8071A54
THUMB_FUNC_START StopBGM1
StopBGM1: @ 0x08071A7C
push {lr}
ldr r0, _08071A88 @ gMPlayInfo_BGM1
bl m4aMPlayStop
pop {r0}
bx r0
.align 2, 0
_08071A88: .4byte gMPlayInfo_BGM1
THUMB_FUNC_END StopBGM1
THUMB_FUNC_START sub_8071A8C
sub_8071A8C: @ 0x08071A8C
ldr r1, _08071A94 @ gUnknown_020200AC
movs r0, #0
str r0, [r1]
bx lr
.align 2, 0
_08071A94: .4byte gUnknown_020200AC
THUMB_FUNC_END sub_8071A8C
THUMB_FUNC_START sub_8071A98
sub_8071A98: @ 0x08071A98
ldr r1, _08071AA0 @ gUnknown_020200AC
movs r0, #1
str r0, [r1]
bx lr
.align 2, 0
_08071AA0: .4byte gUnknown_020200AC
THUMB_FUNC_END sub_8071A98
THUMB_FUNC_START sub_8071AA4
sub_8071AA4: @ 0x08071AA4
ldr r0, _08071AAC @ gUnknown_020200AC
ldr r0, [r0]
bx lr
.align 2, 0
_08071AAC: .4byte gUnknown_020200AC
THUMB_FUNC_END sub_8071AA4
THUMB_FUNC_START M4aPlayWithPostionCtrl
M4aPlayWithPostionCtrl: @ 0x08071AB0
push {r4, r5, r6, lr}
adds r4, r0, #0
adds r6, r1, #0
ldr r0, _08071ADC @ gBmSt
ldrb r1, [r0, #4]
movs r0, #0x20
ands r0, r1
cmp r0, #0
bne _08071B58
cmp r2, #0
beq _08071B28
cmp r6, #0x77
bgt _08071AE0
adds r0, r6, #0
muls r0, r6, r0
movs r1, #0x78
bl Div
adds r5, r0, #0
subs r5, #0x78
b _08071AF4
.align 2, 0
_08071ADC: .4byte gBmSt
_08071AE0:
movs r0, #0xf0
subs r0, r0, r6
adds r1, r0, #0
muls r1, r0, r1
adds r0, r1, #0
movs r1, #0x78
bl Div
movs r1, #0x78
subs r5, r1, r0
_08071AF4:
ldr r2, _08071B1C @ gMPlayTable
ldr r1, _08071B20 @ gSongTable
lsls r0, r4, #3
adds r0, r0, r1
ldrh r1, [r0, #4]
lsls r0, r1, #1
adds r0, r0, r1
lsls r0, r0, #2
adds r0, r0, r2
ldr r4, [r0]
adds r0, r4, #0
bl m4aMPlayImmInit
ldr r1, _08071B24 @ 0x0000FFFF
lsls r2, r5, #0x18
asrs r2, r2, #0x18
adds r0, r4, #0
bl m4aMPlayPanpotControl
b _08071B58
.align 2, 0
_08071B1C: .4byte gMPlayTable
_08071B20: .4byte gSongTable
_08071B24: .4byte 0x0000FFFF
_08071B28:
ldr r2, _08071B60 @ gMPlayTable
ldr r1, _08071B64 @ gSongTable
lsls r0, r4, #3
adds r0, r0, r1
ldrh r1, [r0, #4]
lsls r0, r1, #1
adds r0, r0, r1
lsls r0, r0, #2
adds r0, r0, r2
ldr r4, [r0]
adds r0, r4, #0
bl m4aMPlayImmInit
ldr r5, _08071B68 @ 0x0000FFFF
adds r0, r6, #0
bl RerangeSomething
adds r2, r0, #0
lsls r2, r2, #0x18
asrs r2, r2, #0x18
adds r0, r4, #0
adds r1, r5, #0
bl m4aMPlayPanpotControl
_08071B58:
pop {r4, r5, r6}
pop {r0}
bx r0
.align 2, 0
_08071B60: .4byte gMPlayTable
_08071B64: .4byte gSongTable
_08071B68: .4byte 0x0000FFFF
THUMB_FUNC_END M4aPlayWithPostionCtrl
THUMB_FUNC_START EfxPlaySEwithCmdCtrl
EfxPlaySEwithCmdCtrl: @ 0x08071B6C
push {r4, r5, r6, r7, lr}
@ -685,7 +198,7 @@ _08071DB8:
movs r5, #0xd1
b _08072222
_08071DBC:
ldr r1, _08071DCC @ gUnknown_08758D20
ldr r1, _08071DCC @ gBanimSongTable1
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -694,9 +207,9 @@ _08071DBC:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08071DCC: .4byte gUnknown_08758D20
_08071DCC: .4byte gBanimSongTable1
_08071DD0:
ldr r1, _08071DE0 @ gUnknown_08758D3C
ldr r1, _08071DE0 @ gBanimSongTable2
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -705,9 +218,9 @@ _08071DD0:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08071DE0: .4byte gUnknown_08758D3C
_08071DE0: .4byte gBanimSongTable2
_08071DE4:
ldr r1, _08071DF4 @ gUnknown_08758D58
ldr r1, _08071DF4 @ gBanimSongTable3
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -716,9 +229,9 @@ _08071DE4:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08071DF4: .4byte gUnknown_08758D58
_08071DF4: .4byte gBanimSongTable3
_08071DF8:
ldr r1, _08071E08 @ gUnknown_08758D74
ldr r1, _08071E08 @ gBanimSongTable4
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -727,7 +240,7 @@ _08071DF8:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08071E08: .4byte gUnknown_08758D74
_08071E08: .4byte gBanimSongTable4
_08071E0C:
mov r0, r9
bl sub_8072504
@ -953,7 +466,7 @@ _08071FCA:
bgt _08071FE8
cmp r0, #0xbc
blt _08071FE8
ldr r0, _08071FE4 @ gUnknown_08758D20
ldr r0, _08071FE4 @ gBanimSongTable1
lsls r1, r4, #2
adds r1, r1, r0
ldr r1, [r1]
@ -962,9 +475,9 @@ _08071FCA:
b _08072198
.align 2, 0
_08071FE0: .4byte gEkrPairBanimID2
_08071FE4: .4byte gUnknown_08758D20
_08071FE4: .4byte gBanimSongTable1
_08071FE8:
ldr r1, _08071FF8 @ gUnknown_08758D20
ldr r1, _08071FF8 @ gBanimSongTable1
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -973,7 +486,7 @@ _08071FE8:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08071FF8: .4byte gUnknown_08758D20
_08071FF8: .4byte gBanimSongTable1
_08071FFC:
ldr r5, _08072008 @ 0x00000265
_08071FFE:
@ -1103,7 +616,7 @@ _080720C0:
.align 2, 0
_080720C4: .4byte 0x00000327
_080720C8:
ldr r1, _080720D8 @ gUnknown_08758E00
ldr r1, _080720D8 @ gBanimSongTable5
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -1112,7 +625,7 @@ _080720C8:
lsls r0, r0, #1
b _08072198
.align 2, 0
_080720D8: .4byte gUnknown_08758E00
_080720D8: .4byte gBanimSongTable5
_080720DC:
ldr r5, _080720E0 @ 0x0000032A
b _08072222
@ -1128,7 +641,7 @@ _080720EC:
lsls r5, r5, #2
b _08072222
_080720F2:
ldr r1, _08072104 @ gUnknown_08758E8C
ldr r1, _08072104 @ gBanimSongTable6
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -1137,7 +650,7 @@ _080720F2:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08072104: .4byte gUnknown_08758E8C
_08072104: .4byte gBanimSongTable6
_08072108:
ldr r5, _0807210C @ 0x0000032E
b _08072222
@ -1177,7 +690,7 @@ _0807213E:
.align 2, 0
_08072144: .4byte 0x00000321
_08072148:
ldr r1, _08072158 @ gUnknown_08758F18
ldr r1, _08072158 @ gBanimSongTable7
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -1186,9 +699,9 @@ _08072148:
lsls r0, r0, #1
b _08072198
.align 2, 0
_08072158: .4byte gUnknown_08758F18
_08072158: .4byte gBanimSongTable7
_0807215C:
ldr r1, _0807216C @ gUnknown_08758FA4
ldr r1, _0807216C @ gBanimSongTable8
lsls r0, r4, #2
adds r0, r0, r1
ldr r1, [r0]
@ -1197,7 +710,7 @@ _0807215C:
lsls r0, r0, #1
b _08072198
.align 2, 0
_0807216C: .4byte gUnknown_08758FA4
_0807216C: .4byte gBanimSongTable8
_08072170:
movs r5, #0xf0
lsls r5, r5, #2
@ -1217,7 +730,7 @@ _08072188:
lsls r5, r5, #2
b _08072222
_0807218E:
ldr r0, _080721A0 @ gUnknown_08758D20
ldr r0, _080721A0 @ gBanimSongTable1
lsls r1, r4, #2
adds r1, r1, r0
ldr r1, [r1]
@ -1227,9 +740,9 @@ _08072198:
ldrh r5, [r0]
b _08072222
.align 2, 0
_080721A0: .4byte gUnknown_08758D20
_080721A0: .4byte gBanimSongTable1
_080721A4:
ldr r0, _080721B4 @ gUnknown_08758D20
ldr r0, _080721B4 @ gBanimSongTable1
lsls r1, r4, #2
adds r1, r1, r0
ldr r1, [r1]
@ -1238,9 +751,9 @@ _080721A4:
ldrh r5, [r0, #4]
b _08072222
.align 2, 0
_080721B4: .4byte gUnknown_08758D20
_080721B4: .4byte gBanimSongTable1
_080721B8:
ldr r0, _080721C8 @ gUnknown_08758D20
ldr r0, _080721C8 @ gBanimSongTable1
lsls r1, r4, #2
adds r1, r1, r0
ldr r1, [r1]
@ -1249,9 +762,9 @@ _080721B8:
ldrh r5, [r0, #8]
b _08072222
.align 2, 0
_080721C8: .4byte gUnknown_08758D20
_080721C8: .4byte gBanimSongTable1
_080721CC:
ldr r0, _080721DC @ gUnknown_08758D20
ldr r0, _080721DC @ gBanimSongTable1
lsls r1, r4, #2
adds r1, r1, r0
ldr r1, [r1]
@ -1260,7 +773,7 @@ _080721CC:
ldrh r5, [r0, #0xc]
b _08072222
.align 2, 0
_080721DC: .4byte gUnknown_08758D20
_080721DC: .4byte gBanimSongTable1
_080721E0:
ldr r5, _080721E4 @ 0x00000322
b _08072222
@ -1852,7 +1365,7 @@ _08072710:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #0x39
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
_0807271C:
ldr r0, _08072734 @ gEkrDistanceType
@ -1863,7 +1376,7 @@ _0807271C:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #0x23
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
.align 2, 0
_08072734: .4byte gEkrDistanceType
@ -1912,7 +1425,7 @@ _0807277E:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #0x1f
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
.align 2, 0
_08072790: .4byte gEkrPairSideVaild
@ -1927,7 +1440,7 @@ _08072794:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #0x55
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
_080727B0:
bl SetFlag82
@ -1963,7 +1476,7 @@ _080727E4:
movs r1, #0x80
lsls r1, r1, #1
adds r0, r4, #0
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
.align 2, 0
_080727F8: .4byte gEkrPairSideVaild
@ -1993,7 +1506,7 @@ _08072822:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #0x20
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
.align 2, 0
_08072834: .4byte gBattleStats
@ -2038,7 +1551,7 @@ _08072878:
movs r1, #0x80
lsls r1, r1, #1
adds r0, r6, #0
bl sub_8071A54
bl EfxOverrideBgm
b _08072892
_0807288C:
ldr r1, _08072898 @ gUnknown_020200A8
@ -2154,15 +1667,15 @@ _08072944:
movs r0, #6
ldrsh r5, [r6, r0]
ldr r0, [r6]
bl sub_80717D4
bl GetAnimSpriteRotScaleX
lsls r0, r0, #0x10
asrs r0, r0, #0x11
adds r5, r5, r0
ldr r0, [r6]
bl sub_80717D4
bl GetAnimSpriteRotScaleX
adds r4, r0, #0
ldr r0, [r6]
bl sub_80717F0
bl GetAnimSpriteRotScaleY
lsls r4, r4, #0x10
asrs r4, r4, #0x10
lsls r0, r0, #0x10

View File

@ -447,7 +447,7 @@ _080515D8:
lsls r2, r2, #1
str r3, [sp]
movs r3, #0x80
bl EkrGetUnitSpriteDataMaybe
bl BanimUpdateSpriteRotScale
_08051602:
mov r1, sl
ldr r0, [r1, #0x4c]
@ -507,7 +507,7 @@ _08051654:
lsls r2, r2, #1
str r3, [sp]
movs r3, #0x80
bl EkrGetUnitSpriteDataMaybe
bl BanimUpdateSpriteRotScale
_0805167E:
mov r1, sl
ldr r0, [r1, #0x50]

100
data/banim-efxlvupfx.s Normal file
View File

@ -0,0 +1,100 @@
.section .data
.global gUnknown_085BB0C8
gUnknown_085BB0C8: @ 0x085BB0C8
.incbin "baserom.gba", 0x5BB0C8, 0x214
.global gUnknown_085BB2DC
gUnknown_085BB2DC: @ 0x085BB2DC
.incbin "baserom.gba", 0x5BB2DC, 0xEAC
.global gUnknown_085BC188
gUnknown_085BC188: @ 0x085BC188
.incbin "baserom.gba", 0x5BC188, 0x266C
.global gUnknown_085BE7F4
gUnknown_085BE7F4: @ 0x085BE7F4
.incbin "baserom.gba", 0x5BE7F4, 0x7A0
.global gUnknown_085BEF94
gUnknown_085BEF94: @ 0x085BEF94
.incbin "baserom.gba", 0x5BEF94, 0x5918
.global gUnknown_085C48AC
gUnknown_085C48AC: @ 0x085C48AC
.incbin "baserom.gba", 0x5C48AC, 0x10E8
.global gUnknown_085C5994
gUnknown_085C5994: @ 0x085C5994
.incbin "baserom.gba", 0x5C5994, 0x6C0
.global gUnknown_085C6054
gUnknown_085C6054: @ 0x085C6054
.incbin "baserom.gba", 0x5C6054, 0x80
.global gUnknown_085C60D4
gUnknown_085C60D4: @ 0x085C60D4
.incbin "baserom.gba", 0x5C60D4, 0x65C
.global gUnknown_085C6730
gUnknown_085C6730: @ 0x085C6730
.incbin "baserom.gba", 0x5C6730, 0xAB4
@ Following are some animation scripts. these contain pointers, sometimes
@ packed with other data into one word. Ideally there'd be some macros here
@ based on the decoding in animedrv.c - but I think the alignment guarantees
@ that shifting the objects referenced here doesn't affect the other data.
.global gUnknown_085C71E4
gUnknown_085C71E4: @ 0x085C71E4
@ Replacing .incbin "baserom.gba", 0x5C71E4, 0xC8
.4byte gUnknown_085C6730 + 0x299
.4byte gUnknown_085C6730 + 0x2d5
.4byte gUnknown_085C6730 + 0x329
.4byte gUnknown_085C6730 + 0x395
.4byte gUnknown_085C6730 + 0x419
.4byte gUnknown_085C6730 + 0x49d
.4byte gUnknown_085C6730 + 0x52d
.4byte gUnknown_085C6730 + 0x5bd
.4byte gUnknown_085C6730 + 0x641
.4byte gUnknown_085C6730 + 0x6c5
.4byte gUnknown_085C6730 + 0x755
.4byte gUnknown_085C6730 + 0x7e5
.4byte gUnknown_085C6730 + 0x881
.4byte gUnknown_085C6730 + 0x91d
.4byte gUnknown_085C6730 + 0x9b9
.4byte 0x20000000 + gUnknown_085C6730 + 0xa4a
.4byte 0x80000000
.4byte 0x80004000
.4byte 0xffd00000
.4byte 0x00000008
.4byte 0x80004000
.4byte 0xfff00004
.4byte 0x00000008
.4byte 0x80004000
.4byte 0x00100008
.4byte 0x00000008
.4byte 0x00008000
.4byte 0x0030000c
.4byte 0x00000008
.4byte 0x80004000
.4byte 0xffd0000d
.4byte 0x0000fff8
.4byte 0x80004000
.4byte 0xfff00011
.4byte 0x0000fff8
.4byte 0x80004000
.4byte 0x00100015
.4byte 0x0000fff8
.4byte 0x40004000
.4byte 0xffd00019
.4byte 0x0000fff0
.4byte 0x00004000
.4byte 0xfff0001d
.4byte 0x0000fff0
.4byte 0x40004000
.4byte 0x00000039
.4byte 0x0000fff0
.4byte 0x00000001
.4byte 0x00000000
.4byte 0x00000000

View File

@ -0,0 +1,34 @@
.section .data
.global gUnknown_085C72AC
gUnknown_085C72AC: @ 0x085C72AC
.4byte 0x10000000 + gUnknown_085C71E4 + 0x44
.4byte 0x80000000
.global gUnknown_085C72B4
gUnknown_085C72B4: @ 0x085C72B4
.incbin "baserom.gba", 0x5C72B4, 0x84
.global gUnknown_085C7338
gUnknown_085C7338: @ 0x085C7338
.4byte 0x10000000 + gUnknown_085C72B4
.4byte 0x80000000
.global gUnknown_085C7340
gUnknown_085C7340: @ 0x085C7340
.incbin "baserom.gba", 0x5C7340, 0x78
.global gUnknown_085C73B8
gUnknown_085C73B8: @ 0x085C73B8
.4byte 0x10000000 + gUnknown_085C7340
.4byte 0x80000000
.global gUnknown_085C73C0
gUnknown_085C73C0: @ 0x085C73C0
.incbin "baserom.gba", 0x5C73C0, 0x78
.global gUnknown_085C7438
gUnknown_085C7438: @ 0x085C7438
.4byte 0x10000000 + gUnknown_085C73C0
.4byte 0x80000000
.incbin "baserom.gba", 0x5C7440, 0x5C74B4 - 0x5C7440

View File

@ -1,9 +1,2 @@
.section .rodata
.global gUnknown_080E13D4
gUnknown_080E13D4: @ 0x080E13D4
.incbin "baserom.gba", 0xE13D4, 0x20
.global gUnknown_080E13F4
gUnknown_080E13F4: @ 0x080E13F4
.incbin "baserom.gba", 0xE13F4, 0xE1420 - 0xE13F4

View File

@ -1,24 +1,11 @@
.section .data
.global ProcScr_efxSoundSE
ProcScr_efxSoundSE: @ 0x08758A48
@ PROC_NAME
.short 0x1, 0x0
.word 0x80e1414
@ PROC_REPEAT
.short 0x3, 0x0
.word Loop6C_efxSoundSE
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_08758A60
gUnknown_08758A60: @ 0x08758A60
.incbin "baserom.gba", 0x758A60, 0x2C0
.global gUnknown_08758D20
gUnknown_08758D20: @ 0x08758D20
.global gBanimSongTable1
gBanimSongTable1: @ 0x08758D20
.4byte gUnknown_08758A60 + 0x100
.4byte gUnknown_08758A60 + 0x110
.4byte gUnknown_08758A60 + 0x120
@ -27,8 +14,8 @@ gUnknown_08758D20: @ 0x08758D20
.4byte gUnknown_08758A60 + 0x150
.4byte gUnknown_08758A60 + 0x160
.global gUnknown_08758D3C
gUnknown_08758D3C: @ 0x08758D3C
.global gBanimSongTable2
gBanimSongTable2: @ 0x08758D3C
.4byte gUnknown_08758A60 + 0x170
.4byte gUnknown_08758A60 + 0x180
.4byte gUnknown_08758A60 + 0x190
@ -37,8 +24,8 @@ gUnknown_08758D3C: @ 0x08758D3C
.4byte gUnknown_08758A60 + 0x1c0
.4byte gUnknown_08758A60 + 0x1d0
.global gUnknown_08758D58
gUnknown_08758D58: @ 0x08758D58
.global gBanimSongTable3
gBanimSongTable3: @ 0x08758D58
.4byte gUnknown_08758A60 + 0x1e0
.4byte gUnknown_08758A60 + 0x1f0
.4byte gUnknown_08758A60 + 0x200
@ -47,8 +34,8 @@ gUnknown_08758D58: @ 0x08758D58
.4byte gUnknown_08758A60 + 0x230
.4byte gUnknown_08758A60 + 0x240
.global gUnknown_08758D74
gUnknown_08758D74: @ 0x08758D74
.global gBanimSongTable4
gBanimSongTable4: @ 0x08758D74
@ Replacing .incbin "baserom.gba", 0x758D74, 0x8C
.4byte gUnknown_08758A60 + 0x250
.4byte gUnknown_08758A60 + 0x260
@ -86,16 +73,16 @@ gUnknown_08758D74: @ 0x08758D74
.4byte 0x03750374
.4byte 0x03750374
.global gUnknown_08758E00
gUnknown_08758E00: @ 0x08758E00
.global gBanimSongTable5
gBanimSongTable5: @ 0x08758E00
@ Replacing .incbin "baserom.gba", 0x758E00, 0x8C
.4byte gUnknown_08758D74 + 0x1c
.4byte gUnknown_08758D74 + 0x2c
.4byte gUnknown_08758D74 + 0x3c
.4byte gUnknown_08758D74 + 0x4c
.4byte gUnknown_08758D74 + 0x5c
.4byte gUnknown_08758D74 + 0x6c
.4byte gUnknown_08758D74 + 0x7c
.4byte gBanimSongTable4 + 0x1c
.4byte gBanimSongTable4 + 0x2c
.4byte gBanimSongTable4 + 0x3c
.4byte gBanimSongTable4 + 0x4c
.4byte gBanimSongTable4 + 0x5c
.4byte gBanimSongTable4 + 0x6c
.4byte gBanimSongTable4 + 0x7c
.4byte 0x033b033a
.4byte 0x033b033a
.4byte 0x033b033a
@ -125,16 +112,16 @@ gUnknown_08758E00: @ 0x08758E00
.4byte 0x03770376
.4byte 0x03770376
.global gUnknown_08758E8C
gUnknown_08758E8C: @ 0x08758E8C
.global gBanimSongTable6
gBanimSongTable6: @ 0x08758E8C
@ Replacing .incbin "baserom.gba", 0x758E8C, 0x8C
.4byte gUnknown_08758E00 + 0x1c
.4byte gUnknown_08758E00 + 0x2c
.4byte gUnknown_08758E00 + 0x3c
.4byte gUnknown_08758E00 + 0x4c
.4byte gUnknown_08758E00 + 0x5c
.4byte gUnknown_08758E00 + 0x6c
.4byte gUnknown_08758E00 + 0x7c
.4byte gBanimSongTable5 + 0x1c
.4byte gBanimSongTable5 + 0x2c
.4byte gBanimSongTable5 + 0x3c
.4byte gBanimSongTable5 + 0x4c
.4byte gBanimSongTable5 + 0x5c
.4byte gBanimSongTable5 + 0x6c
.4byte gBanimSongTable5 + 0x7c
.4byte 0x03350334
.4byte 0x03350334
.4byte 0x03350334
@ -164,16 +151,16 @@ gUnknown_08758E8C: @ 0x08758E8C
.4byte 0x03710370
.4byte 0x03710370
.global gUnknown_08758F18
gUnknown_08758F18: @ 0x08758F18
.global gBanimSongTable7
gBanimSongTable7: @ 0x08758F18
@ Replacing .incbin "baserom.gba", 0x758F18, 0x8C
.4byte gUnknown_08758E8C + 0x1c
.4byte gUnknown_08758E8C + 0x2c
.4byte gUnknown_08758E8C + 0x3c
.4byte gUnknown_08758E8C + 0x4c
.4byte gUnknown_08758E8C + 0x5c
.4byte gUnknown_08758E8C + 0x6c
.4byte gUnknown_08758E8C + 0x7c
.4byte gBanimSongTable6 + 0x1c
.4byte gBanimSongTable6 + 0x2c
.4byte gBanimSongTable6 + 0x3c
.4byte gBanimSongTable6 + 0x4c
.4byte gBanimSongTable6 + 0x5c
.4byte gBanimSongTable6 + 0x6c
.4byte gBanimSongTable6 + 0x7c
.4byte 0x03370336
.4byte 0x03370336
.4byte 0x03370336
@ -203,12 +190,12 @@ gUnknown_08758F18: @ 0x08758F18
.4byte 0x03730372
.4byte 0x03730372
.global gUnknown_08758FA4
gUnknown_08758FA4: @ 0x08758FA4
.4byte gUnknown_08758F18 + 0x1c
.4byte gUnknown_08758F18 + 0x2c
.4byte gUnknown_08758F18 + 0x3c
.4byte gUnknown_08758F18 + 0x4c
.4byte gUnknown_08758F18 + 0x5c
.4byte gUnknown_08758F18 + 0x6c
.4byte gUnknown_08758F18 + 0x7c
.global gBanimSongTable8
gBanimSongTable8: @ 0x08758FA4
.4byte gBanimSongTable7 + 0x1c
.4byte gBanimSongTable7 + 0x2c
.4byte gBanimSongTable7 + 0x3c
.4byte gBanimSongTable7 + 0x4c
.4byte gBanimSongTable7 + 0x5c
.4byte gBanimSongTable7 + 0x6c
.4byte gBanimSongTable7 + 0x7c

View File

@ -1,327 +1,67 @@
.section .data
.global gUnknown_085B9D6C
gUnknown_085B9D6C: @ 0x085B9D6C
.4byte gUnknown_085B9E4C + 0xc
.4byte gUnknown_085B9E4C + 0xa4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0xc
.4byte gUnknown_085B9E4C + 0xa4
.global gProc_ekrChienCHR
gProc_ekrChienCHR: @ 0x085B9D94
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf34
@ PROC_REPEAT
.short 0x3, 0x0
.word EkrChienCHRMain
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_efxAnimeDrvProc
gProc_efxAnimeDrvProc: @ 0x085B9DAC
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf40
@ PROC_REPEAT
.short 0x3, 0x0
.word ExecAllAIS
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global ProcScr_ekrUnitMainMini
ProcScr_ekrUnitMainMini: @ 0x085B9DC4
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf50
@ PROC_REPEAT
.short 0x3, 0x0
.word EkrUnitMainMiniMain
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiInit
gProc_ekrTogiInit: @ 0x085B9DDC
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daff8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B104
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B18C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B200
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B264
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiEnd
gProc_ekrTogiEnd: @ 0x085B9E0C
@ PROC_NAME
.short 0x1, 0x0
.word 0x80db008
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B290
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B2BC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B320
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiColor
gProc_ekrTogiColor: @ 0x085B9E34
@ PROC_NAME
.short 0x1, 0x0
.word 0x80db018
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B394
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_085B9E4C
gUnknown_085B9E4C: @ 0x085B9E4C
.incbin "baserom.gba", 0x5B9E4C, 0x26C
.global gUnknown_085BA0B8
gUnknown_085BA0B8: @ 0x085BA0B8
.incbin "baserom.gba", 0x5BA0B8, 0x228
.global Pal_085BA2E0
Pal_085BA2E0: @ 0x085BA2E0
.incbin "baserom.gba", 0x5BA2E0, 0x20
.global Pal_085BA300
Pal_085BA300: @ 0x085BA300
.incbin "baserom.gba", 0x5BA300, 0x20
.global Pal_085BA320
Pal_085BA320: @ 0x085BA320
.incbin "baserom.gba", 0x5BA320, 0x20
.global gUnknown_085BA340
gUnknown_085BA340: @ 0x085BA340
.incbin "baserom.gba", 0x5BA340, 0x5BB0C8 - 0x5BA340
.global gUnknown_085BB0C8
gUnknown_085BB0C8: @ 0x085BB0C8
.incbin "baserom.gba", 0x5BB0C8, 0x214
.global gUnknown_085BB2DC
gUnknown_085BB2DC: @ 0x085BB2DC
.incbin "baserom.gba", 0x5BB2DC, 0xEAC
.global gUnknown_085BC188
gUnknown_085BC188: @ 0x085BC188
.incbin "baserom.gba", 0x5BC188, 0x266C
.global gUnknown_085BE7F4
gUnknown_085BE7F4: @ 0x085BE7F4
.incbin "baserom.gba", 0x5BE7F4, 0x7A0
.global gUnknown_085BEF94
gUnknown_085BEF94: @ 0x085BEF94
.incbin "baserom.gba", 0x5BEF94, 0x5918
.global gUnknown_085C48AC
gUnknown_085C48AC: @ 0x085C48AC
.incbin "baserom.gba", 0x5C48AC, 0x10E8
.global gUnknown_085C5994
gUnknown_085C5994: @ 0x085C5994
.incbin "baserom.gba", 0x5C5994, 0x6C0
.global gUnknown_085C6054
gUnknown_085C6054: @ 0x085C6054
.incbin "baserom.gba", 0x5C6054, 0x80
.global gUnknown_085C60D4
gUnknown_085C60D4: @ 0x085C60D4
.incbin "baserom.gba", 0x5C60D4, 0x65C
.global gUnknown_085C6730
gUnknown_085C6730: @ 0x085C6730
.incbin "baserom.gba", 0x5C6730, 0xAB4
@ Following are some animation scripts. these contain pointers, sometimes
@ packed with other data into one word. Ideally there'd be some macros here
@ based on the decoding in animedrv.c - but I think the alignment guarantees
@ that shifting the objects referenced here doesn't affect the other data.
.global gUnknown_085C71E4
gUnknown_085C71E4: @ 0x085C71E4
@ Replacing .incbin "baserom.gba", 0x5C71E4, 0xC8
.4byte gUnknown_085C6730 + 0x299
.4byte gUnknown_085C6730 + 0x2d5
.4byte gUnknown_085C6730 + 0x329
.4byte gUnknown_085C6730 + 0x395
.4byte gUnknown_085C6730 + 0x419
.4byte gUnknown_085C6730 + 0x49d
.4byte gUnknown_085C6730 + 0x52d
.4byte gUnknown_085C6730 + 0x5bd
.4byte gUnknown_085C6730 + 0x641
.4byte gUnknown_085C6730 + 0x6c5
.4byte gUnknown_085C6730 + 0x755
.4byte gUnknown_085C6730 + 0x7e5
.4byte gUnknown_085C6730 + 0x881
.4byte gUnknown_085C6730 + 0x91d
.4byte gUnknown_085C6730 + 0x9b9
.4byte 0x20000000 + gUnknown_085C6730 + 0xa4a
.4byte 0x80000000
.4byte 0x80004000
.4byte 0xffd00000
.4byte 0x00000008
.4byte 0x80004000
.4byte 0xfff00004
.4byte 0x00000008
.4byte 0x80004000
.4byte 0x00100008
.4byte 0x00000008
.4byte 0x00008000
.4byte 0x0030000c
.4byte 0x00000008
.4byte 0x80004000
.4byte 0xffd0000d
.4byte 0x0000fff8
.4byte 0x80004000
.4byte 0xfff00011
.4byte 0x0000fff8
.4byte 0x80004000
.4byte 0x00100015
.4byte 0x0000fff8
.4byte 0x40004000
.4byte 0xffd00019
.4byte 0x0000fff0
.4byte 0x00004000
.4byte 0xfff0001d
.4byte 0x0000fff0
.4byte 0x40004000
.4byte 0x00000039
.4byte 0x0000fff0
.4byte 0x00000001
.4byte 0x00000000
.4byte 0x00000000
.global gUnknown_085C72AC
gUnknown_085C72AC: @ 0x085C72AC
.4byte 0x10000000 + gUnknown_085C71E4 + 0x44
.4byte 0x80000000
.global gUnknown_085C72B4
gUnknown_085C72B4: @ 0x085C72B4
.incbin "baserom.gba", 0x5C72B4, 0x84
.global gUnknown_085C7338
gUnknown_085C7338: @ 0x085C7338
.4byte 0x10000000 + gUnknown_085C72B4
.4byte 0x80000000
.global gUnknown_085C7340
gUnknown_085C7340: @ 0x085C7340
.incbin "baserom.gba", 0x5C7340, 0x78
.global gUnknown_085C73B8
gUnknown_085C73B8: @ 0x085C73B8
.4byte 0x10000000 + gUnknown_085C7340
.4byte 0x80000000
.global gUnknown_085C73C0
gUnknown_085C73C0: @ 0x085C73C0
.incbin "baserom.gba", 0x5C73C0, 0x78
.global gUnknown_085C7438
gUnknown_085C7438: @ 0x085C7438
.4byte 0x10000000 + gUnknown_085C73C0
.4byte 0x80000000
.global gUnknown_085C7440
gUnknown_085C7440: @ 0x085C7440
.incbin "baserom.gba", 0x5C7440, 0xD64
.global gUnknown_085C74B4
gUnknown_085C74B4: @ 0x085C74B4
.incbin "baserom.gba", 0x5C74B4, 0x5C81A4 - 0x5C74B4
.global AnimScr_085C81A4
AnimScr_085C81A4: @ 0x085C81A4
@ Replacing .incbin "baserom.gba", 0x5C81A4, 0x74
.4byte gUnknown_085C7438 + 0x7d
.4byte gUnknown_085C7438 + 0xa1
.4byte gUnknown_085C7438 + 0xc5
.4byte gUnknown_085C7438 + 0xe9
.4byte gUnknown_085C7438 + 0x125
.4byte gUnknown_085C7438 + 0x161
.4byte gUnknown_085C7438 + 0x19d
.4byte gUnknown_085C7438 + 0x1e5
.4byte gUnknown_085C7438 + 0x22d
.4byte gUnknown_085C7438 + 0x275
.4byte gUnknown_085C7438 + 0x2c9
.4byte gUnknown_085C7438 + 0x31d
.4byte gUnknown_085C7438 + 0x371
.4byte gUnknown_085C7438 + 0x3d1
.4byte gUnknown_085C7438 + 0x431
.4byte gUnknown_085C7438 + 0x491
.4byte gUnknown_085C7438 + 0x4fd
.4byte gUnknown_085C7438 + 0x569
.4byte gUnknown_085C7438 + 0x5d5
.4byte gUnknown_085C7438 + 0x64d
.4byte gUnknown_085C7438 + 0x6c5
.4byte gUnknown_085C7438 + 0x73d
.4byte gUnknown_085C7438 + 0x7b5
.4byte gUnknown_085C7438 + 0x82d
.4byte 0x70000000 + gUnknown_085C7438 + 0x8a7
.4byte gUnknown_085C74B4 + 1
.4byte gUnknown_085C74B4 - 0x7C + 0xa1
.4byte gUnknown_085C74B4 - 0x7C + 0xc5
.4byte gUnknown_085C74B4 - 0x7C + 0xe9
.4byte gUnknown_085C74B4 - 0x7C + 0x125
.4byte gUnknown_085C74B4 - 0x7C + 0x161
.4byte gUnknown_085C74B4 - 0x7C + 0x19d
.4byte gUnknown_085C74B4 - 0x7C + 0x1e5
.4byte gUnknown_085C74B4 - 0x7C + 0x22d
.4byte gUnknown_085C74B4 - 0x7C + 0x275
.4byte gUnknown_085C74B4 - 0x7C + 0x2c9
.4byte gUnknown_085C74B4 - 0x7C + 0x31d
.4byte gUnknown_085C74B4 - 0x7C + 0x371
.4byte gUnknown_085C74B4 - 0x7C + 0x3d1
.4byte gUnknown_085C74B4 - 0x7C + 0x431
.4byte gUnknown_085C74B4 - 0x7C + 0x491
.4byte gUnknown_085C74B4 - 0x7C + 0x4fd
.4byte gUnknown_085C74B4 - 0x7C + 0x569
.4byte gUnknown_085C74B4 - 0x7C + 0x5d5
.4byte gUnknown_085C74B4 - 0x7C + 0x64d
.4byte gUnknown_085C74B4 - 0x7C + 0x6c5
.4byte gUnknown_085C74B4 - 0x7C + 0x73d
.4byte gUnknown_085C74B4 - 0x7C + 0x7b5
.4byte gUnknown_085C74B4 - 0x7C + 0x82d
.4byte 0x70000000 + gUnknown_085C74B4 - 0x7C + 0x8a7
.4byte 0x84000013
.4byte 0x70000000 + gUnknown_085C7438 + 0x91f
.4byte 0x70000000 + gUnknown_085C74B4 - 0x7C + 0x91f
.4byte 0x84000013
.4byte 0x80000000
.global AnimScr_085C8218
AnimScr_085C8218: @ 0x085C8218
@ Replacing .incbin "baserom.gba", 0x5C8218, 0x60
.4byte gUnknown_085C7438 + 0x935
.4byte gUnknown_085C7438 + 0x94d
.4byte gUnknown_085C7438 + 0x965
.4byte gUnknown_085C7438 + 0x97d
.4byte gUnknown_085C7438 + 0x9a1
.4byte gUnknown_085C7438 + 0x9c5
.4byte gUnknown_085C7438 + 0x9e9
.4byte gUnknown_085C7438 + 0xa19
.4byte gUnknown_085C7438 + 0xa49
.4byte gUnknown_085C7438 + 0xa79
.4byte gUnknown_085C7438 + 0xab5
.4byte gUnknown_085C7438 + 0xaf1
.4byte gUnknown_085C7438 + 0xb2d
.4byte gUnknown_085C7438 + 0xb75
.4byte gUnknown_085C7438 + 0xbbd
.4byte gUnknown_085C7438 + 0xc05
.4byte gUnknown_085C7438 + 0xc4d
.4byte gUnknown_085C7438 + 0xc95
.4byte gUnknown_085C7438 + 0xcdd
.4byte 0x70000000 + gUnknown_085C7438 + 0xd27
.4byte gUnknown_085C74B4 - 0x7C + 0x935
.4byte gUnknown_085C74B4 - 0x7C + 0x94d
.4byte gUnknown_085C74B4 - 0x7C + 0x965
.4byte gUnknown_085C74B4 - 0x7C + 0x97d
.4byte gUnknown_085C74B4 - 0x7C + 0x9a1
.4byte gUnknown_085C74B4 - 0x7C + 0x9c5
.4byte gUnknown_085C74B4 - 0x7C + 0x9e9
.4byte gUnknown_085C74B4 - 0x7C + 0xa19
.4byte gUnknown_085C74B4 - 0x7C + 0xa49
.4byte gUnknown_085C74B4 - 0x7C + 0xa79
.4byte gUnknown_085C74B4 - 0x7C + 0xab5
.4byte gUnknown_085C74B4 - 0x7C + 0xaf1
.4byte gUnknown_085C74B4 - 0x7C + 0xb2d
.4byte gUnknown_085C74B4 - 0x7C + 0xb75
.4byte gUnknown_085C74B4 - 0x7C + 0xbbd
.4byte gUnknown_085C74B4 - 0x7C + 0xc05
.4byte gUnknown_085C74B4 - 0x7C + 0xc4d
.4byte gUnknown_085C74B4 - 0x7C + 0xc95
.4byte gUnknown_085C74B4 - 0x7C + 0xcdd
.4byte 0x70000000 + gUnknown_085C74B4 - 0x7C + 0xd27
.4byte 0x84000013
.4byte 0x70000000 + gUnknown_085C7438 + 0x91f
.4byte 0x70000000 + gUnknown_085C74B4 - 0x7C + 0x91f
.4byte 0x84000013
.4byte 0x80000000

130
data/data_banim_5B9D6C.s Normal file
View File

@ -0,0 +1,130 @@
.section .data
.global gUnknown_085B9D6C
gUnknown_085B9D6C: @ 0x085B9D6C
.4byte gUnknown_085B9E4C + 0xc
.4byte gUnknown_085B9E4C + 0xa4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0x13c
.4byte gUnknown_085B9E4C + 0x1d4
.4byte gUnknown_085B9E4C + 0xc
.4byte gUnknown_085B9E4C + 0xa4
.global gProc_ekrChienCHR
gProc_ekrChienCHR: @ 0x085B9D94
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf34
@ PROC_REPEAT
.short 0x3, 0x0
.word EkrChienCHRMain
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_efxAnimeDrvProc
gProc_efxAnimeDrvProc: @ 0x085B9DAC
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf40
@ PROC_REPEAT
.short 0x3, 0x0
.word ExecAllAIS
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global ProcScr_ekrUnitMainMini
ProcScr_ekrUnitMainMini: @ 0x085B9DC4
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daf50
@ PROC_REPEAT
.short 0x3, 0x0
.word EkrUnitMainMiniMain
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiInit
gProc_ekrTogiInit: @ 0x085B9DDC
@ PROC_NAME
.short 0x1, 0x0
.word 0x80daff8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B104
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B18C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B200
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B264
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiEnd
gProc_ekrTogiEnd: @ 0x085B9E0C
@ PROC_NAME
.short 0x1, 0x0
.word 0x80db008
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B290
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B2BC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B320
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gProc_ekrTogiColor
gProc_ekrTogiColor: @ 0x085B9E34
@ PROC_NAME
.short 0x1, 0x0
.word 0x80db018
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_805B394
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_085B9E4C
gUnknown_085B9E4C: @ 0x085B9E4C
.incbin "baserom.gba", 0x5B9E4C, 0x26C
.global gUnknown_085BA0B8
gUnknown_085BA0B8: @ 0x085BA0B8
.incbin "baserom.gba", 0x5BA0B8, 0x228
.global Pal_085BA2E0
Pal_085BA2E0: @ 0x085BA2E0
.incbin "baserom.gba", 0x5BA2E0, 0x20
.global Pal_085BA300
Pal_085BA300: @ 0x085BA300
.incbin "baserom.gba", 0x5BA300, 0x20
.global Pal_085BA320
Pal_085BA320: @ 0x085BA320
.incbin "baserom.gba", 0x5BA320, 0x20
.global gUnknown_085BA340
gUnknown_085BA340: @ 0x085BA340
.incbin "baserom.gba", 0x5BA340, 0x5BB0C8 - 0x5BA340

View File

@ -1,15 +1,18 @@
#ifndef GUARD_AP_H
#define GUARD_AP_H
#include "global.h"
#include "proc.h"
struct APProc;
struct APHandle {
/* 00 */ const u16* pDefinition; // Pointer to Definition Root
/* 04 */ const u16* pFrameData; // Pointer to Frame Data Array
/* 08 */ const u16* pAnimDataStart; // Pointer to Current Anim Data (Start, where we go back on loop)
/* 0C */ const u16* pAnimDataCurrent; // Pointer to Current Anim Data (Cursor, where we are now)
/* 10 */ const u16* pCurrentObjData; // Pointer to Current Obj Data
/* 14 */ const u16* pCurrentRotScale; // Pointer to Current Rot/Scale Data
/* 00 */ const u16 * pDefinition; // Pointer to Definition Root
/* 04 */ const u16 * pFrameData; // Pointer to Frame Data Array
/* 08 */ const u16 * pAnimDataStart; // Pointer to Current Anim Data (Start, where we go back on loop)
/* 0C */ const u16 * pAnimDataCurrent; // Pointer to Current Anim Data (Cursor, where we are now)
/* 10 */ const u16 * pCurrentObjData; // Pointer to Current Obj Data
/* 14 */ const u16 * pCurrentRotScale; // Pointer to Current Rot/Scale Data
/* 18 */ s16 frameTimer; // Cycle Timer
/* 1A */ u16 frameInterval; // Cycle Time Step (0x100 is one frame)
/* 1C */ u16 subframeTimer; // Sub frame time offset or something
@ -17,29 +20,29 @@ struct APHandle {
/* 20 */ u8 gfxNeedsUpdate; // bool defining whether gfx needs update
/* 21 */ u8 rotScaleIndex; // Rotation/Scale OAM Index
/* 22 */ u16 tileBase; // OAM Extra Data (Tile Index Root & OAM2 Stuff)
/* 24 */ const void* pGraphics; // Pointer to graphics (if any)
/* 24 */ const void * pGraphics; // Pointer to graphics (if any)
};
void AP_ClearAll();
struct APHandle* AP_Create(const void* apDefinition, u16 aObjNode);
void AP_Delete(struct APHandle* handle);
s8 AP_Update(struct APHandle* handle, int x, int y);
void AP_Display(struct APHandle*, int, int);
s8 AP_ExecFrame(struct APHandle*);
void AP_QueueObjRotScale(struct APHandle*);
void AP_SwitchAnimation(struct APHandle* handle, int index);
void AP_SetDefinition(struct APHandle* handle, const u16* definition);
void AP_QueueObjGraphics(struct APHandle*);
void AP_LoadDefinition(struct APHandle*, const u16*);
void AP_ExecDummyFrame(struct APHandle*);
void AP_Init(struct APHandle*, const u16*, u16);
struct APHandle* AP_Find(const u16* definition);
ProcPtr APProc_Create(const void* apDefinition, int xPos, int yPos, int tileBase, int anim, u16 aObjNode);
struct APHandle * AP_Create(const void * apDefinition, u16 aObjNode);
void AP_Delete(struct APHandle * handle);
s8 AP_Update(struct APHandle * handle, int x, int y);
void AP_Display(struct APHandle *, int, int);
s8 AP_ExecFrame(struct APHandle *);
void AP_QueueObjRotScale(struct APHandle *);
void AP_SwitchAnimation(struct APHandle * handle, int index);
void AP_SetDefinition(struct APHandle * handle, const u16 * definition);
void AP_QueueObjGraphics(struct APHandle *);
void AP_LoadDefinition(struct APHandle *, const u16 *);
void AP_ExecDummyFrame(struct APHandle *);
void AP_Init(struct APHandle *, const u16 *, u16);
struct APHandle * AP_Find(const u16 * definition);
ProcPtr APProc_Create(const void * apDefinition, int xPos, int yPos, int tileBase, int anim, u16 aObjNode);
// ??? APProc_OnUpdate(???);
// ??? APProc_OnEnd(???);
// ??? APProc_SetParameters(???);
void APProc_Delete(struct APProc* proc);
void APProc_Delete(struct APProc * proc);
void APProc_DeleteAll(void);
int APProc_Exists(void);

View File

@ -470,10 +470,10 @@ extern u32 gUnknown_02017754;
extern u32 gUnknown_02017758;
extern u32 gUnknown_0201775C;
struct Vec2 gEkrBg2QuakeVec;
extern short gUnknown_02017764[2];
extern short gUnknown_02017768[2];
extern s16 gUnknown_02017764[2];
extern s16 gUnknown_02017768[2];
extern short gEkrHitEfxBool[]; /* [0] for left and [1] for right, if in hit routine, 1, otherwise 0 */
extern s16 gEkrHitEfxBool[]; /* [0] for left and [1] for right, if in hit routine, 1, otherwise 0 */
extern u8 gEkrBuf1[];
extern u16 gEkrBarfxBuf[];
extern u16 gEkrTsaBuffer[0x1000 / 2];
@ -754,8 +754,8 @@ extern u16 gUnknown_080E1164[];
extern const u16 gBarfxTileConf1[];
extern const u16 gBarfxTileConf2[];
extern const u16 gBarfxTileConf3[];
// extern ??? gUnknown_080E13D4
// extern ??? gUnknown_080E13F4
extern const s16 gAnimSpriteRotScalePosX[];
extern const s16 gAnimSpriteRotScalePosY[];
extern const u16 FrameLut_080E143A[];
extern const u16 FrameLut_080E1488[];
// extern ??? sEfxLvupPartsPos
@ -1236,19 +1236,19 @@ extern struct ProcCmd ProcScr_ekrWhiteINOUT[];
// extern ??? gUnknown_08758740
// extern ??? ProcScr_EkrMyrrh
extern struct ProcCmd ProcScr_EkrMyrrh[];
extern short gUnknown_0875879C[];
extern s16 gUnknown_0875879C[];
extern u16 gEfxTileRefPals_08758A1C[];
extern struct ProcCmd ProcScr_ekrsubAnimeEmulator[];
extern struct ProcCmd ProcScr_efxSoundSE[];
// extern ??? gUnknown_08758A60
// extern ??? gUnknown_08758D20
// extern ??? gUnknown_08758D3C
// extern ??? gUnknown_08758D58
// extern ??? gUnknown_08758D74
// extern ??? gUnknown_08758E00
// extern ??? gUnknown_08758E8C
// extern ??? gUnknown_08758F18
// extern ??? gUnknown_08758FA4
extern u16 * gBanimSongTable1[];
extern u16 * gBanimSongTable2[];
extern u16 * gBanimSongTable3[];
extern u16 * gBanimSongTable4[];
extern u16 * gBanimSongTable5[];
extern u16 * gBanimSongTable6[];
extern u16 * gBanimSongTable7[];
extern u16 * gBanimSongTable8[];
extern struct FaceVramEntry gUnknown_087592CC[4];
// extern ??? EkrLvupMsgsStr

View File

@ -356,6 +356,30 @@ struct ProcEkrSubAnimeEmulator {
struct ProcEkrSubAnimeEmulator * NewEkrsubAnimeEmulator(int x, int y, u32 * anim_scr, int type, int oam2Base, int oamBase, ProcPtr parent);
void EkrsubAnimeEmulatorMain(struct ProcEkrSubAnimeEmulator * proc);
struct ProcEfxSoundSE {
PROC_HEADER;
STRUCT_PAD(0x29, 0x2C);
/* 2C */ s16 timer;
STRUCT_PAD(0x2E, 0x44);
/* 44 */ int volume;
/* 48 */ int index;
};
void EfxPlaySE(int songid, int volume);
void Loop6C_efxSoundSE(struct ProcEfxSoundSE * proc);
void DoM4aSongNumStop(int);
// ??? EfxOverrideBgm(???);
// ??? StopBGM1(???);
void UnregisterEfxSoundSeExist(void);
void RegisterEfxSoundSeExist(void);
int CheckEfxSoundSeExist(void);
void M4aPlayWithPostionCtrl(int, int, int);
void EfxPlaySEwithCmdCtrl(struct Anim * anim, int);
extern int gEkrDebugTimer, gEkrDebugUnk1;
extern u16 gEkrPairBanimID[2];
@ -388,37 +412,37 @@ extern u8 gBanimRightImgSheetBuf[];
extern int gBanimLinkArenaFlag;
extern int gBattleDeamonActive;
extern struct ProcEkrBattleDeamon *gpProcEkrBattleDeamon;
extern short gEkrDebugModeMaybe;
extern short gEkrPairSomeTile;
extern short gEkrInitialHitSide;
extern short gEkrSnowWeather;
extern short gEkrPairSideVaild[2];
extern short gEkrInitialPosition[2];
extern short gPalIndexEfxHpBarUnk[2];
extern short gEkrSpellAnimIndex[];
extern s16 gEkrDebugModeMaybe;
extern s16 gEkrPairSomeTile;
extern s16 gEkrInitialHitSide;
extern s16 gEkrSnowWeather;
extern s16 gEkrPairSideVaild[2];
extern s16 gEkrInitialPosition[2];
extern s16 gPalIndexEfxHpBarUnk[2];
extern s16 gEkrSpellAnimIndex[];
// extern ??? gUnknown_0203E11A
extern EWRAM_DATA s16 gBanimTerrainIndexMaybe[2];
extern EWRAM_DATA short gEkrPairBmLoc[4];
// extern ??? gAnimRoundData
extern short gEfxPairHpBufOffset[];
extern short gEkrPairBanimID2[];
extern s16 gEfxPairHpBufOffset[];
extern s16 gEkrPairBanimID2[];
extern u8 gEkrPids[2];
extern struct Unit *gpEkrTriangleUnits[2];
extern char *gBanimCharacterPals[2];
extern void * gUnknown_0203E1A4[2];
extern short gEkrGaugeHp[2];
extern short gEkrPairMaxHP[2];
extern short gBanimSomeHp[2];
extern short gEkrPairHit[2];
extern short gEkrPairDmgPair[2];
extern short gEkrPairCritPair[2];
extern short gEkrPairExpPrevious[2];
extern short gEkrPairExpGain[2];
extern short gEkrPairTerrainID[2];
extern short gEkrPairBaseCon[2];
extern short gEkrPairWTABonus[2];
extern short gEkrPairEffectiveAgainst[2];
extern short gUnknown_0203E1DC[2];
extern s16 gEkrGaugeHp[2];
extern s16 gEkrPairMaxHP[2];
extern s16 gBanimSomeHp[2];
extern s16 gEkrPairHit[2];
extern s16 gEkrPairDmgPair[2];
extern s16 gEkrPairCritPair[2];
extern s16 gEkrPairExpPrevious[2];
extern s16 gEkrPairExpGain[2];
extern s16 gEkrPairTerrainID[2];
extern s16 gEkrPairBaseCon[2];
extern s16 gEkrPairWTABonus[2];
extern s16 gEkrPairEffectiveAgainst[2];
extern s16 gUnknown_0203E1DC[2];
extern u8 gBanimScrLeft[];
extern u8 gBanimScrRight[];
@ -444,8 +468,8 @@ extern u16 gUnknown_0201FDC4[];
extern u16 gUnknown_0201FF04[];
// extern ??? gUnknown_02020044
// extern ??? gUnknown_020200A8
// extern ??? gUnknown_020200AC
extern int gUnknown_020200A8;
extern int gEfxSoundSeExist;
// extern ??? gpProcEkrClasschg
extern struct ProcCmd gProc_ekrBattleDeamon[];
@ -867,10 +891,10 @@ void PlaySound8FForArenaMaybe(void);
void sub_805B094(void);
void BeginAnimsOnBattle_Arena(void);
void ExecBattleAnimArenaExit(void);
void sub_8070D04(u16 * ptr, u16 a, u16 b, int r3, int r4);
void FillBGRect(u16 * ptr, u16 a, u16 b, int r3, int r4);
void sub_8070DBC(u16 * tm, u16 a, u16 b, int r3, int r4);
// ??? EfxTmModifyPal(???);
void sub_8070D04(u16 * tm, u16 width, u16 height, int pal, int chr);
void FillBGRect(u16 * tm, u16 width, u16 height, int pal, int chr);
void sub_8070DBC(u16 * tm, u16 width, u16 height, int pal, int chr);
void EfxTmModifyPal(u16 * tm, u16 width, u16 height);
void EfxTmCpyBG(const void * ptr1, void * ptr2, u16 width, u16 height, int pal, int chr);
void EfxTmCpyBgHFlip(const u16 * tsa, u16 * tm, u16 width, u16 height, int pal, int chr);
void EfxTmCpyExt(const u16 * src, s16 src_width, u16 * dst, s16 dst_width, u16 width, u16 hight, int pal, int chr);
@ -887,33 +911,23 @@ void EfxSplitColorPetrify(u16 * src, u8 * dst, u32 length);
void sub_8071574(s8 * src1, s8 * src2, u16 * pal, u32 length, int ref);
void EfxDecodeSplitedPalette(u16 * dst, s8 * src1, s8 * src2, s16 * src3, u32 length, int ref, int unk);
void EfxChapterMapFadeOUT(int);
// ??? sub_80716B0(???);
int sub_80716B0(int a);
int GetAnimSpriteRotScaleX(u32 header);
int GetAnimSpriteRotScaleY(u32 header);
void BanimUpdateSpriteRotScale(void * src, struct AnimSpriteData * out, s16 x, s16 y, int unused);
// ??? sub_80717D4(???);
// ??? sub_80717F0(???);
void EkrGetUnitSpriteDataMaybe(void * scr, void * buf, s16, s16, int);
void EfxPlaySE(int, int);
// ??? Loop6C_efxSoundSE(???);
void DoM4aSongNumStop(int);
// ??? sub_8071A54(???);
// ??? StopBGM1(???);
void sub_8071A8C(void);
// ??? sub_8071A98(???);
// ??? sub_8071AA4(???);
void M4aPlayWithPostionCtrl(int, int, int);
void EfxPlaySEwithCmdCtrl(struct Anim * anim, int);
// ??? sub_8072258(???);
u16 sub_8072258(u16 terrain);
int sub_80723A4(struct Anim * anim);
// ??? sub_80723D4(???);
u16 sub_80723D4(u16 basecon);
s16 sub_8072400(struct Anim * anim);
void sub_8072450(struct Anim * anim);
// ??? sub_8072504(???);
void sub_8072504(struct Anim * anim);
// ??? sub_8072548(???);
// ??? sub_8072570(???);
void sub_80726AC(void);
void sub_807289C(void);
// ??? sub_80728D0(???);
// ??? sub_807290C(???);
int sub_807290C(struct Anim * anim);
void PlaySFX(int, int, int, int);
// ??? sub_80729C0(???);

View File

@ -178,7 +178,7 @@ void VramCopy(u8 *src, u8 *dst, int size);
void PutTmLinear(u16 *src, u16 *dst, int size, u16 tileref);
// ??? GetTmOffsetById(???);
// ??? sub_8014A78(???);
// ??? RerangeSomething(???);
int RerangeSomething(int);
void PlaySeSpacial(unsigned, int);
void sub_8014B88(int, int);
// ??? sub_8014BA0(???);

View File

@ -17,7 +17,7 @@ extern struct SoundSt gSoundSt;
int GetCurrentBgmSong(void);
// ??? IsBgmPlaying(???);
// ??? Sound_SetBGMVolume(???);
void Sound_SetBGMVolume(int volume);
void Sound_SetSEVolume(int vol);
void Sound_FadeOutBGM(int speed);
// ??? Sound_FadeOutBGMAlt(???);

View File

@ -103,7 +103,7 @@ enum BmSt_gameStateBits {
BM_FLAG_2 = (1 << 2),
BM_FLAG_3 = (1 << 3),
BM_FLAG_4 = (1 << 4),
BM_FLAG_5 = (1 << 5),
BM_FLAG_5 = (1 << 5), /* Maybe mute battle-anim BGM ? */
BM_FLAG_LINKARENA = (1 << 6),
};

View File

@ -186,7 +186,8 @@ SECTIONS
asm/banim-ekrdragon.o(.text);
src/banim-ekrdragon-myrrh.o(.text);
src/banim-efxutils.o(.text);
asm/banim-efxutils.o(.text);
src/banim-efxsound.o(.text);
asm/banim-efxsound.o(.text);
src/banim-ekrclasschg.o(.text);
src/banim-ekrlvup.o(.text);
asm/banim-efxlvup.o(.text);
@ -431,6 +432,7 @@ SECTIONS
. = ALIGN(4); src/banim-efxskill.o(.rodata);
. = ALIGN(4); data/const_data_banimekrdk.o(.rodata);
. = ALIGN(4); src/banim-efxutils.o(.rodata);
. = ALIGN(4); src/banim-efxsound.o(.rodata);
. = ALIGN(4); data/const_data_efxutils.o(.rodata);
. = ALIGN(4); src/banim-ekrclasschg.o(.rodata);
. = ALIGN(4); src/banim-ekrlvup.o(.rodata);
@ -606,6 +608,9 @@ SECTIONS
. = ALIGN(4); src/banim-ekrbattleending.o(.data);
. = ALIGN(4); src/banim-ekrbattleintro.o(.data);
. = ALIGN(4); src/banim-ekrmain.o(.data);
. = ALIGN(4); data/data_banim_5B9D6C.o(.data);
. = ALIGN(4); data/banim-efxlvupfx.o(.data);
. = ALIGN(4); data/banim-ekrmainminifx.o(.data);
. = ALIGN(4); data/data_banim_5B9D5C.o(.data);
. = ALIGN(4); src/banim-efxmagic.o(.data);
. = ALIGN(4); data/banim-efxmagic-5D5028.o(.data);
@ -626,6 +631,7 @@ SECTIONS
. = ALIGN(4); data/data-ekrdragon.o(.data);
. = ALIGN(4); src/banim-ekrdragon-myrrh.o(.data);
. = ALIGN(4); src/banim-efxutils.o(.data);
. = ALIGN(4); src/banim-efxsound.o(.data);
. = ALIGN(4); data/data-ekrclasschg.o(.data);
. = ALIGN(4); src/banim-ekrclasschg.o(.data);
. = ALIGN(4); src/banim-ekrlvup.o(.data);

589
src/banim-efxsound.c Normal file
View File

@ -0,0 +1,589 @@
#include "global.h"
#include "proc.h"
#include "anime.h"
#include "ekrbattle.h"
#include "efxbattle.h"
#include "m4a.h"
#include "soundwrapper.h"
#include "constants/terrains.h"
CONST_DATA struct ProcCmd ProcScr_efxSoundSE[] = {
PROC_NAME("efxSoundSE"),
PROC_REPEAT(Loop6C_efxSoundSE),
PROC_END
};
void EfxPlaySE(int songid, int volume)
{
struct ProcEfxSoundSE * proc;
if (gBmSt.gameStateBits & BM_FLAG_5)
return;
if (CheckEfxSoundSeExist() == 0)
{
RegisterEfxSoundSeExist();
Sound_SetBGMVolume(volume);
PlaySoundEffect(songid);
return;
}
proc = Proc_Start(ProcScr_efxSoundSE, PROC_TREE_3);
proc->volume = volume;
proc->index = songid;
proc->timer = 0;
}
void Loop6C_efxSoundSE(struct ProcEfxSoundSE * proc)
{
if (++proc->timer == 5)
{
Proc_Break(proc);
return;
}
if (CheckEfxSoundSeExist() == 0)
{
RegisterEfxSoundSeExist();
Sound_SetBGMVolume(proc->volume);
PlaySoundEffect(proc->index);
Proc_Break(proc);
}
}
void DoM4aSongNumStop(int num)
{
m4aSongNumStop(num);
}
void EfxOverrideBgm(int songid, int volume)
{
if (gBmSt.gameStateBits & BM_FLAG_5)
return;
Sound_SetSEVolume(volume);
OverrideBgm(songid);
}
void StopBGM1(void)
{
m4aMPlayStop(&gMPlayInfo_BGM1);
}
void UnregisterEfxSoundSeExist(void)
{
gEfxSoundSeExist = false;
}
void RegisterEfxSoundSeExist(void)
{
gEfxSoundSeExist = true;
}
int CheckEfxSoundSeExist(void)
{
return gEfxSoundSeExist;
}
void M4aPlayWithPostionCtrl(int songid, int x, int flag)
{
int pan;
if (gBmSt.gameStateBits & BM_FLAG_5)
return;
if (flag != 0)
{
struct MusicPlayerInfo * info;
if (x <= 0x77)
pan = Div(x * x, 0x78) - 0x78;
else
pan = 0x78 - Div((0xF0 - x) * (0xF0 - x), 0x78);
info = gMPlayTable[gSongTable[songid].ms].info;
m4aMPlayImmInit(info);
m4aMPlayPanpotControl(info, 0xFFFF, pan);
}
else
{
struct MusicPlayerInfo * info;
info = gMPlayTable[gSongTable[songid].ms].info;
m4aMPlayImmInit(info);
m4aMPlayPanpotControl(info, 0xFFFF, RerangeSomething(x));
}
}
/* https://decomp.me/scratch/B31Dj */
#if 0
void EfxPlaySEwithCmdCtrl(struct Anim * anim, int cmd)
{
u16 val1, val2, val3;
int pos, terrain, volume, tmp;
int songid;
s16 _songid;
struct Anim * anim2 = GetAnimAnotherSide(anim);
if (GetAISLayerId(anim) == 1)
return;
pos = GetAnimPosition(anim);
if (pos == POS_L)
terrain = gEkrPairTerrainID[POS_L];
else
terrain = gEkrPairTerrainID[POS_R];
val1 = sub_8072258(terrain);
if (terrain == TERRAIN_BRIDGE_14)
{
if (sub_80723A4(anim) == 0)
val1 = 2;
}
if (pos == POS_L)
val2 = sub_80723D4(gEkrPairBaseCon[POS_L]);
else
val2 = sub_80723D4(gEkrPairBaseCon[POS_R]);
songid = (u16)-1;
val3 = anim->xPosition + sub_807290C(anim);
volume = 0x100;
switch (cmd) {
case 25:
songid = 0xD1;
break;
case 27:
songid = gBanimSongTable1[val1][pos];
break;
case 28:
songid = gBanimSongTable2[val1][pos];
break;
case 29:
songid = gBanimSongTable2[val1][pos];
break;
case 30:
songid = gBanimSongTable2[val1][pos];
break;
case 31:
sub_8072504(anim2);
if (sub_8072400(anim2) != 2)
{
int flag = GetBattleAnimRoundTypeFlags((anim->nextRoundId - 1) * 2 + GetAnimPosition(anim));
if (flag & 0x200)
{
_songid = 0x3CF;
EfxPlaySE(_songid, 0x100);
M4aPlayWithPostionCtrl(_songid, anim->xPosition, 1);
}
}
switch (sub_8072400(anim2)) {
case 1:
songid = 0xD5;
break;
case 2:
songid = 0x2CE;
break;
case 0:
songid = 0xD2;
break;
default:
break;
}
val3 = anim2->xPosition + sub_807290C(anim2);
break;
case 32:
sub_8072504(anim2);
if (sub_8072400(anim2) != 2)
{
int flag = GetBattleAnimRoundTypeFlags((anim->nextRoundId - 1) * 2 + GetAnimPosition(anim));
if (flag & 0x200)
{
_songid = 0x3CF;
EfxPlaySE(_songid, 0x100);
M4aPlayWithPostionCtrl(_songid, anim->xPosition, 1);
}
}
switch (sub_8072400(anim2)) {
case 1:
songid = 0xD5;
break;
case 2:
songid = 0x2CE;
break;
case 0:
songid = 0xD3;
break;
default:
break;
}
val3 = anim2->xPosition + sub_807290C(anim2);
break;
case 33:
sub_8072504(anim2);
if (sub_8072400(anim2) != 2)
{
int flag = GetBattleAnimRoundTypeFlags((anim->nextRoundId - 1) * 2 + GetAnimPosition(anim));
if (flag & 0x200)
{
_songid = 0x3CF;
EfxPlaySE(_songid, 0x100);
M4aPlayWithPostionCtrl(_songid, anim->xPosition, 1);
}
}
switch (sub_8072400(anim2)) {
case 1:
songid = 0xD5;
break;
case 2:
songid = 0x2CE;
break;
case 0:
songid = 0xD4;
break;
default:
break;
}
val3 = anim2->xPosition + sub_807290C(anim2);
break;
case 34:
songid = 0xC9;
break;
case 35:
songid = 0xC8;
break;
case 36:
songid = 0xCA;
break;
case 37:
songid = 0x263;
if (pos == POS_L)
songid = songid - 1;
break;
case 40:
songid = 0xF6;
break;
case 41:
songid = 0x141;
break;
case 42:
songid = 0x142;
break;
case 43:
songid = 0x267;
if (pos == POS_L)
songid = songid - 1;
break;
case 47:
songid = 0x2F8;
break;
case 51:
songid = 0xE7;
break;
case 52:
if (pos == POS_L)
tmp = gEkrPairBanimID2[POS_L];
else
tmp = gEkrPairBanimID2[POS_R];
switch (tmp) {
case 0xBC:
case 0xBD:
case 0xBE:
case 0xBF:
songid = gBanimSongTable1[val1][pos + 4];
break;
default:
songid = gBanimSongTable1[val1][pos + val2 * 2];
break;
}
break;
case 53:
songid = 0x265;
if (pos == POS_L)
songid = songid - 1;
break;
case 54:
songid = 0xCE;
break;
case 55:
songid = 0xCF;
break;
case 56:
songid = 0xCB;
break;
case 58:
songid = 0x2D3;
break;
case 59:
songid = 0x2D4;
break;
case 60:
songid = 0x263;
if (pos == POS_L)
songid = songid - 1;
volume = 0x80;
break;
case 62:
songid = 0xF1;
break;
case 63:
songid = 0x136;
break;
case 64:
songid = 0x117;
break;
case 65:
songid = 0xEB;
break;
case 66:
songid = 0xEA;
break;
case 67:
songid = 0x2CF;
break;
case 68:
songid = 0x2D0;
break;
case 69:
songid = 0x2D1;
break;
case 70:
songid = 0x2D2;
break;
case 72:
songid = 0xED;
break;
case 73:
songid = 0x135;
break;
case 74:
songid = 0x134;
break;
case 75:
songid = 0x2DD;
break;
case 76:
songid = 0x2DE;
break;
case 77:
songid = 0x2DF;
break;
case 79:
songid = 0x2F7;
break;
case 80:
songid = 0x2E8;
break;
case 86:
songid = 0x325;
break;
case 87:
songid = 0x326;
break;
case 88:
songid = 0x327;
break;
case 89:
songid = gBanimSongTable5[val1][pos + val2 * 2];
break;
case 90:
songid = 0x32A;
break;
case 91:
songid = 0x32B;
break;
case 92:
songid = 0x32C;
break;
case 93:
songid = gBanimSongTable6[val1][pos + val2 * 2];
break;
case 94:
songid = 0x32E;
break;
case 95:
songid = 0x332;
break;
case 96:
songid = 0x3B7;
break;
case 97:
songid = 0x32F;
break;
case 98:
songid = 0x330;
break;
case 99:
songid = 0x331;
break;
case 100:
songid = 0x320;
break;
case 101:
songid = 0x321;
break;
case 102:
songid = gBanimSongTable7[val1][pos + val2 * 2];
break;
case 103:
songid = gBanimSongTable8[val1][pos + val2 * 2];
break;
case 104:
songid = 0x3C0;
break;
case 106:
songid = 0x3C2;
break;
case 107:
songid = 0x3C3;
break;
case 108:
songid = 0x3C4;
break;
case 109:
songid = gBanimSongTable1[val1][pos];
break;
case 110:
songid = gBanimSongTable1[val1][pos + 2];
break;
case 111:
songid = gBanimSongTable1[val1][pos + 4];
break;
case 112:
songid = gBanimSongTable1[val1][pos + 6];
break;
case 115:
songid = 0x322;
break;
case 116:
songid = 0x37D;
break;
case 117:
songid = 0x329;
break;
case 118:
songid = 0x37A;
break;
case 119:
songid = 0x37B;
break;
case 120:
songid = 0x2E4;
break;
case 121:
songid = 0x37C;
break;
case 122:
songid = 0x37F;
break;
case 123:
songid = 0xDE;
break;
default:
songid = 0x0;
break;
}
_songid = songid;
if (_songid != -1)
{
EfxPlaySE(_songid, volume);
M4aPlayWithPostionCtrl(_songid, val3, 1);
}
}
#endif

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "anime.h"
#include "ekrbattle.h"
#include "efxbattle.h"
@ -9,6 +10,7 @@
#include "bmlib.h"
#include "bmmap.h"
#include "rng.h"
#include "constants/classes.h"
#include "constants/items.h"
@ -734,3 +736,135 @@ void EkrsubAnimeEmulatorMain(struct ProcEkrSubAnimeEmulator * proc)
AnimDisplay(&_anim);
}
}
const s16 gAnimSpriteRotScalePosX[] = {
0x08, 0x10, 0x20, 0x40,
0x10, 0x20, 0x20, 0x40,
0x08, 0x08, 0x10, 0x20,
-1, -1, -1, -1
};
int GetAnimSpriteRotScaleX(u32 header)
{
u32 a = header >> 30;
u32 b = header & 0xC000;
#if !NONMATCHING
const s16 * src = gAnimSpriteRotScalePosX;
a = a << 1;
b = b >> 11;
a = a + b;
return *(s16 *)((void *)src + a);
#else
return gAnimSpriteRotScalePosX[a + (b >> 12)];
#endif
}
const s16 gAnimSpriteRotScalePosY[] = {
0x08, 0x10, 0x20, 0x40,
0x08, 0x08, 0x10, 0x20,
0x10, 0x20, 0x20, 0x40,
-1, -1, -1, -1
};
int GetAnimSpriteRotScaleY(u32 header)
{
u32 a = header >> 30;
u32 b = header & 0xC000;
#if !NONMATCHING
const s16 * src = gAnimSpriteRotScalePosY;
a = a << 1;
b = b >> 11;
a = a + b;
return *(s16 *)((void *)src + a);
#else
return gAnimSpriteRotScalePosY[a + (b >> 12)];
#endif
}
void BanimUpdateSpriteRotScale(void * src, struct AnimSpriteData * out, s16 x, s16 y, int unused)
{
struct ObjAffineSrcData affin_src;
struct AnimSpriteData * anim_sprite, * it;
struct AnimSpriteData * scr = src;
affin_src.rotation = 0;
affin_src.xScale = x;
affin_src.yScale = y;
out[0].header = 0xFFFF0004;
ObjAffineSet(&affin_src, &out[0].as.affine, 1, 2);
anim_sprite = &out[1];
out[1].header = 0xFFFF0004;
ObjAffineSet(&affin_src, &out[1].as.affine, 1, 2);
anim_sprite->as.affine.pa = -anim_sprite->as.affine.pa;
anim_sprite->as.affine.pb = -anim_sprite->as.affine.pb;
anim_sprite = &out[2];
anim_sprite->header = 0xFFFF0004;
ObjAffineSet(&affin_src, &out[2].as.affine, 1, 2);
anim_sprite->as.affine.pc = -anim_sprite->as.affine.pc;
anim_sprite->as.affine.pd = -anim_sprite->as.affine.pd;
anim_sprite = &out[3];
anim_sprite->header = 0xFFFF0004;
ObjAffineSet(&affin_src, &out[3].as.affine, 1, 2);
anim_sprite->as.affine.pa = -anim_sprite->as.affine.pa;
anim_sprite->as.affine.pb = -anim_sprite->as.affine.pb;
anim_sprite->as.affine.pc = -anim_sprite->as.affine.pc;
anim_sprite->as.affine.pd = -anim_sprite->as.affine.pd;
out = out + 4;
for (; scr->header != 1; out++, scr++)
{
s16 r8, r5;
int val1, val2, val, _val, header;
r8 = x;
r5 = y;
header = scr->header;
val = ((int)(-(header & 0x10000000)) >> 0x1F) & 0x2000000;
if (header & 0x20000000)
val = val + 0x4000000;
out->header = (header &~ 0x3E000000) + 0x100 + val;
out->as.object.oam2 = scr->as.object.oam2;
val1 = GetAnimSpriteRotScaleX(header);
val1 = val1 << 0x10;
val1 = val1 >> 0x11;
_val = val1 << 8;
_val = val1 - Div(_val, r8);
val1 = scr->as.object.x - _val;
_val = scr->as.object.x << 8;
_val = Div(_val, r8);
_val = scr->as.object.x - _val;
val1 = val1 - _val;
out->as.object.x = val1;
val1 = GetAnimSpriteRotScaleY(scr->header);
val1 = val1 << 0x10;
val1 = val1 >> 0x11;
_val = val1 << 8;
_val = val1 - Div(_val, r5);
val1 = scr->as.object.y - _val;
_val = scr->as.object.y << 8;
_val = Div(_val, r5);
_val = scr->as.object.y - _val;
val1 = val1 - _val;
out->as.object.y = val1;
}
out->header = scr->header;
out->as.object.oam2 = scr->as.object.oam2;
out->as.object.x = scr->as.object.x;
out->as.object.y = scr->as.object.y;
}

View File

@ -125,7 +125,7 @@ void InBattleMainRoutine(void)
void MainUpdateEkrBattle(void)
{
ClearSprites();
sub_8071A8C();
UnregisterEfxSoundSeExist();
if (GetGameLock() == 0)
Proc_Run(gProcTreeRootArray[2]);

View File

@ -550,7 +550,7 @@ void UnitKakudaiPrepareAnimScript(struct ProcUnitKakudai * proc)
void UnitKakudaiMain(struct ProcUnitKakudai * proc)
{
u16 ret1, x, y;
u8 sprite_data[0x300];
struct AnimSpriteData sprite_data[0x40];
struct Anim _anim;
struct Anim * anim = &_anim;
@ -569,7 +569,7 @@ void UnitKakudaiMain(struct ProcUnitKakudai * proc)
if (proc->valid_l == 1)
{
EkrGetUnitSpriteDataMaybe(proc->pOaml, sprite_data, ret1, ret1, 0);
BanimUpdateSpriteRotScale(proc->pOaml, sprite_data, ret1, ret1, 0);
if (proc->type == 0)
{
@ -592,7 +592,7 @@ void UnitKakudaiMain(struct ProcUnitKakudai * proc)
if (proc->valid_r == 1)
{
EkrGetUnitSpriteDataMaybe(proc->pOamr, sprite_data, ret1, ret1, 1);
BanimUpdateSpriteRotScale(proc->pOamr, sprite_data, ret1, ret1, 1);
if (proc->type == 0)
{

View File

@ -413,7 +413,7 @@ void ekrGaugeMain(struct ProcEkrGauge * proc)
anim->oamBase = 0x200;
anim->xPosition = anim->xPosition - 8;
anim->yPosition = anim->yPosition - 8;
EkrGetUnitSpriteDataMaybe(gUnknown_085B940C, sprite_data, 0x100, 0x80, 1);
BanimUpdateSpriteRotScale(gUnknown_085B940C, sprite_data, 0x100, 0x80, 1);
}
if (proc->unk4C == 0)
@ -436,7 +436,7 @@ void ekrGaugeMain(struct ProcEkrGauge * proc)
anim->oamBase = 0x200;
anim->xPosition = anim->xPosition - 8;
anim->yPosition = anim->yPosition - 8;
EkrGetUnitSpriteDataMaybe(gUnknown_085B940C, sprite_data, 0x100, 0x80, 1);
BanimUpdateSpriteRotScale(gUnknown_085B940C, sprite_data, 0x100, 0x80, 1);
}
if (proc->unk50 == 0)

View File

@ -260,7 +260,7 @@
. = 0x020048;
. = ALIGN(4); src/banim-ekrdragonstatus.o(ewram_data);
. = 0x0200A8; gUnknown_020200A8 = .;
. = 0x0200AC; gUnknown_020200AC = .;
. = 0x0200AC; gEfxSoundSeExist = .;
. = 0x0200B0; gpProcEkrClasschg = .;
. = 0x0200B4; gpProcEkrLevelup = .;
. = 0x0200B8; gUnknown_020200B8 = .;