Skip to content

Commit

Permalink
Merge pull request #50 from UsernameFodder/sync
Browse files Browse the repository at this point in the history
Sync math operator/utility functions from pokeheartgold
  • Loading branch information
AnonymousRandomPerson authored Dec 27, 2023
2 parents 8742a9c + 32998ca commit 1dd0f32
Show file tree
Hide file tree
Showing 29 changed files with 538 additions and 501 deletions.
6 changes: 3 additions & 3 deletions asm/include/main_02000C6C.inc
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
.public _022A3805
.public _022A3806
.public _022B966C
.public __addsf3
.public __floatsisf
.public __mulsf3
.public _fadd
.public _fflt
.public _fmul
.public _s32_div_f
.public abs
.public ArrayFill32Fast
Expand Down
4 changes: 2 additions & 2 deletions asm/include/main_0200C4CC.inc
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@
.public _022AB92C
.public _022AB930
.public _022ABDE0
.public __extendsfdf2
.public __subsf3
.public _f2d
.public _fsub
.public _s32_div_f
.public _u32_div_f
.public ADVANCED_MENU_DEFAULT_WINDOW_PARAMS
Expand Down
8 changes: 4 additions & 4 deletions asm/include/main_02054C24.inc
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
.public _022B9484
.public _022B94BC
.public _022B9584
.public __divsf3
.public __floatunsisf
.public __mulsf3
.public _fdiv
.public _ffltu
.public _fmul
.public _s32_div_f
.public _u32_div_f
.public AddMoneyCarried
Expand Down Expand Up @@ -606,7 +606,7 @@
.public sub_0207F748
.public sub_0207F808
.public sub_0207F828
.public sub_0208F1CC
.public _fls
.public TACTIC_NAME_STRING_IDS
.public TACTICS_UNLOCK_LEVEL_TABLE
.public TEAM_MEMBER_TABLE_PTR
Expand Down
14 changes: 7 additions & 7 deletions asm/include/overlay_00.inc
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@
.public sub_0208B360
.public sub_0208DEB0
.public sub_0208DEBC
.public sub_0208DEC8
.public sub_0208E1E0
.public sub_0208E370
.public sub_0208E3EC
.public sub_0208E904
.public sub_0208FE3C
.public sub_020902AC
.public _dadd
.public _d2f
.public _dflt
.public _dmul
.public _dsub
.public _ll_udiv
.public _ddiv
.public SVC_WaitByLoop
.public ThreadExit
.public UnloadOverlay
Expand Down
4 changes: 2 additions & 2 deletions asm/include/overlay_01.inc
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@
.public sub_02062B64
.public sub_0207A2A4
.public sub_020851AC
.public sub_0208FE3C
.public sub_0208FE48
.public _ll_udiv
.public _ull_mod
.public UpdateWindow
.public vsprintf
.public WAN_TABLE
6 changes: 3 additions & 3 deletions asm/include/overlay_02.inc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
.public sub_02085030
.public sub_02085158
.public sub_0208B360
.public sub_0208FE3C
.public sub_0208FE48
.public sub_0208FE84
.public _ll_udiv
.public _ull_mod
.public _ll_mul
.public WaitForever2
4 changes: 2 additions & 2 deletions asm/include/overlay_03.inc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,6 @@
.public sub_020698B8
.public sub_02069904
.public sub_02069940
.public sub_0208FE3C
.public sub_0208FE48
.public _ll_udiv
.public _ull_mod
.public UnloadFile
4 changes: 2 additions & 2 deletions asm/include/overlay_05.inc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@
.public sub_020590DC
.public sub_0205BD78
.public sub_02062B64
.public sub_0208FE3C
.public sub_0208FE48
.public _ll_udiv
.public _ull_mod
.public UpdateWindow
4 changes: 2 additions & 2 deletions asm/include/overlay_07.inc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@
.public sub_0204A018
.public sub_0204A1CC
.public sub_0205BD78
.public sub_0208FE3C
.public sub_0208FE48
.public _ll_udiv
.public _ull_mod
.public UpdateWindow
6 changes: 3 additions & 3 deletions asm/include/overlay_11.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
.public _020A1870
.public _020A548A
.public _020A5490
.public __divsf3
.public __fixsfsi
.public __floatsisf
.public _fdiv
.public _ffix
.public _fflt
.public _s32_div_f
.public abs
.public AddBulkItemToStorage
Expand Down
2 changes: 1 addition & 1 deletion asm/include/overlay_29_022F62CC.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
.public RemoveGroundItem
.public SpawnItem
.public sub_020018A4
.public sub_0208FC8C
.public _ll_sdiv
.public TeamLeaderIqSkillIsEnabled
.public TryWarp
.public WAN_TABLE
Expand Down
36 changes: 18 additions & 18 deletions asm/main_02000C6C.s
Original file line number Diff line number Diff line change
Expand Up @@ -3584,16 +3584,16 @@ _020037D8:
ldrh r5, [r1]
bl EnableAllInterrupts
mov r0, r4
bl __floatsisf
bl _fflt
mov r4, r0
mov r0, r5
bl __floatsisf
bl _fflt
mov r1, r0
ldr r0, _02003820 ; =0x3B792FB2
bl __mulsf3
bl _fmul
mov r1, r0
mov r0, r4
bl __addsf3
bl _fadd
ldmia sp!, {r3, r4, r5, pc}
.align 2, 0
_02003818: .word _020AEF7C
Expand Down Expand Up @@ -5427,25 +5427,25 @@ EuclideanNorm__02005050: ; 0x02005050
stmdb sp!, {r4, r5, r6, lr}
ldmia r0, {r5, r6}
mov r0, r5
bl __floatsisf
bl _fflt
mov r4, r0
mov r0, r5
bl __floatsisf
bl _fflt
mov r1, r0
mov r0, r4
bl __mulsf3
bl _fmul
mov r5, r0
mov r0, r6
bl __floatsisf
bl _fflt
mov r4, r0
mov r0, r6
bl __floatsisf
bl _fflt
mov r1, r0
mov r0, r4
bl __mulsf3
bl _fmul
mov r1, r0
mov r0, r5
bl __addsf3
bl _fadd
bl sqrtf
ldmia sp!, {r4, r5, r6, pc}
arm_func_end EuclideanNorm__02005050
Expand All @@ -5455,25 +5455,25 @@ EuclideanNorm__020050B0: ; 0x020050B0
stmdb sp!, {r4, r5, r6, lr}
ldmia r0, {r5, r6}
mov r0, r5
bl __floatsisf
bl _fflt
mov r4, r0
mov r0, r5
bl __floatsisf
bl _fflt
mov r1, r0
mov r0, r4
bl __mulsf3
bl _fmul
mov r5, r0
mov r0, r6
bl __floatsisf
bl _fflt
mov r4, r0
mov r0, r6
bl __floatsisf
bl _fflt
mov r1, r0
mov r0, r4
bl __mulsf3
bl _fmul
mov r1, r0
mov r0, r5
bl __addsf3
bl _fadd
bl sqrtf
ldmia sp!, {r4, r5, r6, pc}
arm_func_end EuclideanNorm__020050B0
Expand Down
8 changes: 4 additions & 4 deletions asm/main_0200C4CC.s
Original file line number Diff line number Diff line change
Expand Up @@ -75434,8 +75434,8 @@ _0204900C:
bl GetTime
mov r1, r7
mov r7, r0
bl __subsf3
bl __extendsfdf2
bl _fsub
bl _f2d
mov r3, r0
mov r2, r1
ldr r0, _0204923C ; =_0209CD84
Expand Down Expand Up @@ -75492,8 +75492,8 @@ _020491A8:
_020491C4:
bl GetTime
mov r1, r7
bl __subsf3
bl __extendsfdf2
bl _fsub
bl _f2d
mov r3, r0
mov r2, r1
ldr r0, _02049244 ; =_0209CD94
Expand Down
10 changes: 5 additions & 5 deletions asm/main_02054C24.s
Original file line number Diff line number Diff line change
Expand Up @@ -34410,16 +34410,16 @@ _02071030:
addlo r1, r1, #0x10000
str r0, [r8, #0xec8]
mov r0, r1
bl __floatunsisf
bl _ffltu
mov sb, r0
mov r0, sl
bl __floatunsisf
bl _ffltu
mov r1, r0
mov r0, sb
bl __divsf3
bl _fdiv
mov r1, r0
ldr r0, _02071158 ; =0x42C80000
bl __mulsf3
bl _fmul
mov sb, r0
ldrsh r0, [r7, #0xc4]
mov r1, sb
Expand All @@ -34428,7 +34428,7 @@ _02071030:
strlt r0, [r8, #0xec0]
str sb, [r8, #0xebc]
ldr r0, [r8, #0xec0]
bl sub_0208F1CC
bl _fls
strlo sb, [r8, #0xec0]
movlo r0, #0x64
strloh r0, [r7, #0xc4]
Expand Down
Loading

0 comments on commit 1dd0f32

Please sign in to comment.