Skip to content

Commit

Permalink
Merge pull request #43 from AnonymousRandomPerson/main
Browse files Browse the repository at this point in the history
Decomped LFO functions
  • Loading branch information
AnonymousRandomPerson authored Dec 10, 2023
2 parents 98447b4 + c8c61d2 commit 84cc889
Show file tree
Hide file tree
Showing 15 changed files with 543 additions and 471 deletions.
8 changes: 4 additions & 4 deletions asm/include/main_02054C24.inc
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@
.public SoundEnvelopeStop
.public SoundEnvelopeStop2
.public SoundEnvelopeTick
.public SoundLfoBankReset
.public SoundLfoBankSet
.public SoundLfoBankSetConstEnvelopes
.public SoundLfoBankTick
.public SPECIAL_BAND_STAT_BOOST
.public SprintfStatic__02054A60
.public StartThread
Expand Down Expand Up @@ -571,10 +575,6 @@
.public sub_020534BC
.public sub_02053D1C
.public sub_02053F10
.public sub_0207509C
.public sub_020750B4
.public sub_020752AC
.public sub_020752F8
.public sub_02075600
.public sub_020756E8
.public sub_02079800
Expand Down
16 changes: 10 additions & 6 deletions asm/include/main_0207509C.inc → asm/include/main_02075600.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,6 @@
.public _020A9EA4
.public _020A9EB8
.public _020A9ECC
.public _020A9FA0
.public _020AE0B4
.public _020AE0C4
.public _020AE0C6
Expand All @@ -1536,7 +1535,6 @@
.public _020AEEF0
.public _020AF38C
.public _020AFE44
.public _020B1250
.public _020B2B94
.public _020B2B98
.public _020B2B9C
Expand Down Expand Up @@ -1716,7 +1714,6 @@
.public ARM9_UNKNOWN_TABLE__NA_20ADFB0
.public ARM9_UNKNOWN_TABLE__NA_20AE924
.public BaseFormsEqual
.public DRIVER_WORK
.public DTCM_BSS
.public GetKeyM2N
.public GetKeyM2NBaseForm
Expand All @@ -1727,8 +1724,6 @@
.public MIi_UncompressBackward
.public MISSION_FLOOR_RANKS_AND_ITEM_LISTS_1
.public MISSION_FLOOR_RANKS_AND_ITEM_LISTS_2
.public MUSIC_DURATION_LOOKUP_TABLE_1
.public MUSIC_DURATION_LOOKUP_TABLE_2
.public OS_IRQTable
.public OSi_ReferSymbol
.public RANK_STRINGS_1
Expand All @@ -1747,6 +1742,16 @@
.public SDK_SECTION_ARENA_DTCM_START
.public SDK_SECTION_ARENA_EX_START
.public SDK_SECTION_ARENA_ITCM_START
.public SoundLfoWaveFullNoiseFunc
.public SoundLfoWaveFullSquareFunc
.public SoundLfoWaveFullTriangleFunc
.public SoundLfoWaveHalfNoiseFunc
.public SoundLfoWaveHalfSquareFunc
.public SoundLfoWaveHalfTriangleFunc
.public SoundLfoWaveInvalidFunc
.public SoundLfoWaveReverseSawFunc
.public SoundLfoWaveSawFunc
.public SoundUtilGetRandomNumber
.public STRING_BALANCE_M_LEVEL_BIN
.public STRING_DUNGEON_DUNGEON_BIN
.public STRING_EFFECT_EFFECT_BIN
Expand Down Expand Up @@ -1891,7 +1896,6 @@
.public sub_0206074C
.public sub_02060804
.public sub_02060904
.public sub_0206C8F4
.public sub_0206CC14
.public sub_0206F808
.public sub_0206FD88
Expand Down
24 changes: 12 additions & 12 deletions asm/main_02054C24.s
Original file line number Diff line number Diff line change
Expand Up @@ -28987,8 +28987,8 @@ sub_0206C8C4: ; 0x0206C8C4
bx lr
arm_func_end sub_0206C8C4

