mirror of https://github.com/PrimeDecomp/prime.git
Match and link CVector2f
This commit is contained in:
parent
45312e97ea
commit
b85528fbab
|
@ -339,7 +339,7 @@ DoDrawImagePane__13CAuiImagePaneCF6CColorRC8CTextureifb:
|
|||
/* 802CC0F8 002C9058 80 C4 00 00 */ lwz r6, 0(r4)
|
||||
/* 802CC0FC 002C905C 38 7C 01 38 */ addi r3, r28, 0x138
|
||||
/* 802CC100 002C9060 88 A1 00 08 */ lbz r5, 8(r1)
|
||||
/* 802CC104 002C9064 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 802CC104 002C9064 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 802CC108 002C9068 50 C5 00 2E */ rlwimi r5, r6, 0, 0, 0x17
|
||||
/* 802CC10C 002C906C 90 01 00 78 */ stw r0, 0x78(r1)
|
||||
/* 802CC110 002C9070 90 A1 00 24 */ stw r5, 0x24(r1)
|
||||
|
@ -1205,7 +1205,7 @@ Update__13CAuiImagePaneFf:
|
|||
/* 802CCDB8 002C9D18 48 0C 7E F5 */ bl fmod
|
||||
/* 802CCDBC 002C9D1C FC 00 08 18 */ frsp f0, f1
|
||||
/* 802CCDC0 002C9D20 38 7F 01 38 */ addi r3, r31, 0x138
|
||||
/* 802CCDC4 002C9D24 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 802CCDC4 002C9D24 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 802CCDC8 002C9D28 D0 1F 00 D4 */ stfs f0, 0xd4(r31)
|
||||
/* 802CCDCC 002C9D2C 48 04 71 3D */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
/* 802CCDD0 002C9D30 54 60 06 3F */ clrlwi. r0, r3, 0x18
|
||||
|
@ -1347,8 +1347,8 @@ lbl_802CCFBC:
|
|||
/* 802CCFC0 002C9F20 38 63 00 08 */ addi r3, r3, 8
|
||||
/* 802CCFC4 002C9F24 42 00 FF E0 */ bdnz lbl_802CCFA4
|
||||
lbl_802CCFC8:
|
||||
/* 802CCFC8 002C9F28 C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 802CCFCC 002C9F2C 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 802CCFC8 002C9F28 C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 802CCFCC 002C9F2C 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 802CCFD0 002C9F30 C0 02 C4 48 */ lfs f0, lbl_805AE168@sda21(r2)
|
||||
/* 802CCFD4 002C9F34 57 80 06 3F */ clrlwi. r0, r28, 0x18
|
||||
/* 802CCFD8 002C9F38 D0 3D 01 38 */ stfs f1, 0x138(r29)
|
||||
|
|
|
@ -7,8 +7,8 @@ lbl_ctor:
|
|||
.section .sbss, "wa"
|
||||
.balign 8
|
||||
# skZero2f
|
||||
.global lbl_805A9458
|
||||
lbl_805A9458:
|
||||
.global skZeroVector__9CVector2f
|
||||
skZeroVector__9CVector2f:
|
||||
.skip 0x8
|
||||
|
||||
.section .text, "ax"
|
||||
|
@ -227,8 +227,8 @@ Magnitude__9CVector2fCFv:
|
|||
/* 80314120 00311080 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80314124 00311084 4E 80 00 20 */ blr
|
||||
|
||||
.global sub_80314128
|
||||
sub_80314128:
|
||||
.global __adv__9CVector2fFf
|
||||
__adv__9CVector2fFf:
|
||||
/* 80314128 00311088 C0 42 C8 F8 */ lfs f2, lbl_805AE618@sda21(r2)
|
||||
/* 8031412C 0031108C C0 03 00 00 */ lfs f0, 0(r3)
|
||||
/* 80314130 00311090 EC 22 08 24 */ fdivs f1, f2, f1
|
||||
|
@ -249,8 +249,8 @@ __amu__9CVector2fFf:
|
|||
/* 80314160 003110C0 D0 03 00 04 */ stfs f0, 4(r3)
|
||||
/* 80314164 003110C4 4E 80 00 20 */ blr
|
||||
|
||||
.global sub_80314168
|
||||
sub_80314168:
|
||||
.global __ami__9CVector2fFRC9CVector2f
|
||||
__ami__9CVector2fFRC9CVector2f:
|
||||
/* 80314168 003110C8 C0 23 00 00 */ lfs f1, 0(r3)
|
||||
/* 8031416C 003110CC C0 04 00 00 */ lfs f0, 0(r4)
|
||||
/* 80314170 003110D0 EC 01 00 28 */ fsubs f0, f1, f0
|
||||
|
@ -312,9 +312,9 @@ __sinit_CVector2f_cpp:
|
|||
/* 80314220 00311180 FC 40 08 90 */ fmr f2, f1
|
||||
/* 80314224 00311184 4B FF FF DD */ bl __ct__9CVector2fFff
|
||||
/* 80314228 00311188 C0 21 00 08 */ lfs f1, 8(r1)
|
||||
/* 8031422C 0031118C 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 8031422C 0031118C 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80314230 00311190 C0 01 00 0C */ lfs f0, 0xc(r1)
|
||||
/* 80314234 00311194 D0 2D A8 98 */ stfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 80314234 00311194 D0 2D A8 98 */ stfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 80314238 00311198 D0 03 00 04 */ stfs f0, 4(r3)
|
||||
/* 8031423C 0031119C 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||
/* 80314240 003111A0 7C 08 03 A6 */ mtlr r0
|
||||
|
|
|
@ -536,7 +536,7 @@ lbl_80246070:
|
|||
/* 80246080 00242FE0 48 08 5E 4D */ bl SetTextureID0__13CAuiImagePaneFUib
|
||||
/* 80246084 00242FE4 C0 22 B8 58 */ lfs f1, lbl_805AD578@sda21(r2)
|
||||
/* 80246088 00242FE8 7F 43 D3 78 */ mr r3, r26
|
||||
/* 8024608C 00242FEC 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 8024608C 00242FEC 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80246090 00242FF0 FC 40 08 90 */ fmr f2, f1
|
||||
/* 80246094 00242FF4 48 08 6E 15 */ bl SetAnimationParms__13CAuiImagePaneFRC9CVector2fff
|
||||
/* 80246098 00242FF8 3B DE 00 04 */ addi r30, r30, 4
|
||||
|
|
|
@ -112,9 +112,9 @@ MinCircle__FiPC9CVector2f:
|
|||
/* 8009E6E0 0009B640 DB E1 00 80 */ stfd f31, 0x80(r1)
|
||||
/* 8009E6E4 0009B644 F3 E1 00 88 */ psq_st f31, 136(r1), 0, qr0
|
||||
/* 8009E6E8 0009B648 BF 21 00 64 */ stmw r25, 0x64(r1)
|
||||
/* 8009E6EC 0009B64C 38 CD A8 98 */ addi r6, r13, lbl_805A9458@sda21
|
||||
/* 8009E6EC 0009B64C 38 CD A8 98 */ addi r6, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009E6F0 0009B650 7C 9D 23 78 */ mr r29, r4
|
||||
/* 8009E6F4 0009B654 C0 4D A8 98 */ lfs f2, lbl_805A9458@sda21(r13)
|
||||
/* 8009E6F4 0009B654 C0 4D A8 98 */ lfs f2, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009E6F8 0009B658 2C 1D 00 01 */ cmpwi r29, 1
|
||||
/* 8009E6FC 0009B65C C0 26 00 04 */ lfs f1, 4(r6)
|
||||
/* 8009E700 0009B660 7C 7C 1B 78 */ mr r28, r3
|
||||
|
@ -324,7 +324,7 @@ UpdateSupport3__FiPP9CVector2fR7Support:
|
|||
/* 8009E9E8 0009B948 81 06 00 04 */ lwz r8, 4(r6)
|
||||
/* 8009E9EC 0009B94C 54 80 10 3A */ slwi r0, r4, 2
|
||||
/* 8009E9F0 0009B950 80 E6 00 08 */ lwz r7, 8(r6)
|
||||
/* 8009E9F4 0009B954 38 CD A8 98 */ addi r6, r13, lbl_805A9458@sda21
|
||||
/* 8009E9F4 0009B954 38 CD A8 98 */ addi r6, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009E9F8 0009B958 80 99 00 0C */ lwz r4, 0xc(r25)
|
||||
/* 8009E9FC 0009B95C 55 08 10 3A */ slwi r8, r8, 2
|
||||
/* 8009EA00 0009B960 54 E7 10 3A */ slwi r7, r7, 2
|
||||
|
@ -337,7 +337,7 @@ UpdateSupport3__FiPP9CVector2fR7Support:
|
|||
/* 8009EA1C 0009B97C 7F A5 20 2E */ lwzx r29, r5, r4
|
||||
/* 8009EA20 0009B980 7F 85 00 2E */ lwzx r28, r5, r0
|
||||
/* 8009EA24 0009B984 7F E4 FB 78 */ mr r4, r31
|
||||
/* 8009EA28 0009B988 C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 8009EA28 0009B988 C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009EA2C 0009B98C C0 46 00 04 */ lfs f2, 4(r6)
|
||||
/* 8009EA30 0009B990 7F 85 E3 78 */ mr r5, r28
|
||||
/* 8009EA34 0009B994 C0 02 8C 20 */ lfs f0, lbl_805AA940@sda21(r2)
|
||||
|
@ -638,7 +638,7 @@ UpdateSupport2__FiPP9CVector2fR7Support:
|
|||
/* 8009EE64 0009BDC4 80 C6 00 04 */ lwz r6, 4(r6)
|
||||
/* 8009EE68 0009BDC8 54 80 10 3A */ slwi r0, r4, 2
|
||||
/* 8009EE6C 0009BDCC 80 9E 00 08 */ lwz r4, 8(r30)
|
||||
/* 8009EE70 0009BDD0 3B 6D A8 98 */ addi r27, r13, lbl_805A9458@sda21
|
||||
/* 8009EE70 0009BDD0 3B 6D A8 98 */ addi r27, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009EE74 0009BDD4 54 C6 10 3A */ slwi r6, r6, 2
|
||||
/* 8009EE78 0009BDD8 7C 7C 1B 78 */ mr r28, r3
|
||||
/* 8009EE7C 0009BDDC 54 83 10 3A */ slwi r3, r4, 2
|
||||
|
@ -647,7 +647,7 @@ UpdateSupport2__FiPP9CVector2fR7Support:
|
|||
/* 8009EE88 0009BDE8 38 61 00 24 */ addi r3, r1, 0x24
|
||||
/* 8009EE8C 0009BDEC 7F 05 00 2E */ lwzx r24, r5, r0
|
||||
/* 8009EE90 0009BDF0 7F 44 D3 78 */ mr r4, r26
|
||||
/* 8009EE94 0009BDF4 C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 8009EE94 0009BDF4 C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009EE98 0009BDF8 3B E0 FF FF */ li r31, -1
|
||||
/* 8009EE9C 0009BDFC C0 5B 00 04 */ lfs f2, 4(r27)
|
||||
/* 8009EEA0 0009BE00 7F 05 C3 78 */ mr r5, r24
|
||||
|
@ -698,7 +698,7 @@ lbl_8009EF0C:
|
|||
/* 8009EF50 0009BEB0 41 82 00 08 */ beq lbl_8009EF58
|
||||
/* 8009EF54 0009BEB4 3B E0 00 01 */ li r31, 1
|
||||
lbl_8009EF58:
|
||||
/* 8009EF58 0009BEB8 C0 4D A8 98 */ lfs f2, lbl_805A9458@sda21(r13)
|
||||
/* 8009EF58 0009BEB8 C0 4D A8 98 */ lfs f2, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009EF5C 0009BEBC 2C 1F FF FF */ cmpwi r31, -1
|
||||
/* 8009EF60 0009BEC0 C0 3B 00 04 */ lfs f1, 4(r27)
|
||||
/* 8009EF64 0009BEC4 C0 02 8C 20 */ lfs f0, lbl_805AA940@sda21(r2)
|
||||
|
@ -834,8 +834,8 @@ ExactCircle3__FRC9CVector2fRC9CVector2fRC9CVector2f:
|
|||
/* 8009F14C 0009C0AC 48 27 4F 91 */ bl MagSquared__9CVector2fCFv
|
||||
/* 8009F150 0009C0B0 EC 1C 07 B2 */ fmuls f0, f28, f30
|
||||
/* 8009F154 0009C0B4 C0 42 8C 2C */ lfs f2, lbl_805AA94C@sda21(r2)
|
||||
/* 8009F158 0009C0B8 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 8009F15C 0009C0BC C0 8D A8 98 */ lfs f4, lbl_805A9458@sda21(r13)
|
||||
/* 8009F158 0009C0B8 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009F15C 0009C0BC C0 8D A8 98 */ lfs f4, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009F160 0009C0C0 C0 63 00 04 */ lfs f3, 4(r3)
|
||||
/* 8009F164 0009C0C4 EC A2 00 72 */ fmuls f5, f2, f1
|
||||
/* 8009F168 0009C0C8 EC DD 07 F8 */ fmsubs f6, f29, f31, f0
|
||||
|
@ -907,7 +907,7 @@ ExactCircle2__FRC9CVector2fRC9CVector2f:
|
|||
/* 8009F25C 0009C1BC 94 21 FF B0 */ stwu r1, -0x50(r1)
|
||||
/* 8009F260 0009C1C0 7C 08 02 A6 */ mflr r0
|
||||
/* 8009F264 0009C1C4 C0 02 8C 20 */ lfs f0, lbl_805AA940@sda21(r2)
|
||||
/* 8009F268 0009C1C8 38 CD A8 98 */ addi r6, r13, lbl_805A9458@sda21
|
||||
/* 8009F268 0009C1C8 38 CD A8 98 */ addi r6, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009F26C 0009C1CC 90 01 00 54 */ stw r0, 0x54(r1)
|
||||
/* 8009F270 0009C1D0 93 E1 00 4C */ stw r31, 0x4c(r1)
|
||||
/* 8009F274 0009C1D4 7C BF 2B 78 */ mr r31, r5
|
||||
|
@ -916,7 +916,7 @@ ExactCircle2__FRC9CVector2fRC9CVector2f:
|
|||
/* 8009F280 0009C1E0 93 A1 00 44 */ stw r29, 0x44(r1)
|
||||
/* 8009F284 0009C1E4 7C 7D 1B 78 */ mr r29, r3
|
||||
/* 8009F288 0009C1E8 38 61 00 10 */ addi r3, r1, 0x10
|
||||
/* 8009F28C 0009C1EC C0 4D A8 98 */ lfs f2, lbl_805A9458@sda21(r13)
|
||||
/* 8009F28C 0009C1EC C0 4D A8 98 */ lfs f2, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009F290 0009C1F0 C0 26 00 04 */ lfs f1, 4(r6)
|
||||
/* 8009F294 0009C1F4 D0 41 00 28 */ stfs f2, 0x28(r1)
|
||||
/* 8009F298 0009C1F8 D0 21 00 2C */ stfs f1, 0x2c(r1)
|
||||
|
@ -959,9 +959,9 @@ ExactCircle2__FRC9CVector2fRC9CVector2f:
|
|||
.global ExactCircle1__FRC9CVector2f
|
||||
ExactCircle1__FRC9CVector2f:
|
||||
/* 8009F328 0009C288 94 21 FF E0 */ stwu r1, -0x20(r1)
|
||||
/* 8009F32C 0009C28C 38 AD A8 98 */ addi r5, r13, lbl_805A9458@sda21
|
||||
/* 8009F32C 0009C28C 38 AD A8 98 */ addi r5, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8009F330 0009C290 C0 42 8C 20 */ lfs f2, lbl_805AA940@sda21(r2)
|
||||
/* 8009F334 0009C294 C0 8D A8 98 */ lfs f4, lbl_805A9458@sda21(r13)
|
||||
/* 8009F334 0009C294 C0 8D A8 98 */ lfs f4, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8009F338 0009C298 C0 65 00 04 */ lfs f3, 4(r5)
|
||||
/* 8009F33C 0009C29C C0 24 00 00 */ lfs f1, 0(r4)
|
||||
/* 8009F340 0009C2A0 C0 04 00 04 */ lfs f0, 4(r4)
|
||||
|
|
|
@ -506,10 +506,10 @@ lbl_80297DDC:
|
|||
/* 80297F54 00294EB4 38 61 00 50 */ addi r3, r1, 0x50
|
||||
/* 80297F58 00294EB8 38 9E 00 20 */ addi r4, r30, 0x20
|
||||
/* 80297F5C 00294EBC D0 1E 00 24 */ stfs f0, 0x24(r30)
|
||||
/* 80297F60 00294EC0 48 07 C2 09 */ bl sub_80314168
|
||||
/* 80297F60 00294EC0 48 07 C2 09 */ bl __ami__9CVector2fFRC9CVector2f
|
||||
/* 80297F64 00294EC4 C0 22 C0 00 */ lfs f1, lbl_805ADD20@sda21(r2)
|
||||
/* 80297F68 00294EC8 38 61 00 50 */ addi r3, r1, 0x50
|
||||
/* 80297F6C 00294ECC 48 07 C1 BD */ bl sub_80314128
|
||||
/* 80297F6C 00294ECC 48 07 C1 BD */ bl __adv__9CVector2fFf
|
||||
/* 80297F70 00294ED0 38 7E 00 18 */ addi r3, r30, 0x18
|
||||
/* 80297F74 00294ED4 38 81 00 50 */ addi r4, r1, 0x50
|
||||
/* 80297F78 00294ED8 48 07 C2 15 */ bl __apl__9CVector2fFRC9CVector2f
|
||||
|
|
|
@ -1876,8 +1876,8 @@ Arrival2D__18CSteeringBehaviorsCFRC13CPhysicsActorRC9CVector2ff:
|
|||
/* 8013E528 0013B488 48 1D 5B 59 */ bl AsNormalized__9CVector2fCFv
|
||||
/* 8013E52C 0013B48C 48 00 00 18 */ b lbl_8013E544
|
||||
lbl_8013E530:
|
||||
/* 8013E530 0013B490 C0 0D A8 98 */ lfs f0, lbl_805A9458@sda21(r13)
|
||||
/* 8013E534 0013B494 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 8013E530 0013B490 C0 0D A8 98 */ lfs f0, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8013E534 0013B494 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8013E538 0013B498 D0 1E 00 00 */ stfs f0, 0(r30)
|
||||
/* 8013E53C 0013B49C C0 03 00 04 */ lfs f0, 4(r3)
|
||||
/* 8013E540 0013B4A0 D0 1E 00 04 */ stfs f0, 4(r30)
|
||||
|
|
|
@ -12199,12 +12199,12 @@ Accept__12CSpacePirateFR8IVisitor:
|
|||
/* 8012A854 001277B4 80 03 00 00 */ lwz r0, 0(r3)
|
||||
/* 8012A858 001277B8 3C 60 80 3D */ lis r3, lbl_803CFF70@ha
|
||||
/* 8012A85C 001277BC 38 83 FF 70 */ addi r4, r3, lbl_803CFF70@l
|
||||
/* 8012A860 001277C0 38 AD A8 98 */ addi r5, r13, lbl_805A9458@sda21
|
||||
/* 8012A860 001277C0 38 AD A8 98 */ addi r5, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 8012A864 001277C4 90 1D 08 CC */ stw r0, 0x8cc(r29)
|
||||
/* 8012A868 001277C8 38 61 01 78 */ addi r3, r1, 0x178
|
||||
/* 8012A86C 001277CC C0 02 97 BC */ lfs f0, lbl_805AB4DC@sda21(r2)
|
||||
/* 8012A870 001277D0 38 84 00 1A */ addi r4, r4, 0x1a
|
||||
/* 8012A874 001277D4 C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 8012A874 001277D4 C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 8012A878 001277D8 D0 3D 08 D0 */ stfs f1, 0x8d0(r29)
|
||||
/* 8012A87C 001277DC C0 25 00 04 */ lfs f1, 4(r5)
|
||||
/* 8012A880 001277E0 D0 3D 08 D4 */ stfs f1, 0x8d4(r29)
|
||||
|
|
|
@ -927,10 +927,10 @@ sub_801dac30:
|
|||
/* 801DAC40 001D7BA0 F3 E1 00 C8 */ psq_st f31, 200(r1), 0, qr0
|
||||
/* 801DAC44 001D7BA4 BF 01 00 A0 */ stmw r24, 0xa0(r1)
|
||||
/* 801DAC48 001D7BA8 7C 99 23 78 */ mr r25, r4
|
||||
/* 801DAC4C 001D7BAC 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DAC4C 001D7BAC 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DAC50 001D7BB0 83 B9 06 64 */ lwz r29, 0x664(r25)
|
||||
/* 801DAC54 001D7BB4 7C 78 1B 78 */ mr r24, r3
|
||||
/* 801DAC58 001D7BB8 C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 801DAC58 001D7BB8 C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 801DAC5C 001D7BBC 7C BA 2B 78 */ mr r26, r5
|
||||
/* 801DAC60 001D7BC0 C0 04 00 04 */ lfs f0, 4(r4)
|
||||
/* 801DAC64 001D7BC4 38 61 00 48 */ addi r3, r1, 0x48
|
||||
|
@ -1007,7 +1007,7 @@ lbl_801DAD70:
|
|||
/* 801DAD74 001D7CD4 41 80 FF 38 */ blt lbl_801DACAC
|
||||
lbl_801DAD78:
|
||||
/* 801DAD78 001D7CD8 38 61 00 68 */ addi r3, r1, 0x68
|
||||
/* 801DAD7C 001D7CDC 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DAD7C 001D7CDC 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DAD80 001D7CE0 48 13 91 89 */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
/* 801DAD84 001D7CE4 54 60 06 3F */ clrlwi. r0, r3, 0x18
|
||||
/* 801DAD88 001D7CE8 40 82 00 78 */ bne lbl_801DAE00
|
||||
|
@ -2872,7 +2872,7 @@ lbl_801DC79C:
|
|||
/* 801DC7AC 001D970C C0 21 00 10 */ lfs f1, 0x10(r1)
|
||||
/* 801DC7B0 001D9710 38 61 00 20 */ addi r3, r1, 0x20
|
||||
/* 801DC7B4 001D9714 C0 01 00 14 */ lfs f0, 0x14(r1)
|
||||
/* 801DC7B8 001D9718 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DC7B8 001D9718 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DC7BC 001D971C D0 21 00 20 */ stfs f1, 0x20(r1)
|
||||
/* 801DC7C0 001D9720 D0 01 00 24 */ stfs f0, 0x24(r1)
|
||||
/* 801DC7C4 001D9724 48 13 77 45 */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
|
@ -2885,7 +2885,7 @@ lbl_801DC79C:
|
|||
/* 801DC7E0 001D9740 48 00 00 60 */ b lbl_801DC840
|
||||
lbl_801DC7E4:
|
||||
/* 801DC7E4 001D9744 38 61 00 28 */ addi r3, r1, 0x28
|
||||
/* 801DC7E8 001D9748 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DC7E8 001D9748 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DC7EC 001D974C 48 13 77 1D */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
/* 801DC7F0 001D9750 54 60 06 3F */ clrlwi. r0, r3, 0x18
|
||||
/* 801DC7F4 001D9754 41 82 00 3C */ beq lbl_801DC830
|
||||
|
@ -5902,7 +5902,7 @@ lbl_801DF1E8:
|
|||
/* 801DF24C 001DC1AC C0 21 00 28 */ lfs f1, 0x28(r1)
|
||||
/* 801DF250 001DC1B0 38 61 00 38 */ addi r3, r1, 0x38
|
||||
/* 801DF254 001DC1B4 C0 01 00 2C */ lfs f0, 0x2c(r1)
|
||||
/* 801DF258 001DC1B8 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DF258 001DC1B8 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DF25C 001DC1BC D0 21 00 38 */ stfs f1, 0x38(r1)
|
||||
/* 801DF260 001DC1C0 D0 01 00 3C */ stfs f0, 0x3c(r1)
|
||||
/* 801DF264 001DC1C4 48 13 4C A5 */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
|
@ -6077,7 +6077,7 @@ lbl_801DF4E8:
|
|||
/* 801DF4F8 001DC458 C0 21 00 10 */ lfs f1, 0x10(r1)
|
||||
/* 801DF4FC 001DC45C 38 61 00 30 */ addi r3, r1, 0x30
|
||||
/* 801DF500 001DC460 C0 01 00 14 */ lfs f0, 0x14(r1)
|
||||
/* 801DF504 001DC464 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801DF504 001DC464 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801DF508 001DC468 D0 21 00 30 */ stfs f1, 0x30(r1)
|
||||
/* 801DF50C 001DC46C D0 01 00 34 */ stfs f0, 0x34(r1)
|
||||
/* 801DF510 001DC470 48 13 49 F9 */ bl __eq__FRC9CVector2fRC9CVector2f
|
||||
|
|
|
@ -12927,8 +12927,8 @@ CalculateSpiderBallAttractionSurfaceForces__10CMorphBallCFRC11CFinalInput:
|
|||
/* 800F8678 000F55D8 48 00 06 21 */ bl IsMovementAllowed__10CMorphBallCFv
|
||||
/* 800F867C 000F55DC 54 60 06 3F */ clrlwi. r0, r3, 0x18
|
||||
/* 800F8680 000F55E0 40 82 00 1C */ bne lbl_800F869C
|
||||
/* 800F8684 000F55E4 C0 0D A8 98 */ lfs f0, lbl_805A9458@sda21(r13)
|
||||
/* 800F8688 000F55E8 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 800F8684 000F55E4 C0 0D A8 98 */ lfs f0, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 800F8688 000F55E8 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 800F868C 000F55EC D0 1E 00 00 */ stfs f0, 0(r30)
|
||||
/* 800F8690 000F55F0 C0 03 00 04 */ lfs f0, 4(r3)
|
||||
/* 800F8694 000F55F4 D0 1E 00 04 */ stfs f0, 4(r30)
|
||||
|
|
|
@ -3085,7 +3085,7 @@ __ct__12CPlayerVisorFRC13CStateManager:
|
|||
/* 801146DC 0011163C 90 01 00 84 */ stw r0, 0x84(r1)
|
||||
/* 801146E0 00111640 38 00 00 7F */ li r0, 0x7f
|
||||
/* 801146E4 00111644 C0 22 95 D0 */ lfs f1, lbl_805AB2F0@sda21(r2)
|
||||
/* 801146E8 00111648 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801146E8 00111648 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801146EC 0011164C 93 E1 00 7C */ stw r31, 0x7c(r1)
|
||||
/* 801146F0 00111650 7C 7F 1B 78 */ mr r31, r3
|
||||
/* 801146F4 00111654 93 C1 00 78 */ stw r30, 0x78(r1)
|
||||
|
@ -3106,7 +3106,7 @@ __ct__12CPlayerVisorFRC13CStateManager:
|
|||
/* 80114730 00111690 90 BF 00 34 */ stw r5, 0x34(r31)
|
||||
/* 80114734 00111694 D0 1F 00 38 */ stfs f0, 0x38(r31)
|
||||
/* 80114738 00111698 D0 1F 00 3C */ stfs f0, 0x3c(r31)
|
||||
/* 8011473C 0011169C C0 0D A8 98 */ lfs f0, lbl_805A9458@sda21(r13)
|
||||
/* 8011473C 0011169C C0 0D A8 98 */ lfs f0, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 80114740 001116A0 D0 1F 00 40 */ stfs f0, 0x40(r31)
|
||||
/* 80114744 001116A4 C0 04 00 04 */ lfs f0, 4(r4)
|
||||
/* 80114748 001116A8 D0 1F 00 44 */ stfs f0, 0x44(r31)
|
||||
|
@ -3380,7 +3380,7 @@ lbl_80114B08:
|
|||
/* 80114B54 00111AB4 38 80 FF FF */ li r4, -1
|
||||
/* 80114B58 00111AB8 48 22 C2 E9 */ bl __dt__6CTokenFv
|
||||
/* 80114B5C 00111ABC C0 02 95 C8 */ lfs f0, lbl_805AB2E8@sda21(r2)
|
||||
/* 80114B60 00111AC0 38 6D A8 98 */ addi r3, r13, lbl_805A9458@sda21
|
||||
/* 80114B60 00111AC0 38 6D A8 98 */ addi r3, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80114B64 00111AC4 D0 1F 05 4C */ stfs f0, 0x54c(r31)
|
||||
/* 80114B68 00111AC8 D0 1F 05 50 */ stfs f0, 0x550(r31)
|
||||
/* 80114B6C 00111ACC 80 1F 00 00 */ lwz r0, 0(r31)
|
||||
|
|
|
@ -925,7 +925,7 @@ lbl_801736F4:
|
|||
/* 801736F4 00170654 38 00 00 03 */ li r0, 3
|
||||
/* 801736F8 00170658 7F 83 E3 78 */ mr r3, r28
|
||||
/* 801736FC 0017065C 90 1C 00 00 */ stw r0, 0(r28)
|
||||
/* 80173700 00170660 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 80173700 00170660 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80173704 00170664 80 AD A1 38 */ lwz r5, gpTweakGui@sda21(r13)
|
||||
/* 80173708 00170668 C0 25 02 44 */ lfs f1, 0x244(r5)
|
||||
/* 8017370C 0017066C 48 00 11 B5 */ bl StartTransitionTo__Q212CScanDisplay8CDataDotFRC9CVector2ff
|
||||
|
@ -1744,7 +1744,7 @@ lbl_801741C4:
|
|||
/* 80174220 00171180 48 15 7C AD */ bl SetTextureID0__13CAuiImagePaneFUib
|
||||
/* 80174224 00171184 C0 22 A1 10 */ lfs f1, lbl_805ABE30@sda21(r2)
|
||||
/* 80174228 00171188 7F A3 EB 78 */ mr r3, r29
|
||||
/* 8017422C 0017118C 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 8017422C 0017118C 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80174230 00171190 FC 40 08 90 */ fmr f2, f1
|
||||
/* 80174234 00171194 48 15 8C 75 */ bl SetAnimationParms__13CAuiImagePaneFRC9CVector2fff
|
||||
/* 80174238 00171198 80 1E 00 34 */ lwz r0, 0x34(r30)
|
||||
|
@ -1922,7 +1922,7 @@ lbl_8017449C:
|
|||
/* 801744A4 00171404 C0 22 A1 44 */ lfs f1, lbl_805ABE64@sda21(r2)
|
||||
/* 801744A8 00171408 7F 83 E3 78 */ mr r3, r28
|
||||
/* 801744AC 0017140C D0 1C 00 28 */ stfs f0, 0x28(r28)
|
||||
/* 801744B0 00171410 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 801744B0 00171410 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 801744B4 00171414 90 1C 00 00 */ stw r0, 0(r28)
|
||||
/* 801744B8 00171418 48 00 04 09 */ bl StartTransitionTo__Q212CScanDisplay8CDataDotFRC9CVector2ff
|
||||
/* 801744BC 0017141C C0 22 A1 44 */ lfs f1, lbl_805ABE64@sda21(r2)
|
||||
|
@ -2333,10 +2333,10 @@ lbl_80174A44:
|
|||
.global __ct__Q212CScanDisplay8CDataDotFv
|
||||
__ct__Q212CScanDisplay8CDataDotFv:
|
||||
/* 80174A6C 001719CC 38 00 00 00 */ li r0, 0
|
||||
/* 80174A70 001719D0 38 8D A8 98 */ addi r4, r13, lbl_805A9458@sda21
|
||||
/* 80174A70 001719D0 38 8D A8 98 */ addi r4, r13, skZeroVector__9CVector2f@sda21
|
||||
/* 80174A74 001719D4 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80174A78 001719D8 C0 02 A1 10 */ lfs f0, lbl_805ABE30@sda21(r2)
|
||||
/* 80174A7C 001719DC C0 2D A8 98 */ lfs f1, lbl_805A9458@sda21(r13)
|
||||
/* 80174A7C 001719DC C0 2D A8 98 */ lfs f1, skZeroVector__9CVector2f@sda21(r13)
|
||||
/* 80174A80 001719E0 D0 23 00 04 */ stfs f1, 4(r3)
|
||||
/* 80174A84 001719E4 C0 24 00 04 */ lfs f1, 4(r4)
|
||||
/* 80174A88 001719E8 D0 23 00 08 */ stfs f1, 8(r3)
|
||||
|
|
|
@ -33,6 +33,7 @@ COMPLETE_OBJECTS = [
|
|||
"Kyoto/Graphics/CGX",
|
||||
"Kyoto/Particles/CWarp",
|
||||
"Kyoto/Math/CPlane",
|
||||
"Kyoto/Math/CVector2f",
|
||||
"Kyoto/Math/CVector2i",
|
||||
"Kyoto/Math/CVector3d",
|
||||
"Kyoto/Math/CVector3i",
|
||||
|
|
|
@ -4,28 +4,35 @@
|
|||
#include "types.h"
|
||||
|
||||
class CVector2f {
|
||||
static const CVector2f skZeroVector;
|
||||
public:
|
||||
CVector2f(f32 x, f32 y); // : mX(x), mY(y) {}
|
||||
|
||||
CVector2f(f32 x, f32 y);
|
||||
f32 GetX() const { return mX; }
|
||||
f32 GetY() const { return mY; }
|
||||
|
||||
f32 Magnitude() const;
|
||||
CVector2f& operator+=(const CVector2f& rhs);
|
||||
CVector2f& operator-=(const CVector2f& rhs);
|
||||
CVector2f& operator*=(float rhs);
|
||||
CVector2f& operator/=(float rhs);
|
||||
|
||||
// private:
|
||||
CVector2f& Normalize();
|
||||
|
||||
f32 Magnitude() const;
|
||||
f32 MagSquared() const;
|
||||
CVector2f AsNormalized() const;
|
||||
|
||||
static float GetAngleDiff(const CVector2f& a, const CVector2f& b);
|
||||
static float Dot(const CVector2f& a, const CVector2f& b);
|
||||
private:
|
||||
f32 mX;
|
||||
f32 mY;
|
||||
};
|
||||
|
||||
CVector2f operator-(const CVector2f& lhs, const CVector2f& rhs); /* {
|
||||
f32 x = lhs.GetX() - rhs.GetX();
|
||||
f32 y = lhs.GetY() - rhs.GetY();
|
||||
return CVector2f(x, y);
|
||||
}*/
|
||||
CVector2f operator+(const CVector2f& lhs, const CVector2f& rhs); /* {
|
||||
f32 x = lhs.GetX() + rhs.GetX();
|
||||
f32 y = lhs.GetY() + rhs.GetY();
|
||||
return CVector2f(x, y);
|
||||
}*/
|
||||
CVector2f operator+(const CVector2f& lhs, const CVector2f& rhs);
|
||||
CVector2f operator-(const CVector2f& lhs, const CVector2f& rhs);
|
||||
bool operator==(const CVector2f& lhs, const CVector2f& rhs);
|
||||
CVector2f operator*(const CVector2f& lhs, const float& rhs);
|
||||
CVector2f operator*(const float& lhs, const CVector2f& rhs);
|
||||
CVector2f operator/(const CVector2f& lhs, const float& rhs);
|
||||
|
||||
#endif // __CVECTOR3F_HPP__
|
||||
|
|
|
@ -520,7 +520,7 @@ KYOTO_1 :=\
|
|||
$(BUILD_DIR)/src/Kyoto/CRandom16.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CTransform4f.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CUnitVector3f.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CVector2f.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector2f.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector2i.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector3d.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CVector3f.o\
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
#include "Kyoto/Math/CVector2f.hpp"
|
||||
#include "Kyoto/Math/CMath.hpp"
|
||||
#include "rstl/math.hpp"
|
||||
#include <float.h>
|
||||
|
||||
const CVector2f CVector2f::skZeroVector = CVector2f(0.f, 0.f);
|
||||
|
||||
CVector2f::CVector2f(float x, float y) : mX(x), mY(y) {}
|
||||
|
||||
CVector2f& CVector2f::Normalize() {
|
||||
float mag = 1.f / Magnitude();
|
||||
mX *= mag;
|
||||
mY *= mag;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
CVector2f& CVector2f::operator+=(const CVector2f& rhs) {
|
||||
mX += rhs.GetX();
|
||||
mY += rhs.GetY();
|
||||
return *this;
|
||||
}
|
||||
CVector2f& CVector2f::operator-=(const CVector2f& rhs) {
|
||||
mX -= rhs.GetX();
|
||||
mY -= rhs.GetY();
|
||||
return *this;
|
||||
}
|
||||
CVector2f& CVector2f::operator*=(float rhs) {
|
||||
mX *= rhs;
|
||||
mY *= rhs;
|
||||
return *this;
|
||||
}
|
||||
CVector2f& CVector2f::operator/=(float rhs) {
|
||||
const float v = 1.f / rhs;
|
||||
mX *= v;
|
||||
mY *= v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float CVector2f::Magnitude() const {
|
||||
float mag = mX * mX;
|
||||
mag += mY * mY;
|
||||
return CMath::SqrtF(mag);
|
||||
}
|
||||
|
||||
float CVector2f::MagSquared() const {
|
||||
float mag = mX * mX;
|
||||
mag += mY * mY;
|
||||
return mag;
|
||||
}
|
||||
|
||||
CVector2f CVector2f::AsNormalized() const {
|
||||
float mag = 1.f / Magnitude();
|
||||
|
||||
return CVector2f(mX * mag, mY * mag);
|
||||
}
|
||||
|
||||
float CVector2f::GetAngleDiff(const CVector2f& a, const CVector2f& b) {
|
||||
float mag1 = a.Magnitude();
|
||||
float mag2 = b.Magnitude();
|
||||
|
||||
float ret = 0.f;
|
||||
if (mag1 > FLT_EPSILON && mag2 > FLT_EPSILON) {
|
||||
float dist = CVector2f::Dot(a, b) / (mag1 * mag2);
|
||||
if (dist < -1.f) {
|
||||
dist = -1.f;
|
||||
} else if (dist > 1.f) {
|
||||
dist = 1.f;
|
||||
}
|
||||
ret = CMath::ArcCosineR(dist);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
float CVector2f::Dot(const CVector2f& a, const CVector2f& b) {
|
||||
return a.GetX() * b.GetX() + a.GetY() * b.GetY();
|
||||
}
|
||||
|
||||
CVector2f operator+(const CVector2f& lhs, const CVector2f& rhs) {
|
||||
f32 x = lhs.GetX() + rhs.GetX();
|
||||
f32 y = lhs.GetY() + rhs.GetY();
|
||||
return CVector2f(x, y);
|
||||
}
|
||||
|
||||
CVector2f operator-(const CVector2f& lhs, const CVector2f& rhs) {
|
||||
f32 x = lhs.GetX() - rhs.GetX();
|
||||
f32 y = lhs.GetY() - rhs.GetY();
|
||||
return CVector2f(x, y);
|
||||
}
|
||||
|
||||
bool operator==(const CVector2f& lhs, const CVector2f& rhs) {
|
||||
return lhs.GetX() == rhs.GetX() && lhs.GetY() == rhs.GetY();
|
||||
}
|
||||
|
||||
CVector2f operator*(const CVector2f& lhs, const float& rhs) {
|
||||
f32 x = lhs.GetX() * rhs;
|
||||
f32 y = lhs.GetY() * rhs;
|
||||
return CVector2f(x, y);
|
||||
}
|
||||
|
||||
CVector2f operator*(const float& lhs, const CVector2f& rhs) {
|
||||
f32 x = lhs * rhs.GetX();
|
||||
f32 y = lhs * rhs.GetY();
|
||||
return CVector2f(x, y);
|
||||
}
|
||||
|
||||
CVector2f operator/(const CVector2f& lhs, const float& rhs) {
|
||||
float v = 1.f / rhs;
|
||||
f32 x = lhs.GetX() * v;
|
||||
f32 y = lhs.GetY() * v;
|
||||
return CVector2f(x, y);
|
||||
}
|
Loading…
Reference in New Issue