mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
some various J2D/J3D work (#2043)
* most of J2DPicture done * fix GXSetTexCoordGen * some j3d work
This commit is contained in:
+2
-2
@@ -112,12 +112,12 @@ lbl_8087667C:
|
|||||||
/* 80876834 38 80 00 01 */ li r4, 1
|
/* 80876834 38 80 00 01 */ li r4, 1
|
||||||
/* 80876838 38 A0 00 04 */ li r5, 4
|
/* 80876838 38 A0 00 04 */ li r5, 4
|
||||||
/* 8087683C 38 C0 00 3C */ li r6, 0x3c
|
/* 8087683C 38 C0 00 3C */ li r6, 0x3c
|
||||||
/* 80876840 48 00 03 69 */ bl GXSetTexCoordGen
|
/* 80876840 48 00 03 69 */ bl i_GXSetTexCoordGen
|
||||||
/* 80876844 38 60 00 01 */ li r3, 1
|
/* 80876844 38 60 00 01 */ li r3, 1
|
||||||
/* 80876848 38 80 00 01 */ li r4, 1
|
/* 80876848 38 80 00 01 */ li r4, 1
|
||||||
/* 8087684C 38 A0 00 04 */ li r5, 4
|
/* 8087684C 38 A0 00 04 */ li r5, 4
|
||||||
/* 80876850 38 C0 00 3C */ li r6, 0x3c
|
/* 80876850 38 C0 00 3C */ li r6, 0x3c
|
||||||
/* 80876854 48 00 03 55 */ bl GXSetTexCoordGen
|
/* 80876854 48 00 03 55 */ bl i_GXSetTexCoordGen
|
||||||
/* 80876858 4B AE 7E 0D */ bl GXInvalidateTexAll
|
/* 80876858 4B AE 7E 0D */ bl GXInvalidateTexAll
|
||||||
/* 8087685C 4B AE 4D 31 */ bl GXClearVtxDesc
|
/* 8087685C 4B AE 4D 31 */ bl GXClearVtxDesc
|
||||||
/* 80876860 38 60 00 09 */ li r3, 9
|
/* 80876860 38 60 00 09 */ li r3, 9
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* 0x100 */ JUTTexture* mTexture[2];
|
/* 0x100 */ JUTTexture* mTexture[2];
|
||||||
/* 0x108 */ u8 mTextureCount;
|
/* 0x108 */ u8 mTextureNum;
|
||||||
/* 0x109 */ u8 field_0x109;
|
/* 0x109 */ u8 field_0x109;
|
||||||
/* 0x10A */ JGeometry::TVec2<s16> field_0x10a[4];
|
/* 0x10A */ JGeometry::TVec2<s16> field_0x10a[4];
|
||||||
/* 0x11C */ f32 field_0x11c[2];
|
/* 0x11C */ f32 field_0x11c[2];
|
||||||
@@ -128,8 +128,8 @@ protected:
|
|||||||
/* 0x130 */ JUtility::TColor mWhite;
|
/* 0x130 */ JUtility::TColor mWhite;
|
||||||
/* 0x134 */ JUtility::TColor mBlack;
|
/* 0x134 */ JUtility::TColor mBlack;
|
||||||
/* 0x138 */ JUtility::TColor mCornerColor[4];
|
/* 0x138 */ JUtility::TColor mCornerColor[4];
|
||||||
/* 0x148 */ JUtility::TColor field_0x148;
|
/* 0x148 */ JUtility::TColor mBlendKonstColor;
|
||||||
/* 0x14C */ JUtility::TColor field_0x14c;
|
/* 0x14C */ JUtility::TColor mBlendKonstAlpha;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* J2DPICTURE_H */
|
#endif /* J2DPICTURE_H */
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ struct J3DAnmTransformFullTable {
|
|||||||
struct J3DAnmTexPatternFullTable {
|
struct J3DAnmTexPatternFullTable {
|
||||||
/* 0x00 */ u16 mMaxFrame;
|
/* 0x00 */ u16 mMaxFrame;
|
||||||
/* 0x02 */ u16 mOffset;
|
/* 0x02 */ u16 mOffset;
|
||||||
/* 0x04 */ u8 _4;
|
/* 0x04 */ u8 mTexNo;
|
||||||
/* 0x06 */ u16 _6;
|
/* 0x06 */ u16 _6;
|
||||||
}; // Size = 0x8
|
}; // Size = 0x8
|
||||||
|
|
||||||
@@ -421,13 +421,18 @@ public:
|
|||||||
/* 8032BD20 */ virtual ~J3DAnmTexPattern();
|
/* 8032BD20 */ virtual ~J3DAnmTexPattern();
|
||||||
/* 8032BD94 */ virtual s32 getKind() const;
|
/* 8032BD94 */ virtual s32 getKind() const;
|
||||||
|
|
||||||
|
u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
|
||||||
|
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
|
||||||
|
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
|
||||||
|
J3DAnmTexPatternFullTable* getAnmTable() { return mAnmTable; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x0C */ void* field_0xc;
|
/* 0x0C */ void* field_0xc;
|
||||||
/* 0x10 */ void* mAnmTable;
|
/* 0x10 */ J3DAnmTexPatternFullTable* mAnmTable;
|
||||||
/* 0x14 */ u16 field_0x14;
|
/* 0x14 */ u16 field_0x14;
|
||||||
/* 0x16 */ u16 mUpdateMaterialNum;
|
/* 0x16 */ u16 mUpdateMaterialNum;
|
||||||
/* 0x18 */ u16* field_0x18;
|
/* 0x18 */ u16* mUpdateMaterialID;
|
||||||
/* 0x1C */ JUTNameTab field_0x1c;
|
/* 0x1C */ JUTNameTab mUpdateMaterialName;
|
||||||
}; // Size: 0x2C
|
}; // Size: 0x2C
|
||||||
|
|
||||||
class J3DAnmTevRegKey : public J3DAnmBase {
|
class J3DAnmTevRegKey : public J3DAnmBase {
|
||||||
|
|||||||
@@ -4,21 +4,59 @@
|
|||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
|
||||||
class J3DDeformer;
|
class J3DDeformer;
|
||||||
|
class J3DClusterKey;
|
||||||
|
class J3DClusterVertex;
|
||||||
|
class J3DVertexBuffer;
|
||||||
|
class J3DModel;
|
||||||
|
class J3DAnmCluster;
|
||||||
|
class JUTNameTab;
|
||||||
|
|
||||||
struct J3DCluster {
|
class J3DCluster {
|
||||||
/* 0x00 */ f32 field_0x0;
|
public:
|
||||||
/* 0x04 */ f32 field_0x4;
|
J3DDeformer* getDeformer() { return mDeformer; }
|
||||||
/* 0x08 */ int field_0x8;
|
void setDeformer(J3DDeformer* deformer) { mDeformer = deformer; }
|
||||||
/* 0x0C */ int field_0xc;
|
|
||||||
/* 0x10 */ u16 field_0x10;
|
/* 0x00 */ f32 mMaxAngle;
|
||||||
/* 0x12 */ u16 field_0x12;
|
/* 0x04 */ f32 mMinAngle;
|
||||||
|
/* 0x08 */ J3DClusterKey* mClusterKey;
|
||||||
|
/* 0x0C */ u8 mFlags;
|
||||||
|
/* 0x0E */ u8 field_0xe[0x10 - 0xD];
|
||||||
|
/* 0x10 */ u16 mKeyNum;
|
||||||
|
/* 0x12 */ u16 mPosNum;
|
||||||
/* 0x14 */ u16 field_0x14;
|
/* 0x14 */ u16 field_0x14;
|
||||||
/* 0x16 */ u16 field_0x16;
|
/* 0x16 */ u16 field_0x16;
|
||||||
/* 0x18 */ u16 field_0x18[2];
|
/* 0x18 */ u16* field_0x18;
|
||||||
/* 0x1C */ int field_0x1c;
|
/* 0x1C */ J3DClusterVertex* mClusterVertex;
|
||||||
/* 0x20 */ J3DDeformer* mDeformer;
|
/* 0x20 */ J3DDeformer* mDeformer;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct J3DClusterKey {};
|
struct J3DClusterKey {};
|
||||||
|
|
||||||
|
class J3DDeformData {
|
||||||
|
public:
|
||||||
|
/* 8032E1F8 */ J3DDeformData();
|
||||||
|
/* 8032E230 */ void offAllFlag(u32);
|
||||||
|
/* 8032E298 */ void deform(J3DVertexBuffer*);
|
||||||
|
/* 8032E274 */ void deform(J3DModel*);
|
||||||
|
/* 8032E364 */ void setAnm(J3DAnmCluster*);
|
||||||
|
|
||||||
|
J3DCluster* getClusterPointer(u16 index) {
|
||||||
|
return &mClusterPointer[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
/* 0x00 */ u16 mClusterNum;
|
||||||
|
/* 0x02 */ u16 mClusterKeyNum;
|
||||||
|
/* 0x04 */ u16 mClusterVertexNum;
|
||||||
|
/* 0x08 */ J3DCluster* mClusterPointer;
|
||||||
|
/* 0x0C */ J3DClusterKey* mClusterKeyPointer;
|
||||||
|
/* 0x10 */ J3DClusterVertex* mClusterVertex;
|
||||||
|
/* 0x14 */ u16 mVtxPosNum;
|
||||||
|
/* 0x16 */ u16 mVtxNrmNum;
|
||||||
|
/* 0x18 */ f32* mVtxPos;
|
||||||
|
/* 0x1C */ f32* mVtxNrm;
|
||||||
|
/* 0x20 */ JUTNameTab* mClusterName;
|
||||||
|
/* 0x24 */ JUTNameTab* mClusterKeyName;
|
||||||
|
}; // Size: 0x28
|
||||||
|
|
||||||
#endif /* J3DCLUSTER_H */
|
#endif /* J3DCLUSTER_H */
|
||||||
|
|||||||
@@ -8,29 +8,8 @@
|
|||||||
|
|
||||||
class J3DModel;
|
class J3DModel;
|
||||||
class J3DAnmCluster;
|
class J3DAnmCluster;
|
||||||
|
class J3DClusterVertex;
|
||||||
class J3DDeformData {
|
class JUTNameTab;
|
||||||
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 {
|
struct J3DSkinNList {
|
||||||
/* 8032C6E4 */ J3DSkinNList();
|
/* 8032C6E4 */ J3DSkinNList();
|
||||||
@@ -98,11 +77,14 @@ public:
|
|||||||
/* 8032E60C */ void deform_VtxNrmF32(J3DVertexBuffer*, J3DCluster*, J3DClusterKey*, f32*);
|
/* 8032E60C */ void deform_VtxNrmF32(J3DVertexBuffer*, J3DCluster*, J3DClusterKey*, f32*);
|
||||||
/* 8032EBCC */ void normalizeWeight(int, f32*);
|
/* 8032EBCC */ void normalizeWeight(int, f32*);
|
||||||
|
|
||||||
|
void offFlag(u32 i_flag) { mFlags &= ~i_flag; }
|
||||||
|
void setAnmCluster(J3DAnmCluster* anm) { mAnmCluster = anm; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x00 */ J3DDeformData* mDeformData;
|
/* 0x00 */ J3DDeformData* mDeformData;
|
||||||
/* 0x04 */ J3DAnmCluster* mAnmCluster;
|
/* 0x04 */ J3DAnmCluster* mAnmCluster;
|
||||||
/* 0x08 */ int field_0x8;
|
/* 0x08 */ f32* field_0x8;
|
||||||
/* 0x0C */ int field_0xc;
|
/* 0x0C */ f32* field_0xc;
|
||||||
/* 0x10 */ u32 mFlags;
|
/* 0x10 */ u32 mFlags;
|
||||||
}; // Size: 0x14
|
}; // Size: 0x14
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,26 @@ public:
|
|||||||
mTransformedVtxNrmArray[1] = tmp;
|
mTransformedVtxNrmArray[1] = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void swapVtxPosArrayPointer() {
|
||||||
|
void* temp = mVtxPosArray[0];
|
||||||
|
mVtxPosArray[0] = mVtxPosArray[1];
|
||||||
|
mVtxPosArray[1] = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void swapVtxNrmArrayPointer() {
|
||||||
|
void* temp = mVtxNrmArray[0];
|
||||||
|
mVtxNrmArray[0] = mVtxNrmArray[1];
|
||||||
|
mVtxNrmArray[1] = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* getVtxPosArrayPointer(int index) {
|
||||||
|
return mVtxPosArray[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
void* getVtxNrmArrayPointer(int index) {
|
||||||
|
return mVtxNrmArray[index];
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x00 */ J3DVertexData* mVtxData;
|
/* 0x00 */ J3DVertexData* mVtxData;
|
||||||
/* 0x04 */ void* mVtxPosArray[2];
|
/* 0x04 */ void* mVtxPosArray[2];
|
||||||
|
|||||||
@@ -296,8 +296,11 @@ struct TVec3<f32> {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct TVec2 {
|
struct TVec2 {
|
||||||
TVec2() {}
|
TVec2() {}
|
||||||
|
TVec2(T v) { set(v); }
|
||||||
TVec2(T x, T y) { set(x, y); }
|
TVec2(T x, T y) { set(x, y); }
|
||||||
|
|
||||||
|
void set(T v) { y = x = v; }
|
||||||
|
|
||||||
void set(T x, T y) {
|
void set(T x, T y) {
|
||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ struct TColor : public GXColor {
|
|||||||
TColor(GXColor color) { set(color); }
|
TColor(GXColor color) { set(color); }
|
||||||
|
|
||||||
// TColor(const TColor& other) { set(other.toUInt32()); }
|
// TColor(const TColor& other) { set(other.toUInt32()); }
|
||||||
TColor& operator=(const TColor& other) {
|
|
||||||
((GXColor*)this)->operator=(other);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
operator u32() const { return toUInt32(); }
|
operator u32() const { return toUInt32(); }
|
||||||
u32 toUInt32() const { return *(u32*)&r; }
|
u32 toUInt32() const { return *(u32*)&r; }
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ void GXGetVtxAttrFmt(GXVtxFmt param_0, int param_1, GXCompCnt* param_2, GXCompTy
|
|||||||
u8* param_4);
|
u8* param_4);
|
||||||
void GXGetVtxDescv(GXVtxDescList* attrPtr);
|
void GXGetVtxDescv(GXVtxDescList* attrPtr);
|
||||||
|
|
||||||
|
static inline void GXSetTexCoordGen(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx) {
|
||||||
|
GXSetTexCoordGen2(dst, type, src, mtx, GX_FALSE, GX_PTIDENTITY);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ void J2DGrafContext::setPort() {
|
|||||||
GXSetViewport(bounds.i.x, bounds.i.y, bounds.getWidth(), bounds.getHeight(), 0.0f, 1.0f);
|
GXSetViewport(bounds.i.x, bounds.i.y, bounds.getWidth(), bounds.getHeight(), 0.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void GXSetTexCoordGen(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx) {
|
|
||||||
GXSetTexCoordGen2(dst, type, src, mtx, GX_FALSE, GX_PTIDENTITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 802E8C44-802E8E20 2E3584 01DC+00 1/0 1/0 0/0 .text setup2D__14J2DGrafContextFv */
|
/* 802E8C44-802E8E20 2E3584 01DC+00 1/0 1/0 0/0 .text setup2D__14J2DGrafContextFv */
|
||||||
void J2DGrafContext::setup2D() {
|
void J2DGrafContext::setup2D() {
|
||||||
GXSetNumIndStages(0);
|
GXSetNumIndStages(0);
|
||||||
|
|||||||
@@ -406,10 +406,6 @@ void J2DTexGenBlock::initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void GXSetTexCoordGen(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx) {
|
|
||||||
GXSetTexCoordGen2(dst, type, src, mtx, GX_FALSE, GX_PTIDENTITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 802EB570-802EB620 2E5EB0 00B0+00 0/0 1/1 0/0 .text setGX__14J2DTexGenBlockFv */
|
/* 802EB570-802EB620 2E5EB0 00B0+00 0/0 1/1 0/0 .text setGX__14J2DTexGenBlockFv */
|
||||||
void J2DTexGenBlock::setGX() {
|
void J2DTexGenBlock::setGX() {
|
||||||
GXSetNumTexGens(mTexGenNum);
|
GXSetNumTexGens(mTexGenNum);
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ void J2DMaterial::setAnimation(J2DAnmTexPattern* anm) {
|
|||||||
u16 matID = anm->getUpdateMaterialID(i);
|
u16 matID = anm->getUpdateMaterialID(i);
|
||||||
|
|
||||||
if (index == matID) {
|
if (index == matID) {
|
||||||
mAnmPointer->field_0x22[anmTbl[i]._4] = i;
|
mAnmPointer->field_0x22[anmTbl[i].mTexNo] = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -208,7 +208,7 @@ SECTION_SDATA2 static f32 lit_1563[1 + 1 /* padding */] = {
|
|||||||
// almost
|
// almost
|
||||||
#ifdef NONMATCHING
|
#ifdef NONMATCHING
|
||||||
J2DScreen::J2DScreen()
|
J2DScreen::J2DScreen()
|
||||||
: J2DPane(NULL, true, 'root', JGeometry::TBox2<f32>(0.0f, 0.0f, 0.0f, 0.0f)), mColor() {
|
: J2DPane(NULL, true, 'root', JGeometry::TBox2<f32>(0.0f, 0.0f, 640.0f, 480.0f)), mColor() {
|
||||||
field_0x4 = -1;
|
field_0x4 = -1;
|
||||||
mScissor = false;
|
mScissor = false;
|
||||||
mMaterialNum = 0;
|
mMaterialNum = 0;
|
||||||
@@ -342,14 +342,12 @@ bool J2DScreen::getScreenInformation(JSURandomInputStream* p_stream) {
|
|||||||
|
|
||||||
/* 802F8990-802F8B98 2F32D0 0208+00 1/1 0/0 0/0 .text
|
/* 802F8990-802F8B98 2F32D0 0208+00 1/1 0/0 0/0 .text
|
||||||
* makeHierarchyPanes__9J2DScreenFP7J2DPaneP20JSURandomInputStreamUlP10JKRArchive */
|
* makeHierarchyPanes__9J2DScreenFP7J2DPaneP20JSURandomInputStreamUlP10JKRArchive */
|
||||||
// goto can probably be replaced
|
|
||||||
s32 J2DScreen::makeHierarchyPanes(J2DPane* p_basePane, JSURandomInputStream* p_stream, u32 param_2,
|
s32 J2DScreen::makeHierarchyPanes(J2DPane* p_basePane, JSURandomInputStream* p_stream, u32 param_2,
|
||||||
JKRArchive* p_archive) {
|
JKRArchive* p_archive) {
|
||||||
J2DScrnBlockHeader header;
|
|
||||||
J2DPane* next_pane = p_basePane;
|
J2DPane* next_pane = p_basePane;
|
||||||
|
|
||||||
do {
|
while (true) {
|
||||||
loop:
|
J2DScrnBlockHeader header;
|
||||||
p_stream->peek(&header, sizeof(J2DScrnBlockHeader));
|
p_stream->peek(&header, sizeof(J2DScrnBlockHeader));
|
||||||
|
|
||||||
switch (header.mTag) {
|
switch (header.mTag) {
|
||||||
@@ -360,10 +358,10 @@ s32 J2DScreen::makeHierarchyPanes(J2DPane* p_basePane, JSURandomInputStream* p_s
|
|||||||
p_stream->seek(header.mSize, JSUStreamSeekFrom_CUR);
|
p_stream->seek(header.mSize, JSUStreamSeekFrom_CUR);
|
||||||
|
|
||||||
int ret = makeHierarchyPanes(next_pane, p_stream, param_2, p_archive);
|
int ret = makeHierarchyPanes(next_pane, p_stream, param_2, p_archive);
|
||||||
if (ret == 0) {
|
if (ret != 0) {
|
||||||
goto loop;
|
return ret;
|
||||||
}
|
}
|
||||||
return ret;
|
break;
|
||||||
case 'END1':
|
case 'END1':
|
||||||
p_stream->seek(header.mSize, JSUStreamSeekFrom_CUR);
|
p_stream->seek(header.mSize, JSUStreamSeekFrom_CUR);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -371,33 +369,36 @@ s32 J2DScreen::makeHierarchyPanes(J2DPane* p_basePane, JSURandomInputStream* p_s
|
|||||||
J2DResReference* texRes = getResReference(p_stream, param_2);
|
J2DResReference* texRes = getResReference(p_stream, param_2);
|
||||||
mTexRes = texRes;
|
mTexRes = texRes;
|
||||||
|
|
||||||
if (texRes != NULL) {
|
if (texRes == NULL) {
|
||||||
goto loop;
|
return 2;
|
||||||
}
|
}
|
||||||
return 2;
|
break;
|
||||||
case 'FNT1':
|
case 'FNT1':
|
||||||
J2DResReference* fntRes = getResReference(p_stream, param_2);
|
J2DResReference* fntRes = getResReference(p_stream, param_2);
|
||||||
mFontRes = fntRes;
|
mFontRes = fntRes;
|
||||||
|
|
||||||
if (fntRes != NULL) {
|
if (fntRes == NULL) {
|
||||||
goto loop;
|
return 2;
|
||||||
}
|
}
|
||||||
return 2;
|
break;
|
||||||
case 'MAT1':
|
case 'MAT1':
|
||||||
if (createMaterial(p_stream, param_2, p_archive)) {
|
if (!createMaterial(p_stream, param_2, p_archive)) {
|
||||||
goto loop;
|
return 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (p_archive == NULL) {
|
||||||
|
next_pane = createPane(header, p_stream, p_basePane, param_2);
|
||||||
|
} else {
|
||||||
|
next_pane = createPane(header, p_stream, p_basePane, param_2, p_archive);
|
||||||
}
|
}
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_archive == NULL) {
|
if (next_pane == NULL) {
|
||||||
next_pane = createPane(header, p_stream, p_basePane, param_2);
|
return 2;
|
||||||
} else {
|
}
|
||||||
next_pane = createPane(header, p_stream, p_basePane, param_2, p_archive);
|
break;
|
||||||
}
|
}
|
||||||
} while (next_pane != NULL);
|
}
|
||||||
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 802F8B98-802F8ED4 2F34D8 033C+00 1/0 0/0 0/0 .text
|
/* 802F8B98-802F8ED4 2F34D8 033C+00 1/0 0/0 0/0 .text
|
||||||
|
|||||||
@@ -557,10 +557,6 @@ void J2DWindow::drawContentsTexture(f32 param_0, f32 param_1, f32 param_2, f32 p
|
|||||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void GXSetTexCoordGen(GXTexCoordID dst, GXTexGenType type, GXTexGenSrc src, u32 mtx) {
|
|
||||||
GXSetTexCoordGen2(dst, type, src, mtx, GX_FALSE, GX_PTIDENTITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 802FBB90-802FBE60 2F64D0 02D0+00 2/2 0/0 0/0 .text
|
/* 802FBB90-802FBE60 2F64D0 02D0+00 2/2 0/0 0/0 .text
|
||||||
* setTevMode__9J2DWindowFP10JUTTextureQ28JUtility6TColorQ28JUtility6TColor */
|
* setTevMode__9J2DWindowFP10JUTTextureQ28JUtility6TColorQ28JUtility6TColor */
|
||||||
void J2DWindow::setTevMode(JUTTexture* param_0, JUtility::TColor param_1,
|
void J2DWindow::setTevMode(JUTTexture* param_0, JUtility::TColor param_1,
|
||||||
|
|||||||
@@ -786,11 +786,11 @@ asm void J3DAnmTexPattern::getTexNo(u16 param_0, u16* param_1) const {
|
|||||||
* searchUpdateMaterialID__16J3DAnmTexPatternFP16J3DMaterialTable */
|
* searchUpdateMaterialID__16J3DAnmTexPatternFP16J3DMaterialTable */
|
||||||
void J3DAnmTexPattern::searchUpdateMaterialID(J3DMaterialTable* param_0) {
|
void J3DAnmTexPattern::searchUpdateMaterialID(J3DMaterialTable* param_0) {
|
||||||
for (u16 i = 0; i < mUpdateMaterialNum; i++) {
|
for (u16 i = 0; i < mUpdateMaterialNum; i++) {
|
||||||
s32 r3 = param_0->getMaterialName()->getIndex(field_0x1c.getName(i));
|
s32 r3 = param_0->getMaterialName()->getIndex(mUpdateMaterialName.getName(i));
|
||||||
if (r3 != -1) {
|
if (r3 != -1) {
|
||||||
field_0x18[i] = r3;
|
mUpdateMaterialID[i] = r3;
|
||||||
} else {
|
} else {
|
||||||
field_0x18[i] = -1;
|
mUpdateMaterialID[i] = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,38 +4,24 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "JSystem/J3DGraphAnimator/J3DCluster.h"
|
#include "JSystem/J3DGraphAnimator/J3DCluster.h"
|
||||||
|
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||||
|
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||||
|
#include "JSystem/J3DGraphAnimator/J3DSkinDeform.h"
|
||||||
|
#include "JSystem/JMath/JMath.h"
|
||||||
|
#include "JSystem/JUtility/JUTAssert.h"
|
||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
|
#include "dolphin/os.h"
|
||||||
|
|
||||||
//
|
#ifdef DEBUG
|
||||||
// Types:
|
#define J3D_ASSERT(COND) \
|
||||||
//
|
if ((COND) == 0) { \
|
||||||
|
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, __LINE__, \
|
||||||
struct JMath {
|
"Error : null pointer"); \
|
||||||
static f32 asinAcosTable_[1032];
|
OSPanic(__FILE__, __LINE__, "Halt"); \
|
||||||
};
|
}
|
||||||
|
#else
|
||||||
struct J3DVertexBuffer {};
|
#define J3D_ASSERT(COND)
|
||||||
|
#endif
|
||||||
struct J3DModel {};
|
|
||||||
|
|
||||||
struct J3DAnmCluster {};
|
|
||||||
|
|
||||||
struct J3DDeformData {
|
|
||||||
/* 8032E1F8 */ J3DDeformData();
|
|
||||||
/* 8032E230 */ void offAllFlag(u32);
|
|
||||||
/* 8032E298 */ void deform(J3DVertexBuffer*);
|
|
||||||
/* 8032E274 */ void deform(J3DModel*);
|
|
||||||
/* 8032E364 */ void setAnm(J3DAnmCluster*);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct J3DDeformer {
|
|
||||||
/* 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*);
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Forward References:
|
// Forward References:
|
||||||
@@ -58,8 +44,6 @@ extern "C" void normalizeWeight__11J3DDeformerFiPf();
|
|||||||
//
|
//
|
||||||
|
|
||||||
extern "C" void PPCSync();
|
extern "C" void PPCSync();
|
||||||
extern "C" void DCStoreRangeNoSync();
|
|
||||||
extern "C" void PSVECNormalize();
|
|
||||||
extern "C" void __cvt_fp2unsigned();
|
extern "C" void __cvt_fp2unsigned();
|
||||||
extern "C" void _savegpr_21();
|
extern "C" void _savegpr_21();
|
||||||
extern "C" void _savegpr_26();
|
extern "C" void _savegpr_26();
|
||||||
@@ -76,77 +60,93 @@ extern "C" f32 asinAcosTable___5JMath[1032];
|
|||||||
//
|
//
|
||||||
|
|
||||||
/* 8032E1F8-8032E230 328B38 0038+00 0/0 1/1 0/0 .text __ct__13J3DDeformDataFv */
|
/* 8032E1F8-8032E230 328B38 0038+00 0/0 1/1 0/0 .text __ct__13J3DDeformDataFv */
|
||||||
#pragma push
|
J3DDeformData::J3DDeformData() {
|
||||||
#pragma optimization_level 0
|
mClusterNum = 0;
|
||||||
#pragma optimizewithasm off
|
mClusterKeyNum = 0;
|
||||||
asm J3DDeformData::J3DDeformData() {
|
mClusterVertexNum = 0;
|
||||||
nofralloc
|
mClusterPointer = NULL;
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/__ct__13J3DDeformDataFv.s"
|
mClusterKeyPointer = NULL;
|
||||||
|
mClusterVertex = NULL;
|
||||||
|
mVtxPosNum = 0;
|
||||||
|
mVtxNrmNum = 0;
|
||||||
|
mVtxPos = NULL;
|
||||||
|
mVtxNrm = NULL;
|
||||||
|
mClusterName = NULL;
|
||||||
|
mClusterKeyName = NULL;
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E230-8032E274 328B70 0044+00 0/0 1/1 0/0 .text offAllFlag__13J3DDeformDataFUl */
|
/* 8032E230-8032E274 328B70 0044+00 0/0 1/1 0/0 .text offAllFlag__13J3DDeformDataFUl */
|
||||||
#pragma push
|
void J3DDeformData::offAllFlag(u32 i_flag) {
|
||||||
#pragma optimization_level 0
|
for (u16 i = 0; i < mClusterNum; i++) {
|
||||||
#pragma optimizewithasm off
|
mClusterPointer[i].getDeformer()->offFlag(i_flag);
|
||||||
asm void J3DDeformData::offAllFlag(u32 param_0) {
|
}
|
||||||
nofralloc
|
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/offAllFlag__13J3DDeformDataFUl.s"
|
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E274-8032E298 328BB4 0024+00 0/0 1/1 0/0 .text deform__13J3DDeformDataFP8J3DModel
|
/* 8032E274-8032E298 328BB4 0024+00 0/0 1/1 0/0 .text deform__13J3DDeformDataFP8J3DModel
|
||||||
*/
|
*/
|
||||||
#pragma push
|
void J3DDeformData::deform(J3DModel* model) {
|
||||||
#pragma optimization_level 0
|
J3D_ASSERT(model != NULL);
|
||||||
#pragma optimizewithasm off
|
|
||||||
asm void J3DDeformData::deform(J3DModel* param_0) {
|
deform(model->getVertexBuffer());
|
||||||
nofralloc
|
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/deform__13J3DDeformDataFP8J3DModel.s"
|
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E298-8032E364 328BD8 00CC+00 1/1 0/0 0/0 .text deform__13J3DDeformDataFP15J3DVertexBuffer
|
/* 8032E298-8032E364 328BD8 00CC+00 1/1 0/0 0/0 .text deform__13J3DDeformDataFP15J3DVertexBuffer
|
||||||
*/
|
*/
|
||||||
#pragma push
|
void J3DDeformData::deform(J3DVertexBuffer* buffer) {
|
||||||
#pragma optimization_level 0
|
J3D_ASSERT(buffer != NULL);
|
||||||
#pragma optimizewithasm off
|
|
||||||
asm void J3DDeformData::deform(J3DVertexBuffer* param_0) {
|
buffer->swapVtxPosArrayPointer();
|
||||||
nofralloc
|
buffer->swapVtxNrmArrayPointer();
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/deform__13J3DDeformDataFP15J3DVertexBuffer.s"
|
|
||||||
|
for (u16 i = 0; i < mClusterNum; i++) {
|
||||||
|
mClusterPointer[i].getDeformer()->deform(buffer, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
DCStoreRangeNoSync(buffer->getVtxPosArrayPointer(0),
|
||||||
|
buffer->getVertexData()->getVtxNum() * sizeof(Vec));
|
||||||
|
DCStoreRangeNoSync(buffer->getVtxNrmArrayPointer(0),
|
||||||
|
buffer->getVertexData()->getNrmNum() * sizeof(Vec));
|
||||||
|
PPCSync();
|
||||||
|
|
||||||
|
buffer->setCurrentVtxPos(buffer->getVtxPosArrayPointer(0));
|
||||||
|
buffer->setCurrentVtxNrm(buffer->getVtxNrmArrayPointer(0));
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E364-8032E39C 328CA4 0038+00 0/0 1/1 0/0 .text setAnm__13J3DDeformDataFP13J3DAnmCluster */
|
/* 8032E364-8032E39C 328CA4 0038+00 0/0 1/1 0/0 .text setAnm__13J3DDeformDataFP13J3DAnmCluster */
|
||||||
#pragma push
|
void J3DDeformData::setAnm(J3DAnmCluster* anm) {
|
||||||
#pragma optimization_level 0
|
for (u16 i = 0; i < mClusterNum; i++) {
|
||||||
#pragma optimizewithasm off
|
mClusterPointer[i].getDeformer()->setAnmCluster(anm);
|
||||||
asm void J3DDeformData::setAnm(J3DAnmCluster* param_0) {
|
}
|
||||||
nofralloc
|
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/setAnm__13J3DDeformDataFP13J3DAnmCluster.s"
|
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E39C-8032E3BC 328CDC 0020+00 0/0 1/1 0/0 .text __ct__11J3DDeformerFP13J3DDeformData */
|
/* 8032E39C-8032E3BC 328CDC 0020+00 0/0 1/1 0/0 .text __ct__11J3DDeformerFP13J3DDeformData */
|
||||||
#pragma push
|
J3DDeformer::J3DDeformer(J3DDeformData* data) {
|
||||||
#pragma optimization_level 0
|
mDeformData = data;
|
||||||
#pragma optimizewithasm off
|
mAnmCluster = NULL;
|
||||||
asm J3DDeformer::J3DDeformer(J3DDeformData* param_0) {
|
field_0x8 = NULL;
|
||||||
nofralloc
|
field_0xc = NULL;
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/__ct__11J3DDeformerFP13J3DDeformData.s"
|
mFlags = 3;
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8032E3BC-8032E4A4 328CFC 00E8+00 1/1 0/0 0/0 .text deform__11J3DDeformerFP15J3DVertexBufferUs
|
/* 8032E3BC-8032E4A4 328CFC 00E8+00 1/1 0/0 0/0 .text deform__11J3DDeformerFP15J3DVertexBufferUs
|
||||||
*/
|
*/
|
||||||
#pragma push
|
void J3DDeformer::deform(J3DVertexBuffer* buffer, u16 param_1) {
|
||||||
#pragma optimization_level 0
|
J3D_ASSERT(buffer != 0);
|
||||||
#pragma optimizewithasm off
|
|
||||||
asm void J3DDeformer::deform(J3DVertexBuffer* param_0, u16 param_1) {
|
u16 var_r31 = 0;
|
||||||
nofralloc
|
if (mAnmCluster != NULL) {
|
||||||
#include "asm/JSystem/J3DGraphAnimator/J3DCluster/deform__11J3DDeformerFP15J3DVertexBufferUs.s"
|
for (u16 i = 0; i < param_1; i++) {
|
||||||
|
var_r31 += mDeformData->getClusterPointer(i)->mKeyNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 num = mDeformData->getClusterPointer(param_1)->mKeyNum;
|
||||||
|
for (u16 i = 0; i < num; i++) {
|
||||||
|
field_0x8[i] = mAnmCluster->getWeight(var_r31++);
|
||||||
|
}
|
||||||
|
|
||||||
|
deform(buffer, param_1, field_0x8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* ############################################################################################## */
|
/* ############################################################################################## */
|
||||||
/* 80456470-80456474 004A70 0004+00 2/2 0/0 0/0 .sdata2 @830 */
|
/* 80456470-80456474 004A70 0004+00 2/2 0/0 0/0 .sdata2 @830 */
|
||||||
|
|||||||
@@ -1,34 +1,12 @@
|
|||||||
//
|
|
||||||
// Generated By: dol2asm
|
|
||||||
// Translation Unit: J3DJoint
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "JSystem/J3DGraphAnimator/J3DJoint.h"
|
#include "JSystem/J3DGraphAnimator/J3DJoint.h"
|
||||||
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
|
||||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
||||||
|
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||||
#include "JSystem/JMath/JMath.h"
|
#include "JSystem/JMath/JMath.h"
|
||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
#include "dolphin/types.h"
|
|
||||||
#include "m_Do/m_Do_mtx.h"
|
#include "m_Do/m_Do_mtx.h"
|
||||||
|
|
||||||
//
|
|
||||||
// Types:
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Forward References:
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// External References:
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Declarations:
|
|
||||||
//
|
|
||||||
|
|
||||||
/* 8032EC28-8032ECAC 329568 0084+00 0/0 1/1 0/0 .text
|
/* 8032EC28-8032ECAC 329568 0084+00 0/0 1/1 0/0 .text
|
||||||
* init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf */
|
* init__25J3DMtxCalcJ3DSysInitBasicFRC3VecRA3_A4_Cf */
|
||||||
void J3DMtxCalcJ3DSysInitBasic::init(Vec const& scale, Mtx const& mtx) {
|
void J3DMtxCalcJ3DSysInitBasic::init(Vec const& scale, Mtx const& mtx) {
|
||||||
@@ -181,7 +159,7 @@ void J3DJoint::appendChild(J3DJoint* pChild) {
|
|||||||
#pragma push
|
#pragma push
|
||||||
#pragma force_active on
|
#pragma force_active on
|
||||||
/* dead data */
|
/* dead data */
|
||||||
SECTION_DEAD static u32 const pad_803A2080[2] = {0,0};
|
SECTION_DEAD static u32 const pad_803A2080[2] = {0, 0};
|
||||||
#pragma pop
|
#pragma pop
|
||||||
|
|
||||||
/* 8032F170-8032F254 329AB0 00E4+00 0/0 1/1 0/0 .text __ct__8J3DJointFv */
|
/* 8032F170-8032F254 329AB0 00E4+00 0/0 1/1 0/0 .text __ct__8J3DJointFv */
|
||||||
@@ -210,12 +188,13 @@ void J3DJoint::entryIn() {
|
|||||||
MtxP anmMtx = j3dSys.getModel()->i_getAnmMtx(mJntNo);
|
MtxP anmMtx = j3dSys.getModel()->i_getAnmMtx(mJntNo);
|
||||||
j3dSys.getDrawBuffer(0)->setZMtx(anmMtx);
|
j3dSys.getDrawBuffer(0)->setZMtx(anmMtx);
|
||||||
j3dSys.getDrawBuffer(1)->setZMtx(anmMtx);
|
j3dSys.getDrawBuffer(1)->setZMtx(anmMtx);
|
||||||
for (J3DMaterial* mesh = mMesh; mesh != NULL; ) {
|
for (J3DMaterial* mesh = mMesh; mesh != NULL;) {
|
||||||
if (mesh->getShape()->checkFlag(1)) {
|
if (mesh->getShape()->checkFlag(1)) {
|
||||||
mesh = mesh->getNext();
|
mesh = mesh->getNext();
|
||||||
} else {
|
} else {
|
||||||
J3DMatPacket* matPacket = j3dSys.getModel()->getMatPacket(mesh->getIndex());
|
J3DMatPacket* matPacket = j3dSys.getModel()->getMatPacket(mesh->getIndex());
|
||||||
J3DShapePacket* shapePacket = j3dSys.getModel()->getShapePacket(mesh->getShape()->getIndex());
|
J3DShapePacket* shapePacket =
|
||||||
|
j3dSys.getModel()->getShapePacket(mesh->getShape()->getIndex());
|
||||||
if (!matPacket->isLocked()) {
|
if (!matPacket->isLocked()) {
|
||||||
if (mesh->getMaterialAnm()) {
|
if (mesh->getMaterialAnm()) {
|
||||||
J3DMaterialAnm* piVar8 = mesh->getMaterialAnm();
|
J3DMaterialAnm* piVar8 = mesh->getMaterialAnm();
|
||||||
@@ -276,7 +255,7 @@ void J3DJoint::recursiveCalc() {
|
|||||||
child->recursiveCalc();
|
child->recursiveCalc();
|
||||||
}
|
}
|
||||||
mDoMtx_copy(prevCurrentMtx, J3DSys::mCurrentMtx);
|
mDoMtx_copy(prevCurrentMtx, J3DSys::mCurrentMtx);
|
||||||
|
|
||||||
J3DSys::mCurrentS.x = currentX;
|
J3DSys::mCurrentS.x = currentX;
|
||||||
J3DSys::mCurrentS.y = currentY;
|
J3DSys::mCurrentS.y = currentY;
|
||||||
J3DSys::mCurrentS.z = currentZ;
|
J3DSys::mCurrentS.z = currentZ;
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
//
|
|
||||||
// Generated By: dol2asm
|
|
||||||
// Translation Unit: J3DJointTree
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "JSystem/J3DGraphAnimator/J3DJointTree.h"
|
#include "JSystem/J3DGraphAnimator/J3DJointTree.h"
|
||||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h"
|
#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h"
|
||||||
#include "JSystem/J3DGraphAnimator/J3DShapeTable.h"
|
#include "JSystem/J3DGraphAnimator/J3DShapeTable.h"
|
||||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||||
#include "dolphin/types.h"
|
|
||||||
|
|
||||||
/* 80325A18-80325A9C 320358 0084+00 0/0 1/1 0/0 .text __ct__12J3DJointTreeFv */
|
/* 80325A18-80325A9C 320358 0084+00 0/0 1/1 0/0 .text __ct__12J3DJointTreeFv */
|
||||||
J3DJointTree::J3DJointTree()
|
J3DJointTree::J3DJointTree()
|
||||||
|
|||||||
@@ -111,6 +111,29 @@ int J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* pAnmColor) {
|
|||||||
|
|
||||||
/* 8032F6F8-8032F7B4 32A038 00BC+00 0/0 5/5 10/10 .text
|
/* 8032F6F8-8032F7B4 32A038 00BC+00 0/0 5/5 10/10 .text
|
||||||
* removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern */
|
* removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern */
|
||||||
|
// regalloc
|
||||||
|
#ifdef NONMATCHING
|
||||||
|
int J3DMaterialTable::removeTexNoAnimator(J3DAnmTexPattern* anm) {
|
||||||
|
int ret = 0;
|
||||||
|
u16 materialNum = anm->getUpdateMaterialNum();
|
||||||
|
J3DAnmTexPatternFullTable* anm_table = anm->getAnmTable();
|
||||||
|
|
||||||
|
for (u16 i = 0; i < materialNum; i++) {
|
||||||
|
if (anm->isValidUpdateMaterialID(i)) {
|
||||||
|
u16 materialID = anm->getUpdateMaterialID(i);
|
||||||
|
|
||||||
|
J3DMaterialAnm* pMatAnm = getMaterialNodePointer(materialID)->getMaterialAnm();
|
||||||
|
u8 texNo = anm_table[i].mTexNo;
|
||||||
|
if (pMatAnm == NULL)
|
||||||
|
ret = 1;
|
||||||
|
else
|
||||||
|
pMatAnm->setTexNoAnm(texNo, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
#pragma push
|
#pragma push
|
||||||
#pragma optimization_level 0
|
#pragma optimization_level 0
|
||||||
#pragma optimizewithasm off
|
#pragma optimizewithasm off
|
||||||
@@ -119,6 +142,7 @@ asm int J3DMaterialTable::removeTexNoAnimator(J3DAnmTexPattern* param_0) {
|
|||||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern.s"
|
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern.s"
|
||||||
}
|
}
|
||||||
#pragma pop
|
#pragma pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 8032F7B4-8032F880 32A0F4 00CC+00 0/0 4/4 26/26 .text
|
/* 8032F7B4-8032F880 32A0F4 00CC+00 0/0 4/4 26/26 .text
|
||||||
* removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */
|
* removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user