arm_func_start sub_0206C8F4
sub_0206C8F4: ; 0x0206C8F4
arm_func_start SoundUtilGetRandomNumber
SoundUtilGetRandomNumber: ; 0x0206C8F4
ldr r1, _0206C914 ; =DRIVER_WORK
ldr r0, _0206C918 ; =0x00007FFF
ldr r2, [r1, #0x34]
Expand All @@ -29000,7 +29000,7 @@ sub_0206C8F4: ; 0x0206C8F4
.align 2, 0
_0206C914: .word DRIVER_WORK
_0206C918: .word 0x00007FFF
arm_func_end sub_0206C8F4
arm_func_end SoundUtilGetRandomNumber

arm_func_start sub_0206C91C
sub_0206C91C: ; 0x0206C91C
Expand Down Expand Up @@ -33178,7 +33178,7 @@ _0206FFE0:
mov r1, fp
bl SoundEnvelopeForceVolume
add r0, r7, #0x5c
bl sub_0207509C
bl SoundLfoBankReset
mov r0, #1
strh r0, [r7, #6]
ldrb r0, [sl, #0x1f]
Expand Down Expand Up @@ -33686,7 +33686,7 @@ FlushChannels: ; 0x02070674
mvn r1, #0xc0000000
bl SoundEnvelopeForceVolume
add r0, r5, #0x5c
bl sub_0207509C
bl SoundLfoBankReset
mov r0, #0
strh r0, [r5, #6]
mov r0, #0x10
Expand Down Expand Up @@ -33811,7 +33811,7 @@ _02070810:
add r0, sl, #0x3c
bl SoundEnvelopeForceVolume
add r0, sl, #0x5c
bl sub_0207509C
bl SoundLfoBankReset
add sb, sb, #1
strh r5, [sl, #6]
cmp sb, #2
Expand Down Expand Up @@ -37986,7 +37986,7 @@ sub_02073C5C: ; 0x02073C5C
_02073C74:
mov r1, r5
add r0, r4, #0x5c
bl sub_020752AC
bl SoundLfoBankSetConstEnvelopes
ldr r4, [r4, #0x154]
cmp r4, #0
bne _02073C74
Expand Down Expand Up @@ -38027,7 +38027,7 @@ sub_02073CD8: ; 0x02073CD8
ldrb r0, [r5, #0xc]
sub r0, r2, r0
add r6, r0, #1
bl sub_0206C8F4
bl SoundUtilGetRandomNumber
mul r1, r6, r0
mov r0, r1, asr #0xe
ldrb r2, [r5, #0xc]
Expand Down Expand Up @@ -38188,7 +38188,7 @@ sub_02073EDC: ; 0x02073EDC
moveq r0, #0
streq r0, [sp]
beq _02073F28
bl sub_0206C8F4
bl SoundUtilGetRandomNumber
mov r1, r4, lsl #1
mul r2, r1, r0
mov r0, r2, asr #0xe
Expand Down Expand Up @@ -38317,7 +38317,7 @@ _020740B0:
orr r2, r2, #0xff0
strh r2, [r4, #6]
ldrsb r2, [sl, #0x51]
bl sub_020750B4
bl SoundLfoBankSet
add r0, r5, #0x20
add r8, r4, #0x3c
ldmia r0, {r0, r1, r2, r3}
Expand Down Expand Up @@ -38514,7 +38514,7 @@ _02074364:
strb r5, [sb, #0x17]
bl SoundEnvelopeReset
add r0, sb, #0x5c
bl sub_0207509C
bl SoundLfoBankReset
str r4, [sb, #0x154]
str r4, [sb, #0x158]
ldrh r0, [sl, #0x2e]
Expand Down Expand Up @@ -38602,7 +38602,7 @@ _020744B0:
cmp r1, #1
bne _02074514
add r0, r5, #0x5c
bl sub_020752F8
bl SoundLfoBankTick
ldrh r1, [r5, #6]
orr r0, r1, r0
strh r0, [r5, #6]
Expand Down
Loading

0 comments on commit 84cc889

Please sign in to comment.