diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/appendChild__8J3DJointFP8J3DJoint.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/appendChild__8J3DJointFP8J3DJoint.s deleted file mode 100644 index 098c2fe36b..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/appendChild__8J3DJointFP8J3DJoint.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_8032F13C: -/* 8032F13C 80 03 00 0C */ lwz r0, 0xc(r3) -/* 8032F140 28 00 00 00 */ cmplwi r0, 0 -/* 8032F144 40 82 00 0C */ bne lbl_8032F150 -/* 8032F148 90 83 00 0C */ stw r4, 0xc(r3) -/* 8032F14C 4E 80 00 20 */ blr -lbl_8032F150: -/* 8032F150 7C 03 03 78 */ mr r3, r0 -/* 8032F154 48 00 00 08 */ b lbl_8032F15C -lbl_8032F158: -/* 8032F158 7C 03 03 78 */ mr r3, r0 -lbl_8032F15C: -/* 8032F15C 80 03 00 10 */ lwz r0, 0x10(r3) -/* 8032F160 28 00 00 00 */ cmplwi r0, 0 -/* 8032F164 40 82 FF F4 */ bne lbl_8032F158 -/* 8032F168 90 83 00 10 */ stw r4, 0x10(r3) -/* 8032F16C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__27J3DMtxCalcCalcTransformMayaFRC16J3DTransformInfo.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__27J3DMtxCalcCalcTransformMayaFRC16J3DTransformInfo.s deleted file mode 100644 index ab9c59c0c1..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__27J3DMtxCalcCalcTransformMayaFRC16J3DTransformInfo.s +++ /dev/null @@ -1,100 +0,0 @@ -lbl_8032EFBC: -/* 8032EFBC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8032EFC0 7C 08 02 A6 */ mflr r0 -/* 8032EFC4 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032EFC8 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032EFCC 48 03 32 09 */ bl _savegpr_27 -/* 8032EFD0 7C 7F 1B 78 */ mr r31, r3 -/* 8032EFD4 83 8D 90 74 */ lwz r28, mJoint__10J3DMtxCalc(r13) -/* 8032EFD8 83 6D 90 70 */ lwz r27, mMtxBuffer__10J3DMtxCalc(r13) -/* 8032EFDC A3 DC 00 14 */ lhz r30, 0x14(r28) -/* 8032EFE0 80 9B 00 0C */ lwz r4, 0xc(r27) -/* 8032EFE4 1C 1E 00 30 */ mulli r0, r30, 0x30 -/* 8032EFE8 7F A4 02 14 */ add r29, r4, r0 -/* 8032EFEC 7F A4 EB 78 */ mr r4, r29 -/* 8032EFF0 4B FE 29 75 */ bl J3DGetTranslateRotateMtx__FRC16J3DTransformInfoPA4_f -/* 8032EFF4 C0 22 CA A0 */ lfs f1, lit_922(r2) -/* 8032EFF8 C0 1F 00 00 */ lfs f0, 0(r31) -/* 8032EFFC FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032F000 40 82 00 2C */ bne lbl_8032F02C -/* 8032F004 C0 1F 00 04 */ lfs f0, 4(r31) -/* 8032F008 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032F00C 40 82 00 20 */ bne lbl_8032F02C -/* 8032F010 C0 1F 00 08 */ lfs f0, 8(r31) -/* 8032F014 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032F018 40 82 00 14 */ bne lbl_8032F02C -/* 8032F01C 38 00 00 01 */ li r0, 1 -/* 8032F020 80 7B 00 04 */ lwz r3, 4(r27) -/* 8032F024 7C 03 F1 AE */ stbx r0, r3, r30 -/* 8032F028 48 00 00 28 */ b lbl_8032F050 -lbl_8032F02C: -/* 8032F02C 38 00 00 00 */ li r0, 0 -/* 8032F030 80 7B 00 04 */ lwz r3, 4(r27) -/* 8032F034 7C 03 F1 AE */ stbx r0, r3, r30 -/* 8032F038 7F A3 EB 78 */ mr r3, r29 -/* 8032F03C 7F A4 EB 78 */ mr r4, r29 -/* 8032F040 C0 3F 00 00 */ lfs f1, 0(r31) -/* 8032F044 C0 5F 00 04 */ lfs f2, 4(r31) -/* 8032F048 C0 7F 00 08 */ lfs f3, 8(r31) -/* 8032F04C 48 00 AA 39 */ bl JMAMTXApplyScale__FPA4_CfPA4_ffff -lbl_8032F050: -/* 8032F050 88 1C 00 17 */ lbz r0, 0x17(r28) -/* 8032F054 28 00 00 01 */ cmplwi r0, 1 -/* 8032F058 40 82 00 8C */ bne lbl_8032F0E4 -/* 8032F05C 3C 60 80 43 */ lis r3, mParentS__6J3DSys@ha /* 0x80434C20@ha */ -/* 8032F060 C4 03 4C 20 */ lfsu f0, mParentS__6J3DSys@l(r3) /* 0x80434C20@l */ -/* 8032F064 EC 20 00 30 */ fres f1, f0 -/* 8032F068 C0 03 00 04 */ lfs f0, 4(r3) -/* 8032F06C EC 40 00 30 */ fres f2, f0 -/* 8032F070 C0 03 00 08 */ lfs f0, 8(r3) -/* 8032F074 EC 60 00 30 */ fres f3, f0 -/* 8032F078 C0 1D 00 00 */ lfs f0, 0(r29) -/* 8032F07C EC 00 00 72 */ fmuls f0, f0, f1 -/* 8032F080 D0 1D 00 00 */ stfs f0, 0(r29) -/* 8032F084 C0 1D 00 04 */ lfs f0, 4(r29) -/* 8032F088 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8032F08C D0 1D 00 04 */ stfs f0, 4(r29) -/* 8032F090 C0 1D 00 08 */ lfs f0, 8(r29) -/* 8032F094 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8032F098 D0 1D 00 08 */ stfs f0, 8(r29) -/* 8032F09C C0 1D 00 10 */ lfs f0, 0x10(r29) -/* 8032F0A0 EC 00 00 B2 */ fmuls f0, f0, f2 -/* 8032F0A4 D0 1D 00 10 */ stfs f0, 0x10(r29) -/* 8032F0A8 C0 1D 00 14 */ lfs f0, 0x14(r29) -/* 8032F0AC EC 00 00 B2 */ fmuls f0, f0, f2 -/* 8032F0B0 D0 1D 00 14 */ stfs f0, 0x14(r29) -/* 8032F0B4 C0 1D 00 18 */ lfs f0, 0x18(r29) -/* 8032F0B8 EC 00 00 B2 */ fmuls f0, f0, f2 -/* 8032F0BC D0 1D 00 18 */ stfs f0, 0x18(r29) -/* 8032F0C0 C0 1D 00 20 */ lfs f0, 0x20(r29) -/* 8032F0C4 EC 00 00 F2 */ fmuls f0, f0, f3 -/* 8032F0C8 D0 1D 00 20 */ stfs f0, 0x20(r29) -/* 8032F0CC C0 1D 00 24 */ lfs f0, 0x24(r29) -/* 8032F0D0 EC 00 00 F2 */ fmuls f0, f0, f3 -/* 8032F0D4 D0 1D 00 24 */ stfs f0, 0x24(r29) -/* 8032F0D8 C0 1D 00 28 */ lfs f0, 0x28(r29) -/* 8032F0DC EC 00 00 F2 */ fmuls f0, f0, f3 -/* 8032F0E0 D0 1D 00 28 */ stfs f0, 0x28(r29) -lbl_8032F0E4: -/* 8032F0E4 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032F0E8 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032F0EC 7F A4 EB 78 */ mr r4, r29 -/* 8032F0F0 7C 65 1B 78 */ mr r5, r3 -/* 8032F0F4 48 01 73 F1 */ bl PSMTXConcat -/* 8032F0F8 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032F0FC 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032F100 7F A4 EB 78 */ mr r4, r29 -/* 8032F104 48 01 73 AD */ bl PSMTXCopy -/* 8032F108 C0 1F 00 00 */ lfs f0, 0(r31) -/* 8032F10C 3C 60 80 43 */ lis r3, mParentS__6J3DSys@ha /* 0x80434C20@ha */ -/* 8032F110 D4 03 4C 20 */ stfsu f0, mParentS__6J3DSys@l(r3) /* 0x80434C20@l */ -/* 8032F114 C0 1F 00 04 */ lfs f0, 4(r31) -/* 8032F118 D0 03 00 04 */ stfs f0, 4(r3) -/* 8032F11C C0 1F 00 08 */ lfs f0, 8(r31) -/* 8032F120 D0 03 00 08 */ stfs f0, 8(r3) -/* 8032F124 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032F128 48 03 30 F9 */ bl _restgpr_27 -/* 8032F12C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8032F130 7C 08 03 A6 */ mtlr r0 -/* 8032F134 38 21 00 20 */ addi r1, r1, 0x20 -/* 8032F138 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__28J3DMtxCalcCalcTransformBasicFRC16J3DTransformInfo.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__28J3DMtxCalcCalcTransformBasicFRC16J3DTransformInfo.s deleted file mode 100644 index 1a6200a2c6..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__28J3DMtxCalcCalcTransformBasicFRC16J3DTransformInfo.s +++ /dev/null @@ -1,77 +0,0 @@ -lbl_8032ED30: -/* 8032ED30 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8032ED34 7C 08 02 A6 */ mflr r0 -/* 8032ED38 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032ED3C 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032ED40 48 03 34 95 */ bl _savegpr_27 -/* 8032ED44 7C 7B 1B 78 */ mr r27, r3 -/* 8032ED48 83 8D 90 70 */ lwz r28, mMtxBuffer__10J3DMtxCalc(r13) -/* 8032ED4C 80 8D 90 74 */ lwz r4, mJoint__10J3DMtxCalc(r13) -/* 8032ED50 A3 C4 00 14 */ lhz r30, 0x14(r4) -/* 8032ED54 80 9C 00 0C */ lwz r4, 0xc(r28) -/* 8032ED58 1C 1E 00 30 */ mulli r0, r30, 0x30 -/* 8032ED5C 7F A4 02 14 */ add r29, r4, r0 -/* 8032ED60 3C 80 80 43 */ lis r4, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032ED64 3B E4 4C 14 */ addi r31, r4, mCurrentS__6J3DSys@l /* 0x80434C14@l */ -/* 8032ED68 C0 3F 00 00 */ lfs f1, 0(r31) -/* 8032ED6C C0 03 00 00 */ lfs f0, 0(r3) -/* 8032ED70 EC 01 00 32 */ fmuls f0, f1, f0 -/* 8032ED74 D0 1F 00 00 */ stfs f0, 0(r31) -/* 8032ED78 C0 3F 00 04 */ lfs f1, 4(r31) -/* 8032ED7C C0 03 00 04 */ lfs f0, 4(r3) -/* 8032ED80 EC 01 00 32 */ fmuls f0, f1, f0 -/* 8032ED84 D0 1F 00 04 */ stfs f0, 4(r31) -/* 8032ED88 C0 3F 00 08 */ lfs f1, 8(r31) -/* 8032ED8C C0 03 00 08 */ lfs f0, 8(r3) -/* 8032ED90 EC 01 00 32 */ fmuls f0, f1, f0 -/* 8032ED94 D0 1F 00 08 */ stfs f0, 8(r31) -/* 8032ED98 7F A4 EB 78 */ mr r4, r29 -/* 8032ED9C 4B FE 2B C9 */ bl J3DGetTranslateRotateMtx__FRC16J3DTransformInfoPA4_f -/* 8032EDA0 C0 22 CA A0 */ lfs f1, lit_922(r2) -/* 8032EDA4 3C 60 80 43 */ lis r3, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032EDA8 C0 03 4C 14 */ lfs f0, mCurrentS__6J3DSys@l(r3) /* 0x80434C14@l */ -/* 8032EDAC FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032EDB0 40 82 00 24 */ bne lbl_8032EDD4 -/* 8032EDB4 C0 1F 00 04 */ lfs f0, 4(r31) -/* 8032EDB8 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032EDBC 40 82 00 18 */ bne lbl_8032EDD4 -/* 8032EDC0 C0 1F 00 08 */ lfs f0, 8(r31) -/* 8032EDC4 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 8032EDC8 40 82 00 0C */ bne lbl_8032EDD4 -/* 8032EDCC 38 00 00 01 */ li r0, 1 -/* 8032EDD0 48 00 00 08 */ b lbl_8032EDD8 -lbl_8032EDD4: -/* 8032EDD4 38 00 00 00 */ li r0, 0 -lbl_8032EDD8: -/* 8032EDD8 2C 00 00 00 */ cmpwi r0, 0 -/* 8032EDDC 40 82 00 2C */ bne lbl_8032EE08 -/* 8032EDE0 38 00 00 00 */ li r0, 0 -/* 8032EDE4 80 7C 00 04 */ lwz r3, 4(r28) -/* 8032EDE8 7C 03 F1 AE */ stbx r0, r3, r30 -/* 8032EDEC 7F A3 EB 78 */ mr r3, r29 -/* 8032EDF0 7F A4 EB 78 */ mr r4, r29 -/* 8032EDF4 C0 3B 00 00 */ lfs f1, 0(r27) -/* 8032EDF8 C0 5B 00 04 */ lfs f2, 4(r27) -/* 8032EDFC C0 7B 00 08 */ lfs f3, 8(r27) -/* 8032EE00 48 00 AC 85 */ bl JMAMTXApplyScale__FPA4_CfPA4_ffff -/* 8032EE04 48 00 00 10 */ b lbl_8032EE14 -lbl_8032EE08: -/* 8032EE08 38 00 00 01 */ li r0, 1 -/* 8032EE0C 80 7C 00 04 */ lwz r3, 4(r28) -/* 8032EE10 7C 03 F1 AE */ stbx r0, r3, r30 -lbl_8032EE14: -/* 8032EE14 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EE18 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EE1C 7F A4 EB 78 */ mr r4, r29 -/* 8032EE20 7C 65 1B 78 */ mr r5, r3 -/* 8032EE24 48 01 76 C1 */ bl PSMTXConcat -/* 8032EE28 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EE2C 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EE30 7F A4 EB 78 */ mr r4, r29 -/* 8032EE34 48 01 76 7D */ bl PSMTXCopy -/* 8032EE38 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032EE3C 48 03 33 E5 */ bl _restgpr_27 -/* 8032EE40 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8032EE44 7C 08 03 A6 */ mtlr r0 -/* 8032EE48 38 21 00 20 */ addi r1, r1, 0x20 -/* 8032EE4C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__32J3DMtxCalcCalcTransformSoftimageFRC16J3DTransformInfo.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__32J3DMtxCalcCalcTransformSoftimageFRC16J3DTransformInfo.s deleted file mode 100644 index dbd3f19289..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__32J3DMtxCalcCalcTransformSoftimageFRC16J3DTransformInfo.s +++ /dev/null @@ -1,96 +0,0 @@ -lbl_8032EE50: -/* 8032EE50 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8032EE54 7C 08 02 A6 */ mflr r0 -/* 8032EE58 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032EE5C 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032EE60 48 03 33 75 */ bl _savegpr_27 -/* 8032EE64 7C 7B 1B 78 */ mr r27, r3 -/* 8032EE68 83 8D 90 70 */ lwz r28, mMtxBuffer__10J3DMtxCalc(r13) -/* 8032EE6C 80 6D 90 74 */ lwz r3, mJoint__10J3DMtxCalc(r13) -/* 8032EE70 A3 A3 00 14 */ lhz r29, 0x14(r3) -/* 8032EE74 80 7C 00 0C */ lwz r3, 0xc(r28) -/* 8032EE78 1C 1D 00 30 */ mulli r0, r29, 0x30 -/* 8032EE7C 7F E3 02 14 */ add r31, r3, r0 -/* 8032EE80 A8 7B 00 0C */ lha r3, 0xc(r27) -/* 8032EE84 A8 9B 00 0E */ lha r4, 0xe(r27) -/* 8032EE88 A8 BB 00 10 */ lha r5, 0x10(r27) -/* 8032EE8C C0 3B 00 14 */ lfs f1, 0x14(r27) -/* 8032EE90 3C C0 80 43 */ lis r6, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032EE94 3B C6 4C 14 */ addi r30, r6, mCurrentS__6J3DSys@l /* 0x80434C14@l */ -/* 8032EE98 C0 1E 00 00 */ lfs f0, 0(r30) -/* 8032EE9C EC 21 00 32 */ fmuls f1, f1, f0 -/* 8032EEA0 C0 5B 00 18 */ lfs f2, 0x18(r27) -/* 8032EEA4 C0 1E 00 04 */ lfs f0, 4(r30) -/* 8032EEA8 EC 42 00 32 */ fmuls f2, f2, f0 -/* 8032EEAC C0 7B 00 1C */ lfs f3, 0x1c(r27) -/* 8032EEB0 C0 1E 00 08 */ lfs f0, 8(r30) -/* 8032EEB4 EC 63 00 32 */ fmuls f3, f3, f0 -/* 8032EEB8 7F E6 FB 78 */ mr r6, r31 -/* 8032EEBC 4B FE 2B 69 */ bl J3DGetTranslateRotateMtx__FsssfffPA4_f -/* 8032EEC0 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EEC4 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EEC8 7F E4 FB 78 */ mr r4, r31 -/* 8032EECC 7C 65 1B 78 */ mr r5, r3 -/* 8032EED0 48 01 76 15 */ bl PSMTXConcat -/* 8032EED4 3C 60 80 43 */ lis r3, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032EED8 C4 23 4C 14 */ lfsu f1, mCurrentS__6J3DSys@l(r3) /* 0x80434C14@l */ -/* 8032EEDC C0 1B 00 00 */ lfs f0, 0(r27) -/* 8032EEE0 EC 61 00 32 */ fmuls f3, f1, f0 -/* 8032EEE4 D0 63 00 00 */ stfs f3, 0(r3) -/* 8032EEE8 C0 3E 00 04 */ lfs f1, 4(r30) -/* 8032EEEC C0 1B 00 04 */ lfs f0, 4(r27) -/* 8032EEF0 EC 41 00 32 */ fmuls f2, f1, f0 -/* 8032EEF4 D0 5E 00 04 */ stfs f2, 4(r30) -/* 8032EEF8 C0 3E 00 08 */ lfs f1, 8(r30) -/* 8032EEFC C0 1B 00 08 */ lfs f0, 8(r27) -/* 8032EF00 EC 21 00 32 */ fmuls f1, f1, f0 -/* 8032EF04 D0 3E 00 08 */ stfs f1, 8(r30) -/* 8032EF08 C0 02 CA A0 */ lfs f0, lit_922(r2) -/* 8032EF0C FC 00 18 00 */ fcmpu cr0, f0, f3 -/* 8032EF10 40 82 00 1C */ bne lbl_8032EF2C -/* 8032EF14 FC 00 10 00 */ fcmpu cr0, f0, f2 -/* 8032EF18 40 82 00 14 */ bne lbl_8032EF2C -/* 8032EF1C FC 00 08 00 */ fcmpu cr0, f0, f1 -/* 8032EF20 40 82 00 0C */ bne lbl_8032EF2C -/* 8032EF24 38 00 00 01 */ li r0, 1 -/* 8032EF28 48 00 00 08 */ b lbl_8032EF30 -lbl_8032EF2C: -/* 8032EF2C 38 00 00 00 */ li r0, 0 -lbl_8032EF30: -/* 8032EF30 2C 00 00 00 */ cmpwi r0, 0 -/* 8032EF34 40 82 00 54 */ bne lbl_8032EF88 -/* 8032EF38 38 00 00 00 */ li r0, 0 -/* 8032EF3C 80 7C 00 04 */ lwz r3, 4(r28) -/* 8032EF40 7C 03 E9 AE */ stbx r0, r3, r29 -/* 8032EF44 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EF48 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EF4C 7F E4 FB 78 */ mr r4, r31 -/* 8032EF50 3C A0 80 43 */ lis r5, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032EF54 C0 25 4C 14 */ lfs f1, mCurrentS__6J3DSys@l(r5) /* 0x80434C14@l */ -/* 8032EF58 C0 5E 00 04 */ lfs f2, 4(r30) -/* 8032EF5C C0 7E 00 08 */ lfs f3, 8(r30) -/* 8032EF60 48 00 AB 25 */ bl JMAMTXApplyScale__FPA4_CfPA4_ffff -/* 8032EF64 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EF68 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EF6C C0 03 00 0C */ lfs f0, 0xc(r3) -/* 8032EF70 D0 1F 00 0C */ stfs f0, 0xc(r31) -/* 8032EF74 C0 03 00 1C */ lfs f0, 0x1c(r3) -/* 8032EF78 D0 1F 00 1C */ stfs f0, 0x1c(r31) -/* 8032EF7C C0 03 00 2C */ lfs f0, 0x2c(r3) -/* 8032EF80 D0 1F 00 2C */ stfs f0, 0x2c(r31) -/* 8032EF84 48 00 00 20 */ b lbl_8032EFA4 -lbl_8032EF88: -/* 8032EF88 38 00 00 01 */ li r0, 1 -/* 8032EF8C 80 7C 00 04 */ lwz r3, 4(r28) -/* 8032EF90 7C 03 E9 AE */ stbx r0, r3, r29 -/* 8032EF94 3C 60 80 43 */ lis r3, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EF98 38 63 4B E4 */ addi r3, r3, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EF9C 7F E4 FB 78 */ mr r4, r31 -/* 8032EFA0 48 01 75 11 */ bl PSMTXCopy -lbl_8032EFA4: -/* 8032EFA4 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032EFA8 48 03 32 79 */ bl _restgpr_27 -/* 8032EFAC 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8032EFB0 7C 08 03 A6 */ mtlr r0 -/* 8032EFB4 38 21 00 20 */ addi r1, r1, 0x20 -/* 8032EFB8 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/init__24J3DMtxCalcJ3DSysInitMayaFRC3VecRA3_A4_Cf.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/init__24J3DMtxCalcJ3DSysInitMayaFRC3VecRA3_A4_Cf.s deleted file mode 100644 index 61ac729799..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/init__24J3DMtxCalcJ3DSysInitMayaFRC3VecRA3_A4_Cf.s +++ /dev/null @@ -1,34 +0,0 @@ -lbl_8032ECAC: -/* 8032ECAC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8032ECB0 7C 08 02 A6 */ mflr r0 -/* 8032ECB4 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032ECB8 3C A0 80 3A */ lis r5, lit_893@ha /* 0x803A2074@ha */ -/* 8032ECBC 38 C5 20 74 */ addi r6, r5, lit_893@l /* 0x803A2074@l */ -/* 8032ECC0 80 A6 00 00 */ lwz r5, 0(r6) -/* 8032ECC4 80 06 00 04 */ lwz r0, 4(r6) -/* 8032ECC8 90 A1 00 08 */ stw r5, 8(r1) -/* 8032ECCC 90 01 00 0C */ stw r0, 0xc(r1) -/* 8032ECD0 80 06 00 08 */ lwz r0, 8(r6) -/* 8032ECD4 90 01 00 10 */ stw r0, 0x10(r1) -/* 8032ECD8 C0 01 00 08 */ lfs f0, 8(r1) -/* 8032ECDC 3C A0 80 43 */ lis r5, mParentS__6J3DSys@ha /* 0x80434C20@ha */ -/* 8032ECE0 D4 05 4C 20 */ stfsu f0, mParentS__6J3DSys@l(r5) /* 0x80434C20@l */ -/* 8032ECE4 C0 01 00 0C */ lfs f0, 0xc(r1) -/* 8032ECE8 D0 05 00 04 */ stfs f0, 4(r5) -/* 8032ECEC C0 01 00 10 */ lfs f0, 0x10(r1) -/* 8032ECF0 D0 05 00 08 */ stfs f0, 8(r5) -/* 8032ECF4 C0 23 00 00 */ lfs f1, 0(r3) -/* 8032ECF8 3C A0 80 43 */ lis r5, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032ECFC D4 25 4C 14 */ stfsu f1, mCurrentS__6J3DSys@l(r5) /* 0x80434C14@l */ -/* 8032ED00 C0 43 00 04 */ lfs f2, 4(r3) -/* 8032ED04 D0 45 00 04 */ stfs f2, 4(r5) -/* 8032ED08 C0 63 00 08 */ lfs f3, 8(r3) -/* 8032ED0C D0 65 00 08 */ stfs f3, 8(r5) -/* 8032ED10 7C 83 23 78 */ mr r3, r4 -/* 8032ED14 3C 80 80 43 */ lis r4, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032ED18 38 84 4B E4 */ addi r4, r4, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032ED1C 48 00 AD 69 */ bl JMAMTXApplyScale__FPA4_CfPA4_ffff -/* 8032ED20 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8032ED24 7C 08 03 A6 */ mtlr r0 -/* 8032ED28 38 21 00 20 */ addi r1, r1, 0x20 -/* 8032ED2C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DJoint/init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf.s b/asm/JSystem/J3DGraphAnimator/J3DJoint/init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf.s deleted file mode 100644 index 903582216d..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DJoint/init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf.s +++ /dev/null @@ -1,34 +0,0 @@ -lbl_8032EC28: -/* 8032EC28 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8032EC2C 7C 08 02 A6 */ mflr r0 -/* 8032EC30 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032EC34 C0 23 00 00 */ lfs f1, 0(r3) -/* 8032EC38 3C A0 80 43 */ lis r5, mCurrentS__6J3DSys@ha /* 0x80434C14@ha */ -/* 8032EC3C D4 25 4C 14 */ stfsu f1, mCurrentS__6J3DSys@l(r5) /* 0x80434C14@l */ -/* 8032EC40 C0 43 00 04 */ lfs f2, 4(r3) -/* 8032EC44 D0 45 00 04 */ stfs f2, 4(r5) -/* 8032EC48 C0 63 00 08 */ lfs f3, 8(r3) -/* 8032EC4C D0 65 00 08 */ stfs f3, 8(r5) -/* 8032EC50 3C 60 80 3A */ lis r3, lit_882@ha /* 0x803A2068@ha */ -/* 8032EC54 38 A3 20 68 */ addi r5, r3, lit_882@l /* 0x803A2068@l */ -/* 8032EC58 80 65 00 00 */ lwz r3, 0(r5) -/* 8032EC5C 80 05 00 04 */ lwz r0, 4(r5) -/* 8032EC60 90 61 00 08 */ stw r3, 8(r1) -/* 8032EC64 90 01 00 0C */ stw r0, 0xc(r1) -/* 8032EC68 80 05 00 08 */ lwz r0, 8(r5) -/* 8032EC6C 90 01 00 10 */ stw r0, 0x10(r1) -/* 8032EC70 C0 01 00 08 */ lfs f0, 8(r1) -/* 8032EC74 3C 60 80 43 */ lis r3, mParentS__6J3DSys@ha /* 0x80434C20@ha */ -/* 8032EC78 D4 03 4C 20 */ stfsu f0, mParentS__6J3DSys@l(r3) /* 0x80434C20@l */ -/* 8032EC7C C0 01 00 0C */ lfs f0, 0xc(r1) -/* 8032EC80 D0 03 00 04 */ stfs f0, 4(r3) -/* 8032EC84 C0 01 00 10 */ lfs f0, 0x10(r1) -/* 8032EC88 D0 03 00 08 */ stfs f0, 8(r3) -/* 8032EC8C 7C 83 23 78 */ mr r3, r4 -/* 8032EC90 3C 80 80 43 */ lis r4, mCurrentMtx__6J3DSys@ha /* 0x80434BE4@ha */ -/* 8032EC94 38 84 4B E4 */ addi r4, r4, mCurrentMtx__6J3DSys@l /* 0x80434BE4@l */ -/* 8032EC98 48 00 AD ED */ bl JMAMTXApplyScale__FPA4_CfPA4_ffff -/* 8032EC9C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8032ECA0 7C 08 03 A6 */ mtlr r0 -/* 8032ECA4 38 21 00 20 */ addi r1, r1, 0x20 -/* 8032ECA8 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/calc__14J3DMaterialAnmCFP11J3DMaterial.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/calc__14J3DMaterialAnmCFP11J3DMaterial.s deleted file mode 100644 index 8a89ef09f5..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/calc__14J3DMaterialAnmCFP11J3DMaterial.s +++ /dev/null @@ -1,131 +0,0 @@ -lbl_8032C3C4: -/* 8032C3C4 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 8032C3C8 7C 08 02 A6 */ mflr r0 -/* 8032C3CC 90 01 00 34 */ stw r0, 0x34(r1) -/* 8032C3D0 39 61 00 30 */ addi r11, r1, 0x30 -/* 8032C3D4 48 03 5E 01 */ bl _savegpr_27 -/* 8032C3D8 7C 7E 1B 78 */ mr r30, r3 -/* 8032C3DC 7C 9F 23 78 */ mr r31, r4 -/* 8032C3E0 3B 60 00 00 */ li r27, 0 -/* 8032C3E4 3B A0 00 00 */ li r29, 0 -lbl_8032C3E8: -/* 8032C3E8 7F 9E EA 14 */ add r28, r30, r29 -/* 8032C3EC A0 1C 00 06 */ lhz r0, 6(r28) -/* 8032C3F0 28 00 00 00 */ cmplwi r0, 0 -/* 8032C3F4 41 82 00 38 */ beq lbl_8032C42C -/* 8032C3F8 80 7F 00 24 */ lwz r3, 0x24(r31) -/* 8032C3FC 7F 64 DB 78 */ mr r4, r27 -/* 8032C400 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C404 81 8C 00 40 */ lwz r12, 0x40(r12) -/* 8032C408 7D 89 03 A6 */ mtctr r12 -/* 8032C40C 4E 80 04 21 */ bctrl -/* 8032C410 7C 65 1B 78 */ mr r5, r3 -/* 8032C414 80 7C 00 08 */ lwz r3, 8(r28) -/* 8032C418 A0 9C 00 04 */ lhz r4, 4(r28) -/* 8032C41C 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C420 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 8032C424 7D 89 03 A6 */ mtctr r12 -/* 8032C428 4E 80 04 21 */ bctrl -lbl_8032C42C: -/* 8032C42C 3B 7B 00 01 */ addi r27, r27, 1 -/* 8032C430 28 1B 00 02 */ cmplwi r27, 2 -/* 8032C434 3B BD 00 08 */ addi r29, r29, 8 -/* 8032C438 41 80 FF B0 */ blt lbl_8032C3E8 -/* 8032C43C 3B 60 00 00 */ li r27, 0 -/* 8032C440 3B A0 00 00 */ li r29, 0 -lbl_8032C444: -/* 8032C444 7C 7E EA 14 */ add r3, r30, r29 -/* 8032C448 A0 03 00 5A */ lhz r0, 0x5a(r3) -/* 8032C44C 28 00 00 00 */ cmplwi r0, 0 -/* 8032C450 41 82 00 34 */ beq lbl_8032C484 -/* 8032C454 38 81 00 08 */ addi r4, r1, 8 -/* 8032C458 85 83 00 54 */ lwzu r12, 0x54(r3) -/* 8032C45C 81 8C 00 08 */ lwz r12, 8(r12) -/* 8032C460 7D 89 03 A6 */ mtctr r12 -/* 8032C464 4E 80 04 21 */ bctrl -/* 8032C468 80 7F 00 2C */ lwz r3, 0x2c(r31) -/* 8032C46C 7F 64 DB 78 */ mr r4, r27 -/* 8032C470 A0 A1 00 08 */ lhz r5, 8(r1) -/* 8032C474 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C478 81 8C 00 4C */ lwz r12, 0x4c(r12) -/* 8032C47C 7D 89 03 A6 */ mtctr r12 -/* 8032C480 4E 80 04 21 */ bctrl -lbl_8032C484: -/* 8032C484 3B 7B 00 01 */ addi r27, r27, 1 -/* 8032C488 28 1B 00 08 */ cmplwi r27, 8 -/* 8032C48C 3B BD 00 0C */ addi r29, r29, 0xc -/* 8032C490 41 80 FF B4 */ blt lbl_8032C444 -/* 8032C494 3B 60 00 00 */ li r27, 0 -/* 8032C498 3B A0 00 00 */ li r29, 0 -lbl_8032C49C: -/* 8032C49C 7F 9E EA 14 */ add r28, r30, r29 -/* 8032C4A0 A0 1C 00 B6 */ lhz r0, 0xb6(r28) -/* 8032C4A4 28 00 00 00 */ cmplwi r0, 0 -/* 8032C4A8 41 82 00 2C */ beq lbl_8032C4D4 -/* 8032C4AC 80 7F 00 2C */ lwz r3, 0x2c(r31) -/* 8032C4B0 7F 64 DB 78 */ mr r4, r27 -/* 8032C4B4 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C4B8 81 8C 00 68 */ lwz r12, 0x68(r12) -/* 8032C4BC 7D 89 03 A6 */ mtctr r12 -/* 8032C4C0 4E 80 04 21 */ bctrl -/* 8032C4C4 7C 65 1B 78 */ mr r5, r3 -/* 8032C4C8 80 7C 00 B8 */ lwz r3, 0xb8(r28) -/* 8032C4CC A0 9C 00 B4 */ lhz r4, 0xb4(r28) -/* 8032C4D0 4B FF ED 29 */ bl getTevColorReg__15J3DAnmTevRegKeyCFUsP11_GXColorS10 -lbl_8032C4D4: -/* 8032C4D4 3B 7B 00 01 */ addi r27, r27, 1 -/* 8032C4D8 28 1B 00 03 */ cmplwi r27, 3 -/* 8032C4DC 3B BD 00 08 */ addi r29, r29, 8 -/* 8032C4E0 41 80 FF BC */ blt lbl_8032C49C -/* 8032C4E4 3B 60 00 00 */ li r27, 0 -/* 8032C4E8 3B A0 00 00 */ li r29, 0 -lbl_8032C4EC: -/* 8032C4EC 7F 9E EA 14 */ add r28, r30, r29 -/* 8032C4F0 A0 1C 00 D6 */ lhz r0, 0xd6(r28) -/* 8032C4F4 28 00 00 00 */ cmplwi r0, 0 -/* 8032C4F8 41 82 00 2C */ beq lbl_8032C524 -/* 8032C4FC 80 7F 00 2C */ lwz r3, 0x2c(r31) -/* 8032C500 7F 64 DB 78 */ mr r4, r27 -/* 8032C504 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C508 81 8C 00 74 */ lwz r12, 0x74(r12) -/* 8032C50C 7D 89 03 A6 */ mtctr r12 -/* 8032C510 4E 80 04 21 */ bctrl -/* 8032C514 7C 65 1B 78 */ mr r5, r3 -/* 8032C518 80 7C 00 D8 */ lwz r3, 0xd8(r28) -/* 8032C51C A0 9C 00 D4 */ lhz r4, 0xd4(r28) -/* 8032C520 4B FF EF 9D */ bl getTevKonstReg__15J3DAnmTevRegKeyCFUsP8_GXColor -lbl_8032C524: -/* 8032C524 3B 7B 00 01 */ addi r27, r27, 1 -/* 8032C528 28 1B 00 04 */ cmplwi r27, 4 -/* 8032C52C 3B BD 00 08 */ addi r29, r29, 8 -/* 8032C530 41 80 FF BC */ blt lbl_8032C4EC -/* 8032C534 3B 60 00 00 */ li r27, 0 -/* 8032C538 3B A0 00 00 */ li r29, 0 -lbl_8032C53C: -/* 8032C53C 7F 9E EA 14 */ add r28, r30, r29 -/* 8032C540 A0 1C 00 16 */ lhz r0, 0x16(r28) -/* 8032C544 28 00 00 00 */ cmplwi r0, 0 -/* 8032C548 41 82 00 34 */ beq lbl_8032C57C -/* 8032C54C 80 7F 00 28 */ lwz r3, 0x28(r31) -/* 8032C550 7F 64 DB 78 */ mr r4, r27 -/* 8032C554 81 83 00 00 */ lwz r12, 0(r3) -/* 8032C558 81 8C 00 50 */ lwz r12, 0x50(r12) -/* 8032C55C 7D 89 03 A6 */ mtctr r12 -/* 8032C560 4E 80 04 21 */ bctrl -/* 8032C564 7C 65 1B 78 */ mr r5, r3 -/* 8032C568 80 7C 00 18 */ lwz r3, 0x18(r28) -/* 8032C56C C0 23 00 08 */ lfs f1, 8(r3) -/* 8032C570 A0 9C 00 14 */ lhz r4, 0x14(r28) -/* 8032C574 38 A5 00 10 */ addi r5, r5, 0x10 -/* 8032C578 4B FF D9 9D */ bl calcTransform__19J3DAnmTextureSRTKeyCFfUsP17J3DTextureSRTInfo -lbl_8032C57C: -/* 8032C57C 3B 7B 00 01 */ addi r27, r27, 1 -/* 8032C580 28 1B 00 08 */ cmplwi r27, 8 -/* 8032C584 3B BD 00 08 */ addi r29, r29, 8 -/* 8032C588 41 80 FF B4 */ blt lbl_8032C53C -/* 8032C58C 39 61 00 30 */ addi r11, r1, 0x30 -/* 8032C590 48 03 5C 91 */ bl _restgpr_27 -/* 8032C594 80 01 00 34 */ lwz r0, 0x34(r1) -/* 8032C598 7C 08 03 A6 */ mtlr r0 -/* 8032C59C 38 21 00 30 */ addi r1, r1, 0x30 -/* 8032C5A0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/initialize__14J3DMaterialAnmFv.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/initialize__14J3DMaterialAnmFv.s deleted file mode 100644 index 309267f3a1..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/initialize__14J3DMaterialAnmFv.s +++ /dev/null @@ -1,47 +0,0 @@ -lbl_8032C320: -/* 8032C320 38 80 00 00 */ li r4, 0 -/* 8032C324 7C 85 23 78 */ mr r5, r4 -/* 8032C328 38 00 00 02 */ li r0, 2 -/* 8032C32C 7C 09 03 A6 */ mtctr r0 -lbl_8032C330: -/* 8032C330 38 04 00 06 */ addi r0, r4, 6 -/* 8032C334 7C A3 03 2E */ sthx r5, r3, r0 -/* 8032C338 38 84 00 08 */ addi r4, r4, 8 -/* 8032C33C 42 00 FF F4 */ bdnz lbl_8032C330 -/* 8032C340 38 80 00 00 */ li r4, 0 -/* 8032C344 38 A0 00 00 */ li r5, 0 -/* 8032C348 38 00 00 08 */ li r0, 8 -/* 8032C34C 7C 09 03 A6 */ mtctr r0 -lbl_8032C350: -/* 8032C350 38 04 00 5A */ addi r0, r4, 0x5a -/* 8032C354 7C A3 03 2E */ sthx r5, r3, r0 -/* 8032C358 38 84 00 0C */ addi r4, r4, 0xc -/* 8032C35C 42 00 FF F4 */ bdnz lbl_8032C350 -/* 8032C360 38 80 00 00 */ li r4, 0 -/* 8032C364 38 A0 00 00 */ li r5, 0 -/* 8032C368 38 00 00 04 */ li r0, 4 -/* 8032C36C 7C 09 03 A6 */ mtctr r0 -lbl_8032C370: -/* 8032C370 38 04 00 B6 */ addi r0, r4, 0xb6 -/* 8032C374 7C A3 03 2E */ sthx r5, r3, r0 -/* 8032C378 38 84 00 08 */ addi r4, r4, 8 -/* 8032C37C 42 00 FF F4 */ bdnz lbl_8032C370 -/* 8032C380 38 80 00 00 */ li r4, 0 -/* 8032C384 38 A0 00 00 */ li r5, 0 -/* 8032C388 38 00 00 04 */ li r0, 4 -/* 8032C38C 7C 09 03 A6 */ mtctr r0 -lbl_8032C390: -/* 8032C390 38 04 00 D6 */ addi r0, r4, 0xd6 -/* 8032C394 7C A3 03 2E */ sthx r5, r3, r0 -/* 8032C398 38 84 00 08 */ addi r4, r4, 8 -/* 8032C39C 42 00 FF F4 */ bdnz lbl_8032C390 -/* 8032C3A0 38 80 00 00 */ li r4, 0 -/* 8032C3A4 38 A0 00 00 */ li r5, 0 -/* 8032C3A8 38 00 00 08 */ li r0, 8 -/* 8032C3AC 7C 09 03 A6 */ mtctr r0 -lbl_8032C3B0: -/* 8032C3B0 38 04 00 16 */ addi r0, r4, 0x16 -/* 8032C3B4 7C A3 03 2E */ sthx r5, r3, r0 -/* 8032C3B8 38 84 00 08 */ addi r4, r4, 8 -/* 8032C3BC 42 00 FF F4 */ bdnz lbl_8032C3B0 -/* 8032C3C0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm.s deleted file mode 100644 index 1b1f43aa9b..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_8032C5A4: -/* 8032C5A4 28 05 00 00 */ cmplwi r5, 0 -/* 8032C5A8 40 82 00 18 */ bne lbl_8032C5C0 -/* 8032C5AC 38 A0 00 00 */ li r5, 0 -/* 8032C5B0 54 80 18 38 */ slwi r0, r4, 3 -/* 8032C5B4 7C 63 02 14 */ add r3, r3, r0 -/* 8032C5B8 B0 A3 00 06 */ sth r5, 6(r3) -/* 8032C5BC 4E 80 00 20 */ blr -lbl_8032C5C0: -/* 8032C5C0 80 05 00 04 */ lwz r0, 4(r5) -/* 8032C5C4 54 84 18 38 */ slwi r4, r4, 3 -/* 8032C5C8 7C 63 22 14 */ add r3, r3, r4 -/* 8032C5CC 90 03 00 08 */ stw r0, 8(r3) -/* 8032C5D0 A0 05 00 00 */ lhz r0, 0(r5) -/* 8032C5D4 B0 03 00 04 */ sth r0, 4(r3) -/* 8032C5D8 A0 05 00 02 */ lhz r0, 2(r5) -/* 8032C5DC B0 03 00 06 */ sth r0, 6(r3) -/* 8032C5E0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm.s deleted file mode 100644 index c9c57a2439..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_8032C664: -/* 8032C664 28 05 00 00 */ cmplwi r5, 0 -/* 8032C668 40 82 00 18 */ bne lbl_8032C680 -/* 8032C66C 38 A0 00 00 */ li r5, 0 -/* 8032C670 54 80 18 38 */ slwi r0, r4, 3 -/* 8032C674 7C 63 02 14 */ add r3, r3, r0 -/* 8032C678 B0 A3 00 B6 */ sth r5, 0xb6(r3) -/* 8032C67C 4E 80 00 20 */ blr -lbl_8032C680: -/* 8032C680 80 05 00 04 */ lwz r0, 4(r5) -/* 8032C684 54 84 18 38 */ slwi r4, r4, 3 -/* 8032C688 7C 63 22 14 */ add r3, r3, r4 -/* 8032C68C 90 03 00 B8 */ stw r0, 0xb8(r3) -/* 8032C690 A0 05 00 00 */ lhz r0, 0(r5) -/* 8032C694 B0 03 00 B4 */ sth r0, 0xb4(r3) -/* 8032C698 A0 05 00 02 */ lhz r0, 2(r5) -/* 8032C69C B0 03 00 B6 */ sth r0, 0xb6(r3) -/* 8032C6A0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm.s deleted file mode 100644 index 2391195a32..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_8032C6A4: -/* 8032C6A4 28 05 00 00 */ cmplwi r5, 0 -/* 8032C6A8 40 82 00 18 */ bne lbl_8032C6C0 -/* 8032C6AC 38 A0 00 00 */ li r5, 0 -/* 8032C6B0 54 80 18 38 */ slwi r0, r4, 3 -/* 8032C6B4 7C 63 02 14 */ add r3, r3, r0 -/* 8032C6B8 B0 A3 00 D6 */ sth r5, 0xd6(r3) -/* 8032C6BC 4E 80 00 20 */ blr -lbl_8032C6C0: -/* 8032C6C0 80 05 00 04 */ lwz r0, 4(r5) -/* 8032C6C4 54 84 18 38 */ slwi r4, r4, 3 -/* 8032C6C8 7C 63 22 14 */ add r3, r3, r4 -/* 8032C6CC 90 03 00 D8 */ stw r0, 0xd8(r3) -/* 8032C6D0 A0 05 00 00 */ lhz r0, 0(r5) -/* 8032C6D4 B0 03 00 D4 */ sth r0, 0xd4(r3) -/* 8032C6D8 A0 05 00 02 */ lhz r0, 2(r5) -/* 8032C6DC B0 03 00 D6 */ sth r0, 0xd6(r3) -/* 8032C6E0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm.s deleted file mode 100644 index e40f36b41c..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_8032C5E4: -/* 8032C5E4 28 05 00 00 */ cmplwi r5, 0 -/* 8032C5E8 40 82 00 18 */ bne lbl_8032C600 -/* 8032C5EC 38 A0 00 00 */ li r5, 0 -/* 8032C5F0 54 80 18 38 */ slwi r0, r4, 3 -/* 8032C5F4 7C 63 02 14 */ add r3, r3, r0 -/* 8032C5F8 B0 A3 00 16 */ sth r5, 0x16(r3) -/* 8032C5FC 4E 80 00 20 */ blr -lbl_8032C600: -/* 8032C600 80 05 00 04 */ lwz r0, 4(r5) -/* 8032C604 54 84 18 38 */ slwi r4, r4, 3 -/* 8032C608 7C 63 22 14 */ add r3, r3, r4 -/* 8032C60C 90 03 00 18 */ stw r0, 0x18(r3) -/* 8032C610 A0 05 00 00 */ lhz r0, 0(r5) -/* 8032C614 B0 03 00 14 */ sth r0, 0x14(r3) -/* 8032C618 A0 05 00 02 */ lhz r0, 2(r5) -/* 8032C61C B0 03 00 16 */ sth r0, 0x16(r3) -/* 8032C620 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm.s deleted file mode 100644 index feb0a06e91..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_8032C624: -/* 8032C624 28 05 00 00 */ cmplwi r5, 0 -/* 8032C628 40 82 00 18 */ bne lbl_8032C640 -/* 8032C62C 38 A0 00 00 */ li r5, 0 -/* 8032C630 1C 04 00 0C */ mulli r0, r4, 0xc -/* 8032C634 7C 63 02 14 */ add r3, r3, r0 -/* 8032C638 B0 A3 00 5A */ sth r5, 0x5a(r3) -/* 8032C63C 4E 80 00 20 */ blr -lbl_8032C640: -/* 8032C640 80 05 00 08 */ lwz r0, 8(r5) -/* 8032C644 1C 84 00 0C */ mulli r4, r4, 0xc -/* 8032C648 7C 63 22 14 */ add r3, r3, r4 -/* 8032C64C 90 03 00 5C */ stw r0, 0x5c(r3) -/* 8032C650 A0 05 00 04 */ lhz r0, 4(r5) -/* 8032C654 B0 03 00 58 */ sth r0, 0x58(r3) -/* 8032C658 A0 05 00 06 */ lhz r0, 6(r5) -/* 8032C65C B0 03 00 5A */ sth r0, 0x5a(r3) -/* 8032C660 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__ct__16J3DMaterialTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__ct__16J3DMaterialTableFv.s deleted file mode 100644 index 82f8cd43ee..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__ct__16J3DMaterialTableFv.s +++ /dev/null @@ -1,14 +0,0 @@ -lbl_8032F5D0: -/* 8032F5D0 3C 80 80 3D */ lis r4, __vt__16J3DMaterialTable@ha /* 0x803CEE80@ha */ -/* 8032F5D4 38 04 EE 80 */ addi r0, r4, __vt__16J3DMaterialTable@l /* 0x803CEE80@l */ -/* 8032F5D8 90 03 00 00 */ stw r0, 0(r3) -/* 8032F5DC 38 00 00 00 */ li r0, 0 -/* 8032F5E0 B0 03 00 04 */ sth r0, 4(r3) -/* 8032F5E4 B0 03 00 06 */ sth r0, 6(r3) -/* 8032F5E8 90 03 00 08 */ stw r0, 8(r3) -/* 8032F5EC 90 03 00 0C */ stw r0, 0xc(r3) -/* 8032F5F0 90 03 00 10 */ stw r0, 0x10(r3) -/* 8032F5F4 90 03 00 14 */ stw r0, 0x14(r3) -/* 8032F5F8 90 03 00 18 */ stw r0, 0x18(r3) -/* 8032F5FC B0 03 00 1C */ sth r0, 0x1c(r3) -/* 8032F600 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__dt__16J3DMaterialTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__dt__16J3DMaterialTableFv.s deleted file mode 100644 index ef5beeb43b..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__dt__16J3DMaterialTableFv.s +++ /dev/null @@ -1,20 +0,0 @@ -lbl_8032F604: -/* 8032F604 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8032F608 7C 08 02 A6 */ mflr r0 -/* 8032F60C 90 01 00 14 */ stw r0, 0x14(r1) -/* 8032F610 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8032F614 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8032F618 41 82 00 1C */ beq lbl_8032F634 -/* 8032F61C 3C A0 80 3D */ lis r5, __vt__16J3DMaterialTable@ha /* 0x803CEE80@ha */ -/* 8032F620 38 05 EE 80 */ addi r0, r5, __vt__16J3DMaterialTable@l /* 0x803CEE80@l */ -/* 8032F624 90 1F 00 00 */ stw r0, 0(r31) -/* 8032F628 7C 80 07 35 */ extsh. r0, r4 -/* 8032F62C 40 81 00 08 */ ble lbl_8032F634 -/* 8032F630 4B F9 F7 0D */ bl __dl__FPv -lbl_8032F634: -/* 8032F634 7F E3 FB 78 */ mr r3, r31 -/* 8032F638 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 8032F63C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8032F640 7C 08 03 A6 */ mtlr r0 -/* 8032F644 38 21 00 10 */ addi r1, r1, 0x10 -/* 8032F648 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/clear__16J3DMaterialTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/clear__16J3DMaterialTableFv.s deleted file mode 100644 index 01b8c80fdb..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/clear__16J3DMaterialTableFv.s +++ /dev/null @@ -1,11 +0,0 @@ -lbl_8032F5A8: -/* 8032F5A8 38 00 00 00 */ li r0, 0 -/* 8032F5AC B0 03 00 04 */ sth r0, 4(r3) -/* 8032F5B0 B0 03 00 06 */ sth r0, 6(r3) -/* 8032F5B4 90 03 00 08 */ stw r0, 8(r3) -/* 8032F5B8 90 03 00 0C */ stw r0, 0xc(r3) -/* 8032F5BC 90 03 00 10 */ stw r0, 0x10(r3) -/* 8032F5C0 90 03 00 14 */ stw r0, 0x14(r3) -/* 8032F5C4 90 03 00 18 */ stw r0, 0x18(r3) -/* 8032F5C8 B0 03 00 1C */ sth r0, 0x1c(r3) -/* 8032F5CC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/__dt__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/__dt__8J3DModelFv.s deleted file mode 100644 index 67dfc2cbe6..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/__dt__8J3DModelFv.s +++ /dev/null @@ -1,27 +0,0 @@ -lbl_80328350: -/* 80328350 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80328354 7C 08 02 A6 */ mflr r0 -/* 80328358 90 01 00 14 */ stw r0, 0x14(r1) -/* 8032835C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80328360 93 C1 00 08 */ stw r30, 8(r1) -/* 80328364 7C 7E 1B 79 */ or. r30, r3, r3 -/* 80328368 7C 9F 23 78 */ mr r31, r4 -/* 8032836C 41 82 00 2C */ beq lbl_80328398 -/* 80328370 3C 60 80 3D */ lis r3, __vt__8J3DModel@ha /* 0x803CED20@ha */ -/* 80328374 38 03 ED 20 */ addi r0, r3, __vt__8J3DModel@l /* 0x803CED20@l */ -/* 80328378 90 1E 00 00 */ stw r0, 0(r30) -/* 8032837C 38 7E 00 88 */ addi r3, r30, 0x88 -/* 80328380 38 80 FF FF */ li r4, -1 -/* 80328384 4B FE 8C AD */ bl __dt__15J3DVertexBufferFv -/* 80328388 7F E0 07 35 */ extsh. r0, r31 -/* 8032838C 40 81 00 0C */ ble lbl_80328398 -/* 80328390 7F C3 F3 78 */ mr r3, r30 -/* 80328394 4B FA 69 A9 */ bl __dl__FPv -lbl_80328398: -/* 80328398 7F C3 F3 78 */ mr r3, r30 -/* 8032839C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 803283A0 83 C1 00 08 */ lwz r30, 8(r1) -/* 803283A4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 803283A8 7C 08 03 A6 */ mtlr r0 -/* 803283AC 38 21 00 10 */ addi r1, r1, 0x10 -/* 803283B0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/calcAnmMtx__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/calcAnmMtx__8J3DModelFv.s deleted file mode 100644 index f667be615b..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/calcAnmMtx__8J3DModelFv.s +++ /dev/null @@ -1,36 +0,0 @@ -lbl_80327BD4: -/* 80327BD4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80327BD8 7C 08 02 A6 */ mflr r0 -/* 80327BDC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80327BE0 7C 66 1B 78 */ mr r6, r3 -/* 80327BE4 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80327BE8 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80327BEC 90 C3 00 38 */ stw r6, 0x38(r3) -/* 80327BF0 80 06 00 08 */ lwz r0, 8(r6) -/* 80327BF4 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e -/* 80327BF8 41 82 00 30 */ beq lbl_80327C28 -/* 80327BFC 80 66 00 04 */ lwz r3, 4(r6) -/* 80327C00 80 86 00 84 */ lwz r4, 0x84(r6) -/* 80327C04 3C A0 80 3A */ lis r5, j3dDefaultScale@ha /* 0x803A1E50@ha */ -/* 80327C08 38 A5 1E 50 */ addi r5, r5, j3dDefaultScale@l /* 0x803A1E50@l */ -/* 80327C0C 3C C0 80 3A */ lis r6, j3dDefaultMtx@ha /* 0x803A1E5C@ha */ -/* 80327C10 38 C6 1E 5C */ addi r6, r6, j3dDefaultMtx@l /* 0x803A1E5C@l */ -/* 80327C14 85 83 00 10 */ lwzu r12, 0x10(r3) -/* 80327C18 81 8C 00 08 */ lwz r12, 8(r12) -/* 80327C1C 7D 89 03 A6 */ mtctr r12 -/* 80327C20 4E 80 04 21 */ bctrl -/* 80327C24 48 00 00 24 */ b lbl_80327C48 -lbl_80327C28: -/* 80327C28 80 66 00 04 */ lwz r3, 4(r6) -/* 80327C2C 80 86 00 84 */ lwz r4, 0x84(r6) -/* 80327C30 38 A6 00 18 */ addi r5, r6, 0x18 -/* 80327C34 38 C6 00 24 */ addi r6, r6, 0x24 -/* 80327C38 85 83 00 10 */ lwzu r12, 0x10(r3) -/* 80327C3C 81 8C 00 08 */ lwz r12, 8(r12) -/* 80327C40 7D 89 03 A6 */ mtctr r12 -/* 80327C44 4E 80 04 21 */ bctrl -lbl_80327C48: -/* 80327C48 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80327C4C 7C 08 03 A6 */ mtlr r0 -/* 80327C50 38 21 00 10 */ addi r1, r1, 0x10 -/* 80327C54 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/calcBBoardMtx__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/calcBBoardMtx__8J3DModelFv.s deleted file mode 100644 index 82c04b4968..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/calcBBoardMtx__8J3DModelFv.s +++ /dev/null @@ -1,15 +0,0 @@ -lbl_803282B8: -/* 803282B8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 803282BC 7C 08 02 A6 */ mflr r0 -/* 803282C0 90 01 00 14 */ stw r0, 0x14(r1) -/* 803282C4 80 83 00 04 */ lwz r4, 4(r3) -/* 803282C8 A0 04 00 0E */ lhz r0, 0xe(r4) -/* 803282CC 28 00 00 01 */ cmplwi r0, 1 -/* 803282D0 40 82 00 0C */ bne lbl_803282DC -/* 803282D4 80 63 00 84 */ lwz r3, 0x84(r3) -/* 803282D8 4B FF EC 19 */ bl calcBBoardMtx__12J3DMtxBufferFv -lbl_803282DC: -/* 803282DC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 803282E0 7C 08 03 A6 */ mtlr r0 -/* 803282E4 38 21 00 10 */ addi r1, r1, 0x10 -/* 803282E8 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/calcNrmMtx__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/calcNrmMtx__8J3DModelFv.s deleted file mode 100644 index 2604eb582d..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/calcNrmMtx__8J3DModelFv.s +++ /dev/null @@ -1,10 +0,0 @@ -lbl_80328190: -/* 80328190 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80328194 7C 08 02 A6 */ mflr r0 -/* 80328198 90 01 00 14 */ stw r0, 0x14(r1) -/* 8032819C 80 63 00 84 */ lwz r3, 0x84(r3) -/* 803281A0 4B FF EB 9D */ bl calcNrmMtx__12J3DMtxBufferFv -/* 803281A4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 803281A8 7C 08 03 A6 */ mtlr r0 -/* 803281AC 38 21 00 10 */ addi r1, r1, 0x10 -/* 803281B0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/calcWeightEnvelopeMtx__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/calcWeightEnvelopeMtx__8J3DModelFv.s deleted file mode 100644 index 04658fec0e..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/calcWeightEnvelopeMtx__8J3DModelFv.s +++ /dev/null @@ -1,21 +0,0 @@ -lbl_80327C58: -/* 80327C58 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80327C5C 7C 08 02 A6 */ mflr r0 -/* 80327C60 90 01 00 14 */ stw r0, 0x14(r1) -/* 80327C64 80 83 00 04 */ lwz r4, 4(r3) -/* 80327C68 A0 04 00 2E */ lhz r0, 0x2e(r4) -/* 80327C6C 28 00 00 00 */ cmplwi r0, 0 -/* 80327C70 41 82 00 24 */ beq lbl_80327C94 -/* 80327C74 80 03 00 08 */ lwz r0, 8(r3) -/* 80327C78 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b -/* 80327C7C 40 82 00 18 */ bne lbl_80327C94 -/* 80327C80 80 04 00 08 */ lwz r0, 8(r4) -/* 80327C84 54 00 05 EF */ rlwinm. r0, r0, 0, 0x17, 0x17 -/* 80327C88 40 82 00 0C */ bne lbl_80327C94 -/* 80327C8C 80 63 00 84 */ lwz r3, 0x84(r3) -/* 80327C90 4B FF EC 45 */ bl calcWeightEnvelopeMtx__12J3DMtxBufferFv -lbl_80327C94: -/* 80327C94 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80327C98 7C 08 03 A6 */ mtlr r0 -/* 80327C9C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80327CA0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/entryModelData__8J3DModelFP12J3DModelDataUlUl.s b/asm/JSystem/J3DGraphAnimator/J3DModel/entryModelData__8J3DModelFP12J3DModelDataUlUl.s deleted file mode 100644 index 28ab171ecb..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/entryModelData__8J3DModelFP12J3DModelDataUlUl.s +++ /dev/null @@ -1,110 +0,0 @@ -lbl_80327184: -/* 80327184 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80327188 7C 08 02 A6 */ mflr r0 -/* 8032718C 90 01 00 24 */ stw r0, 0x24(r1) -/* 80327190 39 61 00 20 */ addi r11, r1, 0x20 -/* 80327194 48 03 B0 41 */ bl _savegpr_27 -/* 80327198 7C 7E 1B 78 */ mr r30, r3 -/* 8032719C 7C 9B 23 78 */ mr r27, r4 -/* 803271A0 7C BF 2B 78 */ mr r31, r5 -/* 803271A4 7C DC 33 78 */ mr r28, r6 -/* 803271A8 93 63 00 04 */ stw r27, 4(r3) -/* 803271AC 38 60 00 3C */ li r3, 0x3c -/* 803271B0 4B FA 7A 9D */ bl __nw__FUl -/* 803271B4 7C 7D 1B 79 */ or. r29, r3, r3 -/* 803271B8 41 82 00 14 */ beq lbl_803271CC -/* 803271BC 3C 80 80 3D */ lis r4, __vt__12J3DMtxBuffer@ha /* 0x803CED44@ha */ -/* 803271C0 38 04 ED 44 */ addi r0, r4, __vt__12J3DMtxBuffer@l /* 0x803CED44@l */ -/* 803271C4 90 1D 00 38 */ stw r0, 0x38(r29) -/* 803271C8 4B FF F0 4D */ bl initialize__12J3DMtxBufferFv -lbl_803271CC: -/* 803271CC 93 BE 00 84 */ stw r29, 0x84(r30) -/* 803271D0 80 7E 00 84 */ lwz r3, 0x84(r30) -/* 803271D4 28 03 00 00 */ cmplwi r3, 0 -/* 803271D8 40 82 00 0C */ bne lbl_803271E4 -/* 803271DC 38 60 00 04 */ li r3, 4 -/* 803271E0 48 00 01 08 */ b lbl_803272E8 -lbl_803271E4: -/* 803271E4 7F 64 DB 78 */ mr r4, r27 -/* 803271E8 7F 85 E3 78 */ mr r5, r28 -/* 803271EC 4B FF F0 6D */ bl create__12J3DMtxBufferFP12J3DModelDataUl -/* 803271F0 2C 03 00 00 */ cmpwi r3, 0 -/* 803271F4 41 82 00 08 */ beq lbl_803271FC -/* 803271F8 48 00 00 F0 */ b lbl_803272E8 -lbl_803271FC: -/* 803271FC 7F C3 F3 78 */ mr r3, r30 -/* 80327200 7F 64 DB 78 */ mr r4, r27 -/* 80327204 48 00 00 FD */ bl createShapePacket__8J3DModelFP12J3DModelData -/* 80327208 2C 03 00 00 */ cmpwi r3, 0 -/* 8032720C 41 82 00 08 */ beq lbl_80327214 -/* 80327210 48 00 00 D8 */ b lbl_803272E8 -lbl_80327214: -/* 80327214 7F C3 F3 78 */ mr r3, r30 -/* 80327218 7F 64 DB 78 */ mr r4, r27 -/* 8032721C 7F E5 FB 78 */ mr r5, r31 -/* 80327220 48 00 01 AD */ bl createMatPacket__8J3DModelFP12J3DModelDataUl -/* 80327224 2C 03 00 00 */ cmpwi r3, 0 -/* 80327228 41 82 00 08 */ beq lbl_80327230 -/* 8032722C 48 00 00 BC */ b lbl_803272E8 -lbl_80327230: -/* 80327230 38 7E 00 88 */ addi r3, r30, 0x88 -/* 80327234 38 9B 00 88 */ addi r4, r27, 0x88 -/* 80327238 4B FE 9D 41 */ bl setVertexData__15J3DVertexBufferFP13J3DVertexData -/* 8032723C 7F C3 F3 78 */ mr r3, r30 -/* 80327240 48 00 10 AD */ bl prepareShapePackets__8J3DModelFv -/* 80327244 57 E0 07 FF */ clrlwi. r0, r31, 0x1f -/* 80327248 41 82 00 10 */ beq lbl_80327258 -/* 8032724C 80 1E 00 08 */ lwz r0, 8(r30) -/* 80327250 60 00 00 01 */ ori r0, r0, 1 -/* 80327254 90 1E 00 08 */ stw r0, 8(r30) -lbl_80327258: -/* 80327258 57 E0 07 BD */ rlwinm. r0, r31, 0, 0x1e, 0x1e -/* 8032725C 41 82 00 10 */ beq lbl_8032726C -/* 80327260 80 1E 00 08 */ lwz r0, 8(r30) -/* 80327264 60 00 00 02 */ ori r0, r0, 2 -/* 80327268 90 1E 00 08 */ stw r0, 8(r30) -lbl_8032726C: -/* 8032726C 57 E0 06 F7 */ rlwinm. r0, r31, 0, 0x1b, 0x1b -/* 80327270 41 82 00 10 */ beq lbl_80327280 -/* 80327274 80 1E 00 08 */ lwz r0, 8(r30) -/* 80327278 60 00 00 10 */ ori r0, r0, 0x10 -/* 8032727C 90 1E 00 08 */ stw r0, 8(r30) -lbl_80327280: -/* 80327280 57 E0 03 9D */ rlwinm. r0, r31, 0, 0xe, 0xe -/* 80327284 41 82 00 10 */ beq lbl_80327294 -/* 80327288 80 1E 00 08 */ lwz r0, 8(r30) -/* 8032728C 64 00 00 02 */ oris r0, r0, 2 -/* 80327290 90 1E 00 08 */ stw r0, 8(r30) -lbl_80327294: -/* 80327294 57 E0 03 5B */ rlwinm. r0, r31, 0, 0xd, 0xd -/* 80327298 41 82 00 10 */ beq lbl_803272A8 -/* 8032729C 80 1E 00 08 */ lwz r0, 8(r30) -/* 803272A0 64 00 00 04 */ oris r0, r0, 4 -/* 803272A4 90 1E 00 08 */ stw r0, 8(r30) -lbl_803272A8: -/* 803272A8 57 E0 03 19 */ rlwinm. r0, r31, 0, 0xc, 0xc -/* 803272AC 41 82 00 10 */ beq lbl_803272BC -/* 803272B0 80 1E 00 08 */ lwz r0, 8(r30) -/* 803272B4 64 00 00 08 */ oris r0, r0, 8 -/* 803272B8 90 1E 00 08 */ stw r0, 8(r30) -lbl_803272BC: -/* 803272BC 57 E0 07 7B */ rlwinm. r0, r31, 0, 0x1d, 0x1d -/* 803272C0 41 82 00 10 */ beq lbl_803272D0 -/* 803272C4 80 1E 00 08 */ lwz r0, 8(r30) -/* 803272C8 60 00 00 04 */ ori r0, r0, 4 -/* 803272CC 90 1E 00 08 */ stw r0, 8(r30) -lbl_803272D0: -/* 803272D0 57 E0 07 39 */ rlwinm. r0, r31, 0, 0x1c, 0x1c -/* 803272D4 41 82 00 10 */ beq lbl_803272E4 -/* 803272D8 80 1E 00 08 */ lwz r0, 8(r30) -/* 803272DC 60 00 00 08 */ ori r0, r0, 8 -/* 803272E0 90 1E 00 08 */ stw r0, 8(r30) -lbl_803272E4: -/* 803272E4 38 60 00 00 */ li r3, 0 -lbl_803272E8: -/* 803272E8 39 61 00 20 */ addi r11, r1, 0x20 -/* 803272EC 48 03 AF 35 */ bl _restgpr_27 -/* 803272F0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 803272F4 7C 08 03 A6 */ mtlr r0 -/* 803272F8 38 21 00 20 */ addi r1, r1, 0x20 -/* 803272FC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/initialize__8J3DModelFv.s b/asm/JSystem/J3DGraphAnimator/J3DModel/initialize__8J3DModelFv.s deleted file mode 100644 index ffb3cb62da..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/initialize__8J3DModelFv.s +++ /dev/null @@ -1,34 +0,0 @@ -lbl_80327100: -/* 80327100 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80327104 7C 08 02 A6 */ mflr r0 -/* 80327108 90 01 00 14 */ stw r0, 0x14(r1) -/* 8032710C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80327110 7C 7F 1B 78 */ mr r31, r3 -/* 80327114 38 00 00 00 */ li r0, 0 -/* 80327118 90 03 00 04 */ stw r0, 4(r3) -/* 8032711C 90 03 00 08 */ stw r0, 8(r3) -/* 80327120 90 03 00 0C */ stw r0, 0xc(r3) -/* 80327124 90 03 00 10 */ stw r0, 0x10(r3) -/* 80327128 90 03 00 14 */ stw r0, 0x14(r3) -/* 8032712C C0 02 CA 28 */ lfs f0, lit_896(r2) -/* 80327130 D0 03 00 18 */ stfs f0, 0x18(r3) -/* 80327134 D0 03 00 1C */ stfs f0, 0x1c(r3) -/* 80327138 D0 03 00 20 */ stfs f0, 0x20(r3) -/* 8032713C 38 7F 00 24 */ addi r3, r31, 0x24 -/* 80327140 48 01 F3 45 */ bl PSMTXIdentity -/* 80327144 38 7F 00 54 */ addi r3, r31, 0x54 -/* 80327148 48 01 F3 3D */ bl PSMTXIdentity -/* 8032714C 38 00 00 00 */ li r0, 0 -/* 80327150 90 1F 00 84 */ stw r0, 0x84(r31) -/* 80327154 90 1F 00 C0 */ stw r0, 0xc0(r31) -/* 80327158 90 1F 00 C4 */ stw r0, 0xc4(r31) -/* 8032715C 90 1F 00 C8 */ stw r0, 0xc8(r31) -/* 80327160 90 1F 00 CC */ stw r0, 0xcc(r31) -/* 80327164 90 1F 00 D0 */ stw r0, 0xd0(r31) -/* 80327168 90 1F 00 D4 */ stw r0, 0xd4(r31) -/* 8032716C 90 1F 00 D8 */ stw r0, 0xd8(r31) -/* 80327170 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80327174 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80327178 7C 08 03 A6 */ mtlr r0 -/* 8032717C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80327180 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModel/setDeformData__8J3DModelFP13J3DDeformDataUl.s b/asm/JSystem/J3DGraphAnimator/J3DModel/setDeformData__8J3DModelFP13J3DDeformDataUl.s deleted file mode 100644 index 541cbb9e45..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModel/setDeformData__8J3DModelFP13J3DDeformDataUl.s +++ /dev/null @@ -1,34 +0,0 @@ -lbl_80327A2C: -/* 80327A2C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80327A30 7C 08 02 A6 */ mflr r0 -/* 80327A34 90 01 00 14 */ stw r0, 0x14(r1) -/* 80327A38 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80327A3C 93 C1 00 08 */ stw r30, 8(r1) -/* 80327A40 7C 9E 23 79 */ or. r30, r4, r4 -/* 80327A44 7C BF 2B 78 */ mr r31, r5 -/* 80327A48 93 C3 00 C8 */ stw r30, 0xc8(r3) -/* 80327A4C 40 82 00 0C */ bne lbl_80327A58 -/* 80327A50 38 60 00 00 */ li r3, 0 -/* 80327A54 48 00 00 34 */ b lbl_80327A88 -lbl_80327A58: -/* 80327A58 38 63 00 88 */ addi r3, r3, 0x88 -/* 80327A5C 7F E4 FB 78 */ mr r4, r31 -/* 80327A60 4B FE 98 71 */ bl copyLocalVtxArray__15J3DVertexBufferFUl -/* 80327A64 2C 03 00 00 */ cmpwi r3, 0 -/* 80327A68 41 82 00 08 */ beq lbl_80327A70 -/* 80327A6C 48 00 00 1C */ b lbl_80327A88 -lbl_80327A70: -/* 80327A70 57 E0 07 7B */ rlwinm. r0, r31, 0, 0x1d, 0x1d -/* 80327A74 41 82 00 10 */ beq lbl_80327A84 -/* 80327A78 7F C3 F3 78 */ mr r3, r30 -/* 80327A7C 38 80 00 01 */ li r4, 1 -/* 80327A80 48 00 67 B1 */ bl offAllFlag__13J3DDeformDataFUl -lbl_80327A84: -/* 80327A84 38 60 00 00 */ li r3, 0 -lbl_80327A88: -/* 80327A88 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80327A8C 83 C1 00 08 */ lwz r30, 8(r1) -/* 80327A90 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80327A94 7C 08 03 A6 */ mtlr r0 -/* 80327A98 38 21 00 10 */ addi r1, r1, 0x10 -/* 80327A9C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/__ct__12J3DModelDataFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/__ct__12J3DModelDataFv.s deleted file mode 100644 index 6fdfe7b0ec..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/__ct__12J3DModelDataFv.s +++ /dev/null @@ -1,30 +0,0 @@ -lbl_80325DA0: -/* 80325DA0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80325DA4 7C 08 02 A6 */ mflr r0 -/* 80325DA8 90 01 00 14 */ stw r0, 0x14(r1) -/* 80325DAC 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80325DB0 7C 7F 1B 78 */ mr r31, r3 -/* 80325DB4 3C 60 80 3D */ lis r3, __vt__12J3DModelData@ha /* 0x803CED14@ha */ -/* 80325DB8 38 03 ED 14 */ addi r0, r3, __vt__12J3DModelData@l /* 0x803CED14@l */ -/* 80325DBC 90 1F 00 00 */ stw r0, 0(r31) -/* 80325DC0 38 7F 00 10 */ addi r3, r31, 0x10 -/* 80325DC4 4B FF FC 55 */ bl __ct__12J3DJointTreeFv -/* 80325DC8 38 7F 00 58 */ addi r3, r31, 0x58 -/* 80325DCC 48 00 98 05 */ bl __ct__16J3DMaterialTableFv -/* 80325DD0 3C 60 80 3D */ lis r3, __vt__13J3DShapeTable@ha /* 0x803CED08@ha */ -/* 80325DD4 38 03 ED 08 */ addi r0, r3, __vt__13J3DShapeTable@l /* 0x803CED08@l */ -/* 80325DD8 90 1F 00 78 */ stw r0, 0x78(r31) -/* 80325DDC 38 00 00 00 */ li r0, 0 -/* 80325DE0 B0 1F 00 7C */ sth r0, 0x7c(r31) -/* 80325DE4 90 1F 00 80 */ stw r0, 0x80(r31) -/* 80325DE8 90 1F 00 84 */ stw r0, 0x84(r31) -/* 80325DEC 38 7F 00 88 */ addi r3, r31, 0x88 -/* 80325DF0 4B FE B1 09 */ bl __ct__13J3DVertexDataFv -/* 80325DF4 7F E3 FB 78 */ mr r3, r31 -/* 80325DF8 4B FF FF 91 */ bl clear__12J3DModelDataFv -/* 80325DFC 7F E3 FB 78 */ mr r3, r31 -/* 80325E00 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80325E04 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80325E08 7C 08 03 A6 */ mtlr r0 -/* 80325E0C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80325E10 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/clear__12J3DModelDataFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/clear__12J3DModelDataFv.s deleted file mode 100644 index f75bc79a9c..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/clear__12J3DModelDataFv.s +++ /dev/null @@ -1,7 +0,0 @@ -lbl_80325D88: -/* 80325D88 38 00 00 00 */ li r0, 0 -/* 80325D8C 90 03 00 04 */ stw r0, 4(r3) -/* 80325D90 90 03 00 08 */ stw r0, 8(r3) -/* 80325D94 B0 03 00 0C */ sth r0, 0xc(r3) -/* 80325D98 B0 03 00 0E */ sth r0, 0xe(r3) -/* 80325D9C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/indexToPtr__12J3DModelDataFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/indexToPtr__12J3DModelDataFv.s deleted file mode 100644 index ac7bb7a16c..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/indexToPtr__12J3DModelDataFv.s +++ /dev/null @@ -1,55 +0,0 @@ -lbl_80325EC8: -/* 80325EC8 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 80325ECC 7C 08 02 A6 */ mflr r0 -/* 80325ED0 90 01 00 34 */ stw r0, 0x34(r1) -/* 80325ED4 39 61 00 30 */ addi r11, r1, 0x30 -/* 80325ED8 48 03 C2 FD */ bl _savegpr_27 -/* 80325EDC 7C 7B 1B 78 */ mr r27, r3 -/* 80325EE0 80 03 00 6C */ lwz r0, 0x6c(r3) -/* 80325EE4 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80325EE8 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80325EEC 90 03 00 58 */ stw r0, 0x58(r3) -/* 80325EF0 88 0D 90 6C */ lbz r0, data_804515EC(r13) -/* 80325EF4 7C 00 07 75 */ extsb. r0, r0 -/* 80325EF8 40 82 00 14 */ bne lbl_80325F0C -/* 80325EFC 48 01 77 F9 */ bl OSDisableInterrupts -/* 80325F00 90 6D 90 68 */ stw r3, sInterruptFlag(r13) -/* 80325F04 38 00 00 01 */ li r0, 1 -/* 80325F08 98 0D 90 6C */ stb r0, data_804515EC(r13) -lbl_80325F0C: -/* 80325F0C 48 01 AD B9 */ bl OSDisableScheduler -/* 80325F10 A3 FB 00 5C */ lhz r31, 0x5c(r27) -/* 80325F14 3B 80 00 00 */ li r28, 0 -/* 80325F18 3B C1 00 08 */ addi r30, r1, 8 -/* 80325F1C 48 00 00 40 */ b lbl_80325F5C -lbl_80325F20: -/* 80325F20 80 7B 00 60 */ lwz r3, 0x60(r27) -/* 80325F24 57 80 13 BA */ rlwinm r0, r28, 2, 0xe, 0x1d -/* 80325F28 7F A3 00 2E */ lwzx r29, r3, r0 -/* 80325F2C 80 BD 00 48 */ lwz r5, 0x48(r29) -/* 80325F30 38 61 00 08 */ addi r3, r1, 8 -/* 80325F34 80 85 00 00 */ lwz r4, 0(r5) -/* 80325F38 80 A5 00 08 */ lwz r5, 8(r5) -/* 80325F3C 48 03 B0 5D */ bl GDInitGDLObj -/* 80325F40 93 CD 94 00 */ stw r30, __GDCurrentDL(r13) -/* 80325F44 80 7D 00 2C */ lwz r3, 0x2c(r29) -/* 80325F48 81 83 00 00 */ lwz r12, 0(r3) -/* 80325F4C 81 8C 00 3C */ lwz r12, 0x3c(r12) -/* 80325F50 7D 89 03 A6 */ mtctr r12 -/* 80325F54 4E 80 04 21 */ bctrl -/* 80325F58 3B 9C 00 01 */ addi r28, r28, 1 -lbl_80325F5C: -/* 80325F5C 57 80 04 3E */ clrlwi r0, r28, 0x10 -/* 80325F60 7C 00 F8 40 */ cmplw r0, r31 -/* 80325F64 41 80 FF BC */ blt lbl_80325F20 -/* 80325F68 38 00 00 00 */ li r0, 0 -/* 80325F6C 90 0D 94 00 */ stw r0, __GDCurrentDL(r13) -/* 80325F70 48 01 AD 95 */ bl OSEnableScheduler -/* 80325F74 80 6D 90 68 */ lwz r3, sInterruptFlag(r13) -/* 80325F78 48 01 77 A5 */ bl OSRestoreInterrupts -/* 80325F7C 39 61 00 30 */ addi r11, r1, 0x30 -/* 80325F80 48 03 C2 A1 */ bl _restgpr_27 -/* 80325F84 80 01 00 34 */ lwz r0, 0x34(r1) -/* 80325F88 7C 08 03 A6 */ mtlr r0 -/* 80325F8C 38 21 00 30 */ addi r1, r1, 0x30 -/* 80325F90 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/makeSharedDL__12J3DModelDataFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/makeSharedDL__12J3DModelDataFv.s deleted file mode 100644 index a9ce1a594f..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/makeSharedDL__12J3DModelDataFv.s +++ /dev/null @@ -1,33 +0,0 @@ -lbl_80325F94: -/* 80325F94 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80325F98 7C 08 02 A6 */ mflr r0 -/* 80325F9C 90 01 00 24 */ stw r0, 0x24(r1) -/* 80325FA0 39 61 00 20 */ addi r11, r1, 0x20 -/* 80325FA4 48 03 C2 39 */ bl _savegpr_29 -/* 80325FA8 7C 7D 1B 78 */ mr r29, r3 -/* 80325FAC 80 03 00 6C */ lwz r0, 0x6c(r3) -/* 80325FB0 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80325FB4 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80325FB8 90 03 00 58 */ stw r0, 0x58(r3) -/* 80325FBC A3 FD 00 5C */ lhz r31, 0x5c(r29) -/* 80325FC0 3B C0 00 00 */ li r30, 0 -/* 80325FC4 48 00 00 24 */ b lbl_80325FE8 -lbl_80325FC8: -/* 80325FC8 80 7D 00 60 */ lwz r3, 0x60(r29) -/* 80325FCC 57 C0 13 BA */ rlwinm r0, r30, 2, 0xe, 0x1d -/* 80325FD0 7C 63 00 2E */ lwzx r3, r3, r0 -/* 80325FD4 81 83 00 00 */ lwz r12, 0(r3) -/* 80325FD8 81 8C 00 14 */ lwz r12, 0x14(r12) -/* 80325FDC 7D 89 03 A6 */ mtctr r12 -/* 80325FE0 4E 80 04 21 */ bctrl -/* 80325FE4 3B DE 00 01 */ addi r30, r30, 1 -lbl_80325FE8: -/* 80325FE8 57 C0 04 3E */ clrlwi r0, r30, 0x10 -/* 80325FEC 7C 00 F8 40 */ cmplw r0, r31 -/* 80325FF0 41 80 FF D8 */ blt lbl_80325FC8 -/* 80325FF4 39 61 00 20 */ addi r11, r1, 0x20 -/* 80325FF8 48 03 C2 31 */ bl _restgpr_29 -/* 80325FFC 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80326000 7C 08 03 A6 */ mtlr r0 -/* 80326004 38 21 00 20 */ addi r1, r1, 0x20 -/* 80326008 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/simpleCalcMaterial__12J3DModelDataFUsPA4_f.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/simpleCalcMaterial__12J3DModelDataFUsPA4_f.s deleted file mode 100644 index 0e4e13ed60..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/simpleCalcMaterial__12J3DModelDataFUsPA4_f.s +++ /dev/null @@ -1,56 +0,0 @@ -lbl_8032600C: -/* 8032600C 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80326010 7C 08 02 A6 */ mflr r0 -/* 80326014 90 01 00 24 */ stw r0, 0x24(r1) -/* 80326018 39 61 00 20 */ addi r11, r1, 0x20 -/* 8032601C 48 03 C1 C1 */ bl _savegpr_29 -/* 80326020 7C 7F 1B 78 */ mr r31, r3 -/* 80326024 7C 9E 23 78 */ mr r30, r4 -/* 80326028 7C BD 2B 78 */ mr r29, r5 -/* 8032602C 48 00 00 CD */ bl syncJ3DSysFlags__12J3DModelDataCFv -/* 80326030 80 7F 00 28 */ lwz r3, 0x28(r31) -/* 80326034 57 C0 13 BA */ rlwinm r0, r30, 2, 0xe, 0x1d -/* 80326038 7C 63 00 2E */ lwzx r3, r3, r0 -/* 8032603C 83 C3 00 58 */ lwz r30, 0x58(r3) -/* 80326040 3F E0 C0 00 */ lis r31, 0xc000 -/* 80326044 48 00 00 68 */ b lbl_803260AC -lbl_80326048: -/* 80326048 80 7E 00 3C */ lwz r3, 0x3c(r30) -/* 8032604C 7C 03 F8 40 */ cmplw r3, r31 -/* 80326050 40 80 00 0C */ bge lbl_8032605C -/* 80326054 7C 60 1B 78 */ mr r0, r3 -/* 80326058 48 00 00 08 */ b lbl_80326060 -lbl_8032605C: -/* 8032605C 38 00 00 00 */ li r0, 0 -lbl_80326060: -/* 80326060 28 00 00 00 */ cmplwi r0, 0 -/* 80326064 41 82 00 2C */ beq lbl_80326090 -/* 80326068 3C 00 C0 00 */ lis r0, 0xc000 -/* 8032606C 7C 03 00 40 */ cmplw r3, r0 -/* 80326070 40 80 00 08 */ bge lbl_80326078 -/* 80326074 48 00 00 08 */ b lbl_8032607C -lbl_80326078: -/* 80326078 38 60 00 00 */ li r3, 0 -lbl_8032607C: -/* 8032607C 7F C4 F3 78 */ mr r4, r30 -/* 80326080 81 83 00 00 */ lwz r12, 0(r3) -/* 80326084 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 80326088 7D 89 03 A6 */ mtctr r12 -/* 8032608C 4E 80 04 21 */ bctrl -lbl_80326090: -/* 80326090 7F C3 F3 78 */ mr r3, r30 -/* 80326094 7F A4 EB 78 */ mr r4, r29 -/* 80326098 81 9E 00 00 */ lwz r12, 0(r30) -/* 8032609C 81 8C 00 08 */ lwz r12, 8(r12) -/* 803260A0 7D 89 03 A6 */ mtctr r12 -/* 803260A4 4E 80 04 21 */ bctrl -/* 803260A8 83 DE 00 04 */ lwz r30, 4(r30) -lbl_803260AC: -/* 803260AC 28 1E 00 00 */ cmplwi r30, 0 -/* 803260B0 40 82 FF 98 */ bne lbl_80326048 -/* 803260B4 39 61 00 20 */ addi r11, r1, 0x20 -/* 803260B8 48 03 C1 71 */ bl _restgpr_29 -/* 803260BC 80 01 00 24 */ lwz r0, 0x24(r1) -/* 803260C0 7C 08 03 A6 */ mtlr r0 -/* 803260C4 38 21 00 20 */ addi r1, r1, 0x20 -/* 803260C8 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysFlags__12J3DModelDataCFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysFlags__12J3DModelDataCFv.s deleted file mode 100644 index 164012023c..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysFlags__12J3DModelDataCFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_803260F8: -/* 803260F8 80 03 00 08 */ lwz r0, 8(r3) -/* 803260FC 54 00 06 B5 */ rlwinm. r0, r0, 0, 0x1a, 0x1a -/* 80326100 41 82 00 1C */ beq lbl_8032611C -/* 80326104 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80326108 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 8032610C 80 03 00 34 */ lwz r0, 0x34(r3) -/* 80326110 64 00 40 00 */ oris r0, r0, 0x4000 -/* 80326114 90 03 00 34 */ stw r0, 0x34(r3) -/* 80326118 4E 80 00 20 */ blr -lbl_8032611C: -/* 8032611C 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80326120 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80326124 80 03 00 34 */ lwz r0, 0x34(r3) -/* 80326128 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 -/* 8032612C 90 03 00 34 */ stw r0, 0x34(r3) -/* 80326130 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysPointers__12J3DModelDataCFv.s b/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysPointers__12J3DModelDataCFv.s deleted file mode 100644 index 64c4021e4c..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysPointers__12J3DModelDataCFv.s +++ /dev/null @@ -1,12 +0,0 @@ -lbl_803260CC: -/* 803260CC 80 03 00 6C */ lwz r0, 0x6c(r3) -/* 803260D0 3C 80 80 43 */ lis r4, j3dSys@ha /* 0x80434AC8@ha */ -/* 803260D4 38 84 4A C8 */ addi r4, r4, j3dSys@l /* 0x80434AC8@l */ -/* 803260D8 90 04 00 58 */ stw r0, 0x58(r4) -/* 803260DC 80 03 00 A0 */ lwz r0, 0xa0(r3) -/* 803260E0 90 04 01 0C */ stw r0, 0x10c(r4) -/* 803260E4 80 03 00 A4 */ lwz r0, 0xa4(r3) -/* 803260E8 90 04 01 10 */ stw r0, 0x110(r4) -/* 803260EC 80 03 00 AC */ lwz r0, 0xac(r3) -/* 803260F0 90 04 01 14 */ stw r0, 0x114(r4) -/* 803260F4 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/hide__13J3DShapeTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DShapeTable/hide__13J3DShapeTableFv.s deleted file mode 100644 index 74f4c77ddb..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/hide__13J3DShapeTableFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_803258A0: -/* 803258A0 A0 03 00 04 */ lhz r0, 4(r3) -/* 803258A4 38 C0 00 00 */ li r6, 0 -/* 803258A8 48 00 00 20 */ b lbl_803258C8 -lbl_803258AC: -/* 803258AC 80 A3 00 08 */ lwz r5, 8(r3) -/* 803258B0 54 C4 13 BA */ rlwinm r4, r6, 2, 0xe, 0x1d -/* 803258B4 7C A5 20 2E */ lwzx r5, r5, r4 -/* 803258B8 80 85 00 0C */ lwz r4, 0xc(r5) -/* 803258BC 60 84 00 01 */ ori r4, r4, 1 -/* 803258C0 90 85 00 0C */ stw r4, 0xc(r5) -/* 803258C4 38 C6 00 01 */ addi r6, r6, 1 -lbl_803258C8: -/* 803258C8 54 C4 04 3E */ clrlwi r4, r6, 0x10 -/* 803258CC 7C 04 00 40 */ cmplw r4, r0 -/* 803258D0 41 80 FF DC */ blt lbl_803258AC -/* 803258D4 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData.s b/asm/JSystem/J3DGraphAnimator/J3DShapeTable/initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData.s deleted file mode 100644 index ccdea74784..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData.s +++ /dev/null @@ -1,30 +0,0 @@ -lbl_80325910: -/* 80325910 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80325914 7C 08 02 A6 */ mflr r0 -/* 80325918 90 01 00 24 */ stw r0, 0x24(r1) -/* 8032591C 39 61 00 20 */ addi r11, r1, 0x20 -/* 80325920 48 03 C8 B5 */ bl _savegpr_27 -/* 80325924 7C 7B 1B 78 */ mr r27, r3 -/* 80325928 7C 9C 23 78 */ mr r28, r4 -/* 8032592C 7C BD 2B 78 */ mr r29, r5 -/* 80325930 A3 E3 00 04 */ lhz r31, 4(r3) -/* 80325934 3B C0 00 00 */ li r30, 0 -/* 80325938 48 00 00 20 */ b lbl_80325958 -lbl_8032593C: -/* 8032593C 80 7B 00 08 */ lwz r3, 8(r27) -/* 80325940 57 C0 13 BA */ rlwinm r0, r30, 2, 0xe, 0x1d -/* 80325944 7C 63 00 2E */ lwzx r3, r3, r0 -/* 80325948 93 83 00 50 */ stw r28, 0x50(r3) -/* 8032594C 93 A3 00 4C */ stw r29, 0x4c(r3) -/* 80325950 4B FE F9 11 */ bl makeVcdVatCmd__8J3DShapeFv -/* 80325954 3B DE 00 01 */ addi r30, r30, 1 -lbl_80325958: -/* 80325958 57 C0 04 3E */ clrlwi r0, r30, 0x10 -/* 8032595C 7C 00 F8 40 */ cmplw r0, r31 -/* 80325960 41 80 FF DC */ blt lbl_8032593C -/* 80325964 39 61 00 20 */ addi r11, r1, 0x20 -/* 80325968 48 03 C8 B9 */ bl _restgpr_27 -/* 8032596C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80325970 7C 08 03 A6 */ mtlr r0 -/* 80325974 38 21 00 20 */ addi r1, r1, 0x20 -/* 80325978 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/show__13J3DShapeTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DShapeTable/show__13J3DShapeTableFv.s deleted file mode 100644 index 9de33d6e83..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/show__13J3DShapeTableFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_803258D8: -/* 803258D8 A0 03 00 04 */ lhz r0, 4(r3) -/* 803258DC 38 C0 00 00 */ li r6, 0 -/* 803258E0 48 00 00 20 */ b lbl_80325900 -lbl_803258E4: -/* 803258E4 80 A3 00 08 */ lwz r5, 8(r3) -/* 803258E8 54 C4 13 BA */ rlwinm r4, r6, 2, 0xe, 0x1d -/* 803258EC 7C A5 20 2E */ lwzx r5, r5, r4 -/* 803258F0 80 85 00 0C */ lwz r4, 0xc(r5) -/* 803258F4 54 84 00 3C */ rlwinm r4, r4, 0, 0, 0x1e -/* 803258F8 90 85 00 0C */ stw r4, 0xc(r5) -/* 803258FC 38 C6 00 01 */ addi r6, r6, 1 -lbl_80325900: -/* 80325900 54 C4 04 3E */ clrlwi r4, r6, 0x10 -/* 80325904 7C 04 00 40 */ cmplw r4, r0 -/* 80325908 41 80 FF DC */ blt lbl_803258E4 -/* 8032590C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/sortVcdVatCmd__13J3DShapeTableFv.s b/asm/JSystem/J3DGraphAnimator/J3DShapeTable/sortVcdVatCmd__13J3DShapeTableFv.s deleted file mode 100644 index d766d4db2a..0000000000 --- a/asm/JSystem/J3DGraphAnimator/J3DShapeTable/sortVcdVatCmd__13J3DShapeTableFv.s +++ /dev/null @@ -1,45 +0,0 @@ -lbl_8032597C: -/* 8032597C 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 80325980 7C 08 02 A6 */ mflr r0 -/* 80325984 90 01 00 34 */ stw r0, 0x34(r1) -/* 80325988 39 61 00 30 */ addi r11, r1, 0x30 -/* 8032598C 48 03 C8 41 */ bl _savegpr_25 -/* 80325990 7C 79 1B 78 */ mr r25, r3 -/* 80325994 A3 83 00 04 */ lhz r28, 4(r3) -/* 80325998 3B 60 00 00 */ li r27, 0 -/* 8032599C 48 00 00 58 */ b lbl_803259F4 -lbl_803259A0: -/* 803259A0 3B 40 00 00 */ li r26, 0 -/* 803259A4 57 7F 04 3E */ clrlwi r31, r27, 0x10 -/* 803259A8 57 7E 13 BA */ rlwinm r30, r27, 2, 0xe, 0x1d -/* 803259AC 48 00 00 38 */ b lbl_803259E4 -lbl_803259B0: -/* 803259B0 80 99 00 08 */ lwz r4, 8(r25) -/* 803259B4 7C 7E 20 2E */ lwzx r3, r30, r4 -/* 803259B8 57 5D 13 BA */ rlwinm r29, r26, 2, 0xe, 0x1d -/* 803259BC 7C 84 E8 2E */ lwzx r4, r4, r29 -/* 803259C0 4B FE F5 9D */ bl isSameVcdVatCmd__8J3DShapeFP8J3DShape -/* 803259C4 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 803259C8 41 82 00 18 */ beq lbl_803259E0 -/* 803259CC 80 99 00 08 */ lwz r4, 8(r25) -/* 803259D0 7C 64 E8 2E */ lwzx r3, r4, r29 -/* 803259D4 80 03 00 2C */ lwz r0, 0x2c(r3) -/* 803259D8 7C 7E 20 2E */ lwzx r3, r30, r4 -/* 803259DC 90 03 00 2C */ stw r0, 0x2c(r3) -lbl_803259E0: -/* 803259E0 3B 5A 00 01 */ addi r26, r26, 1 -lbl_803259E4: -/* 803259E4 57 40 04 3E */ clrlwi r0, r26, 0x10 -/* 803259E8 7C 00 F8 40 */ cmplw r0, r31 -/* 803259EC 41 80 FF C4 */ blt lbl_803259B0 -/* 803259F0 3B 7B 00 01 */ addi r27, r27, 1 -lbl_803259F4: -/* 803259F4 57 60 04 3E */ clrlwi r0, r27, 0x10 -/* 803259F8 7C 00 E0 40 */ cmplw r0, r28 -/* 803259FC 41 80 FF A4 */ blt lbl_803259A0 -/* 80325A00 39 61 00 30 */ addi r11, r1, 0x30 -/* 80325A04 48 03 C8 15 */ bl _restgpr_25 -/* 80325A08 80 01 00 34 */ lwz r0, 0x34(r1) -/* 80325A0C 7C 08 03 A6 */ mtlr r0 -/* 80325A10 38 21 00 30 */ addi r1, r1, 0x30 -/* 80325A14 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__12J3DMatPacketFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/__ct__12J3DMatPacketFv.s deleted file mode 100644 index 1f6a2f6e5d..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__12J3DMatPacketFv.s +++ /dev/null @@ -1,24 +0,0 @@ -lbl_80312948: -/* 80312948 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8031294C 7C 08 02 A6 */ mflr r0 -/* 80312950 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312954 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312958 7C 7F 1B 78 */ mr r31, r3 -/* 8031295C 4B FF FE 1D */ bl __ct__13J3DDrawPacketFv -/* 80312960 3C 60 80 3D */ lis r3, __vt__12J3DMatPacket@ha /* 0x803CD954@ha */ -/* 80312964 38 03 D9 54 */ addi r0, r3, __vt__12J3DMatPacket@l /* 0x803CD954@l */ -/* 80312968 90 1F 00 00 */ stw r0, 0(r31) -/* 8031296C 38 60 00 00 */ li r3, 0 -/* 80312970 90 7F 00 28 */ stw r3, 0x28(r31) -/* 80312974 90 7F 00 2C */ stw r3, 0x2c(r31) -/* 80312978 90 7F 00 30 */ stw r3, 0x30(r31) -/* 8031297C 38 00 FF FF */ li r0, -1 -/* 80312980 90 1F 00 34 */ stw r0, 0x34(r31) -/* 80312984 90 7F 00 38 */ stw r3, 0x38(r31) -/* 80312988 90 7F 00 3C */ stw r3, 0x3c(r31) -/* 8031298C 7F E3 FB 78 */ mr r3, r31 -/* 80312990 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312994 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312998 7C 08 03 A6 */ mtlr r0 -/* 8031299C 38 21 00 10 */ addi r1, r1, 0x10 -/* 803129A0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__13J3DDrawPacketFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/__ct__13J3DDrawPacketFv.s deleted file mode 100644 index 47147f96a8..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__13J3DDrawPacketFv.s +++ /dev/null @@ -1,15 +0,0 @@ -lbl_80312778: -/* 80312778 3C 80 80 3D */ lis r4, __vt__9J3DPacket@ha /* 0x803CD97C@ha */ -/* 8031277C 38 04 D9 7C */ addi r0, r4, __vt__9J3DPacket@l /* 0x803CD97C@l */ -/* 80312780 90 03 00 00 */ stw r0, 0(r3) -/* 80312784 38 A0 00 00 */ li r5, 0 -/* 80312788 90 A3 00 04 */ stw r5, 4(r3) -/* 8031278C 90 A3 00 08 */ stw r5, 8(r3) -/* 80312790 90 A3 00 0C */ stw r5, 0xc(r3) -/* 80312794 3C 80 80 3D */ lis r4, __vt__13J3DDrawPacket@ha /* 0x803CD968@ha */ -/* 80312798 38 04 D9 68 */ addi r0, r4, __vt__13J3DDrawPacket@l /* 0x803CD968@l */ -/* 8031279C 90 03 00 00 */ stw r0, 0(r3) -/* 803127A0 90 A3 00 10 */ stw r5, 0x10(r3) -/* 803127A4 90 A3 00 20 */ stw r5, 0x20(r3) -/* 803127A8 90 A3 00 24 */ stw r5, 0x24(r3) -/* 803127AC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__14J3DShapePacketFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/__ct__14J3DShapePacketFv.s deleted file mode 100644 index f3c8e9c9bf..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/__ct__14J3DShapePacketFv.s +++ /dev/null @@ -1,22 +0,0 @@ -lbl_80312B20: -/* 80312B20 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80312B24 7C 08 02 A6 */ mflr r0 -/* 80312B28 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312B2C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312B30 7C 7F 1B 78 */ mr r31, r3 -/* 80312B34 4B FF FC 45 */ bl __ct__13J3DDrawPacketFv -/* 80312B38 3C 60 80 3D */ lis r3, __vt__14J3DShapePacket@ha /* 0x803CD940@ha */ -/* 80312B3C 38 03 D9 40 */ addi r0, r3, __vt__14J3DShapePacket@l /* 0x803CD940@l */ -/* 80312B40 90 1F 00 00 */ stw r0, 0(r31) -/* 80312B44 38 00 00 00 */ li r0, 0 -/* 80312B48 90 1F 00 28 */ stw r0, 0x28(r31) -/* 80312B4C 90 1F 00 2C */ stw r0, 0x2c(r31) -/* 80312B50 90 1F 00 30 */ stw r0, 0x30(r31) -/* 80312B54 90 1F 00 34 */ stw r0, 0x34(r31) -/* 80312B58 90 1F 00 38 */ stw r0, 0x38(r31) -/* 80312B5C 7F E3 FB 78 */ mr r3, r31 -/* 80312B60 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312B64 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312B68 7C 08 03 A6 */ mtlr r0 -/* 80312B6C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312B70 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/__dt__12J3DMatPacketFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/__dt__12J3DMatPacketFv.s deleted file mode 100644 index c1dbbe7164..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/__dt__12J3DMatPacketFv.s +++ /dev/null @@ -1,26 +0,0 @@ -lbl_803129A4: -/* 803129A4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 803129A8 7C 08 02 A6 */ mflr r0 -/* 803129AC 90 01 00 14 */ stw r0, 0x14(r1) -/* 803129B0 93 E1 00 0C */ stw r31, 0xc(r1) -/* 803129B4 93 C1 00 08 */ stw r30, 8(r1) -/* 803129B8 7C 7E 1B 79 */ or. r30, r3, r3 -/* 803129BC 7C 9F 23 78 */ mr r31, r4 -/* 803129C0 41 82 00 28 */ beq lbl_803129E8 -/* 803129C4 3C 80 80 3D */ lis r4, __vt__12J3DMatPacket@ha /* 0x803CD954@ha */ -/* 803129C8 38 04 D9 54 */ addi r0, r4, __vt__12J3DMatPacket@l /* 0x803CD954@l */ -/* 803129CC 90 1E 00 00 */ stw r0, 0(r30) -/* 803129D0 38 80 00 00 */ li r4, 0 -/* 803129D4 4B FF FD DD */ bl __dt__13J3DDrawPacketFv -/* 803129D8 7F E0 07 35 */ extsh. r0, r31 -/* 803129DC 40 81 00 0C */ ble lbl_803129E8 -/* 803129E0 7F C3 F3 78 */ mr r3, r30 -/* 803129E4 4B FB C3 59 */ bl __dl__FPv -lbl_803129E8: -/* 803129E8 7F C3 F3 78 */ mr r3, r30 -/* 803129EC 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 803129F0 83 C1 00 08 */ lwz r30, 8(r1) -/* 803129F4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 803129F8 7C 08 03 A6 */ mtlr r0 -/* 803129FC 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312A00 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/__dt__14J3DShapePacketFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/__dt__14J3DShapePacketFv.s deleted file mode 100644 index ea49f8a537..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/__dt__14J3DShapePacketFv.s +++ /dev/null @@ -1,26 +0,0 @@ -lbl_80312B74: -/* 80312B74 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80312B78 7C 08 02 A6 */ mflr r0 -/* 80312B7C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312B80 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312B84 93 C1 00 08 */ stw r30, 8(r1) -/* 80312B88 7C 7E 1B 79 */ or. r30, r3, r3 -/* 80312B8C 7C 9F 23 78 */ mr r31, r4 -/* 80312B90 41 82 00 28 */ beq lbl_80312BB8 -/* 80312B94 3C 80 80 3D */ lis r4, __vt__14J3DShapePacket@ha /* 0x803CD940@ha */ -/* 80312B98 38 04 D9 40 */ addi r0, r4, __vt__14J3DShapePacket@l /* 0x803CD940@l */ -/* 80312B9C 90 1E 00 00 */ stw r0, 0(r30) -/* 80312BA0 38 80 00 00 */ li r4, 0 -/* 80312BA4 4B FF FC 0D */ bl __dt__13J3DDrawPacketFv -/* 80312BA8 7F E0 07 35 */ extsh. r0, r31 -/* 80312BAC 40 81 00 0C */ ble lbl_80312BB8 -/* 80312BB0 7F C3 F3 78 */ mr r3, r30 -/* 80312BB4 4B FB C1 89 */ bl __dl__FPv -lbl_80312BB8: -/* 80312BB8 7F C3 F3 78 */ mr r3, r30 -/* 80312BBC 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312BC0 83 C1 00 08 */ lwz r30, 8(r1) -/* 80312BC4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312BC8 7C 08 03 A6 */ mtlr r0 -/* 80312BCC 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312BD0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/beginDL__17J3DDisplayListObjFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/beginDL__17J3DDisplayListObjFv.s deleted file mode 100644 index e90ca259cf..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/beginDL__17J3DDisplayListObjFv.s +++ /dev/null @@ -1,22 +0,0 @@ -lbl_80312644: -/* 80312644 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80312648 7C 08 02 A6 */ mflr r0 -/* 8031264C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312650 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312654 7C 7F 1B 78 */ mr r31, r3 -/* 80312658 4B FF FF AD */ bl swapBuffer__17J3DDisplayListObjFv -/* 8031265C 48 02 B0 99 */ bl OSDisableInterrupts -/* 80312660 90 6D 90 20 */ stw r3, sInterruptFlag__17J3DDisplayListObj(r13) -/* 80312664 3C 60 80 43 */ lis r3, sGDLObj__17J3DDisplayListObj@ha /* 0x80434C70@ha */ -/* 80312668 38 63 4C 70 */ addi r3, r3, sGDLObj__17J3DDisplayListObj@l /* 0x80434C70@l */ -/* 8031266C 80 9F 00 00 */ lwz r4, 0(r31) -/* 80312670 80 BF 00 0C */ lwz r5, 0xc(r31) -/* 80312674 48 04 E9 25 */ bl GDInitGDLObj -/* 80312678 3C 60 80 43 */ lis r3, sGDLObj__17J3DDisplayListObj@ha /* 0x80434C70@ha */ -/* 8031267C 38 03 4C 70 */ addi r0, r3, sGDLObj__17J3DDisplayListObj@l /* 0x80434C70@l */ -/* 80312680 90 0D 94 00 */ stw r0, __GDCurrentDL(r13) -/* 80312684 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312688 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8031268C 7C 08 03 A6 */ mtlr r0 -/* 80312690 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312694 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/beginPatch__17J3DDisplayListObjFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/beginPatch__17J3DDisplayListObjFv.s deleted file mode 100644 index d868ed80f5..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/beginPatch__17J3DDisplayListObjFv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_803126F4: -/* 803126F4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 803126F8 7C 08 02 A6 */ mflr r0 -/* 803126FC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312700 4B FF FF 45 */ bl beginDL__17J3DDisplayListObjFv -/* 80312704 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312708 7C 08 03 A6 */ mtlr r0 -/* 8031270C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312710 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/endDL__17J3DDisplayListObjFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/endDL__17J3DDisplayListObjFv.s deleted file mode 100644 index 8c8dc0dcf2..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/endDL__17J3DDisplayListObjFv.s +++ /dev/null @@ -1,24 +0,0 @@ -lbl_80312698: -/* 80312698 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8031269C 7C 08 02 A6 */ mflr r0 -/* 803126A0 90 01 00 14 */ stw r0, 0x14(r1) -/* 803126A4 93 E1 00 0C */ stw r31, 0xc(r1) -/* 803126A8 7C 7F 1B 78 */ mr r31, r3 -/* 803126AC 48 04 E9 31 */ bl GDPadCurr32 -/* 803126B0 80 6D 90 20 */ lwz r3, sInterruptFlag__17J3DDisplayListObj(r13) -/* 803126B4 48 02 B0 69 */ bl OSRestoreInterrupts -/* 803126B8 3C 60 80 43 */ lis r3, sGDLObj__17J3DDisplayListObj@ha /* 0x80434C70@ha */ -/* 803126BC 38 83 4C 70 */ addi r4, r3, sGDLObj__17J3DDisplayListObj@l /* 0x80434C70@l */ -/* 803126C0 80 64 00 00 */ lwz r3, 0(r4) -/* 803126C4 80 04 00 08 */ lwz r0, 8(r4) -/* 803126C8 7C 03 00 50 */ subf r0, r3, r0 -/* 803126CC 90 1F 00 08 */ stw r0, 8(r31) -/* 803126D0 48 04 E8 E1 */ bl GDFlushCurrToMem -/* 803126D4 38 00 00 00 */ li r0, 0 -/* 803126D8 90 0D 94 00 */ stw r0, __GDCurrentDL(r13) -/* 803126DC 80 7F 00 08 */ lwz r3, 8(r31) -/* 803126E0 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 803126E4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 803126E8 7C 08 03 A6 */ mtlr r0 -/* 803126EC 38 21 00 10 */ addi r1, r1, 0x10 -/* 803126F0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/endPatch__17J3DDisplayListObjFv.s b/asm/JSystem/J3DGraphBase/J3DPacket/endPatch__17J3DDisplayListObjFv.s deleted file mode 100644 index 080ad89d5a..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/endPatch__17J3DDisplayListObjFv.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_80312714: -/* 80312714 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80312718 7C 08 02 A6 */ mflr r0 -/* 8031271C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312720 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312724 7C 7F 1B 78 */ mr r31, r3 -/* 80312728 80 6D 90 20 */ lwz r3, sInterruptFlag__17J3DDisplayListObj(r13) -/* 8031272C 48 02 AF F1 */ bl OSRestoreInterrupts -/* 80312730 38 00 00 00 */ li r0, 0 -/* 80312734 90 0D 94 00 */ stw r0, __GDCurrentDL(r13) -/* 80312738 80 7F 00 08 */ lwz r3, 8(r31) -/* 8031273C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312740 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312744 7C 08 03 A6 */ mtlr r0 -/* 80312748 38 21 00 10 */ addi r1, r1, 0x10 -/* 8031274C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/isSame__12J3DMatPacketCFP12J3DMatPacket.s b/asm/JSystem/J3DGraphBase/J3DPacket/isSame__12J3DMatPacketCFP12J3DMatPacket.s deleted file mode 100644 index fc90b19820..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/isSame__12J3DMatPacketCFP12J3DMatPacket.s +++ /dev/null @@ -1,12 +0,0 @@ -lbl_80312A74: -/* 80312A74 38 A0 00 00 */ li r5, 0 -/* 80312A78 80 63 00 34 */ lwz r3, 0x34(r3) -/* 80312A7C 80 04 00 34 */ lwz r0, 0x34(r4) -/* 80312A80 7C 03 00 40 */ cmplw r3, r0 -/* 80312A84 40 82 00 10 */ bne lbl_80312A94 -/* 80312A88 54 60 0F FF */ rlwinm. r0, r3, 1, 0x1f, 0x1f -/* 80312A8C 40 82 00 08 */ bne lbl_80312A94 -/* 80312A90 38 A0 00 01 */ li r5, 1 -lbl_80312A94: -/* 80312A94 7C A3 2B 78 */ mr r3, r5 -/* 80312A98 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DPacket/newDifferedDisplayList__14J3DShapePacketFUl.s b/asm/JSystem/J3DGraphBase/J3DPacket/newDifferedDisplayList__14J3DShapePacketFUl.s deleted file mode 100644 index bd4a445872..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DPacket/newDifferedDisplayList__14J3DShapePacketFUl.s +++ /dev/null @@ -1,22 +0,0 @@ -lbl_80312DBC: -/* 80312DBC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80312DC0 7C 08 02 A6 */ mflr r0 -/* 80312DC4 90 01 00 14 */ stw r0, 0x14(r1) -/* 80312DC8 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80312DCC 7C 7F 1B 78 */ mr r31, r3 -/* 80312DD0 90 83 00 34 */ stw r4, 0x34(r3) -/* 80312DD4 4B FF FE 01 */ bl calcDifferedBufferSize__14J3DShapePacketFUl -/* 80312DD8 7C 64 1B 78 */ mr r4, r3 -/* 80312DDC 7F E3 FB 78 */ mr r3, r31 -/* 80312DE0 4B FF FA 2D */ bl newDisplayList__13J3DDrawPacketFUl -/* 80312DE4 2C 03 00 00 */ cmpwi r3, 0 -/* 80312DE8 41 82 00 08 */ beq lbl_80312DF0 -/* 80312DEC 48 00 00 08 */ b lbl_80312DF4 -lbl_80312DF0: -/* 80312DF0 38 60 00 00 */ li r3, 0 -lbl_80312DF4: -/* 80312DF4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80312DF8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80312DFC 7C 08 03 A6 */ mtlr r0 -/* 80312E00 38 21 00 10 */ addi r1, r1, 0x10 -/* 80312E04 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/__ct__13J3DVertexDataFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/__ct__13J3DVertexDataFv.s deleted file mode 100644 index a302bbe75c..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/__ct__13J3DVertexDataFv.s +++ /dev/null @@ -1,35 +0,0 @@ -lbl_80310EF8: -/* 80310EF8 38 A0 00 00 */ li r5, 0 -/* 80310EFC 90 A3 00 00 */ stw r5, 0(r3) -/* 80310F00 90 A3 00 04 */ stw r5, 4(r3) -/* 80310F04 90 A3 00 08 */ stw r5, 8(r3) -/* 80310F08 90 A3 00 0C */ stw r5, 0xc(r3) -/* 80310F0C 90 A3 00 10 */ stw r5, 0x10(r3) -/* 80310F10 90 A3 00 14 */ stw r5, 0x14(r3) -/* 80310F14 90 A3 00 18 */ stw r5, 0x18(r3) -/* 80310F18 90 A3 00 1C */ stw r5, 0x1c(r3) -/* 80310F1C 90 A3 00 20 */ stw r5, 0x20(r3) -/* 80310F20 7C A4 2B 78 */ mr r4, r5 -/* 80310F24 38 00 00 02 */ li r0, 2 -/* 80310F28 7C 09 03 A6 */ mtctr r0 -lbl_80310F2C: -/* 80310F2C 38 04 00 24 */ addi r0, r4, 0x24 -/* 80310F30 7C A3 01 2E */ stwx r5, r3, r0 -/* 80310F34 38 84 00 04 */ addi r4, r4, 4 -/* 80310F38 42 00 FF F4 */ bdnz lbl_80310F2C -/* 80310F3C 38 80 00 00 */ li r4, 0 -/* 80310F40 38 A0 00 00 */ li r5, 0 -/* 80310F44 38 00 00 08 */ li r0, 8 -/* 80310F48 7C 09 03 A6 */ mtctr r0 -lbl_80310F4C: -/* 80310F4C 38 04 00 2C */ addi r0, r4, 0x2c -/* 80310F50 7C A3 01 2E */ stwx r5, r3, r0 -/* 80310F54 38 84 00 04 */ addi r4, r4, 4 -/* 80310F58 42 00 FF F4 */ bdnz lbl_80310F4C -/* 80310F5C 38 80 00 00 */ li r4, 0 -/* 80310F60 98 83 00 4C */ stb r4, 0x4c(r3) -/* 80310F64 38 00 00 04 */ li r0, 4 -/* 80310F68 90 03 00 50 */ stw r0, 0x50(r3) -/* 80310F6C 98 83 00 54 */ stb r4, 0x54(r3) -/* 80310F70 90 03 00 58 */ stw r0, 0x58(r3) -/* 80310F74 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/__ct__14J3DDrawMtxDataFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/__ct__14J3DDrawMtxDataFv.s deleted file mode 100644 index 795cf4f0fe..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/__ct__14J3DDrawMtxDataFv.s +++ /dev/null @@ -1,6 +0,0 @@ -lbl_803115E0: -/* 803115E0 38 00 00 00 */ li r0, 0 -/* 803115E4 B0 03 00 00 */ sth r0, 0(r3) -/* 803115E8 90 03 00 04 */ stw r0, 4(r3) -/* 803115EC 90 03 00 08 */ stw r0, 8(r3) -/* 803115F0 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/__dt__14J3DDrawMtxDataFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/__dt__14J3DDrawMtxDataFv.s deleted file mode 100644 index 5171a9c3b7..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/__dt__14J3DDrawMtxDataFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_803115F4: -/* 803115F4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 803115F8 7C 08 02 A6 */ mflr r0 -/* 803115FC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80311600 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80311604 7C 7F 1B 79 */ or. r31, r3, r3 -/* 80311608 41 82 00 10 */ beq lbl_80311618 -/* 8031160C 7C 80 07 35 */ extsh. r0, r4 -/* 80311610 40 81 00 08 */ ble lbl_80311618 -/* 80311614 4B FB D7 29 */ bl __dl__FPv -lbl_80311618: -/* 80311618 7F E3 FB 78 */ mr r3, r31 -/* 8031161C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80311620 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80311624 7C 08 03 A6 */ mtlr r0 -/* 80311628 38 21 00 10 */ addi r1, r1, 0x10 -/* 8031162C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/__dt__15J3DVertexBufferFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/__dt__15J3DVertexBufferFv.s deleted file mode 100644 index 5cee1a11c7..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/__dt__15J3DVertexBufferFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_80311030: -/* 80311030 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80311034 7C 08 02 A6 */ mflr r0 -/* 80311038 90 01 00 14 */ stw r0, 0x14(r1) -/* 8031103C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80311040 7C 7F 1B 79 */ or. r31, r3, r3 -/* 80311044 41 82 00 10 */ beq lbl_80311054 -/* 80311048 7C 80 07 35 */ extsh. r0, r4 -/* 8031104C 40 81 00 08 */ ble lbl_80311054 -/* 80311050 4B FB DC ED */ bl __dl__FPv -lbl_80311054: -/* 80311054 7F E3 FB 78 */ mr r3, r31 -/* 80311058 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 8031105C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80311060 7C 08 03 A6 */ mtlr r0 -/* 80311064 38 21 00 10 */ addi r1, r1, 0x10 -/* 80311068 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxNrmArray__15J3DVertexBufferFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxNrmArray__15J3DVertexBufferFv.s deleted file mode 100644 index 28237ee16a..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxNrmArray__15J3DVertexBufferFv.s +++ /dev/null @@ -1,51 +0,0 @@ -lbl_8031152C: -/* 8031152C 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80311530 7C 08 02 A6 */ mflr r0 -/* 80311534 90 01 00 24 */ stw r0, 0x24(r1) -/* 80311538 39 61 00 20 */ addi r11, r1, 0x20 -/* 8031153C 48 05 0C A1 */ bl _savegpr_29 -/* 80311540 7C 7D 1B 78 */ mr r29, r3 -/* 80311544 80 03 00 24 */ lwz r0, 0x24(r3) -/* 80311548 28 00 00 00 */ cmplwi r0, 0 -/* 8031154C 41 82 00 18 */ beq lbl_80311564 -/* 80311550 80 1D 00 28 */ lwz r0, 0x28(r29) -/* 80311554 28 00 00 00 */ cmplwi r0, 0 -/* 80311558 41 82 00 0C */ beq lbl_80311564 -/* 8031155C 38 60 00 00 */ li r3, 0 -/* 80311560 48 00 00 68 */ b lbl_803115C8 -lbl_80311564: -/* 80311564 3B C0 00 00 */ li r30, 0 -/* 80311568 3B E0 00 00 */ li r31, 0 -lbl_8031156C: -/* 8031156C 2C 1E 00 00 */ cmpwi r30, 0 -/* 80311570 41 82 00 14 */ beq lbl_80311584 -/* 80311574 38 1F 00 24 */ addi r0, r31, 0x24 -/* 80311578 7C 1D 00 2E */ lwzx r0, r29, r0 -/* 8031157C 28 00 00 00 */ cmplwi r0, 0 -/* 80311580 40 82 00 34 */ bne lbl_803115B4 -lbl_80311584: -/* 80311584 80 7D 00 00 */ lwz r3, 0(r29) -/* 80311588 80 03 00 04 */ lwz r0, 4(r3) -/* 8031158C 1C 60 00 0C */ mulli r3, r0, 0xc -/* 80311590 38 80 00 20 */ li r4, 0x20 -/* 80311594 4B FB D7 59 */ bl __nwa__FUli -/* 80311598 38 1F 00 24 */ addi r0, r31, 0x24 -/* 8031159C 7C 7D 01 2E */ stwx r3, r29, r0 -/* 803115A0 7C 1D 00 2E */ lwzx r0, r29, r0 -/* 803115A4 28 00 00 00 */ cmplwi r0, 0 -/* 803115A8 40 82 00 0C */ bne lbl_803115B4 -/* 803115AC 38 60 00 04 */ li r3, 4 -/* 803115B0 48 00 00 18 */ b lbl_803115C8 -lbl_803115B4: -/* 803115B4 3B DE 00 01 */ addi r30, r30, 1 -/* 803115B8 2C 1E 00 02 */ cmpwi r30, 2 -/* 803115BC 3B FF 00 04 */ addi r31, r31, 4 -/* 803115C0 41 80 FF AC */ blt lbl_8031156C -/* 803115C4 38 60 00 00 */ li r3, 0 -lbl_803115C8: -/* 803115C8 39 61 00 20 */ addi r11, r1, 0x20 -/* 803115CC 48 05 0C 5D */ bl _restgpr_29 -/* 803115D0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 803115D4 7C 08 03 A6 */ mtlr r0 -/* 803115D8 38 21 00 20 */ addi r1, r1, 0x20 -/* 803115DC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxPosArray__15J3DVertexBufferFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxPosArray__15J3DVertexBufferFv.s deleted file mode 100644 index b5e9b7c48f..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxPosArray__15J3DVertexBufferFv.s +++ /dev/null @@ -1,51 +0,0 @@ -lbl_80311478: -/* 80311478 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8031147C 7C 08 02 A6 */ mflr r0 -/* 80311480 90 01 00 24 */ stw r0, 0x24(r1) -/* 80311484 39 61 00 20 */ addi r11, r1, 0x20 -/* 80311488 48 05 0D 55 */ bl _savegpr_29 -/* 8031148C 7C 7D 1B 78 */ mr r29, r3 -/* 80311490 80 03 00 1C */ lwz r0, 0x1c(r3) -/* 80311494 28 00 00 00 */ cmplwi r0, 0 -/* 80311498 41 82 00 18 */ beq lbl_803114B0 -/* 8031149C 80 1D 00 20 */ lwz r0, 0x20(r29) -/* 803114A0 28 00 00 00 */ cmplwi r0, 0 -/* 803114A4 41 82 00 0C */ beq lbl_803114B0 -/* 803114A8 38 60 00 00 */ li r3, 0 -/* 803114AC 48 00 00 68 */ b lbl_80311514 -lbl_803114B0: -/* 803114B0 3B C0 00 00 */ li r30, 0 -/* 803114B4 3B E0 00 00 */ li r31, 0 -lbl_803114B8: -/* 803114B8 2C 1E 00 00 */ cmpwi r30, 0 -/* 803114BC 41 82 00 14 */ beq lbl_803114D0 -/* 803114C0 38 1F 00 1C */ addi r0, r31, 0x1c -/* 803114C4 7C 1D 00 2E */ lwzx r0, r29, r0 -/* 803114C8 28 00 00 00 */ cmplwi r0, 0 -/* 803114CC 40 82 00 34 */ bne lbl_80311500 -lbl_803114D0: -/* 803114D0 80 7D 00 00 */ lwz r3, 0(r29) -/* 803114D4 80 03 00 00 */ lwz r0, 0(r3) -/* 803114D8 1C 60 00 0C */ mulli r3, r0, 0xc -/* 803114DC 38 80 00 20 */ li r4, 0x20 -/* 803114E0 4B FB D8 0D */ bl __nwa__FUli -/* 803114E4 38 1F 00 1C */ addi r0, r31, 0x1c -/* 803114E8 7C 7D 01 2E */ stwx r3, r29, r0 -/* 803114EC 7C 1D 00 2E */ lwzx r0, r29, r0 -/* 803114F0 28 00 00 00 */ cmplwi r0, 0 -/* 803114F4 40 82 00 0C */ bne lbl_80311500 -/* 803114F8 38 60 00 04 */ li r3, 4 -/* 803114FC 48 00 00 18 */ b lbl_80311514 -lbl_80311500: -/* 80311500 3B DE 00 01 */ addi r30, r30, 1 -/* 80311504 2C 1E 00 02 */ cmpwi r30, 2 -/* 80311508 3B FF 00 04 */ addi r31, r31, 4 -/* 8031150C 41 80 FF AC */ blt lbl_803114B8 -/* 80311510 38 60 00 00 */ li r3, 0 -lbl_80311514: -/* 80311514 39 61 00 20 */ addi r11, r1, 0x20 -/* 80311518 48 05 0D 11 */ bl _restgpr_29 -/* 8031151C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80311520 7C 08 03 A6 */ mtlr r0 -/* 80311524 38 21 00 20 */ addi r1, r1, 0x20 -/* 80311528 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxNrmArray__15J3DVertexBufferFUl.s b/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxNrmArray__15J3DVertexBufferFUl.s deleted file mode 100644 index 1bb89bada2..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxNrmArray__15J3DVertexBufferFUl.s +++ /dev/null @@ -1,79 +0,0 @@ -lbl_803111B0: -/* 803111B0 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 803111B4 7C 08 02 A6 */ mflr r0 -/* 803111B8 90 01 00 24 */ stw r0, 0x24(r1) -/* 803111BC 39 61 00 20 */ addi r11, r1, 0x20 -/* 803111C0 48 05 10 19 */ bl _savegpr_28 -/* 803111C4 7C 7F 1B 78 */ mr r31, r3 -/* 803111C8 54 80 07 FF */ clrlwi. r0, r4, 0x1f -/* 803111CC 41 82 00 78 */ beq lbl_80311244 -/* 803111D0 3B 80 00 00 */ li r28, 0 -/* 803111D4 3B C0 00 00 */ li r30, 0 -lbl_803111D8: -/* 803111D8 80 7F 00 00 */ lwz r3, 0(r31) -/* 803111DC 80 03 00 04 */ lwz r0, 4(r3) -/* 803111E0 1C 60 00 0C */ mulli r3, r0, 0xc -/* 803111E4 38 80 00 20 */ li r4, 0x20 -/* 803111E8 4B FB DB 05 */ bl __nwa__FUli -/* 803111EC 3B BE 00 0C */ addi r29, r30, 0xc -/* 803111F0 7C 7F E9 2E */ stwx r3, r31, r29 -/* 803111F4 7C 7F E8 2E */ lwzx r3, r31, r29 -/* 803111F8 28 03 00 00 */ cmplwi r3, 0 -/* 803111FC 40 82 00 0C */ bne lbl_80311208 -/* 80311200 38 60 00 04 */ li r3, 4 -/* 80311204 48 00 00 B4 */ b lbl_803112B8 -lbl_80311208: -/* 80311208 80 9F 00 00 */ lwz r4, 0(r31) -/* 8031120C 80 04 00 04 */ lwz r0, 4(r4) -/* 80311210 80 84 00 1C */ lwz r4, 0x1c(r4) -/* 80311214 1C A0 00 0C */ mulli r5, r0, 0xc -/* 80311218 4B CF 23 29 */ bl memcpy -/* 8031121C 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311220 80 03 00 04 */ lwz r0, 4(r3) -/* 80311224 7C 7F E8 2E */ lwzx r3, r31, r29 -/* 80311228 1C 80 00 0C */ mulli r4, r0, 0xc -/* 8031122C 48 02 A3 B1 */ bl DCStoreRange -/* 80311230 3B 9C 00 01 */ addi r28, r28, 1 -/* 80311234 2C 1C 00 02 */ cmpwi r28, 2 -/* 80311238 3B DE 00 04 */ addi r30, r30, 4 -/* 8031123C 41 80 FF 9C */ blt lbl_803111D8 -/* 80311240 48 00 00 74 */ b lbl_803112B4 -lbl_80311244: -/* 80311244 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311248 80 03 00 1C */ lwz r0, 0x1c(r3) -/* 8031124C 90 1F 00 0C */ stw r0, 0xc(r31) -/* 80311250 80 1F 00 10 */ lwz r0, 0x10(r31) -/* 80311254 28 00 00 00 */ cmplwi r0, 0 -/* 80311258 40 82 00 30 */ bne lbl_80311288 -/* 8031125C 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311260 80 03 00 04 */ lwz r0, 4(r3) -/* 80311264 1C 60 00 0C */ mulli r3, r0, 0xc -/* 80311268 38 80 00 20 */ li r4, 0x20 -/* 8031126C 4B FB DA 81 */ bl __nwa__FUli -/* 80311270 90 7F 00 10 */ stw r3, 0x10(r31) -/* 80311274 80 1F 00 10 */ lwz r0, 0x10(r31) -/* 80311278 28 00 00 00 */ cmplwi r0, 0 -/* 8031127C 40 82 00 0C */ bne lbl_80311288 -/* 80311280 38 60 00 04 */ li r3, 4 -/* 80311284 48 00 00 34 */ b lbl_803112B8 -lbl_80311288: -/* 80311288 80 7F 00 00 */ lwz r3, 0(r31) -/* 8031128C 80 03 00 04 */ lwz r0, 4(r3) -/* 80311290 80 83 00 1C */ lwz r4, 0x1c(r3) -/* 80311294 80 7F 00 10 */ lwz r3, 0x10(r31) -/* 80311298 1C A0 00 0C */ mulli r5, r0, 0xc -/* 8031129C 4B CF 22 A5 */ bl memcpy -/* 803112A0 80 7F 00 00 */ lwz r3, 0(r31) -/* 803112A4 80 03 00 04 */ lwz r0, 4(r3) -/* 803112A8 80 7F 00 10 */ lwz r3, 0x10(r31) -/* 803112AC 1C 80 00 0C */ mulli r4, r0, 0xc -/* 803112B0 48 02 A3 2D */ bl DCStoreRange -lbl_803112B4: -/* 803112B4 38 60 00 00 */ li r3, 0 -lbl_803112B8: -/* 803112B8 39 61 00 20 */ addi r11, r1, 0x20 -/* 803112BC 48 05 0F 69 */ bl _restgpr_28 -/* 803112C0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 803112C4 7C 08 03 A6 */ mtlr r0 -/* 803112C8 38 21 00 20 */ addi r1, r1, 0x20 -/* 803112CC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxPosArray__15J3DVertexBufferFUl.s b/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxPosArray__15J3DVertexBufferFUl.s deleted file mode 100644 index 675cfcdf58..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxPosArray__15J3DVertexBufferFUl.s +++ /dev/null @@ -1,79 +0,0 @@ -lbl_80311090: -/* 80311090 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80311094 7C 08 02 A6 */ mflr r0 -/* 80311098 90 01 00 24 */ stw r0, 0x24(r1) -/* 8031109C 39 61 00 20 */ addi r11, r1, 0x20 -/* 803110A0 48 05 11 39 */ bl _savegpr_28 -/* 803110A4 7C 7F 1B 78 */ mr r31, r3 -/* 803110A8 54 80 07 FF */ clrlwi. r0, r4, 0x1f -/* 803110AC 41 82 00 78 */ beq lbl_80311124 -/* 803110B0 3B 80 00 00 */ li r28, 0 -/* 803110B4 3B C0 00 00 */ li r30, 0 -lbl_803110B8: -/* 803110B8 80 7F 00 00 */ lwz r3, 0(r31) -/* 803110BC 80 03 00 00 */ lwz r0, 0(r3) -/* 803110C0 1C 60 00 0C */ mulli r3, r0, 0xc -/* 803110C4 38 80 00 20 */ li r4, 0x20 -/* 803110C8 4B FB DC 25 */ bl __nwa__FUli -/* 803110CC 3B BE 00 04 */ addi r29, r30, 4 -/* 803110D0 7C 7F E9 2E */ stwx r3, r31, r29 -/* 803110D4 7C 7F E8 2E */ lwzx r3, r31, r29 -/* 803110D8 28 03 00 00 */ cmplwi r3, 0 -/* 803110DC 40 82 00 0C */ bne lbl_803110E8 -/* 803110E0 38 60 00 04 */ li r3, 4 -/* 803110E4 48 00 00 B4 */ b lbl_80311198 -lbl_803110E8: -/* 803110E8 80 9F 00 00 */ lwz r4, 0(r31) -/* 803110EC 80 04 00 00 */ lwz r0, 0(r4) -/* 803110F0 80 84 00 18 */ lwz r4, 0x18(r4) -/* 803110F4 1C A0 00 0C */ mulli r5, r0, 0xc -/* 803110F8 4B CF 24 49 */ bl memcpy -/* 803110FC 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311100 80 03 00 00 */ lwz r0, 0(r3) -/* 80311104 7C 7F E8 2E */ lwzx r3, r31, r29 -/* 80311108 1C 80 00 0C */ mulli r4, r0, 0xc -/* 8031110C 48 02 A4 D1 */ bl DCStoreRange -/* 80311110 3B 9C 00 01 */ addi r28, r28, 1 -/* 80311114 2C 1C 00 02 */ cmpwi r28, 2 -/* 80311118 3B DE 00 04 */ addi r30, r30, 4 -/* 8031111C 41 80 FF 9C */ blt lbl_803110B8 -/* 80311120 48 00 00 74 */ b lbl_80311194 -lbl_80311124: -/* 80311124 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311128 80 03 00 18 */ lwz r0, 0x18(r3) -/* 8031112C 90 1F 00 04 */ stw r0, 4(r31) -/* 80311130 80 1F 00 08 */ lwz r0, 8(r31) -/* 80311134 28 00 00 00 */ cmplwi r0, 0 -/* 80311138 40 82 00 30 */ bne lbl_80311168 -/* 8031113C 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311140 80 03 00 00 */ lwz r0, 0(r3) -/* 80311144 1C 60 00 0C */ mulli r3, r0, 0xc -/* 80311148 38 80 00 20 */ li r4, 0x20 -/* 8031114C 4B FB DB A1 */ bl __nwa__FUli -/* 80311150 90 7F 00 08 */ stw r3, 8(r31) -/* 80311154 80 1F 00 08 */ lwz r0, 8(r31) -/* 80311158 28 00 00 00 */ cmplwi r0, 0 -/* 8031115C 40 82 00 0C */ bne lbl_80311168 -/* 80311160 38 60 00 04 */ li r3, 4 -/* 80311164 48 00 00 34 */ b lbl_80311198 -lbl_80311168: -/* 80311168 80 7F 00 00 */ lwz r3, 0(r31) -/* 8031116C 80 03 00 00 */ lwz r0, 0(r3) -/* 80311170 80 83 00 18 */ lwz r4, 0x18(r3) -/* 80311174 80 7F 00 08 */ lwz r3, 8(r31) -/* 80311178 1C A0 00 0C */ mulli r5, r0, 0xc -/* 8031117C 4B CF 23 C5 */ bl memcpy -/* 80311180 80 7F 00 00 */ lwz r3, 0(r31) -/* 80311184 80 03 00 00 */ lwz r0, 0(r3) -/* 80311188 80 7F 00 08 */ lwz r3, 8(r31) -/* 8031118C 1C 80 00 0C */ mulli r4, r0, 0xc -/* 80311190 48 02 A4 4D */ bl DCStoreRange -lbl_80311194: -/* 80311194 38 60 00 00 */ li r3, 0 -lbl_80311198: -/* 80311198 39 61 00 20 */ addi r11, r1, 0x20 -/* 8031119C 48 05 10 89 */ bl _restgpr_28 -/* 803111A0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 803111A4 7C 08 03 A6 */ mtlr r0 -/* 803111A8 38 21 00 20 */ addi r1, r1, 0x20 -/* 803111AC 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/init__15J3DVertexBufferFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/init__15J3DVertexBufferFv.s deleted file mode 100644 index bffd4fc4ad..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/init__15J3DVertexBufferFv.s +++ /dev/null @@ -1,23 +0,0 @@ -lbl_80310FD8: -/* 80310FD8 38 00 00 00 */ li r0, 0 -/* 80310FDC 90 03 00 00 */ stw r0, 0(r3) -/* 80310FE0 90 03 00 08 */ stw r0, 8(r3) -/* 80310FE4 90 03 00 04 */ stw r0, 4(r3) -/* 80310FE8 90 03 00 10 */ stw r0, 0x10(r3) -/* 80310FEC 90 03 00 0C */ stw r0, 0xc(r3) -/* 80310FF0 90 03 00 18 */ stw r0, 0x18(r3) -/* 80310FF4 90 03 00 14 */ stw r0, 0x14(r3) -/* 80310FF8 90 03 00 20 */ stw r0, 0x20(r3) -/* 80310FFC 90 03 00 1C */ stw r0, 0x1c(r3) -/* 80311000 90 03 00 28 */ stw r0, 0x28(r3) -/* 80311004 90 03 00 24 */ stw r0, 0x24(r3) -/* 80311008 90 03 00 2C */ stw r0, 0x2c(r3) -/* 8031100C 90 03 00 30 */ stw r0, 0x30(r3) -/* 80311010 90 03 00 34 */ stw r0, 0x34(r3) -/* 80311014 80 03 00 04 */ lwz r0, 4(r3) -/* 80311018 90 03 00 2C */ stw r0, 0x2c(r3) -/* 8031101C 80 03 00 0C */ lwz r0, 0xc(r3) -/* 80311020 90 03 00 30 */ stw r0, 0x30(r3) -/* 80311024 80 03 00 14 */ lwz r0, 0x14(r3) -/* 80311028 90 03 00 34 */ stw r0, 0x34(r3) -/* 8031102C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/setArray__15J3DVertexBufferCFv.s b/asm/JSystem/J3DGraphBase/J3DVertex/setArray__15J3DVertexBufferCFv.s deleted file mode 100644 index 2a455b69c5..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/setArray__15J3DVertexBufferCFv.s +++ /dev/null @@ -1,10 +0,0 @@ -lbl_8031106C: -/* 8031106C 80 03 00 2C */ lwz r0, 0x2c(r3) -/* 80311070 3C 80 80 43 */ lis r4, j3dSys@ha /* 0x80434AC8@ha */ -/* 80311074 38 84 4A C8 */ addi r4, r4, j3dSys@l /* 0x80434AC8@l */ -/* 80311078 90 04 01 0C */ stw r0, 0x10c(r4) -/* 8031107C 80 03 00 30 */ lwz r0, 0x30(r3) -/* 80311080 90 04 01 10 */ stw r0, 0x110(r4) -/* 80311084 80 03 00 34 */ lwz r0, 0x34(r3) -/* 80311088 90 04 01 14 */ stw r0, 0x114(r4) -/* 8031108C 4E 80 00 20 */ blr diff --git a/asm/JSystem/J3DGraphBase/J3DVertex/setVertexData__15J3DVertexBufferFP13J3DVertexData.s b/asm/JSystem/J3DGraphBase/J3DVertex/setVertexData__15J3DVertexBufferFP13J3DVertexData.s deleted file mode 100644 index 067e29e8c1..0000000000 --- a/asm/JSystem/J3DGraphBase/J3DVertex/setVertexData__15J3DVertexBufferFP13J3DVertexData.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_80310F78: -/* 80310F78 90 83 00 00 */ stw r4, 0(r3) -/* 80310F7C 80 04 00 18 */ lwz r0, 0x18(r4) -/* 80310F80 90 03 00 04 */ stw r0, 4(r3) -/* 80310F84 80 04 00 1C */ lwz r0, 0x1c(r4) -/* 80310F88 90 03 00 0C */ stw r0, 0xc(r3) -/* 80310F8C 80 04 00 24 */ lwz r0, 0x24(r4) -/* 80310F90 90 03 00 14 */ stw r0, 0x14(r3) -/* 80310F94 38 A0 00 00 */ li r5, 0 -/* 80310F98 90 A3 00 08 */ stw r5, 8(r3) -/* 80310F9C 90 A3 00 10 */ stw r5, 0x10(r3) -/* 80310FA0 90 A3 00 18 */ stw r5, 0x18(r3) -/* 80310FA4 80 04 00 18 */ lwz r0, 0x18(r4) -/* 80310FA8 90 03 00 1C */ stw r0, 0x1c(r3) -/* 80310FAC 80 04 00 1C */ lwz r0, 0x1c(r4) -/* 80310FB0 90 03 00 24 */ stw r0, 0x24(r3) -/* 80310FB4 90 A3 00 20 */ stw r5, 0x20(r3) -/* 80310FB8 90 A3 00 28 */ stw r5, 0x28(r3) -/* 80310FBC 80 03 00 04 */ lwz r0, 4(r3) -/* 80310FC0 90 03 00 2C */ stw r0, 0x2c(r3) -/* 80310FC4 80 03 00 0C */ lwz r0, 0xc(r3) -/* 80310FC8 90 03 00 30 */ stw r0, 0x30(r3) -/* 80310FCC 80 03 00 14 */ lwz r0, 0x14(r3) -/* 80310FD0 90 03 00 34 */ stw r0, 0x34(r3) -/* 80310FD4 4E 80 00 20 */ blr diff --git a/asm/d/d_resorce/setAlpha__FP12J3DModelData.s b/asm/d/d_resorce/setAlpha__FP12J3DModelData.s deleted file mode 100644 index af156e4c9e..0000000000 --- a/asm/d/d_resorce/setAlpha__FP12J3DModelData.s +++ /dev/null @@ -1,10 +0,0 @@ -lbl_8003A81C: -/* 8003A81C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8003A820 7C 08 02 A6 */ mflr r0 -/* 8003A824 90 01 00 14 */ stw r0, 0x14(r1) -/* 8003A828 38 63 00 58 */ addi r3, r3, 0x58 -/* 8003A82C 4B FF FB C5 */ bl setAlpha__FP16J3DMaterialTable -/* 8003A830 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8003A834 7C 08 03 A6 */ mtlr r0 -/* 8003A838 38 21 00 10 */ addi r1, r1, 0x10 -/* 8003A83C 4E 80 00 20 */ blr diff --git a/asm/d/d_resorce/setAlpha__FP16J3DMaterialTable.s b/asm/d/d_resorce/setAlpha__FP16J3DMaterialTable.s deleted file mode 100644 index b33108ffbd..0000000000 --- a/asm/d/d_resorce/setAlpha__FP16J3DMaterialTable.s +++ /dev/null @@ -1,44 +0,0 @@ -lbl_8003A3F0: -/* 8003A3F0 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8003A3F4 7C 08 02 A6 */ mflr r0 -/* 8003A3F8 90 01 00 24 */ stw r0, 0x24(r1) -/* 8003A3FC 39 61 00 20 */ addi r11, r1, 0x20 -/* 8003A400 48 32 7D D9 */ bl _savegpr_28 -/* 8003A404 7C 7C 1B 78 */ mr r28, r3 -/* 8003A408 3B A0 00 00 */ li r29, 0 -/* 8003A40C 48 00 00 5C */ b lbl_8003A468 -lbl_8003A410: -/* 8003A410 80 7C 00 08 */ lwz r3, 8(r28) -/* 8003A414 57 A0 13 BA */ rlwinm r0, r29, 2, 0xe, 0x1d -/* 8003A418 7C 63 00 2E */ lwzx r3, r3, r0 -/* 8003A41C 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 8003A420 28 1E 00 00 */ cmplwi r30, 0 -/* 8003A424 41 82 00 40 */ beq lbl_8003A464 -/* 8003A428 7F C3 F3 78 */ mr r3, r30 -/* 8003A42C 38 80 00 03 */ li r4, 3 -/* 8003A430 81 9E 00 00 */ lwz r12, 0(r30) -/* 8003A434 81 8C 00 68 */ lwz r12, 0x68(r12) -/* 8003A438 7D 89 03 A6 */ mtctr r12 -/* 8003A43C 4E 80 04 21 */ bctrl -/* 8003A440 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8003A444 41 82 00 20 */ beq lbl_8003A464 -/* 8003A448 7F C3 F3 78 */ mr r3, r30 -/* 8003A44C 81 9E 00 00 */ lwz r12, 0(r30) -/* 8003A450 81 8C 00 98 */ lwz r12, 0x98(r12) -/* 8003A454 7D 89 03 A6 */ mtctr r12 -/* 8003A458 4E 80 04 21 */ bctrl -/* 8003A45C 54 60 06 3E */ clrlwi r0, r3, 0x18 -/* 8003A460 B0 1F 00 06 */ sth r0, 6(r31) -lbl_8003A464: -/* 8003A464 3B BD 00 01 */ addi r29, r29, 1 -lbl_8003A468: -/* 8003A468 57 A3 04 3E */ clrlwi r3, r29, 0x10 -/* 8003A46C A0 1C 00 04 */ lhz r0, 4(r28) -/* 8003A470 7C 03 00 40 */ cmplw r3, r0 -/* 8003A474 41 80 FF 9C */ blt lbl_8003A410 -/* 8003A478 39 61 00 20 */ addi r11, r1, 0x20 -/* 8003A47C 48 32 7D A9 */ bl _restgpr_28 -/* 8003A480 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8003A484 7C 08 03 A6 */ mtlr r0 -/* 8003A488 38 21 00 20 */ addi r1, r1, 0x20 -/* 8003A48C 4E 80 00 20 */ blr diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index b11537f09f..bff2b307ae 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -1,8 +1,295 @@ #ifndef J3DANIMATION_H #define J3DANIMATION_H +#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h" +#include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "dolphin/gx/GXTexture.h" #include "dolphin/types.h" +class J3DAnmBase { +public: + virtual ~J3DAnmBase(); + + u8 getAttribute() const { return mAttribute; } + s16 getFrameMax() const { return mFrameMax; } + f32 getFrame() const { return mFrame; } + void setFrame(f32 frame) { mFrame = frame; } + +private: + /* 0x4 */ u8 mAttribute; + /* 0x6 */ s16 mFrameMax; + /* 0x8 */ f32 mFrame; +}; // Size: 0xC + +class J3DAnmTransform : public J3DAnmBase { +public: + /* 80328E40 */ J3DAnmTransform(s16, f32*, s16*, f32*); + + /* 8003B93C */ virtual ~J3DAnmTransform(); + /* 8003C77C */ virtual s32 getKind() const; + virtual void getTransform(u16, J3DTransformInfo*) const = 0; + +private: + /* 0x0C */ f32* field_0xc; + /* 0x10 */ s16* field_0x10; + /* 0x14 */ f32* field_0x14; + /* 0x18 */ s16 field_0x18; + /* 0x1A */ s16 field_0x1a; + /* 0x1C */ s16 field_0x1c; + /* 0x1E */ s16 field_0x1e; +}; // Size: 0x20 + +class J3DAnmTransformKey : public J3DAnmTransform { + /* 80329A34 */ void calcTransform(f32, u16, J3DTransformInfo*) const; + + /* 8003B8D0 */ virtual ~J3DAnmTransformKey(); + /* 8003C800 */ virtual s32 getKind() const; + /* 8003C808 */ virtual void getTransform(u16, J3DTransformInfo*) const; + +private: + /* 0x20 */ int field_0x20; + /* 0x24 */ int field_0x24; +}; // Size: 0x28 + +class J3DAnmTransformFull : public J3DAnmTransform { + /* 8032C2AC */ virtual ~J3DAnmTransformFull(); + /* 8032C318 */ virtual s32 getKind() const; + /* 80328E90 */ virtual void getTransform(u16, J3DTransformInfo*) const; + +private: + /* 0x20 */ int field_0x20; +}; // Size: 0x24 + +class J3DAnmTransformFullWithLerp : public J3DAnmTransformFull { + /* 8032C228 */ virtual ~J3DAnmTransformFullWithLerp(); + /* 8032C2A4 */ virtual s32 getKind() const; + /* 803291F0 */ virtual void getTransform(u16, J3DTransformInfo*) const; +}; // Size: 0x24 + +struct J3DTextureSRTInfo; +struct J3DModelData; +struct J3DMaterialTable; +struct J3DAnmKeyTableBase {}; + +class J3DAnmTextureSRTKey : public J3DAnmBase { +public: + /* 80329E5C */ J3DAnmTextureSRTKey(); + /* 80329F14 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const; + /* 8032B0C0 */ void searchUpdateMaterialID(J3DMaterialTable*); + /* 8032B1D4 */ void searchUpdateMaterialID(J3DModelData*); + + /* 8032C198 */ virtual ~J3DAnmTextureSRTKey(); + /* 8032C220 */ virtual s32 getKind() const; + + void getTransform(u16 param_0, J3DTextureSRTInfo* pSRTInfo) const { + calcTransform(getFrame(), param_0, pSRTInfo); + } + +private: + /* 0x0C */ int field_0xc; + /* 0x10 */ int field_0x10; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ u16 field_0x18; + /* 0x1A */ u16 field_0x1a; + /* 0x1C */ int field_0x1c; + /* 0x20 */ int field_0x20; + /* 0x24 */ int field_0x24; + /* 0x28 */ u8 mUpdateTexMtxID[4]; + /* 0x2C */ u16 mUpdateMaterialID[2]; + /* 0x30 */ JUTNameTab field_0x30; + /* 0x40 */ int field_0x40; + /* 0x44 */ u16 field_0x44; + /* 0x46 */ u16 field_0x46; + /* 0x48 */ u16 field_0x48; + /* 0x4A */ u16 field_0x4a; + /* 0x4C */ int field_0x4c; + /* 0x50 */ int field_0x50; + /* 0x54 */ int field_0x54; + /* 0x58 */ int field_0x58; + /* 0x5C */ u8 field_0x5c[4]; + /* 0x60 */ u16 field_0x60[2]; + /* 0x64 */ JUTNameTab field_0x64; + /* 0x74 */ u8 field_0x74[4]; + /* 0x78 */ u32 mTexMtxCalcType; +}; // Size: 0x7C + +class J3DAnmTexPattern : public J3DAnmBase { +public: + /* 8032AED8 */ J3DAnmTexPattern(); + /* 8032AF50 */ void getTexNo(u16, u16*) const; + /* 8032B004 */ void searchUpdateMaterialID(J3DMaterialTable*); + /* 8032B09C */ void searchUpdateMaterialID(J3DModelData*); + + /* 8032BD20 */ virtual ~J3DAnmTexPattern(); + /* 8032BD94 */ virtual s32 getKind() const; + +private: + /* 0x0C */ void* field_0xc; + /* 0x10 */ void* mAnmTable; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 mUpdateMaterialNum; + /* 0x18 */ void* field_0x18; + /* 0x1C */ JUTNameTab field_0x1c; +}; // Size: 0x2C + +class J3DAnmTevRegKey : public J3DAnmBase { +public: + /* 8032AE18 */ J3DAnmTevRegKey(); + /* 8032B1F8 */ void getTevColorReg(u16, _GXColorS10*) const; + /* 8032B4BC */ void getTevKonstReg(u16, _GXColor*) const; + /* 8032B780 */ void searchUpdateMaterialID(J3DMaterialTable*); + /* 8032B87C */ void searchUpdateMaterialID(J3DModelData*); + + /* 8032BD9C */ virtual ~J3DAnmTevRegKey(); + /* 8032BE24 */ virtual s32 getKind() const; + +private: + /* 0x0C */ u16 mCRegUpdateMaterialNum; + /* 0x0E */ u16 mKRegUpdateMaterialNum; + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ u16 field_0x18; + /* 0x1A */ u16 field_0x1a; + /* 0x1C */ u16 field_0x1c; + /* 0x1E */ u16 field_0x1e; + /* 0x20 */ u16 mCRegUpdateMaterialID[20]; + /* 0x34 */ u16 mKRegUpdateMaterialID[20]; + /* 0x48 */ void* field_0x48; + /* 0x4C */ void* field_0x4c; + /* 0x50 */ int field_0x50; + /* 0x54 */ int field_0x54; + /* 0x58 */ int field_0x58; + /* 0x5C */ int field_0x5c; + /* 0x60 */ int field_0x60; + /* 0x64 */ int field_0x64; + /* 0x68 */ int field_0x68; + /* 0x6C */ int field_0x6c; +}; // Size: 0x70 + +class J3DAnmColor : public J3DAnmBase { +public: + /* 8032A828 */ J3DAnmColor(); + /* 8032A8A4 */ void searchUpdateMaterialID(J3DMaterialTable*); + + /* 8032BCAC */ virtual ~J3DAnmColor(); + /* 8032BF44 */ virtual bool getKind() const; + /* 8032BF4C */ virtual void getColor(u16, _GXColor*) const; + + u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; } + bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; } + u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; } + +private: + /* 0x0C */ u16 field_0xc; + /* 0x0E */ u16 field_0xe; + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12; + /* 0x14 */ u16 mUpdateMaterialNum; + /* 0x18 */ u16* mUpdateMaterialID; + /* 0x1C */ JUTNameTab field_0x1c; +}; // Size: 0x2C + +class J3DAnmColorKey : public J3DAnmColor { +public: + /* 8032AB00 */ J3DAnmColorKey(); + + /* 8032BE2C */ virtual ~J3DAnmColorKey(); + /* 8032BEB0 */ virtual s32 getKind() const; + /* 8032AB54 */ virtual void getColor(u16, _GXColor*) const; + +private: + /* 0x2C */ int field_0x2c; + /* 0x30 */ int field_0x30; + /* 0x34 */ int field_0x34; + /* 0x38 */ int field_0x38; + /* 0x3C */ int field_0x3c; +}; + +class J3DAnmColorFull : public J3DAnmColor { +public: + /* 8032AB00 */ J3DAnmColorFull(); + + /* 8032BE2C */ virtual ~J3DAnmColorFull(); + /* 8032BEB0 */ virtual s32 getKind() const; + /* 8032AB54 */ virtual void getColor(u16, _GXColor*) const; + +private: + /* 0x2C */ int field_0x2c; + /* 0x30 */ int field_0x30; + /* 0x34 */ int field_0x34; + /* 0x38 */ int field_0x38; + /* 0x3C */ int field_0x3c; +}; + +class J3DAnmVtxColor : public J3DAnmBase { +public: + J3DAnmVtxColor(); + + virtual ~J3DAnmVtxColor(); + virtual s32 getKind() const; + virtual void getColor(u8, u16, _GXColor*) const; + +private: + /* 0x0C */ s16 mAnmTableNum[2]; + /* 0x10 */ int mAnmVtxColorIndexData[2]; +}; // Size: 0x18 + +class J3DAnmVtxColorKey : public J3DAnmVtxColor { +public: + /* 8032A4E0 */ J3DAnmVtxColorKey(); + + /* 8032BF50 */ virtual ~J3DAnmVtxColorKey(); + /* 8032BFBC */ virtual s32 getKind() const; + /* 8032A53C */ virtual void getColor(u8, u16, _GXColor*) const; + +private: + /* 0x18 */ int field_0x18[2]; +}; + +class J3DAnmVtxColorFull : public J3DAnmVtxColor { + /* 8032A30C */ J3DAnmVtxColorFull(); + + /* 8032BFC4 */ virtual ~J3DAnmVtxColorFull(); + /* 8032C030 */ virtual s32 getKind() const; + /* 8032A368 */ virtual void getColor(u8, u16, _GXColor*) const; + +private: + /* 0x18 */ int field_0x18[2]; +}; + +class J3DAnmCluster : public J3DAnmBase { +public: + /* 8032BCAC */ virtual ~J3DAnmCluster(); + /* 8032BF44 */ virtual s32 getKind() const; + /* 8032BF4C */ virtual void getWeight(u16) const; + +private: + /* 0x0C */ f32* field_0xc; +}; // Size: 0x10 + +class J3DAnmClusterFull : public J3DAnmCluster { +public: + /* 8032BCAC */ virtual ~J3DAnmClusterFull(); + /* 8032BF44 */ virtual s32 getKind() const; + /* 8032BF4C */ virtual void getWeight(u16) const; + +private: + /* 0x10 */ int field_0x10; +}; + +class J3DAnmClusterKey : public J3DAnmCluster { +public: + /* 8032C044 */ virtual ~J3DAnmClusterKey(); + /* 8032C0B0 */ virtual s32 getKind() const; + /* 8032A218 */ virtual void getWeight(u16) const; + +private: + /* 0x10 */ int field_0x10; +}; + class J3DFrameCtrl { public: J3DFrameCtrl() { this->init(0); } @@ -11,26 +298,25 @@ public: void update(); virtual ~J3DFrameCtrl() {} - float getRate() const { return mRate; } - void setAttribute(u8 pAttr) { mAttribute = pAttr; } - void setEnd(s16 pEnd) { mEnd = pEnd; } - void setRate(float pRate) { mRate = pRate; } - void setStart(s16 pStart) { - mStart = pStart; - mFrame = pStart; + f32 getRate() const { return mRate; } + void setAttribute(u8 attr) { mAttribute = attr; } + void setEnd(s16 end) { mEnd = end; } + void setRate(f32 rate) { mRate = rate; } + void setStart(s16 start) { + mStart = start; + mFrame = start; } - void setFrame(float pFrame) { mFrame = pFrame; } - void setLoop(s16 pLoop) { mLoop = pLoop; } + void setFrame(f32 frame) { mFrame = frame; } + void setLoop(s16 loop) { mLoop = loop; } private: - /* vtable */; - u8 mAttribute; - bool mState; - s16 mStart; - s16 mEnd; - s16 mLoop; - float mRate; - float mFrame; -}; + /* 0x04 */ u8 mAttribute; + /* 0x05 */ bool mState; + /* 0x06 */ s16 mStart; + /* 0x08 */ s16 mEnd; + /* 0x0A */ s16 mLoop; + /* 0x0C */ f32 mRate; + /* 0x10 */ f32 mFrame; +}; // Size: 0x14 #endif /* J3DANIMATION_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DCluster.h b/include/JSystem/J3DGraphAnimator/J3DCluster.h index 1cac7865aa..3cf06bebd9 100644 --- a/include/JSystem/J3DGraphAnimator/J3DCluster.h +++ b/include/JSystem/J3DGraphAnimator/J3DCluster.h @@ -3,4 +3,22 @@ #include "dolphin/types.h" +struct J3DDeformer; + +struct J3DCluster { + /* 0x00 */ f32 field_0x0; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ int field_0xc; + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ u16 field_0x18[2]; + /* 0x1C */ int field_0x1c; + /* 0x20 */ J3DDeformer* mDeformer; +}; + +struct J3DClusterKey {}; + #endif /* J3DCLUSTER_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index 7fe5cc53b3..9cbf745d43 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -1,6 +1,87 @@ #ifndef J3DJOINT_H #define J3DJOINT_H +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "JSystem/J3DGraphBase/J3DTransform.h" #include "dolphin/types.h" +class J3DAnmTransform; +class J3DMtxBuffer; + +class J3DMtxCalc { +public: + /* 80325D1C */ void setMtxBuffer(J3DMtxBuffer*); + + /* 8000D948 */ virtual ~J3DMtxCalc(); + /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*); + /* 80014E9C */ virtual bool getAnmTransform(); + /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*); + /* 80014E94 */ virtual bool getAnmTransform(u8); + /* 80014EA4 */ virtual void setWeight(u8, f32); + /* 80014EA8 */ virtual void getWeight(u8) const; + virtual void init(Vec const&, Mtx*) = 0; + virtual void calc() = 0; + + static J3DMtxBuffer* getMtxBuffer() { return mMtxBuffer; } + static J3DJoint* getJoint() { return mJoint; } + + static J3DMtxBuffer* mMtxBuffer; + static J3DJoint* mJoint; +}; // Size: 0x4 + +class J3DJoint; +typedef int (*J3DJointCallBack)(J3DJoint*, int); + +class J3DJoint { +public: + /* 8032F13C */ void appendChild(J3DJoint*); + /* 8032F170 */ J3DJoint(); + /* 8032F254 */ void entryIn(); + /* 8032F3F8 */ void recursiveCalc(); + + J3DMaterial* getMesh() { return mMesh; } + u16 getJntNo() const { return mJntNo; } + u8 getScaleCompensate() const { return mScaleCompensate; } + J3DJoint* getYounger() { return mYounger; } + void setYounger(J3DJoint* pYounger) { mYounger = pYounger; } + + static J3DMtxCalc* mCurrentMtxCalc; + +private: + /* 0x00 */ void* field_0x0; + /* 0x04 */ J3DJointCallBack mCallBack; + /* 0x08 */ void* field_0x8; + /* 0x0C */ J3DJoint* mChild; + /* 0x10 */ J3DJoint* mYounger; + /* 0x14 */ u16 mJntNo; + /* 0x16 */ u8 mMtxType; + /* 0x17 */ u8 mScaleCompensate; + /* 0x18 */ J3DTransformInfo mTransformInfo; + /* 0x38 */ f32 field_0x38; + /* 0x3C */ Vec mMin; + /* 0x48 */ Vec mMax; + /* 0x54 */ J3DMtxCalc* mMtxCalc; + /* 0x58 */ J3DMaterial* mMesh; +}; // Size: 0x5C + +struct J3DMtxCalcJ3DSysInitMaya { + /* 8032ECAC */ static void init(Vec const&, f32 const (&)[3][4]); +}; + +struct J3DMtxCalcJ3DSysInitBasic { + /* 8032EC28 */ static void init(Vec const&, f32 const (&)[3][4]); +}; + +struct J3DMtxCalcCalcTransformSoftimage { + /* 8032EE50 */ static void calcTransform(J3DTransformInfo const&); +}; + +struct J3DMtxCalcCalcTransformMaya { + /* 8032EFBC */ static void calcTransform(J3DTransformInfo const&); +}; + +struct J3DMtxCalcCalcTransformBasic { + /* 8032ED30 */ static void calcTransform(J3DTransformInfo const&); +}; + #endif /* J3DJOINT_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h index 9837d7d382..006c930849 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -1,6 +1,56 @@ #ifndef J3DJOINTTREE_H #define J3DJOINTTREE_H +#include "JSystem/J3DGraphAnimator/J3DJoint.h" +#include "JSystem/JUtility/JUTNameTab.h" +#include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" +struct J3DModelHierarchy {}; +struct J3DMaterialTable; + +struct J3DDrawMtxData { + /* 803115E0 */ J3DDrawMtxData(); + /* 803115F4 */ ~J3DDrawMtxData(); + + /* 0x0 */ u16 mEntryNum; + /* 0x2 */ u16 mDrawFullWgtMtxNum; + /* 0x4 */ u8* mDrawMtxFlag; + /* 0x8 */ u16* mDrawMtxIndex; +}; // Size: 0xC + +class J3DShapeTable; + +class J3DJointTree { +public: + /* 80325A18 */ J3DJointTree(); + /* 80325A9C */ void makeHierarchy(J3DJoint*, J3DModelHierarchy const**, J3DMaterialTable*, + J3DShapeTable*); + /* 80325C00 */ void findImportantMtxIndex(); + + /* 80325CAC */ virtual void calc(J3DMtxBuffer*, Vec const&, f32 const (&)[3][4]); + /* 80325D24 */ virtual ~J3DJointTree(); + + u16 getWEvlpMtxNum() const { return mWEvlpMtxNum; } + J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; } + +private: + /* 0x04 */ J3DModelHierarchy* mHierarchy; + /* 0x08 */ u32 mFlags; + /* 0x0C */ u32 mModelDataType; + /* 0x10 */ J3DJoint* mRootNode; + /* 0x14 */ J3DMtxCalc* mBasicMtxCalc; + /* 0x18 */ J3DJoint** mJointNodePointer; + /* 0x1C */ u16 mJointNum; + /* 0x1E */ u16 mWEvlpMtxNum; + /* 0x20 */ u8 mWEvlpMixMtxNum; + /* 0x24 */ s32 mWEvlpMixIndex; + /* 0x28 */ s32 mWEvlpMixWeight; + /* 0x2C */ Mtx* mInvJointMtx; + /* 0x30 */ s32 mWEvlpImportantMtxIdx; + /* 0x34 */ J3DDrawMtxData mDrawMtxNum; + /* 0x40 */ u8 field_0x40[4]; + /* 0x44 */ JUTNameTab* mJointName; +}; // Size: 0x48 + #endif /* J3DJOINTTREE_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h index 943ae54965..191908b869 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h @@ -1,6 +1,135 @@ #ifndef J3DMATERIALANM_H #define J3DMATERIALANM_H +#include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "dolphin/types.h" +class J3DMatColorAnm { +public: + /* 8003B2B8 */ ~J3DMatColorAnm(); + /* 8003B2F4 */ J3DMatColorAnm(); + + void operator=(J3DMatColorAnm const& other) { + mAnmColor = other.mAnmColor; + field_0x0 = other.field_0x0; + mAnmFlag = other.mAnmFlag; + } + + void setAnmFlag(bool flag) { mAnmFlag = flag; } + bool getAnmFlag() const { return mAnmFlag; } + void calc(_GXColor* pColor) const { mAnmColor->getColor(field_0x0, pColor); } + +private: + /* 0x0 */ u16 field_0x0; + /* 0x2 */ u16 mAnmFlag; + /* 0x4 */ J3DAnmColor* mAnmColor; +}; // Size: 0x8 + +class J3DTexNoAnm { +public: + /* 8003B1F8 */ ~J3DTexNoAnm(); + /* 8003B240 */ J3DTexNoAnm(); + /* 8003C82C */ virtual void calc(u16*) const; + + void operator=(J3DTexNoAnm const& other) { + mAnmTexPattern = other.mAnmTexPattern; + field_0x4 = other.field_0x4; + mAnmFlag = other.mAnmFlag; + } + + void setAnmFlag(bool flag) { mAnmFlag = flag; } + bool getAnmFlag() const { return mAnmFlag; } + J3DAnmTexPattern* getAnmTexPattern() { return mAnmTexPattern; } + +private: + /* 0x4 */ u16 field_0x4; + /* 0x6 */ u16 mAnmFlag; + /* 0x8 */ J3DAnmTexPattern* mAnmTexPattern; +}; // Size: 0xC + +class J3DTexMtxAnm { +public: + /* 8003B264 */ ~J3DTexMtxAnm(); + /* 8003B2A0 */ J3DTexMtxAnm(); + + void operator=(J3DTexMtxAnm const& other) { + mAnmTransform = other.mAnmTransform; + field_0x0 = other.field_0x0; + mAnmFlag = other.mAnmFlag; + } + + void setAnmFlag(bool flag) { mAnmFlag = flag; } + void calc(J3DTextureSRTInfo* pSRTInfo) const { + mAnmTransform->getTransform(field_0x0, pSRTInfo); + } + bool getAnmFlag() const { return mAnmFlag; } + +private: + /* 0x0 */ u16 field_0x0; + /* 0x2 */ u16 mAnmFlag; + /* 0x4 */ J3DAnmTextureSRTKey* mAnmTransform; +}; // Size: 0x8 + +class J3DTevKColorAnm { +public: + /* 8003B150 */ ~J3DTevKColorAnm(); + /* 8003B18C */ J3DTevKColorAnm(); + + void operator=(J3DTevKColorAnm const& other) { + mAnmTevReg = other.mAnmTevReg; + field_0x0 = other.field_0x0; + mAnmFlag = other.mAnmFlag; + } + + void setAnmFlag(bool flag) { mAnmFlag = flag; } + bool getAnmFlag() const { return mAnmFlag; } + void calc(_GXColor* pColor) const { mAnmTevReg->getTevKonstReg(field_0x0, pColor); } + +private: + /* 0x0 */ u16 field_0x0; + /* 0x2 */ u16 mAnmFlag; + /* 0x4 */ J3DAnmTevRegKey* mAnmTevReg; +}; // Size: 0x8 + +class J3DTevColorAnm { +public: + /* 8003B1A4 */ ~J3DTevColorAnm(); + /* 8003B1E0 */ J3DTevColorAnm(); + + void operator=(J3DTevColorAnm const& other) { + mAnmTevReg = other.mAnmTevReg; + field_0x0 = other.field_0x0; + mAnmFlag = other.mAnmFlag; + } + + void setAnmFlag(bool flag) { mAnmFlag = flag; } + bool getAnmFlag() const { return mAnmFlag; } + void calc(_GXColorS10* pColor) const { mAnmTevReg->getTevColorReg(field_0x0, pColor); } + +private: + /* 0x0 */ u16 field_0x0; + /* 0x2 */ u16 mAnmFlag; + /* 0x4 */ J3DAnmTevRegKey* mAnmTevReg; +}; // Size: 0x8 + +class J3DMaterialAnm { +public: + /* 8032C320 */ void initialize(); + /* 8032C5A4 */ void setMatColorAnm(int, J3DMatColorAnm*); + /* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*); + /* 8032C624 */ void setTexNoAnm(int, J3DTexNoAnm*); + /* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*); + /* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*); + + /* 800A4820 */ virtual ~J3DMaterialAnm(); + /* 8032C3C4 */ virtual void calc(J3DMaterial*) const; + +private: + /* 0x04 */ J3DMatColorAnm mMatColorAnm[2]; + /* 0x14 */ J3DTexMtxAnm mTexMtxAnm[8]; + /* 0x54 */ J3DTexNoAnm mTexNoAnm[8]; + /* 0xB4 */ J3DTevColorAnm mTevColorAnm[4]; + /* 0xD4 */ J3DTevKColorAnm mTevKColorAnm[4]; +}; // Size: 0xF4 + #endif /* J3DMATERIALANM_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h index 59e8a0e581..9582221280 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h @@ -1,6 +1,47 @@ #ifndef J3DMATERIALATTACH_H #define J3DMATERIALATTACH_H +#include "JSystem/JUtility/JUTNameTab.h" #include "dolphin/types.h" +struct J3DMaterial; +struct J3DTexture; +struct J3DAnmColor; +struct J3DAnmTexPattern; +struct J3DAnmTextureSRTKey; +struct J3DAnmTevRegKey; + +class J3DMaterialTable { +public: + /* 8032F5A8 */ void clear(); + /* 8032F5D0 */ J3DMaterialTable(); + /* 8032F64C */ bool removeMatColorAnimator(J3DAnmColor*); + /* 8032F6F8 */ void removeTexNoAnimator(J3DAnmTexPattern*); + /* 8032F7B4 */ void removeTexMtxAnimator(J3DAnmTextureSRTKey*); + /* 8032F880 */ void removeTevRegAnimator(J3DAnmTevRegKey*); + /* 8032F9C0 */ void createTexMtxForAnimator(J3DAnmTextureSRTKey*); + /* 8032FAF4 */ void entryMatColorAnimator(J3DAnmColor*); + /* 8032FBC8 */ void entryTexNoAnimator(J3DAnmTexPattern*); + /* 8032FCC4 */ void entryTexMtxAnimator(J3DAnmTextureSRTKey*); + /* 8032FE70 */ void entryTevRegAnimator(J3DAnmTevRegKey*); + + /* 8032F604 */ virtual ~J3DMaterialTable(); + + J3DMaterial* getMaterialNodePointer(u16 idx) const { return mMaterialNodePointer[idx]; } + + J3DTexture* getTexture() const { return mTexture; } + + u16 getMaterialNum() const { return mMaterialNum; } + +private: + /* 0x04 */ u16 mMaterialNum; + /* 0x06 */ u16 mUniqueMatNum; + /* 0x08 */ J3DMaterial** mMaterialNodePointer; + /* 0x0C */ JUTNameTab* mMaterialName; + /* 0x10 */ u32 field_0x10; + /* 0x14 */ J3DTexture* mTexture; + /* 0x18 */ JUTNameTab* mTextureName; + /* 0x1C */ u16 field_0x1c; +}; // Size: 0x20 + #endif /* J3DMATERIALATTACH_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 6e3a8ca9b9..290f05fe66 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -2,63 +2,32 @@ #define J3DMODEL_H #include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h" +#include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" +#include "JSystem/J3DGraphBase/J3DPacket.h" +#include "JSystem/J3DGraphBase/J3DShape.h" +#include "JSystem/J3DGraphBase/J3DVertex.h" #include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" -class J3DModel; -struct J3DSkinDeform { - /* 8032C9B0 */ void initSkinInfo(J3DModelData*); - /* 8032CF44 */ void initMtxIndexArray(J3DModelData*); - /* 8032D378 */ void changeFastSkinDL(J3DModelData*); - /* 8032D738 */ void transformVtxPosNrm(J3DModelData*); - /* 8032DFDC */ void deform(J3DModel*); +enum J3DMdlFlag { + /* 0x4 */ J3DMdlFlag_SkinPosCpu = 0x4, + /* 0x8 */ J3DMdlFlag_SkinNrmCpu = 0x8, }; -struct J3DDeformData { - /* 8032E230 */ void offAllFlag(u32); - /* 8032E274 */ void deform(J3DModel*); -}; - -class J3DMtxBuffer { -public: - /* 80326214 */ void initialize(); - /* 80326258 */ void create(J3DModelData*, u32); - /* 803268D4 */ void calcWeightEnvelopeMtx(); - /* 80326ACC */ void calcDrawMtx(u32, Vec const&, f32 const (&)[3][4]); - /* 80326D3C */ void calcNrmMtx(); - /* 80326EF0 */ void calcBBoardMtx(); - /* 803283B4 */ ~J3DMtxBuffer(); - - Mtx* getAnmMtx(int p1) { - Mtx* tmp = mMatrices[0]; - return tmp + (p1); - } - - /* 0x00 */ void* mJointTree; - /* 0x04 */ u32 field_0x4; - /* 0x08 */ u32 field_0x8; - /* 0x0C */ Mtx* mMatrices[5]; -}; - -class J3DMtxBuffer; -class J3DVertexBuffer; -class J3DMatPacket; -class J3DShapePacket; -class J3DVtxColorCalc; - class J3DModel { public: /* 800CFFF4 */ void setBaseTRMtx(f32 (*)[4]); /* 80327100 */ void initialize(); - /* 80327184 */ void entryModelData(J3DModelData*, u32, u32); - /* 80327300 */ void createShapePacket(J3DModelData*); - /* 803273CC */ void createMatPacket(J3DModelData*, u32); + /* 80327184 */ s32 entryModelData(J3DModelData*, u32, u32); + /* 80327300 */ s32 createShapePacket(J3DModelData*); + /* 803273CC */ s32 createMatPacket(J3DModelData*, u32); /* 803275FC */ void newDifferedDisplayList(u32); /* 8032767C */ void lock(); /* 803276B4 */ void unlock(); /* 803279A0 */ void diff(); - /* 80327A2C */ void setDeformData(J3DDeformData*, u32); - /* 80327AA0 */ void setSkinDeform(J3DSkinDeform*, u32); + /* 80327A2C */ s32 setDeformData(J3DDeformData*, u32); + /* 80327AA0 */ s32 setSkinDeform(J3DSkinDeform*, u32); /* 80327BD4 */ void calcAnmMtx(); /* 80327C58 */ void calcWeightEnvelopeMtx(); /* 80328190 */ void calcNrmMtx(); @@ -67,34 +36,39 @@ public: /* 803282EC */ void prepareShapePackets(); Mtx* getAnmMtx(int); - /* 80327CA4 */ void update(); - /* 80327E4C */ void entry(); - /* 80327CF0 */ void calc(); - /* 803276EC */ void calcMaterial(); - /* 80327858 */ void calcDiffTexMtx(); - /* 80327F40 */ void viewCalc(); - /* 80328350 */ ~J3DModel(); + /* 80327CA4 */ virtual void update(); + /* 80327E4C */ virtual void entry(); + /* 80327CF0 */ virtual void calc(); + /* 803276EC */ virtual void calcMaterial(); + /* 80327858 */ virtual void calcDiffTexMtx(); + /* 80327F40 */ virtual void viewCalc(); + /* 80328350 */ virtual ~J3DModel(); + + J3DModelData* getModelData() { return mModelData; } + void onFlag(u32 flag) { mFlags |= flag; } + void offFlag(u32 flag) { mFlags &= ~flag; } + bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; } // is there a better way to handle inlines with same name as non-inlines? - Mtx* i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); } + MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); } - /* 0x00 */ void* vtable; /* 0x04 */ J3DModelData* mModelData; /* 0x08 */ u32 mFlags; /* 0x0C */ u32 field_0x0c; /* 0x10 */ int field_0x10; - /* 0x14 */ void* mUserArea; + /* 0x14 */ u32 mUserArea; /* 0x18 */ Vec mBaseScale; /* 0x24 */ Mtx mBaseTransformMtx; /* 0x54 */ Mtx mInternalView; /* 0x84 */ J3DMtxBuffer* mMtxBuffer; - /* 0x88 */ J3DVertexBuffer* mVertexBuffer; + /* 0x88 */ J3DVertexBuffer mVertexBuffer; /* 0xC0 */ J3DMatPacket* mMatPacket; - /* 0xC4 */ J3DShapePacket* mShapePacket; + /* 0xC4 */ J3DShapePacket** mShapePacket; /* 0xC8 */ J3DDeformData* mDeformData; /* 0xCC */ J3DSkinDeform* mSkinDeform; /* 0xD0 */ J3DVtxColorCalc* mVtxColorCalc; - /* 0xD4 */ u8 field_0xd4[8]; + /* 0xD4 */ int field_0xd4; + /* 0xD8 */ int field_0xd8; }; #endif /* J3DMODEL_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h index 76d4b40ab7..4265ef16d6 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModelData.h +++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h @@ -1,18 +1,53 @@ #ifndef J3DMODELDATA_H #define J3DMODELDATA_H +#include "JSystem/J3DGraphAnimator/J3DJointTree.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h" +#include "JSystem/J3DGraphAnimator/J3DShapeTable.h" +#include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/J3DGraphBase/J3DVertex.h" #include "dolphin/types.h" class J3DModelData { +public: /* 80325D88 */ void clear(); /* 80325DA0 */ J3DModelData(); - /* 80325E14 */ void newSharedDisplayList(u32); + /* 80325E14 */ s32 newSharedDisplayList(u32); /* 80325EC8 */ void indexToPtr(); /* 80325F94 */ void makeSharedDL(); /* 8032600C */ void simpleCalcMaterial(u16, f32 (*)[4]); /* 803260CC */ void syncJ3DSysPointers() const; /* 803260F8 */ void syncJ3DSysFlags() const; - /* 8032617C */ ~J3DModelData(); -}; + + /* 8032617C */ virtual ~J3DModelData(); + + J3DMaterialTable& getMaterialTable() { return mMaterialTable; } + J3DVertexData& getVertexData() { return mVertexData; } + u16 getShapeNum() const { return mShapeTable.getShapeNum(); } + u16 getMaterialNum() const { return mMaterialTable.getMaterialNum(); } + J3DMaterial* getMaterialNodePointer(u16 idx) const { + return mMaterialTable.getMaterialNodePointer(idx); + } + J3DShape* getShapeNodePointer(u16 idx) const { return mShapeTable.getShapeNodePointer(idx); } + J3DJoint* getJointNodePointer(u16 idx) const { return mJointTree.getJointNodePointer(idx); } + J3DJointTree& getJointTree() { return mJointTree; } + J3DTexture* getTexture() const { return mMaterialTable.getTexture(); } + u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); } + void* getVtxPosArray() const { return mVertexData.getVtxPosArray(); } + void* getVtxNrmArray() const { return mVertexData.getVtxNrmArray(); } + _GXColor* getVtxColorArray(u8 idx) const { return mVertexData.getVtxColorArray(idx); } + bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; } + bool checkBBoardFlag() const { return field_0xe == 1; } + +private: + /* 0x04 */ u32 field_0x4; + /* 0x08 */ u32 mFlags; + /* 0x0C */ u16 field_0xc; + /* 0x0E */ u16 field_0xe; + /* 0x10 */ J3DJointTree mJointTree; + /* 0x58 */ J3DMaterialTable mMaterialTable; + /* 0x78 */ J3DShapeTable mShapeTable; + /* 0x88 */ J3DVertexData mVertexData; +}; // Size: 0xE4 #endif /* J3DMODELDATA_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h index f1e8e3d5a8..3ff9b52cd8 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h +++ b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h @@ -1,6 +1,52 @@ #ifndef J3DMTXBUFFER_H #define J3DMTXBUFFER_H +#include "JSystem/J3DGraphAnimator/J3DJointTree.h" +#include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" +class J3DModelData; + +class J3DMtxBuffer { +public: + J3DMtxBuffer() { initialize(); } + + /* 80326214 */ void initialize(); + /* 80326258 */ s32 create(J3DModelData*, u32); + /* 80326364 */ void createAnmMtx(J3DModelData*); + /* 803263F0 */ void createWeightEnvelopeMtx(J3DModelData*); + /* 8032648C */ void setNoUseDrawMtx(); + /* 803264B8 */ void createDoubleDrawMtx(J3DModelData*, u32); + /* 80326664 */ void createBumpMtxArray(J3DModelData*, u32); + /* 803268D4 */ void calcWeightEnvelopeMtx(); + /* 80326ACC */ void calcDrawMtx(u32, Vec const&, f32 const (&)[3][4]); + /* 80326D3C */ void calcNrmMtx(); + /* 80326EF0 */ void calcBBoardMtx(); + + MtxP getAnmMtx(int idx) const { return *(mMatrices[0] + idx); } + + void setScaleFlag(int idx, u8 flag) { mScaleFlag[idx] = flag; } + + static Mtx sNoUseDrawMtx; + static Mtx33 sNoUseNrmMtx; + static Mtx* sNoUseDrawMtxPtr; + static Mtx33* sNoUseNrmMtxPtr; + +private: + /* 0x00 */ J3DJointTree* mJointTree; + /* 0x04 */ u8* mScaleFlag; + /* 0x08 */ u8* mEnvScaleFlag; + /* 0x0C */ Mtx* mMatrices[5]; // fix this later + /* 0x20 */ Mtx33* mpNrmMtxPtrPtr; + /* 0x24 */ Mtx** field_0x24; + /* 0x28 */ Mtx** mpBumpMtxPtr; + /* 0x2C */ u32 field_0x2c; + /* 0x30 */ u32* mCurrentViewNoPtr; + /* 0x34 */ Mtx** mUserAnmMtx; + +public: + /* 803283B4 */ virtual ~J3DMtxBuffer(); +}; + #endif /* J3DMTXBUFFER_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h index 66e6fde10f..9abac85f9b 100644 --- a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h +++ b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h @@ -1,6 +1,33 @@ #ifndef J3DSHAPETABLE_H #define J3DSHAPETABLE_H +#include "JSystem/J3DGraphBase/J3DShape.h" +#include "JSystem/J3DGraphBase/J3DVertex.h" +#include "JSystem/JUtility/JUTNameTab.h" #include "dolphin/types.h" +class J3DShapeTable { +public: + J3DShapeTable() { + mShapeNum = 0; + mShapeNodePointer = NULL; + mShapeName = NULL; + } + + /* 803258A0 */ void hide(); + /* 803258D8 */ void show(); + /* 80325910 */ void initShapeNodes(J3DDrawMtxData*, J3DVertexData*); + /* 8032597C */ void sortVcdVatCmd(); + + virtual ~J3DShapeTable(); + + u16 getShapeNum() const { return mShapeNum; } + J3DShape* getShapeNodePointer(u16 idx) const { return mShapeNodePointer[idx]; } + +private: + /* 0x4 */ u16 mShapeNum; + /* 0x8 */ J3DShape** mShapeNodePointer; + /* 0xC */ JUTNameTab* mShapeName; +}; // Size: 0x10 + #endif /* J3DSHAPETABLE_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h index 6547503c90..63d138b1c2 100644 --- a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h +++ b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h @@ -1,6 +1,103 @@ #ifndef J3DSKINDEFORM_H #define J3DSKINDEFORM_H +#include "JSystem/J3DGraphAnimator/J3DCluster.h" +#include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h" +#include "JSystem/J3DGraphBase/J3DVertex.h" #include "dolphin/types.h" +class J3DModel; +class J3DAnmCluster; + +class J3DDeformData { +public: + /* 8032E1F8 */ J3DDeformData(); + /* 8032E230 */ void offAllFlag(u32); + /* 8032E298 */ void deform(J3DVertexBuffer*); + /* 8032E274 */ void deform(J3DModel*); + /* 8032E364 */ void setAnm(J3DAnmCluster*); + +private: + /* 0x00 */ u16 mClusterNum; + /* 0x02 */ u16 mClusterKeyNum; + /* 0x04 */ u16 field_0x4; + /* 0x08 */ J3DCluster** mClusterPointer; + /* 0x0C */ J3DClusterKey** mClusterKeyPointer; + /* 0x10 */ int field_0x10; + /* 0x14 */ u16 field_0x14; + /* 0x16 */ u16 field_0x16; + /* 0x18 */ void* mVtxPos; + /* 0x1C */ void* mVtxNrm; + /* 0x20 */ int field_0x20; + /* 0x24 */ int field_0x24; +}; // Size: 0x28 + +struct J3DSkinNList { + /* 8032C6E4 */ J3DSkinNList(); + /* 8032C85C */ void calcSkin_VtxPosF32(f32 (*)[4], void*, void*); + /* 8032C8E4 */ void calcSkin_VtxNrmF32(f32 (*)[4], void*, void*); + + /* 0x00 */ int field_0x0; + /* 0x04 */ int field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ int field_0xc; + /* 0x10 */ u16 field_0x10; + /* 0x12 */ u16 field_0x12; +}; // Size: 0x14 + +class J3DSkinDeform { +public: + /* 8032C96C */ J3DSkinDeform(); + /* 8032C9B0 */ void initSkinInfo(J3DModelData*); + /* 8032CF44 */ void initMtxIndexArray(J3DModelData*); + /* 8032D378 */ void changeFastSkinDL(J3DModelData*); + /* 8032D5C4 */ void calcNrmMtx(J3DMtxBuffer*); + /* 8032D738 */ void transformVtxPosNrm(J3DModelData*); + /* 8032D87C */ void calcAnmInvJointMtx(J3DMtxBuffer*); + /* 8032D8F4 */ void deformFastVtxPos_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; + /* 8032DA1C */ void deformFastVtxNrm_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; + /* 8032DB50 */ void deformVtxPos_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; + /* 8032DC74 */ void deformVtxPos_S16(J3DVertexBuffer*, J3DMtxBuffer*) const; + /* 8032DDB8 */ void deformVtxNrm_F32(J3DVertexBuffer*) const; + /* 8032DEBC */ void deformVtxNrm_S16(J3DVertexBuffer*) const; + /* 8032DFDC */ void deform(J3DModel*); + + /* 8032E064 */ virtual void deform(J3DVertexBuffer*, J3DMtxBuffer*); + /* 8032E1B0 */ virtual ~J3DSkinDeform(); + + static u8 sWorkArea_WEvlpMixMtx[4096]; + static u8 sWorkArea_WEvlpMixWeight[4096]; + static u8 sWorkArea_MtxReg[2048 + 8 /* padding */]; + +private: + /* 0x04 */ void** mPosData; + /* 0x08 */ void** field_0x8; + /* 0x0C */ void** field_0xc; + /* 0x10 */ Mtx** mNrmMtx; + /* 0x14 */ u32 mFlags; + /* 0x18 */ u8 field_0x18; + /* 0x19 */ u8 field_0x19; + /* 0x1C */ int field_0x1c; + /* 0x20 */ int field_0x20; + /* 0x24 */ J3DSkinNList** mSkinNList; +}; + +class J3DDeformer { +public: + /* 8032E39C */ J3DDeformer(J3DDeformData*); + /* 8032EAB4 */ void deform(J3DVertexBuffer*, u16, f32*); + /* 8032E3BC */ void deform(J3DVertexBuffer*, u16); + /* 8032E4A4 */ void deform_VtxPosF32(J3DVertexBuffer*, J3DCluster*, J3DClusterKey*, f32*); + /* 8032E60C */ void deform_VtxNrmF32(J3DVertexBuffer*, J3DCluster*, J3DClusterKey*, f32*); + /* 8032EBCC */ void normalizeWeight(int, f32*); + +private: + /* 0x00 */ J3DDeformData* mDeformData; + /* 0x04 */ J3DAnmCluster* mAnmCluster; + /* 0x08 */ int field_0x8; + /* 0x0C */ int field_0xc; + /* 0x10 */ u32 mFlags; +}; // Size: 0x14 + #endif /* J3DSKINDEFORM_H */ diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index ff5235ef2d..c62fa07850 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -1,14 +1,926 @@ #ifndef J3DMATBLOCK_H #define J3DMATBLOCK_H +#include "JSystem/J3DGraphBase/J3DStruct.h" +#include "JSystem/J3DGraphBase/J3DTevs.h" +#include "JSystem/J3DGraphBase/J3DTexture.h" #include "dolphin/gx/GXTexture.h" +#include "dolphin/mtx/mtx.h" #include "dolphin/types.h" -class J3DGXColorS10 { -public: +struct J3DGXColorS10 { /* 8000E460 */ J3DGXColorS10(); _GXColorS10 mColor; }; +struct J3DGXColor : public _GXColor { + /* 8000E538 */ J3DGXColor(); +}; + +struct J3DNBTScaleInfo { + /* 8032587C */ void operator=(J3DNBTScaleInfo const&); + + /* 0x0 */ u8 field_0x0; + /* 0x4 */ Vec mScale; +}; // Size: 0x10 + +struct J3DNBTScale : public J3DNBTScaleInfo {}; + +class J3DTexGenBlock { +public: + /* 80317354 */ virtual void reset(J3DTexGenBlock*); + virtual void calc(f32 const (*)[4]) = 0; + virtual void calcWithoutViewMtx(f32 const (*)[4]) = 0; + virtual void calcPostTexMtx(f32 const (*)[4]) = 0; + virtual void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]) = 0; + virtual void load() = 0; + virtual void patch() = 0; + virtual void diff(u32) = 0; + virtual void diffTexMtx() = 0; + virtual void diffTexGen() = 0; + /* 803172FC */ virtual bool countDLSize(); + virtual void getType() = 0; + /* 8031741C */ virtual void setTexGenNum(u32 const*); + /* 8000E0D0 */ virtual void setTexGenNum(u32); + /* 8000DFE8 */ virtual bool getTexGenNum() const; + /* 8000E0CC */ virtual void setTexCoord(u32, J3DTexCoord const*); + /* 8000DFE0 */ virtual bool getTexCoord(u32); + /* 8003AB2C */ virtual void setTexMtx(u32, J3DTexMtx*); + /* 8000DFD8 */ virtual J3DTexMtx* getTexMtx(u32); + /* 80317424 */ virtual void setNBTScale(J3DNBTScale const*); + /* 80317420 */ virtual void setNBTScale(J3DNBTScale); + /* 80317334 */ virtual bool getNBTScale(); + /* 80317428 */ virtual bool getTexMtxOffset() const; + /* 80317430 */ virtual void setTexMtxOffset(u32); + /* 803171DC */ virtual ~J3DTexGenBlock(); +}; + +class J3DTexGenBlockPatched : public J3DTexGenBlock { +public: + /* 80317644 */ void initialize(); + + /* 80320084 */ virtual void reset(J3DTexGenBlock*); + /* 803213C0 */ virtual void calc(f32 const (*)[4]); + /* 80321584 */ virtual void calcWithoutViewMtx(f32 const (*)[4]); + /* 803216D8 */ virtual void calcPostTexMtx(f32 const (*)[4]); + /* 8032181C */ virtual void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]); + /* 80322E70 */ virtual void load(); + /* 8031AA88 */ virtual void patch(); + /* 8031AC68 */ virtual void diff(u32); + /* 8031ACD0 */ virtual void diffTexMtx(); + /* 8031AD30 */ virtual void diffTexGen(); + /* 80317B9C */ virtual s32 countDLSize(); + /* 80322E74 */ virtual void getType(); + /* 80322D3C */ virtual void setTexGenNum(u32 const*); + /* 80322D34 */ virtual void setTexGenNum(u32); + /* 80322D48 */ virtual void getTexGenNum() const; + /* 80322D50 */ virtual void setTexCoord(u32, J3DTexCoord const*); + /* 80322D64 */ virtual void getTexCoord(u32); + /* 80322D78 */ virtual void setTexMtx(u32, J3DTexMtx*); + /* 80322D88 */ virtual void getTexMtx(u32); + /* 80322D98 */ virtual void getTexMtxOffset() const; + /* 80322DA0 */ virtual void setTexMtxOffset(u32); + /* 80317180 */ virtual ~J3DTexGenBlockPatched(); + +private: + /* 0x04 */ u32 mTexGenNum; + /* 0x08 */ J3DTexCoord mTexCoord[9]; + /* 0x38 */ J3DTexMtx* mTexMtx[8]; + /* 0x58 */ u32 mTexMtxOffset; +}; // Size: 0x5C + +class J3DTexGenBlockBasic : public J3DTexGenBlockPatched { +public: + /* 803176A4 */ void initialize(); + + /* 803202DC */ virtual void reset(J3DTexGenBlock*); + /* 8031A9E8 */ virtual void load(); + /* 8031ABC0 */ virtual void patch(); + /* 80317BAC */ virtual s32 countDLSize(); + /* 80322C6C */ virtual void getType(); + /* 80322C9C */ virtual void setNBTScale(J3DNBTScale const*); + /* 80322C78 */ virtual void setNBTScale(J3DNBTScale); + /* 80322CC0 */ virtual void getNBTScale(); + /* 80322CC8 */ virtual ~J3DTexGenBlockBasic(); + +private: + /* 0x5C */ J3DNBTScale mNBTScale; +}; // Size: 0x6C + +class J3DTexGenBlock4 : public J3DTexGenBlockPatched { +public: + /* 80317674 */ void initialize(); + + /* 803201A0 */ virtual void reset(J3DTexGenBlock*); + /* 8031A948 */ virtual void load(); + /* 8031AB18 */ virtual void patch(); + /* 80317BA4 */ virtual s32 countDLSize(); + /* 80322DA8 */ virtual void getType(); + /* 80322DD8 */ virtual void setNBTScale(J3DNBTScale const*); + /* 80322DB4 */ virtual void setNBTScale(J3DNBTScale); + /* 80322DFC */ virtual void getNBTScale(); + /* 80322E04 */ virtual ~J3DTexGenBlock4(); + +private: + /* 0x5C */ J3DNBTScale mNBTScale; +}; // Size: 0x6C + +class J3DTevBlock { +public: + /* 80317350 */ virtual void reset(J3DTevBlock*); + /* 80317330 */ virtual void load(); + /* 8031CD44 */ virtual void diff(u32); + /* 80321948 */ virtual void diffTexNo(); + /* 80321938 */ virtual void diffTevReg(); + /* 80321944 */ virtual void diffTexCoordScale(); + /* 80321940 */ virtual void diffTevStage(); + /* 8032193C */ virtual void diffTevStageIndirect(); + /* 8000DBD4 */ virtual void patch(); + /* 8032353C */ virtual void patchTexNo(); + /* 80323540 */ virtual void patchTevReg(); + /* 8000DBC8 */ virtual void patchTexNoAndTexCoordScale(); + virtual void ptrToIndex() = 0; + virtual void indexToPtr() = 0; + virtual void getType() = 0; + /* 8031730C */ virtual bool countDLSize(); + /* 80323544 */ virtual void setTexNo(u32, u16 const*); + /* 8000E0AC */ virtual void setTexNo(u32, u16); + /* 8000DF94 */ virtual void getTexNo(u32) const; + /* 80323548 */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 8000E0BC */ virtual void setTevOrder(u32, J3DTevOrder); + /* 8000DFB8 */ virtual bool getTevOrder(u32); + /* 80110E80 */ virtual void setTevColor(u32, J3DGXColorS10 const*); + /* 8000E0C4 */ virtual void setTevColor(u32, J3DGXColorS10); + /* 8000DFC8 */ virtual _GXColorS10* getTevColor(u32); + /* 800732AC */ virtual void setTevKColor(u32, J3DGXColor const*); + /* 8000E0C0 */ virtual void setTevKColor(u32, J3DGXColor); + /* 8000DFC0 */ virtual _GXColor* getTevKColor(u32); + /* 80322950 */ virtual void setTevKColorSel(u32, u8 const*); + /* 8000E0B8 */ virtual void setTevKColorSel(u32, u8); + /* 8000DFB0 */ virtual bool getTevKColorSel(u32); + /* 80322954 */ virtual void setTevKAlphaSel(u32, u8 const*); + /* 8000E0B4 */ virtual void setTevKAlphaSel(u32, u8); + /* 8000DFA8 */ virtual bool getTevKAlphaSel(u32); + /* 8032354C */ virtual void setTevStageNum(u8 const*); + /* 8000E0C8 */ virtual void setTevStageNum(u8); + /* 8000DFD0 */ virtual u8 getTevStageNum() const; + /* 80323550 */ virtual void setTevStage(u32, J3DTevStage const*); + /* 8000E0A8 */ virtual void setTevStage(u32, J3DTevStage); + /* 8000DF8C */ virtual bool getTevStage(u32); + /* 8032295C */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + /* 80322958 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + /* 80322960 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + /* 8000E0B0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + /* 8000DFA0 */ virtual bool getTevSwapModeTable(u32); + /* 80323554 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 8000E0A4 */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 8000DF84 */ virtual bool getIndTevStage(u32); + /* 80323558 */ virtual bool getTexNoOffset() const; + /* 80322964 */ virtual bool getTevRegOffset() const; + /* 80321FE0 */ virtual void setTexNoOffset(u32); + /* 8032296C */ virtual void setTevRegOffset(u32); + /* 80317224 */ virtual ~J3DTevBlock(); + +private: + /* 8031E098 */ void indexToPtr_private(u32); + + /* 0x4 */ u32 mTexNoOffset; +}; + +class J3DTevBlockPatched : public J3DTevBlock { +public: + /* 803176E0 */ void initialize(); + + /* 80320418 */ virtual void reset(J3DTevBlock*); + /* 80322970 */ virtual void load(); + /* 8031CE00 */ virtual void diffTexNo(); + /* 8031D028 */ virtual void diffTevReg(); + /* 8031D0C4 */ virtual void diffTexCoordScale(); + /* 8031CE64 */ virtual void diffTevStage(); + /* 8031CF78 */ virtual void diffTevStageIndirect(); + /* 8031C228 */ virtual void patch(); + /* 8031BF4C */ virtual void patchTexNo(); + /* 8031BFE0 */ virtual void patchTevReg(); + /* 8031C0AC */ virtual void patchTexNoAndTexCoordScale(); + /* 8031DFB4 */ virtual void ptrToIndex(); + /* 80322974 */ virtual void indexToPtr(); + /* 80322998 */ virtual void getType(); + /* 80317BB4 */ virtual s32 countDLSize(); + /* 803229D0 */ virtual void setTexNo(u32, u16 const*); + /* 803229C0 */ virtual void setTexNo(u32, u16); + /* 803229E4 */ virtual void getTexNo(u32) const; + /* 80322A08 */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 803229F4 */ virtual void setTevOrder(u32, J3DTevOrder); + /* 80322A1C */ virtual void getTevOrder(u32); + /* 80322B24 */ virtual void setTevColor(u32, J3DGXColorS10 const*); + /* 80322AF8 */ virtual void setTevColor(u32, J3DGXColorS10); + /* 80322B50 */ virtual void getTevColor(u32); + /* 80322B90 */ virtual void setTevKColor(u32, J3DGXColor const*); + /* 80322B64 */ virtual void setTevKColor(u32, J3DGXColor); + /* 80322BBC */ virtual void getTevKColor(u32); + /* 80322BDC */ virtual void setTevKColorSel(u32, u8 const*); + /* 80322BD0 */ virtual void setTevKColorSel(u32, u8); + /* 80322BEC */ virtual void getTevKColorSel(u32); + /* 803229AC */ virtual void setTevStageNum(u8 const*); + /* 803229A4 */ virtual void setTevStageNum(u8); + /* 803229B8 */ virtual void getTevStageNum() const; + /* 80322A6C */ virtual void setTevStage(u32, J3DTevStage const*); + /* 80322A30 */ virtual void setTevStage(u32, J3DTevStage); + /* 80322AA8 */ virtual void getTevStage(u32); + /* 80322AD0 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 80322ABC */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 80322AE4 */ virtual void getIndTevStage(u32); + /* 80322BF8 */ virtual void getTexNoOffset() const; + /* 80322C00 */ virtual void getTevRegOffset() const; + /* 80322C08 */ virtual void setTevRegOffset(u32); + /* 80322C10 */ virtual ~J3DTevBlockPatched(); + +private: + /* 0x08 */ u16 mTexNo[8]; + /* 0x18 */ J3DTevOrder mTevOrder[8]; + /* 0x38 */ J3DTevStage mTevStage[8]; + /* 0x78 */ J3DIndTevStage mIndTevStage[8]; + /* 0x98 */ J3DGXColorS10 mTevColor[4]; + /* 0xB8 */ J3DGXColor mTevKColor[4]; + /* 0xC8 */ u8 mTevKColorSel[8]; + /* 0xD0 */ u8 mTevStageNum; + /* 0xD4 */ u32 mTevRegOffset; +}; // Size: 0xD8 + +class J3DTevBlockNull : public J3DTevBlock { + /* 803176D4 */ void initialize(); +}; + +class J3DTevBlock4 : public J3DTevBlock { +public: + /* 803178EC */ void initialize(); + + /* 8032098C */ virtual void reset(J3DTevBlock*); + /* 8031B4C0 */ virtual void load(); + /* 8031D758 */ virtual void diffTexNo(); + /* 8031D7BC */ virtual void diffTevReg(); + /* 8031DA1C */ virtual void diffTexCoordScale(); + /* 8031D858 */ virtual void diffTevStage(); + /* 8031D96C */ virtual void diffTevStageIndirect(); + /* 8031C9D0 */ virtual void patch(); + /* 8031C6F4 */ virtual void patchTexNo(); + /* 8031C788 */ virtual void patchTevReg(); + /* 8031C854 */ virtual void patchTexNoAndTexCoordScale(); + /* 80321FE8 */ virtual void ptrToIndex(); + /* 80321FEC */ virtual void indexToPtr(); + /* 80322010 */ virtual void getType(); + /* 80317BCC */ virtual s32 countDLSize(); + /* 8032202C */ virtual void setTexNo(u32, u16 const*); + /* 8032201C */ virtual void setTexNo(u32, u16); + /* 80322040 */ virtual void getTexNo(u32) const; + /* 80322064 */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 80322050 */ virtual void setTevOrder(u32, J3DTevOrder); + /* 80322078 */ virtual void getTevOrder(u32); + /* 803220B8 */ virtual void setTevColor(u32, J3DGXColorS10 const*); + /* 8032208C */ virtual void setTevColor(u32, J3DGXColorS10); + /* 803220E4 */ virtual void getTevColor(u32); + /* 80322124 */ virtual void setTevKColor(u32, J3DGXColor const*); + /* 803220F8 */ virtual void setTevKColor(u32, J3DGXColor); + /* 80322150 */ virtual void getTevKColor(u32); + /* 80322170 */ virtual void setTevKColorSel(u32, u8 const*); + /* 80322164 */ virtual void setTevKColorSel(u32, u8); + /* 80322180 */ virtual void getTevKColorSel(u32); + /* 80322198 */ virtual void setTevKAlphaSel(u32, u8 const*); + /* 8032218C */ virtual void setTevKAlphaSel(u32, u8); + /* 803221A8 */ virtual void getTevKAlphaSel(u32); + /* 803221BC */ virtual void setTevStageNum(u8 const*); + /* 803221B4 */ virtual void setTevStageNum(u8); + /* 803221C8 */ virtual void getTevStageNum() const; + /* 8032220C */ virtual void setTevStage(u32, J3DTevStage const*); + /* 803221D0 */ virtual void setTevStage(u32, J3DTevStage); + /* 80322248 */ virtual void getTevStage(u32); + /* 80322294 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + /* 8032225C */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + /* 803222DC */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + /* 803222CC */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + /* 803222EC */ virtual void getTevSwapModeTable(u32); + /* 80322310 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 803222FC */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 80322324 */ virtual void getIndTevStage(u32); + /* 80322338 */ virtual void getTexNoOffset() const; + /* 80322340 */ virtual void getTevRegOffset() const; + /* 80322348 */ virtual void setTevRegOffset(u32); + /* 80322350 */ virtual ~J3DTevBlock4(); + +private: + /* 0x08 */ u16 mTexNo[4]; + /* 0x10 */ J3DTevOrder mTevOrder[4]; + /* 0x20 */ u8 mTevStageNum; + /* 0x21 */ J3DTevStage mTevStage[4]; + /* 0x42 */ J3DGXColorS10 mTevColor[4]; + /* 0x62 */ J3DGXColor mTevKColor[4]; + /* 0x72 */ u8 mTevKColorSel[4]; + /* 0x76 */ u8 mTevKAlphaSel[4]; + /* 0x7A */ J3DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x80 */ J3DIndTevStage mIndTevStage[4]; + /* 0x90 */ u32 mTevRegOffset; +}; // Size: 0x94 + +class J3DTevBlock2 : public J3DTevBlock { +public: + /* 80317810 */ void initialize(); + + /* 803206AC */ virtual void reset(J3DTevBlock*); + /* 8031AFA4 */ virtual void load(); + /* 8031D3D0 */ virtual void diffTexNo(); + /* 8031D434 */ virtual void diffTevReg(); + /* 8031D694 */ virtual void diffTexCoordScale(); + /* 8031D4D0 */ virtual void diffTevStage(); + /* 8031D5E4 */ virtual void diffTevStageIndirect(); + /* 8031C6A8 */ virtual void patch(); + /* 8031C3F8 */ virtual void patchTexNo(); + /* 8031C48C */ virtual void patchTevReg(); + /* 8031C558 */ virtual void patchTexNoAndTexCoordScale(); + /* 803223AC */ virtual void ptrToIndex(); + /* 803223B0 */ virtual void indexToPtr(); + /* 803223D4 */ virtual void getType(); + /* 80317BC4 */ virtual s32 countDLSize(); + /* 803223F0 */ virtual void setTexNo(u32, u16 const*); + /* 803223E0 */ virtual void setTexNo(u32, u16); + /* 80322404 */ virtual void getTexNo(u32) const; + /* 80322428 */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 80322414 */ virtual void setTevOrder(u32, J3DTevOrder); + /* 8032243C */ virtual void getTevOrder(u32); + /* 8032247C */ virtual void setTevColor(u32, J3DGXColorS10 const*); + /* 80322450 */ virtual void setTevColor(u32, J3DGXColorS10); + /* 803224A8 */ virtual void getTevColor(u32); + /* 803224E8 */ virtual void setTevKColor(u32, J3DGXColor const*); + /* 803224BC */ virtual void setTevKColor(u32, J3DGXColor); + /* 80322514 */ virtual void getTevKColor(u32); + /* 80322534 */ virtual void setTevKColorSel(u32, u8 const*); + /* 80322528 */ virtual void setTevKColorSel(u32, u8); + /* 80322544 */ virtual void getTevKColorSel(u32); + /* 8032255C */ virtual void setTevKAlphaSel(u32, u8 const*); + /* 80322550 */ virtual void setTevKAlphaSel(u32, u8); + /* 8032256C */ virtual void getTevKAlphaSel(u32); + /* 80322580 */ virtual void setTevStageNum(u8 const*); + /* 80322578 */ virtual void setTevStageNum(u8); + /* 8032258C */ virtual void getTevStageNum() const; + /* 803225D0 */ virtual void setTevStage(u32, J3DTevStage const*); + /* 80322594 */ virtual void setTevStage(u32, J3DTevStage); + /* 8032260C */ virtual void getTevStage(u32); + /* 80322658 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + /* 80322620 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + /* 803226A0 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + /* 80322690 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + /* 803226B0 */ virtual void getTevSwapModeTable(u32); + /* 803226D4 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 803226C0 */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 803226E8 */ virtual void getIndTevStage(u32); + /* 803226FC */ virtual void getTexNoOffset() const; + /* 80322704 */ virtual void getTevRegOffset() const; + /* 8032270C */ virtual void setTevRegOffset(u32); + /* 80322714 */ virtual ~J3DTevBlock2(); + +private: + /* 0x08 */ u16 mTexNo[2]; + /* 0x0C */ J3DTevOrder mTevOrder[2]; + /* 0x14 */ J3DGXColorS10 mTevColor[4]; + /* 0x34 */ u8 mTevStageNum; + /* 0x35 */ J3DTevStage mTevStage[2]; + /* 0x45 */ J3DGXColor mTevKColor[4]; + /* 0x55 */ u8 mTevKColorSel[2]; + /* 0x57 */ u8 mTevKAlphaSel[2]; + /* 0x59 */ J3DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x60 */ J3DIndTevStage mIndTevStage[2]; + /* 0x68 */ u32 mTevRegOffset; +}; // Size: 0x6C + +class J3DTevBlock16 : public J3DTevBlock { +public: + /* 80317A00 */ void initialize(); + + /* 80320E24 */ virtual void reset(J3DTevBlock*); + /* 8031BA04 */ virtual void load(); + /* 8031DB14 */ virtual void diffTexNo(); + /* 8031DB78 */ virtual void diffTevReg(); + /* 8031DDD8 */ virtual void diffTexCoordScale(); + /* 8031DC14 */ virtual void diffTevStage(); + /* 8031DD28 */ virtual void diffTevStageIndirect(); + /* 8031CCF8 */ virtual void patch(); + /* 8031CA1C */ virtual void patchTexNo(); + /* 8031CAB0 */ virtual void patchTevReg(); + /* 8031CB7C */ virtual void patchTexNoAndTexCoordScale(); + /* 8031DED0 */ virtual void ptrToIndex(); + /* 80321C20 */ virtual void indexToPtr(); + /* 80321C44 */ virtual void getType(); + /* 80317BD4 */ virtual s32 countDLSize(); + /* 80321C60 */ virtual void setTexNo(u32, u16 const*); + /* 80321C50 */ virtual void setTexNo(u32, u16); + /* 80321C74 */ virtual void getTexNo(u32) const; + /* 80321C98 */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 80321C84 */ virtual void setTevOrder(u32, J3DTevOrder); + /* 80321CAC */ virtual void getTevOrder(u32); + /* 80321CEC */ virtual void setTevColor(u32, J3DGXColorS10 const*); + /* 80321CC0 */ virtual void setTevColor(u32, J3DGXColorS10); + /* 80321D18 */ virtual void getTevColor(u32); + /* 80321D58 */ virtual void setTevKColor(u32, J3DGXColor const*); + /* 80321D2C */ virtual void setTevKColor(u32, J3DGXColor); + /* 80321D84 */ virtual void getTevKColor(u32); + /* 80321DA4 */ virtual void setTevKColorSel(u32, u8 const*); + /* 80321D98 */ virtual void setTevKColorSel(u32, u8); + /* 80321DB4 */ virtual void getTevKColorSel(u32); + /* 80321DCC */ virtual void setTevKAlphaSel(u32, u8 const*); + /* 80321DC0 */ virtual void setTevKAlphaSel(u32, u8); + /* 80321DDC */ virtual void getTevKAlphaSel(u32); + /* 80321DE8 */ virtual void setTevStageNum(u8); + /* 80321DF0 */ virtual void setTevStageNum(u8 const*); + /* 80321DFC */ virtual void getTevStageNum() const; + /* 80321E40 */ virtual void setTevStage(u32, J3DTevStage const*); + /* 80321E04 */ virtual void setTevStage(u32, J3DTevStage); + /* 80321E7C */ virtual void getTevStage(u32); + /* 80321EC8 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); + /* 80321E90 */ virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); + /* 80321F10 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); + /* 80321F00 */ virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); + /* 80321F20 */ virtual void getTevSwapModeTable(u32); + /* 80321F44 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 80321F30 */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 80321F58 */ virtual void getIndTevStage(u32); + /* 80321F6C */ virtual void getTexNoOffset() const; + /* 80321F74 */ virtual void getTevRegOffset() const; + /* 80321F7C */ virtual void setTevRegOffset(u32); + /* 80321F84 */ virtual ~J3DTevBlock16(); + +private: + /* 0x008 */ u16 mTexNo[8]; + /* 0x018 */ J3DTevOrder mTevOrder[16]; + /* 0x058 */ u8 mTevStageNum; + /* 0x059 */ J3DTevStage mTevStage[16]; + /* 0x0DA */ J3DGXColorS10 mTevColor[4]; + /* 0x0FA */ J3DGXColor mTevKColor[4]; + /* 0x10A */ u8 mTevKColorSel[16]; + /* 0x11A */ u8 mTevKAlphaSel[16]; + /* 0x12A */ J3DTevSwapModeTable mTevSwapModeTable[4]; + /* 0x130 */ J3DIndTevStage mIndTevStage[16]; + /* 0x170 */ u32 mTevRegOffset; +}; // Size: 0x174 + +class J3DTevBlock1 : public J3DTevBlock { +public: + /* 803177E8 */ void initialize(); + + /* 803205D4 */ virtual void reset(J3DTevBlock*); + /* 8031AD64 */ virtual void load(); + /* 8031D1BC */ virtual void diffTexNo(); + /* 8031D1F4 */ virtual void diffTevReg(); + /* 8031D368 */ virtual void diffTexCoordScale(); + /* 8031D1F8 */ virtual void diffTevStage(); + /* 8031D2E8 */ virtual void diffTevStageIndirect(); + /* 8031C3CC */ virtual void patch(); + /* 8031C274 */ virtual void patchTexNo(); + /* 8031C2E4 */ virtual void patchTevReg(); + /* 8031C2E8 */ virtual void patchTexNoAndTexCoordScale(); + /* 80322770 */ virtual void ptrToIndex(); + /* 80322774 */ virtual void indexToPtr(); + /* 80322798 */ virtual void getType(); + /* 80317BBC */ virtual s32 countDLSize(); + /* 803227B4 */ virtual void setTexNo(u32, u16 const*); + /* 803227A4 */ virtual void setTexNo(u32, u16); + /* 803227C8 */ virtual void getTexNo(u32) const; + /* 803227EC */ virtual void setTevOrder(u32, J3DTevOrder const*); + /* 803227D8 */ virtual void setTevOrder(u32, J3DTevOrder); + /* 80322800 */ virtual void getTevOrder(u32); + /* 80322818 */ virtual void setTevStageNum(u8 const*); + /* 80322814 */ virtual void setTevStageNum(u8); + /* 8032281C */ virtual bool getTevStageNum() const; + /* 80322860 */ virtual void setTevStage(u32, J3DTevStage const*); + /* 80322824 */ virtual void setTevStage(u32, J3DTevStage); + /* 8032289C */ virtual void getTevStage(u32); + /* 803228C4 */ virtual void setIndTevStage(u32, J3DIndTevStage const*); + /* 803228B0 */ virtual void setIndTevStage(u32, J3DIndTevStage); + /* 803228D8 */ virtual void getIndTevStage(u32); + /* 803228EC */ virtual void getTexNoOffset() const; + /* 803228F4 */ virtual ~J3DTevBlock1(); + +private: + /* 0x08 */ u16 mTexNo[1]; + /* 0x0A */ J3DTevOrder mTevOrder[1]; + /* 0x0E */ J3DTevStage mTevStage[1]; + /* 0x18 */ J3DIndTevStage mIndTevStage[1]; +}; // Size: 0x1C + +struct J3DZMode { + /* 0x0 */ u16 mZModeID; +}; + +struct J3DBlendInfo { + /* 0x0 */ u8 mType; + /* 0x1 */ u8 mSrcFactor; + /* 0x2 */ u8 mDstFactor; + /* 0x3 */ u8 mOp; +}; + +struct J3DBlend : public J3DBlendInfo {}; + +struct J3DFogInfo { + /* 80325800 */ void operator=(J3DFogInfo const&); + + /* 0x00 */ u8 field_0x0; + /* 0x01 */ u8 field_0x1; + /* 0x02 */ u16 field_0x2; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ u8 field_0x14; + /* 0x15 */ u8 field_0x15; + /* 0x16 */ u8 field_0x16; + /* 0x17 */ u8 field_0x17; + /* 0x18 */ u16 field_0x18[10]; +}; // Size: 0x2C + +struct J3DFog : public J3DFogInfo {}; + +struct J3DAlphaComp { + /* 0x0 */ u16 field_0x0; + /* 0x2 */ u8 mRef0; + /* 0x3 */ u8 mRef1; +}; // Size: 0x4 + +class J3DPEBlock { +public: + /* 80317348 */ virtual void reset(J3DPEBlock*); + virtual void load() = 0; + /* 8000DBCC */ virtual void patch(); + /* 80317344 */ virtual void diff(u32); + /* 8031735C */ virtual void diffFog(); + /* 80317360 */ virtual void diffBlend(); + virtual bool countDLSize(); + virtual void getType() = 0; + /* 80317368 */ virtual void setFog(J3DFog); + /* 80317364 */ virtual void setFog(J3DFog*); + /* 8000DF5C */ virtual bool getFog(); + /* 8031736C */ virtual void setAlphaComp(J3DAlphaComp const*); + /* 8000E01C */ virtual void setAlphaComp(J3DAlphaComp const&); + /* 8000DF54 */ virtual bool getAlphaComp(); + /* 80317370 */ virtual void setBlend(J3DBlend const*); + /* 8000E018 */ virtual void setBlend(J3DBlend const&); + /* 8000DF4C */ virtual bool getBlend(); + /* 80317374 */ virtual void setZMode(J3DZMode const*); + /* 8000E014 */ virtual void setZMode(J3DZMode); + /* 8000DF44 */ virtual bool getZMode(); + /* 80317378 */ virtual void setZCompLoc(u8 const*); + /* 8000E010 */ virtual void setZCompLoc(u8); + /* 8000DF3C */ virtual bool getZCompLoc() const; + /* 80317380 */ virtual void setDither(u8 const*); + /* 8031737C */ virtual void setDither(u8); + /* 80317384 */ virtual bool getDither() const; + /* 8031738C */ virtual bool getFogOffset() const; + /* 80317394 */ virtual void setFogOffset(u32); + virtual ~J3DPEBlock(); +}; + +class J3DPEBlockXlu : public J3DPEBlock { +public: + /* 8031E98C */ virtual void load(); + /* 80317BF4 */ virtual s32 countDLSize(); + /* 80323258 */ virtual void getType(); + /* 80323264 */ virtual ~J3DPEBlockXlu(); +}; + +class J3DPEBlockTexEdge : public J3DPEBlock { +public: + /* 8031E6C8 */ virtual void load(); + /* 80317BEC */ virtual s32 countDLSize(); + /* 803232C0 */ virtual void getType(); + /* 803232CC */ virtual ~J3DPEBlockTexEdge(); +}; + +class J3DPEBlockOpa : public J3DPEBlock { +public: + /* 8031E408 */ virtual void load(); + /* 80317BE4 */ virtual s32 countDLSize(); + /* 80323328 */ virtual void getType(); + /* 80323334 */ virtual ~J3DPEBlockOpa(); +}; + +class J3DPEBlockFull : public J3DPEBlock { +public: + /* 80317B58 */ void initialize(); + + /* 8032129C */ virtual void reset(J3DPEBlock*); + /* 8031F3C0 */ virtual void load(); + /* 8031F890 */ virtual void patch(); + /* 8031FCA0 */ virtual void diff(u32); + /* 8031F940 */ virtual void diffFog(); + /* 8031F9B8 */ virtual void diffBlend(); + /* 80317C04 */ virtual s32 countDLSize(); + /* 8032194C */ virtual void getType(); + /* 8032197C */ virtual void setFog(J3DFog); + /* 80321958 */ virtual void setFog(J3DFog*); + /* 803219A0 */ virtual void getFog(); + /* 803219C4 */ virtual void setAlphaComp(J3DAlphaComp const*); + /* 803219A8 */ virtual void setAlphaComp(J3DAlphaComp const&); + /* 803219E0 */ virtual void getAlphaComp(); + /* 803219F4 */ virtual void setBlend(J3DBlend const*); + /* 803219E8 */ virtual void setBlend(J3DBlend const&); + /* 80321A00 */ virtual void getBlend(); + /* 80321A14 */ virtual void setZMode(J3DZMode const*); + /* 80321A08 */ virtual void setZMode(J3DZMode); + /* 80321A20 */ virtual void getZMode(); + /* 80321A30 */ virtual void setZCompLoc(u8 const*); + /* 80321A28 */ virtual void setZCompLoc(u8); + /* 80321A3C */ virtual void getZCompLoc() const; + /* 80321A4C */ virtual void setDither(u8 const*); + /* 80321A44 */ virtual void setDither(u8); + /* 80321A58 */ virtual void getDither() const; + /* 80321A60 */ virtual void getFogOffset() const; + /* 80321A68 */ virtual void setFogOffset(u32); + /* 80321A70 */ virtual ~J3DPEBlockFull(); + +private: + /* 0x04 */ J3DFog mFog; + /* 0x30 */ J3DAlphaComp mAlphaComp; + /* 0x34 */ J3DBlend mBlend; + /* 0x38 */ J3DZMode mZMode; + /* 0x3A */ u8 mZCompLoc; + /* 0x3B */ u8 mDither; + /* 0x3C */ u32 mFogOffset; +}; // Size: 0x40 + +class J3DPEBlockFogOff : public J3DPEBlock { +public: + /* 80317B34 */ void initialize(); + + /* 803211B4 */ virtual void reset(J3DPEBlock*); + /* 8031EC50 */ virtual void load(); + /* 80321ACC */ virtual void diff(u32); + /* 8031F0D8 */ virtual void diffBlend(); + /* 80317BFC */ virtual s32 countDLSize(); + /* 80321B00 */ virtual void getType(); + /* 80321B28 */ virtual void setAlphaComp(J3DAlphaComp const*); + /* 80321B0C */ virtual void setAlphaComp(J3DAlphaComp const&); + /* 80321B44 */ virtual void getAlphaComp(); + /* 80321B58 */ virtual void setBlend(J3DBlend const*); + /* 80321B4C */ virtual void setBlend(J3DBlend const&); + /* 80321B64 */ virtual void getBlend(); + /* 80321B78 */ virtual void setZMode(J3DZMode const*); + /* 80321B6C */ virtual void setZMode(J3DZMode); + /* 80321B84 */ virtual void getZMode(); + /* 80321B94 */ virtual void setZCompLoc(u8 const*); + /* 80321B8C */ virtual void setZCompLoc(u8); + /* 80321BA0 */ virtual void getZCompLoc() const; + /* 80321BB0 */ virtual void setDither(u8 const*); + /* 80321BA8 */ virtual void setDither(u8); + /* 80321BBC */ virtual void getDither() const; + /* 80321BC4 */ virtual ~J3DPEBlockFogOff(); + +private: + /* 0x04 */ J3DAlphaComp mAlphaComp; + /* 0x08 */ J3DBlend mBlend; + /* 0x0C */ J3DZMode mZMode; + /* 0x0E */ u8 mZCompLoc; + /* 0x0F */ u8 mDither; +}; // Size: 0x10 + +struct J3DIndTexCoordScale { + /* 8000E024 */ ~J3DIndTexCoordScale(); + /* 8000E0E4 */ J3DIndTexCoordScale(); + + /* 0x0 */ u8 mScaleS; + /* 0x1 */ u8 mScaleT; +}; + +struct J3DIndTexMtx { + /* 8000E064 */ ~J3DIndTexMtx(); + /* 8000E0F0 */ J3DIndTexMtx(); + + /* 0x00 */ Mtx23 mOffsetMtx; + /* 0x18 */ u8 mScaleExp; +}; // Size: 0x1C + +struct J3DIndTexOrder { + /* 8000E128 */ J3DIndTexOrder(); + + /* 0x0 */ u8 mMap; + /* 0x1 */ u8 mCoord; +}; + +class J3DIndBlock { +public: + /* 8031734C */ virtual void reset(J3DIndBlock*); + virtual void load() = 0; + virtual void diff(u32) = 0; + /* 80317314 */ virtual bool countDLSize(); + virtual void getType() = 0; + /* 8000E0A0 */ virtual void setIndTexStageNum(u8); + /* 8000DF7C */ virtual bool getIndTexStageNum() const; + /* 80317410 */ virtual void setIndTexOrder(u32, J3DIndTexOrder); + /* 8031740C */ virtual void setIndTexOrder(u32, J3DIndTexOrder const*); + /* 8000DF74 */ virtual bool getIndTexOrder(u32); + /* 80317414 */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*); + /* 8000E060 */ virtual void setIndTexMtx(u32, J3DIndTexMtx); + /* 8000DF6C */ virtual bool getIndTexMtx(u32); + /* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); + /* 80317418 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); + /* 8000DF64 */ virtual bool getIndTexCoordScale(u32); + /* 8031726C */ virtual ~J3DIndBlock(); +}; + +class J3DIndBlockFull : public J3DIndBlock { +public: + /* 80317B28 */ void initialize(); + + /* 803210B0 */ virtual void reset(J3DIndBlock*); + /* 8031E328 */ virtual void diff(u32); + /* 8031E12C */ virtual void load(); + /* 80317BDC */ virtual s32 countDLSize(); + /* 80323390 */ virtual void getType(); + /* 8032339C */ virtual void setIndTexStageNum(u8); + /* 803233A4 */ virtual void getIndTexStageNum() const; + /* 803233AC */ virtual void setIndTexOrder(u32, J3DIndTexOrder); + /* 803233C0 */ virtual void setIndTexOrder(u32, J3DIndTexOrder const*); + /* 803233D4 */ virtual void getIndTexOrder(u32); + /* 8032341C */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*); + /* 803233E8 */ virtual void setIndTexMtx(u32, J3DIndTexMtx); + /* 80323450 */ virtual void getIndTexMtx(u32); + /* 80323478 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); + /* 80323464 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale); + /* 8032348C */ virtual void getIndTexCoordScale(u32); + /* 803234A0 */ virtual ~J3DIndBlockFull(); + +private: + /* 0x04 */ u8 mIndTexStageNum; + /* 0x05 */ J3DIndTexOrder mIndTexOrder[4]; + /* 0x18 */ J3DIndTexMtx mIndTexMtx[3]; + /* 0x6C */ J3DIndTexCoordScale mIndTexCoordScale[4]; +}; // Size: 0x7C + +class J3DIndBlockNull : public J3DIndBlock { +public: + /* 803173A0 */ virtual void reset(J3DIndBlock*); + /* 80317398 */ virtual void diff(u32); + /* 8031739C */ virtual void load(); + /* 803173A4 */ virtual void getType(); + /* 803173B0 */ virtual ~J3DIndBlockNull(); +}; + +struct J3DColorChanInfo { + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 field_0x1; + /* 0x2 */ u8 field_0x2; + /* 0x3 */ u8 field_0x3; + /* 0x4 */ u8 field_0x4; + /* 0x5 */ u8 field_0x5; +}; + +struct J3DColorChan { + /* 8000E47C */ J3DColorChan(); + + /* 0x0 */ u16 mColorChanID; +}; + +class J3DColorBlock { +public: + /* 80317324 */ virtual void load(); + /* 80317358 */ virtual void reset(J3DColorBlock*); + /* 8031733C */ virtual void patch(); + /* 80317434 */ virtual void patchMatColor(); + /* 8000DBD0 */ virtual void patchLight(); + /* 80317340 */ virtual void diff(u32); + /* 80317438 */ virtual void diffAmbColor(); + /* 8031743C */ virtual void diffMatColor(); + /* 80317440 */ virtual void diffColorChan(); + /* 80317444 */ virtual void diffLightObj(u32); + /* 80317304 */ virtual bool countDLSize(); + virtual void getType() = 0; + /* 80317448 */ virtual void setMatColor(u32, J3DGXColor const*); + /* 8000E0DC */ virtual void setMatColor(u32, J3DGXColor); + /* 8000E000 */ virtual _GXColor* getMatColor(u32); + /* 801A4C0C */ virtual void setAmbColor(u32, J3DGXColor const*); + /* 8000E0D4 */ virtual void setAmbColor(u32, J3DGXColor); + /* 8000DFF0 */ virtual bool getAmbColor(u32); + /* 8000E0E0 */ virtual void setColorChanNum(u8); + /* 8031744C */ virtual void setColorChanNum(u8 const*); + /* 8000E008 */ virtual bool getColorChanNum() const; + /* 8000E0D8 */ virtual void setColorChan(u32, J3DColorChan const&); + /* 80317450 */ virtual void setColorChan(u32, J3DColorChan const*); + /* 8000DFF8 */ virtual bool getColorChan(u32); + /* 801A4C08 */ virtual void setLight(u32, J3DLightObj*); + /* 80317454 */ virtual bool getLight(u32); + /* 80317460 */ virtual void setCullMode(u8 const*); + /* 8031745C */ virtual void setCullMode(u8); + /* 80317328 */ virtual s32 getCullMode() const; + /* 80317464 */ virtual bool getMatColorOffset() const; + /* 8031746C */ virtual bool getColorChanOffset() const; + /* 80317474 */ virtual void setMatColorOffset(u32); + /* 80317478 */ virtual void setColorChanOffset(u32); + /* 80317138 */ virtual ~J3DColorBlock(); +}; + +class J3DColorBlockLightOn : public J3DColorBlock { +public: + /* 80317580 */ void initialize(); + + /* 803187F4 */ virtual void load(); + /* 8031FF34 */ virtual void reset(J3DColorBlock*); + /* 803194E8 */ virtual void patch(); + /* 80319534 */ virtual void patchMatColor(); + /* 803196E0 */ virtual void patchLight(); + /* 8031A13C */ virtual void diff(u32); + /* 8031A1DC */ virtual void diffAmbColor(); + /* 8031A358 */ virtual void diffMatColor(); + /* 8031A4D4 */ virtual void diffColorChan(); + /* 8031A8E0 */ virtual void diffLightObj(u32); + /* 80317B94 */ virtual s32 countDLSize(); + /* 80322E80 */ virtual void getType(); + /* 80322EB8 */ virtual void setMatColor(u32, J3DGXColor const*); + /* 80322E8C */ virtual void setMatColor(u32, J3DGXColor); + /* 80322EE4 */ virtual void getMatColor(u32); + /* 80322F24 */ virtual void setAmbColor(u32, J3DGXColor const*); + /* 80322EF8 */ virtual void setAmbColor(u32, J3DGXColor); + /* 80322F50 */ virtual void getAmbColor(u32); + /* 80322F70 */ virtual void setColorChanNum(u8); + /* 80322F64 */ virtual void setColorChanNum(u8 const*); + /* 80322F78 */ virtual void getColorChanNum() const; + /* 80322F94 */ virtual void setColorChan(u32, J3DColorChan const&); + /* 80322F80 */ virtual void setColorChan(u32, J3DColorChan const*); + /* 80322FA8 */ virtual void getColorChan(u32); + /* 80322FBC */ virtual void setLight(u32, J3DLightObj*); + /* 80322FCC */ virtual void getLight(u32); + /* 80322FE4 */ virtual void setCullMode(u8 const*); + /* 80322FDC */ virtual void setCullMode(u8); + /* 80322FF0 */ virtual void getCullMode() const; + /* 80322FF8 */ virtual void getMatColorOffset() const; + /* 80323000 */ virtual void getColorChanOffset() const; + /* 80323008 */ virtual void setMatColorOffset(u32); + /* 80323010 */ virtual void setColorChanOffset(u32); + /* 80323018 */ virtual ~J3DColorBlockLightOn(); + +private: + /* 0x04 */ J3DGXColor mMatColor[2]; + /* 0x0C */ J3DGXColor mAmbColor[2]; + /* 0x14 */ u8 mColorChanNum; + /* 0x16 */ J3DColorChan mColorChan[4]; + /* 0x20 */ J3DLightObj* mLight[8]; + /* 0x40 */ u8 mCullMode; + /* 0x44 */ u32 mMatColorOffset; + /* 0x48 */ u32 mColorChanOffset; +}; // Size: 0x4C + +class J3DColorBlockLightOff : public J3DColorBlock { +public: + /* 8031747C */ void initialize(); + + /* 80317C0C */ virtual void load(); + /* 8031FD08 */ virtual void reset(J3DColorBlock*); + /* 80318EB4 */ virtual void patch(); + /* 80318F00 */ virtual void patchMatColor(); + /* 803190AC */ virtual void patchLight(); + /* 80319B4C */ virtual void diff(u32); + /* 80319BB4 */ virtual void diffMatColor(); + /* 80319D30 */ virtual void diffColorChan(); + /* 80317B84 */ virtual s32 countDLSize(); + /* 80323560 */ virtual void getType(); + /* 80323184 */ virtual void setMatColor(u32, J3DGXColor const*); + /* 80323158 */ virtual void setMatColor(u32, J3DGXColor); + /* 803231B0 */ virtual void getMatColor(u32); + /* 803231D0 */ virtual void setColorChanNum(u8); + /* 803231C4 */ virtual void setColorChanNum(u8 const*); + /* 803231D8 */ virtual void getColorChanNum() const; + /* 803231F4 */ virtual void setColorChan(u32, J3DColorChan const&); + /* 803231E0 */ virtual void setColorChan(u32, J3DColorChan const*); + /* 80323208 */ virtual void getColorChan(u32); + /* 80323224 */ virtual void setCullMode(u8 const*); + /* 8032321C */ virtual void setCullMode(u8); + /* 80323230 */ virtual void getCullMode() const; + /* 80323238 */ virtual void getMatColorOffset() const; + /* 80323240 */ virtual void getColorChanOffset() const; + /* 80323248 */ virtual void setMatColorOffset(u32); + /* 80323250 */ virtual void setColorChanOffset(u32); + /* 803170DC */ virtual ~J3DColorBlockLightOff(); + +private: + /* 0x04 */ J3DGXColor mMatColor[2]; + /* 0x0C */ u8 mColorChanNum; + /* 0x0E */ J3DColorChan mColorChan[4]; + /* 0x16 */ u8 mCullMode; + /* 0x18 */ u32 mMatColorOffset; + /* 0x1C */ u32 mColorChanOffset; +}; // Size: 0x20 + +class J3DColorBlockAmbientOn : public J3DColorBlockLightOff { +public: + /* 803174DC */ void initialize(); + + /* 8031816C */ virtual void load(); + /* 8031FDE4 */ virtual void reset(J3DColorBlock*); + /* 80317B8C */ virtual s32 countDLSize(); + /* 80323074 */ virtual void getType(); + /* 803230AC */ virtual void setAmbColor(u32, J3DGXColor const*); + /* 80323080 */ virtual void setAmbColor(u32, J3DGXColor); + /* 803230D8 */ virtual void getAmbColor(u32); + /* 803230EC */ virtual ~J3DColorBlockAmbientOn(); + +private: + /* 0x20 */ J3DGXColor mAmbColor[2]; +}; // Size: 0x28 + #endif /* J3DMATBLOCK_H */ diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 65305008df..d4219a9985 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -1,6 +1,107 @@ #ifndef J3DMATERIAL_H #define J3DMATERIAL_H +#include "JSystem/J3DGraphBase/J3DMatBlock.h" +#include "JSystem/J3DGraphBase/J3DPacket.h" +#include "JSystem/J3DGraphBase/J3DShape.h" +#include "JSystem/J3DGraphBase/J3DStruct.h" +#include "JSystem/J3DGraphBase/J3DTevs.h" +#include "JSystem/J3DGraphBase/J3DTexture.h" #include "dolphin/types.h" +class J3DJoint; +class J3DMaterialAnm; + +class J3DMaterial { +public: + /* 803157A0 */ void createColorBlock(u32); + /* 803159A0 */ void createTexGenBlock(u32); + /* 80315B04 */ void createTevBlock(int); + /* 80315E78 */ void createIndBlock(int); + /* 80315F60 */ void createPEBlock(u32, u32); + /* 80316100 */ void calcSizeColorBlock(u32); + /* 80316150 */ void calcSizeTexGenBlock(u32); + /* 8031617C */ void calcSizeTevBlock(int); + /* 803161C4 */ void calcSizeIndBlock(int); + /* 803161D8 */ void calcSizePEBlock(u32, u32); + /* 80316240 */ void initialize(); + /* 80316290 */ u32 countDLSize(); + /* 80316344 */ void makeDisplayList_private(J3DDisplayListObj*); + /* 80316AB0 */ void setCurrentMtx(); + /* 80316AC8 */ void calcCurrentMtx(); + /* 80316D68 */ void copy(J3DMaterial*); + /* 80316E90 */ s32 newSharedDisplayList(u32); + /* 80316F24 */ s32 newSingleSharedDisplayList(u32); + + /* 803169DC */ virtual void calc(f32 const (*)[4]); + /* 80316A54 */ virtual void calcDiffTexMtx(f32 const (*)[4]); + /* 80316620 */ virtual void makeDisplayList(); + /* 80316668 */ virtual void makeSharedDisplayList(); + /* 8031668C */ virtual void load(); + /* 803166DC */ virtual void loadSharedDL(); + /* 80316740 */ virtual void patch(); + /* 803167D8 */ virtual void diff(u32); + /* 80316E14 */ virtual void reset(); + /* 80316E70 */ virtual void change(); + + J3DMaterial* getNext() const { return mNext; } + J3DTevBlock* getTevBlock() const { return mTevBlock; } + J3DColorBlock* getColorBlock() const { return mColorBlock; } + J3DTexGenBlock* getTexGenBlock() const { return mTexGenBlock; } + J3DDisplayListObj* getSharedDisplayListObj() const { return mSharedDLObj; } + J3DMaterialAnm* getMaterialAnm() const { + if ((u32)mMaterialAnm < 0xC0000000) { + return mMaterialAnm; + } else { + return NULL; + } + } + +private: + /* 0x04 */ J3DMaterial* mNext; + /* 0x08 */ J3DShape* mShape; + /* 0x0C */ J3DJoint* mJoint; + /* 0x10 */ u32 mMaterialMode; + /* 0x14 */ u16 mIndex; + /* 0x18 */ u32 mInvalid; + /* 0x1C */ u32 field_0x1c; + /* 0x20 */ u32 field_0x20; + /* 0x24 */ J3DColorBlock* mColorBlock; + /* 0x28 */ J3DTexGenBlock* mTexGenBlock; + /* 0x2C */ J3DTevBlock* mTevBlock; + /* 0x30 */ J3DIndBlock* mIndBlock; + /* 0x34 */ J3DPEBlock* mPEBlock; + /* 0x38 */ J3DMaterial* field_0x38; + /* 0x3C */ J3DMaterialAnm* mMaterialAnm; + /* 0x40 */ J3DCurrentMtx mCurrentMtx; + /* 0x48 */ J3DDisplayListObj* mSharedDLObj; +}; + +class J3DPatchedMaterial : public J3DMaterial { +public: + /* 80316FB8 */ void initialize(); + + /* 80316FD8 */ virtual void makeDisplayList(); + /* 80316FDC */ virtual void makeSharedDisplayList(); + /* 80316FE0 */ virtual void load(); + /* 80316FFC */ virtual void loadSharedDL(); + /* 8031703C */ virtual void reset(); + /* 80317040 */ virtual void change(); +}; + +class J3DLockedMaterial : public J3DMaterial { +public: + /* 80317044 */ void initialize(); + + /* 803170D0 */ virtual void calc(f32 const (*)[4]); + /* 80317064 */ virtual void makeDisplayList(); + /* 80317068 */ virtual void makeSharedDisplayList(); + /* 8031706C */ virtual void load(); + /* 80317088 */ virtual void loadSharedDL(); + /* 803170C8 */ virtual void patch(); + /* 803170CC */ virtual void diff(u32); + /* 803170D4 */ virtual void reset(); + /* 803170D8 */ virtual void change(); +}; + #endif /* J3DMATERIAL_H */ diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 3ef6ac0840..cca1e0c60b 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -2,6 +2,7 @@ #define J3DPACKET_H #include "JSystem/J3DGraphBase/J3DSys.h" +#include "dolphin/gd/GDBase.h" #include "dolphin/mtx/mtx.h" #include "dolphin/types.h" @@ -18,6 +19,13 @@ class J3DTexture; class J3DDisplayListObj { public: + J3DDisplayListObj() { + mpData[0] = NULL; + mpData[1] = NULL; + mSize = 0; + mCapacity = 0; + } + J3DError newDisplayList(u32); J3DError newSingleDisplayList(u32); J3DError single_To_Double(); @@ -25,17 +33,20 @@ public: void swapBuffer(); void callDL() const; void beginDL(); - void endDL(); + u32 endDL(); void beginPatch(); - void endPatch(); + u32 endPatch(); - static u8 sGDLObj[16]; - static u8 sInterruptFlag[4 + 4 /* padding */]; + u8* getDisplayList(int idx) const { return (u8*)mpData[idx]; } + u32 getDisplayListSize() const { return mSize; } - void* mpData[2]; - u32 mSize; - u32 mCapacity; -}; + static GDLObj sGDLObj; + static s32 sInterruptFlag; + + /* 0x0 */ void* mpData[2]; + /* 0x8 */ u32 mSize; + /* 0xC */ u32 mCapacity; +}; // Size: 0x10 class J3DPacket { public: @@ -45,14 +56,14 @@ public: mpUserData = NULL; } - void addChildPacket(J3DPacket* pChild); + void addChildPacket(J3DPacket*); inline void clear() { mpNextSibling = NULL; mpFirstChild = NULL; } - virtual bool entry(J3DDrawBuffer* pDrawBuffer); + virtual bool entry(J3DDrawBuffer*); virtual void draw(); virtual ~J3DPacket(); @@ -60,7 +71,7 @@ public: /* 0x04 */ J3DPacket* mpNextSibling; /* 0x08 */ J3DPacket* mpFirstChild; /* 0x0C */ void* mpUserData; -}; // Size = 0x10 +}; // Size: 0x10 class J3DDrawPacket : public J3DPacket { public: @@ -70,31 +81,37 @@ public: J3DError newSingleDisplayList(u32); virtual void draw(); + J3DDisplayListObj* getDisplayListObj() { return mpDisplayListObj; } + void setDisplayListObj(J3DDisplayListObj* pObj) { mpDisplayListObj = pObj; } + public: - int mFlags; - char mPad0[0x0C]; // unk - J3DDisplayListObj* mpDisplayListObj; - J3DTexMtx* mpTexMtx; -}; + /* 0x10 */ u32 mFlags; + /* 0x14 */ char mPad0[0x0C]; // unk + /* 0x20 */ J3DDisplayListObj* mpDisplayListObj; + /* 0x24 */ J3DTexMtx* mpTexMtx; +}; // Size: 0x28 class J3DShapePacket : public J3DDrawPacket { public: J3DShapePacket(); - void calcDifferedBufferSize(u32); - void newDifferedDisplayList(u32); + u32 calcDifferedBufferSize(u32); + J3DError newDifferedDisplayList(u32); void prepareDraw() const; void drawFast(); virtual ~J3DShapePacket(); virtual void draw(); + void setShape(J3DShape* pShape) { mpShape = pShape; } + void setModel(J3DModel* pModel) { mpModel = pModel; } + public: - J3DShape* mpShape; - J3DMtxBuffer* mpMtxBuffer; - Mtx* mpViewMtx; - u32 mDiffFlag; - J3DModel* mpModel; -}; + /* 0x28 */ J3DShape* mpShape; + /* 0x2C */ J3DMtxBuffer* mpMtxBuffer; + /* 0x30 */ Mtx* mpViewMtx; + /* 0x34 */ u32 mDiffFlag; + /* 0x38 */ J3DModel* mpModel; +}; // Size: 0x3C class J3DMatPacket : public J3DDrawPacket { public: @@ -102,19 +119,19 @@ public: void addShapePacket(J3DShapePacket*); void beginDiff(); void endDiff(); - void isSame(J3DMatPacket*) const; + bool isSame(J3DMatPacket*) const; virtual ~J3DMatPacket(); - virtual bool entry(J3DDrawBuffer* pDrawBuffer); + virtual bool entry(J3DDrawBuffer*); virtual void draw(); public: - J3DShapePacket* mpShapePacket; - J3DShapePacket* mpFirstShapePacket; - J3DMaterial* mpMaterial; - s32 mSortFlags; - J3DTexture* mpTexture; - J3DMaterialAnm* mpMaterialAnm; -}; + /* 0x28 */ J3DShapePacket* mpShapePacket; + /* 0x2C */ J3DShapePacket* mpFirstShapePacket; + /* 0x30 */ J3DMaterial* mpMaterial; + /* 0x34 */ u32 mSortFlags; + /* 0x38 */ J3DTexture* mpTexture; + /* 0x3C */ J3DMaterialAnm* mpMaterialAnm; +}; // Size: 0x40 #endif /* J3DPACKET_H */ diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 5496e77094..9410d61ab9 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -31,7 +31,7 @@ public: /* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); /* 80314E28 */ void countBumpMtxNum() const; /* 80314EEC */ void loadVtxArray() const; - /* 80314F5C */ void isSameVcdVatCmd(J3DShape*); + /* 80314F5C */ bool isSameVcdVatCmd(J3DShape*); /* 80314F98 */ void makeVtxArrayCmd(); /* 80315260 */ void makeVcdVatCmd(); /* 80315300 */ void loadPreDrawSetting() const; @@ -42,6 +42,13 @@ public: /* 80315628 */ virtual void simpleDraw() const; /* 803156AC */ virtual void simpleDrawCache() const; + void onFlag(u32 flag) { mFlags |= flag; } + void offFlag(u32 flag) { mFlags &= ~flag; } + void setDrawMtxDataPointer(J3DDrawMtxData* pMtxData) { mDrawMtxData = pMtxData; } + void setVertexDataPointer(J3DVertexData* pVtxData) { mVertexData = pVtxData; } + void* getVcdVatCmd() const { return mVcdVatCmd; } + void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = pVatCmd; } + static void resetVcdVatCache() { sOldVcdVatCmd = NULL; } static void* sOldVcdVatCmd; diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 1b52660e25..bfc1f90c33 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -29,4 +29,66 @@ private: /* 0x04 */ u16 mUseMtxIndex; }; +class J3DShapeMtxConcatView : public J3DShapeMtx { +public: + /* 80314730 */ virtual ~J3DShapeMtxConcatView(); + /* 8031478C */ virtual void getType() const; + /* 80313C54 */ virtual void load() const; + /* 80314598 */ virtual void loadNrmMtx(int, u16) const; + /* 80313D28 */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const; + + /* 80313828 */ void loadMtxConcatView_PNGP(int, u16) const; + /* 803138C8 */ void loadMtxConcatView_PCPU(int, u16) const; + /* 8031396C */ void loadMtxConcatView_NCPU(int, u16) const; + /* 80313A14 */ void loadMtxConcatView_PNCPU(int, u16) const; + /* 80313AC8 */ void loadMtxConcatView_PNGP_LOD(int, u16) const; + + static u8 sMtxLoadPipeline[48]; + static u8 sMtxLoadLODPipeline[48]; + static u8 sMtxPtrTbl[8]; +}; + +class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView { +public: + /* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView(); + /* 8031458C */ virtual void getType() const; + /* 803143E4 */ virtual void load() const; +}; + +class J3DShapeMtxBBoardConcatView : public J3DShapeMtxConcatView { +public: + /* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView(); + /* 80314610 */ virtual void getType() const; + /* 803142D4 */ virtual void load() const; +}; + +class J3DShapeMtxMulti : public J3DShapeMtx { +public: + /* 803146B0 */ virtual ~J3DShapeMtxMulti(); + /* 8031470C */ virtual void getType() const; + /* 80314718 */ virtual void getUseMtxNum() const; + /* 80314720 */ virtual void getUseMtxIndex(u16) const; + /* 80313E4C */ virtual void load() const; + /* 80313EEC */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); + +private: + /* 0x6 */ u16 mUseMtxNum; + /* 0x8 */ u16* mUseMtxIndex; +}; + +class J3DShapeMtxMultiConcatView : public J3DShapeMtx { +public: + /* 8031461C */ virtual ~J3DShapeMtxMultiConcatView(); + /* 80314688 */ virtual void getType() const; + /* 80314694 */ virtual void getUseMtxNum() const; + /* 8031469C */ virtual void getUseMtxIndex(u16) const; + /* 80313FA4 */ virtual void load() const; + /* 803146AC */ virtual void loadNrmMtx(int, u16) const; + /* 8031419C */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const; + +private: + /* 0x6 */ u16 mUseMtxNum; + /* 0x8 */ u16* mUseMtxIndex; +}; + #endif /* J3DSHAPEMTX_H */ diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index 298a50870a..b5b91f4136 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -1,6 +1,7 @@ #ifndef J3DSYS_H #define J3DSYS_H +#include "dolphin/gx/GXTexture.h" #include "dolphin/mtx/mtx.h" #include "dolphin/types.h" @@ -21,19 +22,23 @@ class J3DDrawBuffer; class J3DTexture; struct J3DSys { - /* 0x00 */ Mtx mMtx; - /* 0x30 */ J3DMtxCalc* mMtxCalc; - /* 0x34 */ u32 mFlags; - /* 0x38 */ J3DModel* mModel; - /* 0x3C */ J3DMatPacket* mMatPacket; - /* 0x40 */ J3DShapePacket* mShapePacket; - /* 0x44 */ J3DShape* mShape; - /* 0x48 */ J3DDrawBuffer* mDrawBuffer[2]; - /* 0x50 */ u32 mDrawMode; - /* 0x54 */ u32 mMaterialMode; - /* 0x58 */ J3DTexture* mTexture; + /* 0x000 */ Mtx mMtx; + /* 0x030 */ J3DMtxCalc* mCurrentMtxCalc; + /* 0x034 */ u32 mFlags; + /* 0x038 */ J3DModel* mModel; + /* 0x03C */ J3DMatPacket* mMatPacket; + /* 0x040 */ J3DShapePacket* mShapePacket; + /* 0x044 */ J3DShape* mShape; + /* 0x048 */ J3DDrawBuffer* mDrawBuffer[2]; + /* 0x050 */ u32 mDrawMode; + /* 0x054 */ u32 mMaterialMode; + /* 0x058 */ J3DTexture* mTexture; + /* 0x05C */ u8 field_0x5c[0x10C - 0x5C]; + /* 0x10C */ void* mVtxPos; + /* 0x110 */ void* mVtxNrm; + /* 0x114 */ _GXColor* mVtxCol; + /* 0x118 */ Vec* mNBTScale; - u8 field_0x5c[0x11C - 0x5C]; /* 8030FDE8 */ J3DSys(); /* 8030FEC0 */ void loadPosMtxIndx(int, u16) const; /* 8030FEE4 */ void loadNrmMtxIndx(int, u16) const; @@ -57,9 +62,23 @@ struct J3DSys { void setDrawModeXlu() { mDrawMode = XLU; } + void setVtxPos(void* pVtxPos) { mVtxPos = pVtxPos; } + + void setVtxNrm(void* pVtxNrm) { mVtxNrm = pVtxNrm; } + + void setVtxCol(_GXColor* pVtxCol) { mVtxCol = pVtxCol; } + + void setModel(J3DModel* pModel) { mModel = pModel; } + + void setTexture(J3DTexture* pTex) { mTexture = pTex; } + + void onFlag(u32 flag) { mFlags |= flag; } + + void offFlag(u32 flag) { mFlags &= ~flag; } + static Mtx mCurrentMtx; - static f32 mCurrentS[3]; - static f32 mParentS[3]; + static Vec mCurrentS; + static Vec mParentS; static u16 sTexCoordScaleTable[34]; }; diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h index 8da6b41764..32f5e1277a 100644 --- a/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/include/JSystem/J3DGraphBase/J3DTevs.h @@ -3,4 +3,57 @@ #include "dolphin/types.h" +struct J3DTevStageInfo {}; + +struct J3DTevStage { + /* 8000E230 */ J3DTevStage(); + /* 8000E298 */ void setTevStageInfo(J3DTevStageInfo const&); + /* 8003AACC */ J3DTevStage(J3DTevStageInfo const&); + + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 mTevColorOp; + /* 0x2 */ u8 mTevColorAB; + /* 0x3 */ u8 mTevColorCD; + /* 0x4 */ u8 field_0x4; + /* 0x5 */ u8 mTevAlphaOp; + /* 0x6 */ u8 mTevAlphaAB; + /* 0x7 */ u8 mTevSwapModeInfo; +}; + +struct J3DIndTevStageInfo { + /* 0x0 */ u8 mIndStage; + /* 0x1 */ u8 mIndFormat; + /* 0x2 */ u8 mBiasSel; + /* 0x3 */ u8 mMtxSel; + /* 0x4 */ u8 mWrapS; + /* 0x5 */ u8 mWrapT; + /* 0x6 */ u8 mPrev; + /* 0x7 */ u8 mLod; + /* 0x8 */ u8 mAlphaSel; +}; + +struct J3DIndTevStage { + /* 8000E14C */ J3DIndTevStage(); + + /* 0x0 */ u32 mInfo; +}; + +struct J3DTevOrderInfo { + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 mTexMap; + /* 0x2 */ u8 field_0x2; +}; + +struct J3DTevOrder : public J3DTevOrderInfo { + /* 8000E140 */ J3DTevOrder(); +}; + +struct J3DTevSwapModeTable { + /* 8000E134 */ J3DTevSwapModeTable(); + + /* 0x0 */ u8 field_0x0; +}; // Size: 0x1 + +struct J3DTevSwapModeInfo {}; + #endif /* J3DTEVS_H */ diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index 743cfb48dd..52d11fca65 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -1,6 +1,72 @@ #ifndef J3DTEXTURE_H #define J3DTEXTURE_H +#include "JSystem/JUtility/JUTTexture.h" +#include "dolphin/mtx/mtx.h" #include "dolphin/types.h" +class J3DTexture { +private: + /* 0x0 */ u16 mNum; + /* 0x4 */ ResTIMG** mpRes; + +public: + /* 8031204C */ void loadGX(u16, _GXTexMapID) const; + /* 803121A4 */ void entryNum(u16); + /* 8031221C */ void addResTIMG(u16, ResTIMG const*); + /* 803366A4 */ virtual ~J3DTexture(); +}; + +struct J3DTextureSRTInfo { + /* 0x00 */ f32 field_0x0; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ s16 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; +}; // Size: 0x14 + +struct J3DTexMtxInfo { + /* 80325718 */ void operator=(J3DTexMtxInfo const&); + + /* 0x00 */ u8 field_0x0; + /* 0x01 */ u8 field_0x1; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; + /* 0x10 */ J3DTextureSRTInfo field_0x10; + /* 0x24 */ Mtx mEffectMtx; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ f32 field_0x60; +}; // Size: 0x64 + +class J3DTexMtx { +public: + /* 803238C4 */ void load(u32) const; + /* 80323900 */ void calc(f32 const (*)[4]); + /* 80323920 */ void calcTexMtx(f32 const (*)[4]); + /* 80323C0C */ void calcPostTexMtx(f32 const (*)[4]); + /* 80324358 */ void loadTexMtx(u32) const; + /* 803243BC */ void loadPostTexMtx(u32) const; + + J3DTexMtxInfo& getTexMtxInfo() { return mTexMtxInfo; } + +private: + /* 0x00 */ J3DTexMtxInfo mTexMtxInfo; + /* 0x64 */ Mtx mMtx; +}; // Size: 0x94 + +struct J3DTexCoordInfo { + /* 0x0 */ u8 mTexGenType; + /* 0x1 */ u8 mTexGenSrc; + /* 0x2 */ u8 mTexGenMtx; +}; + +struct J3DTexCoord : public J3DTexCoordInfo { + /* 8000E464 */ J3DTexCoord(); + + /* 0x4 */ u16 mTexMtxReg; +}; // Size: 0x6 + #endif /* J3DTEXTURE_H */ diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/include/JSystem/J3DGraphBase/J3DTransform.h index 5ec5353ba5..1bdc7ebb88 100644 --- a/include/JSystem/J3DGraphBase/J3DTransform.h +++ b/include/JSystem/J3DGraphBase/J3DTransform.h @@ -1,6 +1,20 @@ #ifndef J3DTRANSFORM_H #define J3DTRANSFORM_H +#include "dolphin/mtx/mtxvec.h" #include "dolphin/types.h" +struct J3DTransformInfo { + /* 0x00 */ Vec mScale; + /* 0x0C */ SVec mRotation; + /* 0x14 */ Vec mTranslate; +}; // Size: 0x20 + +extern J3DTransformInfo const j3dDefaultTransformInfo; +extern Vec const j3dDefaultScale; +extern Mtx const j3dDefaultMtx; + +void J3DGetTranslateRotateMtx(J3DTransformInfo const&, Mtx); +void J3DGetTranslateRotateMtx(s16, s16, s16, f32, f32, f32, Mtx); + #endif /* J3DTRANSFORM_H */ diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/include/JSystem/J3DGraphBase/J3DVertex.h index 3960e5e76a..9543468037 100644 --- a/include/JSystem/J3DGraphBase/J3DVertex.h +++ b/include/JSystem/J3DGraphBase/J3DVertex.h @@ -1,6 +1,94 @@ #ifndef J3DVERTEX_H #define J3DVERTEX_H +#include "dolphin/gx/GX.h" #include "dolphin/types.h" +class J3DModel; +struct J3DAnmVtxColor; + +struct J3DVtxColorCalc { + /* 8032E180 */ void calc(J3DModel*); + + /* 0x0 */ void* vtable; // inlined vtable? + /* 0x4 */ u32 mFlags; + /* 0x8 */ J3DAnmVtxColor* mpVtxColor; +}; + +class J3DVertexData { +public: + J3DVertexData(); + + void* getVtxPosArray() const { return mVtxPosArray; } + + void* getVtxNrmArray() const { return mVtxNrmArray; } + + _GXColor* getVtxColorArray(u8 idx) const { return mVtxColorArray[idx]; } + + u32 getNrmNum() const { return mNrmNum; } + + u32 getVtxNum() const { return mVtxNum; } + +private: + /* 0x00 */ u32 mVtxNum; + /* 0x04 */ u32 mNrmNum; + /* 0x08 */ u32 mColNum; + /* 0x0C */ u32 field_0xc; + /* 0x10 */ u32 field_0x10; + /* 0x14 */ void* mVtxAttrFmtList; + /* 0x18 */ void* mVtxPosArray; + /* 0x1C */ void* mVtxNrmArray; + /* 0x20 */ void* mVtxNBTArray; + /* 0x24 */ _GXColor* mVtxColorArray[2]; + /* 0x2C */ void* mVtxTexCoordArray[8]; + /* 0x4C */ u8 mVtxPosFrac; + /* 0x50 */ _GXCompType mVtxPosType; + /* 0x54 */ u8 mVtxNrmFrac; + /* 0x58 */ _GXCompType mVtxNrmType; +}; + +class J3DVertexBuffer { +public: + /* 80310F78 */ void setVertexData(J3DVertexData*); + /* 80310FD8 */ void init(); + /* 80311030 */ ~J3DVertexBuffer(); + /* 8031106C */ void setArray() const; + /* 80311090 */ s32 copyLocalVtxPosArray(u32); + /* 803111B0 */ s32 copyLocalVtxNrmArray(u32); + /* 803112D0 */ s32 copyLocalVtxArray(u32); + /* 80311478 */ s32 allocTransformedVtxPosArray(); + /* 8031152C */ s32 allocTransformedVtxNrmArray(); + + void setCurrentVtxPos(void* pVtxPos) { mCurrentVtxPos = pVtxPos; } + + void setCurrentVtxNrm(void* pVtxNrm) { mCurrentVtxNrm = pVtxNrm; } + + void setCurrentVtxCol(_GXColor* pVtxCol) { mCurrentVtxCol = pVtxCol; } + + void frameInit() { + setCurrentVtxPos(mVtxPosArray[0]); + setCurrentVtxNrm(mVtxNrmArray[0]); + setCurrentVtxCol(mVtxColArray[0]); + } + +private: + /* 0x00 */ J3DVertexData* mVtxData; + /* 0x04 */ void* mVtxPosArray[2]; + /* 0x0C */ void* mVtxNrmArray[2]; + /* 0x14 */ _GXColor* mVtxColArray[2]; + /* 0x1C */ void* mTransformedVtxPosArray[2]; + /* 0x24 */ void* mTransformedVtxNrmArray[2]; + /* 0x2C */ void* mCurrentVtxPos; + /* 0x30 */ void* mCurrentVtxNrm; + /* 0x34 */ _GXColor* mCurrentVtxCol; +}; // Size: 0x38 + +struct VertexNormal { + u8 data[0xC]; +}; + +struct VertexPosition { + u8 data[0xC]; +}; + #endif /* J3DVERTEX_H */ diff --git a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h index 99253a0e58..265bc83c18 100644 --- a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h @@ -3,4 +3,13 @@ #include "dolphin/types.h" +struct J3DAnmLoaderDataBaseFlag {}; + +struct J3DAnmBase; + +struct J3DAnmLoaderDataBase { + /* 80337B40 */ void load(void const*, J3DAnmLoaderDataBaseFlag); + /* 80338134 */ void setResource(J3DAnmBase*, void const*); +}; + #endif /* J3DANMLOADER_H */ diff --git a/include/JSystem/J3DGraphLoader/J3DClusterLoader.h b/include/JSystem/J3DGraphLoader/J3DClusterLoader.h index b67571f054..78e22688b1 100644 --- a/include/JSystem/J3DGraphLoader/J3DClusterLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DClusterLoader.h @@ -3,4 +3,8 @@ #include "dolphin/types.h" +struct J3DClusterLoaderDataBase { + /* 80334130 */ void load(void const*); +}; + #endif /* J3DCLUSTERLOADER_H */ diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/include/JSystem/J3DGraphLoader/J3DModelLoader.h index ced256a531..c86393eb81 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DModelLoader.h @@ -3,4 +3,9 @@ #include "dolphin/types.h" +class J3DModelLoaderDataBase { +public: + /* 803346BC */ void load(void const*, u32); +}; + #endif /* J3DMODELLOADER_H */ diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h index 802d24f2aa..d71f5de5e7 100644 --- a/include/JSystem/JMath/JMath.h +++ b/include/JSystem/JMath/JMath.h @@ -1,6 +1,21 @@ #ifndef JMATH_H #define JMATH_H +#include "dolphin/mtx/mtx.h" #include "dolphin/types.h" +void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32); + +inline f32 JMAFastReciprocal(f32 value) { + return __fres(value); +} + +namespace JMath { + +inline f32 fastReciprocal(f32 value) { + return JMAFastReciprocal(value); +} + +}; // namespace JMath + #endif /* JMATH_H */ diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h index 23821622c7..b36c6b6bd1 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/include/JSystem/JParticle/JPAParticle.h @@ -17,10 +17,9 @@ struct JPABaseEmitter { class JPAParticleCallBack { public: - virtual void temp(); // temp to build OK, remove later ~JPAParticleCallBack(); - virtual void draw(JPABaseEmitter*, JPABaseParticle*); virtual void execute(JPABaseEmitter*, JPABaseParticle*); + virtual void draw(JPABaseEmitter*, JPABaseParticle*); }; #endif /* JPAPARTICLE_H */ diff --git a/include/JSystem/JUtility/JUTTexture.h b/include/JSystem/JUtility/JUTTexture.h index c573f2731a..901503df7e 100644 --- a/include/JSystem/JUtility/JUTTexture.h +++ b/include/JSystem/JUtility/JUTTexture.h @@ -7,29 +7,29 @@ struct ResTIMG { /* Acts as the header to image data. Usually texture data immediately follows it, so any pointer arithmetic to go past the end of this structure is so that a variable sized allocated buffer can be accessed. */ - u8 format; - bool alphaEnabled; - u16 width; - u16 height; - u8 wrapS; - u8 wrapT; - bool palettesEnabled; - u8 paletteFormat; - u16 paletteCount; - u32 paletteOffset; - bool mipmapEnabled; - bool doEdgeLOD; - bool biasClamp; - u8 maxAnisotropy; - u8 minFilter; - u8 magFilter; - s8 minLOD; - s8 maxLOD; - u8 mipmapCount; - u8 unknown; - s16 LODBias; - u32 texDataOffset; -}; + /* 0x00 */ u8 format; + /* 0x01 */ bool alphaEnabled; + /* 0x02 */ u16 width; + /* 0x04 */ u16 height; + /* 0x06 */ u8 wrapS; + /* 0x07 */ u8 wrapT; + /* 0x08 */ bool palettesEnabled; + /* 0x09 */ u8 paletteFormat; + /* 0x0A */ u16 paletteCount; + /* 0x0C */ u32 paletteOffset; + /* 0x10 */ bool mipmapEnabled; + /* 0x11 */ bool doEdgeLOD; + /* 0x12 */ bool biasClamp; + /* 0x13 */ u8 maxAnisotropy; + /* 0x14 */ u8 minFilter; + /* 0x15 */ u8 magFilter; + /* 0x16 */ s8 minLOD; + /* 0x17 */ s8 maxLOD; + /* 0x18 */ u8 mipmapCount; + /* 0x19 */ u8 unknown; + /* 0x1A */ s16 LODBias; + /* 0x1B */ u32 texDataOffset; +}; // Size: 0x1C class JUTTexture { public: diff --git a/include/MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h b/include/MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h index c36ea98f28..9a30c9db61 100644 --- a/include/MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h +++ b/include/MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h @@ -3,4 +3,8 @@ #include "dolphin/types.h" +extern "C" { +void* memcpy(void*, const void*, s32); +}; + #endif /* MSL_COMMON_SRC_STRING_H */ diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index ad1bf45b45..bcc78040d0 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -1,17 +1,9 @@ #ifndef C_SXYZ_H #define C_SXYZ_H +#include "dolphin/mtx/vec.h" #include "dolphin/types.h" -struct SVec { - s16 x, y, z; - - void set(s16 oX, s16 oY, s16 oZ) { - x = oX; - y = oY; - z = oZ; - } -}; class csXyz : public SVec { public: static const csXyz Zero; diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h index 84fd08b103..cdce05bcbf 100644 --- a/include/d/a/d_a_alink.h +++ b/include/d/a/d_a_alink.h @@ -29,11 +29,10 @@ class J2DScreen; class J2DPane; class J2DAnmBase; -class daAlink_lockCursor_c { +class daAlink_lockCursor_c : public dDlst_base_c { public: /* 80125F14 */ void create(); /* 80126358 */ void update(); - virtual void temp(); // temp to build OK, remove later /* 80126424 */ virtual void draw(); /* 800CFE68 */ virtual ~daAlink_lockCursor_c(); @@ -58,10 +57,10 @@ private: class daAlink_sight_c : public daPy_sightPacket_c { public: /* 80126650 */ void create(); - virtual void test(); // temp to build OK, remove later + /* 80126710 */ void onLockFlg(); + /* 801266C0 */ virtual void draw(); /* 800CFDF4 */ virtual ~daAlink_sight_c(); - /* 80126710 */ void onLockFlg(); private: /* 0x4C */ bool mLockFlag; @@ -74,7 +73,7 @@ public: /* 801256EC */ void initBlur(f32, int, cXyz const*, cXyz const*, cXyz const*); /* 8012589C */ void copyBlur(cXyz const*, cXyz const*, cXyz const*); /* 80125B0C */ void traceBlur(cXyz const*, cXyz const*, s16); - virtual void temp(); // temp to build OK, remove later + /* 80125BF4 */ virtual void draw(); /* 800CFD58 */ virtual ~daAlink_blur_c(); @@ -93,9 +92,8 @@ private: class dAlink_bottleWaterPcallBack_c : public JPAParticleCallBack { public: - virtual void temp(); // temp to build OK, remove later - /* 800CFCF8 */ virtual ~dAlink_bottleWaterPcallBack_c(); /* 80124A2C */ virtual void execute(JPABaseEmitter*, JPABaseParticle*); + /* 800CFCF8 */ virtual ~dAlink_bottleWaterPcallBack_c(); private: /* 0x04 */ s16 mHitFlg; @@ -2010,7 +2008,6 @@ public: /* 80140984 */ void statusWindowDraw(); /* 80140AC8 */ void resetStatusWindow(); - virtual void unk(); virtual bool getMidnaAtnPos(void) const; virtual void setMidnaMsgNum(fopAc_ac_c*, u16); virtual Mtx* getModelMtx(void); @@ -2079,7 +2076,7 @@ public: virtual void setOutPower(float, short, int); virtual void setGrabCollisionOffset(float, float, cBgS_PolyInfo*); virtual void onFrollCrashFlg(u8, int); - virtual Mtx* getModelJointMtx(u16); + virtual MtxP getModelJointMtx(u16); virtual bool getHeadMtx(void); virtual bool setHookshotCarryOffset(unsigned int, cXyz const*); virtual bool checkIronBallReturn(void) const; diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index 0685c9fdb1..5807f9b45c 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -11,10 +11,10 @@ #include "dolphin/types.h" #include "f_op/f_op_actor.h" -class daPy_sightPacket_c { - /* 80140CDC */ ~daPy_sightPacket_c(); - virtual void test(); // temp to build OK, remove later +class daPy_sightPacket_c : public dDlst_base_c { /* 8015F1A0 */ virtual void draw(); + /* 80140CDC */ virtual ~daPy_sightPacket_c(); + /* 8015F2FC */ void setSight(); /* 8015F384 */ void setSightImage(ResTIMG*); @@ -80,7 +80,6 @@ private: fopAc_ac_c* mActor; }; -#pragma pack(push, 1) class daPy_frameCtrl_c : public J3DFrameCtrl { public: /* 80140D24 */ ~daPy_frameCtrl_c(); @@ -103,7 +102,6 @@ private: /* 0x14 */ u16 mEndFlg; /* 0x16 */ u16 mNowSetFlg; }; -#pragma pack(pop) class daPy_demo_c { public: @@ -294,6 +292,7 @@ public: virtual bool getModelJointMtx(u16); virtual bool getHeadMtx(void); virtual bool setHookshotCarryOffset(unsigned int, cXyz const*); + // virtual void checkCutJumpCancelTurn() const; virtual bool checkIronBallReturn(void) const; virtual bool checkIronBallGroundStop(void) const; virtual bool checkSingleBoarBattleSecondBowReady(void) const; diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 7758314a47..0edb7ab71b 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -7,8 +7,6 @@ #include "dolphin/types.h" #include "m_Do/m_Do_ext.h" -struct J3DTransformInfo {}; - class dAttHint_c { public: dAttHint_c() {} diff --git a/include/d/d_resorce.h b/include/d/d_resorce.h index 378ae0cd93..b19e2993c8 100644 --- a/include/d/d_resorce.h +++ b/include/d/d_resorce.h @@ -91,8 +91,4 @@ public: /* 0x1200 */ dRes_info_c mStageInfo[0x40]; }; // Size: 0x1B00 -struct J3DAnmBase { - /* 8003C734 */ ~J3DAnmBase(); -}; - #endif /* D_D_RESORCE_H */ diff --git a/include/dolphin/gd/GDBase.h b/include/dolphin/gd/GDBase.h index f08ff18025..ef685d3519 100644 --- a/include/dolphin/gd/GDBase.h +++ b/include/dolphin/gd/GDBase.h @@ -3,4 +3,23 @@ #include "dolphin/types.h" +struct GDLObj { + /* 0x0 */ u8* start; + /* 0x4 */ u32 length; + /* 0x8 */ u8* ptr; + /* 0xC */ u8* end; +}; // Size: 0x10 + +extern "C" void GDInitGDLObj(GDLObj*, u8*, u32); + +extern GDLObj* __GDCurrentDL; + +inline void GDSetCurrent(GDLObj* obj) { + __GDCurrentDL = obj; +} + +inline u32 GDGetGDLObjOffset(GDLObj* obj) { + return (u32)(obj->ptr - obj->start); +} + #endif /* GDBASE_H */ diff --git a/include/dolphin/gx/GXTexture.h b/include/dolphin/gx/GXTexture.h index 6b8684c21d..1823855bf1 100644 --- a/include/dolphin/gx/GXTexture.h +++ b/include/dolphin/gx/GXTexture.h @@ -10,11 +10,11 @@ typedef struct _GXColor { u8 a; } GXColor; -struct _GXColorS10 { +typedef struct _GXColorS10 { s16 r; s16 g; s16 b; s16 a; -}; +} GXColorS10; #endif /* GXTEXTURE_H */ diff --git a/include/dolphin/mtx/mtx.h b/include/dolphin/mtx/mtx.h index 8124777766..21e9bf3616 100644 --- a/include/dolphin/mtx/mtx.h +++ b/include/dolphin/mtx/mtx.h @@ -6,6 +6,9 @@ #include "dolphin/types.h" typedef float Mtx[3][4]; +typedef float Mtx33[3][3]; +typedef float Mtx23[2][3]; +typedef f32 (*MtxP)[4]; extern "C" { void PSMTXIdentity(Mtx matrix); diff --git a/include/dolphin/mtx/vec.h b/include/dolphin/mtx/vec.h index 174f84ad9c..a1accce9bc 100644 --- a/include/dolphin/mtx/vec.h +++ b/include/dolphin/mtx/vec.h @@ -23,6 +23,16 @@ struct Vec { } }; +struct SVec { + s16 x, y, z; + + void set(s16 oX, s16 oY, s16 oZ) { + x = oX; + y = oY; + z = oZ; + } +}; + extern "C" { void PSVECAdd(const Vec* src_a, const Vec* src_b, Vec* dst); void PSVECSubtract(const Vec* a, const Vec* b, Vec* dst); diff --git a/include/init.h b/include/init.h index 177006544b..bfe78198e7 100644 --- a/include/init.h +++ b/include/init.h @@ -1,6 +1,7 @@ #ifndef INIT_H #define INIT_H +#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h" #include "dolphin/types.h" #endif /* INIT_H */ diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index dc90469fbd..47c48def6c 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -8,39 +8,6 @@ #include "JSystem/JKernel/JKRSolidHeap.h" #include "global.h" -struct J3DMaterialTable; -struct J3DAnmTextureSRTKey { - /* 80329E5C */ J3DAnmTextureSRTKey(); - /* 8032B0C0 */ void searchUpdateMaterialID(J3DMaterialTable*); -}; - -struct J3DAnmTexPattern { - /* 8032AED8 */ J3DAnmTexPattern(); - /* 8032AF50 */ void getTexNo(u16, u16*) const; - /* 8032B004 */ void searchUpdateMaterialID(J3DMaterialTable*); -}; - -struct J3DAnmTevRegKey { - /* 8032B780 */ void searchUpdateMaterialID(J3DMaterialTable*); -}; - -struct J3DAnmColor { - /* 8032A8A4 */ void searchUpdateMaterialID(J3DMaterialTable*); -}; - -struct J3DMaterialTable { - /* 8032FAF4 */ void entryMatColorAnimator(J3DAnmColor*); - /* 8032FBC8 */ void entryTexNoAnimator(J3DAnmTexPattern*); - /* 8032FCC4 */ void entryTexMtxAnimator(J3DAnmTextureSRTKey*); - /* 8032FE70 */ void entryTevRegAnimator(J3DAnmTevRegKey*); -}; - -struct J3DAnmTransform { - /* 8003B93C */ ~J3DAnmTransform(); - /* 8003C77C */ bool getKind() const; - /* 80328E40 */ J3DAnmTransform(s16, f32*, s16*, f32*); -}; - class mDoExt_baseAnm { public: mDoExt_baseAnm() {} diff --git a/libs/JSystem/J3DGraphAnimator/J3DAnimation.cpp b/libs/JSystem/J3DGraphAnimator/J3DAnimation.cpp index 5e044b722a..19bf206bbc 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DAnimation.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DAnimation.cpp @@ -7,139 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct _GXColorS10 {}; - -struct _GXColor {}; - -struct JUTNameTab { - /* 802DE9A0 */ JUTNameTab(); - /* 802DEA58 */ void getIndex(char const*) const; - /* 802DEAF8 */ void getName(u16) const; -}; - -struct J3DTransformInfo {}; - -struct J3DTextureSRTInfo {}; - -struct J3DModelData {}; - -struct J3DMaterialTable {}; - -struct J3DAnmVtxColorKey { - /* 8032A4E0 */ J3DAnmVtxColorKey(); - /* 8032A53C */ void getColor(u8, u16, _GXColor*) const; - /* 8032BF50 */ ~J3DAnmVtxColorKey(); - /* 8032BFBC */ s32 getKind() const; -}; - -struct J3DAnmVtxColorFull { - /* 8032A30C */ J3DAnmVtxColorFull(); - /* 8032A368 */ void getColor(u8, u16, _GXColor*) const; - /* 8032BFC4 */ ~J3DAnmVtxColorFull(); - /* 8032C030 */ s32 getKind() const; -}; - -struct J3DAnmVtxColor { - /* 8032A29C */ J3DAnmVtxColor(); - /* 8032BC50 */ ~J3DAnmVtxColor(); - /* 8032C038 */ s32 getKind() const; - /* 8032C040 */ void getColor(u8, u16, _GXColor*) const; -}; - -struct J3DAnmTransformKey { - /* 80329A34 */ void calcTransform(f32, u16, J3DTransformInfo*) const; -}; - -struct J3DAnmTransformFullWithLerp { - /* 803291F0 */ void getTransform(u16, J3DTransformInfo*) const; - /* 8032C228 */ ~J3DAnmTransformFullWithLerp(); - /* 8032C2A4 */ s32 getKind() const; -}; - -struct J3DAnmTransformFull { - /* 80328E90 */ void getTransform(u16, J3DTransformInfo*) const; - /* 8032C2AC */ ~J3DAnmTransformFull(); - /* 8032C318 */ s32 getKind() const; -}; - -struct J3DAnmTransform { - /* 80328E40 */ J3DAnmTransform(s16, f32*, s16*, f32*); -}; - -struct J3DAnmTextureSRTKey { - /* 80329E5C */ J3DAnmTextureSRTKey(); - /* 80329F14 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const; - /* 8032B0C0 */ void searchUpdateMaterialID(J3DMaterialTable*); - /* 8032B1D4 */ void searchUpdateMaterialID(J3DModelData*); - /* 8032C198 */ ~J3DAnmTextureSRTKey(); - /* 8032C220 */ s32 getKind() const; -}; - -struct J3DAnmTexPattern { - /* 8032AED8 */ J3DAnmTexPattern(); - /* 8032AF50 */ void getTexNo(u16, u16*) const; - /* 8032B004 */ void searchUpdateMaterialID(J3DMaterialTable*); - /* 8032B09C */ void searchUpdateMaterialID(J3DModelData*); - /* 8032BD20 */ ~J3DAnmTexPattern(); - /* 8032BD94 */ s32 getKind() const; -}; - -struct J3DAnmTevRegKey { - /* 8032AE18 */ J3DAnmTevRegKey(); - /* 8032B1F8 */ void getTevColorReg(u16, _GXColorS10*) const; - /* 8032B4BC */ void getTevKonstReg(u16, _GXColor*) const; - /* 8032B780 */ void searchUpdateMaterialID(J3DMaterialTable*); - /* 8032B87C */ void searchUpdateMaterialID(J3DModelData*); - /* 8032BD9C */ ~J3DAnmTevRegKey(); - /* 8032BE24 */ s32 getKind() const; -}; - -struct J3DAnmKeyTableBase {}; - -struct J3DAnmColorKey { - /* 8032AB00 */ J3DAnmColorKey(); - /* 8032AB54 */ void getColor(u16, _GXColor*) const; - /* 8032BE2C */ ~J3DAnmColorKey(); - /* 8032BEB0 */ s32 getKind() const; -}; - -struct J3DAnmColorFull { - /* 8032A93C */ J3DAnmColorFull(); - /* 8032A990 */ void getColor(u16, _GXColor*) const; - /* 8032BEB8 */ ~J3DAnmColorFull(); - /* 8032BF3C */ s32 getKind() const; -}; - -struct J3DAnmColor { - /* 8032A828 */ J3DAnmColor(); - /* 8032A8A4 */ void searchUpdateMaterialID(J3DMaterialTable*); - /* 8032BCAC */ ~J3DAnmColor(); - /* 8032BF44 */ bool getKind() const; - /* 8032BF4C */ void getColor(u16, _GXColor*) const; -}; - -struct J3DAnmClusterKey { - /* 8032A218 */ void getWeight(u16) const; - /* 8032C044 */ ~J3DAnmClusterKey(); - /* 8032C0B0 */ s32 getKind() const; -}; - -struct J3DAnmClusterFull { - /* 8032A184 */ void getWeight(u16) const; - /* 8032C124 */ ~J3DAnmClusterFull(); - /* 8032C190 */ s32 getKind() const; -}; - -struct J3DAnmCluster { - /* 8032C0B8 */ ~J3DAnmCluster(); - /* 8032C114 */ s32 getKind() const; - /* 8032C11C */ void getWeight(u16) const; -}; - // // Forward References: // @@ -783,7 +650,8 @@ extern "C" asm void func_8032BAD4(void* _this, f32 param_0, J3DAnmKeyTableBase* #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmVtxColor::~J3DAnmVtxColor() { +extern "C" asm void __dt__14J3DAnmVtxColorFv() { + // asm J3DAnmVtxColor::~J3DAnmVtxColor() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__14J3DAnmVtxColorFv.s" } @@ -793,7 +661,8 @@ asm J3DAnmVtxColor::~J3DAnmVtxColor() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmColor::~J3DAnmColor() { +extern "C" asm void __dt__11J3DAnmColorFv() { + // asm J3DAnmColor::~J3DAnmColor() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__11J3DAnmColorFv.s" } @@ -803,7 +672,8 @@ asm J3DAnmColor::~J3DAnmColor() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTexPattern::~J3DAnmTexPattern() { +extern "C" asm void __dt__16J3DAnmTexPatternFv() { + // asm J3DAnmTexPattern::~J3DAnmTexPattern() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__16J3DAnmTexPatternFv.s" } @@ -818,7 +688,8 @@ s32 J3DAnmTexPattern::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTevRegKey::~J3DAnmTevRegKey() { +extern "C" asm void __dt__15J3DAnmTevRegKeyFv() { + // asm J3DAnmTevRegKey::~J3DAnmTevRegKey() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__15J3DAnmTevRegKeyFv.s" } @@ -833,7 +704,8 @@ s32 J3DAnmTevRegKey::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmColorKey::~J3DAnmColorKey() { +extern "C" asm void __dt__14J3DAnmColorKeyFv() { + // asm J3DAnmColorKey::~J3DAnmColorKey() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__14J3DAnmColorKeyFv.s" } @@ -848,7 +720,8 @@ s32 J3DAnmColorKey::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmColorFull::~J3DAnmColorFull() { +extern "C" asm void __dt__15J3DAnmColorFullFv() { + // asm J3DAnmColorFull::~J3DAnmColorFull() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__15J3DAnmColorFullFv.s" } @@ -873,7 +746,8 @@ void J3DAnmColor::getColor(u16 param_0, _GXColor* param_1) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmVtxColorKey::~J3DAnmVtxColorKey() { +extern "C" asm void __dt__17J3DAnmVtxColorKeyFv() { + // asm J3DAnmVtxColorKey::~J3DAnmVtxColorKey() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__17J3DAnmVtxColorKeyFv.s" } @@ -888,7 +762,8 @@ s32 J3DAnmVtxColorKey::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmVtxColorFull::~J3DAnmVtxColorFull() { +extern "C" asm void __dt__18J3DAnmVtxColorFullFv() { + // asm J3DAnmVtxColorFull::~J3DAnmVtxColorFull() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__18J3DAnmVtxColorFullFv.s" } @@ -914,7 +789,8 @@ void J3DAnmVtxColor::getColor(u8 param_0, u16 param_1, _GXColor* param_2) const #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmClusterKey::~J3DAnmClusterKey() { +extern "C" asm void __dt__16J3DAnmClusterKeyFv() { + // asm J3DAnmClusterKey::~J3DAnmClusterKey() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__16J3DAnmClusterKeyFv.s" } @@ -929,7 +805,8 @@ s32 J3DAnmClusterKey::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmCluster::~J3DAnmCluster() { +extern "C" asm void __dt__13J3DAnmClusterFv() { + // asm J3DAnmCluster::~J3DAnmCluster() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__13J3DAnmClusterFv.s" } @@ -954,7 +831,8 @@ asm void J3DAnmCluster::getWeight(u16 param_0) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmClusterFull::~J3DAnmClusterFull() { +extern "C" asm void __dt__17J3DAnmClusterFullFv() { + // asm J3DAnmClusterFull::~J3DAnmClusterFull() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__17J3DAnmClusterFullFv.s" } @@ -969,7 +847,8 @@ s32 J3DAnmClusterFull::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTextureSRTKey::~J3DAnmTextureSRTKey() { +extern "C" asm void __dt__19J3DAnmTextureSRTKeyFv() { + // asm J3DAnmTextureSRTKey::~J3DAnmTextureSRTKey() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__19J3DAnmTextureSRTKeyFv.s" } @@ -1007,7 +886,8 @@ SECTION_DATA extern void* __vt__19J3DAnmTransformFull[5 + 1 /* padding */] = { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTransformFullWithLerp::~J3DAnmTransformFullWithLerp() { +extern "C" asm void __dt__27J3DAnmTransformFullWithLerpFv() { + // asm J3DAnmTransformFullWithLerp::~J3DAnmTransformFullWithLerp() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__27J3DAnmTransformFullWithLerpFv.s" } @@ -1022,7 +902,8 @@ s32 J3DAnmTransformFullWithLerp::getKind() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTransformFull::~J3DAnmTransformFull() { +extern "C" asm void __dt__19J3DAnmTransformFullFv() { + // asm J3DAnmTransformFull::~J3DAnmTransformFull() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DAnimation/__dt__19J3DAnmTransformFullFv.s" } diff --git a/libs/JSystem/J3DGraphAnimator/J3DCluster.cpp b/libs/JSystem/J3DGraphAnimator/J3DCluster.cpp index 54badd4152..95922402eb 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DCluster.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DCluster.cpp @@ -19,10 +19,6 @@ struct J3DVertexBuffer {}; struct J3DModel {}; -struct J3DCluster {}; - -struct J3DClusterKey {}; - struct J3DAnmCluster {}; struct J3DDeformData { diff --git a/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp b/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp index 3deb5a1b6f..d015ee4c3b 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp @@ -4,6 +4,9 @@ // #include "JSystem/J3DGraphAnimator/J3DJoint.h" +#include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h" +#include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/JMath/JMath.h" #include "dol2asm.h" #include "dolphin/types.h" @@ -11,54 +14,6 @@ // Types: // -struct Vec {}; - -struct J3DTransformInfo {}; - -struct J3DSys { - static u8 mCurrentMtx[48]; - static f32 mCurrentS[3]; - static f32 mParentS[3]; -}; - -struct J3DMtxCalcJ3DSysInitMaya { - /* 8032ECAC */ void init(Vec const&, f32 const (&)[3][4]); -}; - -struct J3DMtxCalcJ3DSysInitBasic { - /* 8032EC28 */ void init(Vec const&, f32 const (&)[3][4]); -}; - -struct J3DMtxCalcCalcTransformSoftimage { - /* 8032EE50 */ void calcTransform(J3DTransformInfo const&); -}; - -struct J3DMtxCalcCalcTransformMaya { - /* 8032EFBC */ void calcTransform(J3DTransformInfo const&); -}; - -struct J3DMtxCalcCalcTransformBasic { - /* 8032ED30 */ void calcTransform(J3DTransformInfo const&); -}; - -struct J3DMtxCalc { - static u8 mMtxBuffer[4]; - static u8 mJoint[4]; -}; - -struct J3DMaterial { - /* 80316AB0 */ void setCurrentMtx(); -}; - -struct J3DJoint { - /* 8032F13C */ void appendChild(J3DJoint*); - /* 8032F170 */ J3DJoint(); - /* 8032F254 */ void entryIn(); - /* 8032F3F8 */ void recursiveCalc(); - - static u8 mCurrentMtxCalc[4 + 4 /* padding */]; -}; - struct J3DDrawBuffer { static u8 entryNum[4 + 4 /* padding */]; }; @@ -84,16 +39,14 @@ extern "C" u8 mCurrentMtxCalc__8J3DJoint[4 + 4 /* padding */]; // External References: // -extern "C" void J3DGetTranslateRotateMtx__FRC16J3DTransformInfoPA4_f(); +extern "C" void +J3DGetTranslateRotateMtx__FRC16J3DTransformInfoPA4_f(J3DTransformInfo const& param_0, + f32 (*param_1)[4]); extern "C" void J3DGetTranslateRotateMtx__FsssfffPA4_f(); extern "C" void setCurrentMtx__11J3DMaterialFv(); -extern "C" void JMAMTXApplyScale__FPA4_CfPA4_ffff(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXConcat(); +extern "C" void JMAMTXApplyScale__FPA4_CfPA4_ffff(const Mtx*, Mtx*, f32, f32, f32); extern "C" void _savegpr_27(); extern "C" void _restgpr_27(); -extern "C" extern u8 const j3dDefaultTransformInfo[32]; -extern "C" extern u8 j3dSys[284]; extern "C" u8 mCurrentMtx__6J3DSys[48]; extern "C" f32 mCurrentS__6J3DSys[3]; extern "C" f32 mParentS__6J3DSys[3]; @@ -103,95 +56,152 @@ extern "C" u8 entryNum__13J3DDrawBuffer[4 + 4 /* padding */]; // Declarations: // -/* ############################################################################################## */ -/* 803A2068-803A2074 02E6C8 000C+00 1/1 0/0 0/0 .rodata @882 */ -SECTION_RODATA static u8 const lit_882[12] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x803A2068, &lit_882); - /* 8032EC28-8032ECAC 329568 0084+00 0/0 1/1 0/0 .text * init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMtxCalcJ3DSysInitBasic::init(Vec const& param_0, f32 const (¶m_1)[3][4]) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf.s" +void J3DMtxCalcJ3DSysInitBasic::init(Vec const& param_0, Mtx const& param_1) { + J3DSys::mCurrentS = param_0; + J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f}; + JMAMTXApplyScale(param_1, J3DSys::mCurrentMtx, J3DSys::mCurrentS.x, J3DSys::mCurrentS.y, + J3DSys::mCurrentS.z); } -#pragma pop - -/* ############################################################################################## */ -/* 803A2074-803A2080 02E6D4 000C+00 1/1 0/0 0/0 .rodata @893 */ -SECTION_RODATA static u8 const lit_893[12] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x803A2074, &lit_893); /* 8032ECAC-8032ED30 3295EC 0084+00 0/0 2/2 2/2 .text * init__24J3DMtxCalcJ3DSysInitMayaFRC3VecRA3_A4_Cf */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMtxCalcJ3DSysInitMaya::init(Vec const& param_0, f32 const (¶m_1)[3][4]) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/init__24J3DMtxCalcJ3DSysInitMayaFRC3VecRA3_A4_Cf.s" +void J3DMtxCalcJ3DSysInitMaya::init(Vec const& param_0, Mtx const& param_1) { + J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f}; + J3DSys::mCurrentS = param_0; + JMAMTXApplyScale(param_1, J3DSys::mCurrentMtx, J3DSys::mCurrentS.x, J3DSys::mCurrentS.y, + J3DSys::mCurrentS.z); } -#pragma pop /* ############################################################################################## */ /* 804515F0-804515F4 000AF0 0004+00 3/3 1/1 0/0 .sbss mMtxBuffer__10J3DMtxCalc */ -u8 J3DMtxCalc::mMtxBuffer[4]; +J3DMtxBuffer* J3DMtxCalc::mMtxBuffer; /* 804515F4-804515F8 000AF4 0004+00 4/4 9/9 2/2 .sbss mJoint__10J3DMtxCalc */ -u8 J3DMtxCalc::mJoint[4]; +J3DJoint* J3DMtxCalc::mJoint; -/* 804564A0-804564A4 004AA0 0004+00 3/3 0/0 0/0 .sdata2 @922 */ -SECTION_SDATA2 static f32 lit_922 = 1.0f; +inline s32 checkScaleOne(const Vec& param_0) { + if (param_0.x == 1.0f && param_0.y == 1.0f && param_0.z == 1.0f) { + return true; + } else { + return false; + } +} /* 8032ED30-8032EE50 329670 0120+00 0/0 1/1 0/0 .text * calcTransform__28J3DMtxCalcCalcTransformBasicFRC16J3DTransformInfo */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMtxCalcCalcTransformBasic::calcTransform(J3DTransformInfo const& param_0) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__28J3DMtxCalcCalcTransformBasicFRC16J3DTransformInfo.s" +void J3DMtxCalcCalcTransformBasic::calcTransform(J3DTransformInfo const& transInfo) { + J3DMtxBuffer* mtxBuf = J3DMtxCalc::getMtxBuffer(); + u16 jntNo = J3DMtxCalc::getJoint()->getJntNo(); + + MtxP anmMtx = mtxBuf->getAnmMtx(jntNo); + + J3DSys::mCurrentS.x *= transInfo.mScale.x; + J3DSys::mCurrentS.y *= transInfo.mScale.y; + J3DSys::mCurrentS.z *= transInfo.mScale.z; + J3DGetTranslateRotateMtx(transInfo, anmMtx); + + if (!checkScaleOne(J3DSys::mCurrentS)) { + mtxBuf->setScaleFlag(jntNo, 0); + JMAMTXApplyScale(anmMtx, anmMtx, transInfo.mScale.x, transInfo.mScale.y, + transInfo.mScale.z); + } else { + mtxBuf->setScaleFlag(jntNo, 1); + } + + PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx); + PSMTXCopy(J3DSys::mCurrentMtx, anmMtx); } -#pragma pop /* 8032EE50-8032EFBC 329790 016C+00 0/0 1/1 0/0 .text * calcTransform__32J3DMtxCalcCalcTransformSoftimageFRC16J3DTransformInfo */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMtxCalcCalcTransformSoftimage::calcTransform(J3DTransformInfo const& param_0) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__32J3DMtxCalcCalcTransformSoftimageFRC16J3DTransformInfo.s" +void J3DMtxCalcCalcTransformSoftimage::calcTransform(J3DTransformInfo const& transInfo) { + J3DMtxBuffer* mtxBuf = J3DMtxCalc::getMtxBuffer(); + u16 jntNo = J3DMtxCalc::getJoint()->getJntNo(); + + MtxP anmMtx = mtxBuf->getAnmMtx(jntNo); + + J3DGetTranslateRotateMtx(transInfo.mRotation.x, transInfo.mRotation.y, transInfo.mRotation.z, + transInfo.mTranslate.x * J3DSys::mCurrentS.x, + transInfo.mTranslate.y * J3DSys::mCurrentS.y, + transInfo.mTranslate.z * J3DSys::mCurrentS.z, anmMtx); + PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx); + + J3DSys::mCurrentS.x *= transInfo.mScale.x; + J3DSys::mCurrentS.y *= transInfo.mScale.y; + J3DSys::mCurrentS.z *= transInfo.mScale.z; + + if (!checkScaleOne(J3DSys::mCurrentS)) { + mtxBuf->setScaleFlag(jntNo, 0); + JMAMTXApplyScale(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentS.x, J3DSys::mCurrentS.y, + J3DSys::mCurrentS.z); + anmMtx[0][3] = J3DSys::mCurrentMtx[0][3]; + anmMtx[1][3] = J3DSys::mCurrentMtx[1][3]; + anmMtx[2][3] = J3DSys::mCurrentMtx[2][3]; + } else { + mtxBuf->setScaleFlag(jntNo, 1); + PSMTXCopy(J3DSys::mCurrentMtx, anmMtx); + } } -#pragma pop /* 8032EFBC-8032F13C 3298FC 0180+00 0/0 6/6 2/2 .text * calcTransform__27J3DMtxCalcCalcTransformMayaFRC16J3DTransformInfo */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMtxCalcCalcTransformMaya::calcTransform(J3DTransformInfo const& param_0) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/calcTransform__27J3DMtxCalcCalcTransformMayaFRC16J3DTransformInfo.s" +void J3DMtxCalcCalcTransformMaya::calcTransform(J3DTransformInfo const& transInfo) { + J3DJoint* joint = J3DMtxCalc::getJoint(); + J3DMtxBuffer* mtxBuf = J3DMtxCalc::getMtxBuffer(); + + u16 jntNo = joint->getJntNo(); + + MtxP anmMtx = mtxBuf->getAnmMtx(jntNo); + + J3DGetTranslateRotateMtx(transInfo, anmMtx); + + if (transInfo.mScale.x == 1.0f && transInfo.mScale.y == 1.0f && transInfo.mScale.z == 1.0f) { + mtxBuf->setScaleFlag(jntNo, 1); + } else { + mtxBuf->setScaleFlag(jntNo, 0); + JMAMTXApplyScale(anmMtx, anmMtx, transInfo.mScale.x, transInfo.mScale.y, + transInfo.mScale.z); + } + + if (joint->getScaleCompensate() == 1) { + f32 tmp1 = JMath::fastReciprocal(J3DSys::mParentS.x); + f32 tmp2 = JMath::fastReciprocal(J3DSys::mParentS.y); + f32 tmp3 = JMath::fastReciprocal(J3DSys::mParentS.z); + + anmMtx[0][0] *= tmp1; + anmMtx[0][1] *= tmp1; + anmMtx[0][2] *= tmp1; + anmMtx[1][0] *= tmp2; + anmMtx[1][1] *= tmp2; + anmMtx[1][2] *= tmp2; + anmMtx[2][0] *= tmp3; + anmMtx[2][1] *= tmp3; + anmMtx[2][2] *= tmp3; + } + + PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx); + PSMTXCopy(J3DSys::mCurrentMtx, anmMtx); + + J3DSys::mParentS.x = transInfo.mScale.x; + J3DSys::mParentS.y = transInfo.mScale.y; + J3DSys::mParentS.z = transInfo.mScale.z; } -#pragma pop /* 8032F13C-8032F170 329A7C 0034+00 0/0 1/1 0/0 .text appendChild__8J3DJointFP8J3DJoint */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DJoint::appendChild(J3DJoint* param_0) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DJoint/appendChild__8J3DJointFP8J3DJoint.s" +void J3DJoint::appendChild(J3DJoint* pChild) { + if (mChild == NULL) { + mChild = pChild; + } else { + J3DJoint* curChild = mChild; + while (curChild->getYounger() != NULL) { + curChild = curChild->getYounger(); + } + curChild->setYounger(pChild); + } } -#pragma pop /* ############################################################################################## */ /* 803A2080-803A208C 02E6E0 000C+00 1/1 0/0 0/0 .rodata @1257 */ @@ -215,6 +225,26 @@ SECTION_SDATA2 static u8 lit_1220[4] = { }; /* 8032F170-8032F254 329AB0 00E4+00 0/0 1/1 0/0 .text __ct__8J3DJointFv */ +#ifdef NONMATCHING +J3DJoint::J3DJoint() { + field_0x0 = NULL; + mCallBack = NULL; + field_0x8 = NULL; + mChild = NULL; + mYounger = NULL; + mJntNo = 0; + mMtxType = 1; + mScaleCompensate = false; + mTransformInfo = j3dDefaultTransformInfo; + field_0x38 = 0.0f; + mMtxCalc = NULL; + mMesh = NULL; + + Vec init = {0.0f, 0.0f, 0.0f}; + mMin = init; + mMax = init; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -223,6 +253,7 @@ asm J3DJoint::J3DJoint() { #include "asm/JSystem/J3DGraphAnimator/J3DJoint/__ct__8J3DJointFv.s" } #pragma pop +#endif /* 8032F254-8032F3F8 329B94 01A4+00 0/0 1/1 0/0 .text entryIn__8J3DJointFv */ #pragma push @@ -236,7 +267,7 @@ asm void J3DJoint::entryIn() { /* ############################################################################################## */ /* 804515F8-80451600 000AF8 0004+04 1/1 1/1 0/0 .sbss mCurrentMtxCalc__8J3DJoint */ -u8 J3DJoint::mCurrentMtxCalc[4 + 4 /* padding */]; +J3DMtxCalc* J3DJoint::mCurrentMtxCalc; /* 8032F3F8-8032F5A8 329D38 01B0+00 0/0 1/1 0/0 .text recursiveCalc__8J3DJointFv */ #pragma push diff --git a/libs/JSystem/J3DGraphAnimator/J3DJointTree.cpp b/libs/JSystem/J3DGraphAnimator/J3DJointTree.cpp index be24e51ed5..ad4b80b8af 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DJointTree.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DJointTree.cpp @@ -7,47 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct Vec {}; - -struct J3DShapeTable {}; - -struct J3DMtxBuffer {}; - -struct J3DMtxCalc { - /* 80325D1C */ void setMtxBuffer(J3DMtxBuffer*); - - static u8 mMtxBuffer[4]; -}; - -struct J3DModelHierarchy {}; - -struct J3DMaterialTable {}; - -struct J3DJoint { - /* 8032F13C */ void appendChild(J3DJoint*); - /* 8032F3F8 */ void recursiveCalc(); - - static u8 mCurrentMtxCalc[4 + 4 /* padding */]; -}; - -struct J3DJointTree { - /* 80325A18 */ J3DJointTree(); - /* 80325A9C */ void makeHierarchy(J3DJoint*, J3DModelHierarchy const**, J3DMaterialTable*, - J3DShapeTable*); - /* 80325C00 */ void findImportantMtxIndex(); - /* 80325CAC */ void calc(J3DMtxBuffer*, Vec const&, f32 const (&)[3][4]); - /* 80325D24 */ ~J3DJointTree(); -}; - -struct J3DDrawMtxData { - /* 803115E0 */ J3DDrawMtxData(); - /* 803115F4 */ ~J3DDrawMtxData(); -}; - // // Forward References: // diff --git a/libs/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp b/libs/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp index d8808a65ad..390c21a07c 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp @@ -1,156 +1,122 @@ -// -// Generated By: dol2asm -// Translation Unit: J3DMaterialAnm -// - #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct _GXColorS10 {}; - -struct _GXColor {}; - -struct J3DTextureSRTInfo {}; - -struct J3DTexNoAnm {}; - -struct J3DTexMtxAnm {}; - -struct J3DTevKColorAnm {}; - -struct J3DTevColorAnm {}; - -struct J3DMaterial {}; - -struct J3DMatColorAnm {}; - -struct J3DMaterialAnm { - /* 800A4820 */ ~J3DMaterialAnm(); - /* 8032C320 */ void initialize(); - /* 8032C3C4 */ void calc(J3DMaterial*) const; - /* 8032C5A4 */ void setMatColorAnm(int, J3DMatColorAnm*); - /* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*); - /* 8032C624 */ void setTexNoAnm(int, J3DTexNoAnm*); - /* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*); - /* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*); -}; - -struct J3DAnmTextureSRTKey { - /* 80329F14 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const; -}; - -struct J3DAnmTevRegKey { - /* 8032B1F8 */ void getTevColorReg(u16, _GXColorS10*) const; - /* 8032B4BC */ void getTevKonstReg(u16, _GXColor*) const; -}; - // // Forward References: // -extern "C" void initialize__14J3DMaterialAnmFv(); extern "C" void calc__14J3DMaterialAnmCFP11J3DMaterial(); -extern "C" void setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm(); -extern "C" void setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm(); -extern "C" void setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm(); -extern "C" void setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm(); -extern "C" void setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm(); -extern "C" extern void* __vt__14J3DMaterialAnm[4]; // // External References: // extern "C" void __dt__14J3DMaterialAnmFv(); -extern "C" void calcTransform__19J3DAnmTextureSRTKeyCFfUsP17J3DTextureSRTInfo(); -extern "C" void getTevColorReg__15J3DAnmTevRegKeyCFUsP11_GXColorS10(); -extern "C" void getTevKonstReg__15J3DAnmTevRegKeyCFUsP8_GXColor(); -extern "C" void _savegpr_27(); -extern "C" void _restgpr_27(); // // Declarations: // -/* 8032C320-8032C3C4 326C60 00A4+00 0/0 5/5 72/72 .text initialize__14J3DMaterialAnmFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::initialize() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/initialize__14J3DMaterialAnmFv.s" -} -#pragma pop +void J3DMaterialAnm::initialize() { + for (int i = 0; i < ARRAY_SIZE(mMatColorAnm); i++) { + mMatColorAnm[i].setAnmFlag(false); + } -/* 8032C3C4-8032C5A4 326D04 01E0+00 1/0 4/4 2/2 .text calc__14J3DMaterialAnmCFP11J3DMaterial */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::calc(J3DMaterial* param_0) const { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/calc__14J3DMaterialAnmCFP11J3DMaterial.s" -} -#pragma pop + for (int i = 0; i < ARRAY_SIZE(mTexNoAnm); i++) { + mTexNoAnm[i].setAnmFlag(false); + } -/* 8032C5A4-8032C5E4 326EE4 0040+00 0/0 2/2 0/0 .text - * setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::setMatColorAnm(int param_0, J3DMatColorAnm* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm.s" -} -#pragma pop + for (int i = 0; i < ARRAY_SIZE(mTevColorAnm); i++) { + mTevColorAnm[i].setAnmFlag(false); + } -/* 8032C5E4-8032C624 326F24 0040+00 0/0 3/3 0/0 .text - * setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::setTexMtxAnm(int param_0, J3DTexMtxAnm* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm.s" -} -#pragma pop + for (int i = 0; i < ARRAY_SIZE(mTevKColorAnm); i++) { + mTevKColorAnm[i].setAnmFlag(false); + } -/* 8032C624-8032C664 326F64 0040+00 0/0 2/2 0/0 .text - * setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::setTexNoAnm(int param_0, J3DTexNoAnm* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm.s" + for (int i = 0; i < ARRAY_SIZE(mTexMtxAnm); i++) { + mTexMtxAnm[i].setAnmFlag(false); + } } -#pragma pop -/* 8032C664-8032C6A4 326FA4 0040+00 0/0 3/3 0/0 .text - * setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::setTevColorAnm(int param_0, J3DTevColorAnm* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm.s" -} -#pragma pop +void J3DMaterialAnm::calc(J3DMaterial* pMat) const { + for (u32 i = 0; i < ARRAY_SIZE(mMatColorAnm); i++) { + if (mMatColorAnm[i].getAnmFlag()) { + _GXColor* color = pMat->getColorBlock()->getMatColor(i); + mMatColorAnm[i].calc(color); + } + } -/* 8032C6A4-8032C6E4 326FE4 0040+00 0/0 3/3 0/0 .text - * setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialAnm::setTevKColorAnm(int param_0, J3DTevKColorAnm* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm.s" + u16 tmp; + for (u32 i = 0; i < ARRAY_SIZE(mTexNoAnm); i++) { + if (mTexNoAnm[i].getAnmFlag()) { + mTexNoAnm[i].calc(&tmp); + pMat->getTevBlock()->setTexNo(i, tmp); + } + } + + for (u32 i = 0; i < 3; i++) { + if (mTevColorAnm[i].getAnmFlag()) { + _GXColorS10* color = pMat->getTevBlock()->getTevColor(i); + mTevColorAnm[i].calc(color); + } + } + + for (u32 i = 0; i < ARRAY_SIZE(mTevKColorAnm); i++) { + if (mTevKColorAnm[i].getAnmFlag()) { + _GXColor* color = pMat->getTevBlock()->getTevKColor(i); + mTevKColorAnm[i].calc(color); + } + } + + for (u32 i = 0; i < ARRAY_SIZE(mTexMtxAnm); i++) { + if (mTexMtxAnm[i].getAnmFlag()) { + J3DTexMtx* texMtx = pMat->getTexGenBlock()->getTexMtx(i); + mTexMtxAnm[i].calc(&texMtx->getTexMtxInfo().field_0x10); + } + } +} + +void J3DMaterialAnm::setMatColorAnm(int idx, J3DMatColorAnm* p_matColorAnm) { + if (p_matColorAnm == NULL) { + mMatColorAnm[idx].setAnmFlag(false); + } else { + mMatColorAnm[idx] = *p_matColorAnm; + } +} + +void J3DMaterialAnm::setTexMtxAnm(int idx, J3DTexMtxAnm* p_texMtxAnm) { + if (p_texMtxAnm == NULL) { + mTexMtxAnm[idx].setAnmFlag(false); + } else { + mTexMtxAnm[idx] = *p_texMtxAnm; + } +} + +void J3DMaterialAnm::setTexNoAnm(int idx, J3DTexNoAnm* p_texNoAnm) { + if (p_texNoAnm == NULL) { + mTexNoAnm[idx].setAnmFlag(false); + } else { + mTexNoAnm[idx] = *p_texNoAnm; + } +} + +void J3DMaterialAnm::setTevColorAnm(int idx, J3DTevColorAnm* p_tevColorAnm) { + if (p_tevColorAnm == NULL) { + mTevColorAnm[idx].setAnmFlag(false); + } else { + mTevColorAnm[idx] = *p_tevColorAnm; + } +} + +void J3DMaterialAnm::setTevKColorAnm(int idx, J3DTevKColorAnm* p_tevKColorAnm) { + if (p_tevKColorAnm == NULL) { + mTevKColorAnm[idx].setAnmFlag(false); + } else { + mTevKColorAnm[idx] = *p_tevKColorAnm; + } } -#pragma pop /* ############################################################################################## */ /* 803CEE60-803CEE70 02BF80 0010+00 0/0 10/10 74/74 .data __vt__14J3DMaterialAnm */ diff --git a/libs/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp b/libs/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp index c72d556cfd..6638ede6c7 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp @@ -4,58 +4,11 @@ // #include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" +#include "JSystem/J3DGraphBase/J3DTevs.h" #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct J3DTexNoAnm {}; - -struct J3DTexMtxInfo { - /* 80325718 */ void operator=(J3DTexMtxInfo const&); -}; - -struct J3DTexMtxAnm {}; - -struct J3DTevKColorAnm {}; - -struct J3DTevColorAnm {}; - -struct J3DAnmTextureSRTKey {}; - -struct J3DAnmTexPattern {}; - -struct J3DAnmTevRegKey {}; - -struct J3DAnmColor {}; - -struct J3DMaterialTable { - /* 8032F5A8 */ void clear(); - /* 8032F5D0 */ J3DMaterialTable(); - /* 8032F604 */ ~J3DMaterialTable(); - /* 8032F64C */ void removeMatColorAnimator(J3DAnmColor*); - /* 8032F6F8 */ void removeTexNoAnimator(J3DAnmTexPattern*); - /* 8032F7B4 */ void removeTexMtxAnimator(J3DAnmTextureSRTKey*); - /* 8032F880 */ void removeTevRegAnimator(J3DAnmTevRegKey*); - /* 8032F9C0 */ void createTexMtxForAnimator(J3DAnmTextureSRTKey*); - /* 8032FAF4 */ void entryMatColorAnimator(J3DAnmColor*); - /* 8032FBC8 */ void entryTexNoAnimator(J3DAnmTexPattern*); - /* 8032FCC4 */ void entryTexMtxAnimator(J3DAnmTextureSRTKey*); - /* 8032FE70 */ void entryTevRegAnimator(J3DAnmTevRegKey*); -}; - -struct J3DMatColorAnm {}; - -struct J3DMaterialAnm { - /* 8032C5A4 */ void setMatColorAnm(int, J3DMatColorAnm*); - /* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*); - /* 8032C624 */ void setTexNoAnm(int, J3DTexNoAnm*); - /* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*); - /* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*); -}; - // // Forward References: // @@ -101,14 +54,16 @@ extern "C" extern void* __vt__11J3DTexNoAnm[3]; // /* 8032F5A8-8032F5D0 329EE8 0028+00 0/0 1/1 0/0 .text clear__16J3DMaterialTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMaterialTable::clear() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/clear__16J3DMaterialTableFv.s" +void J3DMaterialTable::clear() { + mMaterialNum = 0; + mUniqueMatNum = 0; + mMaterialNodePointer = NULL; + mMaterialName = NULL; + field_0x10 = 0; + mTexture = NULL; + mTextureName = NULL; + field_0x1c = 0; } -#pragma pop /* ############################################################################################## */ /* 803CEE80-803CEE90 02BFA0 000C+04 2/2 0/0 0/0 .data __vt__16J3DMaterialTable */ @@ -121,35 +76,50 @@ SECTION_DATA extern void* __vt__16J3DMaterialTable[3 + 1 /* padding */] = { }; /* 8032F5D0-8032F604 329F10 0034+00 0/0 2/2 0/0 .text __ct__16J3DMaterialTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DMaterialTable::J3DMaterialTable() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__ct__16J3DMaterialTableFv.s" +J3DMaterialTable::J3DMaterialTable() { + mMaterialNum = 0; + mUniqueMatNum = 0; + mMaterialNodePointer = NULL; + mMaterialName = NULL; + field_0x10 = 0; + mTexture = NULL; + mTextureName = NULL; + field_0x1c = 0; } -#pragma pop /* 8032F604-8032F64C 329F44 0048+00 1/0 1/1 0/0 .text __dt__16J3DMaterialTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DMaterialTable::~J3DMaterialTable() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/__dt__16J3DMaterialTableFv.s" -} -#pragma pop +J3DMaterialTable::~J3DMaterialTable() {} /* 8032F64C-8032F6F8 329F8C 00AC+00 0/0 1/1 5/5 .text * removeMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor */ +#ifdef NONMATCHING +bool J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* pAnmColor) { + bool ret = false; + u16 updateMatNum = pAnmColor->getUpdateMaterialNum(); + for (u16 i = 0; i < updateMatNum; i++) { + if (pAnmColor->isValidUpdateMaterialID(i)) { + u16 updateMatID = pAnmColor->getUpdateMaterialID(i); + J3DMaterial* materialNode = getMaterialNodePointer(i); + + if (materialNode->getMaterialAnm() == NULL) { + ret = true; + } else { + materialNode->getMaterialAnm()->setMatColorAnm(0, NULL); + } + } + } + return ret; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* param_0) { +asm bool J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* param_0) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor.s" } #pragma pop +#endif /* 8032F6F8-8032F7B4 32A038 00BC+00 0/0 5/5 10/10 .text * removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern */ diff --git a/libs/JSystem/J3DGraphAnimator/J3DModel.cpp b/libs/JSystem/J3DGraphAnimator/J3DModel.cpp index dfe624a22f..a69782e3e2 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DModel.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DModel.cpp @@ -4,62 +4,10 @@ // #include "JSystem/J3DGraphAnimator/J3DModel.h" +#include "JSystem/J3DGraphBase/J3DTransform.h" #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct J3DVtxColorCalc { - /* 8032E180 */ void calc(J3DModel*); -}; - -struct J3DVertexData {}; - -struct J3DVertexBuffer { - /* 80310F78 */ void setVertexData(J3DVertexData*); - /* 80311030 */ ~J3DVertexBuffer(); - /* 803112D0 */ void copyLocalVtxArray(u32); - /* 80311478 */ void allocTransformedVtxPosArray(); - /* 8031152C */ void allocTransformedVtxNrmArray(); -}; - -struct J3DShapePacket { - /* 80312B20 */ J3DShapePacket(); - /* 80312B74 */ ~J3DShapePacket(); - /* 80312DBC */ void newDifferedDisplayList(u32); -}; - -struct J3DShape { - /* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); -}; - -struct J3DMaterial { - /* 80316290 */ void countDLSize(); - /* 80316E90 */ void newSharedDisplayList(u32); - /* 80316F24 */ void newSingleSharedDisplayList(u32); -}; - -struct J3DMatPacket { - /* 80312948 */ J3DMatPacket(); - /* 803129A4 */ ~J3DMatPacket(); - /* 80312A04 */ void addShapePacket(J3DShapePacket*); -}; - -struct J3DJoint { - /* 8032F254 */ void entryIn(); -}; - -struct J3DDrawPacket { - /* 8031280C */ void newDisplayList(u32); - /* 80312898 */ void newSingleDisplayList(u32); -}; - -struct J3DDisplayListObj { - /* 8031256C */ void single_To_Double(); -}; - // // Forward References: // @@ -146,9 +94,6 @@ extern "C" void _restgpr_26(); extern "C" void _restgpr_27(); extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); -extern "C" extern u8 const j3dDefaultScale[12]; -extern "C" extern u8 const j3dDefaultMtx[48]; -extern "C" extern u8 j3dSys[284]; // // Declarations: @@ -163,14 +108,29 @@ SECTION_SDATA2 static f32 lit_896[1 + 1 /* padding */] = { }; /* 80327100-80327184 321A40 0084+00 0/0 3/3 0/0 .text initialize__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::initialize() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/initialize__8J3DModelFv.s" +void J3DModel::initialize() { + mModelData = NULL; + mFlags = 0; + field_0x0c = 0; + field_0x10 = 0; + mUserArea = 0; + + mBaseScale.x = 1.0f; + mBaseScale.y = 1.0f; + mBaseScale.z = 1.0f; + + PSMTXIdentity(mBaseTransformMtx); + PSMTXIdentity(mInternalView); + + mMtxBuffer = NULL; + mMatPacket = NULL; + mShapePacket = NULL; + mDeformData = NULL; + mSkinDeform = NULL; + mVtxColorCalc = NULL; + field_0xd4 = 0; + field_0xd8 = 0; } -#pragma pop /* ############################################################################################## */ /* 803CED20-803CED44 02BE40 0024+00 1/1 3/3 0/0 .data __vt__8J3DModel */ @@ -195,32 +155,95 @@ SECTION_DATA extern void* __vt__12J3DMtxBuffer[3] = { /* 80327184-80327300 321AC4 017C+00 0/0 3/3 0/0 .text * entryModelData__8J3DModelFP12J3DModelDataUlUl */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::entryModelData(J3DModelData* param_0, u32 param_1, u32 param_2) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/entryModelData__8J3DModelFP12J3DModelDataUlUl.s" +s32 J3DModel::entryModelData(J3DModelData* p_modelData, u32 param_1, u32 param_2) { + mModelData = p_modelData; + mMtxBuffer = new J3DMtxBuffer(); + + if (mMtxBuffer == NULL) { + return 4; + } + + switch (mMtxBuffer->create(p_modelData, param_2)) { + case 0: + switch (createShapePacket(p_modelData)) { + case 0: + switch (createMatPacket(p_modelData, param_1)) { + case 0: + mVertexBuffer.setVertexData(&p_modelData->getVertexData()); + prepareShapePackets(); + + if (param_1 & 0x1) { + onFlag(0x1); + } + if (param_1 & 0x2) { + onFlag(0x2); + } + if (param_1 & 0x10) { + onFlag(0x10); + } + if (param_1 & 0x20000) { + onFlag(0x20000); + } + if (param_1 & 0x40000) { + onFlag(0x40000); + } + if (param_1 & 0x80000) { + onFlag(0x80000); + } + if (param_1 & J3DMdlFlag_SkinPosCpu) { + onFlag(J3DMdlFlag_SkinPosCpu); + } + if (param_1 & J3DMdlFlag_SkinNrmCpu) { + onFlag(J3DMdlFlag_SkinNrmCpu); + } + return 0; + } + break; + } + break; + } } -#pragma pop /* 80327300-803273CC 321C40 00CC+00 1/1 0/0 0/0 .text createShapePacket__8J3DModelFP12J3DModelData */ +// probably some wrong member types +#ifdef NONMATCHING +s32 J3DModel::createShapePacket(J3DModelData* p_modelData) { + if (p_modelData->getShapeNum() != 0) { + u16 shapeNum = p_modelData->getShapeNum(); + + J3DShapePacket* packet = new J3DShapePacket[shapeNum]; + mShapePacket = &packet; + + if (mShapePacket == NULL) { + return 4; + } + + for (int i = 0; i < p_modelData->getShapeNum(); i++) { + J3DShape* shapeNode = p_modelData->getShapeNodePointer(i); + mShapePacket[i]->setShape(shapeNode); + mShapePacket[i]->setModel(this); + } + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DModel::createShapePacket(J3DModelData* param_0) { +asm s32 J3DModel::createShapePacket(J3DModelData* param_0) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModel/createShapePacket__8J3DModelFP12J3DModelData.s" } #pragma pop +#endif /* 803273CC-803275FC 321D0C 0230+00 1/1 0/0 0/0 .text createMatPacket__8J3DModelFP12J3DModelDataUl */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DModel::createMatPacket(J3DModelData* param_0, u32 param_1) { +asm s32 J3DModel::createMatPacket(J3DModelData* param_0, u32 param_1) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModel/createMatPacket__8J3DModelFP12J3DModelDataUl.s" } @@ -288,52 +311,101 @@ asm void J3DModel::diff() { /* 80327A2C-80327AA0 32236C 0074+00 0/0 1/1 2/2 .text setDeformData__8J3DModelFP13J3DDeformDataUl */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::setDeformData(J3DDeformData* param_0, u32 param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/setDeformData__8J3DModelFP13J3DDeformDataUl.s" +s32 J3DModel::setDeformData(J3DDeformData* p_deformData, u32 param_1) { + mDeformData = p_deformData; + + if (p_deformData == NULL) { + return 0; + } + + switch (mVertexBuffer.copyLocalVtxArray(param_1)) { + case 0: + if (param_1 & 4) { + p_deformData->offAllFlag(1); + } + return 0; + } } -#pragma pop /* 80327AA0-80327BD4 3223E0 0134+00 0/0 0/0 2/2 .text setSkinDeform__8J3DModelFP13J3DSkinDeformUl */ +#ifdef NONMATCHING +s32 J3DModel::setSkinDeform(J3DSkinDeform* p_skinDeform, u32 param_1) { + mSkinDeform = p_skinDeform; + + if (p_skinDeform == NULL) { + offFlag(J3DMdlFlag_SkinPosCpu); + offFlag(J3DMdlFlag_SkinNrmCpu); + return 5; + } else { + mSkinDeform->initMtxIndexArray(mModelData); + if (mModelData->checkFlag(0x100)) { + mSkinDeform->changeFastSkinDL(mModelData); + param_1 = 0; + mSkinDeform->transformVtxPosNrm(mModelData); + mSkinDeform->initSkinInfo(mModelData); + } + p_skinDeform = NULL; + + if ((~param_1 & 2)) { + if (mVertexBuffer.allocTransformedVtxPosArray()) { + offFlag(J3DMdlFlag_SkinPosCpu); + return 0; + } + onFlag(J3DMdlFlag_SkinPosCpu); + } else { + offFlag(J3DMdlFlag_SkinPosCpu); + } + + if ((~param_1 & 4)) { + if (mVertexBuffer.allocTransformedVtxNrmArray()) { + onFlag(J3DMdlFlag_SkinNrmCpu); + } + offFlag(J3DMdlFlag_SkinNrmCpu); + } else { + offFlag(J3DMdlFlag_SkinNrmCpu); + } + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DModel::setSkinDeform(J3DSkinDeform* param_0, u32 param_1) { +asm s32 J3DModel::setSkinDeform(J3DSkinDeform* param_0, u32 param_1) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModel/setSkinDeform__8J3DModelFP13J3DSkinDeformUl.s" } #pragma pop +#endif /* 80327BD4-80327C58 322514 0084+00 1/1 0/0 2/2 .text calcAnmMtx__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::calcAnmMtx() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/calcAnmMtx__8J3DModelFv.s" +void J3DModel::calcAnmMtx() { + j3dSys.setModel(this); + + if (checkFlag(2)) { + getModelData()->getJointTree().calc(mMtxBuffer, j3dDefaultScale, j3dDefaultMtx); + } else { + getModelData()->getJointTree().calc(mMtxBuffer, mBaseScale, mBaseTransformMtx); + } } -#pragma pop /* 80327C58-80327CA4 322598 004C+00 1/1 1/1 1/1 .text calcWeightEnvelopeMtx__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::calcWeightEnvelopeMtx() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/calcWeightEnvelopeMtx__8J3DModelFv.s" +void J3DModel::calcWeightEnvelopeMtx() { + if (getModelData()->getWEvlpMtxNum() != 0 && !checkFlag(0x10)) { + if (!getModelData()->checkFlag(0x100)) { + mMtxBuffer->calcWeightEnvelopeMtx(); + } + } } -#pragma pop /* 80327CA4-80327CF0 3225E4 004C+00 1/0 0/0 0/0 .text update__8J3DModelFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DModel::update() { +extern "C" asm void update__8J3DModelFv() { + // asm void J3DModel::update() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModel/update__8J3DModelFv.s" } @@ -370,14 +442,9 @@ asm void J3DModel::viewCalc() { #pragma pop /* 80328190-803281B4 322AD0 0024+00 1/1 0/0 0/0 .text calcNrmMtx__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::calcNrmMtx() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/calcNrmMtx__8J3DModelFv.s" +void J3DModel::calcNrmMtx() { + mMtxBuffer->calcNrmMtx(); } -#pragma pop /* 803281B4-803282B8 322AF4 0104+00 1/1 0/0 0/0 .text calcBumpMtx__8J3DModelFv */ #pragma push @@ -390,14 +457,11 @@ asm void J3DModel::calcBumpMtx() { #pragma pop /* 803282B8-803282EC 322BF8 0034+00 1/1 0/0 0/0 .text calcBBoardMtx__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModel::calcBBoardMtx() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/calcBBoardMtx__8J3DModelFv.s" +void J3DModel::calcBBoardMtx() { + if (mModelData->checkBBoardFlag()) { + mMtxBuffer->calcBBoardMtx(); + } } -#pragma pop /* 803282EC-80328350 322C2C 0064+00 2/2 0/0 0/0 .text prepareShapePackets__8J3DModelFv */ #pragma push @@ -410,20 +474,14 @@ asm void J3DModel::prepareShapePackets() { #pragma pop /* 80328350-803283B4 322C90 0064+00 1/0 0/0 0/0 .text __dt__8J3DModelFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DModel::~J3DModel() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModel/__dt__8J3DModelFv.s" -} -#pragma pop +J3DModel::~J3DModel() {} /* 803283B4-803283FC 322CF4 0048+00 1/0 0/0 0/0 .text __dt__12J3DMtxBufferFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMtxBuffer::~J3DMtxBuffer() { +extern "C" asm void __dt__12J3DMtxBufferFv() { + // asm J3DMtxBuffer::~J3DMtxBuffer() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModel/__dt__12J3DMtxBufferFv.s" } diff --git a/libs/JSystem/J3DGraphAnimator/J3DModelData.cpp b/libs/JSystem/J3DGraphAnimator/J3DModelData.cpp index 2fef071ce7..5f5926f4b7 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DModelData.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DModelData.cpp @@ -4,40 +4,11 @@ // #include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" #include "dol2asm.h" +#include "dolphin/os/OS.h" #include "dolphin/types.h" -// -// Types: -// - -struct J3DVertexData { - /* 80310EF8 */ J3DVertexData(); -}; - -struct J3DShapeTable { - /* 80326134 */ ~J3DShapeTable(); -}; - -struct J3DMaterialTable { - /* 8032F5D0 */ J3DMaterialTable(); - /* 8032F604 */ ~J3DMaterialTable(); -}; - -struct J3DMaterial { - /* 80316290 */ void countDLSize(); - /* 80316E90 */ void newSharedDisplayList(u32); - /* 80316F24 */ void newSingleSharedDisplayList(u32); -}; - -struct J3DJointTree { - /* 80325A18 */ J3DJointTree(); -}; - -struct J3DDrawMtxData { - /* 803115F4 */ ~J3DDrawMtxData(); -}; - // // Forward References: // @@ -66,32 +37,23 @@ extern "C" void newSingleSharedDisplayList__11J3DMaterialFUl(); extern "C" void __ct__12J3DJointTreeFv(); extern "C" void __ct__16J3DMaterialTableFv(); extern "C" void __dt__16J3DMaterialTableFv(); -extern "C" void OSDisableInterrupts(); -extern "C" void OSRestoreInterrupts(); -extern "C" void OSDisableScheduler(); -extern "C" void OSEnableScheduler(); -extern "C" void GDInitGDLObj(); extern "C" void _savegpr_27(); extern "C" void _savegpr_29(); extern "C" void _restgpr_27(); extern "C" void _restgpr_29(); extern "C" extern void* __vt__12J3DJointTree[4 + 1 /* padding */]; -extern "C" extern u8 j3dSys[284]; -extern "C" extern u8 __GDCurrentDL[4]; // // Declarations: // /* 80325D88-80325DA0 3206C8 0018+00 1/1 2/2 0/0 .text clear__12J3DModelDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::clear() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/clear__12J3DModelDataFv.s" +void J3DModelData::clear() { + field_0x4 = 0; + mFlags = 0; + field_0xc = 0; + field_0xe = 0; } -#pragma pop /* ############################################################################################## */ /* 803CED08-803CED14 02BE28 000C+00 3/3 0/0 0/0 .data __vt__13J3DShapeTable */ @@ -109,89 +71,129 @@ SECTION_DATA extern void* __vt__12J3DModelData[3] = { }; /* 80325DA0-80325E14 3206E0 0074+00 0/0 2/2 0/0 .text __ct__12J3DModelDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DModelData::J3DModelData() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/__ct__12J3DModelDataFv.s" +J3DModelData::J3DModelData() { + clear(); } -#pragma pop /* 80325E14-80325EC8 320754 00B4+00 0/0 2/2 0/0 .text newSharedDisplayList__12J3DModelDataFUl */ +#ifdef NONMATCHING +s32 J3DModelData::newSharedDisplayList(u32 param_0) { + u16 matNum = getMaterialNum(); + + for (u16 i = 0; i < matNum; i++) { + if ((param_0 & 0x40000)) { + J3DMaterial* matNode = getMaterialNodePointer(i); + u32 dl_size = matNode->countDLSize(); + switch (matNode->newSingleSharedDisplayList(dl_size)) { + case 0: + continue; + } + break; + } else { + J3DMaterial* matNode = getMaterialNodePointer(i); + u32 dl_size = matNode->countDLSize(); + switch (matNode->newSharedDisplayList(dl_size)) { + case 0: + continue; + } + break; + } + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DModelData::newSharedDisplayList(u32 param_0) { +asm s32 J3DModelData::newSharedDisplayList(u32 param_0) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModelData/newSharedDisplayList__12J3DModelDataFUl.s" } #pragma pop +#endif /* ############################################################################################## */ /* 804515E8-804515EC 000AE8 0004+00 1/1 0/0 0/0 .sbss sInterruptFlag$965 */ -static u8 sInterruptFlag[4]; +static s32 sInterruptFlag; /* 804515EC-804515F0 000AEC 0004+00 1/1 0/0 0/0 .sbss None */ -static u8 data_804515EC[4]; +static s8 sInitInterruptFlag; /* 80325EC8-80325F94 320808 00CC+00 0/0 1/1 0/0 .text indexToPtr__12J3DModelDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::indexToPtr() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/indexToPtr__12J3DModelDataFv.s" +void J3DModelData::indexToPtr() { + J3DTexture* tex = getTexture(); + j3dSys.setTexture(tex); + + if (!sInitInterruptFlag) { + sInterruptFlag = OSDisableInterrupts(); + sInitInterruptFlag = true; + } + OSDisableScheduler(); + + GDLObj gdl_obj; + u16 matNum = getMaterialNum(); + for (u16 i = 0; i < matNum; i++) { + J3DMaterial* matNode = getMaterialNodePointer(i); + J3DDisplayListObj* dl_obj = matNode->getSharedDisplayListObj(); + + GDInitGDLObj(&gdl_obj, dl_obj->getDisplayList(0), dl_obj->getDisplayListSize()); + GDSetCurrent(&gdl_obj); + matNode->getTevBlock()->indexToPtr(); + } + GDSetCurrent(NULL); + OSEnableScheduler(); + OSRestoreInterrupts(sInterruptFlag); } -#pragma pop /* 80325F94-8032600C 3208D4 0078+00 0/0 2/2 0/0 .text makeSharedDL__12J3DModelDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::makeSharedDL() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/makeSharedDL__12J3DModelDataFv.s" +void J3DModelData::makeSharedDL() { + J3DTexture* tex = getTexture(); + j3dSys.setTexture(tex); + + u16 matNum = getMaterialNum(); + for (u16 i = 0; i < matNum; i++) { + getMaterialNodePointer(i)->makeSharedDisplayList(); + } } -#pragma pop /* 8032600C-803260CC 32094C 00C0+00 0/0 3/3 7/7 .text simpleCalcMaterial__12J3DModelDataFUsPA4_f */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::simpleCalcMaterial(u16 param_0, f32 (*param_1)[4]) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/simpleCalcMaterial__12J3DModelDataFUsPA4_f.s" +void J3DModelData::simpleCalcMaterial(u16 idx, Mtx param_1) { + syncJ3DSysFlags(); + + J3DJoint* jointNode = getJointNodePointer(idx); + for (J3DMaterial* mat = jointNode->getMesh(); mat != NULL; mat = mat->getNext()) { + if (mat->getMaterialAnm() != NULL) { + mat->getMaterialAnm()->calc(mat); + } + mat->calc(param_1); + } } -#pragma pop /* 803260CC-803260F8 320A0C 002C+00 0/0 1/1 0/0 .text syncJ3DSysPointers__12J3DModelDataCFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::syncJ3DSysPointers() const { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysPointers__12J3DModelDataCFv.s" +void J3DModelData::syncJ3DSysPointers() const { + j3dSys.setTexture(getTexture()); + j3dSys.setVtxPos(getVtxPosArray()); + j3dSys.setVtxNrm(getVtxNrmArray()); + j3dSys.setVtxCol(getVtxColorArray(0)); } -#pragma pop /* 803260F8-80326134 320A38 003C+00 1/1 5/5 0/0 .text syncJ3DSysFlags__12J3DModelDataCFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DModelData::syncJ3DSysFlags() const { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DModelData/syncJ3DSysFlags__12J3DModelDataCFv.s" +void J3DModelData::syncJ3DSysFlags() const { + if (checkFlag(0x20)) { + j3dSys.onFlag(0x40000000); + } else { + j3dSys.offFlag(0x40000000); + } } -#pragma pop /* 80326134-8032617C 320A74 0048+00 1/0 0/0 0/0 .text __dt__13J3DShapeTableFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeTable::~J3DShapeTable() { +extern "C" asm void __dt__13J3DShapeTableFv() { + // asm J3DShapeTable::~J3DShapeTable() { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DModelData/__dt__13J3DShapeTableFv.s" } diff --git a/libs/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp b/libs/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp index 7adfeab03d..b1549a97fe 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp @@ -7,37 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct Vec {}; - -struct J3DShape { - /* 80314E28 */ void countBumpMtxNum() const; -}; - -struct J3DModelData {}; - -struct J3DMtxBuffer { - /* 80326214 */ void initialize(); - /* 80326258 */ void create(J3DModelData*, u32); - /* 80326364 */ void createAnmMtx(J3DModelData*); - /* 803263F0 */ void createWeightEnvelopeMtx(J3DModelData*); - /* 8032648C */ void setNoUseDrawMtx(); - /* 803264B8 */ void createDoubleDrawMtx(J3DModelData*, u32); - /* 80326664 */ void createBumpMtxArray(J3DModelData*, u32); - /* 803268D4 */ void calcWeightEnvelopeMtx(); - /* 80326ACC */ void calcDrawMtx(u32, Vec const&, f32 const (&)[3][4]); - /* 80326D3C */ void calcNrmMtx(); - /* 80326EF0 */ void calcBBoardMtx(); - - static u8 sNoUseDrawMtx[48]; - static u8 sNoUseNrmMtx[36 + 4 /* padding */]; - static void* sNoUseDrawMtxPtr; - static void* sNoUseNrmMtxPtr; -}; - // // Forward References: // @@ -70,8 +39,6 @@ extern "C" void J3DCalcYBBoardMtx__FPA4_f(); extern "C" void J3DPSCalcInverseTranspose__FPA4_fPA3_f(); extern "C" void J3DPSMtxArrayConcat__FPA4_fPA4_fPA4_fUl(); extern "C" void countBumpMtxNum__8J3DShapeCFv(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXConcat(); extern "C" void _savegpr_19(); extern "C" void _savegpr_24(); extern "C" void _savegpr_27(); @@ -82,7 +49,6 @@ extern "C" void _restgpr_24(); extern "C" void _restgpr_27(); extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); -extern "C" extern u8 j3dSys[284]; // // Declarations: @@ -102,7 +68,7 @@ asm void J3DMtxBuffer::initialize() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMtxBuffer::create(J3DModelData* param_0, u32 param_1) { +asm s32 J3DMtxBuffer::create(J3DModelData* param_0, u32 param_1) { nofralloc #include "asm/JSystem/J3DGraphAnimator/J3DMtxBuffer/create__12J3DMtxBufferFP12J3DModelDataUl.s" } @@ -132,16 +98,16 @@ asm void J3DMtxBuffer::createWeightEnvelopeMtx(J3DModelData* param_0) { /* ############################################################################################## */ /* 804371C0-804371F0 063EE0 0030+00 1/0 0/0 0/0 .bss sNoUseDrawMtx__12J3DMtxBuffer */ -u8 J3DMtxBuffer::sNoUseDrawMtx[48]; +Mtx J3DMtxBuffer::sNoUseDrawMtx; /* 804371F0-80437218 063F10 0024+04 1/0 0/0 0/0 .bss sNoUseNrmMtx__12J3DMtxBuffer */ -u8 J3DMtxBuffer::sNoUseNrmMtx[36 + 4 /* padding */]; +Mtx33 J3DMtxBuffer::sNoUseNrmMtx; /* 80450970-80450974 -00001 0004+00 1/1 0/0 0/0 .sdata sNoUseDrawMtxPtr__12J3DMtxBuffer */ -SECTION_SDATA void* J3DMtxBuffer::sNoUseDrawMtxPtr = (void*)&J3DMtxBuffer::sNoUseDrawMtx; +Mtx* J3DMtxBuffer::sNoUseDrawMtxPtr = &J3DMtxBuffer::sNoUseDrawMtx; /* 80450974-80450978 -00001 0004+00 1/1 0/0 0/0 .sdata sNoUseNrmMtxPtr__12J3DMtxBuffer */ -SECTION_SDATA void* J3DMtxBuffer::sNoUseNrmMtxPtr = (void*)&J3DMtxBuffer::sNoUseNrmMtx; +Mtx33* J3DMtxBuffer::sNoUseNrmMtxPtr = &J3DMtxBuffer::sNoUseNrmMtx; /* 8032648C-803264B8 320DCC 002C+00 1/1 0/0 0/0 .text setNoUseDrawMtx__12J3DMtxBufferFv */ diff --git a/libs/JSystem/J3DGraphAnimator/J3DShapeTable.cpp b/libs/JSystem/J3DGraphAnimator/J3DShapeTable.cpp index 74c9ea0f35..ee9cf7c057 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DShapeTable.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DShapeTable.cpp @@ -1,93 +1,40 @@ -// -// Generated By: dol2asm -// Translation Unit: J3DShapeTable -// - #include "JSystem/J3DGraphAnimator/J3DShapeTable.h" #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct J3DVertexData {}; - -struct J3DDrawMtxData {}; - -struct J3DShapeTable { - /* 803258A0 */ void hide(); - /* 803258D8 */ void show(); - /* 80325910 */ void initShapeNodes(J3DDrawMtxData*, J3DVertexData*); - /* 8032597C */ void sortVcdVatCmd(); -}; - -struct J3DShape { - /* 80314F5C */ void isSameVcdVatCmd(J3DShape*); - /* 80315260 */ void makeVcdVatCmd(); -}; - -// -// Forward References: -// - -extern "C" void hide__13J3DShapeTableFv(); -extern "C" void show__13J3DShapeTableFv(); -extern "C" void initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData(); -extern "C" void sortVcdVatCmd__13J3DShapeTableFv(); - -// -// External References: -// - -extern "C" void isSameVcdVatCmd__8J3DShapeFP8J3DShape(); -extern "C" void makeVcdVatCmd__8J3DShapeFv(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_27(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_27(); - -// -// Declarations: -// - -/* 803258A0-803258D8 3201E0 0038+00 0/0 0/0 6/6 .text hide__13J3DShapeTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DShapeTable::hide() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DShapeTable/hide__13J3DShapeTableFv.s" +void J3DShapeTable::hide() { + u16 shapeNum = mShapeNum; + for (u16 i = 0; i < shapeNum; i++) { + mShapeNodePointer[i]->onFlag(1); + } } -#pragma pop -/* 803258D8-80325910 320218 0038+00 0/0 0/0 6/6 .text show__13J3DShapeTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DShapeTable::show() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DShapeTable/show__13J3DShapeTableFv.s" +void J3DShapeTable::show() { + u16 shapeNum = mShapeNum; + for (u16 i = 0; i < shapeNum; i++) { + mShapeNodePointer[i]->offFlag(1); + } } -#pragma pop -/* 80325910-8032597C 320250 006C+00 0/0 2/2 0/0 .text - * initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DShapeTable::initShapeNodes(J3DDrawMtxData* param_0, J3DVertexData* param_1) { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DShapeTable/initShapeNodes__13J3DShapeTableFP14J3DDrawMtxDataP13J3DVertexData.s" -} -#pragma pop +void J3DShapeTable::initShapeNodes(J3DDrawMtxData* pMtxData, J3DVertexData* pVtxData) { + u16 shapeNum = mShapeNum; + for (u16 i = 0; i < shapeNum; i++) { + J3DShape* shapeNode = mShapeNodePointer[i]; -/* 8032597C-80325A18 3202BC 009C+00 0/0 2/2 0/0 .text sortVcdVatCmd__13J3DShapeTableFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DShapeTable::sortVcdVatCmd() { - nofralloc -#include "asm/JSystem/J3DGraphAnimator/J3DShapeTable/sortVcdVatCmd__13J3DShapeTableFv.s" + shapeNode->setDrawMtxDataPointer(pMtxData); + shapeNode->setVertexDataPointer(pVtxData); + shapeNode->makeVcdVatCmd(); + } +} + +void J3DShapeTable::sortVcdVatCmd() { + u16 shapeNum = mShapeNum; + for (u16 next = 0; next < shapeNum; next++) { + for (u16 prev = 0; prev < next; prev++) { + if (mShapeNodePointer[next]->isSameVcdVatCmd(mShapeNodePointer[prev])) { + void* nodeVatCmd = mShapeNodePointer[prev]->getVcdVatCmd(); + mShapeNodePointer[next]->setVcdVatCmd(nodeVatCmd); + } + } + } } -#pragma pop diff --git a/libs/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp b/libs/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp index e9ccbea0db..caec400fce 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp @@ -11,53 +11,8 @@ // Types: // -struct Vec {}; - struct J3DModel {}; -struct J3DVtxColorCalc { - /* 8032E180 */ void calc(J3DModel*); -}; - -struct J3DVertexBuffer {}; - -struct J3DSkinNList { - /* 8032C6E4 */ J3DSkinNList(); - /* 8032C85C */ void calcSkin_VtxPosF32(f32 (*)[4], void*, void*); - /* 8032C8E4 */ void calcSkin_VtxNrmF32(f32 (*)[4], void*, void*); -}; - -struct J3DMtxBuffer {}; - -struct J3DModelData {}; - -struct J3DSkinDeform { - /* 8032C96C */ J3DSkinDeform(); - /* 8032C9B0 */ void initSkinInfo(J3DModelData*); - /* 8032CF44 */ void initMtxIndexArray(J3DModelData*); - /* 8032D378 */ void changeFastSkinDL(J3DModelData*); - /* 8032D5C4 */ void calcNrmMtx(J3DMtxBuffer*); - /* 8032D738 */ void transformVtxPosNrm(J3DModelData*); - /* 8032D87C */ void calcAnmInvJointMtx(J3DMtxBuffer*); - /* 8032D8F4 */ void deformFastVtxPos_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; - /* 8032DA1C */ void deformFastVtxNrm_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; - /* 8032DB50 */ void deformVtxPos_F32(J3DVertexBuffer*, J3DMtxBuffer*) const; - /* 8032DC74 */ void deformVtxPos_S16(J3DVertexBuffer*, J3DMtxBuffer*) const; - /* 8032DDB8 */ void deformVtxNrm_F32(J3DVertexBuffer*) const; - /* 8032DEBC */ void deformVtxNrm_S16(J3DVertexBuffer*) const; - /* 8032DFDC */ void deform(J3DModel*); - /* 8032E064 */ void deform(J3DVertexBuffer*, J3DMtxBuffer*); - /* 8032E1B0 */ ~J3DSkinDeform(); - - static u8 sWorkArea_WEvlpMixMtx[4096]; - static u8 sWorkArea_WEvlpMixWeight[4096]; - static u8 sWorkArea_MtxReg[2048 + 8 /* padding */]; -}; - -struct J3DShape { - /* 80315260 */ void makeVcdVatCmd(); -}; - // // Forward References: // @@ -102,10 +57,6 @@ extern "C" void J3DGQRSetup7__FUlUlUlUl(); extern "C" void J3DPSCalcInverseTranspose__FPA4_fPA3_f(); extern "C" void makeVcdVatCmd__8J3DShapeFv(); extern "C" void DCStoreRange(); -extern "C" void PSMTXConcat(); -extern "C" void PSMTXInverse(); -extern "C" void PSMTXMultVec(); -extern "C" void PSMTXMultVecSR(); extern "C" void __construct_new_array(); extern "C" void __save_gpr(); extern "C" void _savegpr_17(); diff --git a/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp b/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp index 9f6c3ff241..d270cf02f3 100644 --- a/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp +++ b/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp @@ -11,14 +11,6 @@ // Types: // -struct _GXTexMapID {}; - -struct _GXTexCoordID {}; - -struct _GXTevStageID {}; - -struct _GXTevRegID {}; - struct _GXTevKColorID {}; struct _GXIndTexStageID {}; @@ -31,656 +23,14 @@ struct _GXFogType {}; struct _GXFogAdjTable {}; -struct _GXChannelID {}; - -struct J3DZMode {}; - -struct J3DTexMtx { - /* 803238C4 */ void load(u32) const; - /* 80323900 */ void calc(f32 const (*)[4]); - /* 80323C0C */ void calcPostTexMtx(f32 const (*)[4]); -}; - -struct J3DNBTScale {}; - -struct J3DTexGenBlock { - /* 80317334 */ bool getNBTScale(); - /* 80317420 */ void setNBTScale(J3DNBTScale); - /* 80317424 */ void setNBTScale(J3DNBTScale const*); -}; - -struct J3DTexCoord {}; - -struct J3DTexGenBlockPatched { - /* 80317180 */ ~J3DTexGenBlockPatched(); - /* 80317644 */ void initialize(); - /* 80317B9C */ s32 countDLSize(); - /* 8031AA88 */ void patch(); - /* 8031AC68 */ void diff(u32); - /* 8031ACD0 */ void diffTexMtx(); - /* 8031AD30 */ void diffTexGen(); - /* 80320084 */ void reset(J3DTexGenBlock*); - /* 803213C0 */ void calc(f32 const (*)[4]); - /* 80321584 */ void calcWithoutViewMtx(f32 const (*)[4]); - /* 803216D8 */ void calcPostTexMtx(f32 const (*)[4]); - /* 8032181C */ void calcPostTexMtxWithoutViewMtx(f32 const (*)[4]); - /* 80322D34 */ void setTexGenNum(u32); - /* 80322D3C */ void setTexGenNum(u32 const*); - /* 80322D48 */ void getTexGenNum() const; - /* 80322D50 */ void setTexCoord(u32, J3DTexCoord const*); - /* 80322D64 */ void getTexCoord(u32); - /* 80322D78 */ void setTexMtx(u32, J3DTexMtx*); - /* 80322D88 */ void getTexMtx(u32); - /* 80322D98 */ void getTexMtxOffset() const; - /* 80322DA0 */ void setTexMtxOffset(u32); - /* 80322E70 */ void load(); - /* 80322E74 */ void getType(); -}; - -struct J3DTexGenBlockBasic { - /* 803176A4 */ void initialize(); - /* 80317BAC */ s32 countDLSize(); - /* 8031A9E8 */ void load(); - /* 8031ABC0 */ void patch(); - /* 803202DC */ void reset(J3DTexGenBlock*); - /* 80322C6C */ void getType(); - /* 80322C9C */ void setNBTScale(J3DNBTScale const*); - /* 80322C78 */ void setNBTScale(J3DNBTScale); - /* 80322CC0 */ void getNBTScale(); - /* 80322CC8 */ ~J3DTexGenBlockBasic(); -}; - -struct J3DTexGenBlock4 { - /* 80317674 */ void initialize(); - /* 80317BA4 */ s32 countDLSize(); - /* 8031A948 */ void load(); - /* 8031AB18 */ void patch(); - /* 803201A0 */ void reset(J3DTexGenBlock*); - /* 80322DA8 */ void getType(); - /* 80322DD8 */ void setNBTScale(J3DNBTScale const*); - /* 80322DB4 */ void setNBTScale(J3DNBTScale); - /* 80322DFC */ void getNBTScale(); - /* 80322E04 */ ~J3DTexGenBlock4(); -}; - -struct J3DTevSwapModeTable {}; - -struct J3DTevSwapModeInfo {}; - -struct J3DTevStage {}; - -struct J3DTevOrder {}; - -struct J3DIndTevStage {}; - -struct J3DGXColor {}; - -struct J3DTevBlock { - /* 8000DBC8 */ void patchTexNoAndTexCoordScale(); - /* 8000DBD4 */ void patch(); - /* 8000DF84 */ bool getIndTevStage(u32); - /* 8000DF8C */ bool getTevStage(u32); - /* 8000DF94 */ void getTexNo(u32) const; - /* 8000DFA0 */ bool getTevSwapModeTable(u32); - /* 8000DFA8 */ bool getTevKAlphaSel(u32); - /* 8000DFB0 */ bool getTevKColorSel(u32); - /* 8000DFB8 */ bool getTevOrder(u32); - /* 8000DFC0 */ bool getTevKColor(u32); - /* 8000DFC8 */ bool getTevColor(u32); - /* 8000DFD0 */ bool getTevStageNum() const; - /* 8000E0A4 */ void setIndTevStage(u32, J3DIndTevStage); - /* 80323554 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 8000E0A8 */ void setTevStage(u32, J3DTevStage); - /* 80323550 */ void setTevStage(u32, J3DTevStage const*); - /* 8000E0AC */ void setTexNo(u32, u16); - /* 80323544 */ void setTexNo(u32, u16 const*); - /* 8000E0B0 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 80322960 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 8000E0B4 */ void setTevKAlphaSel(u32, u8); - /* 80322954 */ void setTevKAlphaSel(u32, u8 const*); - /* 8000E0B8 */ void setTevKColorSel(u32, u8); - /* 80322950 */ void setTevKColorSel(u32, u8 const*); - /* 8000E0BC */ void setTevOrder(u32, J3DTevOrder); - /* 80323548 */ void setTevOrder(u32, J3DTevOrder const*); - /* 800732AC */ void setTevKColor(u32, J3DGXColor const*); - /* 8000E0C0 */ void setTevKColor(u32, J3DGXColor); - /* 80110E80 */ void setTevColor(u32, J3DGXColorS10 const*); - /* 8000E0C4 */ void setTevColor(u32, J3DGXColorS10); - /* 8032354C */ void setTevStageNum(u8 const*); - /* 8000E0C8 */ void setTevStageNum(u8); - /* 80317224 */ ~J3DTevBlock(); - /* 8031730C */ bool countDLSize(); - /* 80317330 */ void load(); - /* 80317350 */ void reset(J3DTevBlock*); - /* 8031CD44 */ void diff(u32); - /* 8031E098 */ void indexToPtr_private(u32); - /* 80321938 */ void diffTevReg(); - /* 8032193C */ void diffTevStageIndirect(); - /* 80321940 */ void diffTevStage(); - /* 80321944 */ void diffTexCoordScale(); - /* 80321948 */ void diffTexNo(); - /* 80321FE0 */ void setTexNoOffset(u32); - /* 80322958 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 8032295C */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80322964 */ bool getTevRegOffset() const; - /* 8032296C */ void setTevRegOffset(u32); - /* 8032353C */ void patchTexNo(); - /* 80323540 */ void patchTevReg(); - /* 80323558 */ bool getTexNoOffset() const; -}; - -struct J3DTevBlockPatched { - /* 803176E0 */ void initialize(); - /* 80317BB4 */ s32 countDLSize(); - /* 8031BF4C */ void patchTexNo(); - /* 8031BFE0 */ void patchTevReg(); - /* 8031C0AC */ void patchTexNoAndTexCoordScale(); - /* 8031C228 */ void patch(); - /* 8031CE00 */ void diffTexNo(); - /* 8031CE64 */ void diffTevStage(); - /* 8031CF78 */ void diffTevStageIndirect(); - /* 8031D028 */ void diffTevReg(); - /* 8031D0C4 */ void diffTexCoordScale(); - /* 8031DFB4 */ void ptrToIndex(); - /* 80320418 */ void reset(J3DTevBlock*); - /* 80322970 */ void load(); - /* 80322974 */ void indexToPtr(); - /* 80322998 */ void getType(); - /* 803229A4 */ void setTevStageNum(u8); - /* 803229AC */ void setTevStageNum(u8 const*); - /* 803229B8 */ void getTevStageNum() const; - /* 803229C0 */ void setTexNo(u32, u16); - /* 803229D0 */ void setTexNo(u32, u16 const*); - /* 803229E4 */ void getTexNo(u32) const; - /* 80322A08 */ void setTevOrder(u32, J3DTevOrder const*); - /* 803229F4 */ void setTevOrder(u32, J3DTevOrder); - /* 80322A1C */ void getTevOrder(u32); - /* 80322A30 */ void setTevStage(u32, J3DTevStage); - /* 80322A6C */ void setTevStage(u32, J3DTevStage const*); - /* 80322AA8 */ void getTevStage(u32); - /* 80322ABC */ void setIndTevStage(u32, J3DIndTevStage); - /* 80322AD0 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 80322AE4 */ void getIndTevStage(u32); - /* 80322B24 */ void setTevColor(u32, J3DGXColorS10 const*); - /* 80322AF8 */ void setTevColor(u32, J3DGXColorS10); - /* 80322B50 */ void getTevColor(u32); - /* 80322B90 */ void setTevKColor(u32, J3DGXColor const*); - /* 80322B64 */ void setTevKColor(u32, J3DGXColor); - /* 80322BBC */ void getTevKColor(u32); - /* 80322BD0 */ void setTevKColorSel(u32, u8); - /* 80322BDC */ void setTevKColorSel(u32, u8 const*); - /* 80322BEC */ void getTevKColorSel(u32); - /* 80322BF8 */ void getTexNoOffset() const; - /* 80322C00 */ void getTevRegOffset() const; - /* 80322C08 */ void setTevRegOffset(u32); - /* 80322C10 */ ~J3DTevBlockPatched(); -}; - -struct J3DTevBlockNull { - /* 803176D4 */ void initialize(); -}; - -struct J3DTevBlock4 { - /* 803178EC */ void initialize(); - /* 80317BCC */ s32 countDLSize(); - /* 8031B4C0 */ void load(); - /* 8031C6F4 */ void patchTexNo(); - /* 8031C788 */ void patchTevReg(); - /* 8031C854 */ void patchTexNoAndTexCoordScale(); - /* 8031C9D0 */ void patch(); - /* 8031D758 */ void diffTexNo(); - /* 8031D7BC */ void diffTevReg(); - /* 8031D858 */ void diffTevStage(); - /* 8031D96C */ void diffTevStageIndirect(); - /* 8031DA1C */ void diffTexCoordScale(); - /* 8032098C */ void reset(J3DTevBlock*); - /* 80321FE8 */ void ptrToIndex(); - /* 80321FEC */ void indexToPtr(); - /* 80322010 */ void getType(); - /* 8032201C */ void setTexNo(u32, u16); - /* 8032202C */ void setTexNo(u32, u16 const*); - /* 80322040 */ void getTexNo(u32) const; - /* 80322050 */ void setTevOrder(u32, J3DTevOrder); - /* 80322064 */ void setTevOrder(u32, J3DTevOrder const*); - /* 80322078 */ void getTevOrder(u32); - /* 8032208C */ void setTevColor(u32, J3DGXColorS10); - /* 803220B8 */ void setTevColor(u32, J3DGXColorS10 const*); - /* 803220E4 */ void getTevColor(u32); - /* 80322124 */ void setTevKColor(u32, J3DGXColor const*); - /* 803220F8 */ void setTevKColor(u32, J3DGXColor); - /* 80322150 */ void getTevKColor(u32); - /* 80322164 */ void setTevKColorSel(u32, u8); - /* 80322170 */ void setTevKColorSel(u32, u8 const*); - /* 80322180 */ void getTevKColorSel(u32); - /* 8032218C */ void setTevKAlphaSel(u32, u8); - /* 80322198 */ void setTevKAlphaSel(u32, u8 const*); - /* 803221A8 */ void getTevKAlphaSel(u32); - /* 803221B4 */ void setTevStageNum(u8); - /* 803221BC */ void setTevStageNum(u8 const*); - /* 803221C8 */ void getTevStageNum() const; - /* 8032220C */ void setTevStage(u32, J3DTevStage const*); - /* 803221D0 */ void setTevStage(u32, J3DTevStage); - /* 80322248 */ void getTevStage(u32); - /* 80322294 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 8032225C */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 803222CC */ void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 803222DC */ void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 803222EC */ void getTevSwapModeTable(u32); - /* 80322310 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 803222FC */ void setIndTevStage(u32, J3DIndTevStage); - /* 80322324 */ void getIndTevStage(u32); - /* 80322338 */ void getTexNoOffset() const; - /* 80322340 */ void getTevRegOffset() const; - /* 80322348 */ void setTevRegOffset(u32); - /* 80322350 */ ~J3DTevBlock4(); -}; - -struct J3DTevBlock2 { - /* 80317810 */ void initialize(); - /* 80317BC4 */ s32 countDLSize(); - /* 8031AFA4 */ void load(); - /* 8031C3F8 */ void patchTexNo(); - /* 8031C48C */ void patchTevReg(); - /* 8031C558 */ void patchTexNoAndTexCoordScale(); - /* 8031C6A8 */ void patch(); - /* 8031D3D0 */ void diffTexNo(); - /* 8031D434 */ void diffTevReg(); - /* 8031D4D0 */ void diffTevStage(); - /* 8031D5E4 */ void diffTevStageIndirect(); - /* 8031D694 */ void diffTexCoordScale(); - /* 803206AC */ void reset(J3DTevBlock*); - /* 803223AC */ void ptrToIndex(); - /* 803223B0 */ void indexToPtr(); - /* 803223D4 */ void getType(); - /* 803223E0 */ void setTexNo(u32, u16); - /* 803223F0 */ void setTexNo(u32, u16 const*); - /* 80322404 */ void getTexNo(u32) const; - /* 80322414 */ void setTevOrder(u32, J3DTevOrder); - /* 80322428 */ void setTevOrder(u32, J3DTevOrder const*); - /* 8032243C */ void getTevOrder(u32); - /* 80322450 */ void setTevColor(u32, J3DGXColorS10); - /* 8032247C */ void setTevColor(u32, J3DGXColorS10 const*); - /* 803224A8 */ void getTevColor(u32); - /* 803224BC */ void setTevKColor(u32, J3DGXColor); - /* 803224E8 */ void setTevKColor(u32, J3DGXColor const*); - /* 80322514 */ void getTevKColor(u32); - /* 80322528 */ void setTevKColorSel(u32, u8); - /* 80322534 */ void setTevKColorSel(u32, u8 const*); - /* 80322544 */ void getTevKColorSel(u32); - /* 80322550 */ void setTevKAlphaSel(u32, u8); - /* 8032255C */ void setTevKAlphaSel(u32, u8 const*); - /* 8032256C */ void getTevKAlphaSel(u32); - /* 80322580 */ void setTevStageNum(u8 const*); - /* 80322578 */ void setTevStageNum(u8); - /* 8032258C */ void getTevStageNum() const; - /* 80322594 */ void setTevStage(u32, J3DTevStage); - /* 803225D0 */ void setTevStage(u32, J3DTevStage const*); - /* 8032260C */ void getTevStage(u32); - /* 80322620 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 80322658 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80322690 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 803226A0 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 803226B0 */ void getTevSwapModeTable(u32); - /* 803226C0 */ void setIndTevStage(u32, J3DIndTevStage); - /* 803226D4 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 803226E8 */ void getIndTevStage(u32); - /* 803226FC */ void getTexNoOffset() const; - /* 80322704 */ void getTevRegOffset() const; - /* 8032270C */ void setTevRegOffset(u32); - /* 80322714 */ ~J3DTevBlock2(); -}; - -struct J3DTevBlock16 { - /* 80317A00 */ void initialize(); - /* 80317BD4 */ s32 countDLSize(); - /* 8031BA04 */ void load(); - /* 8031CA1C */ void patchTexNo(); - /* 8031CAB0 */ void patchTevReg(); - /* 8031CB7C */ void patchTexNoAndTexCoordScale(); - /* 8031CCF8 */ void patch(); - /* 8031DB14 */ void diffTexNo(); - /* 8031DB78 */ void diffTevReg(); - /* 8031DC14 */ void diffTevStage(); - /* 8031DD28 */ void diffTevStageIndirect(); - /* 8031DDD8 */ void diffTexCoordScale(); - /* 8031DED0 */ void ptrToIndex(); - /* 80320E24 */ void reset(J3DTevBlock*); - /* 80321C20 */ void indexToPtr(); - /* 80321C44 */ void getType(); - /* 80321C50 */ void setTexNo(u32, u16); - /* 80321C60 */ void setTexNo(u32, u16 const*); - /* 80321C74 */ void getTexNo(u32) const; - /* 80321C84 */ void setTevOrder(u32, J3DTevOrder); - /* 80321C98 */ void setTevOrder(u32, J3DTevOrder const*); - /* 80321CAC */ void getTevOrder(u32); - /* 80321CC0 */ void setTevColor(u32, J3DGXColorS10); - /* 80321CEC */ void setTevColor(u32, J3DGXColorS10 const*); - /* 80321D18 */ void getTevColor(u32); - /* 80321D2C */ void setTevKColor(u32, J3DGXColor); - /* 80321D58 */ void setTevKColor(u32, J3DGXColor const*); - /* 80321D84 */ void getTevKColor(u32); - /* 80321D98 */ void setTevKColorSel(u32, u8); - /* 80321DA4 */ void setTevKColorSel(u32, u8 const*); - /* 80321DB4 */ void getTevKColorSel(u32); - /* 80321DC0 */ void setTevKAlphaSel(u32, u8); - /* 80321DCC */ void setTevKAlphaSel(u32, u8 const*); - /* 80321DDC */ void getTevKAlphaSel(u32); - /* 80321DE8 */ void setTevStageNum(u8); - /* 80321DF0 */ void setTevStageNum(u8 const*); - /* 80321DFC */ void getTevStageNum() const; - /* 80321E04 */ void setTevStage(u32, J3DTevStage); - /* 80321E40 */ void setTevStage(u32, J3DTevStage const*); - /* 80321E7C */ void getTevStage(u32); - /* 80321E90 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); - /* 80321EC8 */ void setTevSwapModeInfo(u32, J3DTevSwapModeInfo const*); - /* 80321F00 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 80321F10 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable const*); - /* 80321F20 */ void getTevSwapModeTable(u32); - /* 80321F30 */ void setIndTevStage(u32, J3DIndTevStage); - /* 80321F44 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 80321F58 */ void getIndTevStage(u32); - /* 80321F6C */ void getTexNoOffset() const; - /* 80321F74 */ void getTevRegOffset() const; - /* 80321F7C */ void setTevRegOffset(u32); - /* 80321F84 */ ~J3DTevBlock16(); -}; - -struct J3DTevBlock1 { - /* 803177E8 */ void initialize(); - /* 80317BBC */ s32 countDLSize(); - /* 8031AD64 */ void load(); - /* 8031C274 */ void patchTexNo(); - /* 8031C2E4 */ void patchTevReg(); - /* 8031C2E8 */ void patchTexNoAndTexCoordScale(); - /* 8031C3CC */ void patch(); - /* 8031D1BC */ void diffTexNo(); - /* 8031D1F4 */ void diffTevReg(); - /* 8031D1F8 */ void diffTevStage(); - /* 8031D2E8 */ void diffTevStageIndirect(); - /* 8031D368 */ void diffTexCoordScale(); - /* 803205D4 */ void reset(J3DTevBlock*); - /* 80322770 */ void ptrToIndex(); - /* 80322774 */ void indexToPtr(); - /* 80322798 */ void getType(); - /* 803227A4 */ void setTexNo(u32, u16); - /* 803227B4 */ void setTexNo(u32, u16 const*); - /* 803227C8 */ void getTexNo(u32) const; - /* 803227D8 */ void setTevOrder(u32, J3DTevOrder); - /* 803227EC */ void setTevOrder(u32, J3DTevOrder const*); - /* 80322800 */ void getTevOrder(u32); - /* 80322814 */ void setTevStageNum(u8); - /* 80322818 */ void setTevStageNum(u8 const*); - /* 8032281C */ bool getTevStageNum() const; - /* 80322824 */ void setTevStage(u32, J3DTevStage); - /* 80322860 */ void setTevStage(u32, J3DTevStage const*); - /* 8032289C */ void getTevStage(u32); - /* 803228B0 */ void setIndTevStage(u32, J3DIndTevStage); - /* 803228C4 */ void setIndTevStage(u32, J3DIndTevStage const*); - /* 803228D8 */ void getIndTevStage(u32); - /* 803228EC */ void getTexNoOffset() const; - /* 803228F4 */ ~J3DTevBlock1(); -}; - struct J3DSys { static u8 sTexCoordScaleTable[64 + 4 /* padding */]; }; -struct J3DPEBlockXlu { - /* 80317BF4 */ s32 countDLSize(); - /* 8031E98C */ void load(); - /* 80323258 */ void getType(); - /* 80323264 */ ~J3DPEBlockXlu(); -}; - -struct J3DPEBlockTexEdge { - /* 80317BEC */ s32 countDLSize(); - /* 8031E6C8 */ void load(); - /* 803232C0 */ void getType(); - /* 803232CC */ ~J3DPEBlockTexEdge(); -}; - -struct J3DPEBlockOpa { - /* 80317BE4 */ s32 countDLSize(); - /* 8031E408 */ void load(); - /* 80323328 */ void getType(); - /* 80323334 */ ~J3DPEBlockOpa(); -}; - -struct J3DBlend {}; - -struct J3DFog {}; - -struct J3DAlphaComp {}; - -struct J3DPEBlock { - /* 8000DBCC */ void patch(); - /* 8000DF3C */ bool getZCompLoc() const; - /* 8000DF44 */ bool getZMode(); - /* 8000DF4C */ bool getBlend(); - /* 8000DF54 */ bool getAlphaComp(); - /* 8000DF5C */ bool getFog(); - /* 8000E010 */ void setZCompLoc(u8); - /* 80317378 */ void setZCompLoc(u8 const*); - /* 8000E014 */ void setZMode(J3DZMode); - /* 80317374 */ void setZMode(J3DZMode const*); - /* 8000E018 */ void setBlend(J3DBlend const&); - /* 80317370 */ void setBlend(J3DBlend const*); - /* 8000E01C */ void setAlphaComp(J3DAlphaComp const&); - /* 8031736C */ void setAlphaComp(J3DAlphaComp const*); - /* 80317344 */ void diff(u32); - /* 80317348 */ void reset(J3DPEBlock*); - /* 8031735C */ void diffFog(); - /* 80317360 */ void diffBlend(); - /* 80317364 */ void setFog(J3DFog*); - /* 80317368 */ void setFog(J3DFog); - /* 80317380 */ void setDither(u8 const*); - /* 8031737C */ void setDither(u8); - /* 80317384 */ bool getDither() const; - /* 8031738C */ bool getFogOffset() const; - /* 80317394 */ void setFogOffset(u32); -}; - -struct J3DPEBlockFull { - /* 80317B58 */ void initialize(); - /* 80317C04 */ s32 countDLSize(); - /* 8031F3C0 */ void load(); - /* 8031F890 */ void patch(); - /* 8031F940 */ void diffFog(); - /* 8031F9B8 */ void diffBlend(); - /* 8031FCA0 */ void diff(u32); - /* 8032129C */ void reset(J3DPEBlock*); - /* 8032194C */ void getType(); - /* 80321958 */ void setFog(J3DFog*); - /* 8032197C */ void setFog(J3DFog); - /* 803219A0 */ void getFog(); - /* 803219A8 */ void setAlphaComp(J3DAlphaComp const&); - /* 803219C4 */ void setAlphaComp(J3DAlphaComp const*); - /* 803219E0 */ void getAlphaComp(); - /* 803219E8 */ void setBlend(J3DBlend const&); - /* 803219F4 */ void setBlend(J3DBlend const*); - /* 80321A00 */ void getBlend(); - /* 80321A08 */ void setZMode(J3DZMode); - /* 80321A14 */ void setZMode(J3DZMode const*); - /* 80321A20 */ void getZMode(); - /* 80321A28 */ void setZCompLoc(u8); - /* 80321A30 */ void setZCompLoc(u8 const*); - /* 80321A3C */ void getZCompLoc() const; - /* 80321A44 */ void setDither(u8); - /* 80321A4C */ void setDither(u8 const*); - /* 80321A58 */ void getDither() const; - /* 80321A60 */ void getFogOffset() const; - /* 80321A68 */ void setFogOffset(u32); - /* 80321A70 */ ~J3DPEBlockFull(); -}; - -struct J3DPEBlockFogOff { - /* 80317B34 */ void initialize(); - /* 80317BFC */ s32 countDLSize(); - /* 8031EC50 */ void load(); - /* 8031F0D8 */ void diffBlend(); - /* 803211B4 */ void reset(J3DPEBlock*); - /* 80321ACC */ void diff(u32); - /* 80321B00 */ void getType(); - /* 80321B0C */ void setAlphaComp(J3DAlphaComp const&); - /* 80321B28 */ void setAlphaComp(J3DAlphaComp const*); - /* 80321B44 */ void getAlphaComp(); - /* 80321B4C */ void setBlend(J3DBlend const&); - /* 80321B58 */ void setBlend(J3DBlend const*); - /* 80321B64 */ void getBlend(); - /* 80321B6C */ void setZMode(J3DZMode); - /* 80321B78 */ void setZMode(J3DZMode const*); - /* 80321B84 */ void getZMode(); - /* 80321B8C */ void setZCompLoc(u8); - /* 80321B94 */ void setZCompLoc(u8 const*); - /* 80321BA0 */ void getZCompLoc() const; - /* 80321BA8 */ void setDither(u8); - /* 80321BB0 */ void setDither(u8 const*); - /* 80321BBC */ void getDither() const; - /* 80321BC4 */ ~J3DPEBlockFogOff(); -}; - -struct J3DNBTScaleInfo { - /* 8032587C */ void operator=(J3DNBTScaleInfo const&); -}; - -struct J3DLightObj { - /* 80323590 */ void load(u32) const; -}; - -struct J3DIndTexOrder {}; - struct J3DIndTexMtxInfo { /* 803257DC */ void operator=(J3DIndTexMtxInfo const&); }; -struct J3DIndTexMtx { - /* 8000E064 */ ~J3DIndTexMtx(); -}; - -struct J3DIndTexCoordScale { - /* 8000E024 */ ~J3DIndTexCoordScale(); -}; - -struct J3DIndBlock {}; - -struct J3DIndBlockFull { - /* 80317B28 */ void initialize(); - /* 80317BDC */ s32 countDLSize(); - /* 8031E12C */ void load(); - /* 8031E328 */ void diff(u32); - /* 803210B0 */ void reset(J3DIndBlock*); - /* 80323390 */ void getType(); - /* 8032339C */ void setIndTexStageNum(u8); - /* 803233A4 */ void getIndTexStageNum() const; - /* 803233C0 */ void setIndTexOrder(u32, J3DIndTexOrder const*); - /* 803233AC */ void setIndTexOrder(u32, J3DIndTexOrder); - /* 803233D4 */ void getIndTexOrder(u32); - /* 803233E8 */ void setIndTexMtx(u32, J3DIndTexMtx); - /* 8032341C */ void setIndTexMtx(u32, J3DIndTexMtx const*); - /* 80323450 */ void getIndTexMtx(u32); - /* 80323464 */ void setIndTexCoordScale(u32, J3DIndTexCoordScale); - /* 80323478 */ void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); - /* 8032348C */ void getIndTexCoordScale(u32); - /* 803234A0 */ ~J3DIndBlockFull(); -}; - -struct J3DFogInfo { - /* 80325800 */ void operator=(J3DFogInfo const&); -}; - -struct J3DColorChan {}; - -struct J3DColorBlock { - /* 8000DFF0 */ bool getAmbColor(u32); - /* 801A4C0C */ void setAmbColor(u32, J3DGXColor const*); - /* 8000E0D4 */ void setAmbColor(u32, J3DGXColor); - /* 801A4C08 */ void setLight(u32, J3DLightObj*); - /* 80317438 */ void diffAmbColor(); - /* 80317444 */ void diffLightObj(u32); - /* 80317454 */ bool getLight(u32); -}; - -struct J3DColorBlockLightOn { - /* 80317580 */ void initialize(); - /* 80317B94 */ s32 countDLSize(); - /* 803187F4 */ void load(); - /* 803194E8 */ void patch(); - /* 80319534 */ void patchMatColor(); - /* 803196E0 */ void patchLight(); - /* 8031A13C */ void diff(u32); - /* 8031A1DC */ void diffAmbColor(); - /* 8031A358 */ void diffMatColor(); - /* 8031A4D4 */ void diffColorChan(); - /* 8031A8E0 */ void diffLightObj(u32); - /* 8031FF34 */ void reset(J3DColorBlock*); - /* 80322E80 */ void getType(); - /* 80322E8C */ void setMatColor(u32, J3DGXColor); - /* 80322EB8 */ void setMatColor(u32, J3DGXColor const*); - /* 80322EE4 */ void getMatColor(u32); - /* 80322F24 */ void setAmbColor(u32, J3DGXColor const*); - /* 80322EF8 */ void setAmbColor(u32, J3DGXColor); - /* 80322F50 */ void getAmbColor(u32); - /* 80322F64 */ void setColorChanNum(u8 const*); - /* 80322F70 */ void setColorChanNum(u8); - /* 80322F78 */ void getColorChanNum() const; - /* 80322F80 */ void setColorChan(u32, J3DColorChan const*); - /* 80322F94 */ void setColorChan(u32, J3DColorChan const&); - /* 80322FA8 */ void getColorChan(u32); - /* 80322FBC */ void setLight(u32, J3DLightObj*); - /* 80322FCC */ void getLight(u32); - /* 80322FDC */ void setCullMode(u8); - /* 80322FE4 */ void setCullMode(u8 const*); - /* 80322FF0 */ void getCullMode() const; - /* 80322FF8 */ void getMatColorOffset() const; - /* 80323000 */ void getColorChanOffset() const; - /* 80323008 */ void setMatColorOffset(u32); - /* 80323010 */ void setColorChanOffset(u32); - /* 80323018 */ ~J3DColorBlockLightOn(); -}; - -struct J3DColorBlockLightOff { - /* 803170DC */ ~J3DColorBlockLightOff(); - /* 8031747C */ void initialize(); - /* 80317B84 */ s32 countDLSize(); - /* 80317C0C */ void load(); - /* 80318EB4 */ void patch(); - /* 80318F00 */ void patchMatColor(); - /* 803190AC */ void patchLight(); - /* 80319B4C */ void diff(u32); - /* 80319BB4 */ void diffMatColor(); - /* 80319D30 */ void diffColorChan(); - /* 8031FD08 */ void reset(J3DColorBlock*); - /* 80323184 */ void setMatColor(u32, J3DGXColor const*); - /* 80323158 */ void setMatColor(u32, J3DGXColor); - /* 803231B0 */ void getMatColor(u32); - /* 803231C4 */ void setColorChanNum(u8 const*); - /* 803231D0 */ void setColorChanNum(u8); - /* 803231D8 */ void getColorChanNum() const; - /* 803231E0 */ void setColorChan(u32, J3DColorChan const*); - /* 803231F4 */ void setColorChan(u32, J3DColorChan const&); - /* 80323208 */ void getColorChan(u32); - /* 8032321C */ void setCullMode(u8); - /* 80323224 */ void setCullMode(u8 const*); - /* 80323230 */ void getCullMode() const; - /* 80323238 */ void getMatColorOffset() const; - /* 80323240 */ void getColorChanOffset() const; - /* 80323248 */ void setMatColorOffset(u32); - /* 80323250 */ void setColorChanOffset(u32); - /* 80323560 */ void getType(); -}; - -struct J3DColorBlockAmbientOn { - /* 803174DC */ void initialize(); - /* 80317B8C */ s32 countDLSize(); - /* 8031816C */ void load(); - /* 8031FDE4 */ void reset(J3DColorBlock*); - /* 80323074 */ void getType(); - /* 80323080 */ void setAmbColor(u32, J3DGXColor); - /* 803230AC */ void setAmbColor(u32, J3DGXColor const*); - /* 803230D8 */ void getAmbColor(u32); - /* 803230EC */ ~J3DColorBlockAmbientOn(); -}; - // // Forward References: // @@ -1240,9 +590,6 @@ extern "C" void __as__16J3DIndTexMtxInfoFRC16J3DIndTexMtxInfo(); extern "C" void __as__10J3DFogInfoFRC10J3DFogInfo(); extern "C" void __as__15J3DNBTScaleInfoFRC15J3DNBTScaleInfo(); extern "C" void DCStoreRange(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXConcat(); -extern "C" void PSMTXInverse(); extern "C" void GDOverflowed(); extern "C" void __destroy_arr(); extern "C" void _savegpr_24(); @@ -1528,7 +875,8 @@ SECTION_SDATA2 static u32 lit_585 = 0x02000201; #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DColorBlockLightOff::load() { +extern "C" asm void load__21J3DColorBlockLightOffFv() { + // asm void J3DColorBlockLightOff::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__21J3DColorBlockLightOffFv.s" } @@ -1542,7 +890,8 @@ static u8 SizeOfJ3DColorBlockAmbientOnLoad[4]; #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DColorBlockAmbientOn::load() { +extern "C" asm void load__22J3DColorBlockAmbientOnFv() { + // asm void J3DColorBlockAmbientOn::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__22J3DColorBlockAmbientOnFv.s" } @@ -1552,7 +901,8 @@ asm void J3DColorBlockAmbientOn::load() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DColorBlockLightOn::load() { +extern "C" asm void load__20J3DColorBlockLightOnFv() { + // asm void J3DColorBlockLightOn::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__20J3DColorBlockLightOnFv.s" } @@ -2351,7 +1701,8 @@ asm void J3DIndBlockFull::diff(u32 param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DPEBlockOpa::load() { +extern "C" asm void load__13J3DPEBlockOpaFv() { + // asm void J3DPEBlockOpa::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__13J3DPEBlockOpaFv.s" } @@ -2361,7 +1712,8 @@ asm void J3DPEBlockOpa::load() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DPEBlockTexEdge::load() { +extern "C" asm void load__17J3DPEBlockTexEdgeFv() { + // asm void J3DPEBlockTexEdge::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__17J3DPEBlockTexEdgeFv.s" } @@ -2371,7 +1723,8 @@ asm void J3DPEBlockTexEdge::load() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DPEBlockXlu::load() { +extern "C" asm void load__13J3DPEBlockXluFv() { + // asm void J3DPEBlockXlu::load() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/load__13J3DPEBlockXluFv.s" } @@ -2494,7 +1847,8 @@ SECTION_DEAD static char const* const pad_803A1EC5 = "\0\0"; #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexGenBlockPatched::reset(J3DTexGenBlock* param_0) { +extern "C" asm void reset__21J3DTexGenBlockPatchedFP14J3DTexGenBlock() { + // asm void J3DTexGenBlockPatched::reset(J3DTexGenBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__21J3DTexGenBlockPatchedFP14J3DTexGenBlock.s" } @@ -2505,7 +1859,8 @@ asm void J3DTexGenBlockPatched::reset(J3DTexGenBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexGenBlock4::reset(J3DTexGenBlock* param_0) { +extern "C" asm void reset__15J3DTexGenBlock4FP14J3DTexGenBlock() { + // asm void J3DTexGenBlock4::reset(J3DTexGenBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__15J3DTexGenBlock4FP14J3DTexGenBlock.s" } @@ -2516,7 +1871,8 @@ asm void J3DTexGenBlock4::reset(J3DTexGenBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexGenBlockBasic::reset(J3DTexGenBlock* param_0) { +extern "C" asm void reset__19J3DTexGenBlockBasicFP14J3DTexGenBlock() { + // asm void J3DTexGenBlockBasic::reset(J3DTexGenBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__19J3DTexGenBlockBasicFP14J3DTexGenBlock.s" } @@ -2527,7 +1883,8 @@ asm void J3DTexGenBlockBasic::reset(J3DTexGenBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTevBlockPatched::reset(J3DTevBlock* param_0) { +extern "C" asm void reset__18J3DTevBlockPatchedFP11J3DTevBlock() { + // asm void J3DTevBlockPatched::reset(J3DTevBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__18J3DTevBlockPatchedFP11J3DTevBlock.s" } @@ -2537,7 +1894,8 @@ asm void J3DTevBlockPatched::reset(J3DTevBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTevBlock1::reset(J3DTevBlock* param_0) { +extern "C" asm void reset__12J3DTevBlock1FP11J3DTevBlock() { + // asm void J3DTevBlock1::reset(J3DTevBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__12J3DTevBlock1FP11J3DTevBlock.s" } @@ -2547,7 +1905,8 @@ asm void J3DTevBlock1::reset(J3DTevBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTevBlock2::reset(J3DTevBlock* param_0) { +extern "C" asm void reset__12J3DTevBlock2FP11J3DTevBlock() { + // asm void J3DTevBlock2::reset(J3DTevBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__12J3DTevBlock2FP11J3DTevBlock.s" } @@ -2557,7 +1916,8 @@ asm void J3DTevBlock2::reset(J3DTevBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTevBlock4::reset(J3DTevBlock* param_0) { +extern "C" asm void reset__12J3DTevBlock4FP11J3DTevBlock() { + // asm void J3DTevBlock4::reset(J3DTevBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__12J3DTevBlock4FP11J3DTevBlock.s" } @@ -2567,7 +1927,8 @@ asm void J3DTevBlock4::reset(J3DTevBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTevBlock16::reset(J3DTevBlock* param_0) { +extern "C" asm void reset__13J3DTevBlock16FP11J3DTevBlock() { + // asm void J3DTevBlock16::reset(J3DTevBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__13J3DTevBlock16FP11J3DTevBlock.s" } @@ -2577,7 +1938,8 @@ asm void J3DTevBlock16::reset(J3DTevBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DIndBlockFull::reset(J3DIndBlock* param_0) { +extern "C" asm void reset__15J3DIndBlockFullFP11J3DIndBlock() { + // asm void J3DIndBlockFull::reset(J3DIndBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__15J3DIndBlockFullFP11J3DIndBlock.s" } @@ -2587,7 +1949,8 @@ asm void J3DIndBlockFull::reset(J3DIndBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DPEBlockFogOff::reset(J3DPEBlock* param_0) { +extern "C" asm void reset__16J3DPEBlockFogOffFP10J3DPEBlock() { + // asm void J3DPEBlockFogOff::reset(J3DPEBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__16J3DPEBlockFogOffFP10J3DPEBlock.s" } @@ -2597,7 +1960,8 @@ asm void J3DPEBlockFogOff::reset(J3DPEBlock* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DPEBlockFull::reset(J3DPEBlock* param_0) { +extern "C" asm void reset__14J3DPEBlockFullFP10J3DPEBlock() { + // asm void J3DPEBlockFull::reset(J3DPEBlock* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/reset__14J3DPEBlockFullFP10J3DPEBlock.s" } diff --git a/libs/JSystem/J3DGraphBase/J3DMaterial.cpp b/libs/JSystem/J3DGraphBase/J3DMaterial.cpp index 2c5c12fdee..e8e07615cd 100644 --- a/libs/JSystem/J3DGraphBase/J3DMaterial.cpp +++ b/libs/JSystem/J3DGraphBase/J3DMaterial.cpp @@ -7,315 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct _GXCullMode {}; - -struct J3DZMode {}; - -struct J3DTexMtx {}; - -struct J3DTexGenBlockPatched { - /* 80317180 */ ~J3DTexGenBlockPatched(); - /* 80317644 */ void initialize(); -}; - -struct J3DTexGenBlockBasic { - /* 803176A4 */ void initialize(); -}; - -struct J3DTexGenBlock4 { - /* 80317674 */ void initialize(); -}; - -struct J3DNBTScale {}; - -struct J3DTexCoord { - /* 8000E464 */ J3DTexCoord(); -}; - -struct J3DTexGenBlock { - /* 8000DFD8 */ bool getTexMtx(u32); - /* 8000DFE0 */ bool getTexCoord(u32); - /* 8000DFE8 */ bool getTexGenNum() const; - /* 8000E0CC */ void setTexCoord(u32, J3DTexCoord const*); - /* 8031741C */ void setTexGenNum(u32 const*); - /* 8000E0D0 */ void setTexGenNum(u32); - /* 8003AB2C */ void setTexMtx(u32, J3DTexMtx*); - /* 803171DC */ ~J3DTexGenBlock(); - /* 803172FC */ bool countDLSize(); - /* 80317334 */ bool getNBTScale(); - /* 80317354 */ void reset(J3DTexGenBlock*); - /* 80317420 */ void setNBTScale(J3DNBTScale); - /* 80317424 */ void setNBTScale(J3DNBTScale const*); - /* 80317428 */ bool getTexMtxOffset() const; - /* 80317430 */ void setTexMtxOffset(u32); -}; - -struct J3DTevSwapModeTable { - /* 8000E134 */ J3DTevSwapModeTable(); -}; - -struct J3DTevStage { - /* 8000E230 */ J3DTevStage(); -}; - -struct J3DTevOrder { - /* 8000E140 */ J3DTevOrder(); -}; - -struct J3DTevBlock4 { - /* 803178EC */ void initialize(); -}; - -struct J3DTevBlock2 { - /* 80317810 */ void initialize(); -}; - -struct J3DTevBlock16 { - /* 80317A00 */ void initialize(); -}; - -struct J3DTevBlock1 { - /* 803177E8 */ void initialize(); -}; - -struct J3DTevBlock { - /* 80317224 */ ~J3DTevBlock(); - /* 8031730C */ bool countDLSize(); - /* 80317330 */ void load(); - /* 80317350 */ void reset(J3DTevBlock*); -}; - -struct J3DPatchedMaterial { - /* 80316FB8 */ void initialize(); - /* 80316FD8 */ void makeDisplayList(); - /* 80316FDC */ void makeSharedDisplayList(); - /* 80316FE0 */ void load(); - /* 80316FFC */ void loadSharedDL(); - /* 8031703C */ void reset(); - /* 80317040 */ void change(); -}; - -struct J3DPEBlockFull { - /* 80317B58 */ void initialize(); -}; - -struct J3DPEBlockFogOff { - /* 80317B34 */ void initialize(); -}; - -struct J3DFog {}; - -struct J3DAlphaComp {}; - -struct J3DBlend {}; - -struct J3DPEBlock { - /* 8000DBCC */ void patch(); - /* 8000DF3C */ bool getZCompLoc() const; - /* 8000DF44 */ bool getZMode(); - /* 8000DF4C */ bool getBlend(); - /* 8000DF54 */ bool getAlphaComp(); - /* 8000DF5C */ bool getFog(); - /* 8000E010 */ void setZCompLoc(u8); - /* 80317378 */ void setZCompLoc(u8 const*); - /* 8000E014 */ void setZMode(J3DZMode); - /* 80317374 */ void setZMode(J3DZMode const*); - /* 8000E018 */ void setBlend(J3DBlend const&); - /* 80317370 */ void setBlend(J3DBlend const*); - /* 8000E01C */ void setAlphaComp(J3DAlphaComp const&); - /* 8031736C */ void setAlphaComp(J3DAlphaComp const*); - /* 803172B4 */ ~J3DPEBlock(); - /* 8031731C */ bool countDLSize(); - /* 80317344 */ void diff(u32); - /* 80317348 */ void reset(J3DPEBlock*); - /* 8031735C */ void diffFog(); - /* 80317360 */ void diffBlend(); - /* 80317364 */ void setFog(J3DFog*); - /* 80317368 */ void setFog(J3DFog); - /* 80317380 */ void setDither(u8 const*); - /* 8031737C */ void setDither(u8); - /* 80317384 */ bool getDither() const; - /* 8031738C */ bool getFogOffset() const; - /* 80317394 */ void setFogOffset(u32); -}; - -struct J3DDisplayListObj { - /* 80312488 */ void newDisplayList(u32); - /* 80312508 */ void newSingleDisplayList(u32); - /* 80312618 */ void callDL() const; - /* 80312644 */ void beginDL(); - /* 80312698 */ void endDL(); - /* 803126F4 */ void beginPatch(); - /* 80312714 */ void endPatch(); -}; - -struct J3DMaterial { - /* 803157A0 */ void createColorBlock(u32); - /* 803159A0 */ void createTexGenBlock(u32); - /* 80315B04 */ void createTevBlock(int); - /* 80315E78 */ void createIndBlock(int); - /* 80315F60 */ void createPEBlock(u32, u32); - /* 80316100 */ void calcSizeColorBlock(u32); - /* 80316150 */ void calcSizeTexGenBlock(u32); - /* 8031617C */ void calcSizeTevBlock(int); - /* 803161C4 */ void calcSizeIndBlock(int); - /* 803161D8 */ void calcSizePEBlock(u32, u32); - /* 80316240 */ void initialize(); - /* 80316290 */ void countDLSize(); - /* 80316344 */ void makeDisplayList_private(J3DDisplayListObj*); - /* 80316620 */ void makeDisplayList(); - /* 80316668 */ void makeSharedDisplayList(); - /* 8031668C */ void load(); - /* 803166DC */ void loadSharedDL(); - /* 80316740 */ void patch(); - /* 803167D8 */ void diff(u32); - /* 803169DC */ void calc(f32 const (*)[4]); - /* 80316A54 */ void calcDiffTexMtx(f32 const (*)[4]); - /* 80316AB0 */ void setCurrentMtx(); - /* 80316AC8 */ void calcCurrentMtx(); - /* 80316D68 */ void copy(J3DMaterial*); - /* 80316E14 */ void reset(); - /* 80316E70 */ void change(); - /* 80316E90 */ void newSharedDisplayList(u32); - /* 80316F24 */ void newSingleSharedDisplayList(u32); -}; - -struct J3DMatPacket { - /* 80312A24 */ void beginDiff(); - /* 80312A4C */ void endDiff(); -}; - -struct J3DLockedMaterial { - /* 80317044 */ void initialize(); - /* 80317064 */ void makeDisplayList(); - /* 80317068 */ void makeSharedDisplayList(); - /* 8031706C */ void load(); - /* 80317088 */ void loadSharedDL(); - /* 803170C8 */ void patch(); - /* 803170CC */ void diff(u32); - /* 803170D0 */ void calc(f32 const (*)[4]); - /* 803170D4 */ void reset(); - /* 803170D8 */ void change(); -}; - -struct J3DLightObj {}; - -struct J3DIndTexOrder { - /* 8000E128 */ J3DIndTexOrder(); -}; - -struct J3DIndTexMtx { - /* 8000E064 */ ~J3DIndTexMtx(); - /* 8000E0F0 */ J3DIndTexMtx(); -}; - -struct J3DIndTexCoordScale { - /* 8000E024 */ ~J3DIndTexCoordScale(); - /* 8000E0E4 */ J3DIndTexCoordScale(); -}; - -struct J3DIndTevStage { - /* 8000E14C */ J3DIndTevStage(); -}; - -struct J3DIndBlock { - /* 8000DF64 */ bool getIndTexCoordScale(u32); - /* 8000DF6C */ bool getIndTexMtx(u32); - /* 8000DF74 */ bool getIndTexOrder(u32); - /* 8000DF7C */ bool getIndTexStageNum() const; - /* 8000E020 */ void setIndTexCoordScale(u32, J3DIndTexCoordScale); - /* 80317418 */ void setIndTexCoordScale(u32, J3DIndTexCoordScale const*); - /* 8000E060 */ void setIndTexMtx(u32, J3DIndTexMtx); - /* 80317414 */ void setIndTexMtx(u32, J3DIndTexMtx const*); - /* 8000E0A0 */ void setIndTexStageNum(u8); - /* 8031726C */ ~J3DIndBlock(); - /* 80317314 */ bool countDLSize(); - /* 8031734C */ void reset(J3DIndBlock*); - /* 8031740C */ void setIndTexOrder(u32, J3DIndTexOrder const*); - /* 80317410 */ void setIndTexOrder(u32, J3DIndTexOrder); -}; - -struct J3DIndBlockNull { - /* 80317398 */ void diff(u32); - /* 8031739C */ void load(); - /* 803173A0 */ void reset(J3DIndBlock*); - /* 803173A4 */ void getType(); - /* 803173B0 */ ~J3DIndBlockNull(); -}; - -struct J3DIndBlockFull { - /* 80317B28 */ void initialize(); -}; - -struct J3DGXColorS10 { - /* 8000E460 */ J3DGXColorS10(); -}; - -struct J3DGXColor { - /* 8000E538 */ J3DGXColor(); -}; - -struct J3DFogInfo { - /* 80325800 */ void operator=(J3DFogInfo const&); -}; - -struct J3DColorChan { - /* 8000E47C */ J3DColorChan(); -}; - -struct J3DColorBlockLightOn { - /* 80317580 */ void initialize(); -}; - -struct J3DColorBlockLightOff { - /* 803170DC */ ~J3DColorBlockLightOff(); - /* 8031747C */ void initialize(); -}; - -struct J3DColorBlockAmbientOn { - /* 803174DC */ void initialize(); -}; - -struct J3DColorBlock { - /* 8000DBD0 */ void patchLight(); - /* 8000DFF0 */ bool getAmbColor(u32); - /* 8000DFF8 */ bool getColorChan(u32); - /* 8000E000 */ bool getMatColor(u32); - /* 8000E008 */ bool getColorChanNum() const; - /* 801A4C0C */ void setAmbColor(u32, J3DGXColor const*); - /* 8000E0D4 */ void setAmbColor(u32, J3DGXColor); - /* 80317450 */ void setColorChan(u32, J3DColorChan const*); - /* 8000E0D8 */ void setColorChan(u32, J3DColorChan const&); - /* 80317448 */ void setMatColor(u32, J3DGXColor const*); - /* 8000E0DC */ void setMatColor(u32, J3DGXColor); - /* 8031744C */ void setColorChanNum(u8 const*); - /* 8000E0E0 */ void setColorChanNum(u8); - /* 801A4C08 */ void setLight(u32, J3DLightObj*); - /* 80317138 */ ~J3DColorBlock(); - /* 80317304 */ bool countDLSize(); - /* 80317324 */ void load(); - /* 80317328 */ s32 getCullMode() const; - /* 8031733C */ void patch(); - /* 80317340 */ void diff(u32); - /* 80317358 */ void reset(J3DColorBlock*); - /* 80317434 */ void patchMatColor(); - /* 80317438 */ void diffAmbColor(); - /* 8031743C */ void diffMatColor(); - /* 80317440 */ void diffColorChan(); - /* 80317444 */ void diffLightObj(u32); - /* 80317454 */ bool getLight(u32); - /* 8031745C */ void setCullMode(u8); - /* 80317460 */ void setCullMode(u8 const*); - /* 80317464 */ bool getMatColorOffset() const; - /* 8031746C */ bool getColorChanOffset() const; - /* 80317474 */ void setMatColorOffset(u32); - /* 80317478 */ void setColorChanOffset(u32); -}; - // // Forward References: // @@ -386,7 +77,7 @@ extern "C" void diff__13J3DColorBlockFUl(); extern "C" void diff__10J3DPEBlockFUl(); extern "C" void reset__10J3DPEBlockFP10J3DPEBlock(); extern "C" void reset__11J3DIndBlockFP11J3DIndBlock(); -extern "C" void reset__11J3DTevBlockFP11J3DTevBlock(); +extern "C" void reset__11J3DTevBlockFP11J3DTevBlock(J3DTevBlock* param_0); extern "C" void reset__14J3DTexGenBlockFP14J3DTexGenBlock(); extern "C" void reset__13J3DColorBlockFP13J3DColorBlock(); extern "C" void diffFog__10J3DPEBlockFv(); @@ -539,8 +230,6 @@ extern "C" extern void* __vt__13J3DPEBlockOpa[31]; extern "C" extern void* __vt__15J3DIndBlockFull[19]; extern "C" extern void* __vt__11J3DTevBlock[55]; extern "C" extern void* __vt__21J3DColorBlockLightOff[36 + 1 /* padding */]; -extern "C" extern u8 j3dSys[284]; -extern "C" extern u8 __GDCurrentDL[4]; extern "C" extern u32 j3dDefaultBlendInfo; extern "C" extern u16 j3dDefaultAlphaCmpID; extern "C" extern u16 j3dDefaultZModeID[1 + 1 /* padding */]; @@ -870,7 +559,7 @@ asm void J3DMaterial::initialize() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMaterial::countDLSize() { +asm u32 J3DMaterial::countDLSize() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMaterial/countDLSize__11J3DMaterialFv.s" } @@ -951,7 +640,8 @@ asm void J3DMaterial::diff(u32 param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMaterial::calc(f32 const (*param_0)[4]) { +extern "C" asm void calc__11J3DMaterialFPA4_Cf() { + // asm void J3DMaterial::calc(f32 const (*param_0)[4]) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMaterial/calc__11J3DMaterialFPA4_Cf.s" } @@ -1022,7 +712,7 @@ asm void J3DMaterial::change() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMaterial::newSharedDisplayList(u32 param_0) { +asm s32 J3DMaterial::newSharedDisplayList(u32 param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMaterial/newSharedDisplayList__11J3DMaterialFUl.s" } @@ -1033,7 +723,7 @@ asm void J3DMaterial::newSharedDisplayList(u32 param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DMaterial::newSingleSharedDisplayList(u32 param_0) { +asm s32 J3DMaterial::newSingleSharedDisplayList(u32 param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMaterial/newSingleSharedDisplayList__11J3DMaterialFUl.s" } @@ -1051,7 +741,7 @@ asm void J3DPatchedMaterial::initialize() { #pragma pop /* 80316FD8-80316FDC 311918 0004+00 1/0 0/0 0/0 .text makeDisplayList__18J3DPatchedMaterialFv */ -void J3DPatchedMaterial::makeDisplayList() { +extern "C" asm void makeDisplayList__18J3DPatchedMaterialFv() { /* empty function */ } @@ -1145,7 +835,7 @@ void J3DLockedMaterial::diff(u32 param_0) { } /* 803170D0-803170D4 311A10 0004+00 1/0 0/0 0/0 .text calc__17J3DLockedMaterialFPA4_Cf */ -void J3DLockedMaterial::calc(f32 const (*param_0)[4]) { +extern "C" asm void calc__17J3DLockedMaterialFPA4_Cf() { /* empty function */ } @@ -1255,7 +945,7 @@ bool J3DPEBlock::countDLSize() { } /* 80317324-80317328 311C64 0004+00 1/0 1/0 0/0 .text load__13J3DColorBlockFv */ -void J3DColorBlock::load() { +extern "C" void load__13J3DColorBlockFv() { /* empty function */ } @@ -1291,24 +981,24 @@ void J3DPEBlock::diff(u32 param_0) { /* 80317348-8031734C 311C88 0004+00 1/0 4/0 0/0 .text reset__10J3DPEBlockFP10J3DPEBlock */ -void J3DPEBlock::reset(J3DPEBlock* param_0) { +extern "C" void reset__10J3DPEBlockFP10J3DPEBlock() { /* empty function */ } /* 8031734C-80317350 311C8C 0004+00 1/0 0/0 0/0 .text reset__11J3DIndBlockFP11J3DIndBlock */ -void J3DIndBlock::reset(J3DIndBlock* param_0) { +extern "C" void reset__11J3DIndBlockFP11J3DIndBlock() { /* empty function */ } /* 80317350-80317354 311C90 0004+00 0/0 1/0 0/0 .text reset__11J3DTevBlockFP11J3DTevBlock */ -void J3DTevBlock::reset(J3DTevBlock* param_0) { +extern "C" void reset__11J3DTevBlockFP11J3DTevBlock(J3DTevBlock* param_0) { /* empty function */ } /* 80317354-80317358 311C94 0004+00 1/0 1/0 0/0 .text reset__14J3DTexGenBlockFP14J3DTexGenBlock */ -void J3DTexGenBlock::reset(J3DTexGenBlock* param_0) { +extern "C" void reset__14J3DTexGenBlockFP14J3DTexGenBlock() { /* empty function */ } @@ -1396,7 +1086,7 @@ void J3DIndBlockNull::load() { } /* 803173A0-803173A4 311CE0 0004+00 1/0 0/0 0/0 .text reset__15J3DIndBlockNullFP11J3DIndBlock */ -void J3DIndBlockNull::reset(J3DIndBlock* param_0) { +extern "C" asm void reset__15J3DIndBlockNullFP11J3DIndBlock() { /* empty function */ } diff --git a/libs/JSystem/J3DGraphBase/J3DPacket.cpp b/libs/JSystem/J3DGraphBase/J3DPacket.cpp index 5755d6de59..eff23be8c1 100644 --- a/libs/JSystem/J3DGraphBase/J3DPacket.cpp +++ b/libs/JSystem/J3DGraphBase/J3DPacket.cpp @@ -90,7 +90,6 @@ extern "C" void __dl__FPv(); extern "C" void setArray__15J3DVertexBufferCFv(); extern "C" void loadPreDrawSetting__8J3DShapeCFv(); extern "C" void syncJ3DSysFlags__12J3DModelDataCFv(); -extern "C" void GDInitGDLObj(); extern "C" void GDFlushCurrToMem(); extern "C" void GDPadCurr32(); extern "C" void __ptmf_scall(); @@ -101,7 +100,6 @@ extern "C" extern u8 struct_804515B0[4]; extern "C" u8 sTexGenBlock__17J3DDifferedTexMtx[4]; extern "C" u8 sTexMtxObj__17J3DDifferedTexMtx[4]; extern "C" u8 sOldVcdVatCmd__8J3DShape[4]; -extern "C" extern u8 __GDCurrentDL[4]; // // Declarations: @@ -159,52 +157,42 @@ void J3DDisplayListObj::callDL() const { /* ############################################################################################## */ /* 80434C70-80434C80 061990 0010+00 2/2 3/3 0/0 .bss sGDLObj__17J3DDisplayListObj */ -u8 J3DDisplayListObj::sGDLObj[16]; +GDLObj J3DDisplayListObj::sGDLObj; /* 804515A0-804515A8 000AA0 0004+04 3/3 0/0 0/0 .sbss sInterruptFlag__17J3DDisplayListObj */ -u8 J3DDisplayListObj::sInterruptFlag[4 + 4 /* padding */]; +s32 J3DDisplayListObj::sInterruptFlag; /* 80312644-80312698 30CF84 0054+00 2/2 1/1 0/0 .text beginDL__17J3DDisplayListObjFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DDisplayListObj::beginDL() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/beginDL__17J3DDisplayListObjFv.s" +void J3DDisplayListObj::beginDL() { + swapBuffer(); + sInterruptFlag = OSDisableInterrupts(); + GDInitGDLObj(&sGDLObj, (u8*)mpData[0], mCapacity); + GDSetCurrent(&sGDLObj); } -#pragma pop /* 80312698-803126F4 30CFD8 005C+00 1/1 1/1 0/0 .text endDL__17J3DDisplayListObjFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DDisplayListObj::endDL() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/endDL__17J3DDisplayListObjFv.s" +u32 J3DDisplayListObj::endDL() { + GDPadCurr32(); + OSRestoreInterrupts(sInterruptFlag); + mSize = GDGetGDLObjOffset(&sGDLObj); + GDFlushCurrToMem(); + GDSetCurrent(NULL); + return mSize; } -#pragma pop /* 803126F4-80312714 30D034 0020+00 0/0 1/1 0/0 .text beginPatch__17J3DDisplayListObjFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DDisplayListObj::beginPatch() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/beginPatch__17J3DDisplayListObjFv.s" +void J3DDisplayListObj::beginPatch() { + beginDL(); } -#pragma pop /* 80312714-80312750 30D054 003C+00 0/0 1/1 0/0 .text endPatch__17J3DDisplayListObjFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DDisplayListObj::endPatch() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/endPatch__17J3DDisplayListObjFv.s" +u32 J3DDisplayListObj::endPatch() { + OSRestoreInterrupts(sInterruptFlag); + GDSetCurrent(NULL); + return mSize; } -#pragma pop /* 80312750-80312758 30D090 0008+00 3/0 16/0 10/0 .text entry__9J3DPacketFP13J3DDrawBuffer */ bool J3DPacket::entry(J3DDrawBuffer* param_0) { @@ -222,16 +210,11 @@ void J3DPacket::addChildPacket(J3DPacket* pPacket) { /* ############################################################################################## */ /* 803CD900-803CD920 02AA20 0020+00 1/1 0/0 0/0 .data sDifferedRegister */ -SECTION_DATA static u8 sDifferedRegister[32] = { - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, -}; +SECTION_DATA static u32 sDifferedRegister[8] = {0x00000004, 0x00000001, 0x00000002, 0x01000000, + 0x10000000, 0x20000000, 0x02000000, 0x08000000}; /* 803CD920-803CD940 02AA40 0020+00 1/1 0/0 0/0 .data sSizeOfDiffered */ -SECTION_DATA static u8 sSizeOfDiffered[32] = { - 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2D, -}; +SECTION_DATA static s32 sSizeOfDiffered[8] = {13, 13, 21, 120, 55, 15, 19, 45}; /* 803CD940-803CD954 02AA60 0014+00 2/2 0/0 0/0 .data __vt__14J3DShapePacket */ SECTION_DATA extern void* __vt__14J3DShapePacket[5] = { @@ -270,14 +253,11 @@ SECTION_DATA extern void* __vt__9J3DPacket[5] = { }; /* 80312778-803127B0 30D0B8 0038+00 2/2 0/0 0/0 .text __ct__13J3DDrawPacketFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DDrawPacket::J3DDrawPacket() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/__ct__13J3DDrawPacketFv.s" +J3DDrawPacket::J3DDrawPacket() { + mFlags = 0; + mpDisplayListObj = NULL; + mpTexMtx = NULL; } -#pragma pop /* 803127B0-8031280C 30D0F0 005C+00 3/2 0/0 0/0 .text __dt__13J3DDrawPacketFv */ #pragma push @@ -291,6 +271,18 @@ asm J3DDrawPacket::~J3DDrawPacket() { /* 8031280C-80312898 30D14C 008C+00 1/1 1/1 0/0 .text newDisplayList__13J3DDrawPacketFUl */ +#ifdef NONMATCHING +J3DError J3DDrawPacket::newDisplayList(u32 param_0) { + mpDisplayListObj = new J3DDisplayListObj(); + + if (mpDisplayListObj == NULL) { + return kJ3DError_Alloc; + } else if (mpDisplayListObj->newDisplayList(param_0)) { + return kJ3DError_Success; + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -299,8 +291,21 @@ asm J3DError J3DDrawPacket::newDisplayList(u32 param_0) { #include "asm/JSystem/J3DGraphBase/J3DPacket/newDisplayList__13J3DDrawPacketFUl.s" } #pragma pop +#endif /* 80312898-80312924 30D1D8 008C+00 0/0 1/1 0/0 .text newSingleDisplayList__13J3DDrawPacketFUl */ +#ifdef NONMATCHING +J3DError J3DDrawPacket::newSingleDisplayList(u32 param_0) { + mpDisplayListObj = new J3DDisplayListObj(); + + if (mpDisplayListObj == NULL) { + return kJ3DError_Alloc; + } else if (mpDisplayListObj->newSingleDisplayList(param_0)) { + return kJ3DError_Success; + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -309,30 +314,24 @@ asm J3DError J3DDrawPacket::newSingleDisplayList(u32 param_0) { #include "asm/JSystem/J3DGraphBase/J3DPacket/newSingleDisplayList__13J3DDrawPacketFUl.s" } #pragma pop +#endif void J3DDrawPacket::draw() { mpDisplayListObj->callDL(); } /* 80312948-803129A4 30D288 005C+00 0/0 1/1 0/0 .text __ct__12J3DMatPacketFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DMatPacket::J3DMatPacket() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/__ct__12J3DMatPacketFv.s" +J3DMatPacket::J3DMatPacket() { + mpShapePacket = NULL; + mpFirstShapePacket = NULL; + mpMaterial = NULL; + mSortFlags = -1; + mpTexture = NULL; + mpMaterialAnm = NULL; } -#pragma pop /* 803129A4-80312A04 30D2E4 0060+00 1/0 1/1 0/0 .text __dt__12J3DMatPacketFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DMatPacket::~J3DMatPacket() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/__dt__12J3DMatPacketFv.s" -} -#pragma pop +J3DMatPacket::~J3DMatPacket() {} void J3DMatPacket::addShapePacket(J3DShapePacket* pShape) { if (mpFirstShapePacket == NULL) { @@ -352,14 +351,14 @@ void J3DMatPacket::endDiff() { } /* 80312A74-80312A9C 30D3B4 0028+00 0/0 1/1 0/0 .text isSame__12J3DMatPacketCFP12J3DMatPacket */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DMatPacket::isSame(J3DMatPacket* param_0) const { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/isSame__12J3DMatPacketCFP12J3DMatPacket.s" +bool J3DMatPacket::isSame(J3DMatPacket* pOther) const { + bool isSame = false; + + if (mSortFlags == pOther->mSortFlags && !(mSortFlags >> 0x1F)) { + isSame = true; + } + return isSame; } -#pragma pop /* 80312A9C-80312B20 30D3DC 0084+00 1/0 0/0 0/0 .text draw__12J3DMatPacketFv */ #pragma push @@ -372,31 +371,23 @@ asm void J3DMatPacket::draw() { #pragma pop /* 80312B20-80312B74 30D460 0054+00 0/0 1/1 0/0 .text __ct__14J3DShapePacketFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DShapePacket::J3DShapePacket() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/__ct__14J3DShapePacketFv.s" +J3DShapePacket::J3DShapePacket() { + mpShape = NULL; + mpMtxBuffer = NULL; + mpViewMtx = NULL; + mDiffFlag = 0; + mpModel = NULL; } -#pragma pop /* 80312B74-80312BD4 30D4B4 0060+00 1/0 1/1 0/0 .text __dt__14J3DShapePacketFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DShapePacket::~J3DShapePacket() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/__dt__14J3DShapePacketFv.s" -} -#pragma pop +J3DShapePacket::~J3DShapePacket() {} /* 80312BD4-80312DBC 30D514 01E8+00 1/1 0/0 0/0 .text calcDifferedBufferSize__14J3DShapePacketFUl */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DShapePacket::calcDifferedBufferSize(u32 param_0) { +asm u32 J3DShapePacket::calcDifferedBufferSize(u32 param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DPacket/calcDifferedBufferSize__14J3DShapePacketFUl.s" } @@ -404,14 +395,18 @@ asm void J3DShapePacket::calcDifferedBufferSize(u32 param_0) { /* 80312DBC-80312E08 30D6FC 004C+00 0/0 1/1 0/0 .text newDifferedDisplayList__14J3DShapePacketFUl */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DShapePacket::newDifferedDisplayList(u32 param_0) { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DPacket/newDifferedDisplayList__14J3DShapePacketFUl.s" +J3DError J3DShapePacket::newDifferedDisplayList(u32 flag) { + mDiffFlag = flag; + u32 bufSize = calcDifferedBufferSize(flag); + J3DError error = newDisplayList(bufSize); + + if (error != kJ3DError_Success) { + return error; + } + + setDisplayListObj(getDisplayListObj()); + return kJ3DError_Success; } -#pragma pop /* 80312E08-80312F24 30D748 011C+00 2/2 0/0 0/0 .text prepareDraw__14J3DShapePacketCFv */ #pragma push diff --git a/libs/JSystem/J3DGraphBase/J3DShape.cpp b/libs/JSystem/J3DGraphBase/J3DShape.cpp index 51571212a8..63513e4095 100644 --- a/libs/JSystem/J3DGraphBase/J3DShape.cpp +++ b/libs/JSystem/J3DGraphBase/J3DShape.cpp @@ -177,7 +177,7 @@ asm void J3DShape::loadVtxArray() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DShape::isSameVcdVatCmd(J3DShape* param_0) { +asm bool J3DShape::isSameVcdVatCmd(J3DShape* param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShape/isSameVcdVatCmd__8J3DShapeFP8J3DShape.s" } diff --git a/libs/JSystem/J3DGraphBase/J3DShapeMtx.cpp b/libs/JSystem/J3DGraphBase/J3DShapeMtx.cpp index 833ae33999..83ff9e98b1 100644 --- a/libs/JSystem/J3DGraphBase/J3DShapeMtx.cpp +++ b/libs/JSystem/J3DGraphBase/J3DShapeMtx.cpp @@ -18,54 +18,6 @@ struct J3DSys { /* 8030FEE4 */ void loadNrmMtxIndx(int, u16) const; }; -struct J3DShapeMtxYBBoardConcatView { - /* 803143E4 */ void load() const; - /* 80314520 */ ~J3DShapeMtxYBBoardConcatView(); - /* 8031458C */ void getType() const; -}; - -struct J3DShapeMtxMultiConcatView { - /* 80313FA4 */ void load() const; - /* 803146AC */ void loadNrmMtx(int, u16) const; - /* 8031419C */ void loadNrmMtx(int, u16, f32 (*)[4]) const; - /* 8031461C */ ~J3DShapeMtxMultiConcatView(); - /* 80314688 */ void getType() const; - /* 80314694 */ void getUseMtxNum() const; - /* 8031469C */ void getUseMtxIndex(u16) const; -}; - -struct J3DShapeMtxMulti { - /* 80313E4C */ void load() const; - /* 80313EEC */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); - /* 803146B0 */ ~J3DShapeMtxMulti(); - /* 8031470C */ void getType() const; - /* 80314718 */ void getUseMtxNum() const; - /* 80314720 */ void getUseMtxIndex(u16) const; -}; - -struct J3DShapeMtxConcatView { - /* 80313828 */ void loadMtxConcatView_PNGP(int, u16) const; - /* 803138C8 */ void loadMtxConcatView_PCPU(int, u16) const; - /* 8031396C */ void loadMtxConcatView_NCPU(int, u16) const; - /* 80313A14 */ void loadMtxConcatView_PNCPU(int, u16) const; - /* 80313AC8 */ void loadMtxConcatView_PNGP_LOD(int, u16) const; - /* 80313C54 */ void load() const; - /* 80313D28 */ void loadNrmMtx(int, u16, f32 (*)[4]) const; - /* 80314598 */ void loadNrmMtx(int, u16) const; - /* 80314730 */ ~J3DShapeMtxConcatView(); - /* 8031478C */ void getType() const; - - static u8 sMtxLoadPipeline[48]; - static u8 sMtxLoadLODPipeline[48]; - static u8 sMtxPtrTbl[8]; -}; - -struct J3DShapeMtxBBoardConcatView { - /* 803142D4 */ void load() const; - /* 803145A4 */ ~J3DShapeMtxBBoardConcatView(); - /* 80314610 */ void getType() const; -}; - struct J3DDifferedTexMtx { /* 8031322C */ void loadExecute(f32 const (*)[4]); @@ -718,7 +670,8 @@ SECTION_DATA extern void* __vt__11J3DShapeMtx[8 + 1 /* padding */] = { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeMtxYBBoardConcatView::~J3DShapeMtxYBBoardConcatView() { +extern "C" asm void __dt__28J3DShapeMtxYBBoardConcatViewFv() { + // asm J3DShapeMtxYBBoardConcatView::~J3DShapeMtxYBBoardConcatView() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShapeMtx/__dt__28J3DShapeMtxYBBoardConcatViewFv.s" } @@ -755,7 +708,8 @@ asm void J3DShapeMtx::getUseMtxIndex(u16 param_0) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeMtxBBoardConcatView::~J3DShapeMtxBBoardConcatView() { +extern "C" asm void __dt__27J3DShapeMtxBBoardConcatViewFv() { + // asm J3DShapeMtxBBoardConcatView::~J3DShapeMtxBBoardConcatView() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShapeMtx/__dt__27J3DShapeMtxBBoardConcatViewFv.s" } @@ -775,7 +729,8 @@ asm void J3DShapeMtxBBoardConcatView::getType() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeMtxMultiConcatView::~J3DShapeMtxMultiConcatView() { +extern "C" asm void __dt__26J3DShapeMtxMultiConcatViewFv() { + // asm J3DShapeMtxMultiConcatView::~J3DShapeMtxMultiConcatView() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShapeMtx/__dt__26J3DShapeMtxMultiConcatViewFv.s" } @@ -823,7 +778,8 @@ void J3DShapeMtxMultiConcatView::loadNrmMtx(int param_0, u16 param_1) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeMtxMulti::~J3DShapeMtxMulti() { +extern "C" asm void __dt__16J3DShapeMtxMultiFv() { + // asm J3DShapeMtxMulti::~J3DShapeMtxMulti() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShapeMtx/__dt__16J3DShapeMtxMultiFv.s" } @@ -864,7 +820,8 @@ asm void J3DShapeMtxMulti::getUseMtxIndex(u16 param_0) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DShapeMtxConcatView::~J3DShapeMtxConcatView() { +extern "C" asm void __dt__21J3DShapeMtxConcatViewFv() { + // asm J3DShapeMtxConcatView::~J3DShapeMtxConcatView() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DShapeMtx/__dt__21J3DShapeMtxConcatViewFv.s" } diff --git a/libs/JSystem/J3DGraphBase/J3DSys.cpp b/libs/JSystem/J3DGraphBase/J3DSys.cpp index 015ab74202..44ae39148a 100644 --- a/libs/JSystem/J3DGraphBase/J3DSys.cpp +++ b/libs/JSystem/J3DGraphBase/J3DSys.cpp @@ -114,10 +114,10 @@ J3DSys j3dSys; Mtx J3DSys::mCurrentMtx; /* 80434C14-80434C20 061934 000C+00 0/0 6/6 0/0 .bss mCurrentS__6J3DSys */ -f32 J3DSys::mCurrentS[3]; +Vec J3DSys::mCurrentS; /* 80434C20-80434C2C 061940 000C+00 0/0 5/5 0/0 .bss mParentS__6J3DSys */ -f32 J3DSys::mParentS[3]; +Vec J3DSys::mParentS; /* 80434C2C-80434C70 06194C 0040+04 1/1 17/17 0/0 .bss sTexCoordScaleTable__6J3DSys */ u16 J3DSys::sTexCoordScaleTable[34]; diff --git a/libs/JSystem/J3DGraphBase/J3DTexture.cpp b/libs/JSystem/J3DGraphBase/J3DTexture.cpp index 09713c643c..33c7db756f 100644 --- a/libs/JSystem/J3DGraphBase/J3DTexture.cpp +++ b/libs/JSystem/J3DGraphBase/J3DTexture.cpp @@ -7,20 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct _GXTexMapID {}; - -struct ResTIMG {}; - -struct J3DTexture { - /* 8031204C */ void loadGX(u16, _GXTexMapID) const; - /* 803121A4 */ void entryNum(u16); - /* 8031221C */ void addResTIMG(u16, ResTIMG const*); -}; - // // Forward References: // @@ -34,12 +20,6 @@ extern "C" void addResTIMG__10J3DTextureFUsPC7ResTIMG(); // extern "C" void* __nwa__FUl(); -extern "C" void GXInitTexObj(); -extern "C" void GXInitTexObjCI(); -extern "C" void GXInitTexObjLOD(); -extern "C" void GXLoadTexObj(); -extern "C" void GXInitTlutObj(); -extern "C" void GXLoadTlut(); extern "C" void _savegpr_28(); extern "C" void _restgpr_28(); diff --git a/libs/JSystem/J3DGraphBase/J3DTransform.cpp b/libs/JSystem/J3DGraphBase/J3DTransform.cpp index d00a650ccf..f783bab1a4 100644 --- a/libs/JSystem/J3DGraphBase/J3DTransform.cpp +++ b/libs/JSystem/J3DGraphBase/J3DTransform.cpp @@ -11,14 +11,10 @@ // Types: // -struct Vec {}; - struct JMath { static u8 sincosTable_[65536]; }; -struct J3DTransformInfo {}; - struct J3DTextureSRTInfo {}; // @@ -46,7 +42,6 @@ extern "C" extern u8 PSMulUnit01[8]; // External References: // -extern "C" void PSVECNormalize(); extern "C" u8 sincosTable___5JMath[65536]; // @@ -93,25 +88,15 @@ asm void J3DCalcBBoardMtx(f32 (*param_0)[4]) { /* ############################################################################################## */ /* 803A1E30-803A1E50 02E490 0020+00 0/0 1/1 0/0 .rodata j3dDefaultTransformInfo */ -SECTION_RODATA extern u8 const j3dDefaultTransformInfo[32] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x803A1E30, &j3dDefaultTransformInfo); +extern J3DTransformInfo const j3dDefaultTransformInfo = { + {1.0f, 1.0f, 1.0f}, {0, 0, 0}, {0.0f, 0.0f, 0.0f}}; /* 803A1E50-803A1E5C 02E4B0 000C+00 0/0 1/1 0/0 .rodata j3dDefaultScale */ -SECTION_RODATA extern u8 const j3dDefaultScale[12] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x803A1E50, &j3dDefaultScale); +extern Vec const j3dDefaultScale = {1.0f, 1.0f, 1.0f}; /* 803A1E5C-803A1E8C 02E4BC 0030+00 0/0 8/8 7/7 .rodata j3dDefaultMtx */ -SECTION_RODATA extern u8 const j3dDefaultMtx[48] = { - 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x803A1E5C, &j3dDefaultMtx); +extern Mtx const j3dDefaultMtx = { + {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}}; /* 803A1E8C-803A1E98 02E4EC 000C+00 1/1 0/0 0/0 .rodata @443 */ SECTION_RODATA static u8 const lit_443[12] = { diff --git a/libs/JSystem/J3DGraphBase/J3DVertex.cpp b/libs/JSystem/J3DGraphBase/J3DVertex.cpp index 67e1e7b5d1..0d4d4a7f71 100644 --- a/libs/JSystem/J3DGraphBase/J3DVertex.cpp +++ b/libs/JSystem/J3DGraphBase/J3DVertex.cpp @@ -4,33 +4,13 @@ // #include "JSystem/J3DGraphBase/J3DVertex.h" +#include "JSystem/J3DGraphAnimator/J3DJointTree.h" +#include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/JKernel/JKRHeap.h" #include "dol2asm.h" +#include "dolphin/os/OSCache.h" #include "dolphin/types.h" - -// -// Types: -// - -struct J3DVertexData { - /* 80310EF8 */ J3DVertexData(); -}; - -struct J3DVertexBuffer { - /* 80310F78 */ void setVertexData(J3DVertexData*); - /* 80310FD8 */ void init(); - /* 80311030 */ ~J3DVertexBuffer(); - /* 8031106C */ void setArray() const; - /* 80311090 */ void copyLocalVtxPosArray(u32); - /* 803111B0 */ void copyLocalVtxNrmArray(u32); - /* 803112D0 */ void copyLocalVtxArray(u32); - /* 80311478 */ void allocTransformedVtxPosArray(); - /* 8031152C */ void allocTransformedVtxNrmArray(); -}; - -struct J3DDrawMtxData { - /* 803115E0 */ J3DDrawMtxData(); - /* 803115F4 */ ~J3DDrawMtxData(); -}; +#include "init.h" // // Forward References: @@ -53,143 +33,269 @@ extern "C" void __dt__14J3DDrawMtxDataFv(); // External References: // -SECTION_INIT void memcpy(); extern "C" void* __nwa__FUli(); extern "C" void __dl__FPv(); -extern "C" void DCStoreRange(); extern "C" void _savegpr_24(); extern "C" void _savegpr_28(); extern "C" void _savegpr_29(); extern "C" void _restgpr_24(); extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); -extern "C" extern u8 j3dSys[284]; // // Declarations: // /* 80310EF8-80310F78 30B838 0080+00 0/0 1/1 0/0 .text __ct__13J3DVertexDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DVertexData::J3DVertexData() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/__ct__13J3DVertexDataFv.s" +J3DVertexData::J3DVertexData() { + mVtxNum = 0; + mNrmNum = 0; + mColNum = 0; + field_0xc = 0; + field_0x10 = 0; + + mVtxAttrFmtList = NULL; + mVtxPosArray = NULL; + mVtxNrmArray = NULL; + mVtxNBTArray = NULL; + + for (int i = 0; i < 2; i++) { + mVtxColorArray[i] = NULL; + } + + for (int i = 0; i < 8; i++) { + mVtxTexCoordArray[i] = NULL; + } + + mVtxPosFrac = 0; + mVtxPosType = GX_F32; + mVtxNrmFrac = 0; + mVtxNrmType = GX_F32; } -#pragma pop /* 80310F78-80310FD8 30B8B8 0060+00 0/0 1/1 0/0 .text * setVertexData__15J3DVertexBufferFP13J3DVertexData */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::setVertexData(J3DVertexData* param_0) { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/setVertexData__15J3DVertexBufferFP13J3DVertexData.s" +void J3DVertexBuffer::setVertexData(J3DVertexData* pVtxData) { + mVtxData = pVtxData; + mVtxPosArray[0] = pVtxData->getVtxPosArray(); + mVtxNrmArray[0] = pVtxData->getVtxNrmArray(); + mVtxColArray[0] = pVtxData->getVtxColorArray(0); + mVtxPosArray[1] = NULL; + mVtxNrmArray[1] = NULL; + mVtxColArray[1] = NULL; + + mTransformedVtxPosArray[0] = pVtxData->getVtxPosArray(); + mTransformedVtxNrmArray[0] = pVtxData->getVtxNrmArray(); + mTransformedVtxPosArray[1] = NULL; + mTransformedVtxNrmArray[1] = NULL; + + frameInit(); } -#pragma pop /* 80310FD8-80311030 30B918 0058+00 0/0 3/3 0/0 .text init__15J3DVertexBufferFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::init() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/init__15J3DVertexBufferFv.s" +void J3DVertexBuffer::init() { + mVtxData = NULL; + + mVtxPosArray[1] = NULL; + mVtxPosArray[0] = NULL; + + mVtxNrmArray[1] = NULL; + mVtxNrmArray[0] = NULL; + + mVtxColArray[1] = NULL; + mVtxColArray[0] = NULL; + + mTransformedVtxPosArray[1] = NULL; + mTransformedVtxPosArray[0] = NULL; + + mTransformedVtxNrmArray[1] = NULL; + mTransformedVtxNrmArray[0] = NULL; + + mCurrentVtxPos = NULL; + mCurrentVtxNrm = NULL; + mCurrentVtxCol = NULL; + + frameInit(); } -#pragma pop /* 80311030-8031106C 30B970 003C+00 0/0 1/1 0/0 .text __dt__15J3DVertexBufferFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DVertexBuffer::~J3DVertexBuffer() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/__dt__15J3DVertexBufferFv.s" -} -#pragma pop +J3DVertexBuffer::~J3DVertexBuffer() {} /* 8031106C-80311090 30B9AC 0024+00 0/0 1/1 0/0 .text setArray__15J3DVertexBufferCFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::setArray() const { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/setArray__15J3DVertexBufferCFv.s" +void J3DVertexBuffer::setArray() const { + j3dSys.setVtxPos(mCurrentVtxPos); + j3dSys.setVtxNrm(mCurrentVtxNrm); + j3dSys.setVtxCol(mCurrentVtxCol); } -#pragma pop /* 80311090-803111B0 30B9D0 0120+00 1/1 0/0 0/0 .text copyLocalVtxPosArray__15J3DVertexBufferFUl */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::copyLocalVtxPosArray(u32 param_0) { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxPosArray__15J3DVertexBufferFUl.s" +s32 J3DVertexBuffer::copyLocalVtxPosArray(u32 param_0) { + if (param_0 & 1) { + for (int i = 0; i < 2; i++) { + mVtxPosArray[i] = new (0x20) VertexPosition[mVtxData->getVtxNum()]; + + if (mVtxPosArray[i] == NULL) { + return 4; + } + memcpy(mVtxPosArray[i], mVtxData->getVtxPosArray(), mVtxData->getVtxNum() * 12); + DCStoreRange(mVtxPosArray[i], mVtxData->getVtxNum() * 12); + } + } else { + mVtxPosArray[0] = mVtxData->getVtxPosArray(); + + if (mVtxPosArray[1] == NULL) { + mVtxPosArray[1] = new (0x20) VertexPosition[mVtxData->getVtxNum()]; + if (mVtxPosArray[1] == NULL) { + return 4; + } + } + memcpy(mVtxPosArray[1], mVtxData->getVtxPosArray(), mVtxData->getVtxNum() * 12); + DCStoreRange(mVtxPosArray[1], mVtxData->getVtxNum() * 12); + } + return 0; } -#pragma pop /* 803111B0-803112D0 30BAF0 0120+00 1/1 0/0 0/0 .text copyLocalVtxNrmArray__15J3DVertexBufferFUl */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::copyLocalVtxNrmArray(u32 param_0) { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxNrmArray__15J3DVertexBufferFUl.s" +s32 J3DVertexBuffer::copyLocalVtxNrmArray(u32 param_0) { + if (param_0 & 1) { + for (int i = 0; i < 2; i++) { + mVtxNrmArray[i] = new (0x20) VertexNormal[mVtxData->getNrmNum()]; + + if (mVtxNrmArray[i] == NULL) { + return 4; + } + memcpy(mVtxNrmArray[i], mVtxData->getVtxNrmArray(), mVtxData->getNrmNum() * 12); + DCStoreRange(mVtxNrmArray[i], mVtxData->getNrmNum() * 12); + } + } else { + mVtxNrmArray[0] = mVtxData->getVtxNrmArray(); + + if (mVtxNrmArray[1] == NULL) { + mVtxNrmArray[1] = new (0x20) VertexNormal[mVtxData->getNrmNum()]; + if (mVtxNrmArray[1] == NULL) { + return 4; + } + } + memcpy(mVtxNrmArray[1], mVtxData->getVtxNrmArray(), mVtxData->getNrmNum() * 12); + DCStoreRange(mVtxNrmArray[1], mVtxData->getNrmNum() * 12); + } + return 0; } -#pragma pop /* 803112D0-80311478 30BC10 01A8+00 0/0 1/1 0/0 .text copyLocalVtxArray__15J3DVertexBufferFUl */ +#ifdef NONMATCHING +s32 J3DVertexBuffer::copyLocalVtxArray(u32 param_0) { + void* local_30[5]; + + for (int i = 0; i < 2; i++) { + local_30[i] = mVtxPosArray[i]; + } + + if (~param_0 & 2) { + s32 tmp = copyLocalVtxPosArray(param_0); + if (tmp != 0) { + for (int i = 0; i < 2; i++) { + if (local_30[i + 2] != mVtxPosArray[i]) { + if (mVtxPosArray[i] != mVtxData->getVtxPosArray()) { + delete mVtxPosArray[i]; + } + mVtxPosArray[i] = local_30[i + 2]; + } + } + return tmp; + } + } else { + void* vtxPosArray = mVtxData->getVtxPosArray(); + mVtxPosArray[1] = vtxPosArray; + mVtxPosArray[0] = vtxPosArray; + } + + for (int i = 0; i < 2; i++) { + local_30[i] = mVtxNrmArray[i]; + } + + if (~param_0 & 4) { + s32 tmp = copyLocalVtxNrmArray(param_0); + if (tmp != 0) { + for (int i = 0; i < 2; i++) { + if (local_30[i + 2] != mVtxPosArray[i]) { + if (mVtxPosArray[i] != mVtxData->getVtxPosArray()) { + delete mVtxPosArray[i]; + } + mVtxPosArray[i] = local_30[i + 2]; + } + if (local_30[i] != mVtxNrmArray[i]) { + if (mVtxNrmArray[i] != mVtxData->getVtxNrmArray()) { + delete mVtxNrmArray[i]; + } + mVtxNrmArray[i] = local_30[i]; + } + } + return tmp; + } + } else { + void* vtxNrmArray = mVtxData->getVtxNrmArray(); + mVtxNrmArray[1] = vtxNrmArray; + mVtxNrmArray[0] = vtxNrmArray; + } + + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DVertexBuffer::copyLocalVtxArray(u32 param_0) { +asm s32 J3DVertexBuffer::copyLocalVtxArray(u32 param_0) { nofralloc #include "asm/JSystem/J3DGraphBase/J3DVertex/copyLocalVtxArray__15J3DVertexBufferFUl.s" } #pragma pop +#endif /* 80311478-8031152C 30BDB8 00B4+00 0/0 1/1 0/0 .text * allocTransformedVtxPosArray__15J3DVertexBufferFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::allocTransformedVtxPosArray() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxPosArray__15J3DVertexBufferFv.s" +s32 J3DVertexBuffer::allocTransformedVtxPosArray() { + if (mTransformedVtxPosArray[0] != NULL && mTransformedVtxPosArray[1] != NULL) { + return 0; + } + + for (int i = 0; i < 2; i++) { + if (i == 0 || mTransformedVtxPosArray[i] == NULL) { + mTransformedVtxPosArray[i] = new (0x20) VertexPosition[mVtxData->getVtxNum()]; + if (mTransformedVtxPosArray[i] == NULL) { + return 4; + } + } + } + return 0; } -#pragma pop /* 8031152C-803115E0 30BE6C 00B4+00 0/0 1/1 0/0 .text * allocTransformedVtxNrmArray__15J3DVertexBufferFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void J3DVertexBuffer::allocTransformedVtxNrmArray() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/allocTransformedVtxNrmArray__15J3DVertexBufferFv.s" +s32 J3DVertexBuffer::allocTransformedVtxNrmArray() { + if (mTransformedVtxNrmArray[0] != NULL && mTransformedVtxNrmArray[1] != NULL) { + return 0; + } + + for (int i = 0; i < 2; i++) { + if (i == 0 || mTransformedVtxNrmArray[i] == NULL) { + mTransformedVtxNrmArray[i] = new (0x20) VertexNormal[mVtxData->getNrmNum()]; + if (mTransformedVtxNrmArray[i] == NULL) { + return 4; + } + } + } + return 0; } -#pragma pop /* 803115E0-803115F4 30BF20 0014+00 0/0 1/1 0/0 .text __ct__14J3DDrawMtxDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DDrawMtxData::J3DDrawMtxData() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/__ct__14J3DDrawMtxDataFv.s" +J3DDrawMtxData::J3DDrawMtxData() { + mEntryNum = 0; + mDrawMtxFlag = NULL; + mDrawMtxIndex = NULL; } -#pragma pop /* 803115F4-80311630 30BF34 003C+00 0/0 2/2 0/0 .text __dt__14J3DDrawMtxDataFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DDrawMtxData::~J3DDrawMtxData() { - nofralloc -#include "asm/JSystem/J3DGraphBase/J3DVertex/__dt__14J3DDrawMtxDataFv.s" -} -#pragma pop +J3DDrawMtxData::~J3DDrawMtxData() {} diff --git a/libs/JSystem/J3DGraphLoader/J3DAnmLoader.cpp b/libs/JSystem/J3DGraphLoader/J3DAnmLoader.cpp index 7f1cbb4bd0..96f7494548 100644 --- a/libs/JSystem/J3DGraphLoader/J3DAnmLoader.cpp +++ b/libs/JSystem/J3DGraphLoader/J3DAnmLoader.cpp @@ -66,15 +66,6 @@ struct J3DAnmTevRegKey { /* 8032AE18 */ J3DAnmTevRegKey(); }; -struct J3DAnmLoaderDataBaseFlag {}; - -struct J3DAnmBase {}; - -struct J3DAnmLoaderDataBase { - /* 80337B40 */ void load(void const*, J3DAnmLoaderDataBaseFlag); - /* 80338134 */ void setResource(J3DAnmBase*, void const*); -}; - struct J3DAnmLoader { /* 80339800 */ ~J3DAnmLoader(); }; diff --git a/libs/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/libs/JSystem/J3DGraphLoader/J3DClusterLoader.cpp index b0d7bb9be2..4bac4d2081 100644 --- a/libs/JSystem/J3DGraphLoader/J3DClusterLoader.cpp +++ b/libs/JSystem/J3DGraphLoader/J3DClusterLoader.cpp @@ -34,10 +34,6 @@ struct J3DClusterLoader_v15 { /* 803342F8 */ void readCluster(J3DClusterBlock const*); }; -struct J3DClusterLoaderDataBase { - /* 80334130 */ void load(void const*); -}; - struct J3DClusterLoader { /* 803345FC */ ~J3DClusterLoader(); }; diff --git a/libs/JSystem/J3DGraphLoader/J3DModelLoader.cpp b/libs/JSystem/J3DGraphLoader/J3DModelLoader.cpp index 91937fdd9f..78ad78ab7d 100644 --- a/libs/JSystem/J3DGraphLoader/J3DModelLoader.cpp +++ b/libs/JSystem/J3DGraphLoader/J3DModelLoader.cpp @@ -122,10 +122,6 @@ struct J3DModelLoader_v21 { /* 803363F4 */ ~J3DModelLoader_v21(); }; -struct J3DModelLoaderDataBase { - /* 803346BC */ void load(void const*, u32); -}; - struct J3DDrawBlock {}; struct J3DMaterialDLBlock {}; diff --git a/libs/JSystem/JMath/JMath.cpp b/libs/JSystem/JMath/JMath.cpp index b5fa31a5a9..46215f9527 100644 --- a/libs/JSystem/JMath/JMath.cpp +++ b/libs/JSystem/JMath/JMath.cpp @@ -7,14 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct Vec {}; - -struct Quaternion {}; - // // Forward References: // diff --git a/libs/dolphin/gd/GDBase.cpp b/libs/dolphin/gd/GDBase.cpp index f826d13aa6..d75b7ad02e 100644 --- a/libs/dolphin/gd/GDBase.cpp +++ b/libs/dolphin/gd/GDBase.cpp @@ -11,7 +11,6 @@ // Forward References: // -extern "C" void GDInitGDLObj(); extern "C" void GDFlushCurrToMem(); extern "C" void GDPadCurr32(); extern "C" void GDOverflowed(); @@ -30,7 +29,7 @@ extern "C" void DCFlushRange(); #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void GDInitGDLObj() { +asm void GDInitGDLObj(GDLObj* obj, u8* start, u32 len) { nofralloc #include "asm/dolphin/gd/GDBase/GDInitGDLObj.s" } @@ -38,8 +37,7 @@ asm void GDInitGDLObj() { /* ############################################################################################## */ /* 80451980-80451984 000E80 0004+00 2/2 100/100 0/0 .sbss __GDCurrentDL */ -extern u8 __GDCurrentDL[4]; -u8 __GDCurrentDL[4]; +GDLObj* __GDCurrentDL; /* 80360FB0-80360FDC 35B8F0 002C+00 0/0 2/2 0/0 .text GDFlushCurrToMem */ #pragma push diff --git a/src/c/c_damagereaction.cpp b/src/c/c_damagereaction.cpp index 36dfda63eb..2b04c61fcb 100644 --- a/src/c/c_damagereaction.cpp +++ b/src/c/c_damagereaction.cpp @@ -162,7 +162,7 @@ REGISTER_CTORS(0x80018388, __sinit_c_damagereaction_cpp); /* 800183D4-800183D8 012D14 0004+00 1/0 1/0 0/0 .text * execute__19JPAParticleCallBackFP14JPABaseEmitterP15JPABaseParticle */ -void JPAParticleCallBack::execute(JPABaseEmitter* param_0, JPABaseParticle* param_1) { +extern "C" void execute__19JPAParticleCallBackFP14JPABaseEmitterP15JPABaseParticle() { /* empty function */ } diff --git a/src/d/a/d_a_alink.cpp b/src/d/a/d_a_alink.cpp index 81f45e0186..8eaab84536 100644 --- a/src/d/a/d_a_alink.cpp +++ b/src/d/a/d_a_alink.cpp @@ -26,8 +26,6 @@ struct mDoMtx_stack_c { static u8 now[48]; }; -struct J3DAnmCluster {}; - struct mDoExt_blkAnm { /* 8000DA08 */ void init(J3DDeformData*, J3DAnmCluster*, int, int, f32, s16, s16); }; @@ -98,8 +96,6 @@ struct daCrod_c { /* 80141A94 */ void setControllActorData(); }; -struct J3DMaterial {}; - struct daAlink_matAnm_c { /* 8009D8E4 */ void init(); /* 8009D90C */ void calc(J3DMaterial*) const; @@ -677,49 +673,12 @@ struct JAISeq { /* 802A0A8C */ JAISeq(JAISeqMgr*, JAISoundStrategyMgr*); }; -struct J3DTexNoAnm { - /* 8003B1F8 */ ~J3DTexNoAnm(); - /* 8003B240 */ J3DTexNoAnm(); -}; - -struct J3DTexMtxAnm { - /* 8003B264 */ ~J3DTexMtxAnm(); - /* 8003B2A0 */ J3DTexMtxAnm(); -}; - -struct J3DTevKColorAnm { - /* 8003B150 */ ~J3DTevKColorAnm(); - /* 8003B18C */ J3DTevKColorAnm(); -}; - -struct J3DTevColorAnm { - /* 8003B1A4 */ ~J3DTevColorAnm(); - /* 8003B1E0 */ J3DTevColorAnm(); -}; - -struct J3DTevBlock { - /* 80110E80 */ void setTevColor(u32, J3DGXColorS10 const*); -}; - -struct J3DShape { - /* 80315300 */ void loadPreDrawSetting() const; - - static u8 sOldVcdVatCmd[4]; -}; - struct J3DMaterialAnm { /* 800A4820 */ ~J3DMaterialAnm(); /* 8032C320 */ void initialize(); /* 8032C3C4 */ void calc(J3DMaterial*) const; }; -struct J3DMatColorAnm { - /* 8003B2B8 */ ~J3DMatColorAnm(); - /* 8003B2F4 */ J3DMatColorAnm(); -}; - -struct J3DJoint {}; - struct J3DAnmLoaderDataBaseFlag {}; struct J3DAnmLoaderDataBase { @@ -17697,9 +17656,9 @@ asm void daAlink_c::setFrontRollCrashShock(u8 param_0) { #pragma pop /* 800C1DAC-800C1DE0 0BC6EC 0034+00 1/0 0/0 0/0 .text getModelJointMtx__9daAlink_cFUs */ -Mtx* daAlink_c::getModelJointMtx(u16 param_0) { +MtxP daAlink_c::getModelJointMtx(u16 param_0) { if (param_0 >= field_0x30c6) { - return &field_0x0650->mBaseTransformMtx; + return field_0x0650->mBaseTransformMtx; } return field_0x0650->i_getAnmMtx(param_0); } @@ -20115,7 +20074,8 @@ asm bool daAlink_c::checkWolfDownAttackPullOut() const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm bool daAlink_c::getMidnaAtnPos() const { +extern "C" asm void getMidnaAtnPos__9daAlink_cCFv() { + // asm bool daAlink_c::getMidnaAtnPos() const { nofralloc #include "asm/d/a/d_a_alink/getMidnaAtnPos__9daAlink_cCFv.s" } @@ -31544,7 +31504,9 @@ asm void daAlink_c::setRunSplash() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void dAlink_bottleWaterPcallBack_c::execute(JPABaseEmitter* param_0, JPABaseParticle* param_1) { +extern "C" asm void execute__29dAlink_bottleWaterPcallBack_cFP14JPABaseEmitterP15JPABaseParticle() { + // asm void dAlink_bottleWaterPcallBack_c::execute(JPABaseEmitter* param_0, JPABaseParticle* + // param_1) { nofralloc #include "asm/d/a/d_a_alink/execute__29dAlink_bottleWaterPcallBack_cFP14JPABaseEmitterP15JPABaseParticle.s" } @@ -31714,7 +31676,8 @@ SECTION_SDATA static u8 nColor0[4] = { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daAlink_blur_c::draw() { +extern "C" asm void draw__14daAlink_blur_cFv() { + // asm void daAlink_blur_c::draw() { nofralloc #include "asm/d/a/d_a_alink/draw__14daAlink_blur_cFv.s" } @@ -31754,7 +31717,8 @@ asm void daAlink_lockCursor_c::update() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daAlink_lockCursor_c::draw() { +extern "C" asm void draw__20daAlink_lockCursor_cFv() { + // asm void daAlink_lockCursor_c::draw() { nofralloc #include "asm/d/a/d_a_alink/draw__20daAlink_lockCursor_cFv.s" } @@ -31774,7 +31738,8 @@ asm void daAlink_sight_c::create() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daAlink_sight_c::draw() { +extern "C" asm void draw__15daAlink_sight_cFv() { + // asm void daAlink_sight_c::draw() { nofralloc #include "asm/d/a/d_a_alink/draw__15daAlink_sight_cFv.s" } @@ -35130,7 +35095,8 @@ int daPy_py_c::checkEndResetFlg0(daPy_ERFLG0 pFlag) const { } /* 80141500-80141508 13BE40 0008+00 1/0 0/0 0/0 .text getMidnaAtnPos__9daPy_py_cCFv */ -bool daPy_py_c::getMidnaAtnPos() const { +extern "C" bool getMidnaAtnPos__9daPy_py_cCFv() { + // bool daPy_py_c::getMidnaAtnPos() const { return false; } diff --git a/src/d/a/d_a_player.cpp b/src/d/a/d_a_player.cpp index 826b55ab03..2291f5c8cb 100644 --- a/src/d/a/d_a_player.cpp +++ b/src/d/a/d_a_player.cpp @@ -25,10 +25,6 @@ struct JMath { static u8 sincosTable_[65536]; }; -struct J3DShape { - static u8 sOldVcdVatCmd[4]; -}; - struct J3DAnmLoaderDataBaseFlag {}; struct J3DAnmLoaderDataBase { @@ -748,7 +744,8 @@ SECTION_SDATA2 static u32 lit_4669 = 0x321400FF; #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daPy_sightPacket_c::draw() { +extern "C" asm void draw__18daPy_sightPacket_cFv() { + // asm void daPy_sightPacket_c::draw() { nofralloc #include "asm/d/a/d_a_player/draw__18daPy_sightPacket_cFv.s" } diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index a1913a85b0..61117fabb1 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -35,12 +35,6 @@ struct Z2AudioMgr { static u8 mAudioMgrPtr[4 + 4 /* padding */]; }; -struct J3DGXColor {}; - -struct J3DTevBlock { - /* 800732AC */ void setTevKColor(u32, J3DGXColor const*); -}; - // // Forward References: // diff --git a/src/d/d_eye_hl.cpp b/src/d/d_eye_hl.cpp index 12820dda0e..693147dc5a 100644 --- a/src/d/d_eye_hl.cpp +++ b/src/d/d_eye_hl.cpp @@ -7,14 +7,6 @@ #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct JUTNameTab { - /* 802DEAF8 */ void getName(u16) const; -}; - // // Forward References: // diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index 746a747ecd..b03b1e7cca 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -4,6 +4,13 @@ // #include "d/d_resorce.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "JSystem/J3DGraphBase/J3DTevs.h" +#include "JSystem/J3DGraphBase/J3DTexture.h" +#include "JSystem/J3DGraphLoader/J3DAnmLoader.h" +#include "JSystem/J3DGraphLoader/J3DClusterLoader.h" +#include "JSystem/J3DGraphLoader/J3DModelLoader.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "d/com/d_com_inf_game.h" #include "dol2asm.h" @@ -32,84 +39,6 @@ struct dBgWKCol { /* 8007E7D0 */ void initKCollision(void*); }; -struct J3DTexture { - /* 8031221C */ void addResTIMG(u16, ResTIMG const*); -}; - -struct J3DTexNoAnm { - /* 8003B1F8 */ ~J3DTexNoAnm(); - /* 8003B240 */ J3DTexNoAnm(); - /* 8003C82C */ void calc(u16*) const; -}; - -struct J3DTexMtxInfo { - /* 80325718 */ void operator=(J3DTexMtxInfo const&); -}; - -struct J3DTexMtxAnm { - /* 8003B264 */ ~J3DTexMtxAnm(); - /* 8003B2A0 */ J3DTexMtxAnm(); -}; - -struct J3DTexMtx {}; - -struct J3DTexGenBlock { - /* 8003AB2C */ void setTexMtx(u32, J3DTexMtx*); -}; - -struct J3DTevStageInfo {}; - -struct J3DTevStage { - /* 8000E298 */ void setTevStageInfo(J3DTevStageInfo const&); - /* 8003AACC */ J3DTevStage(J3DTevStageInfo const&); -}; - -struct J3DTevKColorAnm { - /* 8003B150 */ ~J3DTevKColorAnm(); - /* 8003B18C */ J3DTevKColorAnm(); -}; - -struct J3DTevColorAnm { - /* 8003B1A4 */ ~J3DTevColorAnm(); - /* 8003B1E0 */ J3DTevColorAnm(); -}; - -struct J3DShape { - /* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32); - /* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr); -}; - -struct J3DModelLoaderDataBase { - /* 803346BC */ void load(void const*, u32); -}; - -struct J3DMaterialAnm { - /* 8032C320 */ void initialize(); -}; - -struct J3DMatColorAnm { - /* 8003B2B8 */ ~J3DMatColorAnm(); - /* 8003B2F4 */ J3DMatColorAnm(); -}; - -struct J3DClusterLoaderDataBase { - /* 80334130 */ void load(void const*); -}; - -struct J3DAnmTransformKey { - /* 8003B8D0 */ ~J3DAnmTransformKey(); - /* 8003C800 */ s32 getKind() const; - /* 8003C808 */ void getTransform(u16, J3DTransformInfo*) const; - /* 80329A34 */ void calcTransform(f32, u16, J3DTransformInfo*) const; -}; - -struct J3DAnmLoaderDataBaseFlag {}; - -struct J3DAnmLoaderDataBase { - /* 80337B40 */ void load(void const*, J3DAnmLoaderDataBaseFlag); - /* 80338134 */ void setResource(J3DAnmBase*, void const*); -}; - // // Forward References: // @@ -232,7 +161,6 @@ extern "C" void _restgpr_27(); extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); extern "C" void memcmp(); -extern "C" extern u8 const j3dDefaultMtx[48]; extern "C" extern void* __vt__14J3DMaterialAnm[4]; extern "C" u8 now__14mDoMtx_stack_c[48]; extern "C" extern u8 g_env_light[4880]; @@ -289,14 +217,20 @@ int dRes_info_c::set(char const* pArcName, char const* pArcPath, u8 param_2, JKR } /* 8003A3F0-8003A490 034D30 00A0+00 1/1 0/0 0/0 .text setAlpha__FP16J3DMaterialTable */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void setAlpha(J3DMaterialTable* param_0) { - nofralloc -#include "asm/d/d_resorce/setAlpha__FP16J3DMaterialTable.s" +static void setAlpha(J3DMaterialTable* pMatTable) { + for (u16 i = 0; i < pMatTable->getMaterialNum(); i++) { + J3DMaterial* mat = pMatTable->getMaterialNodePointer(i); + J3DTevBlock* tevBlock = mat->getTevBlock(); + + if (tevBlock != NULL) { + _GXColorS10* tevColor = tevBlock->getTevColor(3); + if (tevColor != NULL) { + u8 tevStageNum = tevBlock->getTevStageNum(); + tevColor->a = tevStageNum; + } + } + } } -#pragma pop /* ############################################################################################## */ /* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ @@ -318,14 +252,9 @@ static asm void setIndirectTex(J3DModelData* param_0) { #pragma pop /* 8003A81C-8003A840 03515C 0024+00 1/1 0/0 0/0 .text setAlpha__FP12J3DModelData */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void setAlpha(J3DModelData* param_0) { - nofralloc -#include "asm/d/d_resorce/setAlpha__FP12J3DModelData.s" +static void setAlpha(J3DModelData* pModelData) { + setAlpha(&pModelData->getMaterialTable()); } -#pragma pop /* ############################################################################################## */ /* 80379840-803798A4 005EA0 0064+00 2/2 0/0 0/0 .rodata l_texMtxInfo */ @@ -624,7 +553,8 @@ asm int dRes_info_c::loadResource() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTransformKey::~J3DAnmTransformKey() { +extern "C" asm void __dt__18J3DAnmTransformKeyFv() { + // asm J3DAnmTransformKey::~J3DAnmTransformKey() { nofralloc #include "asm/d/d_resorce/__dt__18J3DAnmTransformKeyFv.s" } @@ -634,7 +564,8 @@ asm J3DAnmTransformKey::~J3DAnmTransformKey() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmTransform::~J3DAnmTransform() { +extern "C" asm void __dt__15J3DAnmTransformFv() { + // asm J3DAnmTransform::~J3DAnmTransform() { nofralloc #include "asm/d/d_resorce/__dt__15J3DAnmTransformFv.s" } @@ -1149,15 +1080,16 @@ int dRes_control_c::getObjectResName2Index(char const* arcName, char const* para #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DAnmBase::~J3DAnmBase() { +extern "C" asm void __dt__10J3DAnmBaseFv() { + // asm J3DAnmBase::~J3DAnmBase() { nofralloc #include "asm/d/d_resorce/__dt__10J3DAnmBaseFv.s" } #pragma pop /* 8003C77C-8003C784 0370BC 0008+00 1/0 0/0 0/0 .text getKind__15J3DAnmTransformCFv */ -bool J3DAnmTransform::getKind() const { - return false; +s32 J3DAnmTransform::getKind() const { + return 0; } /* 8003C784-8003C800 0370C4 007C+00 1/0 0/0 0/0 .text __dt__18mDoExt_transAnmBasFv */ diff --git a/src/d/kankyo/d_kankyo.cpp b/src/d/kankyo/d_kankyo.cpp index 464aa0073d..4bd32ed79e 100644 --- a/src/d/kankyo/d_kankyo.cpp +++ b/src/d/kankyo/d_kankyo.cpp @@ -63,19 +63,6 @@ struct JMath { static u8 sincosTable_[65536]; }; -struct J3DTexMtxInfo { - /* 80325794 */ void setEffectMtx(f32 (*)[4]); -}; - -struct J3DMaterial {}; - -struct J3DGXColor {}; - -struct J3DColorBlock { - /* 801A4C08 */ void setLight(u32, J3DLightObj*); - /* 801A4C0C */ void setAmbColor(u32, J3DGXColor const*); -}; - // // Forward References: // @@ -403,7 +390,6 @@ extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); extern "C" void memcmp(); extern "C" u8 const tempBitLabels__20dSv_event_tmp_flag_c[370 + 2 /* padding */]; -extern "C" extern u8 const j3dDefaultMtx[48]; extern "C" extern void* __vt__12J3DFrameCtrl[3]; extern "C" extern void* g_fopKy_Method[5 + 1 /* padding */]; extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; diff --git a/src/d/particle/d_particle.cpp b/src/d/particle/d_particle.cpp index 2c64592c5f..a8c0ab5c2f 100644 --- a/src/d/particle/d_particle.cpp +++ b/src/d/particle/d_particle.cpp @@ -50,8 +50,6 @@ struct dPa_wbPcallBack_c { struct JPADrawInfo {}; -struct ResTIMG {}; - struct JPAResourceManager { /* 80273E10 */ JPAResourceManager(void const*, JKRHeap*); /* 80273EA8 */ void checkUserIndexDuplication(u16) const; @@ -306,16 +304,6 @@ struct J3DUClipper { /* 802738FC */ void clip(f32 const (*)[4], Vec, f32) const; }; -struct J3DTexture { - /* 8031204C */ void loadGX(u16, _GXTexMapID) const; -}; - -struct J3DShape { - /* 80315300 */ void loadPreDrawSetting() const; - - static u8 sOldVcdVatCmd[4]; -}; - // // Forward References: // diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 7de112935e..8be4c29c98 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -143,10 +143,6 @@ struct cBgS { /* 80074744 */ void GetTriPla(cBgS_PolyInfo const&, cM3dGPla*) const; }; -struct J3DTexMtxInfo { - /* 80325794 */ void setEffectMtx(f32 (*)[4]); -}; - // // Forward References: // diff --git a/src/init.cpp b/src/init.cpp index b135d31fb5..6a5b0d1a27 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -35,7 +35,6 @@ SECTION_INIT void __init_hardware(); SECTION_INIT void __flush_cache(); SECTION_INIT void memset(); SECTION_INIT void __fill_mem(); -SECTION_INIT void memcpy(); SECTION_INIT void TRK_memset(); SECTION_INIT void TRK_memcpy(); extern "C" extern u8 const __TRK_unknown_data[7988]; @@ -168,7 +167,7 @@ SECTION_INIT asm void __fill_mem() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -SECTION_INIT asm void memcpy() { +SECTION_INIT asm void* memcpy(void*, const void*, s32) { nofralloc #include "asm/init/memcpy.s" } diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index 49de92319f..c11c6f628a 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -4,6 +4,8 @@ // #include "m_Do/m_Do_ext.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" +#include "JSystem/J3DGraphBase/J3DTevs.h" #include "JSystem/JKernel/JKRArchive.h" #include "JSystem/JKernel/JKRAssertHeap.h" #include "JSystem/JKernel/JKRExpHeap.h" @@ -40,8 +42,6 @@ struct mDoExt_btpAnm { /* 8000D5E8 */ void entry(J3DMaterialTable*, s16); }; -struct J3DAnmCluster {}; - struct mDoExt_blkAnm { /* 8000DA08 */ void init(J3DDeformData*, J3DAnmCluster*, int, int, f32, s16, s16); }; @@ -61,8 +61,6 @@ struct mDoExt_MtxCalcAnmBlendTbl { /* 80014F3C */ ~mDoExt_MtxCalcAnmBlendTbl(); }; -struct J3DTransformInfo {}; - struct mDoExt_McaMorfCallBack2_c {}; struct Z2Creature { @@ -135,10 +133,6 @@ struct mDoExt_3DlineMatSortPacket { /* 80014E20 */ ~mDoExt_3DlineMatSortPacket(); }; -struct ResTIMG {}; - -struct _GXColor {}; - struct dKy_tevstr_c {}; struct mDoExt_3DlineMat1_c { @@ -160,10 +154,6 @@ struct mDoExt_3DlineMat0_c { }; struct J3DDrawBuffer; -struct J3DPacket { - /* 8000E680 */ ~J3DPacket(); - /* 80312750 */ bool entry(J3DDrawBuffer*); -}; struct J3DDrawBuffer { /* 8032548C */ void entryImm(J3DPacket*, u16); @@ -173,14 +163,8 @@ struct dDlst_list_c { /* 800565EC */ void entryZSortXluDrawList(J3DDrawBuffer*, J3DPacket*, cXyz&); }; -struct _GXLogicOp {}; - struct _GXCompare {}; -struct _GXBlendMode {}; - -struct _GXBlendFactor {}; - struct JAISoundID {}; struct Z2SoundHandlePool {}; @@ -210,10 +194,6 @@ struct JUTResFont { /* 802DEF94 */ JUTResFont(ResFONT const*, JKRHeap*); }; -struct JUTNameTab { - /* 802DEAF8 */ void getName(u16) const; -}; - struct JUTFont { /* 8001494C */ ~JUTFont(); /* 80014D9C */ void setGX(JUtility::TColor, JUtility::TColor); @@ -225,116 +205,6 @@ struct JUTCacheFont { /* 802DD188 */ JUTCacheFont(ResFONT const*, u32, JKRHeap*); }; -struct J3DZMode {}; - -struct J3DVertexBuffer { - /* 80310FD8 */ void init(); -}; - -struct J3DTexMtxAnm {}; - -struct J3DTexCoord { - /* 8000E464 */ J3DTexCoord(); -}; - -struct J3DTexGenBlock { - /* 8000DFD8 */ bool getTexMtx(u32); - /* 8000DFE0 */ bool getTexCoord(u32); - /* 8000DFE8 */ bool getTexGenNum() const; - /* 8000E0CC */ void setTexCoord(u32, J3DTexCoord const*); - /* 8000E0D0 */ void setTexGenNum(u32); -}; - -struct J3DTevSwapModeTable { - /* 8000E134 */ J3DTevSwapModeTable(); -}; - -struct J3DTevStageInfo {}; - -struct J3DTevStage { - /* 8000E230 */ J3DTevStage(); - /* 8000E298 */ void setTevStageInfo(J3DTevStageInfo const&); -}; - -struct J3DTevOrder { - /* 8000E140 */ J3DTevOrder(); -}; - -struct J3DTevKColorAnm {}; - -struct J3DTevColorAnm {}; - -struct J3DGXColorS10 { - /* 8000E460 */ J3DGXColorS10(); -}; - -struct J3DIndTevStage { - /* 8000E14C */ J3DIndTevStage(); -}; - -struct J3DGXColor { - /* 8000E538 */ J3DGXColor(); -}; - -struct J3DTevBlock { - /* 8000DBC8 */ void patchTexNoAndTexCoordScale(); - /* 8000DBD4 */ void patch(); - /* 8000DF84 */ bool getIndTevStage(u32); - /* 8000DF8C */ bool getTevStage(u32); - /* 8000DF94 */ void getTexNo(u32) const; - /* 8000DFA0 */ bool getTevSwapModeTable(u32); - /* 8000DFA8 */ bool getTevKAlphaSel(u32); - /* 8000DFB0 */ bool getTevKColorSel(u32); - /* 8000DFB8 */ bool getTevOrder(u32); - /* 8000DFC0 */ bool getTevKColor(u32); - /* 8000DFC8 */ bool getTevColor(u32); - /* 8000DFD0 */ bool getTevStageNum() const; - /* 8000E0A4 */ void setIndTevStage(u32, J3DIndTevStage); - /* 8000E0A8 */ void setTevStage(u32, J3DTevStage); - /* 8000E0AC */ void setTexNo(u32, u16); - /* 8000E0B0 */ void setTevSwapModeTable(u32, J3DTevSwapModeTable); - /* 8000E0B4 */ void setTevKAlphaSel(u32, u8); - /* 8000E0B8 */ void setTevKColorSel(u32, u8); - /* 8000E0BC */ void setTevOrder(u32, J3DTevOrder); - /* 8000E0C0 */ void setTevKColor(u32, J3DGXColor); - /* 8000E0C4 */ void setTevColor(u32, J3DGXColorS10); - /* 8000E0C8 */ void setTevStageNum(u8); -}; - -struct J3DSys { - /* 8031073C */ void reinitGX(); - - static u8 mCurrentMtx[48]; - static f32 mParentS[3]; -}; - -struct J3DShapePacket { - /* 80312FBC */ void drawFast(); -}; - -struct J3DShape { - /* 80315300 */ void loadPreDrawSetting() const; - - static u8 sOldVcdVatCmd[4]; -}; - -struct J3DAlphaComp {}; - -struct J3DBlend {}; - -struct J3DPEBlock { - /* 8000DBCC */ void patch(); - /* 8000DF3C */ bool getZCompLoc() const; - /* 8000DF44 */ bool getZMode(); - /* 8000DF4C */ bool getBlend(); - /* 8000DF54 */ bool getAlphaComp(); - /* 8000DF5C */ bool getFog(); - /* 8000E010 */ void setZCompLoc(u8); - /* 8000E014 */ void setZMode(J3DZMode); - /* 8000E018 */ void setBlend(J3DBlend const&); - /* 8000E01C */ void setAlphaComp(J3DAlphaComp const&); -}; - struct J3DMtxCalcNoAnmBase { /* 8000FA8C */ ~J3DMtxCalcNoAnmBase(); }; @@ -348,14 +218,6 @@ struct J3DMtxCalcNoAnm__template0 { /* 80015084 */ void func_80015084(void* _this); }; -struct J3DMtxCalcJ3DSysInitMaya { - /* 8032ECAC */ void init(Vec const&, f32 const (&)[3][4]); -}; - -struct J3DMtxCalcCalcTransformMaya { - /* 8032EFBC */ void calcTransform(J3DTransformInfo const&); -}; - struct J3DMtxCalcAnmBase { /* 8000D8EC */ ~J3DMtxCalcAnmBase(); /* 80014FB8 */ void getAnmTransform(); @@ -373,74 +235,10 @@ struct J3DMtxCalcAnimation__template0 { /* 800150AC */ void func_800150AC(void* _this); }; -struct J3DMtxCalc { - /* 8000D948 */ ~J3DMtxCalc(); - /* 80014E8C */ void setAnmTransform(u8, J3DAnmTransform*); - /* 80014E90 */ void setAnmTransform(J3DAnmTransform*); - /* 80014E94 */ bool getAnmTransform(u8); - /* 80014E9C */ bool getAnmTransform(); - /* 80014EA4 */ void setWeight(u8, f32); - /* 80014EA8 */ void getWeight(u8) const; - - static u8 mJoint[4]; -}; - -struct J3DMaterialAnm { - /* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*); - /* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*); - /* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*); -}; - -struct J3DIndTexOrder { - /* 8000E128 */ J3DIndTexOrder(); -}; - struct J3DIndTexMtxInfo { /* 803257DC */ void operator=(J3DIndTexMtxInfo const&); }; -struct J3DIndTexMtx { - /* 8000E064 */ ~J3DIndTexMtx(); - /* 8000E0F0 */ J3DIndTexMtx(); -}; - -struct J3DIndTexCoordScale { - /* 8000E024 */ ~J3DIndTexCoordScale(); - /* 8000E0E4 */ J3DIndTexCoordScale(); -}; - -struct J3DIndBlock { - /* 8000DF64 */ bool getIndTexCoordScale(u32); - /* 8000DF6C */ bool getIndTexMtx(u32); - /* 8000DF74 */ bool getIndTexOrder(u32); - /* 8000DF7C */ bool getIndTexStageNum() const; - /* 8000E020 */ void setIndTexCoordScale(u32, J3DIndTexCoordScale); - /* 8000E060 */ void setIndTexMtx(u32, J3DIndTexMtx); - /* 8000E0A0 */ void setIndTexStageNum(u8); -}; - -struct J3DDisplayListObj { - /* 80312618 */ void callDL() const; - - static u8 sGDLObj[16]; -}; - -struct J3DColorChan { - /* 8000E47C */ J3DColorChan(); -}; - -struct J3DColorBlock { - /* 8000DBD0 */ void patchLight(); - /* 8000DFF0 */ bool getAmbColor(u32); - /* 8000DFF8 */ bool getColorChan(u32); - /* 8000E000 */ bool getMatColor(u32); - /* 8000E008 */ bool getColorChanNum() const; - /* 8000E0D4 */ void setAmbColor(u32, J3DGXColor); - /* 8000E0D8 */ void setColorChan(u32, J3DColorChan const&); - /* 8000E0DC */ void setMatColor(u32, J3DGXColor); - /* 8000E0E0 */ void setColorChanNum(u8); -}; - // // Forward References: // @@ -760,23 +558,14 @@ extern "C" void entryTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey(); extern "C" void JMAEulerToQuat__FsssP10Quaternion(); extern "C" void JMAQuatLerp__FPC10QuaternionPC10QuaternionfP10Quaternion(); extern "C" void DCStoreRangeNoSync(); -extern "C" void GXSetVtxDesc(); extern "C" void GXClearVtxDesc(); -extern "C" void GXSetVtxAttrFmt(); extern "C" void GXSetArray(); -extern "C" void GXBegin(); -extern "C" void GXInitTexObj(); -extern "C" void GXInitTexObjLOD(); extern "C" void GXGetTexObjWidth(); extern "C" void GXGetTexObjHeight(); -extern "C" void GXLoadTexObj(); extern "C" void GXSetTexCoordScaleManually(); extern "C" void GXSetNumIndStages(); -extern "C" void GXSetTevColor(); -extern "C" void GXCallDisplayList(); extern "C" void GXLoadPosMtxImm(); extern "C" void GXLoadNrmMtxImm(); -extern "C" void GDInitGDLObj(); extern "C" void __construct_new_array(); extern "C" void _savegpr_15(); extern "C" void _savegpr_18(); @@ -808,7 +597,6 @@ extern "C" extern u8 g_mDoMtx_identity[48 + 24 /* padding */]; extern "C" extern void* __vt__9J3DPacket[5]; extern "C" extern void* __vt__8J3DModel[9]; extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 j3dSys[284]; extern "C" u8 mCurrentMtx__6J3DSys[48]; extern "C" f32 mParentS__6J3DSys[3]; extern "C" u8 sGDLObj__17J3DDisplayListObj[16]; @@ -817,7 +605,6 @@ extern "C" extern f32 G_CM3D_F_ABS_MIN[1 + 1 /* padding */]; extern "C" u8 sCurrentHeap__7JKRHeap[4]; extern "C" u8 sOldVcdVatCmd__8J3DShape[4]; extern "C" u8 mJoint__10J3DMtxCalc[4]; -extern "C" extern u8 __GDCurrentDL[4]; extern "C" extern u32 j3dDefaultTevOrderInfoNull; extern "C" extern u32 j3dDefaultIndTexOrderNull; extern "C" extern u8 j3dDefaultIndTexCoordScaleInfo[4]; @@ -1973,23 +1760,23 @@ bool J3DTevBlock::getTevOrder(u32 param_0) { } /* 8000DFC0-8000DFC8 008900 0008+00 0/0 3/0 0/0 .text getTevKColor__11J3DTevBlockFUl */ -bool J3DTevBlock::getTevKColor(u32 param_0) { - return false; +GXColor* J3DTevBlock::getTevKColor(u32 param_0) { + return NULL; } /* 8000DFC8-8000DFD0 008908 0008+00 0/0 3/0 0/0 .text getTevColor__11J3DTevBlockFUl */ -bool J3DTevBlock::getTevColor(u32 param_0) { - return false; +GXColorS10* J3DTevBlock::getTevColor(u32 param_0) { + return NULL; } /* 8000DFD0-8000DFD8 008910 0008+00 0/0 2/0 0/0 .text getTevStageNum__11J3DTevBlockCFv */ -bool J3DTevBlock::getTevStageNum() const { - return true; +u8 J3DTevBlock::getTevStageNum() const { + return 1; } /* 8000DFD8-8000DFE0 008918 0008+00 0/0 2/0 0/0 .text getTexMtx__14J3DTexGenBlockFUl */ -bool J3DTexGenBlock::getTexMtx(u32 param_0) { - return false; +J3DTexMtx* J3DTexGenBlock::getTexMtx(u32 param_0) { + return NULL; } /* 8000DFE0-8000DFE8 008920 0008+00 0/0 2/0 0/0 .text getTexCoord__14J3DTexGenBlockFUl */ @@ -2014,8 +1801,8 @@ bool J3DColorBlock::getColorChan(u32 param_0) { } /* 8000E000-8000E008 008940 0008+00 0/0 2/0 0/0 .text getMatColor__13J3DColorBlockFUl */ -bool J3DColorBlock::getMatColor(u32 param_0) { - return false; +GXColor* J3DColorBlock::getMatColor(u32 param_0) { + return NULL; } /* 8000E008-8000E010 008948 0008+00 0/0 2/0 0/0 .text getColorChanNum__13J3DColorBlockCFv