mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-03 17:03:37 -04:00
work on J3DModelLoader (#1982)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#include "JSystem/J3DGraphLoader/J3DJointFactory.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DJoint.h"
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
#include "dolphin/types.h"
|
||||
@@ -16,11 +17,11 @@ extern "C" u16* func_8033677C(const void*, const void*); // JSUConvertOffsetToP
|
||||
|
||||
/* 80337178-803371D0 331AB8 0058+00 0/0 1/1 0/0 .text __ct__15J3DJointFactoryFRC13J3DJointBlock */
|
||||
J3DJointFactory::J3DJointFactory(J3DJointBlock const& block) {
|
||||
mJointInitData = JSUConvertOffsetToPtr<J3DJointInitData>(&block, block.mJointInitData);
|
||||
mJointInitData = JSUConvertOffsetToPtr<J3DJointInitData>(&block, block.mpJointInitData);
|
||||
|
||||
// Fix when we have our ODR working.
|
||||
// mIndexTable = JSUConvertOffsetToPtr<u16>(&block, block.mIndexTable);
|
||||
mIndexTable = func_8033677C(&block, block.mIndexTable);
|
||||
// mIndexTable = JSUConvertOffsetToPtr<u16>(&block, block.mpIndexTable);
|
||||
mIndexTable = func_8033677C(&block, block.mpIndexTable);
|
||||
}
|
||||
|
||||
/* 803371D0-80337338 331B10 0168+00 0/0 1/1 0/0 .text create__15J3DJointFactoryFi */
|
||||
|
||||
@@ -210,56 +210,6 @@ struct J3DMaterial {
|
||||
/* 80332B94 */ ~J3DMaterial();
|
||||
};
|
||||
|
||||
struct J3DMaterialBlock {};
|
||||
|
||||
struct J3DMaterialDLBlock {};
|
||||
|
||||
struct J3DMaterialFactory {
|
||||
struct MaterialType {};
|
||||
|
||||
/* 80330234 */ J3DMaterialFactory(J3DMaterialDLBlock const&);
|
||||
/* 8032FFEC */ J3DMaterialFactory(J3DMaterialBlock const&);
|
||||
/* 803302BC */ void countUniqueMaterials();
|
||||
/* 80330304 */ void countTexGens(int) const;
|
||||
/* 8033033C */ void countStages(int) const;
|
||||
/* 803303C4 */ void create(J3DMaterial*, J3DMaterialFactory::MaterialType, int, u32) const;
|
||||
/* 80330440 */ void createNormalMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 80330D84 */ void createPatchedMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 8033168C */ void modifyPatchedCurrentMtx(J3DMaterial*, int) const;
|
||||
/* 803317D4 */ void createLockedMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 80331A7C */ void calcSize(J3DMaterial*, J3DMaterialFactory::MaterialType, int, u32) const;
|
||||
/* 80331AFC */ void calcSizeNormalMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 80331C30 */ void calcSizePatchedMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 80331D00 */ void calcSizeLockedMaterial(J3DMaterial*, int, u32) const;
|
||||
/* 80331D18 */ void newMatColor(int, int) const;
|
||||
/* 80331D74 */ void newColorChanNum(int) const;
|
||||
/* 80331DAC */ void newColorChan(int, int) const;
|
||||
/* 80331F50 */ void newAmbColor(int, int) const;
|
||||
/* 80331FAC */ void newTexGenNum(int) const;
|
||||
/* 80331FE4 */ void newTexCoord(int, int) const;
|
||||
/* 80332044 */ void newTexMtx(int, int) const;
|
||||
/* 803320CC */ void newCullMode(int) const;
|
||||
/* 8033210C */ void newTexNo(int, int) const;
|
||||
/* 80332154 */ void newTevOrder(int, int) const;
|
||||
/* 803321A0 */ void newTevColor(int, int) const;
|
||||
/* 80332210 */ void newTevKColor(int, int) const;
|
||||
/* 8033226C */ void newTevStageNum(int) const;
|
||||
/* 803322A4 */ void newTevStage(int, int) const;
|
||||
/* 80332304 */ void newTevSwapModeTable(int, int) const;
|
||||
/* 803323A0 */ void newIndTexStageNum(int) const;
|
||||
/* 803323C8 */ void newIndTexOrder(int, int) const;
|
||||
/* 8033240C */ void newIndTexMtx(int, int) const;
|
||||
/* 803324B4 */ void newIndTevStage(int, int) const;
|
||||
/* 80332648 */ void newIndTexCoordScale(int, int) const;
|
||||
/* 8033268C */ void newFog(int) const;
|
||||
/* 80332768 */ void newAlphaComp(int) const;
|
||||
/* 803327E8 */ void newBlend(int) const;
|
||||
/* 8033282C */ void newZMode(int) const;
|
||||
/* 8033288C */ void newZCompLoc(int) const;
|
||||
/* 803328C4 */ void newDither(int) const;
|
||||
/* 803328FC */ void newNBTScale(int) const;
|
||||
};
|
||||
|
||||
struct J3DLockedMaterial {
|
||||
/* 80317044 */ void initialize();
|
||||
};
|
||||
@@ -636,7 +586,7 @@ asm J3DMaterialFactory::J3DMaterialFactory(J3DMaterialDLBlock const& param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialFactory::countUniqueMaterials() {
|
||||
asm u16 J3DMaterialFactory::countUniqueMaterials() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphLoader/J3DMaterialFactory/countUniqueMaterials__18J3DMaterialFactoryFv.s"
|
||||
}
|
||||
@@ -667,7 +617,7 @@ asm void J3DMaterialFactory::countStages(int param_0) const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialFactory::create(J3DMaterial* param_0, J3DMaterialFactory::MaterialType param_1,
|
||||
asm J3DMaterial* J3DMaterialFactory::create(J3DMaterial* param_0, J3DMaterialFactory::MaterialType param_1,
|
||||
int param_2, u32 param_3) const {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphLoader/J3DMaterialFactory/func_803303C4.s"
|
||||
|
||||
@@ -21,8 +21,6 @@ struct J3DTevStage {
|
||||
/* 8003AACC */ J3DTevStage(J3DTevStageInfo const&);
|
||||
};
|
||||
|
||||
struct J3DMaterialBlock_v21 {};
|
||||
|
||||
struct J3DMaterial {
|
||||
/* 803157A0 */ void createColorBlock(u32);
|
||||
/* 803159A0 */ void createTexGenBlock(u32);
|
||||
@@ -32,35 +30,6 @@ struct J3DMaterial {
|
||||
/* 80316240 */ void initialize();
|
||||
};
|
||||
|
||||
struct J3DMaterialFactory_v21 {
|
||||
/* 80332DA4 */ J3DMaterialFactory_v21(J3DMaterialBlock_v21 const&);
|
||||
/* 80332F84 */ void countUniqueMaterials();
|
||||
/* 80332FA8 */ void countTexGens(int) const;
|
||||
/* 80332FE0 */ void countStages(int) const;
|
||||
/* 80333068 */ void create(J3DMaterial*, int, u32) const;
|
||||
/* 803337D8 */ void newMatColor(int, int) const;
|
||||
/* 80333834 */ void newColorChanNum(int) const;
|
||||
/* 8033386C */ void newColorChan(int, int) const;
|
||||
/* 80333A10 */ void newTexGenNum(int) const;
|
||||
/* 80333A48 */ void newTexCoord(int, int) const;
|
||||
/* 80333AA8 */ void newTexMtx(int, int) const;
|
||||
/* 80333B30 */ void newCullMode(int) const;
|
||||
/* 80333B70 */ void newTexNo(int, int) const;
|
||||
/* 80333BB8 */ void newTevOrder(int, int) const;
|
||||
/* 80333C04 */ void newTevColor(int, int) const;
|
||||
/* 80333C74 */ void newTevKColor(int, int) const;
|
||||
/* 80333CD0 */ void newTevStageNum(int) const;
|
||||
/* 80333D08 */ void newTevStage(int, int) const;
|
||||
/* 80333D68 */ void newTevSwapModeTable(int, int) const;
|
||||
/* 80333E04 */ void newFog(int) const;
|
||||
/* 80333EE0 */ void newAlphaComp(int) const;
|
||||
/* 80333F60 */ void newBlend(int) const;
|
||||
/* 80333FA4 */ void newZMode(int) const;
|
||||
/* 80334004 */ void newZCompLoc(int) const;
|
||||
/* 8033403C */ void newDither(int) const;
|
||||
/* 80334074 */ void newNBTScale(int) const;
|
||||
};
|
||||
|
||||
struct J3DFogInfo {
|
||||
/* 80325800 */ void operator=(J3DFogInfo const&);
|
||||
};
|
||||
@@ -164,7 +133,7 @@ asm J3DMaterialFactory_v21::J3DMaterialFactory_v21(J3DMaterialBlock_v21 const& p
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialFactory_v21::countUniqueMaterials() {
|
||||
asm u16 J3DMaterialFactory_v21::countUniqueMaterials() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphLoader/J3DMaterialFactory_v21/countUniqueMaterials__22J3DMaterialFactory_v21Fv.s"
|
||||
}
|
||||
@@ -195,7 +164,7 @@ asm void J3DMaterialFactory_v21::countStages(int param_0) const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialFactory_v21::create(J3DMaterial* param_0, int param_1, u32 param_2) const {
|
||||
asm J3DMaterial* J3DMaterialFactory_v21::create(J3DMaterial* param_0, int param_1, u32 param_2) const {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphLoader/J3DMaterialFactory_v21/create__22J3DMaterialFactory_v21CFP11J3DMaterialiUl.s"
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,16 +28,16 @@ extern "C" u16* func_8033677C(const void*, const void*); // JSUConvertOffsetToP
|
||||
|
||||
/* 80337350-80337400 331C90 00B0+00 0/0 2/2 0/0 .text __ct__15J3DShapeFactoryFRC13J3DShapeBlock */
|
||||
J3DShapeFactory::J3DShapeFactory(J3DShapeBlock const& block) {
|
||||
// mShapeInitData = JSUConvertOffsetToPtr<J3DShapeInitData>(&block, block.mShapeInitData);
|
||||
mShapeInitData = func_80336764(&block, block.mShapeInitData);
|
||||
// mIndexTable = JSUConvertOffsetToPtr<u16>(&block, block.mIndexTable);
|
||||
mIndexTable = func_8033677C(&block, block.mIndexTable);
|
||||
mVtxDescList = JSUConvertOffsetToPtr<GXVtxDescList>(&block, block.mVtxDescList);
|
||||
// mMtxTable = JSUConvertOffsetToPtr<u16>(&block, block.mMtxTable);
|
||||
mMtxTable = func_8033677C(&block, block.mMtxTable);
|
||||
mDisplayListData = JSUConvertOffsetToPtr<u8>(&block, block.mDisplayListData);
|
||||
mMtxInitData = JSUConvertOffsetToPtr<J3DShapeMtxInitData>(&block, block.mMtxInitData);
|
||||
mDrawInitData = JSUConvertOffsetToPtr<J3DShapeDrawInitData>(&block, block.mDrawInitData);
|
||||
// mShapeInitData = JSUConvertOffsetToPtr<J3DShapeInitData>(&block, block.mpShapeInitData);
|
||||
mShapeInitData = func_80336764(&block, block.mpShapeInitData);
|
||||
// mIndexTable = JSUConvertOffsetToPtr<u16>(&block, block.mpIndexTable);
|
||||
mIndexTable = func_8033677C(&block, block.mpIndexTable);
|
||||
mVtxDescList = JSUConvertOffsetToPtr<GXVtxDescList>(&block, block.mpVtxDescList);
|
||||
// mMtxTable = JSUConvertOffsetToPtr<u16>(&block, block.mpMtxTable);
|
||||
mMtxTable = func_8033677C(&block, block.mpMtxTable);
|
||||
mDisplayListData = JSUConvertOffsetToPtr<u8>(&block, block.mpDisplayListData);
|
||||
mMtxInitData = JSUConvertOffsetToPtr<J3DShapeMtxInitData>(&block, block.mpMtxInitData);
|
||||
mDrawInitData = JSUConvertOffsetToPtr<J3DShapeDrawInitData>(&block, block.mpDrawInitData);
|
||||
mVcdVatCmdBuffer = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user