mapanim-lvup & lvupfx: decompiled

This commit is contained in:
mokhaleee 2023-05-09 16:34:34 +08:00
parent 6998983b1a
commit c4f8d48aa8
63 changed files with 5425 additions and 6350 deletions

View File

@ -787,7 +787,7 @@ sub_8074B38: @ 0x08074B38
sub_8074B40: @ 0x08074B40
push {r4, r5, lr}
adds r5, r0, #0
ldr r1, _08074B8C @ gUnknown_089AC5CC
ldr r1, _08074B8C @ Pal_ManimLevelUpStatGainCycling
ldrh r0, [r5, #0x2e]
adds r4, r0, #1
strh r4, [r5, #0x2e]
@ -823,7 +823,7 @@ _08074B86:
pop {r0}
bx r0
.align 2, 0
_08074B8C: .4byte gUnknown_089AC5CC
_08074B8C: .4byte Pal_ManimLevelUpStatGainCycling
THUMB_FUNC_END sub_8074B40
@ -831,7 +831,7 @@ _08074B8C: .4byte gUnknown_089AC5CC
NewEkrLvupApfx: @ 0x08074B90
push {r4, r5, lr}
adds r5, r1, #0
ldr r2, _08074BDC @ gUnknown_089ACA08
ldr r2, _08074BDC @ Img_ManimLevelUpStatGain
ldr r1, _08074BE0 @ 0x000003FF
ands r1, r0
lsls r1, r1, #5
@ -839,7 +839,7 @@ NewEkrLvupApfx: @ 0x08074B90
adds r1, r1, r0
adds r0, r2, #0
bl Decompress
ldr r4, _08074BE8 @ gUnknown_089AC9A8
ldr r4, _08074BE8 @ Pal_ManimLevelUp
adds r1, r5, #0
adds r1, #0x10
lsls r1, r1, #5
@ -863,10 +863,10 @@ NewEkrLvupApfx: @ 0x08074B90
pop {r0}
bx r0
.align 2, 0
_08074BDC: .4byte gUnknown_089ACA08
_08074BDC: .4byte Img_ManimLevelUpStatGain
_08074BE0: .4byte 0x000003FF
_08074BE4: .4byte 0x06010000
_08074BE8: .4byte gUnknown_089AC9A8
_08074BE8: .4byte Pal_ManimLevelUp
_08074BEC: .4byte ProcScr_EkrLvupApfx
_08074BF0: .4byte gpProcEkrLvupApfx
@ -914,7 +914,7 @@ _08074C28:
ldr r7, _08074C74 @ 0x06010000
adds r1, r1, r7
movs r2, #0x40
bl sub_801498C
bl VramCopy
adds r0, r4, #0
cmp r0, #0
bge _08074C4A
@ -930,7 +930,7 @@ _08074C4A:
lsls r1, r1, #5
adds r1, r1, r7
movs r2, #0x40
bl sub_801498C
bl VramCopy
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7}
@ -951,7 +951,7 @@ sub_8074C78: @ 0x08074C78
push {r6, r7}
adds r7, r0, #0
adds r6, r1, #0
ldr r0, _08074CC0 @ gUnknown_089ACC98
ldr r0, _08074CC0 @ Img_ManimLevelUpStatGainDigits
mov r9, r0
ldr r0, _08074CC4 @ gUnknown_085C8278
mov r8, r0
@ -967,7 +967,7 @@ sub_8074C78: @ 0x08074C78
ldr r4, _08074CCC @ 0x06010000
adds r1, r1, r4
movs r2, #0x40
bl sub_801498C
bl VramCopy
movs r0, #0xe0
lsls r0, r0, #3
add r0, r8
@ -977,10 +977,10 @@ sub_8074C78: @ 0x08074C78
lsls r1, r1, #5
adds r1, r1, r4
movs r2, #0x40
bl sub_801498C
bl VramCopy
b _08074D00
.align 2, 0
_08074CC0: .4byte gUnknown_089ACC98
_08074CC0: .4byte Img_ManimLevelUpStatGainDigits
_08074CC4: .4byte gUnknown_085C8278
_08074CC8: .4byte 0x000003FF
_08074CCC: .4byte 0x06010000
@ -996,7 +996,7 @@ _08074CD0:
ldr r4, _08074D54 @ 0x06010000
adds r1, r1, r4
movs r2, #0x40
bl sub_801498C
bl VramCopy
movs r0, #0xe8
lsls r0, r0, #3
add r0, r8
@ -1006,7 +1006,7 @@ _08074CD0:
lsls r1, r1, #5
adds r1, r1, r4
movs r2, #0x40
bl sub_801498C
bl VramCopy
_08074D00:
adds r0, r7, #0
cmp r7, #0
@ -1024,7 +1024,7 @@ _08074D08:
ldr r5, _08074D54 @ 0x06010000
adds r1, r1, r5
movs r2, #0x20
bl sub_801498C
bl VramCopy
adds r0, r7, #0
cmp r0, #0
bge _08074D2A
@ -1040,7 +1040,7 @@ _08074D2A:
lsls r1, r1, #5
adds r1, r1, r5
movs r2, #0x20
bl sub_801498C
bl VramCopy
pop {r3, r4}
mov r8, r3
mov r9, r4

View File

@ -2636,46 +2636,4 @@ _0805AE10: .4byte gUnknown_085C7438
THUMB_FUNC_END sub_805AA68
THUMB_FUNC_START sub_805AE14
sub_805AE14: @ 0x0805AE14
push {r4, lr}
adds r4, r0, #0
movs r0, #0xe
ldrsh r1, [r4, r0]
movs r0, #1
negs r0, r0
cmp r1, r0
bne _0805AE38
ldr r0, [r4, #0x14]
cmp r0, #0
beq _0805AE2E
bl Proc_End
_0805AE2E:
ldr r0, [r4, #0x18]
cmp r0, #0
beq _0805AE38
bl Proc_End
_0805AE38:
pop {r4}
pop {r0}
bx r0
THUMB_FUNC_END sub_805AE14
THUMB_FUNC_START sub_805AE40
sub_805AE40: @ 0x0805AE40
push {r4, r5, lr}
ldr r4, [sp, #0xc]
ldr r5, [r0, #0x14]
strh r1, [r5, #0x32]
strh r2, [r5, #0x3a]
ldr r5, [r0, #0x18]
strh r3, [r5, #0x32]
strh r4, [r5, #0x3a]
pop {r4, r5}
pop {r0}
bx r0
THUMB_FUNC_END sub_805AE40
.align 2, 0

View File

@ -2124,7 +2124,7 @@ sub_8071A54: @ 0x08071A54
adds r0, r2, #0
bl Sound_SetSEVolume
adds r0, r4, #0
bl sub_8002620
bl OverrideBgm
_08071A72:
pop {r4}
pop {r0}
@ -3849,13 +3849,13 @@ sub_807289C: @ 0x0807289C
cmp r0, #0
bne _080728C8
_080728BA:
bl sub_800270C
bl MakeBgmOverridePersist
b _080728CC
.align 2, 0
_080728C0: .4byte gBmSt
_080728C4: .4byte gUnknown_020200A8
_080728C8:
bl sub_8002670
bl RestoreBgm
_080728CC:
pop {r0}
bx r0

View File

@ -2900,7 +2900,7 @@ _080B9FAA:
cmp r0, r4
beq _080B9FB8
adds r0, r4, #0
bl sub_8002620
bl OverrideBgm
_080B9FB8:
pop {r4}
pop {r0}
@ -24592,7 +24592,7 @@ sub_80C3F04: @ 0x080C3F04
ldr r0, [r1, #0x34]
movs r1, #1
movs r2, #0
bl Sound_PlaySong8002574
bl StartBgmFadeIn
_080C3F1E:
pop {r0}
bx r0

View File

@ -1229,7 +1229,7 @@ _080C6D72:
movs r0, #1
movs r1, #0
movs r2, #0
bl Sound_PlaySong80024E4
bl StartBgmExt
add sp, #8
pop {r4, r5, r6}
pop {r0}

File diff suppressed because it is too large Load Diff

View File

@ -8784,13 +8784,13 @@ sub_80458E8: @ 0x080458E8
movs r0, #0x3a
movs r1, #0
movs r2, #0
bl Sound_PlaySong80024E4
bl StartBgmExt
b _08045906
_080458FC:
movs r0, #0x3b
movs r1, #0
movs r2, #0
bl Sound_PlaySong80024E4
bl StartBgmExt
_08045906:
ldr r0, _0804591C @ gPlaySt
adds r0, #0x41
@ -8814,7 +8814,7 @@ sub_8045920: @ 0x08045920
movs r0, #0x3b
movs r1, #0
movs r2, #0
bl Sound_PlaySong80024E4
bl StartBgmExt
pop {r0}
bx r0
@ -13105,7 +13105,7 @@ _08047BFC:
str r0, [r6, #0x54]
movs r0, #0x38
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
bl sub_80497CC
add sp, #4
pop {r4, r5, r6, r7}
@ -13412,7 +13412,7 @@ _08047E68:
bl sub_80497CC
movs r0, #0x38
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
movs r0, #0
str r0, [r6, #0x54]
add sp, #4
@ -24546,7 +24546,7 @@ StopBGM2: @ 0x0804D3DC
push {lr}
ldr r1, _0804D3EC @ gMPlayInfo_BGM2
movs r0, #0x34
bl Sound_PlaySong80024D4
bl StartBgm
pop {r0}
bx r0
.align 2, 0

View File

@ -1153,7 +1153,7 @@ sub_80835DC: @ 0x080835DC
bne _08083614
movs r0, #0x3e
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
ldr r0, _08083610 @ gPlaySt
adds r0, #0x41
ldrb r1, [r0]
@ -1175,7 +1175,7 @@ _08083614:
bne _08083630
movs r0, #0x3f
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
_08083630:
ldrh r0, [r4, #6]
cmp r0, #0
@ -1386,7 +1386,7 @@ sub_80837B0: @ 0x080837B0
bl SetEventId
movs r0, #0x3e
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
ldr r0, _080837D4 @ gPlaySt
adds r0, #0x41
ldrb r1, [r0]

View File

@ -1140,7 +1140,7 @@ _0800DD98:
asrs r0, r0, #0x10
movs r1, #3
movs r2, #0
bl Sound_PlaySong80024E4
bl StartBgmExt
movs r0, #2
_0800DDA6:
pop {r1}
@ -1186,7 +1186,7 @@ _0800DDEC:
adds r0, r3, #0
adds r1, r4, #0
movs r2, #0
bl Sound_PlaySong8002574
bl StartBgmFadeIn
b _0800DE0C
_0800DDF8:
ldrh r0, [r2, #0x3c]
@ -1246,14 +1246,14 @@ _0800DE46:
_0800DE50:
lsls r0, r4, #0x10
asrs r0, r0, #0x10
bl sub_8002620
bl OverrideBgm
b _0800DE6A
.align 2, 0
_0800DE5C: .4byte gEventSlots
_0800DE60:
bl DeleteAll6CWaitMusicRelated
adds r0, r4, #0
bl sub_80026BC
bl _RestoreBgm
_0800DE6A:
movs r0, #2
_0800DE6C:
@ -1290,7 +1290,7 @@ _0800DE9A:
lsls r0, r0, #1
movs r1, #0x90
movs r2, #0xa
bl ISuspectThisToBeMusicRelated_8002730
bl StartBgmVolumeChange
b _0800DECC
_0800DEA8:
ldrh r0, [r3, #0x3c]
@ -1309,7 +1309,7 @@ _0800DEC0:
lsls r1, r1, #1
movs r0, #0x90
movs r2, #0xa
bl ISuspectThisToBeMusicRelated_8002730
bl StartBgmVolumeChange
_0800DECC:
movs r0, #2
_0800DECE:

View File

@ -2183,8 +2183,8 @@ _080143D4: .4byte gUnknown_0859A0F3
THUMB_FUNC_END String_FromNumber
THUMB_FUNC_START DrawMapBattleInfoText
DrawMapBattleInfoText: @ 0x080143D8
THUMB_FUNC_START PutStringCentered
PutStringCentered: @ 0x080143D8
push {r4, r5, r6, lr}
mov r6, r9
mov r5, r8
@ -2229,10 +2229,10 @@ DrawMapBattleInfoText: @ 0x080143D8
.align 2, 0
_08014438: .4byte gUnknown_03000800
THUMB_FUNC_END DrawMapBattleInfoText
THUMB_FUNC_END PutStringCentered
THUMB_FUNC_START MADrawTextMaybe
MADrawTextMaybe: @ 0x0801443C
THUMB_FUNC_START PutString
PutString: @ 0x0801443C
push {r4, r5, r6, r7, lr}
adds r7, r0, #0
adds r6, r1, #0
@ -2264,7 +2264,7 @@ _08014454:
.align 2, 0
_0801447C: .4byte gUnknown_03000800
THUMB_FUNC_END MADrawTextMaybe
THUMB_FUNC_END PutString
THUMB_FUNC_START DeleteAllPaletteAnimator
DeleteAllPaletteAnimator: @ 0x08014480
@ -3019,8 +3019,8 @@ _08014986:
THUMB_FUNC_END sub_8014968
THUMB_FUNC_START sub_801498C
sub_801498C: @ 0x0801498C
THUMB_FUNC_START VramCopy
VramCopy: @ 0x0801498C
push {r4, lr}
adds r4, r0, #0
adds r3, r2, #0
@ -3050,7 +3050,7 @@ _080149BC:
pop {r0}
bx r0
THUMB_FUNC_END sub_801498C
THUMB_FUNC_END VramCopy
THUMB_FUNC_START sub_80149C4
sub_80149C4: @ 0x080149C4
@ -3065,7 +3065,7 @@ _080149D2:
adds r0, r6, #0
adds r1, r5, #0
adds r2, r7, #0
bl sub_801498C
bl VramCopy
adds r6, r6, r7
movs r0, #0x80
lsls r0, r0, #3
@ -3080,8 +3080,8 @@ _080149EA:
THUMB_FUNC_END sub_80149C4
THUMB_FUNC_START sub_80149F0
sub_80149F0: @ 0x080149F0
THUMB_FUNC_START PutTmLinear
PutTmLinear: @ 0x080149F0
push {r4, lr}
adds r4, r0, #0
lsls r3, r3, #0x10
@ -3102,10 +3102,10 @@ _08014A0C:
pop {r0}
bx r0
THUMB_FUNC_END sub_80149F0
THUMB_FUNC_END PutTmLinear
THUMB_FUNC_START sub_8014A14
sub_8014A14: @ 0x08014A14
THUMB_FUNC_START GetTmOffsetById
GetTmOffsetById: @ 0x08014A14
push {lr}
cmp r0, #1
beq _08014A40
@ -3162,7 +3162,7 @@ _08014A72:
pop {r1}
bx r1
THUMB_FUNC_END sub_8014A14
THUMB_FUNC_END GetTmOffsetById
THUMB_FUNC_START sub_8014A78
sub_8014A78: @ 0x08014A78
@ -3349,7 +3349,7 @@ sub_8014BC0: @ 0x08014BC0
lsls r0, r0, #0x10
asrs r0, r0, #0x10
movs r1, #0
bl Sound_PlaySong80024D4
bl StartBgm
pop {r0}
bx r0

3706
asm/mapanim_807CDD0.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1702,7 +1702,7 @@ sub_809CC9C: @ 0x0809CC9C
cmp r0, #0
beq _0809CCB8
movs r0, #0x38
bl sub_8002620
bl OverrideBgm
b _0809CCDA
_0809CCB8:
ldr r0, _0809CCD0 @ gGMData
@ -1711,14 +1711,14 @@ _0809CCB8:
ands r0, r1
cmp r0, #0
beq _0809CCD4
bl sub_800270C
bl MakeBgmOverridePersist
bl sub_80B9FC0
b _0809CCDA
.align 2, 0
_0809CCD0: .4byte gGMData
_0809CCD4:
movs r0, #0x34
bl sub_8002620
bl OverrideBgm
_0809CCDA:
pop {r0}
bx r0
@ -1863,7 +1863,7 @@ PrepItemBooster_OnInit: @ 0x0809CDD4
movs r1, #3
movs r2, #0
adds r3, r7, #0
bl sub_807EDF8
bl StartManimLevelUpStatGainLabels
ldr r0, [r4, #0x2c]
bl GetUnitCurrentHp
adds r1, r7, #0
@ -1999,7 +1999,7 @@ _0809CEF0:
ldrb r2, [r2]
ldrb r3, [r3]
subs r2, r2, r3
bl sub_807EFF0
bl StartPrepItemBoostStatGainLabelAnim
_0809CF1E:
adds r4, #1
cmp r4, #7
@ -2108,7 +2108,7 @@ _0809CFD4:
bl DrawPrepScreenItemUseItemUseDesc
movs r0, #0
bl sub_80ACA84
bl sub_807EE74
bl EndManimLevelUpStatGainLabels
movs r0, #5
bl BG_EnableSyncByMask
ldr r0, _0809D010 @ 0x06014000
@ -2233,7 +2233,7 @@ PrepJunaEffect_OnInit: @ 0x0809D0D4
movs r1, #3
movs r2, #0
adds r3, r7, #0
bl sub_807EDF8
bl StartManimLevelUpStatGainLabels
ldr r0, [r4, #0x2c]
ldrb r0, [r0, #8]
movs r1, #0x30
@ -2279,7 +2279,7 @@ PrepJunaEffect_OnInit: @ 0x0809D0D4
subs r2, r2, r0
movs r0, #0xb0
movs r1, #0x1a
bl sub_807EFF0
bl StartPrepItemBoostStatGainLabelAnim
_0809D154:
movs r0, #0x78
str r0, [r7, #0x2c]

View File

@ -1,705 +1,4 @@
.section .data
.global gUnknown_089A398C
gUnknown_089A398C: @ 0x089A398C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807CE18
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807CE78
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D09C
@ PROC_SLEEP
.short 0xe, 0x14
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A39C4
gUnknown_089A39C4: @ 0x089A39C4
@ replacing .incbin "baserom.gba", 0x009a39c4, 0x1c
.4byte gUnknown_089B80C4 + 0x20
.4byte gUnknown_089B80C4 + 0x7c
.4byte gUnknown_089B80C4 + 0xe0
.4byte gUnknown_089B80C4 + 0x150
.4byte gUnknown_089B80C4 + 0x1c8
.4byte gUnknown_089B80C4 + 0x22c
.4byte gUnknown_089B80C4 + 0x298
.global gUnknown_089A39E0
gUnknown_089A39E0: @ 0x089A39E0
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D0FC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D1B4
@ PROC_START_CHILD_BLOCKING
.short 0x6, 0x1
.word gUnknown_089A3A28
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A18
gUnknown_089A3A18: @ 0x089A3A18
.incbin "baserom.gba", 0x9A3A18, 0x10
.global gUnknown_089A3A28
gUnknown_089A3A28: @ 0x089A3A28
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D2E0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D328
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A40
gUnknown_089A3A40: @ 0x089A3A40
@ PROC_SET_END_CB
.short 0x4, 0x0
.word sub_807D39C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D3B4
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D3CC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D40C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D440
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D464
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A80
gUnknown_089A3A80: @ 0x089A3A80
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D51C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D57C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D670
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3AB8
gUnknown_089A3AB8: @ 0x089A3AB8
@ replacing .incbin "baserom.gba", 0x009a3ab8, 0x84
.4byte gUnknown_089B4BFC + 0x20
.4byte gUnknown_089B4BFC + 0x84
.4byte gUnknown_089B4BFC + 0xec
.4byte gUnknown_089B4BFC + 0x168
.4byte gUnknown_089B4BFC + 0x1e0
.4byte gUnknown_089B4BFC + 0x250
.4byte gUnknown_089B4BFC + 0x2bc
.4byte gUnknown_089B4BFC + 0x330
.4byte gUnknown_089B4BFC + 0x3a8
.4byte gUnknown_089B4BFC + 0x420
.4byte gUnknown_089B4BFC + 0x498
.4byte gUnknown_089B4BFC + 0x51c
.4byte gUnknown_089B4BFC + 0x5a0
.4byte gUnknown_089B4BFC + 0x624
.4byte gUnknown_089B4BFC + 0x6a8
.4byte gUnknown_089B4BFC + 0x714
.4byte gUnknown_089B4BFC + 0x79c
.4byte gUnknown_089B4BFC + 0x838
.4byte gUnknown_089B4BFC + 0x8f4
.4byte gUnknown_089B4BFC + 0x9f0
.4byte gUnknown_089B4BFC + 0xb24
.4byte gUnknown_089B4BFC + 0xce0
.4byte gUnknown_089B4BFC + 0xf3c
.4byte gUnknown_089B4BFC + 0x1070
.4byte gUnknown_089B4BFC + 0x1210
.4byte gUnknown_089B4BFC + 0x1454
.4byte gUnknown_089B4BFC + 0x1578
.4byte gUnknown_089B4BFC + 0x1710
.4byte gUnknown_089B4BFC + 0x1914
.4byte gUnknown_089B4BFC + 0x19d8
.4byte gUnknown_089B4BFC + 0x1ac0
.4byte gUnknown_089B4BFC + 0x1c0c
.4byte gUnknown_089B4BFC + 0x1dc0
.global gUnknown_089A3B3C
gUnknown_089A3B3C: @ 0x089A3B3C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D6D8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D760
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3B6C
gUnknown_089A3B6C: @ 0x089A3B6C
.incbin "baserom.gba", 0x9A3B6C, 0x18
.global gUnknown_089A3B84
gUnknown_089A3B84: @ 0x089A3B84
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D818
@ PROC_SLEEP
.short 0xe, 0x64
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3BA4
gUnknown_089A3BA4: @ 0x089A3BA4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D860
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D944
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D9B8
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3BDC
gUnknown_089A3BDC: @ 0x089A3BDC
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DAE8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DB30
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C0C
gUnknown_089A3C0C: @ 0x089A3C0C
@ Replacing .incbin "baserom.gba", 0x9A3C0C, 0x18
.4byte 0x03020100
.4byte 0x03030303
.4byte 0x03030303
.4byte 0x04030303
.4byte 0x08070605
.4byte 0x0000ff09
.global gUnknown_089A3C24
gUnknown_089A3C24: @ 0x089A3C24
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DBE4
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DCA8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DD0C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DD74
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C6C
gUnknown_089A3C6C: @ 0x089A3C6C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DDC8
@ PROC_SLEEP
.short 0xe, 0x78
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C94
gUnknown_089A3C94: @ 0x089A3C94
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE80
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE70
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DEDC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DF5C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DFAC
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3CD4
gUnknown_089A3CD4: @ 0x089A3CD4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE80
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E038
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E054
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DF5C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DFAC
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D14
gUnknown_089A3D14: @ 0x089A3D14
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E118
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E17C
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E1B0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D54
gUnknown_089A3D54: @ 0x089A3D54
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E22C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E28C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E334
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D8C
gUnknown_089A3D8C: @ 0x089A3D8C
@ replacing .incbin "baserom.gba", 0x009a3d8c, 0x28
.4byte gUnknown_089B73D4 + 0x20
.4byte gUnknown_089B73D4 + 0x40
.4byte gUnknown_089B73D4 + 0x68
.4byte gUnknown_089B73D4 + 0x94
.4byte gUnknown_089B73D4 + 0xc8
.4byte gUnknown_089B73D4 + 0x100
.4byte gUnknown_089B73D4 + 0x140
.4byte gUnknown_089B73D4 + 0x180
.4byte gUnknown_089B73D4 + 0x1c8
.4byte gUnknown_089B73D4 + 0x204
.global gUnknown_089A3DB4
gUnknown_089A3DB4: @ 0x089A3DB4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E390
@ PROC_SLEEP
.short 0xe, 0xa
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E404
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E448
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3DFC
gUnknown_089A3DFC: @ 0x089A3DFC
@ Replacing .incbin "baserom.gba", 0x9A3DFC, 0x8
.4byte 0x08070604
.4byte 0x00ff0908
.global gUnknown_089A3E04
gUnknown_089A3E04: @ 0x089A3E04
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E4D0
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E584
@ PROC_SLEEP
.short 0xe, 0x28
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E5F0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3E44
gUnknown_089A3E44: @ 0x089A3E44
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E67C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E6E0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3E6C
gUnknown_089A3E6C: @ 0x089A3E6C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E7E0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E8B0
@ PROC_SLEEP
.short 0xe, 0x50
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E934
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E79C
@ PROC_SLEEP
.short 0xe, 0x4
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E7C4
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3EC4
gUnknown_089A3EC4: @ 0x089A3EC4
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807EA60
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3ED4
gUnknown_089A3ED4: @ 0x089A3ED4
@ Replacing .incbin "baserom.gba", 0x9A3ED4, 0x78
.4byte 0x00000009
.4byte gMid_Lv
.4byte gMid_Lv
.4byte 0x00000401
.4byte gMid_Hp
.4byte gMid_Hp
.4byte 0x00000601
.4byte gMid_Str
.4byte gMid_Mag
.4byte 0x00000801
.4byte gMid_Skl
.4byte gMid_Skl
.4byte 0x00000a01
.4byte gMid_Spd
.4byte gMid_Spd
.4byte 0x00000409
.4byte gMid_Lck
.4byte gMid_Lck
.4byte 0x00000609
.4byte gMid_Def
.4byte gMid_Def
.4byte 0x00000809
.4byte gMid_Res
.4byte gMid_Res
.4byte 0x00000a09
.4byte gMid_Con
.4byte gMid_Con
.4byte 0x0000ffff
.4byte 0x00000000
.4byte 0x00000000
.global gUnknown_089A3F4C
gUnknown_089A3F4C: @ 0x089A3F4C
@ PROC_SET_END_CB
.short 0x4, 0x0
.word sub_807EDEC
@ PROC_BLOCK
.short 0x10, 0x0
.word 0x0
.global gUnknown_089A3F5C
gUnknown_089A3F5C: @ 0x089A3F5C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F2B4
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807F2BC
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3F74
gUnknown_089A3F74: @ 0x089A3F74
@ PROC_SET_END_CB
.short 0x4, 0x0
.word sub_807F55C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F124
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F478
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F48C
@ PROC_SLEEP
.short 0xe, 0x46
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F53C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F548
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F1AC
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807F30C
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807F39C
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807EE74
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807F354
@ PROC_CALL
.short 0x2, 0x0
.word sub_807F190
@ PROC_CALL
.short 0x2, 0x0
.word ResetDialogueScreen
@ PROC_SLEEP
.short 0xe, 0x4
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0
.section .data
.global gUnknown_089A4034
gUnknown_089A4034: @ 0x089A4034
@ -2539,8 +1838,8 @@ gUnknown_089A52FC: @ 0x089A52FC
.word 0x0
.global gUnknown_089A5314
gUnknown_089A5314: @ 0x089A5314
.global SpriteAnim_ManimStatGain
SpriteAnim_ManimStatGain: @ 0x089A5314
.incbin "baserom.gba", 0x9A5314, 0x758
.global gUnknown_089A5A6C
@ -2599,24 +1898,24 @@ Img_MapAnimNODAMAGE: @ 0x089AC2FC
obj_MapAnimNODAMAGE: @ 0x089AC440
.incbin "baserom.gba", 0x9AC440, 0x18C
.global gUnknown_089AC5CC
gUnknown_089AC5CC: @ 0x089AC5CC
.global Pal_ManimLevelUpStatGainCycling
Pal_ManimLevelUpStatGainCycling: @ 0x089AC5CC
.incbin "baserom.gba", 0x9AC5CC, 0x1C8
.global gUnknown_089AC794
gUnknown_089AC794: @ 0x089AC794
.global Img_ManimLevelUpText
Img_ManimLevelUpText: @ 0x089AC794
.incbin "baserom.gba", 0x9AC794, 0x214
.global gUnknown_089AC9A8
gUnknown_089AC9A8: @ 0x089AC9A8
.global Pal_ManimLevelUp
Pal_ManimLevelUp: @ 0x089AC9A8
.incbin "baserom.gba", 0x9AC9A8, 0x60
.global gUnknown_089ACA08
gUnknown_089ACA08: @ 0x089ACA08
.global Img_ManimLevelUpStatGain
Img_ManimLevelUpStatGain: @ 0x089ACA08
.incbin "baserom.gba", 0x9ACA08, 0x290
.global gUnknown_089ACC98
gUnknown_089ACC98: @ 0x089ACC98
.global Img_ManimLevelUpStatGainDigits
Img_ManimLevelUpStatGainDigits: @ 0x089ACC98
.incbin "baserom.gba", 0x9ACC98, 0x800
.global gUnknown_089AD498

View File

@ -182,7 +182,7 @@ ProcScr_PrepItemJunaFruitEffect: @ 0x08A191C4
.word sub_809D17C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807EE74
.word EndManimLevelUpStatGainLabels
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0

571
data/mapanim_89A398C.s Normal file
View File

@ -0,0 +1,571 @@
.section .data
.global gUnknown_089A398C
gUnknown_089A398C: @ 0x089A398C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807CE18
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807CE78
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D09C
@ PROC_SLEEP
.short 0xe, 0x14
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A39C4
gUnknown_089A39C4: @ 0x089A39C4
@ replacing .incbin "baserom.gba", 0x009a39c4, 0x1c
.4byte gUnknown_089B80C4 + 0x20
.4byte gUnknown_089B80C4 + 0x7c
.4byte gUnknown_089B80C4 + 0xe0
.4byte gUnknown_089B80C4 + 0x150
.4byte gUnknown_089B80C4 + 0x1c8
.4byte gUnknown_089B80C4 + 0x22c
.4byte gUnknown_089B80C4 + 0x298
.global gUnknown_089A39E0
gUnknown_089A39E0: @ 0x089A39E0
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D0FC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D1B4
@ PROC_START_CHILD_BLOCKING
.short 0x6, 0x1
.word gUnknown_089A3A28
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A18
gUnknown_089A3A18: @ 0x089A3A18
.incbin "baserom.gba", 0x9A3A18, 0x10
.global gUnknown_089A3A28
gUnknown_089A3A28: @ 0x089A3A28
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D2E0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D328
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A40
gUnknown_089A3A40: @ 0x089A3A40
@ PROC_SET_END_CB
.short 0x4, 0x0
.word sub_807D39C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D3B4
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D3CC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D40C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D440
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D464
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3A80
gUnknown_089A3A80: @ 0x089A3A80
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D51C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D57C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D670
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3AB8
gUnknown_089A3AB8: @ 0x089A3AB8
@ replacing .incbin "baserom.gba", 0x009a3ab8, 0x84
.4byte gUnknown_089B4BFC + 0x20
.4byte gUnknown_089B4BFC + 0x84
.4byte gUnknown_089B4BFC + 0xec
.4byte gUnknown_089B4BFC + 0x168
.4byte gUnknown_089B4BFC + 0x1e0
.4byte gUnknown_089B4BFC + 0x250
.4byte gUnknown_089B4BFC + 0x2bc
.4byte gUnknown_089B4BFC + 0x330
.4byte gUnknown_089B4BFC + 0x3a8
.4byte gUnknown_089B4BFC + 0x420
.4byte gUnknown_089B4BFC + 0x498
.4byte gUnknown_089B4BFC + 0x51c
.4byte gUnknown_089B4BFC + 0x5a0
.4byte gUnknown_089B4BFC + 0x624
.4byte gUnknown_089B4BFC + 0x6a8
.4byte gUnknown_089B4BFC + 0x714
.4byte gUnknown_089B4BFC + 0x79c
.4byte gUnknown_089B4BFC + 0x838
.4byte gUnknown_089B4BFC + 0x8f4
.4byte gUnknown_089B4BFC + 0x9f0
.4byte gUnknown_089B4BFC + 0xb24
.4byte gUnknown_089B4BFC + 0xce0
.4byte gUnknown_089B4BFC + 0xf3c
.4byte gUnknown_089B4BFC + 0x1070
.4byte gUnknown_089B4BFC + 0x1210
.4byte gUnknown_089B4BFC + 0x1454
.4byte gUnknown_089B4BFC + 0x1578
.4byte gUnknown_089B4BFC + 0x1710
.4byte gUnknown_089B4BFC + 0x1914
.4byte gUnknown_089B4BFC + 0x19d8
.4byte gUnknown_089B4BFC + 0x1ac0
.4byte gUnknown_089B4BFC + 0x1c0c
.4byte gUnknown_089B4BFC + 0x1dc0
.global gUnknown_089A3B3C
gUnknown_089A3B3C: @ 0x089A3B3C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D6D8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D760
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3B6C
gUnknown_089A3B6C: @ 0x089A3B6C
.incbin "baserom.gba", 0x9A3B6C, 0x18
.global gUnknown_089A3B84
gUnknown_089A3B84: @ 0x089A3B84
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D818
@ PROC_SLEEP
.short 0xe, 0x64
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3BA4
gUnknown_089A3BA4: @ 0x089A3BA4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807D860
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D944
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807D9B8
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3BDC
gUnknown_089A3BDC: @ 0x089A3BDC
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DAE8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DB30
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C0C
gUnknown_089A3C0C: @ 0x089A3C0C
@ Replacing .incbin "baserom.gba", 0x9A3C0C, 0x18
.4byte 0x03020100
.4byte 0x03030303
.4byte 0x03030303
.4byte 0x04030303
.4byte 0x08070605
.4byte 0x0000ff09
.global gUnknown_089A3C24
gUnknown_089A3C24: @ 0x089A3C24
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DBE4
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DCA8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DD0C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DD74
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C6C
gUnknown_089A3C6C: @ 0x089A3C6C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DDC8
@ PROC_SLEEP
.short 0xe, 0x78
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3C94
gUnknown_089A3C94: @ 0x089A3C94
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE80
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE70
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DEDC
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DF5C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DFAC
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3CD4
gUnknown_089A3CD4: @ 0x089A3CD4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DE80
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E038
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E054
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DF5C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807DFAC
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D14
gUnknown_089A3D14: @ 0x089A3D14
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E118
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E17C
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E1B0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D54
gUnknown_089A3D54: @ 0x089A3D54
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E22C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E28C
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E334
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3D8C
gUnknown_089A3D8C: @ 0x089A3D8C
@ replacing .incbin "baserom.gba", 0x009a3d8c, 0x28
.4byte gUnknown_089B73D4 + 0x20
.4byte gUnknown_089B73D4 + 0x40
.4byte gUnknown_089B73D4 + 0x68
.4byte gUnknown_089B73D4 + 0x94
.4byte gUnknown_089B73D4 + 0xc8
.4byte gUnknown_089B73D4 + 0x100
.4byte gUnknown_089B73D4 + 0x140
.4byte gUnknown_089B73D4 + 0x180
.4byte gUnknown_089B73D4 + 0x1c8
.4byte gUnknown_089B73D4 + 0x204
.global gUnknown_089A3DB4
gUnknown_089A3DB4: @ 0x089A3DB4
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E390
@ PROC_SLEEP
.short 0xe, 0xa
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E404
@ PROC_SLEEP
.short 0xe, 0x3c
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E448
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3DFC
gUnknown_089A3DFC: @ 0x089A3DFC
@ Replacing .incbin "baserom.gba", 0x9A3DFC, 0x8
.4byte 0x08070604
.4byte 0x00ff0908
.global gUnknown_089A3E04
gUnknown_089A3E04: @ 0x089A3E04
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E4D0
@ PROC_SLEEP
.short 0xe, 0x32
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E584
@ PROC_SLEEP
.short 0xe, 0x28
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E5F0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3E44
gUnknown_089A3E44: @ 0x089A3E44
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E67C
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E6E0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA2C
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3E6C
gUnknown_089A3E6C: @ 0x089A3E6C
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E7E0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E8B0
@ PROC_SLEEP
.short 0xe, 0x50
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807E934
@ PROC_SLEEP
.short 0xe, 0x1
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807DA68
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E79C
@ PROC_SLEEP
.short 0xe, 0x4
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_807E7C4
@ PROC_END
.short 0x0, 0x0
.word 0x0
.global gUnknown_089A3EC4
gUnknown_089A3EC4: @ 0x089A3EC4
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_807EA60
@ PROC_END
.short 0x0, 0x0
.word 0x0

View File

@ -1,6 +1,8 @@
#ifndef GUARD_BM_UNIT_H
#define GUARD_BM_UNIT_H
#include "global.h"
struct SupportData;
// Config

View File

@ -82,9 +82,9 @@ enum
BGPAL_UI_STATBAR = 6,
BGPAL_MANIM_1 = 1, // .. 2
BGPAL_MANIM_INFOFRAME = 1, // .. 2
BGPAL_MANIM_4 = 4,
BGPAL_MANIM_5 = 5,
BGPAL_MANIM_INFO = 5,
};
enum

View File

@ -40,8 +40,8 @@
#define OAM1_SIZE_32x64 0xC000
#define OAM2_CHR(ac) ((ac) & 0x3FF)
#define OAM2_LAYER(al) (((al) << 10) & 0x0C00)
#define OAM2_PAL(ap) (((ap) << 12) & 0xF000)
#define OAM2_LAYER(al) (((al) & 0x3) << 10) // #define OAM2_LAYER(al) (((al) << 10) & 0x0C00)
#define OAM2_PAL(ap) (((ap) & 0xF) << 12) // #define OAM2_PAL(ap) (((ap) << 12) & 0xF000)
extern u16 CONST_DATA gObject_8x8[];
extern u16 CONST_DATA gObject_16x16[];

View File

@ -89,8 +89,8 @@ struct Struct20200E0 {
/* 0C */ u16 unk0C;
/* 0E */ u16 unk0E;
/* 10 */ u16 unk10;
/* 14 */ struct Struct20200E0_14 *unk14;
/* 18 */ struct Struct20200E0_14 *unk18;
/* 14 */ void *unk14;
/* 18 */ void *unk18;
/* 1C */ void *unk1C;
/* 20 */ void *unk20;
/* 24 */ void *unk24;

View File

@ -596,9 +596,9 @@ void EndEfxAnimeDrvProc(void);
// ??? NewEkrUnitMainMini(???);
void sub_805AA28(void*);
// ??? EkrUnitMainMiniMain(???);
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
// void sub_805AA68(void *);
// void sub_805AE14(void *);
// void sub_805AE40(void *, s16, s16, s16, s16);
// ??? sub_805AE58(???);
// ??? sub_805AFA0(???);
void SetBanimArenaFlag(int);

View File

@ -496,8 +496,8 @@ void NewBlockingTimer(ProcPtr p, u32 maybeTime);
// ??? Timer6C_Countdown(???);
int sub_8014270(int number, char* buf);
int String_FromNumber(u32 num, char* str);
void DrawMapBattleInfoText(u16* tilemap, int arg1, int arg2, char* cstring);
void MADrawTextMaybe(u16* tilemap, int color, const char* cstring);
void PutStringCentered(u16* tilemap, int arg1, int arg2, const char* cstring);
void PutString(u16* tilemap, int color, const char* cstring);
// ??? DeleteAllPaletteAnimator(???);
// ??? NewPaletteAnimator(???);
// ??? sub_80144CC(???);
@ -517,10 +517,10 @@ void SetupFutureCall(void(*func)(int), int arg, int time);
// ??? sub_8014930(???);
void sub_8014944(ProcPtr);
// ??? sub_8014968(???);
// ??? sub_801498C(???);
void VramCopy(u8 *src, u8 *dst, int size);
// ??? sub_80149C4(???);
// ??? sub_80149F0(???);
// ??? sub_8014A14(???);
void PutTmLinear(u16 *src, u16 *dst, int size, u16 tileref);
// ??? GetTmOffsetById(???);
// ??? sub_8014A78(???);
// ??? RerangeSomething(???);
void PlaySpacialSoundMaybe(unsigned, int);
@ -1527,29 +1527,7 @@ void NewMapPoisonEffect(struct Unit *u);
// ??? sub_807EA20(???);
// ??? sub_807EA50(???);
// ??? sub_807EA60(???);
// ??? sub_807EA98(???);
// ??? sub_807EBA4(???);
// ??? GetSomeStatUp(???);
// ??? GetSomeStatBase(???);
// ??? sub_807EDEC(???);
// ??? sub_807EDF8(???);
// ??? sub_807EE74(???);
// ??? sub_807EE84(???);
// ??? sub_807EFF0(???);
void DoMapAnimLevelUp(int actor, ProcPtr parent);
// ??? sub_807F124(???);
// ??? sub_807F190(???);
// ??? sub_807F1AC(???);
// ??? sub_807F2B4(???);
// ??? sub_807F2BC(???);
// ??? sub_807F30C(???);
// ??? sub_807F354(???);
// ??? sub_807F39C(???);
// ??? sub_807F478(???);
// ??? sub_807F48C(???);
// ??? sub_807F53C(???);
// ??? sub_807F548(???);
// ??? sub_807F55C(???);
// ??? sub_807F568(???);
// ??? sub_807F58C(???);
// ??? sub_807F5C8(???);

View File

@ -38,4 +38,10 @@
else if (num > max) \
num = max;
#if !MODERN
# define STRUCT_PAD(from, to) unsigned char _pad_ ## from[(to) - (from)]
#else
# define STRUCT_PAD(from, to)
#endif
#endif // GUARD_GLOBAL_H

View File

@ -1,6 +1,8 @@
#ifndef GUARD_MAPANIM_H
#define GUARD_MAPANIM_H
#include "global.h"
#include "proc.h"
#include "fontgrp.h"
enum {
@ -161,7 +163,73 @@ struct Unk03005090 {
/* 04 */ int pad04;
};
extern struct MapAnimState gCurrentMapAnimState;
struct MapAnimActorState {
/* 00 */ struct Unit* unit;
/* 04 */ struct BattleUnit* bu;
/* 08 */ struct MUProc* mu;
/* 0C */ u8 hp_max;
/* 0D */ u8 hp_cur;
/* 0E */ u16 hp_displayed_q4;
/* 10 */ u8 hp_info_x;
/* 11 */ u8 hp_info_y;
/* 12 */ STRUCT_PAD(0x12, 0x14);
};
struct MapAnimState {
/* 00 */ struct MapAnimActorState actor[4];
/* 50 */ struct BattleHit* pCurrentRound;
/* 54 */ const struct ProcCmd* specialProcScr;
/* 58 */ u8 subjectActorId;
/* 59 */ u8 targetActorId;
/* 5A */ u16 hitAttributes;
/* 5C */ u8 hitInfo;
/* 5D */ u8 hitDamage;
/* 5E */ u8 actorCount_maybe;
/* 5F */ u8 u5F;
/* 60 */ u8 u60;
/* 61 */ u8 u61;
/* 62 */ u8 u62;
};
extern struct MapAnimState gManimSt;
struct ManimLevelUpStatGainLabelProc
{
/* 00 */ PROC_HEADER;
/* 29 */ STRUCT_PAD(0x29, 0x2A);
/* 2A */ u16 chr;
/* 2C */ u16 pal;
/* 2E */ u16 sprite_layer;
};
struct ManimLevelUpProc {
/* 00 */ PROC_HEADER;
/* 29 */ STRUCT_PAD(0x29, 0x2E);
/* 2E */ s16 actor_id;
/* 30 */ u8 next_stat_num;
/* 31 */ u8 clock;
/* 32 */ s16 y_scroll_offset;
};
struct ManimLevelUpLabelColorProc
{
/* 00 */ PROC_HEADER;
/* 29 */ STRUCT_PAD(0x29, 0x54);
/* 54 */ s32 clock;
/* 58 */ STRUCT_PAD(0x58, 0x64);
/* 64 */ s16 pal;
};
struct ManimLevelUpLabelInfo {
/* 00 */ u8 x;
/* 01 */ u8 y;
/* 02 */ STRUCT_PAD(0x02, 0x04);
/* 04 */ int *msg[2];
};
extern struct ManimLevelUpLabelInfo CONST_DATA gManimLevelUpLabelInfoList[];
extern CONST_DATA struct MADebugInfo* pMADebugInfoData;
extern CONST_DATA struct Unk089A3798 gUnknown_089A3798[];
@ -171,4 +239,28 @@ s8 BattleUnit_ShouldDisplayWpnBroke(struct BattleUnit *);
void DisplayWRankUpPopup(ProcPtr proc);
s8 BattleUnit_ShouldDisplayWRankUp(struct BattleUnit *);
void PutManimLevelUpFrame(int actor_id, int x, int y);
void PutManimLevelUpStat(int actor_id, int x, int y, int stat_num, bool after_gain);
int GetManimLevelUpStatGain(int actor_id, int stat_num);
int GetManimLevelUpBaseStat(int actor_id, int stat_num);
// ??? ManimLevelUpStatGainLabel_Finish(???);
void StartManimLevelUpStatGainLabels(int chr, int pal, int sprite_layer, ProcPtr parent);
void EndManimLevelUpStatGainLabels(void);
void StartManimLevelUpStatGainLabelAnim(int x, int y, int stat_num, int stat_gain);
// ??? StartPrepItemBoostStatGainLabelAnim(???);
void StartManimLevelUp(int actor, ProcPtr parent);
void InitManimLevelUpWindow(void);
void ClearManimLevelUpWindow(void);
void ManimLevelUp_InitMainScreen(struct ManimLevelUpProc *proc);
void ManimLevelUpLabelColor_Init(struct ManimLevelUpLabelColorProc *proc);
void ManimLevelUpLabelColor_Loop(struct ManimLevelUpLabelColorProc *proc);
void ManimLevelUp_ScrollIn(struct ManimLevelUpProc *proc);
void ManimLevelUp_ScrollOut(struct ManimLevelUpProc *proc);
void ManimLevelUp_PutStatGainLabels(struct ManimLevelUpProc * proc);
void ManimLevelUp_DimBgm(struct ManimLevelUpProc * proc);
void ManimLevelUp_StartLevelUpText(struct ManimLevelUpProc * proc);
void ManimLevelUp_EndLevelUpText(struct ManimLevelUpProc * proc);
void ManimLevelUp_RestoreBgm(struct ManimLevelUpProc * proc);
void ManimLevelUp_Clear(struct ManimLevelUpProc * proc);
#endif // GUARD_MAPANIM_H

View File

@ -8,19 +8,19 @@ void Sound_SetSEVolume(int vol);
void Sound_FadeOutBGM(int speed);
// ??? Sound_FadeOutBGMAlt(???);
void Sound_FadeOutSE(int speed);
void Sound_PlaySong8002448(int songId, struct MusicPlayerInfo *player);
// ??? PlaySong8002478(???);
void Sound_PlaySong80024D4(int songId, struct MusicPlayerInfo *player);
void Sound_PlaySong80024E4(int songId, int speed, struct MusicPlayerInfo *player);
void StartBgmCore(int songId, struct MusicPlayerInfo *player);
// ??? StartOrChangeBgm(???);
void StartBgm(int songId, struct MusicPlayerInfo *player);
void StartBgmExt(int songId, int speed, struct MusicPlayerInfo *player);
// ??? sub_80024F0(???);
void Sound_PlaySong8002574(int songId, int b, struct MusicPlayerInfo *player);
void sub_8002620(int songId);
void sub_8002670(void);
// ??? sub_80026BC(???);
// ??? sub_800270C(???);
void ISuspectThisToBeMusicRelated_8002730(int volume, int b, int c, ProcPtr parent);
// ??? sub_8002788(???);
// ??? Some6CMusicRelatedWaitCallback(???);
void StartBgmFadeIn(int songId, int b, struct MusicPlayerInfo *player);
void OverrideBgm(int songId);
void RestoreBgm(void);
// ??? _RestoreBgm(???);
// ??? MakeBgmOverridePersist(???);
void StartBgmVolumeChange(int volumeInit, int volumeEnd, int duration, ProcPtr parent);
// ??? MusicVc_OnLoop(???);
// ??? DelaySong_OnLoop(???);
void StartSongDelayed();
void PlaySong();
void Sound_SetDefaultMaxNumChannels();

View File

@ -454,38 +454,6 @@ struct SMSHandle
/* 0B */ s8 config;
};
struct MapAnimActorState
{
/* 00 */ struct Unit* pUnit;
/* 04 */ struct BattleUnit* pBattleUnit;
/* 08 */ struct MUProc* pMUProc;
/* 0C */ u8 u0C;
/* 0D */ u8 u0D;
/* 0E */ u16 u0E;
/* 10 */ u8 u10;
/* 11 */ u8 u11;
/* 12 */ u8 u12;
/* 13 */ u8 u13;
};
struct MapAnimState
{
/* 00 */ struct MapAnimActorState actors[4];
/* 50 */ struct BattleHit* pCurrentRound;
/* 54 */ const struct ProcCmd* specialProcScr;
/* 58 */ u8 subjectActorId;
/* 59 */ u8 targetActorId;
/* 5A */ u16 hitAttributes;
/* 5C */ u8 hitInfo;
/* 5D */ u8 hitDamage;
/* 5E */ u8 actorCount_maybe;
/* 5F */ u8 u5F;
/* 60 */ u8 u60;
/* 61 */ u8 u61;
/* 62 */ u8 u62;
};
struct MMSData
{
const void* pGraphics;

View File

@ -2634,10 +2634,10 @@ extern CONST_DATA struct ProcCmd gUnknown_089A398C[];
// extern ??? gUnknown_089A3E44
// extern ??? gUnknown_089A3E6C
// extern ??? gUnknown_089A3EC4
// extern ??? gUnknown_089A3ED4
// extern ??? gUnknown_089A3F4C
// extern ??? gUnknown_089A3F5C
// extern ??? gUnknown_089A3F74
// extern ??? gManimLevelUpLabelInfoList
extern CONST_DATA struct ProcCmd ProcScr_ManimLevelUpStatGainLabel[];
extern CONST_DATA struct ProcCmd ProcScr_ManimLevelUpLabelColor[];
extern CONST_DATA struct ProcCmd ProcScr_ManimLevelUp[];
// extern ??? gUnknown_089A4034
// extern ??? gUnknown_089A404C
// extern ??? gUnknown_089A4064
@ -2687,8 +2687,8 @@ extern CONST_DATA struct ProcCmd ProcScr_CritAtkMapEffect[];
extern CONST_DATA struct ProcCmd ProcScr_SpellAssocBarrier[];
extern CONST_DATA struct ProcCmd ProcScr_SpellAssocWarp[];
// extern ??? gUnknown_089A52FC
// extern ??? gUnknown_089A5314
// extern ??? gUnknown_089A5A6C
extern u16 SpriteAnim_ManimStatGain[];
extern u16 gUnknown_089A5A6C[];
// extern ??? gUnknown_089A61F8
// extern ??? gUnknown_089A6254
extern u16 CONST_DATA Obj_PoisonAnim[];
@ -2699,14 +2699,14 @@ extern u8 gGfx_ArenaBuildingFront[];
extern u8 gTsa_ArenaBuildingFront[];
extern u16 gPal_ArenaBuildingFront[];
extern u8 Img_MapAnimMISS[];
extern u16 Obj_MapAnimMISS[];
extern u16 Obj_MapAnimMISS[];
extern u8 Img_MapAnimNODAMAGE[];
extern u16 obj_MapAnimNODAMAGE[];
// extern ??? gUnknown_089AC5CC
// extern ??? gUnknown_089AC794
// extern ??? gUnknown_089AC9A8
// extern ??? gUnknown_089ACA08
// extern ??? gUnknown_089ACC98
extern u16 obj_MapAnimNODAMAGE[];
extern u16 Pal_ManimLevelUpStatGainCycling[];
extern u16 Img_ManimLevelUpText[];
extern u16 Pal_ManimLevelUp[];
extern u16 Img_ManimLevelUpStatGain[];
extern u8 Img_ManimLevelUpStatGainDigits[];
extern u16 gUnknown_089AD498[];
extern u8 Img_MapBattleInfoBox[];
extern u16 Pal_MapBattleInfoBlue[];
@ -2816,7 +2816,7 @@ extern struct ProcCmd ProcScr_SlidingWallBg[];
// extern ??? gHelpInfo_MbpHp
// extern ??? gHelpInfo_CbpHp
extern unsigned CONST_DATA gMid_Lv;
extern unsigned CONST_DATA gMid_Exp_Unused;
extern unsigned CONST_DATA gMid_Exp;
extern unsigned CONST_DATA gMid_Hp;
extern unsigned CONST_DATA gMid_Str;
extern unsigned CONST_DATA gMid_Mag;

View File

@ -150,6 +150,7 @@ SECTIONS
asm/banim-main.o(.text);
src/banim-ekrmain.o(.text);
asm/banim-ekrmain.o(.text);
src/banim-ekr805AE40.o(.text);
asm/code_battleanim.o(.text);
asm/banim-efxop.o(.text);
src/banim-ekrdragonstatus.o(.text);
@ -176,6 +177,9 @@ SECTIONS
src/mapanim_debug.o(.text);
src/mapanim_eventbattle.o(.text);
src/mapanim_specialeffect.o(.text);
asm/mapanim_807CDD0.o(.text);
src/mapanim_lvupfx.o(.text);
src/mapanim_lvup.o(.text);
asm/code_mapanim.o(.text);
asm/ev_triggercheck.o(.text);
src/uidebug.o(.text);
@ -530,6 +534,9 @@ SECTIONS
. = ALIGN(4); src/mapanim_debug.o(.data);
. = ALIGN(4); src/mapanim_eventbattle.o(.data);
. = ALIGN(4); src/mapanim_specialeffect.o(.data);
. = ALIGN(4); data/mapanim_89A398C.o(.data);
. = ALIGN(4); src/mapanim_lvupfx.o(.data);
. = ALIGN(4); src/mapanim_lvup.o(.data);
. = ALIGN(4); data/data_9A31F8.o(.data);
. = ALIGN(4); src/data_support_conversations.o(.data);
. = ALIGN(4); data/data_9ED64C.o(.data);

View File

@ -617,9 +617,9 @@ void sub_8085E08(int index, int mode)
void sub_8085E48(struct Proc89EE9E0 *proc)
{
if (0 == proc->mode)
Sound_PlaySong80024D4(0x3D, 0);
StartBgm(0x3D, 0);
else
Sound_PlaySong80024D4(0x3C, 0);
StartBgm(0x3C, 0);
SetDispEnable(1, 1, 1, 1, 1);
proc->timer = 0;

64
src/banim-ekr805AE40.c Normal file
View File

@ -0,0 +1,64 @@
#include "global.h"
#include "proc.h"
#include "anime.h"
#include "ekrbattle.h"
#include "efxbattle.h"
struct BanimUnkStructCommPriv {
PROC_HEADER;
/* 29 */ STRUCT_PAD(0x29, 0x32);
/* 32 */ s16 unk32;
/* 34 */ STRUCT_PAD(0x34, 0x3A);
/* 3A */ s16 unk3A;
/* 3C */ STRUCT_PAD(0x3C, 0x4C);
/* 4C */ int unk4C;
};
/* Struct20200E0, Unknown_0201FADC, Unknown_030053A0, Unknown_030053E0 */
struct BanimUnkStructComm {
/* 00 */ u16 unk00;
/* 02 */ u16 unk02;
/* 04 */ u16 unk04;
/* 06 */ u16 unk06;
/* 08 */ u16 unk08;
/* 0A */ u16 unk0A;
/* 0C */ u16 unk0C;
/* 0E */ s16 unk0E;
/* 10 */ u16 unk10;
/* 14 */ void *proc14;
/* 18 */ void *proc18;
/* 1C */ void *unk1C;
/* 20 */ void *unk20;
/* 24 */ void *unk24;
};
void sub_805AE14(struct BanimUnkStructComm *buf)
{
if (buf->unk0E == -1) {
if (buf->proc14)
Proc_End(buf->proc14);
if (buf->proc18)
Proc_End(buf->proc18);
}
}
void sub_805AE40(void *_buf, s16 a, s16 b, s16 c, s16 d)
{
struct BanimUnkStructComm *buf = _buf;
struct BanimUnkStructCommPriv *priv;
priv = buf->proc14;
priv->unk32 = a;
priv->unk3A = b;
priv = buf->proc18;
priv->unk32 = c;
priv->unk3A = d;
}

View File

@ -8,6 +8,10 @@
#include "ekrlevelup.h"
#include "bmitem.h"
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
CONST_DATA struct ProcCmd gProc_ekrDispUP[] = {
PROC_NAME("ekrDispUP"),
PROC_REPEAT(ekrDispUPMain),

View File

@ -10,6 +10,10 @@
#include "efxbattle.h"
#include "ekrdragon.h"
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
void NewEkrDragonDemonKing(struct Anim *anim)
{
struct EkrDragonStatus *ekrsp = GetEkrDragonStatus(anim);

View File

@ -11,6 +11,10 @@
#include "ekrdragon.h"
#include "ekrlevelup.h"
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
/**
* section.ewramdata
*/
@ -365,10 +369,10 @@ void EkrLvup_InitScreen(struct ProcEkrLevelup *proc)
sub_805AA68(buf);
#if NONMATCHING
buf->unk14->unk4C &= ~OAM2_LAYER(0x3);
buf->unk14->unk4C |= OAM2_LAYER(0x3);
buf->unk18->unk4C &= ~OAM2_LAYER(0x3);
buf->unk18->unk4C |= OAM2_LAYER(0x3);
((struct Struct20200E0_14 *)buf->unk14)->unk4C &= ~OAM2_LAYER(0x3);
((struct Struct20200E0_14 *)buf->unk14)->unk4C |= OAM2_LAYER(0x3);
((struct Struct20200E0_14 *)buf->unk18)->unk4C &= ~OAM2_LAYER(0x3);
((struct Struct20200E0_14 *)buf->unk18)->unk4C |= OAM2_LAYER(0x3);
#else
{
register struct Struct20200E0_14 *_buf asm("r3");

View File

@ -1255,7 +1255,7 @@ int GetCurrentMapMusicIndex(void) {
//! FE8U = 0x080160D0
void StartMapSongBgm(void) {
Sound_PlaySong80024D4(GetCurrentMapMusicIndex(), 0);
StartBgm(GetCurrentMapMusicIndex(), 0);
return;
}

View File

@ -505,7 +505,7 @@ void PopGlobalTimer() {
}
void sub_8038230() {
Sound_PlaySong80024D4(0x40, 0);
StartBgm(0x40, 0);
return;
}

View File

@ -676,7 +676,7 @@ void sub_80328B0(void) {
int bgmIdx = GetCurrentMapMusicIndex();
if (Sound_GetCurrentSong() != bgmIdx) {
Sound_PlaySong80024E4(bgmIdx, 6, NULL);
StartBgmExt(bgmIdx, 6, NULL);
}
return;

View File

@ -1063,9 +1063,9 @@ void ShopProc_Init(struct BmShopProc* proc) {
int i;
if (proc->shopType == 0) {
Sound_PlaySong80024D4(0x36, 0);
StartBgm(0x36, 0);
} else {
Sound_PlaySong80024D4(0x35, 0);
StartBgm(0x35, 0);
}
Proc_ForEach(gProcScr_MoveUnit, (ProcFunc) MU_Hide);

View File

@ -29,6 +29,9 @@
#include "ekrbattle.h"
#include "efxbattle.h"
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
u8 PromoHandler_SetInitStat(struct ProcPromoHandler *proc);
void PromoHandlerIdle(struct ProcPromoHandler *proc);

View File

@ -190,9 +190,9 @@ void PromoMain_OnEnd(struct ProcPromoMain *proc)
{
struct ProcPromoHandler *parent = proc->proc_parent;
if (parent->bmtype == PROMO_HANDLER_TYPE_TRANINEE) {
sub_8002670();
RestoreBgm();
Sound_SetSEVolume(0x100);
sub_8002620(0x34);
OverrideBgm(0x34);
}
parent->stat = 2;
EndAllProcChildren(proc);

View File

@ -900,7 +900,7 @@ void ChapterIntro_LoopFadeToMap(struct ChapterIntroFXProc* proc) {
if ((GetChapterThing() == 2) || GetROMChapterStruct(gPlaySt.chapterIndex)->fadeToBlack) {
if ((GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE]) != 0xFFFF) {
Sound_PlaySong80024D4(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
StartBgm(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
}
proc->unk_4C = 0;
@ -931,7 +931,7 @@ void ChapterIntro_LoopFadeToMap(struct ChapterIntroFXProc* proc) {
if ((proc->unk_4C == 0x18) &&
((GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE]) != 0xFFFF)) {
Sound_PlaySong80024D4(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
StartBgm(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
}
if (proc->unk_4C < 0) {
@ -1040,7 +1040,7 @@ void ChapterIntro_BeginFastFadeToMap(struct ChapterIntroFXProc* proc) {
proc->unk_4C = 0xE;
if ((GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE]) != 0xFFFF) {
Sound_PlaySong80024D4(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
StartBgm(GetROMChapterStruct(gPlaySt.chapterIndex)->mapBgmIds[MAP_BGM_PROLOGUE], 0);
}
return;

View File

@ -1152,7 +1152,7 @@ void Fin_Init(struct FinScreenProc* proc) {
SetupFinScreenGfx();
Sound_PlaySong8002574(0x56, 7, 0);
StartBgmFadeIn(0x56, 7, 0);
SetDefaultColorEffects();
return;
@ -2138,7 +2138,7 @@ void sub_80B8014(void) {
BG_EnableSyncByMask(0xc);
sub_80AB760(gAnims);
Sound_PlaySong80024D4(0x46, 0);
StartBgm(0x46, 0);
return;
}

View File

@ -455,14 +455,14 @@ void sub_8009A84(ProcPtr proc) {
}
void sub_8009ABC(ProcPtr proc) {
Sound_PlaySong8002448(0x43, 0);
ISuspectThisToBeMusicRelated_8002730(0, 0xC0, 0x3C, 0);
StartBgmCore(0x43, 0);
StartBgmVolumeChange(0, 0xC0, 0x3C, 0);
return;
}
void sub_8009AD8(ProcPtr proc) {
ISuspectThisToBeMusicRelated_8002730(0x100, 0xC0, 0x20, 0);
StartBgmVolumeChange(0x100, 0xC0, 0x20, 0);
return;
}

View File

@ -141,7 +141,7 @@ void GameOverScreen_Init(struct ProcGameOverScreen *proc)
BMapDispSuspend();
Sound_PlaySong80024D4(0x3E, 0);
StartBgm(0x3E, 0);
gLCDControlBuffer.bg0cnt.priority = 0;
gLCDControlBuffer.bg1cnt.priority = 1;

View File

@ -27,8 +27,8 @@
// unreferenced
void MapAnimProc_DisplayItemStealingPopup(ProcPtr proc) {
if (gCurrentMapAnimState.u62 == 1) {
NewPopup_ItemStealing(gCurrentMapAnimState.actors[1].pBattleUnit->weapon, proc);
if (gManimSt.u62 == 1) {
NewPopup_ItemStealing(gManimSt.actor[1].bu->weapon, proc);
}
}
@ -92,7 +92,7 @@ void MapAnim_Cleanup(void) {
}
void MapAnim_AdvanceBattleRound(void) {
struct MapAnimState *state = &gCurrentMapAnimState;
struct MapAnimState *state = &gManimSt;
struct BattleHit *round = state->pCurrentRound;
u8 r = (round->info >> 3);
state->subjectActorId = r % 2;
@ -108,7 +108,7 @@ void MapAnim_AdvanceBattleRound(void) {
}
void MapAnim_PrepareNextBattleRound(ProcPtr p) {
struct MapAnimState *state = &gCurrentMapAnimState;
struct MapAnimState *state = &gManimSt;
u16 weapon;
struct BattleUnit *unit;
if (state->pCurrentRound->info & 0x10) {
@ -117,7 +117,7 @@ void MapAnim_PrepareNextBattleRound(ProcPtr p) {
return;
}
MapAnim_AdvanceBattleRound();
unit = state->actors[state->subjectActorId].pBattleUnit;
unit = state->actor[state->subjectActorId].bu;
weapon = unit->weaponBefore;
state->specialProcScr = GetSpellAssocAlt6CPointer(weapon);
Proc_Break(p);
@ -128,25 +128,25 @@ void MapAnim_DisplayRoundAnim(ProcPtr p) {
}
void MapAnim_ShowPoisonEffectIfAny(ProcPtr p) {
struct MapAnimState *state = &gCurrentMapAnimState;
struct MapAnimState *state = &gManimSt;
if (state->hitAttributes & 0x40) {
NewMapPoisonEffect(state->actors[state->targetActorId].pUnit);
NewMapPoisonEffect(state->actor[state->targetActorId].unit);
NewBlockingTimer(p, 100);
}
}
void MapAnim_MoveCameraOntoSubject(ProcPtr p) {
struct MapAnimState *state = &gCurrentMapAnimState;
int x = state->actors[0].pUnit->xPos;
int y = state->actors[0].pUnit->yPos;
struct MapAnimState *state = &gManimSt;
int x = state->actor[0].unit->xPos;
int y = state->actor[0].unit->yPos;
EnsureCameraOntoPosition(p, x, y);
}
void MapAnim_MoveCameraOntoTarget(ProcPtr p) {
struct MapAnimState *state = &gCurrentMapAnimState;
struct MapAnimState *state = &gManimSt;
if (state->actorCount_maybe != 1) {
int x = state->actors[1].pUnit->xPos;
int y = state->actors[1].pUnit->yPos;
int x = state->actor[1].unit->xPos;
int y = state->actor[1].unit->yPos;
EnsureCameraOntoPosition(p, x, y);
}
}
@ -154,20 +154,20 @@ void MapAnim_MoveCameraOntoTarget(ProcPtr p) {
void MapAnimProc_DisplayDeahQuote(void)
{
int actorNum = -1;
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
if (gCurrentMapAnimState.actors[1].u0D == 0)
if (gManimSt.actor[1].hp_cur == 0)
actorNum = 1;
// fallthrough
case 1:
if (gCurrentMapAnimState.actors[0].u0D == 0)
if (gManimSt.actor[0].hp_cur == 0)
actorNum = 0;
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
if (actorNum != -1) {
int charid = UNIT_CHAR_ID(gCurrentMapAnimState.actors[actorNum].pUnit);
int charid = UNIT_CHAR_ID(gManimSt.actor[actorNum].unit);
switch (charid) {
case CHARACTER_EIRIKA:
@ -187,32 +187,32 @@ void MapAnimProc_DisplayDeahQuote(void)
void MapAnmiProc_DisplayDeathFade(void)
{
int actorNum = -1;
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
if (gCurrentMapAnimState.actors[1].u0D == 0)
if (gManimSt.actor[1].hp_cur == 0)
actorNum = 1;
// fallthrough
case 1:
if (gCurrentMapAnimState.actors[0].u0D == 0)
if (gManimSt.actor[0].hp_cur == 0)
actorNum = 0;
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
if (actorNum != -1)
MU_StartDeathFade(gCurrentMapAnimState.actors[actorNum].pMUProc);
MU_StartDeathFade(gManimSt.actor[actorNum].mu);
}
void MapAnimProc_DisplayExpBar(struct Proc* proc)
{
int actorNum = -1;
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
if (gCurrentMapAnimState.actors[1].pBattleUnit->expGain != 0)
if (gManimSt.actor[1].bu->expGain != 0)
actorNum = 1;
case 1:
if (gCurrentMapAnimState.actors[0].pBattleUnit->expGain != 0)
if (gManimSt.actor[0].bu->expGain != 0)
actorNum = 0;
break;
}
@ -220,8 +220,8 @@ void MapAnimProc_DisplayExpBar(struct Proc* proc)
if (actorNum >= 0) {
struct MAExpBarProc* expProc = Proc_StartBlocking(gProc_MapAnimExpBar, proc);
expProc->expFrom = gCurrentMapAnimState.actors[actorNum].pBattleUnit->expPrevious;
expProc->expTo = gCurrentMapAnimState.actors[actorNum].pBattleUnit->expPrevious + gCurrentMapAnimState.actors[actorNum].pBattleUnit->expGain;
expProc->expFrom = gManimSt.actor[actorNum].bu->expPrevious;
expProc->expTo = gManimSt.actor[actorNum].bu->expPrevious + gManimSt.actor[actorNum].bu->expGain;
expProc->actorId = actorNum;
}
}
@ -230,7 +230,7 @@ void MapAnim_InitInfoBox(ProcPtr proc)
{
SetDefaultColorEffects();
switch (gCurrentMapAnimState.u62) {
switch (gManimSt.u62) {
case 1:
case 2:
return;
@ -239,10 +239,10 @@ void MapAnim_InitInfoBox(ProcPtr proc)
break;
}
if (GetSpellAssocReturnBool(gCurrentMapAnimState.actors[0].pBattleUnit->weaponBefore)) {
if (GetSpellAssocReturnBool(gManimSt.actor[0].bu->weaponBefore)) {
int y;
if (gCurrentMapAnimState.actorCount_maybe == 1) {
y = gCurrentMapAnimState.actors[0].pUnit->yPos*16 - gBmSt.camera.y;
if (gManimSt.actorCount_maybe == 1) {
y = gManimSt.actor[0].unit->yPos*16 - gBmSt.camera.y;
if (y >= 112)
y = y - 40;
@ -253,8 +253,8 @@ void MapAnim_InitInfoBox(ProcPtr proc)
int array[2];
int i, actorNum;
for (i = 0; i < gCurrentMapAnimState.actorCount_maybe; ++i)
array[i] = gCurrentMapAnimState.actors[i].pUnit->yPos*16 - gBmSt.camera.y;
for (i = 0; i < gManimSt.actorCount_maybe; ++i)
array[i] = gManimSt.actor[i].unit->yPos*16 - gBmSt.camera.y;
if (array[0] - array[1] >= 0) {
if (array[0] - array[1] >= 80)
@ -280,52 +280,52 @@ void MapAnim_InitInfoBox(ProcPtr proc)
void MapAnim_CallBattleQuoteEvents(void)
{
if (gCurrentMapAnimState.actorCount_maybe == 2) {
if (gManimSt.actorCount_maybe == 2) {
CallBattleQuoteEventsIfAny(
UNIT_CHAR_ID(gCurrentMapAnimState.actors[0].pUnit), UNIT_CHAR_ID(gCurrentMapAnimState.actors[1].pUnit));
UNIT_CHAR_ID(gManimSt.actor[0].unit), UNIT_CHAR_ID(gManimSt.actor[1].unit));
}
}
void SetBattleMuPaletteByIndex(int actorNum)
{
if (UNIT_FACTION(gCurrentMapAnimState.actors[0].pUnit) == UNIT_FACTION(gCurrentMapAnimState.actors[1].pUnit))
if (!BUNIT_IS_OBSTACLE(gCurrentMapAnimState.actors[0].pBattleUnit) && !BUNIT_IS_OBSTACLE(gCurrentMapAnimState.actors[1].pBattleUnit))
if (UNIT_FACTION(gManimSt.actor[0].unit) == UNIT_FACTION(gManimSt.actor[1].unit))
if (!BUNIT_IS_OBSTACLE(gManimSt.actor[0].bu) && !BUNIT_IS_OBSTACLE(gManimSt.actor[1].bu))
return;
// Check actor class
if (UNIT_CLASS_ID(gCurrentMapAnimState.actors[actorNum].pUnit) != CLASS_MANAKETE_MYRRH)
if (UNIT_CLASS_ID(gManimSt.actor[actorNum].unit) != CLASS_MANAKETE_MYRRH)
return;
// Check actor status
switch (gCurrentMapAnimState.actors[actorNum].pUnit->statusIndex) {
switch (gManimSt.actor[actorNum].unit->statusIndex) {
case UNIT_STATUS_SLEEP:
case UNIT_STATUS_PETRIFY:
case UNIT_STATUS_13:
return;
} // switch (gCurrentMapAnimState.actors[actorNum].unit->statusIndex)
} // switch (gManimSt.actor[actorNum].unit->statusIndex)
// Check other actor weapon
switch (GetItemIndex(gCurrentMapAnimState.actors[actorNum ^ 1 ].pBattleUnit->weaponBefore)) {
switch (GetItemIndex(gManimSt.actor[actorNum ^ 1 ].bu->weaponBefore)) {
case ITEM_STAFF_SILENCE:
case ITEM_STAFF_SLEEP:
case ITEM_STAFF_BERSERK:
case ITEM_MONSTER_STONE:
return;
} // switch (GetItemIndex(gCurrentMapAnimState.actors[actorNum ^ 1 ].pBattleUnit->weaponBefore))
} // switch (GetItemIndex(gManimSt.actor[actorNum ^ 1 ].bu->weaponBefore))
// Check actor weapon
if (GetItemIndex(gCurrentMapAnimState.actors[actorNum].pBattleUnit->weaponBefore) != ITEM_DIVINESTONE)
if (GetItemIndex(gManimSt.actor[actorNum].bu->weaponBefore) != ITEM_DIVINESTONE)
return;
MU_SetPaletteId(gCurrentMapAnimState.actors[actorNum].pMUProc, BM_OBJPAL_BANIM_SPECIALMU + actorNum);
MU_SetSpecialSprite(gCurrentMapAnimState.actors[actorNum].pMUProc, CLASS_MANAKETE, gUnknown_089A8F74);
MU_SetPaletteId(gManimSt.actor[actorNum].mu, BM_OBJPAL_BANIM_SPECIALMU + actorNum);
MU_SetSpecialSprite(gManimSt.actor[actorNum].mu, CLASS_MANAKETE, gUnknown_089A8F74);
}
void SetBattleMuPalette(void)
{
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
SetBattleMuPaletteByIndex(1);
// fallthrough
@ -333,7 +333,7 @@ void SetBattleMuPalette(void)
SetBattleMuPaletteByIndex(0);
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
}
void PlaySoundIdA0(void)

View File

@ -19,21 +19,21 @@ void MakeBattleMOVEUNIT(int maActor, struct BattleUnit* bu, struct Unit* unit)
if (!bu)
return;
gCurrentMapAnimState.actors[maActor].pUnit = unit;
gCurrentMapAnimState.actors[maActor].pBattleUnit = bu;
gCurrentMapAnimState.actors[maActor].pMUProc = MU_Create(unit);
gManimSt.actor[maActor].unit = unit;
gManimSt.actor[maActor].bu = bu;
gManimSt.actor[maActor].mu = MU_Create(unit);
gCurrentMapAnimState.actors[maActor].pMUProc->pAPHandle->frameTimer = 0;
gCurrentMapAnimState.actors[maActor].pMUProc->pAPHandle->frameInterval = 0;
gManimSt.actor[maActor].mu->pAPHandle->frameTimer = 0;
gManimSt.actor[maActor].mu->pAPHandle->frameInterval = 0;
if (BUNIT_IS_OBSTACLE(bu))
MU_Hide(gCurrentMapAnimState.actors[maActor].pMUProc);
MU_Hide(gManimSt.actor[maActor].mu);
switch (unit->statusIndex) {
case UNIT_STATUS_PETRIFY:
case UNIT_STATUS_13:
MU_SetPaletteId(gCurrentMapAnimState.actors[maActor].pMUProc, BM_OBJPAL_UNIT_GRAYED);
MU_SetPaletteId(gManimSt.actor[maActor].mu, BM_OBJPAL_UNIT_GRAYED);
break;
} // switch (unit->statusIndex)
}
@ -44,32 +44,32 @@ void SetBattleAnimFacing(int maActor, int maOpponent, int facing)
switch (facing){
case MA_FACING_OPPONENT:
muFacing = GetFacingDirection(
gCurrentMapAnimState.actors[maActor].pUnit->xPos, gCurrentMapAnimState.actors[maActor].pUnit->yPos,
gCurrentMapAnimState.actors[maOpponent].pUnit->xPos, gCurrentMapAnimState.actors[maOpponent].pUnit->yPos);
gManimSt.actor[maActor].unit->xPos, gManimSt.actor[maActor].unit->yPos,
gManimSt.actor[maOpponent].unit->xPos, gManimSt.actor[maOpponent].unit->yPos);
MU_SetFacing(gCurrentMapAnimState.actors[maActor].pMUProc, muFacing);
MU_SetFacing(gManimSt.actor[maActor].mu, muFacing);
break;
case MA_FACING_DEFAULT:
MU_SetDefaultFacing(gCurrentMapAnimState.actors[maActor].pMUProc);
MU_SetDefaultFacing(gManimSt.actor[maActor].mu);
break;
case MA_FACING_UNK:
muFacing = GetFacingDirection(
gCurrentMapAnimState.actors[maActor].pUnit->xPos, gCurrentMapAnimState.actors[maActor].pUnit->yPos, 0, 0);
gManimSt.actor[maActor].unit->xPos, gManimSt.actor[maActor].unit->yPos, 0, 0);
MU_SetFacing(gCurrentMapAnimState.actors[maActor].pMUProc, muFacing);
MU_SetFacing(gManimSt.actor[maActor].mu, muFacing);
break;
} // switch (facing)
}
void SetupBattleMOVEUNITs(void)
{
int maFacing = GetSpellAssocFacing(gCurrentMapAnimState.actors[0].pBattleUnit->weaponBefore);
int maFacing = GetSpellAssocFacing(gManimSt.actor[0].bu->weaponBefore);
sub_807B4D0();
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
if (gBattleHitArray[0].attributes & BATTLE_HIT_ATTR_TATTACK) {
// In triangle attacks, both partners face the opponent too
@ -83,16 +83,16 @@ void SetupBattleMOVEUNITs(void)
case 1:
SetBattleAnimFacing(0, 1, maFacing);
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
}
void sub_807B4D0(void)
{
u8 array[4];
int i, j;
int count = gCurrentMapAnimState.actorCount_maybe;
int count = gManimSt.actorCount_maybe;
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 2:
if (gBattleHitArray[0].attributes & BATTLE_HIT_ATTR_TATTACK)
count += 2;
@ -101,7 +101,7 @@ void sub_807B4D0(void)
case 1:
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
// Init ref array
for (i = 0; i < count; ++i)
@ -111,10 +111,10 @@ void sub_807B4D0(void)
for (i = 0; i < count-1; ++i) {
for (j = i+1; j < count; ++j) {
int swap = FALSE;
if (gCurrentMapAnimState.actors[array[i]].pUnit->yPos == gCurrentMapAnimState.actors[array[j]].pUnit->yPos) {
if (gCurrentMapAnimState.actors[array[i]].pUnit->xPos >= gCurrentMapAnimState.actors[array[j]].pUnit->xPos)
if (gManimSt.actor[array[i]].unit->yPos == gManimSt.actor[array[j]].unit->yPos) {
if (gManimSt.actor[array[i]].unit->xPos >= gManimSt.actor[array[j]].unit->xPos)
swap = TRUE;
} else if (gCurrentMapAnimState.actors[array[i]].pUnit->yPos >= gCurrentMapAnimState.actors[array[j]].pUnit->yPos)
} else if (gManimSt.actor[array[i]].unit->yPos >= gManimSt.actor[array[j]].unit->yPos)
swap = TRUE;
if (swap) {
@ -127,18 +127,18 @@ void sub_807B4D0(void)
// Apply
for (i = 0; i < count; ++i)
gCurrentMapAnimState.actors[array[i]].pMUProc->pAPHandle->objLayer = gUnknown_08205714[i];
gManimSt.actor[array[i]].mu->pAPHandle->objLayer = gUnknown_08205714[i];
}
void BeginMapAnimForPoisonDmg(void)
{
gBattleActor.weaponBefore = ITEM_VULNERARY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 0;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 0;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.pCurrentRound = gBattleHitArray;
gManimSt.pCurrentRound = gBattleHitArray;
MapAnim_AdvanceBattleRound();
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
@ -149,11 +149,11 @@ void BeginMapAnimForEggDmg(void)
{
gBattleActor.weaponBefore = ITEM_VULNERARY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 0;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 0;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.pCurrentRound = gBattleHitArray;
gManimSt.pCurrentRound = gBattleHitArray;
MapAnim_AdvanceBattleRound();
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
@ -164,11 +164,11 @@ void BeginMapAnimForCritAtk(void)
{
gBattleActor.weaponBefore = ITEM_VULNERARY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 0;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 0;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.pCurrentRound = gBattleHitArray;
gManimSt.pCurrentRound = gBattleHitArray;
MapAnim_AdvanceBattleRound();
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
@ -179,12 +179,12 @@ void BeginMapAnimForSteal(void)
{
gBattleActor.weaponBefore = ITEM_SWORD_IRON;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 1;
gCurrentMapAnimState.actorCount_maybe = 2;
gManimSt.u5F = 0;
gManimSt.u62 = 1;
gManimSt.actorCount_maybe = 2;
gCurrentMapAnimState.subjectActorId = 0;
gCurrentMapAnimState.targetActorId = 1;
gManimSt.subjectActorId = 0;
gManimSt.targetActorId = 1;
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
Proc_Start(ProcScr_MapAnimSteal, PROC_TREE_3);
@ -194,12 +194,12 @@ void BeginMapAnimForSummon(void)
{
gBattleActor.weaponBefore = ITEM_STAFF_FORTIFY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 2;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 2;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.subjectActorId = 0;
gCurrentMapAnimState.targetActorId = 1;
gManimSt.subjectActorId = 0;
gManimSt.targetActorId = 1;
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
Proc_Start(ProcScr_MapAnimSummon, PROC_TREE_3);
@ -209,12 +209,12 @@ void BeginMapAnimForSummonDK(void)
{
gBattleActor.weaponBefore = ITEM_STAFF_FORTIFY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 2;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 2;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.subjectActorId = 0;
gCurrentMapAnimState.targetActorId = 1;
gManimSt.subjectActorId = 0;
gManimSt.targetActorId = 1;
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
Proc_Start(ProcScr_MapAnimSumDK, PROC_TREE_3);
@ -224,12 +224,12 @@ void BeginMapAnimForDance(void)
{
gBattleActor.weaponBefore = ITEM_STAFF_FORTIFY;
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 2;
gCurrentMapAnimState.actorCount_maybe = 1;
gManimSt.u5F = 0;
gManimSt.u62 = 2;
gManimSt.actorCount_maybe = 1;
gCurrentMapAnimState.subjectActorId = 0;
gCurrentMapAnimState.targetActorId = 0;
gManimSt.subjectActorId = 0;
gManimSt.targetActorId = 0;
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
Proc_Start(ProcScr_MapAnimDance, PROC_TREE_3);
@ -242,8 +242,8 @@ void BeginBattleMapAnims(void)
return;
}
gCurrentMapAnimState.u5F = 0;
gCurrentMapAnimState.u62 = 0;
gManimSt.u5F = 0;
gManimSt.u62 = 0;
SetupMapAnimSpellData(&gBattleActor, &gBattleTarget, gBattleHitArray);
SetupMapBattleAnim(&gBattleActor, &gBattleTarget, gBattleHitArray);
@ -256,9 +256,9 @@ void BeginBattleMapAnims(void)
void SetupMapAnimSpellData(struct BattleUnit* actor, struct BattleUnit* target, struct BattleHit* hit)
{
gCurrentMapAnimState.actorCount_maybe = GetSpellAssocCharCount(actor->weaponBefore);
gCurrentMapAnimState.pCurrentRound = hit;
gCurrentMapAnimState.specialProcScr = GetSpellAssocAlt6CPointer(actor->weaponBefore);
gManimSt.actorCount_maybe = GetSpellAssocCharCount(actor->weaponBefore);
gManimSt.pCurrentRound = hit;
gManimSt.specialProcScr = GetSpellAssocAlt6CPointer(actor->weaponBefore);
}
void SetupMapBattleAnim(struct BattleUnit* actor, struct BattleUnit* target, struct BattleHit* hit)
@ -267,7 +267,7 @@ void SetupMapBattleAnim(struct BattleUnit* actor, struct BattleUnit* target, str
MakeBattleMOVEUNIT(0, actor, &actor->unit);
if (gCurrentMapAnimState.actorCount_maybe > 1)
if (gManimSt.actorCount_maybe > 1)
{
HideUnitSprite(&gBattleTarget.unit); // NOTE: uses gBattleTarget instead of target argument
MakeBattleMOVEUNIT(1, target, &target->unit);
@ -284,10 +284,10 @@ void SetupMapBattleAnim(struct BattleUnit* actor, struct BattleUnit* target, str
SetupBattleMOVEUNITs();
for (i = 0; i < gCurrentMapAnimState.actorCount_maybe; ++i)
for (i = 0; i < gManimSt.actorCount_maybe; ++i)
{
gCurrentMapAnimState.actors[i].u0D = gCurrentMapAnimState.actors[i].pBattleUnit->hpInitial;
gCurrentMapAnimState.actors[i].u0C = GetUnitMaxHp(gCurrentMapAnimState.actors[i].pUnit);
gManimSt.actor[i].hp_cur = gManimSt.actor[i].bu->hpInitial;
gManimSt.actor[i].hp_max = GetUnitMaxHp(gManimSt.actor[i].unit);
}
SetDefaultColorEffects();

View File

@ -184,7 +184,7 @@ void MADebug_InitScreen(struct MADebugProc* proc)
DrawUiFrame2(0, 0, 29, 19, 1); // TODO: UI_STYLE...
for (i = 0; MADebugStrings2[i]; ++i)
MADrawTextMaybe(
PutString(
TILEMAP_LOCATED(gBG0TilemapBuffer, 1, i*2), 0, MADebugStrings2[i]);
for (i = 0; i < 10; ++i) {

View File

@ -15,7 +15,7 @@
void MapEventBattle_SetUpHitData(ProcPtr proc)
{
if (gCurrentMapAnimState.pCurrentRound->info & BATTLE_HIT_INFO_END) {
if (gManimSt.pCurrentRound->info & BATTLE_HIT_INFO_END) {
Proc_Goto(proc, 1); // TODO: label definitions
return;
}

View File

@ -112,7 +112,7 @@ void ProcMAExpBar_FrameAdvance(struct MAExpBarProc* proc)
void ProcMAExpBar_LevelUpIfPossible(struct MAExpBarProc* proc)
{
if (proc->expTo >= 100)
DoMapAnimLevelUp(proc->actorId, (struct Proc*) proc);
StartManimLevelUp(proc->actorId, (struct Proc*) proc);
}
CONST_DATA u16 gUnknown_089A36C0[] = {

View File

@ -115,7 +115,7 @@ void ProcMapInfoBox_OnDraw(struct MAInfoFrameProc* proc)
PrepareMapBattleBoxNumGfx(Img_MapBattleInfoHpBar);
switch (gCurrentMapAnimState.actorCount_maybe) {
switch (gManimSt.actorCount_maybe) {
case 1:
DisplayBattleInfoBox(proc, 0, -5);
break;
@ -124,13 +124,13 @@ void ProcMapInfoBox_OnDraw(struct MAInfoFrameProc* proc)
DisplayBattleInfoBox(proc, 0, -1);
DisplayBattleInfoBox(proc, 1, -11);
break;
} // switch (gCurrentMapAnimState.actorCount_maybe)
} // switch (gManimSt.actorCount_maybe)
sub_8081E78();
sub_80820D8(
gCurrentMapAnimState.actors[0].u11*8,
gCurrentMapAnimState.actors[0].u11*8 + 0x20,
gManimSt.actor[0].hp_info_y*8,
gManimSt.actor[0].hp_info_y*8 + 0x20,
gPaletteBuffer[0x11],
gPaletteBuffer[0x21]);
}
@ -140,48 +140,48 @@ void sub_807BCA8(struct MAInfoFrameProc* proc)
s8 updated = FALSE;
int i;
for (i = 0; i < gCurrentMapAnimState.actorCount_maybe; ++i) {
u16 r4 = gCurrentMapAnimState.actors[i].u0E;
for (i = 0; i < gManimSt.actorCount_maybe; ++i) {
u16 r4 = gManimSt.actor[i].hp_displayed_q4;
if (r4 > gCurrentMapAnimState.actors[i].u0D*16)
if (r4 > gManimSt.actor[i].hp_cur*16)
r4 = r4 - 16;
if (r4 < gCurrentMapAnimState.actors[i].u0D*16) {
if (r4 < gManimSt.actor[i].hp_cur*16) {
r4 = r4 + 4;
if (r4 % 16 == 0)
PlaySoundEffect(0x75); // TODO: song ids
}
if (r4 != gCurrentMapAnimState.actors[i].u0E) {
gCurrentMapAnimState.actors[i].u0E = r4;
if (r4 != gManimSt.actor[i].hp_displayed_q4) {
gManimSt.actor[i].hp_displayed_q4 = r4;
sub_807BD54(proc, i);
updated = TRUE;
}
}
if (!updated && gCurrentMapAnimState.u5F)
gCurrentMapAnimState.u5F = FALSE;
if (!updated && gManimSt.u5F)
gManimSt.u5F = FALSE;
}
void sub_807BD54(struct MAInfoFrameProc* proc, int a)
{
int dummy = gCurrentMapAnimState.actors[a].u0E/16;
int dummy = gManimSt.actor[a].hp_displayed_q4/16;
int r6 = (dummy >= 100);
sub_807BA28(
gBG0TilemapBuffer + TILEMAP_INDEX(
gCurrentMapAnimState.actors[a].u10 + 3,
gCurrentMapAnimState.actors[a].u11 + 3),
gCurrentMapAnimState.actors[a].u0E/16,
gManimSt.actor[a].hp_info_x + 3,
gManimSt.actor[a].hp_info_y + 3),
gManimSt.actor[a].hp_displayed_q4/16,
TILEREF(32, BM_BGPAL_BANIM_UNK5), 3, 0, r6);
sub_807BB40(
gBG0TilemapBuffer + TILEMAP_INDEX(
gCurrentMapAnimState.actors[a].u10 + 4,
gCurrentMapAnimState.actors[a].u11 + 3),
gCurrentMapAnimState.actors[a].u0C,
gCurrentMapAnimState.actors[a].u0E/16,
gManimSt.actor[a].hp_info_x + 4,
gManimSt.actor[a].hp_info_y + 3),
gManimSt.actor[a].hp_max,
gManimSt.actor[a].hp_displayed_q4/16,
0, gUnknown_089A3648);
BG_EnableSyncByMask(BG0_SYNC_BIT);
@ -208,35 +208,35 @@ u16* GetBattleInfoPalByFaction(struct Unit* unit)
void DisplayBattleInfoBox(struct MAInfoFrameProc* proc, int index, int arg2)
{
gCurrentMapAnimState.actors[index].u10 = proc->x + arg2;
gCurrentMapAnimState.actors[index].u11 = proc->y;
gManimSt.actor[index].hp_info_x = proc->x + arg2;
gManimSt.actor[index].hp_info_y = proc->y;
ApplyPalette(
GetBattleInfoPalByFaction(gCurrentMapAnimState.actors[index].pUnit),
GetBattleInfoPalByFaction(gManimSt.actor[index].unit),
BM_BGPAL_BANIM_IFBACK + index);
Decompress(
TsaSet_MapBattleBoxGfx[gCurrentMapAnimState.actorCount_maybe][index], gGenericBuffer);
TsaSet_MapBattleBoxGfx[gManimSt.actorCount_maybe][index], gGenericBuffer);
CallARM_FillTileRect(
TILEMAP_LOCATED(gBG1TilemapBuffer,
gCurrentMapAnimState.actors[index].u10,
gCurrentMapAnimState.actors[index].u11),
gManimSt.actor[index].hp_info_x,
gManimSt.actor[index].hp_info_y),
(u16*) gGenericBuffer,
(u16)(BM_BGCHR_BANIM_IFBACK | TILEREF(0, BM_BGPAL_BANIM_IFBACK + index)));
BG_EnableSyncByMask(BG1_SYNC_BIT);
DrawMapBattleInfoText(
PutStringCentered(
TILEMAP_LOCATED(gBG0TilemapBuffer,
gCurrentMapAnimState.actors[index].u10 + 2,
gCurrentMapAnimState.actors[index].u11 + 1),
gManimSt.actor[index].hp_info_x + 2,
gManimSt.actor[index].hp_info_y + 1),
0, 9,
GetStringFromIndex(UNIT_NAME_ID(gCurrentMapAnimState.actors[index].pUnit)));
GetStringFromIndex(UNIT_NAME_ID(gManimSt.actor[index].unit)));
BG_EnableSyncByMask(BG0_SYNC_BIT);
gCurrentMapAnimState.actors[index].u0E = gCurrentMapAnimState.actors[index].u0D*16;
gManimSt.actor[index].hp_displayed_q4 = gManimSt.actor[index].hp_cur*16;
sub_807BD54(proc, index);
}

231
src/mapanim_lvup.c Normal file
View File

@ -0,0 +1,231 @@
#include "global.h"
#include "bmunit.h"
#include "bmbattle.h"
#include "hardware.h"
#include "fontgrp.h"
#include "face.h"
#include "ap.h"
#include "ctc.h"
#include "soundwrapper.h"
#include "mapanim.h"
void StartManimLevelUp(int actor_id, ProcPtr parent)
{
struct ManimLevelUpProc * proc;
proc = Proc_StartBlocking(ProcScr_ManimLevelUp, parent);
proc->actor_id = actor_id;
}
void InitManimLevelUpWindow(void)
{
SetWinEnable(1, 0, 0);
SetWin0Box(0, 0, 240, 48);
SetWin0Layers(0, 0, 1, 1, 1);
SetWOutLayers(1, 1, 1, 1, 1);
}
void ClearManimLevelUpWindow(void)
{
SetWinEnable(0, 0, 0);
}
void ManimLevelUp_InitMainScreen(struct ManimLevelUpProc *proc)
{
int i;
Font_ResetAllocation();
BG_Fill(gBG0TilemapBuffer, 0);
PutManimLevelUpFrame(proc->actor_id, 1, 1);
for (i = 0; i < 9; i++)
PutManimLevelUpStat(proc->actor_id, 1, 1, i, false);
BG_EnableSyncByMask(BG0_SYNC_BIT);
proc->next_stat_num = 0;
proc->clock = 0;
proc->y_scroll_offset = -144;
gLCDControlBuffer.bg0cnt.priority = 0;
gLCDControlBuffer.bg1cnt.priority = 1;
gLCDControlBuffer.bg2cnt.priority = 1;
gLCDControlBuffer.bg3cnt.priority = 2;
SetDefaultColorEffects();
SetWinEnable(0, 0, 0);
BG_SetPosition(BG_0, 0, proc->y_scroll_offset);
BG_SetPosition(BG_1, 0, proc->y_scroll_offset);
StartFace(0, gManimSt.actor[proc->actor_id].unit->pCharacterData->portraitId,
184, 32 - proc->y_scroll_offset, 0x1042);
gFaces[0]->yPos = 32 - proc->y_scroll_offset;
// TODO: constants
StartManimLevelUpStatGainLabels(0x200, 3, 1, proc);
}
void ManimLevelUpLabelColor_Init(struct ManimLevelUpLabelColorProc *proc)
{
proc->clock = 0;
}
void ManimLevelUpLabelColor_Loop(struct ManimLevelUpLabelColorProc *proc)
{
int new_color_offset;
u16 *colors = Pal_ManimLevelUpStatGainCycling;
proc->clock++;
if ((proc->clock % 4) != 0)
return;
new_color_offset = (proc->clock >> 2) & 0xF;
// TODO: constants
CopyToPaletteBuffer(colors + new_color_offset + 0x00, (0x10 + proc->pal + 0) * 0x20 + 0x12, 0x20 - 0x12);
CopyToPaletteBuffer(colors + new_color_offset + 0x20, (0x10 + proc->pal + 1) * 0x20 + 0x12, 0x20 - 0x12);
}
void ManimLevelUp_ScrollIn(struct ManimLevelUpProc *proc)
{
proc->y_scroll_offset += 8;
BG_SetPosition(BG_0, 0, proc->y_scroll_offset);
BG_SetPosition(BG_1, 0, proc->y_scroll_offset);
// NOTE: this is inconsistent with math in ManimLevelUp_InitMainScreen
gFaces[0]->yPos = 32 - proc->y_scroll_offset;
if (proc->y_scroll_offset >= -48)
Proc_Break(proc);
}
void ManimLevelUp_ScrollOut(struct ManimLevelUpProc *proc)
{
proc->y_scroll_offset -= 8;
BG_SetPosition(BG_0, 0, proc->y_scroll_offset);
BG_SetPosition(BG_1, 0, proc->y_scroll_offset);
// NOTE: this is inconsistent with math in ManimLevelUp_InitMainScreen
gFaces[0]->yPos = 32 - proc->y_scroll_offset;
if (proc->y_scroll_offset <= -144)
Proc_Break(proc);
}
void ManimLevelUp_PutStatGainLabels(struct ManimLevelUpProc * proc)
{
int stat_num;
if (proc->clock != 0) {
proc->clock--;
return;
}
for (stat_num = proc->next_stat_num; stat_num < 9; stat_num++) {
if (GetManimLevelUpStatGain(proc->actor_id, stat_num) != 0)
break;
}
if (stat_num >= 9) {
Proc_Break(proc);
return;
}
PutManimLevelUpStat(proc->actor_id, 1, 1, stat_num, true);
BG_EnableSyncByMask(BG0_SYNC_BIT);
StartManimLevelUpStatGainLabelAnim(
gManimLevelUpLabelInfoList[stat_num].x * 8 + 62,
gManimLevelUpLabelInfoList[stat_num].y * 8 + 23 - proc->y_scroll_offset,
stat_num, GetManimLevelUpStatGain(proc->actor_id, stat_num));
if (stat_num == 0) {
PlaySoundEffect(0x2CD);
} else {
PlaySoundEffect(0x76);
}
proc->next_stat_num = stat_num + 1;
proc->clock = 20;
}
void ManimLevelUp_DimBgm(struct ManimLevelUpProc * proc)
{
StartBgmVolumeChange(0x100, 0x80, 0x10, proc);
}
void ManimLevelUp_StartLevelUpText(struct ManimLevelUpProc * proc)
{
int ix, iy;
int x, y;
Decompress(Img_ManimLevelUpText, OBJ_VRAM0 + 0x1C0 * CHR_SIZE);
ApplyPalettes(Pal_ManimLevelUp, 0x10 + 3, 3);
ix = SCREEN_TILE_X(gManimSt.actor[proc->actor_id].unit->xPos) * 2;
x = ix * 8 + 16;
iy = SCREEN_TILE_Y(gManimSt.actor[proc->actor_id].unit->yPos) * 2;
y = iy * 8 - 8;
if (SCREEN_TILE_Y(gManimSt.actor[proc->actor_id].unit->yPos) * 2 < 4)
y = y + 32;
if (SCREEN_TILE_X(gManimSt.actor[proc->actor_id].unit->xPos) * 2 < 4)
x = 48;
if (SCREEN_TILE_X(gManimSt.actor[proc->actor_id].unit->xPos) * 2 > 25)
x = 208;
APProc_Create(gUnknown_089A5A6C, x, y, OAM2_CHR(0x1C0) + OAM2_PAL(0x3), 0, 2);
PlaySoundEffect(0x5B);
}
void ManimLevelUp_EndLevelUpText(struct ManimLevelUpProc * proc)
{
APProc_DeleteAll();
}
void ManimLevelUp_RestoreBgm(struct ManimLevelUpProc * proc)
{
StartBgmVolumeChange(0x80, 0x100, 0x10, proc);
}
void ManimLevelUp_Clear(struct ManimLevelUpProc * proc)
{
ResetDialogueScreen();
}
CONST_DATA struct ProcCmd ProcScr_ManimLevelUp[] = {
PROC_SET_END_CB(ManimLevelUp_Clear),
PROC_SLEEP(1),
PROC_CALL(InitManimLevelUpWindow),
PROC_CALL(ManimLevelUp_DimBgm),
PROC_YIELD,
PROC_CALL(ManimLevelUp_StartLevelUpText),
PROC_SLEEP(70),
PROC_CALL(ManimLevelUp_EndLevelUpText),
PROC_SLEEP(1),
PROC_CALL(ManimLevelUp_RestoreBgm),
PROC_YIELD,
PROC_CALL(ManimLevelUp_InitMainScreen),
PROC_YIELD,
PROC_REPEAT(ManimLevelUp_ScrollIn),
PROC_SLEEP(30),
PROC_REPEAT(ManimLevelUp_PutStatGainLabels),
PROC_SLEEP(60),
PROC_CALL(EndManimLevelUpStatGainLabels),
PROC_SLEEP(1),
PROC_REPEAT(ManimLevelUp_ScrollOut),
PROC_CALL(ClearManimLevelUpWindow),
PROC_CALL(ResetDialogueScreen),
PROC_SLEEP(4),
PROC_END,
};

292
src/mapanim_lvupfx.c Normal file
View File

@ -0,0 +1,292 @@
#include "global.h"
#include "bmunit.h"
#include "bmbattle.h"
#include "hardware.h"
#include "fontgrp.h"
#include "ap.h"
#include "ctc.h"
#include "constants/video-global.h"
#include "mapanim.h"
void PutManimLevelUpFrame(int actor_id, int x, int y)
{
int i;
BG_Fill(gBG1TilemapBuffer, 0);
Decompress(Img_LevelUpBoxFrame, (void *)VRAM + GetBackgroundTileDataOffset(1) + 0x200 * CHR_SIZE);
Decompress(Tsa_LevelUpBoxFrame, gGenericBuffer);
PutTmLinear((void *)gGenericBuffer, (void *)gBG1TilemapBuffer, 0x20 * 0x1C, TILEREF(0x200, BGPAL_MANIM_INFO));
ApplyPalette(Pal_LevelUpBoxFrame, BGPAL_MANIM_INFO);
PutString(
TILEMAP_LOCATED(gBG0TilemapBuffer, x + 2, y),
TEXT_COLOR_NORMAL,
GetStringFromIndex(gManimSt.actor[actor_id].unit->pClassData->nameTextId));
for (i = 0; gManimLevelUpLabelInfoList[i].x != 0xFF; i++) {
PutStringCentered(
TILEMAP_LOCATED(gBG0TilemapBuffer, x + gManimLevelUpLabelInfoList[i].x, y + gManimLevelUpLabelInfoList[i].y),
TEXT_COLOR_GOLD, 3,
GetStringFromIndex(*gManimLevelUpLabelInfoList[i].msg[UnitHasMagicRank(gManimSt.actor[actor_id].unit) == true]));
}
BG_EnableSyncByMask(BG0_SYNC_BIT + BG1_SYNC_BIT);
}
void PutManimLevelUpStat(int actor_id, int x, int y, int stat_num, bool after_gain)
{
DrawDecNumber(
TILEMAP_LOCATED(gBG0TilemapBuffer, x + gManimLevelUpLabelInfoList[stat_num].x + 4, y + gManimLevelUpLabelInfoList[stat_num].y),
TEXT_COLOR_BLUE,
GetManimLevelUpBaseStat(actor_id, stat_num) + (after_gain ? GetManimLevelUpStatGain(actor_id, stat_num) : 0));
}
int GetManimLevelUpStatGain(int actor_id, int stat_num)
{
switch (stat_num) {
case 0:
return 1;
case 1:
return gManimSt.actor[actor_id].bu->changeHP;
case 2:
return gManimSt.actor[actor_id].bu->changePow;
case 3:
return gManimSt.actor[actor_id].bu->changeSkl;
case 4:
return gManimSt.actor[actor_id].bu->changeSpd;
case 5:
return gManimSt.actor[actor_id].bu->changeLck;
case 6:
return gManimSt.actor[actor_id].bu->changeDef;
case 7:
return gManimSt.actor[actor_id].bu->changeRes;
case 8:
return gManimSt.actor[actor_id].bu->changeCon;
default:
return 0;
}
}
int GetManimLevelUpBaseStat(int actor_id, int stat_num)
{
// getting the original unit to ensure we get the base stats
struct Unit * unit = GetUnit(gManimSt.actor[actor_id].unit->index);
switch (stat_num) {
case 0:
return gManimSt.actor[actor_id].bu->levelPrevious;
case 1:
return unit->maxHP;
case 2:
return unit->pow;
case 3:
return unit->skl;
case 4:
return unit->spd;
case 5:
return unit->lck;
case 6:
return unit->def;
case 7:
return unit->res;
case 8:
return UNIT_CON_BASE(unit);
default:
return 0;
}
}
void ManimLevelUpStatGainLabel_Finish(struct ManimLevelUpStatGainLabelProc * proc)
{
APProc_DeleteAll();
}
void StartManimLevelUpStatGainLabels(int chr, int pal, int sprite_layer, ProcPtr parent)
{
struct ManimLevelUpStatGainLabelProc * proc_a;
struct ManimLevelUpLabelColorProc * proc_b;
proc_a = Proc_Start(ProcScr_ManimLevelUpStatGainLabel, parent);
proc_a->chr = chr;
proc_a->pal = pal;
proc_a->sprite_layer = sprite_layer;
Decompress(Img_ManimLevelUpStatGain, OBJ_VRAM0 + (OAM2_CHR(chr) << 5));
ApplyPalette(Pal_ManimLevelUp, 0x10 + pal);
ApplyPalette(Pal_ManimLevelUp, 0x10 + pal + 1);
proc_b = Proc_Start(ProcScr_ManimLevelUpLabelColor, proc_a);
proc_b->pal = pal;
}
void EndManimLevelUpStatGainLabels(void)
{
Proc_EndEach(ProcScr_ManimLevelUpStatGainLabel);
}
void StartManimLevelUpStatGainLabelAnim(int x, int y, int stat_num, int stat_gain)
{
int stat_loss;
int chr_common, chr_this_stat;
struct ManimLevelUpStatGainLabelProc * proc;
u8 *digits_chr = Img_ManimLevelUpStatGainDigits;
proc = Proc_Find(ProcScr_ManimLevelUpStatGainLabel);
chr_common = proc->chr;
chr_this_stat = proc->chr + (stat_num - 1) * 2;
if (stat_num == 0) {
APProc_Create(SpriteAnim_ManimStatGain,
x - 18, y - 4,
OAM2_PAL(proc->pal) + chr_common + OAM2_LAYER(proc->sprite_layer),
0, 2);
} else {
if (stat_gain > 0)
stat_loss = 0;
else
stat_loss = 1;
APProc_Create(SpriteAnim_ManimStatGain,
x, y,
OAM2_PAL(proc->pal + stat_loss) + chr_common + OAM2_LAYER(proc->sprite_layer),
1 + stat_loss, 2);
APProc_Create(SpriteAnim_ManimStatGain,
x - 3, y,
OAM2_PAL(proc->pal) + chr_this_stat + OAM2_LAYER(proc->sprite_layer),
3 + stat_loss, 2);
if (stat_gain > 0) {
APProc_Create(SpriteAnim_ManimStatGain,
x - 18, y - 4,
OAM2_PAL(proc->pal) + chr_common + OAM2_LAYER(proc->sprite_layer),
0, 2);
}
if (stat_gain < 0) {
VramCopy(digits_chr + 0x20 * CHR_SIZE,
OBJ_VRAM0 + (OAM2_CHR(chr_this_stat + 0x4C) << 5), CHR_SIZE);
}
VramCopy(digits_chr + (OAM2_CHR(ABS(stat_gain)) << 5),
OBJ_VRAM0 + (OAM2_CHR(chr_this_stat + 0x2D) << 5), CHR_SIZE);
VramCopy(digits_chr + (OAM2_CHR(ABS(stat_gain) + 0x20) << 5),
OBJ_VRAM0 + (OAM2_CHR(chr_this_stat + 0x4D) << 5), CHR_SIZE);
}
}
void StartPrepItemBoostStatGainLabelAnim(int x, int y, int stat_gain)
{
int chr_common, chr_this_stat, stat_abs, stat_loss;
struct ManimLevelUpStatGainLabelProc * proc;
u8 *digits_chr = Img_ManimLevelUpStatGainDigits;
stat_abs = ABS(stat_gain);
proc = Proc_Find(ProcScr_ManimLevelUpStatGainLabel);
chr_common = proc->chr;
if (stat_gain >= 0) {
chr_this_stat = chr_common + 2 * (stat_abs - 1);
stat_loss = 5;
} else {
chr_this_stat = chr_common +16;
stat_loss = 6;
}
APProc_Create(SpriteAnim_ManimStatGain,
x, y,
chr_common + OAM2_PAL(proc->pal) + OAM2_LAYER(proc->sprite_layer),
stat_loss, 2);
APProc_Create(SpriteAnim_ManimStatGain,
x - 3, y,
chr_this_stat + OAM2_PAL(proc->pal) + OAM2_LAYER(proc->sprite_layer),
3, 2);
APProc_Create(SpriteAnim_ManimStatGain,
x - 18, y - 4,
chr_common + OAM2_PAL(proc->pal) + OAM2_LAYER(proc->sprite_layer),
0, 2);
VramCopy(digits_chr + (OAM2_CHR(stat_abs) << 5),
OBJ_VRAM0 + (OAM2_CHR(chr_this_stat + 0x2D) << 5), CHR_SIZE);
VramCopy(digits_chr + (OAM2_CHR(stat_abs + 0x20) << 5),
OBJ_VRAM0 + (OAM2_CHR(chr_this_stat + 0x4D) << 5), CHR_SIZE);
}
struct ManimLevelUpLabelInfo CONST_DATA gManimLevelUpLabelInfoList[] = {
{
.x = 9, .y = 0,
.msg = { &gMid_Lv, &gMid_Lv },
},
{
.x = 1, .y = 4,
.msg = { &gMid_Hp, &gMid_Hp },
},
{
.x = 1, .y = 6,
.msg = { &gMid_Str, &gMid_Mag },
},
{
.x = 1, .y = 8,
.msg = { &gMid_Skl, &gMid_Skl },
},
{
.x = 1, .y = 10,
.msg = { &gMid_Spd, &gMid_Spd },
},
{
.x = 9, .y = 4,
.msg = { &gMid_Lck, &gMid_Lck },
},
{
.x = 9, .y = 6,
.msg = { &gMid_Def, &gMid_Def },
},
{
.x = 9, .y = 8,
.msg = { &gMid_Res, &gMid_Res },
},
{
.x = 9, .y = 10,
.msg = { &gMid_Con, &gMid_Con },
},
{
.x = -1, .y = -1
}
};
CONST_DATA struct ProcCmd ProcScr_ManimLevelUpStatGainLabel[] =
{
PROC_SET_END_CB(ManimLevelUpStatGainLabel_Finish),
PROC_BLOCK,
};
CONST_DATA struct ProcCmd ProcScr_ManimLevelUpLabelColor[] = {
PROC_CALL(ManimLevelUpLabelColor_Init),
PROC_REPEAT(ManimLevelUpLabelColor_Loop),
PROC_END
};

View File

@ -1677,12 +1677,12 @@ void MU_StartDelayedFaceTarget(struct MUProc* proc) {
static void MU_EndRefaceApAnim(int argAp) {
struct APHandle* ap = (struct APHandle*) argAp;
int actor1 = gCurrentMapAnimState.subjectActorId;
int actor1 = gManimSt.subjectActorId;
int actor2 = 1 - actor1;
SetBattleAnimFacing(
actor1, actor2,
GetSpellAssocFacing(gCurrentMapAnimState.actors[0].pBattleUnit->weaponBefore)
GetSpellAssocFacing(gManimSt.actor[0].bu->weaponBefore)
);
ap->frameTimer = 0;

View File

@ -165,7 +165,9 @@ struct OpInfoGaugeDrawProc {
};
// TODO: Move elsewhere
void sub_805AA68(void *);
void sub_805AE14(void *);
void sub_805AE40(void *, s16, s16, s16, s16);
void sub_805A7B4(void*);
s8 sub_805A96C(void*);
void sub_805A990(void*);

View File

@ -187,7 +187,7 @@ void OpSubtitle_Init(struct OpSubtitleProc* proc) {
BG_EnableSyncByMask(BG2_SYNC_BIT);
Sound_PlaySong80024D4(3, 0);
StartBgm(3, 0);
proc->index = 0;
proc->timer_2a = 60;

View File

@ -331,7 +331,7 @@ void PopupProc_PrepareGfx(struct PopupProc *proc)
void PopupProc_MaybeSetVolume(struct PopupProc *proc)
{
if (0 != proc->soundId)
ISuspectThisToBeMusicRelated_8002730(0x100, 0x80, 0x10, (ProcPtr)proc);
StartBgmVolumeChange(0x100, 0x80, 0x10, (ProcPtr)proc);
}
void PopupProc_PlaySound(struct PopupProc *proc)
@ -344,7 +344,7 @@ void PopupProc_PlaySound(struct PopupProc *proc)
void PopupProc_MaybeResetVolume(struct PopupProc *proc)
{
if (0 != proc->soundId)
ISuspectThisToBeMusicRelated_8002730(0x80, 0x100, 0x10, (ProcPtr)proc);
StartBgmVolumeChange(0x80, 0x100, 0x10, (ProcPtr)proc);
}
void PopupIconUpdateProc_Loop(struct PopupIconUpdateProc *proc)

View File

@ -439,7 +439,7 @@ void AtMenu_StartSubmenu(struct ProcAtMenu *proc)
void AtMenu_OnSubmenuEnd(struct ProcAtMenu *proc)
{
if (3 == proc->state)
ISuspectThisToBeMusicRelated_8002730(0x80, 0x100, 0x20, NULL);
StartBgmVolumeChange(0x80, 0x100, 0x20, NULL);
switch (proc->state) {
case 4:

View File

@ -1014,7 +1014,7 @@ void StartPrepSaveScreen(ProcPtr proc) {
gPlaySt.unk4A_2 = 4;
}
ISuspectThisToBeMusicRelated_8002730(0x100, 0x80, 0x20, 0);
StartBgmVolumeChange(0x100, 0x80, 0x20, 0);
sub_801240C();
Make6C_savemenu2(proc);
@ -1022,7 +1022,7 @@ void StartPrepSaveScreen(ProcPtr proc) {
}
void sub_8034168() {
ISuspectThisToBeMusicRelated_8002730(0x80, 0x100, 0x20, 0);
StartBgmVolumeChange(0x80, 0x100, 0x20, 0);
gPlaySt.unk4A_2 = 2;
return;
}

View File

@ -46,7 +46,7 @@ s8 sub_80AB9FC(struct SaveMenuProc*, int);
//! FE8U = 0x080A882C
void sub_80A882C(ProcPtr proc) {
Proc_Goto(proc, 18);
ISuspectThisToBeMusicRelated_8002730(0xc0, 0, 0x10, 0);
StartBgmVolumeChange(0xc0, 0, 0x10, 0);
return;
}
@ -624,7 +624,7 @@ void Loop6C_savemenu(struct SaveMenuProc* proc) {
case 0x10:
proc->unk_2c = sub_80AB98C(proc->unk_2c, 0, 1);
Proc_Goto(proc, 1);
ISuspectThisToBeMusicRelated_8002730(0xC0, 0x100, 0x10, 0);
StartBgmVolumeChange(0xC0, 0x100, 0x10, 0);
break;
@ -939,7 +939,7 @@ void sub_80A96EC(struct SaveMenuProc* proc) {
if (proc->unk_42 == 0x10) {
Proc_Goto(proc, 0x12);
ISuspectThisToBeMusicRelated_8002730(0xc0, 0, 0x10, 0);
StartBgmVolumeChange(0xc0, 0, 0x10, 0);
} else if (proc->unk_42 == 0x40) {
Proc_Goto(proc, 0x11);
} else {
@ -1414,7 +1414,7 @@ void sub_80AA030(struct SaveMenuProc* proc) {
} else if (proc->unk_42 & 0x40) {
return;
} else if (proc->unk_42 & 0x100) {
ISuspectThisToBeMusicRelated_8002730(0xc0, 0x100, 0x10, 0);
StartBgmVolumeChange(0xc0, 0x100, 0x10, 0);
if ((proc->unk_42 & 0x80) != 0) {
SetNextGameActionId(GAME_ACTION_A);
} else {

View File

@ -36,7 +36,7 @@ struct MusicProc {
/*0x6A*/ s16 unk6A;
};
static void sub_8002788(struct Proc *proc);
static void MusicVc_OnLoop(struct Proc *proc);
int Sound_GetCurrentSong(void)
{
@ -117,7 +117,7 @@ void Sound_FadeOutSE(int speed)
m4aMPlayFadeOut(&gMPlayInfo_SE7_EVT, speed);
}
void Sound_PlaySong8002448(int songId, struct MusicPlayerInfo *player)
void StartBgmCore(int songId, struct MusicPlayerInfo *player)
{
sSoundStatus.unk6 = TRUE;
sSoundStatus.unk7 = 0;
@ -127,7 +127,7 @@ void Sound_PlaySong8002448(int songId, struct MusicPlayerInfo *player)
m4aMPlayImmInit(&gMPlayInfo_BGM2);
}
void PlaySong8002478(int songId, int speed, struct MusicPlayerInfo *player)
void StartOrChangeBgm(int songId, int speed, struct MusicPlayerInfo *player)
{
if (sSoundStatus.unk6 && Sound_GetCurrentSong() == songId)
return;
@ -141,19 +141,19 @@ void PlaySong8002478(int songId, int speed, struct MusicPlayerInfo *player)
}
else
{
Sound_PlaySong8002448(songId, player);
StartBgmCore(songId, player);
}
}
}
void Sound_PlaySong80024D4(int songId, struct MusicPlayerInfo *player)
void StartBgm(int songId, struct MusicPlayerInfo *player)
{
PlaySong8002478(songId, 3, player);
StartOrChangeBgm(songId, 3, player);
}
void Sound_PlaySong80024E4(int songId, int speed, struct MusicPlayerInfo *player)
void StartBgmExt(int songId, int speed, struct MusicPlayerInfo *player)
{
PlaySong8002478(songId, speed, player);
StartOrChangeBgm(songId, speed, player);
}
static void sub_80024F0(struct Proc *proc)
@ -178,7 +178,7 @@ static struct ProcCmd sMusicProc1Script[] =
PROC_END,
};
void Sound_PlaySong8002574(int songId, int b, struct MusicPlayerInfo *player)
void StartBgmFadeIn(int songId, int duration, struct MusicPlayerInfo *player)
{
struct MusicProc *proc;
@ -196,12 +196,12 @@ void Sound_PlaySong8002574(int songId, int b, struct MusicPlayerInfo *player)
m4aMPlayVolumeControl(&gMPlayInfo_BGM1, 0xFFFF, 0);
m4aMPlayVolumeControl(&gMPlayInfo_BGM2, 0xFFFF, 0);
proc->delayCounter = 0;
proc->unk4E = b * 16;
proc->unk4E = duration * 16;
sMusicProc1 = (struct Proc *)proc;
}
}
void sub_8002620(int songId)
void OverrideBgm(int songId)
{
if (gPlaySt.cfgDisableBgm == 0)
{
@ -215,7 +215,7 @@ void sub_8002620(int songId)
}
}
void sub_8002670(void)
void RestoreBgm(void)
{
if (gPlaySt.cfgDisableBgm == 0 && sSoundStatus.unk2 != 0)
{
@ -228,7 +228,7 @@ void sub_8002670(void)
}
}
void sub_80026BC(u16 speed)
void _RestoreBgm(u16 speed)
{
if (gPlaySt.cfgDisableBgm == 0 && sSoundStatus.unk2 != 0)
{
@ -241,7 +241,7 @@ void sub_80026BC(u16 speed)
}
}
void sub_800270C(void)
void MakeBgmOverridePersist(void)
{
if (gPlaySt.cfgDisableBgm == 0)
{
@ -253,11 +253,11 @@ void sub_800270C(void)
struct ProcCmd sMusicProc2Script[] =
{
PROC_YIELD,
PROC_REPEAT(sub_8002788),
PROC_REPEAT(MusicVc_OnLoop),
PROC_END,
};
void ISuspectThisToBeMusicRelated_8002730(int volume, int b, int c, ProcPtr parent)
void StartBgmVolumeChange(int volume, int b, int c, ProcPtr parent)
{
struct MusicProc *proc;
@ -275,7 +275,7 @@ void ISuspectThisToBeMusicRelated_8002730(int volume, int b, int c, ProcPtr pare
sMusicProc2 = (ProcPtr)proc;
}
static void sub_8002788(struct Proc *proc)
static void MusicVc_OnLoop(struct Proc *proc)
{
struct MusicProc *mproc = (struct MusicProc *)proc;
Sound_SetSEVolume(Interpolate(4, mproc->unk64, mproc->unk66, mproc->unk68++, mproc->unk6A));
@ -297,7 +297,7 @@ static void sub_8002788(struct Proc *proc)
}
}
void Some6CMusicRelatedWaitCallback(struct Proc *proc)
void DelaySong_OnLoop(struct Proc *proc)
{
struct MusicProc *mproc = (struct MusicProc *)proc;
mproc->delayCounter--;
@ -312,7 +312,7 @@ void Some6CMusicRelatedWaitCallback(struct Proc *proc)
struct ProcCmd gMusicProc3Script[] =
{
PROC_REPEAT(Some6CMusicRelatedWaitCallback),
PROC_REPEAT(DelaySong_OnLoop),
PROC_END,
};
@ -389,9 +389,9 @@ void sub_800296C(struct Proc *proc)
if (sub_8002264() != 0 && mproc->unk64 != 0)
{
if (mproc->unk5C == -1)
ISuspectThisToBeMusicRelated_8002730(mproc->unk64, mproc->unk66, mproc->unk58, proc);
StartBgmVolumeChange(mproc->unk64, mproc->unk66, mproc->unk58, proc);
else
ISuspectThisToBeMusicRelated_8002730(mproc->unk64, 0, mproc->unk58, proc);
StartBgmVolumeChange(mproc->unk64, 0, mproc->unk58, proc);
}
}
@ -400,7 +400,7 @@ void sub_80029BC(struct Proc *proc)
struct MusicProc *mproc = (struct MusicProc *)proc;
if (mproc->unk5C > 0)
{
Sound_PlaySong80024D4(mproc->unk5C, 0);
StartBgm(mproc->unk5C, 0);
Sound_SetSEVolume(mproc->unk66);
}
else
@ -455,7 +455,7 @@ void sub_8002A88(int songId)
{
if (sub_8002264() != 0)
Sound_SetSEVolume(0);
Sound_PlaySong8002448(songId, 0);
StartBgmCore(songId, 0);
}
}

View File

@ -3060,7 +3060,7 @@ static DECL_INFO sHelpInfo_08A0113C =
// TODO: msg constants
unsigned CONST_DATA gMid_Lv = 0x4E7; // Lv
unsigned CONST_DATA gMid_Exp_Unused = 0x4E8; // Exp
unsigned CONST_DATA gMid_Exp = 0x4E8; // Exp
unsigned CONST_DATA gMid_Hp = 0x4E9; // HP
unsigned CONST_DATA gMid_Str = 0x4FE; // Str
unsigned CONST_DATA gMid_Mag = 0x4FF; // Mag

View File

@ -478,7 +478,7 @@ void Title_Loop_DrawRedBlueOrbs(struct TitleScreenProc* proc) {
);
if (proc->timer == 20) {
Sound_PlaySong80024E4(2, 0, 0);
StartBgmExt(2, 0, 0);
}
if (proc->timer < 20) {
@ -929,7 +929,7 @@ void Title_RestartProc(struct TitleScreenProc* proc) {
gLCDControlBuffer.dispcnt.bg3_on = 0;
gLCDControlBuffer.dispcnt.obj_on = 0;
Sound_PlaySong80024E4(0x43, 0, 0);
StartBgmExt(0x43, 0, 0);
return;
}
@ -1025,7 +1025,7 @@ void StartTitleScreen_WithMusic(ProcPtr parent) {
proc = Proc_StartBlocking(gProcScr_TitleScreen, parent);
proc->unk_29 = 0;
Sound_PlaySong80024E4(0x43, 0, 0);
StartBgmExt(0x43, 0, 0);
return;
}

View File

@ -326,11 +326,11 @@ void DrawArenaOpponentDetailsText(ProcPtr proc) {
SetFont(0);
Font_LoadForUI();
MADrawTextMaybe(gUnknown_02022F38, 0, GetStringFromIndex(gMid_Lv));
PutString(gUnknown_02022F38, 0, GetStringFromIndex(gMid_Lv));
sub_8004B88(gUnknown_02022F38 + 4, 2, gArenaState.opponentUnit->level);
MADrawTextMaybe(gUnknown_02022F38 + 0x40, 0, GetStringFromIndex(gArenaState.opponentUnit->pCharacterData->nameTextId));
MADrawTextMaybe(gUnknown_02022F38 + 7, 0, GetStringFromIndex(gArenaState.opponentUnit->pClassData->nameTextId));
MADrawTextMaybe(gUnknown_02022F38 + 0x47, 0, GetItemName(gArenaState.opponentWeapon));
PutString(gUnknown_02022F38 + 0x40, 0, GetStringFromIndex(gArenaState.opponentUnit->pCharacterData->nameTextId));
PutString(gUnknown_02022F38 + 7, 0, GetStringFromIndex(gArenaState.opponentUnit->pClassData->nameTextId));
PutString(gUnknown_02022F38 + 0x47, 0, GetItemName(gArenaState.opponentWeapon));
return;
}
@ -340,14 +340,14 @@ void Arena_PlayResultSong(ProcPtr proc) {
switch (ArenaGetResult()) {
case 1:
if (!gPlaySt.cfgDisableBgm) {
Sound_PlaySong8002448(0x3a, 0);
StartBgmCore(0x3a, 0);
}
break;
default:
if (!gPlaySt.cfgDisableBgm) {
Sound_PlaySong8002448(0x38, 0);
StartBgmCore(0x38, 0);
}
Proc_End(proc);
@ -360,7 +360,7 @@ void Arena_PlayResultSong(ProcPtr proc) {
//! FE8U = 0x080B5D2C
void Arena_PlayArenaSong(void) {
Sound_PlaySong80024E4(0x38, 0, 0);
StartBgmExt(0x38, 0, 0);
return;
}

View File

@ -605,7 +605,7 @@ s8 MusicOptionChangeHandler(ProcPtr proc) {
}
if ((gConfigUiState->unk_37 & 1) != 0) {
Sound_PlaySong80024D4(0x34, 0);
StartBgm(0x34, 0);
return 0;
}

View File

@ -590,7 +590,7 @@
. = 0x03E1E4; gBaArenaFlag = .;
. = 0x03E1E8; gpProcefxopCur = .;
. = 0x03E1EC; gUnknown_0203E1EC = .;
. = 0x03E1F0; gCurrentMapAnimState = .;
. = 0x03E1F0; gManimSt = .;
. = 0x03E1F8; gUnknown_0203E1F8 = .;
. = 0x03E254; gUnknown_0203E254 = .;
. = 0x03E754; gUnknown_0203E754 = .;