mirror of https://github.com/zeldaret/tp.git
JSystem work (#2384)
* object-id 100% on debug Can't be linked due to .text alignment issues? * J3DMaterialFactory and J3DMaterialFactory_v21 OK * Match dKy_bg_MAxx_proc
This commit is contained in:
parent
396a464cc7
commit
6672817e41
|
|
@ -1071,8 +1071,8 @@ config.libs = [
|
|||
JSystemLib(
|
||||
"J3DGraphLoader",
|
||||
[
|
||||
Object(NonMatching, "JSystem/J3DGraphLoader/J3DMaterialFactory.cpp"),
|
||||
Object(NonMatching, "JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DMaterialFactory.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DClusterLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DModelLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(NonMatching, "JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp"),
|
||||
|
|
|
|||
|
|
@ -718,6 +718,7 @@ extern const J3DFogInfo j3dDefaultFogInfo;
|
|||
*/
|
||||
struct J3DFog : public J3DFogInfo {
|
||||
J3DFog() { *(J3DFogInfo*)this = j3dDefaultFogInfo; }
|
||||
~J3DFog() {}
|
||||
J3DFogInfo* getFogInfo() { return this; }
|
||||
void setFogInfo(J3DFogInfo info) { *(J3DFogInfo*)this = info; }
|
||||
void setFogInfo(J3DFogInfo* info) { *(J3DFogInfo*)this = *info; }
|
||||
|
|
@ -733,11 +734,11 @@ struct J3DFog : public J3DFogInfo {
|
|||
*
|
||||
*/
|
||||
struct J3DAlphaCompInfo {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x2 */ u8 mRef0;
|
||||
/* 0x3 */ u8 mRef1;
|
||||
/* 0x4 */ u8 field_0x4;
|
||||
/* 0x0 */ u8 mComp0;
|
||||
/* 0x1 */ u8 mRef0;
|
||||
/* 0x2 */ u8 mOp;
|
||||
/* 0x3 */ u8 mComp1;
|
||||
/* 0x4 */ u8 mRef1;
|
||||
/* 0x5 */ u8 field_0x5;
|
||||
/* 0x6 */ u8 field_0x6;
|
||||
/* 0x7 */ u8 field_0x7;
|
||||
|
|
@ -745,15 +746,10 @@ struct J3DAlphaCompInfo {
|
|||
|
||||
extern const u16 j3dDefaultAlphaCmpID;
|
||||
|
||||
inline u32 calcAlphaCmpID(u32 param_1, u32 param_2, u32 param_3) {
|
||||
return ((param_1 & 0xff) << 5) + ((param_2 & 0xff) << 3) + (param_3 & 0xff);
|
||||
inline u16 calcAlphaCmpID(u8 comp0, u8 op, u8 comp1) {
|
||||
return (comp0 << 5) + (op << 3) + (comp1);
|
||||
}
|
||||
|
||||
// matches for `J3DMaterialFactory::newAlphaComp,J3DMaterialFactory_v21::newAlphaComp` but fails for `d_resorce::addWarpMaterial`
|
||||
// inline u32 calcAlphaCmpID(u8 param_1, u8 param_2, u8 param_3) {
|
||||
// return param_1 * 0x20 + param_2 * 8 + param_3;
|
||||
// }
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
|
@ -761,21 +757,17 @@ inline u32 calcAlphaCmpID(u32 param_1, u32 param_2, u32 param_3) {
|
|||
struct J3DAlphaComp {
|
||||
J3DAlphaComp() : mID(j3dDefaultAlphaCmpID), mRef0(0), mRef1(0) {}
|
||||
J3DAlphaComp(u16 id) : mID(id), mRef0(0), mRef1(0) {}
|
||||
J3DAlphaComp(J3DAlphaCompInfo const& info) :
|
||||
mID(calcAlphaCmpID(info.field_0x0, info.mRef0, info.mRef1)),
|
||||
mRef0(info.field_0x1),
|
||||
mRef1(info.field_0x4)
|
||||
{}
|
||||
|
||||
void setAlphaCompInfo(const J3DAlphaCompInfo& param_1) {
|
||||
mRef0 = param_1.field_0x1;
|
||||
mRef1 = param_1.field_0x4;
|
||||
u32 p1_mref1 = param_1.mRef1;
|
||||
mID = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, p1_mref1);
|
||||
explicit J3DAlphaComp(const J3DAlphaCompInfo& info) {
|
||||
mID = calcAlphaCmpID(info.mComp0, info.mOp, info.mComp1);
|
||||
mRef0 = info.mRef0;
|
||||
mRef1 = info.mRef1;
|
||||
}
|
||||
|
||||
// this matches for `dKy_bg_MAxx_proc` but causes `addWarpMaterial` to fail,
|
||||
// while the above matches for `addWarpMaterial` but causes `dKy_bg_MAxx_proc` to fail?
|
||||
// mID = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, param_1.mRef1);
|
||||
void setAlphaCompInfo(const J3DAlphaCompInfo& info) {
|
||||
mRef0 = info.mRef0;
|
||||
mRef1 = info.mRef1;
|
||||
mID = calcAlphaCmpID(info.mComp0, info.mOp, info.mComp1);
|
||||
}
|
||||
|
||||
GXCompare getComp0() const { return GXCompare(j3dAlphaCmpTable[mID * 3]); }
|
||||
|
|
@ -1121,12 +1113,12 @@ public:
|
|||
*
|
||||
*/
|
||||
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;
|
||||
/* 0x0 */ u8 mEnable;
|
||||
/* 0x1 */ u8 mMatSrc;
|
||||
/* 0x2 */ u8 mLightMask;
|
||||
/* 0x3 */ u8 mDiffuseFn;
|
||||
/* 0x4 */ u8 mAttnFn;
|
||||
/* 0x5 */ u8 mAmbSrc;
|
||||
/* 0x6 */ u8 pad[2];
|
||||
};
|
||||
|
||||
|
|
@ -1140,6 +1132,25 @@ static inline u32 setChanCtrlMacro(u8 enable, GXColorSrc ambSrc, GXColorSrc matS
|
|||
(attnFn != GX_AF_SPEC) << 10 | (lightMask >> 4 & 0x0F) << 11;
|
||||
}
|
||||
|
||||
inline u16 calcColorChanID(u16 enable, u8 matSrc, u8 lightMask, u8 diffuseFn, u8 attnFn, u8 ambSrc) {
|
||||
u32 reg = 0;
|
||||
reg = (reg & ~0x0002) | enable << 1;
|
||||
reg = (reg & ~0x0001) | matSrc;
|
||||
reg = (reg & ~0x0040) | ambSrc << 6;
|
||||
reg = (reg & ~0x0004) | bool(lightMask & 0x01) << 2;
|
||||
reg = (reg & ~0x0008) | bool(lightMask & 0x02) << 3;
|
||||
reg = (reg & ~0x0010) | bool(lightMask & 0x04) << 4;
|
||||
reg = (reg & ~0x0020) | bool(lightMask & 0x08) << 5;
|
||||
reg = (reg & ~0x0800) | bool(lightMask & 0x10) << 11;
|
||||
reg = (reg & ~0x1000) | bool(lightMask & 0x20) << 12;
|
||||
reg = (reg & ~0x2000) | bool(lightMask & 0x40) << 13;
|
||||
reg = (reg & ~0x4000) | bool(lightMask & 0x80) << 14;
|
||||
reg = (reg & ~0x0180) | (attnFn == GX_AF_SPEC ? 0 : diffuseFn) << 7;
|
||||
reg = (reg & ~0x0200) | (attnFn != GX_AF_NONE) << 9;
|
||||
reg = (reg & ~0x0400) | (attnFn != GX_AF_SPEC) << 10;
|
||||
return reg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
|
@ -1149,30 +1160,20 @@ struct J3DColorChan {
|
|||
setColorChanInfo(j3dDefaultColorChanInfo);
|
||||
}
|
||||
J3DColorChan(J3DColorChanInfo const& info) {
|
||||
setColorChanInfo(info);
|
||||
u32 ambSrc = info.mAmbSrc == 0xFF ? 0 : info.mAmbSrc;
|
||||
mColorChanID = calcColorChanID(info.mEnable, info.mMatSrc, info.mLightMask,
|
||||
info.mDiffuseFn, info.mAttnFn, ambSrc);
|
||||
}
|
||||
void setColorChanInfo(J3DColorChanInfo const& info) {
|
||||
mColorChanID = calcColorChanID(info.field_0x0, info.field_0x1, info.field_0x2,
|
||||
info.field_0x3, info.field_0x4, info.field_0x5 == 0xff ? 0 : info.field_0x5);
|
||||
}
|
||||
u16 calcColorChanID(u16 param_0, u8 param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5) {
|
||||
// if (param_4 == 0) {
|
||||
// param_3 = 0;
|
||||
// }
|
||||
u32 b0 = ((param_2 & 1) != 0);
|
||||
u32 b1 = ((param_2 & 2) != 0);
|
||||
u32 b2 = ((param_2 & 4) != 0);
|
||||
u32 b3 = ((param_2 & 8) != 0);
|
||||
u32 b4 = ((param_2 & 0x10) != 0);
|
||||
u32 b5 = ((param_2 & 0x20) != 0);
|
||||
u32 b6 = ((param_2 & 0x40) != 0);
|
||||
u32 b7 = ((param_2 & 0x80) != 0);
|
||||
return param_1 | (param_0 << 1) | (b0 << 2) | (b1 << 3) | (b2 << 4) | (b3 << 5) |
|
||||
(param_5 << 6) | (param_3 << 7) | ((param_4 != 2) << 9) | ((param_4 != 0) << 10) |
|
||||
(b4 << 11) | (b5 << 12) | (b6 << 13) | (b7 << 14);
|
||||
// return (b7 << 14) | (b6 << 13) | (b5 << 12) | (b4 << 11) |
|
||||
// ((param_4 != 0) << 10) | ((param_4 != 2) << 9) | ((param_3 != 0) << 7) | ((param_5 != 0) << 6) |
|
||||
// (b3 << 5) | (b2 << 4) | (b1 << 3) | (b0 << 2) | ((param_0 != 0) << 1) | param_1;
|
||||
// Bug: It compares info.mAmbSrc (an 8 bit integer) with 0xFFFF instead of 0xFF.
|
||||
// This inline is only called by the default constructor J3DColorChan().
|
||||
// The J3DColorChan(const J3DColorChanInfo&) constructor does not call this inline, and instead duplicates the
|
||||
// same logic but without the bug.
|
||||
// See J3DMaterialFactory::newColorChan - both the bugged and correct behavior are present there, as it calls
|
||||
// both constructors.
|
||||
u32 ambSrc = info.mAmbSrc == 0xFFFF ? 0 : info.mAmbSrc;
|
||||
mColorChanID = calcColorChanID(info.mEnable, info.mMatSrc, info.mLightMask,
|
||||
info.mDiffuseFn, info.mAttnFn, ambSrc);
|
||||
}
|
||||
u8 getLightMask() { return ((mColorChanID >> 2) & 0xf) | ((mColorChanID >> 11) & 0xf) << 4; }
|
||||
void setLightMask(u8 param_1) {
|
||||
|
|
|
|||
|
|
@ -47,24 +47,23 @@ public:
|
|||
|
||||
J3DMaterial() { initialize(); }
|
||||
~J3DMaterial() {}
|
||||
J3DMaterial* getNext() const { return mNext; }
|
||||
J3DShape* getShape() const { return mShape; }
|
||||
J3DTevBlock* getTevBlock() const { return mTevBlock; }
|
||||
J3DColorBlock* getColorBlock() const { return mColorBlock; }
|
||||
J3DTexGenBlock* getTexGenBlock() const { return mTexGenBlock; }
|
||||
J3DDisplayListObj* getSharedDisplayListObj() { return mSharedDLObj; }
|
||||
J3DIndBlock* getIndBlock() const { return mIndBlock; }
|
||||
J3DMaterial* getNext() { return mNext; }
|
||||
J3DShape* getShape() { return mShape; }
|
||||
J3DTevBlock* getTevBlock() { return mTevBlock; }
|
||||
J3DColorBlock* getColorBlock() { return mColorBlock; }
|
||||
J3DTexGenBlock* getTexGenBlock() { return mTexGenBlock; }
|
||||
J3DDisplayListObj* getSharedDisplayListObj() { return mSharedDLObj; }
|
||||
J3DIndBlock* getIndBlock() { return mIndBlock; }
|
||||
J3DJoint* getJoint() { return mJoint; }
|
||||
J3DMaterialAnm* getMaterialAnm() const {
|
||||
J3DMaterialAnm* getMaterialAnm() {
|
||||
if ((u32)mMaterialAnm < 0xC0000000) {
|
||||
return mMaterialAnm;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
J3DNBTScale* getNBTScale() const { return mTexGenBlock->getNBTScale(); }
|
||||
u16 getTexNo(u32 idx) const { return mTevBlock->getTexNo(idx); }
|
||||
J3DNBTScale* getNBTScale() { return mTexGenBlock->getNBTScale(); }
|
||||
u16 getTexNo(u32 idx) { return mTevBlock->getTexNo(idx); }
|
||||
J3DGXColor* getTevKColor(u32 param_0) { return mTevBlock->getTevKColor(param_0); }
|
||||
J3DGXColorS10* getTevColor(u32 param_0) { return mTevBlock->getTevColor(param_0); }
|
||||
J3DFog* getFog() { return mPEBlock->getFog(); }
|
||||
|
|
|
|||
|
|
@ -91,10 +91,10 @@ struct J3DTexCoord : public J3DTexCoordInfo {
|
|||
__memcpy(this, &info, sizeof(J3DTexCoordInfo));
|
||||
}
|
||||
|
||||
u8 getTexGenType() { return mTexGenType; }
|
||||
u8 getTexGenSrc() { return mTexGenSrc; }
|
||||
u8 getTexGenMtx() { return mTexGenMtx & 0xff; }
|
||||
u16 getTexMtxReg() { return mTexMtxReg & 0xff; }
|
||||
u8 getTexGenType() const { return mTexGenType; }
|
||||
u8 getTexGenSrc() const { return mTexGenSrc; }
|
||||
u8 getTexGenMtx() const { return mTexGenMtx; }
|
||||
u16 getTexMtxReg() const { return mTexMtxReg & 0xff; }
|
||||
void setTexGenMtx(u8 param_1) { mTexGenMtx = param_1; }
|
||||
void setTexMtxReg(u16 reg) { mTexMtxReg = reg; }
|
||||
J3DTexCoord& operator=(const J3DTexCoord& other) {
|
||||
|
|
|
|||
|
|
@ -143,11 +143,6 @@ public:
|
|||
u16 getMaterialID(int idx) const { return mpMaterialID[idx]; }
|
||||
u8 getMaterialMode(int idx) const { return mpMaterialInitData[mpMaterialID[idx]].mMaterialMode; }
|
||||
|
||||
static int getMdlDataFlag_TevStageNum(u32 flags) { return (flags >> 0x10) & 0x1f; }
|
||||
static int getMdlDataFlag_TexGenFlag(u32 flags) { return flags & 0x0c000000; }
|
||||
static u32 getMdlDataFlag_ColorFlag(u32 flags) { return flags & 0xc0000000; }
|
||||
static u32 getMdlDataFlag_PEFlag(u32 flags) { return flags & 0x30000000; }
|
||||
|
||||
/* 0x00 */ u16 mMaterialNum;
|
||||
/* 0x04 */ J3DMaterialInitData* mpMaterialInitData;
|
||||
/* 0x08 */ u16* mpMaterialID;
|
||||
|
|
|
|||
|
|
@ -80,11 +80,6 @@ public:
|
|||
u16 getMaterialID(u16 idx) { return mpMaterialID[idx]; }
|
||||
u8 getMaterialMode(int idx) const { return mpMaterialInitData[mpMaterialID[idx]].mMaterialMode; }
|
||||
|
||||
static int getMdlDataFlag_TevStageNum(u32 flags) { return (flags >> 0x10) & 0x1f; }
|
||||
static int getMdlDataFlag_TexGenFlag(u32 flags) { return flags & 0x0c000000; }
|
||||
static u32 getMdlDataFlag_ColorFlag(u32 flags) { return flags & 0xc0000000; }
|
||||
static u32 getMdlDataFlag_PEFlag(u32 flags) { return flags & 0x30000000; }
|
||||
|
||||
/* 0x00 */ u16 mMaterialNum;
|
||||
/* 0x04 */ J3DMaterialInitData_v21* mpMaterialInitData;
|
||||
/* 0x08 */ u16* mpMaterialID;
|
||||
|
|
|
|||
|
|
@ -239,6 +239,12 @@ enum J3DModelLoaderFlagTypes {
|
|||
J3DMLF_Material_Color_AmbientOn = 0x80000000
|
||||
};
|
||||
|
||||
static inline u32 getMdlDataFlag_TevStageNum(u32 flags) { return (flags >> 0x10) & 0x1f; }
|
||||
static inline u32 getMdlDataFlag_TexGenFlag(u32 flags) { return flags & 0x0c000000; }
|
||||
static inline u32 getMdlDataFlag_ColorFlag(u32 flags) { return flags & 0xc0000000; }
|
||||
static inline u32 getMdlDataFlag_PEFlag(u32 flags) { return flags & 0x30000000; }
|
||||
static inline u32 getMdlDataFlag_MtxLoadType(u32 flags) { return flags & 0x10; }
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
|
|
|||
|
|
@ -229,4 +229,15 @@ namespace JMathInlineVEC {
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline T JMAMax(T param_0, T param_1) {
|
||||
T ret;
|
||||
if (param_0 > param_1) {
|
||||
ret = param_0;
|
||||
} else {
|
||||
ret = param_1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* JMATH_H */
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public:
|
|||
TIDData(const void* id, u32 id_size) : mID(id), mID_size(id_size) {}
|
||||
|
||||
/* 80288988 */ static bool isEqual(JStudio::object::TIDData const&, JStudio::object::TIDData const&);
|
||||
inline const void* getID() const { return mID; }
|
||||
inline const u8* getID() const { return (const u8*)mID; }
|
||||
inline u32 getIDSize() const { return mID_size; }
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
#define JUT_ASSERT(LINE, COND) \
|
||||
(COND) ? (void)0 : (JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND), OSPanic(__FILE__, LINE, "Halt"));
|
||||
|
||||
#define JUT_ASSERT_MSG(LINE, COND, MSG) \
|
||||
(COND) ? (void)0 : (JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, MSG), OSPanic(__FILE__, LINE, "Halt"));
|
||||
|
||||
#define JUT_PANIC(LINE, TEXT) \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, TEXT); \
|
||||
OSPanic(__FILE__, LINE, "Halt");
|
||||
|
|
@ -22,6 +25,7 @@
|
|||
|
||||
#else
|
||||
#define JUT_ASSERT(...) (void)0;
|
||||
#define JUT_ASSERT_MSG(...) (void)0;
|
||||
#define JUT_PANIC(...)
|
||||
#define JUT_WARN(...)
|
||||
#define JUT_LOG(...)
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public:
|
|||
/* 80051ADC */ void setScissor(f32, f32, f32, f32);
|
||||
|
||||
void setCameraID(int id) { mCameraID = id; }
|
||||
s8 getCameraID() { return mCameraID; }
|
||||
int getCameraID() { return mCameraID; }
|
||||
void setMode(int mode) { mMode = mode; }
|
||||
view_port_class* getViewPort() { return &mViewport; }
|
||||
scissor_class* getScissor() { return &mViewport.scissor; }
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
/* 80326214-80326258 320B54 0044+00 0/0 1/1 0/0 .text initialize__12J3DMtxBufferFv */
|
||||
|
|
@ -31,10 +32,6 @@ enum {
|
|||
J3DMdlDataFlag_NoAnimation = 0x100,
|
||||
};
|
||||
|
||||
static inline u32 getMdlDataFlag_MtxLoadType(u32 flag) {
|
||||
return flag & 0x10;
|
||||
}
|
||||
|
||||
s32 J3DMtxBuffer::create(J3DModelData* p_modelData, u32 flag) {
|
||||
s32 ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,286 +5,11 @@
|
|||
|
||||
#include "JSystem/J3DGraphLoader/J3DMaterialFactory.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__18J3DMaterialFactoryFRC16J3DMaterialBlock();
|
||||
extern "C" void __ct__18J3DMaterialFactoryFRC18J3DMaterialDLBlock();
|
||||
extern "C" void countUniqueMaterials__18J3DMaterialFactoryFv();
|
||||
extern "C" void countTexGens__18J3DMaterialFactoryCFi();
|
||||
extern "C" void countStages__18J3DMaterialFactoryCFi();
|
||||
extern "C" void
|
||||
create__18J3DMaterialFactoryCFP11J3DMaterialQ218J3DMaterialFactory12MaterialTypeiUl();
|
||||
extern "C" void createNormalMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void createPatchedMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void modifyPatchedCurrentMtx__18J3DMaterialFactoryCFP11J3DMateriali();
|
||||
extern "C" void createLockedMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void
|
||||
calcSize__18J3DMaterialFactoryCFP11J3DMaterialQ218J3DMaterialFactory12MaterialTypeiUl();
|
||||
extern "C" void calcSizeNormalMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void calcSizePatchedMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void calcSizeLockedMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl();
|
||||
extern "C" void newMatColor__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newColorChanNum__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newColorChan__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newAmbColor__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTexGenNum__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newTexCoord__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTexMtx__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newCullMode__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newTexNo__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTevOrder__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTevColor__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTevKColor__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTevStageNum__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newTevStage__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newTevSwapModeTable__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newIndTexStageNum__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newIndTexOrder__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newIndTexMtx__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newIndTevStage__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newIndTexCoordScale__18J3DMaterialFactoryCFii();
|
||||
extern "C" void newFog__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newAlphaComp__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newBlend__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newZMode__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newZCompLoc__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newDither__18J3DMaterialFactoryCFi();
|
||||
extern "C" void newNBTScale__18J3DMaterialFactoryCFi();
|
||||
extern "C" void load__14J3DPEBlockNullFv();
|
||||
extern "C" void getType__14J3DPEBlockNullFv();
|
||||
extern "C" void __dt__14J3DPEBlockNullFv();
|
||||
extern "C" void reset__15J3DTevBlockNullFP11J3DTevBlock();
|
||||
extern "C" void ptrToIndex__15J3DTevBlockNullFv();
|
||||
extern "C" void indexToPtr__15J3DTevBlockNullFv();
|
||||
extern "C" void getType__15J3DTevBlockNullFv();
|
||||
extern "C" void __dt__15J3DTevBlockNullFv();
|
||||
extern "C" void calc__18J3DTexGenBlockNullFPA4_Cf();
|
||||
extern "C" void calcWithoutViewMtx__18J3DTexGenBlockNullFPA4_Cf();
|
||||
extern "C" void calcPostTexMtx__18J3DTexGenBlockNullFPA4_Cf();
|
||||
extern "C" void calcPostTexMtxWithoutViewMtx__18J3DTexGenBlockNullFPA4_Cf();
|
||||
extern "C" void load__18J3DTexGenBlockNullFv();
|
||||
extern "C" void patch__18J3DTexGenBlockNullFv();
|
||||
extern "C" void diff__18J3DTexGenBlockNullFUl();
|
||||
extern "C" void diffTexMtx__18J3DTexGenBlockNullFv();
|
||||
extern "C" void diffTexGen__18J3DTexGenBlockNullFv();
|
||||
extern "C" void getType__18J3DTexGenBlockNullFv();
|
||||
extern "C" void __dt__18J3DTexGenBlockNullFv();
|
||||
extern "C" void getType__17J3DColorBlockNullFv();
|
||||
extern "C" void __dt__17J3DColorBlockNullFv();
|
||||
extern "C" void __dt__11J3DMaterialFv();
|
||||
extern "C" void func_80332BDC(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332BF4(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C0C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C24(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C3C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C54(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C6C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C84(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332C9C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332CB4(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332CCC(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332CE4(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332CFC(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D14(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D2C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D44(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D5C(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D74(void* _this, void const*, void const*);
|
||||
extern "C" void func_80332D8C(void* _this, void const*, void const*);
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void patchTexNoAndTexCoordScale__11J3DTevBlockFv();
|
||||
extern "C" void patch__10J3DPEBlockFv();
|
||||
extern "C" void patchLight__13J3DColorBlockFv();
|
||||
extern "C" void patch__11J3DTevBlockFv();
|
||||
extern "C" bool getZCompLoc__10J3DPEBlockCFv();
|
||||
extern "C" bool getZMode__10J3DPEBlockFv();
|
||||
extern "C" bool getBlend__10J3DPEBlockFv();
|
||||
extern "C" bool getAlphaComp__10J3DPEBlockFv();
|
||||
extern "C" bool getFog__10J3DPEBlockFv();
|
||||
extern "C" bool getIndTevStage__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevStage__11J3DTevBlockFUl();
|
||||
extern "C" void getTexNo__11J3DTevBlockCFUl();
|
||||
extern "C" bool getTevSwapModeTable__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevKAlphaSel__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevKColorSel__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevOrder__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevKColor__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevColor__11J3DTevBlockFUl();
|
||||
extern "C" bool getTevStageNum__11J3DTevBlockCFv();
|
||||
extern "C" bool getTexMtx__14J3DTexGenBlockFUl();
|
||||
extern "C" bool getTexCoord__14J3DTexGenBlockFUl();
|
||||
extern "C" bool getTexGenNum__14J3DTexGenBlockCFv();
|
||||
extern "C" bool getAmbColor__13J3DColorBlockFUl();
|
||||
extern "C" bool getColorChan__13J3DColorBlockFUl();
|
||||
extern "C" bool getMatColor__13J3DColorBlockFUl();
|
||||
extern "C" bool getColorChanNum__13J3DColorBlockCFv();
|
||||
extern "C" void setZCompLoc__10J3DPEBlockFUc();
|
||||
extern "C" void setZMode__10J3DPEBlockF8J3DZMode();
|
||||
extern "C" void setBlend__10J3DPEBlockFRC8J3DBlend();
|
||||
extern "C" void setAlphaComp__10J3DPEBlockFRC12J3DAlphaComp();
|
||||
extern "C" void setIndTevStage__11J3DTevBlockFUl14J3DIndTevStage();
|
||||
extern "C" void setTevStage__11J3DTevBlockFUl11J3DTevStage();
|
||||
extern "C" void setTexNo__11J3DTevBlockFUlUs();
|
||||
extern "C" void setTevSwapModeTable__11J3DTevBlockFUl19J3DTevSwapModeTable();
|
||||
extern "C" void setTevKAlphaSel__11J3DTevBlockFUlUc();
|
||||
extern "C" void setTevKColorSel__11J3DTevBlockFUlUc();
|
||||
extern "C" void setTevOrder__11J3DTevBlockFUl11J3DTevOrder();
|
||||
extern "C" void setTevKColor__11J3DTevBlockFUl10J3DGXColor();
|
||||
extern "C" void setTevColor__11J3DTevBlockFUl13J3DGXColorS10();
|
||||
extern "C" void setTevStageNum__11J3DTevBlockFUc();
|
||||
extern "C" void setTexCoord__14J3DTexGenBlockFUlPC11J3DTexCoord();
|
||||
extern "C" void setTexGenNum__14J3DTexGenBlockFUl();
|
||||
extern "C" void setAmbColor__13J3DColorBlockFUl10J3DGXColor();
|
||||
extern "C" void setColorChan__13J3DColorBlockFUlRC12J3DColorChan();
|
||||
extern "C" void setMatColor__13J3DColorBlockFUl10J3DGXColor();
|
||||
extern "C" void setColorChanNum__13J3DColorBlockFUc();
|
||||
extern "C" void __ct__11J3DTevOrderFv();
|
||||
extern "C" void __ct__14J3DIndTevStageFv();
|
||||
extern "C" void __ct__11J3DTevStageFv();
|
||||
extern "C" void __ct__13J3DGXColorS10Fv();
|
||||
extern "C" void __ct__11J3DTexCoordFv();
|
||||
extern "C" void __ct__10J3DGXColorFv();
|
||||
extern "C" void __ct__11J3DTevStageFRC15J3DTevStageInfo();
|
||||
extern "C" void setTexMtx__14J3DTexGenBlockFUlP9J3DTexMtx();
|
||||
extern "C" void setTevKColor__11J3DTevBlockFUlPC10J3DGXColor();
|
||||
extern "C" void setTevColor__11J3DTevBlockFUlPC13J3DGXColorS10();
|
||||
extern "C" void setLight__13J3DColorBlockFUlP11J3DLightObj();
|
||||
extern "C" void setAmbColor__13J3DColorBlockFUlPC10J3DGXColor();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" GXColorS10* func_802F41E8(void const*, void const*);
|
||||
extern "C" u8* func_802F4260(void const*, void const*);
|
||||
extern "C" GXColor* func_802F4278(void const*, void const*);
|
||||
extern "C" GXCullMode* func_802F4290(void const*, void const*);
|
||||
extern "C" u16* func_802F42C0(void const*, void const*);
|
||||
extern "C" void setSingleDisplayList__17J3DDisplayListObjFPvUl();
|
||||
extern "C" void createColorBlock__11J3DMaterialFUl();
|
||||
extern "C" void createTexGenBlock__11J3DMaterialFUl();
|
||||
extern "C" void createTevBlock__11J3DMaterialFi();
|
||||
extern "C" void createIndBlock__11J3DMaterialFi();
|
||||
extern "C" void createPEBlock__11J3DMaterialFUlUl();
|
||||
extern "C" void calcSizeColorBlock__11J3DMaterialFUl();
|
||||
extern "C" void calcSizeTexGenBlock__11J3DMaterialFUl();
|
||||
extern "C" void calcSizeTevBlock__11J3DMaterialFi();
|
||||
extern "C" void calcSizeIndBlock__11J3DMaterialFi();
|
||||
extern "C" void calcSizePEBlock__11J3DMaterialFUlUl();
|
||||
extern "C" void initialize__11J3DMaterialFv();
|
||||
extern "C" void initialize__18J3DPatchedMaterialFv();
|
||||
extern "C" void initialize__17J3DLockedMaterialFv();
|
||||
extern "C" bool countDLSize__14J3DTexGenBlockFv();
|
||||
extern "C" bool countDLSize__13J3DColorBlockFv();
|
||||
extern "C" bool countDLSize__11J3DTevBlockFv();
|
||||
extern "C" bool countDLSize__10J3DPEBlockFv();
|
||||
extern "C" void load__13J3DColorBlockFv();
|
||||
extern "C" s32 getCullMode__13J3DColorBlockCFv();
|
||||
extern "C" void load__11J3DTevBlockFv();
|
||||
extern "C" bool getNBTScale__14J3DTexGenBlockFv();
|
||||
extern "C" void patch__13J3DColorBlockFv();
|
||||
extern "C" void diff__13J3DColorBlockFUl();
|
||||
extern "C" void diff__10J3DPEBlockFUl();
|
||||
extern "C" void reset__10J3DPEBlockFP10J3DPEBlock();
|
||||
extern "C" void reset__14J3DTexGenBlockFP14J3DTexGenBlock();
|
||||
extern "C" void reset__13J3DColorBlockFP13J3DColorBlock();
|
||||
extern "C" void diffFog__10J3DPEBlockFv();
|
||||
extern "C" void diffBlend__10J3DPEBlockFv();
|
||||
extern "C" void setFog__10J3DPEBlockFP6J3DFog();
|
||||
extern "C" void setFog__10J3DPEBlockF6J3DFog();
|
||||
extern "C" void setAlphaComp__10J3DPEBlockFPC12J3DAlphaComp();
|
||||
extern "C" void setBlend__10J3DPEBlockFPC8J3DBlend();
|
||||
extern "C" void setZMode__10J3DPEBlockFPC8J3DZMode();
|
||||
extern "C" void setZCompLoc__10J3DPEBlockFPCUc();
|
||||
extern "C" void setDither__10J3DPEBlockFUc();
|
||||
extern "C" void setDither__10J3DPEBlockFPCUc();
|
||||
extern "C" bool getDither__10J3DPEBlockCFv();
|
||||
extern "C" bool getFogOffset__10J3DPEBlockCFv();
|
||||
extern "C" void setFogOffset__10J3DPEBlockFUl();
|
||||
extern "C" void setTexGenNum__14J3DTexGenBlockFPCUl();
|
||||
extern "C" void setNBTScale__14J3DTexGenBlockF11J3DNBTScale();
|
||||
extern "C" void setNBTScale__14J3DTexGenBlockFPC11J3DNBTScale();
|
||||
extern "C" bool getTexMtxOffset__14J3DTexGenBlockCFv();
|
||||
extern "C" void setTexMtxOffset__14J3DTexGenBlockFUl();
|
||||
extern "C" void patchMatColor__13J3DColorBlockFv();
|
||||
extern "C" void diffAmbColor__13J3DColorBlockFv();
|
||||
extern "C" void diffMatColor__13J3DColorBlockFv();
|
||||
extern "C" void diffColorChan__13J3DColorBlockFv();
|
||||
extern "C" void diffLightObj__13J3DColorBlockFUl();
|
||||
extern "C" void setMatColor__13J3DColorBlockFUlPC10J3DGXColor();
|
||||
extern "C" void setColorChanNum__13J3DColorBlockFPCUc();
|
||||
extern "C" void setColorChan__13J3DColorBlockFUlPC12J3DColorChan();
|
||||
extern "C" bool getLight__13J3DColorBlockFUl();
|
||||
extern "C" void setCullMode__13J3DColorBlockFUc();
|
||||
extern "C" void setCullMode__13J3DColorBlockFPCUc();
|
||||
extern "C" u32 getMatColorOffset__13J3DColorBlockCFv();
|
||||
extern "C" bool getColorChanOffset__13J3DColorBlockCFv();
|
||||
extern "C" void setMatColorOffset__13J3DColorBlockFUl();
|
||||
extern "C" void setColorChanOffset__13J3DColorBlockFUl();
|
||||
extern "C" void initialize__21J3DTexGenBlockPatchedFv();
|
||||
extern "C" void initialize__15J3DTevBlockNullFv();
|
||||
extern "C" void initialize__18J3DTevBlockPatchedFv();
|
||||
extern "C" void diff__11J3DTevBlockFUl();
|
||||
extern "C" void indexToPtr_private__11J3DTevBlockFUl();
|
||||
extern "C" void diffTevReg__11J3DTevBlockFv();
|
||||
extern "C" void diffTevStageIndirect__11J3DTevBlockFv();
|
||||
extern "C" void diffTevStage__11J3DTevBlockFv();
|
||||
extern "C" void diffTexCoordScale__11J3DTevBlockFv();
|
||||
extern "C" void diffTexNo__11J3DTevBlockFv();
|
||||
extern "C" void setTexNoOffset__11J3DTevBlockFUl();
|
||||
extern "C" void setTevKColorSel__11J3DTevBlockFUlPCUc();
|
||||
extern "C" void setTevKAlphaSel__11J3DTevBlockFUlPCUc();
|
||||
extern "C" void setTevSwapModeInfo__11J3DTevBlockFUl18J3DTevSwapModeInfo();
|
||||
extern "C" void setTevSwapModeInfo__11J3DTevBlockFUlPC18J3DTevSwapModeInfo();
|
||||
extern "C" void setTevSwapModeTable__11J3DTevBlockFUlPC19J3DTevSwapModeTable();
|
||||
extern "C" bool getTevRegOffset__11J3DTevBlockCFv();
|
||||
extern "C" void setTevRegOffset__11J3DTevBlockFUl();
|
||||
extern "C" void patchTexNo__11J3DTevBlockFv();
|
||||
extern "C" void patchTevReg__11J3DTevBlockFv();
|
||||
extern "C" void setTexNo__11J3DTevBlockFUlPCUs();
|
||||
extern "C" void setTevOrder__11J3DTevBlockFUlPC11J3DTevOrder();
|
||||
extern "C" void setTevStageNum__11J3DTevBlockFPCUc();
|
||||
extern "C" void setTevStage__11J3DTevBlockFUlPC11J3DTevStage();
|
||||
extern "C" void setIndTevStage__11J3DTevBlockFUlPC14J3DIndTevStage();
|
||||
extern "C" u32 getTexNoOffset__11J3DTevBlockCFv();
|
||||
extern "C" void __as__13J3DTexMtxInfoFRC13J3DTexMtxInfo();
|
||||
extern "C" void __as__16J3DIndTexMtxInfoFRC16J3DIndTexMtxInfo();
|
||||
extern "C" void __as__10J3DFogInfoFRC10J3DFogInfo();
|
||||
extern "C" void __construct_array();
|
||||
extern "C" void _savegpr_18();
|
||||
extern "C" void _savegpr_19();
|
||||
extern "C" void _savegpr_24();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_18();
|
||||
extern "C" void _restgpr_19();
|
||||
extern "C" void _restgpr_24();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* __vt__17J3DLockedMaterial[12];
|
||||
extern "C" extern void* __vt__18J3DPatchedMaterial[12];
|
||||
extern "C" extern void* __vt__11J3DMaterial[12];
|
||||
extern "C" extern void* __vt__10J3DPEBlock[31];
|
||||
extern "C" extern void* __vt__15J3DIndBlockNull[19];
|
||||
extern "C" extern void* __vt__11J3DIndBlock[19];
|
||||
extern "C" extern void* __vt__14J3DTexGenBlock[27];
|
||||
extern "C" extern void* __vt__13J3DColorBlock[36];
|
||||
extern "C" extern void* __vt__18J3DTevBlockPatched[55];
|
||||
extern "C" extern void* __vt__21J3DTexGenBlockPatched[27];
|
||||
extern "C" extern void* __vt__11J3DTevBlock[55];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 8032FFEC-80330234 32A92C 0248+00 0/0 7/7 0/0 .text
|
||||
* __ct__18J3DMaterialFactoryFRC16J3DMaterialBlock */
|
||||
J3DMaterialFactory::J3DMaterialFactory(J3DMaterialBlock const& i_block) {
|
||||
|
|
@ -406,31 +131,28 @@ J3DMaterial* J3DMaterialFactory::create(J3DMaterial* i_material, MaterialType i_
|
|||
|
||||
/* 80330440-80330D84 32AD80 0944+00 1/1 0/0 0/0 .text
|
||||
* createNormalMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl */
|
||||
// NONMATCHING. The call to setFog does not match because it uses the version that takes a J3DFog.
|
||||
// If we switch to the version that takes a J3DFog* that part matches, except the vtable index is wrong.
|
||||
// Also regalloc issues
|
||||
J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, int i_idx,
|
||||
u32 i_flags) const {
|
||||
if (mpDisplayListInit != NULL) {
|
||||
return createLockedMaterial(i_material, i_idx, i_flags);
|
||||
}
|
||||
u32 stages = countStages(i_idx);
|
||||
|
||||
const u32 stages = countStages(i_idx);
|
||||
u32 tev_stage_num = getMdlDataFlag_TevStageNum(i_flags);
|
||||
if (stages > tev_stage_num) {
|
||||
tev_stage_num = stages;
|
||||
}
|
||||
u32 u1 = tev_stage_num <= 8 ? tev_stage_num : 8;
|
||||
u32 tev_stage_num_max = JMAMax(stages, tev_stage_num);
|
||||
u32 tex_num = tev_stage_num_max > 8 ? 8 : tev_stage_num_max;
|
||||
u32 texgens = countTexGens(i_idx);
|
||||
u32 texgen_flag = texgens > 4 ? 0 : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 texgen_flag = texgens > 4 ? getMdlDataFlag_TexGenFlag(0) : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 color_flag = getMdlDataFlag_ColorFlag(i_flags);
|
||||
u32 pe_flag = getMdlDataFlag_PEFlag(i_flags);
|
||||
bool ind_flag = (i_flags & 0x1000000) != 0;
|
||||
BOOL ind_flag = (i_flags & 0x1000000) ? TRUE : FALSE;
|
||||
if (i_material == NULL) {
|
||||
i_material = new J3DMaterial();
|
||||
JUT_ASSERT_MSG(269, i_material, "Error : allocate memory.");
|
||||
}
|
||||
i_material->mColorBlock = J3DMaterial::createColorBlock(color_flag);
|
||||
i_material->mTexGenBlock = J3DMaterial::createTexGenBlock(texgen_flag);
|
||||
i_material->mTevBlock = J3DMaterial::createTevBlock((u16)tev_stage_num);
|
||||
i_material->mTevBlock = J3DMaterial::createTevBlock((u16)tev_stage_num_max);
|
||||
i_material->mIndBlock = J3DMaterial::createIndBlock(ind_flag);
|
||||
i_material->mPEBlock = J3DMaterial::createPEBlock(pe_flag, getMaterialMode(i_idx));
|
||||
i_material->mIndex = i_idx;
|
||||
|
|
@ -439,20 +161,20 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
|||
i_material->mColorBlock->setCullMode(newCullMode(i_idx));
|
||||
i_material->mTexGenBlock->setTexGenNum(newTexGenNum(i_idx));
|
||||
i_material->mTexGenBlock->setNBTScale(newNBTScale(i_idx));
|
||||
i_material->mPEBlock->setFog(&newFog(i_idx));
|
||||
i_material->mPEBlock->setFog(newFog(i_idx));
|
||||
i_material->mPEBlock->setAlphaComp(newAlphaComp(i_idx));
|
||||
i_material->mPEBlock->setBlend(newBlend(i_idx));
|
||||
i_material->mPEBlock->setZMode(newZMode(i_idx));
|
||||
i_material->mPEBlock->setZCompLoc(newZCompLoc(i_idx));
|
||||
i_material->mPEBlock->setDither(newDither(i_idx));
|
||||
i_material->mTevBlock->setTevStageNum(newTevStageNum(i_idx));
|
||||
for (u8 i = 0; i < u1; i++) {
|
||||
for (u8 i = 0; i < tex_num; i++) {
|
||||
i_material->mTevBlock->setTexNo(i, newTexNo(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
i_material->mTevBlock->setTevOrder(i, newTevOrder(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
i_material->mTevBlock->setTevStage(i, newTevStage(i_idx, i));
|
||||
if (material_init_data->mTevSwapModeIdx[i] != 0xffff) {
|
||||
|
|
@ -489,14 +211,14 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
|||
i_material->mTexGenBlock->setTexMtx(i, newTexMtx(i_idx, i));
|
||||
}
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
if (material_init_data->mTevKColorSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKColorSel(i, material_init_data->mTevKColorSel[i]);
|
||||
} else {
|
||||
i_material->mTevBlock->setTevKColorSel(i, 0xc);
|
||||
}
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
if (material_init_data->mTevKAlphaSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKAlphaSel(i, material_init_data->mTevKAlphaSel[i]);
|
||||
} else {
|
||||
|
|
@ -515,7 +237,7 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
|||
for (u8 i = 0; i < ind_tex_stage_num; i++) {
|
||||
i_material->mIndBlock->setIndTexCoordScale(i, &newIndTexCoordScale(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
i_material->mTevBlock->setIndTevStage(i, newIndTevStage(i_idx, i));
|
||||
}
|
||||
}
|
||||
|
|
@ -524,16 +246,18 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
|||
|
||||
/* 80330D84-8033168C 32B6C4 0908+00 1/1 0/0 0/0 .text
|
||||
* createPatchedMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl */
|
||||
// NONMATCHING same fog problem as createNormalMaterial
|
||||
J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material, int i_idx,
|
||||
u32 i_flags) const {
|
||||
if (i_material == NULL) {
|
||||
i_material = new J3DPatchedMaterial();
|
||||
JUT_ASSERT_MSG(430, i_material, "Error : allocate memory.");
|
||||
}
|
||||
bool bVar1 = i_flags & 0x3000000 ? true : false;
|
||||
i_material->mColorBlock = J3DMaterial::createColorBlock(0x40000000);
|
||||
i_material->mTexGenBlock = new J3DTexGenBlockPatched();
|
||||
JUT_ASSERT_MSG(440, i_material->mTexGenBlock, "Error : allocate memory.");
|
||||
i_material->mTevBlock = new J3DTevBlockPatched();
|
||||
JUT_ASSERT_MSG(442, i_material->mTevBlock, "Error : allocate memory.");
|
||||
i_material->mIndBlock = J3DMaterial::createIndBlock(bVar1);
|
||||
i_material->mPEBlock = J3DMaterial::createPEBlock(0x10000000, getMaterialMode(i_idx));
|
||||
i_material->mIndex = i_idx;
|
||||
|
|
@ -541,13 +265,13 @@ J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material,
|
|||
i_material->mTevBlock->setTevStageNum(newTevStageNum(i_idx));
|
||||
i_material->mColorBlock->setColorChanNum(newColorChanNum(i_idx));
|
||||
i_material->mColorBlock->setCullMode(newCullMode(i_idx));
|
||||
i_material->mPEBlock->setFog(&newFog(i_idx));
|
||||
i_material->mPEBlock->setFog(newFog(i_idx));
|
||||
i_material->mPEBlock->setAlphaComp(newAlphaComp(i_idx));
|
||||
i_material->mPEBlock->setBlend(newBlend(i_idx));
|
||||
i_material->mPEBlock->setZMode(newZMode(i_idx));
|
||||
i_material->mPEBlock->setZCompLoc(newZCompLoc(i_idx));
|
||||
i_material->mPEBlock->setDither(newDither(i_idx));
|
||||
u8 tev_stage_num = i_material->getTevStageNum();
|
||||
u8 tev_stage_num = i_material->mTevBlock->getTevStageNum();
|
||||
for (u8 i = 0; i < 8; i++) {
|
||||
i_material->mTevBlock->setTexNo(i, newTexNo(i_idx, i));
|
||||
}
|
||||
|
|
@ -615,7 +339,6 @@ J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material,
|
|||
|
||||
/* 8033168C-803317D4 32BFCC 0148+00 0/0 1/1 0/0 .text
|
||||
* modifyPatchedCurrentMtx__18J3DMaterialFactoryCFP11J3DMateriali */
|
||||
// NONMATCHING problem with setCurrentTexMtx
|
||||
void J3DMaterialFactory::modifyPatchedCurrentMtx(J3DMaterial* i_material, int i_idx) const {
|
||||
J3DTexCoord coord[8];
|
||||
u32 tex_gens = countTexGens(i_idx);
|
||||
|
|
@ -689,7 +412,6 @@ u32 J3DMaterialFactory::calcSize(J3DMaterial* i_material, J3DMaterialFactory::Ma
|
|||
|
||||
/* 80331AFC-80331C30 32C43C 0134+00 1/1 0/0 0/0 .text
|
||||
* calcSizeNormalMaterial__18J3DMaterialFactoryCFP11J3DMaterialiUl */
|
||||
// NONMATCHING regalloc
|
||||
u32 J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial* i_material, int i_idx,
|
||||
u32 i_flags) const {
|
||||
u32 size = 0;
|
||||
|
|
@ -697,27 +419,25 @@ u32 J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial* i_material, int i_id
|
|||
return calcSizeLockedMaterial(i_material, i_idx, i_flags);
|
||||
}
|
||||
|
||||
u32 stages = countStages(i_idx);
|
||||
const u32 stages = countStages(i_idx);
|
||||
u32 tev_stage_num = getMdlDataFlag_TevStageNum(i_flags);
|
||||
if (stages > tev_stage_num) {
|
||||
tev_stage_num = stages;
|
||||
}
|
||||
u32 tev_stage_num_max = JMAMax(stages, tev_stage_num);
|
||||
u32 tex_num = tev_stage_num_max > 8 ? 8 : tev_stage_num_max;
|
||||
u32 tex_gens = countTexGens(i_idx);
|
||||
u32 tex_gen_flag = tex_gens > 4 ?
|
||||
getMdlDataFlag_TexGenFlag(0) : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 tex_gen_flag = tex_gens > 4 ? getMdlDataFlag_TexGenFlag(0) : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 color_block_flag = getMdlDataFlag_ColorFlag(i_flags);
|
||||
u32 pe_flag = getMdlDataFlag_PEFlag(i_flags);
|
||||
u32 ind_flag = (i_flags >> 0x18) & 1;
|
||||
BOOL ind_flag = (i_flags & 0x1000000) ? TRUE : FALSE;
|
||||
if (i_material == NULL) {
|
||||
size = sizeof(J3DMaterial);
|
||||
size += sizeof(J3DMaterial);
|
||||
}
|
||||
size += J3DMaterial::calcSizeColorBlock(color_block_flag);
|
||||
size += J3DMaterial::calcSizeTexGenBlock(tex_gen_flag);
|
||||
size += J3DMaterial::calcSizeTevBlock((u16)tev_stage_num);
|
||||
size += J3DMaterial::calcSizeTevBlock((u16)tev_stage_num_max);
|
||||
size += J3DMaterial::calcSizeIndBlock(ind_flag);
|
||||
size += J3DMaterial::calcSizePEBlock(pe_flag, getMaterialMode(i_idx));
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
for (int i = 0; i < 8; i++) {
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (init_data->mTexMtxIdx[i] != 0xffff) {
|
||||
size += sizeof(J3DTexMtx);
|
||||
}
|
||||
|
|
@ -784,11 +504,11 @@ u8 J3DMaterialFactory::newColorChanNum(int i_idx) const {
|
|||
}
|
||||
|
||||
/* 80331DAC-80331F50 32C6EC 01A4+00 2/2 0/0 0/0 .text newColorChan__18J3DMaterialFactoryCFii */
|
||||
// NONMATCHING problem with J3DColorChan inline constructor
|
||||
J3DColorChan J3DMaterialFactory::newColorChan(int i_idx, int i_no) const {
|
||||
u16 color_chan_index = mpMaterialInitData[mpMaterialID[i_idx]].mColorChanIdx[i_no];
|
||||
if (color_chan_index != 0xffff) {
|
||||
return J3DColorChan(mpColorChanInfo[color_chan_index]);
|
||||
u32 r29 = 0;
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
if (init_data->mColorChanIdx[i_no] != 0xffff) {
|
||||
return J3DColorChan(mpColorChanInfo[init_data->mColorChanIdx[i_no]]);
|
||||
} else {
|
||||
return J3DColorChan();
|
||||
}
|
||||
|
|
@ -991,7 +711,6 @@ J3DFog J3DMaterialFactory::newFog(int i_idx) const {
|
|||
}
|
||||
|
||||
/* 80332768-803327E8 32D0A8 0080+00 2/2 0/0 0/0 .text newAlphaComp__18J3DMaterialFactoryCFi */
|
||||
// NONMATCHING weird issue with calcAlphaCmpID, see J3DMatBlock.h
|
||||
J3DAlphaComp J3DMaterialFactory::newAlphaComp(int i_idx) const {
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
if (mtl_init_data->mAlphaCompIdx != 0xffff) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
//
|
||||
|
||||
#include "JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DMaterialFactory.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
|
||||
/* 80332DA4-80332F84 32D6E4 01E0+00 0/0 2/2 0/0 .text
|
||||
|
|
@ -83,25 +85,22 @@ u32 J3DMaterialFactory_v21::countStages(int i_idx) const {
|
|||
|
||||
/* 80333068-803337D8 32D9A8 0770+00 0/0 2/2 0/0 .text
|
||||
* create__22J3DMaterialFactory_v21CFP11J3DMaterialiUl */
|
||||
// NONMATCHINg same problems as J3DMaterialFactory::createNormalMaterial
|
||||
J3DMaterial* J3DMaterialFactory_v21::create(J3DMaterial* i_material, int i_idx, u32 i_flags) const {
|
||||
u32 stages = countStages(i_idx);
|
||||
const u32 stages = countStages(i_idx);
|
||||
u32 tev_stage_num = getMdlDataFlag_TevStageNum(i_flags);
|
||||
if (stages > tev_stage_num) {
|
||||
tev_stage_num = stages;
|
||||
}
|
||||
u32 u1 = tev_stage_num <= 8 ? tev_stage_num : 8;
|
||||
u32 tev_stage_num_max = JMAMax(stages, tev_stage_num);
|
||||
u32 tex_num = tev_stage_num_max > 8 ? 8 : tev_stage_num_max;
|
||||
u32 texgens = countTexGens(i_idx);
|
||||
u32 texgen_flag = texgens > 4 ? 0 : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 texgen_flag = texgens > 4 ? getMdlDataFlag_TexGenFlag(0) : getMdlDataFlag_TexGenFlag(i_flags);
|
||||
u32 color_flag = getMdlDataFlag_ColorFlag(i_flags);
|
||||
u32 pe_flag = getMdlDataFlag_PEFlag(i_flags);
|
||||
bool ind_flag = (i_flags & 0x1000000) != 0;
|
||||
BOOL ind_flag = (i_flags & 0x1000000) ? TRUE : FALSE;
|
||||
if (i_material == NULL) {
|
||||
i_material = new J3DMaterial();
|
||||
}
|
||||
i_material->mColorBlock = J3DMaterial::createColorBlock(color_flag);
|
||||
i_material->mTexGenBlock = J3DMaterial::createTexGenBlock(texgen_flag);
|
||||
i_material->mTevBlock = J3DMaterial::createTevBlock((u16)tev_stage_num);
|
||||
i_material->mTevBlock = J3DMaterial::createTevBlock((u16)tev_stage_num_max);
|
||||
i_material->mIndBlock = J3DMaterial::createIndBlock(ind_flag);
|
||||
i_material->mPEBlock = J3DMaterial::createPEBlock(pe_flag, getMaterialMode(i_idx));
|
||||
i_material->mIndex = i_idx;
|
||||
|
|
@ -110,20 +109,20 @@ J3DMaterial* J3DMaterialFactory_v21::create(J3DMaterial* i_material, int i_idx,
|
|||
i_material->mColorBlock->setCullMode(newCullMode(i_idx));
|
||||
i_material->mTexGenBlock->setTexGenNum(newTexGenNum(i_idx));
|
||||
i_material->mTexGenBlock->setNBTScale(newNBTScale(i_idx));
|
||||
i_material->mPEBlock->setFog(&newFog(i_idx));
|
||||
i_material->mPEBlock->setFog(newFog(i_idx));
|
||||
i_material->mPEBlock->setAlphaComp(newAlphaComp(i_idx));
|
||||
i_material->mPEBlock->setBlend(newBlend(i_idx));
|
||||
i_material->mPEBlock->setZMode(newZMode(i_idx));
|
||||
i_material->mPEBlock->setZCompLoc(newZCompLoc(i_idx));
|
||||
i_material->mPEBlock->setDither(newDither(i_idx));
|
||||
i_material->mTevBlock->setTevStageNum(newTevStageNum(i_idx));
|
||||
for (u8 i = 0; i < u1; i++) {
|
||||
for (u8 i = 0; i < tex_num; i++) {
|
||||
i_material->mTevBlock->setTexNo(i, newTexNo(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
i_material->mTevBlock->setTevOrder(i, newTevOrder(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
J3DMaterialInitData_v21* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
i_material->mTevBlock->setTevStage(i, newTevStage(i_idx, i));
|
||||
if (material_init_data->mTevSwapModeIdx[i] != 0xffff) {
|
||||
|
|
@ -157,14 +156,14 @@ J3DMaterial* J3DMaterialFactory_v21::create(J3DMaterial* i_material, int i_idx,
|
|||
i_material->mTexGenBlock->setTexMtx(i, newTexMtx(i_idx, i));
|
||||
}
|
||||
J3DMaterialInitData_v21* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
if (material_init_data->mTevKColorSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKColorSel(i, material_init_data->mTevKColorSel[i]);
|
||||
} else {
|
||||
i_material->mTevBlock->setTevKColorSel(i, 0xc);
|
||||
}
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
if (material_init_data->mTevKAlphaSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKAlphaSel(i, material_init_data->mTevKAlphaSel[i]);
|
||||
} else {
|
||||
|
|
@ -198,7 +197,6 @@ u8 J3DMaterialFactory_v21::newColorChanNum(int i_idx) const {
|
|||
|
||||
/* 8033386C-80333A10 32E1AC 01A4+00 1/1 0/0 0/0 .text newColorChan__22J3DMaterialFactory_v21CFii
|
||||
*/
|
||||
// NONMATCHING J3DColorChan ctor
|
||||
J3DColorChan J3DMaterialFactory_v21::newColorChan(int i_idx, int i_no) const {
|
||||
J3DMaterialInitData_v21* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
if (mtl_init_data->mColorChanIdx[i_no] != 0xffff) {
|
||||
|
|
@ -335,7 +333,6 @@ J3DFog J3DMaterialFactory_v21::newFog(int i_idx) const {
|
|||
}
|
||||
|
||||
/* 80333EE0-80333F60 32E820 0080+00 1/1 0/0 0/0 .text newAlphaComp__22J3DMaterialFactory_v21CFi */
|
||||
// NONMATCHING calcAlphaCmpID issue
|
||||
J3DAlphaComp J3DMaterialFactory_v21::newAlphaComp(int i_idx) const {
|
||||
J3DMaterialInitData_v21* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
if (mtl_init_data->mAlphaCompIdx != 0xffff) {
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ J3DShape* J3DShapeFactory::create(int no, u32 flag, GXVtxDescList* vtxDesc) {
|
|||
return shape;
|
||||
}
|
||||
|
||||
static inline u32 getMdlDataFlag_MtxLoadType(u32 flag) {
|
||||
return flag & 0x10;
|
||||
}
|
||||
|
||||
enum {
|
||||
J3DMdlDataFlag_ConcatView = 0x10,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,34 +3,36 @@
|
|||
//
|
||||
|
||||
#include "JSystem/JStudio/JStudio/object-id.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
/* 80288988-80288A78 2832C8 00F0+00 0/0 3/3 0/0 .text
|
||||
* isEqual__Q37JStudio6object7TIDDataFRCQ37JStudio6object7TIDDataRCQ37JStudio6object7TIDData */
|
||||
bool JStudio::object::TIDData::isEqual(JStudio::object::TIDData const& a,
|
||||
JStudio::object::TIDData const& b) {
|
||||
if (a.getIDSize() != b.getIDSize()) {
|
||||
u32 aSize = a.getIDSize();
|
||||
u32 bSize = b.getIDSize();
|
||||
if (aSize != bSize) {
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 bytesRemaining = a.mID_size;
|
||||
const void* aStr = a.getID();
|
||||
u32* aStr32 = (u32*)aStr;
|
||||
const void* bStr = b.getID();
|
||||
u32* bStr32 = (u32*)bStr;
|
||||
if (aStr == bStr) {
|
||||
const u8* aStr32 = a.getID();
|
||||
const u8* bStr32 = b.getID();
|
||||
if (aStr32 == bStr32) {
|
||||
// they point to the same id
|
||||
return true;
|
||||
}
|
||||
|
||||
for (bytesRemaining; bytesRemaining >= 4; bytesRemaining -= 4, aStr32++, bStr32++) {
|
||||
if (*aStr32 != *bStr32) {
|
||||
u32 u = aSize;
|
||||
for (; u >= 4; u -= 4, aStr32 += 4, bStr32 += 4) {
|
||||
if (*(u32*)aStr32 != *(u32*)bStr32) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
u8* aStrBytes = (u8*)aStr32;
|
||||
u8* bStrBytes = (u8*)bStr32;
|
||||
switch (bytesRemaining) {
|
||||
const u8* aStrBytes = aStr32;
|
||||
const u8* bStrBytes = bStr32;
|
||||
JUT_ASSERT(46, u<4);
|
||||
switch (u) {
|
||||
case 3:
|
||||
if (*aStrBytes != *bStrBytes) {
|
||||
return false;
|
||||
|
|
@ -50,4 +52,4 @@ bool JStudio::object::TIDData::isEqual(JStudio::object::TIDData const& a,
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6850,7 +6850,6 @@ static J3DAlphaCompInfo l_alphaCompInfo = {
|
|||
};
|
||||
|
||||
/* 801ACD24-801ADBBC 1A7664 0E98+00 0/0 0/0 7/7 .text dKy_bg_MAxx_proc__FPv */
|
||||
// NONMATCHING - `setAlphaCompInfo` is incorrect, and instruction in the wrong order at the start
|
||||
void dKy_bg_MAxx_proc(void* bg_model_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
J3DModel* model_p = (J3DModel*)bg_model_p;
|
||||
|
|
|
|||
|
|
@ -5285,7 +5285,7 @@ void dKyr_odour_move() {
|
|||
}
|
||||
|
||||
/* 8006BE0C-8006C790 06674C 0984+00 0/0 1/1 0/0 .text dKyr_odour_draw__FPA4_fPPUc */
|
||||
// NONMATCHING - regalloc and out of order instruction
|
||||
// NONMATCHING - regalloc
|
||||
void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
dScnKy_env_light_c* envlight = dKy_getEnvlight();
|
||||
dKankyo_odour_Packet* odour_packet = envlight->mpOdourPacket;
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@ static void addWarpMaterial(J3DModelData* i_modelData) {
|
|||
l_tevOrderInfo.mTexCoord = texGenNum;
|
||||
JUT_ASSERT(301, tevBlock->getTexNo(3) == 0xffff);
|
||||
tevBlock->setTexNo(3, textureNum);
|
||||
tevBlock->setTevOrder(tevStageNum, l_tevOrderInfo);
|
||||
tevBlock->setTevStage(tevStageNum, l_tevStageInfo);
|
||||
tevBlock->setTevOrder(tevStageNum, J3DTevOrder(l_tevOrderInfo));
|
||||
tevBlock->setTevStage(tevStageNum, J3DTevStage(l_tevStageInfo));
|
||||
tevBlock->setTevStageNum(tevStageNum + 1);
|
||||
|
||||
J3DShape* shape = material->getShape();
|
||||
|
|
|
|||
Loading…
Reference in New Issue