mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-22 16:22:59 -04:00
J3DJointFactory done except weak functions
This commit is contained in:
@@ -120,7 +120,7 @@ public:
|
||||
u32 getType() const { return 'NJNT'; }
|
||||
void recursiveCalc();
|
||||
|
||||
J3DJoint();
|
||||
J3DJoint() { initialize(); }
|
||||
~J3DJoint() {}
|
||||
|
||||
J3DMaterial* getMesh() { return mMesh; }
|
||||
@@ -148,7 +148,7 @@ private:
|
||||
/* 0x1A */ u8 mKind;
|
||||
/* 0x1B */ u8 mScaleCompensate;
|
||||
/* 0x1C */ J3DTransformInfo mTransformInfo;
|
||||
/* 0x3C */ f32 mBoundingSphereRadius;
|
||||
/* 0x3C */ f32 mRadius;
|
||||
/* 0x40 */ Vec mMin;
|
||||
/* 0x4C */ Vec mMax;
|
||||
/* 0x58 */ J3DMtxCalc* mMtxCalc;
|
||||
|
||||
@@ -32,8 +32,8 @@ struct J3DJointFactory {
|
||||
J3DJointFactory(J3DJointBlock const&);
|
||||
J3DJoint* create(int);
|
||||
|
||||
J3DJointInitData* mJointInitData;
|
||||
u16* mIndexTable;
|
||||
/* 0x0 */ J3DJointInitData* mJointInitData;
|
||||
/* 0x4 */ u16* mIndexTable;
|
||||
|
||||
u16 getKind(int no) const { return mJointInitData[mIndexTable[no]].mKind; }
|
||||
u8 getScaleCompensate(int no) const { return mJointInitData[mIndexTable[no]].mScaleCompensate; }
|
||||
|
||||
@@ -201,7 +201,7 @@ void J3DJoint::initialize() {
|
||||
mKind = 1;
|
||||
mScaleCompensate = 0;
|
||||
mTransformInfo = j3dDefaultTransformInfo;
|
||||
mBoundingSphereRadius = 0.0f;
|
||||
mRadius = 0.0f;
|
||||
mMin = (Vec){0.0f, 0.0f, 0.0f};
|
||||
mMax = (Vec){0.0f, 0.0f, 0.0f};
|
||||
mMtxCalc = NULL;
|
||||
|
||||
@@ -4,19 +4,30 @@
|
||||
//
|
||||
|
||||
#include "JSystem/J3DGraphLoader/J3DJointFactory.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DJoint.h"
|
||||
|
||||
/* 802FE1A4-802FE1FC .text __ct__15J3DJointFactoryFRC13J3DJointBlock */
|
||||
J3DJointFactory::J3DJointFactory(const J3DJointBlock&) {
|
||||
J3DJointFactory::J3DJointFactory(const J3DJointBlock& jointBlock) {
|
||||
/* Nonmatching */
|
||||
mJointInitData = JSUConvertOffsetToPtr<J3DJointInitData>(&jointBlock, jointBlock.mJointInitData);
|
||||
mIndexTable = JSUConvertOffsetToPtr<u16>(&jointBlock, jointBlock.mIndexTable);
|
||||
}
|
||||
|
||||
/* 802FE1FC-802FE390 .text create__15J3DJointFactoryFi */
|
||||
void J3DJointFactory::create(int) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 802FE390-802FE3A8 .text JSUConvertOffsetToPtr<16J3DJointInitData>__FPCvUl */
|
||||
void JSUConvertOffsetToPtr<J3DJointInitData>(const void*, unsigned long) {
|
||||
/* Nonmatching */
|
||||
J3DJoint* J3DJointFactory::create(int jntNo) {
|
||||
J3DJoint* joint = new J3DJoint();
|
||||
joint->mJntNo = jntNo;
|
||||
joint->mKind = mJointInitData[mIndexTable[jntNo]].mKind;
|
||||
joint->mScaleCompensate = mJointInitData[mIndexTable[jntNo]].mScaleCompensate;
|
||||
joint->mTransformInfo = mJointInitData[mIndexTable[jntNo]].mTransformInfo;
|
||||
joint->mRadius = mJointInitData[mIndexTable[jntNo]].mRadius;
|
||||
joint->mMin = mJointInitData[mIndexTable[jntNo]].mMin;
|
||||
joint->mMax = mJointInitData[mIndexTable[jntNo]].mMax;
|
||||
joint->mMtxCalc = NULL;
|
||||
joint->mOldMtxCalc = NULL;
|
||||
if (joint->mScaleCompensate == 0xFF) {
|
||||
joint->mScaleCompensate = false;
|
||||
}
|
||||
return joint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user