mirror of
https://github.com/projectPiki/pikmin2.git
synced 2024-12-03 02:51:21 +00:00
Misc J3D progress. Link J3DJointFactory.
This commit is contained in:
parent
2a3d358800
commit
8df4b00509
@ -495,10 +495,12 @@ typedef enum _GXProjectionType {
|
||||
typedef struct _SDK_GXColor {
|
||||
u8 r, g, b, a;
|
||||
} GXColor;
|
||||
typedef GXColor _GXColor; // this might be a wrapper in Pikmin 2? IDK.
|
||||
|
||||
typedef struct _SDK_GXColorS10 {
|
||||
u16 r, g, b, a;
|
||||
} GXColorS10;
|
||||
typedef GXColorS10 _GXColorS10; // this might be a wrapper in Pikmin 2? IDK.
|
||||
|
||||
typedef struct _SDK_GXFogAdjTable {
|
||||
u16 _00[10];
|
||||
@ -609,6 +611,11 @@ typedef struct GXTexObj {
|
||||
s8 _1f;
|
||||
} GXTexObj;
|
||||
|
||||
typedef struct _GXVtxDescList {
|
||||
s32 _00;
|
||||
u32 _04;
|
||||
} GXTexDescList;
|
||||
|
||||
// Compressed Z format
|
||||
typedef enum _SDK_GXZFmt16 {
|
||||
GX_ZC_LINEAR, // 16-bit linear.
|
||||
@ -860,6 +867,8 @@ void GXSetNumTexGens(u8);
|
||||
void GXSetNumChans(u32);
|
||||
void GXSetChanCtrl(GXChannelID chan, GXBool enable, GXColorSrc amb_src, GXColorSrc mat_src, GXLightID light_mask, GXDiffuseFn diff_fn,
|
||||
GXAttnFn attn_fn);
|
||||
void GXSetChanAmbColor(s32, GXColor); // params might not be right
|
||||
void GXSetChanMatColor(s32, GXColor); // params might not be right
|
||||
void GXSetNumIndStages(u8 num);
|
||||
void GXSetNumTevStages(u32);
|
||||
void GXSetTevDirect(GXTevStageID);
|
||||
@ -874,6 +883,7 @@ void GXSetTevColorOp(GXTevStageID, GXTevOp, GXTevBias, GXTevScale, GXBool, GXTev
|
||||
void GXSetTevAlphaOp(GXTevStageID, GXTevOp, GXTevBias, GXTevScale, GXBool, GXTevRegID);
|
||||
void GXSetTevKColor(GXTevKColorID, GXColor);
|
||||
void GXSetTevKColorSel(GXTevStageID, GXTevKColorSel);
|
||||
void GXSetTevKAlphaSel(GXTevStageID, u32); // params might not be right
|
||||
void GXSetVtxAttrFmt(GXVtxFmt, GXAttr, GXCompCnt, GXCompType, uint);
|
||||
void GXClearVtxDesc();
|
||||
void GXSetVtxDesc(GXAttr, GXAttrType);
|
||||
@ -1042,7 +1052,11 @@ typedef union {
|
||||
f64 f64;
|
||||
} PPCWGPipe;
|
||||
|
||||
#ifdef __MWERKS__
|
||||
volatile PPCWGPipe GXWGFifo : GXFIFO_ADDR;
|
||||
#else
|
||||
volatile PPCWGPipe GXWGFifo;
|
||||
#endif
|
||||
|
||||
static inline void GXPosition2f32(const f32 x, const f32 y)
|
||||
{
|
||||
|
@ -11,6 +11,7 @@ extern "C" {
|
||||
|
||||
// sizeof = 48 or 0x30
|
||||
typedef float Mtx[3][4];
|
||||
typedef float Mtx33[3][3];
|
||||
typedef float Mtx44[4][4];
|
||||
typedef float PSQuaternion[4];
|
||||
#define MTXDegToRad(a) ((a)*0.01745329252f)
|
||||
@ -30,7 +31,7 @@ void PSMTXScale(Mtx, float, float, float);
|
||||
void PSMTXScaleApply(const Mtx, Mtx, float, float, float);
|
||||
void PSMTXQuat(Mtx, const PSQuaternion*);
|
||||
void PSMTXMultVec(Mtx, Vec*, Vec*);
|
||||
void PSMTXMultVecSR(Mtx, Vec, Vec);
|
||||
void PSMTXMultVecSR(Mtx, Vec*, Vec*);
|
||||
/* TODO: Determine what these params are. */
|
||||
void PSMTXMultVecArraySR(Mtx, float*, float*, float*);
|
||||
void PSMTX44Copy(Mtx44, Mtx44);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Game/EnemyParmsBase.h"
|
||||
#include "Game/WalkSmokeEffect.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DModelLoader.h"
|
||||
#include "efx/TKkabuto.h"
|
||||
|
||||
/**
|
||||
|
@ -1,25 +1,30 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMBASE_H
|
||||
#define _JSYSTEM_J3D_J3DANMBASE_H
|
||||
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "types.h"
|
||||
#include "Dolphin/gx.h"
|
||||
|
||||
/**
|
||||
* @fabricated
|
||||
*/
|
||||
enum J3DAnmKind {
|
||||
CLUSTER = 3,
|
||||
CLUSTER_FULL = 12,
|
||||
CLUSTER_KEY = 13,
|
||||
COLOR = 1,
|
||||
COLOR_FULL = 10,
|
||||
COLOR_KEY = 11,
|
||||
TEV_REG_KEY = 5,
|
||||
TEXTURE_SRT_KEY = 4,
|
||||
TEX_PATTERN = 2,
|
||||
TRANSFORM = 0,
|
||||
TRANSFORM_FULL = 9,
|
||||
TRANSFORM_KEY = 8,
|
||||
VISIBILITY_FULL = 6,
|
||||
VTX_COLOR = 7,
|
||||
VTX_COLOR_FULL = 14,
|
||||
VTX_COLOR_KEY = 15
|
||||
J3DAnmKind_Cluster = 3,
|
||||
J3DAnmKind_ClusterFull = 12,
|
||||
J3DAnmKind_ClusterKey = 13,
|
||||
J3DAnmKind_Color = 1,
|
||||
J3DAnmKind_ColorFull = 10,
|
||||
J3DAnmKind_ColorKey = 11,
|
||||
J3DAnmKind_TevRegKey = 5,
|
||||
J3DAnmKind_TextureSRTKey = 4,
|
||||
J3DAnmKind_TexPattern = 2,
|
||||
J3DAnmKind_Transform = 0,
|
||||
J3DAnmKind_TransformFull = 9,
|
||||
J3DAnmKind_TransformKey = 8,
|
||||
J3DAnmKind_VisibilityFull = 6,
|
||||
J3DAnmKind_VtxColor = 7,
|
||||
J3DAnmKind_VtxColorFull = 14,
|
||||
J3DAnmKind_VtxColorKey = 15
|
||||
};
|
||||
|
||||
#pragma enumalwaysint off
|
||||
@ -28,13 +33,38 @@ enum J3DAnmAttr { J3DAA_UNKNOWN_0 = 0 };
|
||||
#pragma enumalwaysint reset
|
||||
|
||||
struct J3DAnmBase {
|
||||
virtual ~J3DAnmBase(); // _00
|
||||
virtual J3DAnmKind getKind() const = 0; // _04
|
||||
inline J3DAnmBase()
|
||||
: _04(0)
|
||||
, _05(0)
|
||||
, _06(0)
|
||||
, _08(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
// vtbl
|
||||
s16 m_04; // _04
|
||||
s16 m_time; // _08
|
||||
f32 m_fTime; // _0C
|
||||
virtual ~J3DAnmBase(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const = 0; // _0C
|
||||
|
||||
// vtable _00
|
||||
u8 _04; // _04
|
||||
u8 _05; // _05
|
||||
s16 _06; // _06
|
||||
float _08; // _08
|
||||
};
|
||||
|
||||
/**
|
||||
* @fabricated
|
||||
*/
|
||||
struct J3DAnmFullData : J3DFileBlockBase {
|
||||
u8 _08; // _08
|
||||
s16 _0A; // _0A
|
||||
u16 _0C; // _0C
|
||||
u16 _0E; // _0E
|
||||
};
|
||||
|
||||
struct J3DAnmKeyTableBase {
|
||||
u16 _00; // _00
|
||||
u16 _02; // _02
|
||||
s16 _04; // _04
|
||||
};
|
||||
|
||||
#endif
|
||||
|
65
include/JSystem/J3D/J3DAnmCluster.h
Normal file
65
include/JSystem/J3D/J3DAnmCluster.h
Normal file
@ -0,0 +1,65 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMCLUSTER_H
|
||||
#define _JSYSTEM_J3D_J3DANMCLUSTER_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmClusterFullTable;
|
||||
struct J3DAnmClusterKeyTable;
|
||||
|
||||
struct J3DAnmCluster : public J3DAnmBase {
|
||||
inline J3DAnmCluster()
|
||||
: _0C(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmCluster(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10 (weak)
|
||||
|
||||
f32* _0C; // _0C
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x14}
|
||||
*/
|
||||
struct J3DAnmClusterFull : public J3DAnmCluster {
|
||||
inline J3DAnmClusterFull()
|
||||
: _10(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmClusterFull(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10
|
||||
|
||||
J3DAnmClusterFullTable* _10; // _10
|
||||
};
|
||||
|
||||
struct J3DAnmClusterFullData : J3DAnmFullData {
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
};
|
||||
struct J3DAnmClusterFullTable { };
|
||||
|
||||
/**
|
||||
* @size{0x14}
|
||||
*/
|
||||
struct J3DAnmClusterKey : public J3DAnmCluster {
|
||||
inline J3DAnmClusterKey()
|
||||
: _10(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmClusterKey(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10
|
||||
|
||||
J3DAnmClusterKeyTable* _10; // _10
|
||||
};
|
||||
|
||||
struct J3DAnmClusterKeyData { };
|
||||
struct J3DAnmClusterKeyTable { };
|
||||
|
||||
#endif
|
109
include/JSystem/J3D/J3DAnmColor.h
Normal file
109
include/JSystem/J3D/J3DAnmColor.h
Normal file
@ -0,0 +1,109 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMCOLOR_H
|
||||
#define _JSYSTEM_J3D_J3DANMCOLOR_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/JUT/JUTNameTab.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmColorKeyTable;
|
||||
struct J3DAnmColorFullTable;
|
||||
|
||||
struct J3DAnmColor : public J3DAnmBase {
|
||||
inline J3DAnmColor()
|
||||
: _0C(0)
|
||||
, _0E(0)
|
||||
, _10(0)
|
||||
, _12(0)
|
||||
, _14(0)
|
||||
, _18(nullptr)
|
||||
, m_nameTab()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmColor(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, GXColor*) const; // _10 (weak)
|
||||
|
||||
void searchUpdateMaterialID(struct J3DModelData*);
|
||||
|
||||
u16 _0C; // _0C
|
||||
u16 _0E; // _0E
|
||||
u16 _10; // _10
|
||||
u16 _12; // _12
|
||||
u16 _14; // _14
|
||||
u16* _18; // _18
|
||||
JUTNameTab m_nameTab; // _1C
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x40}
|
||||
*/
|
||||
struct J3DAnmColorFull : public J3DAnmColor {
|
||||
inline J3DAnmColorFull()
|
||||
: _2C(nullptr)
|
||||
, _30(nullptr)
|
||||
, _34(nullptr)
|
||||
, _38(nullptr)
|
||||
, _3C(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmColorFull(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, GXColor*) const; // _10
|
||||
|
||||
u8* _2C; // _2C
|
||||
u8* _30; // _30
|
||||
u8* _34; // _34
|
||||
u8* _38; // _38
|
||||
J3DAnmColorFullTable* _3C; // _3C
|
||||
};
|
||||
|
||||
struct J3DAnmColorFullData : J3DAnmFullData {
|
||||
u8 _10[8]; // _10
|
||||
void* _18; // _18
|
||||
void* _1C; // _1C
|
||||
void* _20; // _20
|
||||
void* _24; // _24
|
||||
void* _28; // _28
|
||||
void* _2C; // _2C
|
||||
void* _30; // _30
|
||||
};
|
||||
|
||||
struct J3DAnmColorFullTable { };
|
||||
|
||||
/**
|
||||
* @size{0x40}
|
||||
*/
|
||||
struct J3DAnmColorKey : public J3DAnmColor {
|
||||
inline J3DAnmColorKey()
|
||||
: _2C(nullptr)
|
||||
, _30(nullptr)
|
||||
, _34(nullptr)
|
||||
, _38(nullptr)
|
||||
, m_table(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmColorKey(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, GXColor*) const; // _10
|
||||
|
||||
s16* _2C; // _2C
|
||||
s16* _30; // _30
|
||||
s16* _34; // _34
|
||||
s16* _38; // _38
|
||||
J3DAnmColorKeyTable* m_table; // _3C
|
||||
};
|
||||
|
||||
struct J3DAnmColorKeyData { };
|
||||
|
||||
/**
|
||||
* @size{0x18}
|
||||
*/
|
||||
struct J3DAnmColorKeyTable {
|
||||
J3DAnmKeyTableBase _00[4];
|
||||
};
|
||||
|
||||
#endif
|
@ -1,27 +1,68 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMLOADER_H
|
||||
#define _JSYSTEM_J3D_J3DANMLOADER_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DAnmCluster.h"
|
||||
#include "JSystem/J3D/J3DAnmColor.h"
|
||||
#include "JSystem/J3D/J3DAnmTevRegKey.h"
|
||||
#include "JSystem/J3D/J3DAnmTexPattern.h"
|
||||
#include "JSystem/J3D/J3DAnmTextureSRTKey.h"
|
||||
#include "JSystem/J3D/J3DAnmTransform.h"
|
||||
#include "JSystem/J3D/J3DAnmVisibilityFull.h"
|
||||
#include "JSystem/J3D/J3DAnmVtxColor.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
__vt__12J3DAnmLoader:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__12J3DAnmLoaderFv
|
||||
*/
|
||||
|
||||
namespace J3DAnmLoaderDataBase {
|
||||
void* load(const void*);
|
||||
J3DAnmBase* load(const void*);
|
||||
}
|
||||
|
||||
struct J3DAnmLoader {
|
||||
virtual void _00() = 0; // _00
|
||||
virtual void _04() = 0; // _04
|
||||
virtual ~J3DAnmLoader(); // _08
|
||||
virtual J3DAnmBase* load(const void*) = 0; // _08
|
||||
virtual void setResource(J3DAnmBase*, const void*) = 0; // _0C
|
||||
virtual ~J3DAnmLoader(); // _10 (weak)
|
||||
|
||||
// _00 VTBL
|
||||
J3DAnmBase* m_animation; // _04
|
||||
};
|
||||
|
||||
struct J3DAnmFullLoader_v15 : public J3DAnmLoader {
|
||||
virtual J3DAnmBase* load(const void*); // _08
|
||||
virtual void setResource(J3DAnmBase*, const void*); // _0C
|
||||
virtual ~J3DAnmFullLoader_v15(); // _10
|
||||
|
||||
J3DAnmFullLoader_v15();
|
||||
void readAnmTransform(const J3DAnmTransformFullData*);
|
||||
void setAnmTransform(J3DAnmTransformFull*, const J3DAnmTransformFullData*);
|
||||
void readAnmColor(const J3DAnmColorFullData*);
|
||||
void setAnmColor(J3DAnmColorFull*, const J3DAnmColorFullData*);
|
||||
void readAnmTexPattern(const J3DAnmTexPatternFullData*);
|
||||
void setAnmTexPattern(J3DAnmTexPattern*, const J3DAnmTexPatternFullData*);
|
||||
void readAnmVisibility(const J3DAnmVisibilityFullData*);
|
||||
void setAnmVisibility(J3DAnmVisibilityFull*, const J3DAnmVisibilityFullData*);
|
||||
void readAnmCluster(const J3DAnmClusterFullData*);
|
||||
void setAnmCluster(J3DAnmClusterFull*, const J3DAnmClusterFullData*);
|
||||
void readAnmVtxColor(const J3DAnmVtxColorFullData*);
|
||||
void setAnmVtxColor(J3DAnmVtxColorFull*, const J3DAnmVtxColorFullData*);
|
||||
};
|
||||
|
||||
struct J3DAnmKeyLoader_v15 : J3DAnmLoader {
|
||||
virtual J3DAnmBase* load(const void*); // _08
|
||||
virtual void setResource(J3DAnmBase*, const void*); // _0C
|
||||
virtual ~J3DAnmKeyLoader_v15(); // _10
|
||||
|
||||
J3DAnmKeyLoader_v15();
|
||||
void readAnmTransform(const J3DAnmTransformKeyData*);
|
||||
void setAnmTransform(J3DAnmTransformKey*, const J3DAnmTransformKeyData*);
|
||||
void readAnmTextureSRT(const J3DAnmTextureSRTKeyData*);
|
||||
void setAnmTextureSRT(J3DAnmTextureSRTKey*, const J3DAnmTextureSRTKeyData*);
|
||||
void readAnmColor(const J3DAnmColorKeyData*);
|
||||
void setAnmColor(J3DAnmColorKey*, const J3DAnmColorKeyData*);
|
||||
void readAnmCluster(const J3DAnmClusterKeyData*);
|
||||
void setAnmCluster(J3DAnmClusterKey*, const J3DAnmClusterKeyData*);
|
||||
void readAnmTevReg(const J3DAnmTevRegKeyData*);
|
||||
void setAnmTevReg(J3DAnmTevRegKey*, const J3DAnmTevRegKeyData*);
|
||||
void readAnmVtxColor(const J3DAnmVtxColorKeyData*);
|
||||
void setAnmVtxColor(J3DAnmVtxColorKey*, const J3DAnmVtxColorKeyData*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
100
include/JSystem/J3D/J3DAnmTevRegKey.h
Normal file
100
include/JSystem/J3D/J3DAnmTevRegKey.h
Normal file
@ -0,0 +1,100 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMTEVREGKEY_H
|
||||
#define _JSYSTEM_J3D_J3DANMTEVREGKEY_H
|
||||
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/JUT/JUTNameTab.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmCRegKeyTable;
|
||||
struct J3DAnmKRegKeyTable;
|
||||
|
||||
/**
|
||||
* @size{0x70}
|
||||
*/
|
||||
struct J3DAnmTevRegKey : public J3DAnmBase {
|
||||
inline J3DAnmTevRegKey()
|
||||
: _24()
|
||||
, _38()
|
||||
{
|
||||
m_countTevKColorAnm = 0;
|
||||
m_countTevColorAnm = 0;
|
||||
_16 = 0;
|
||||
_14 = 0;
|
||||
_12 = 0;
|
||||
_10 = 0;
|
||||
_1E = 0;
|
||||
_1C = 0;
|
||||
_1A = 0;
|
||||
_18 = 0;
|
||||
_34 = nullptr;
|
||||
_20 = nullptr;
|
||||
_5C = nullptr;
|
||||
_58 = nullptr;
|
||||
_54 = nullptr;
|
||||
_50 = nullptr;
|
||||
_6C = nullptr;
|
||||
_68 = nullptr;
|
||||
_64 = nullptr;
|
||||
_60 = nullptr;
|
||||
}
|
||||
|
||||
virtual ~J3DAnmTevRegKey(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800742D8}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnmLoader.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_TevRegKey;
|
||||
}
|
||||
|
||||
void getTevColorReg(unsigned short, GXColorS10*) const;
|
||||
void getTevKonstReg(unsigned short, GXColor*) const;
|
||||
void searchUpdateMaterialID(struct J3DModelData*);
|
||||
|
||||
u16 m_countTevColorAnm; // _0C
|
||||
u16 m_countTevKColorAnm; // _0E
|
||||
u16 _10; // _10
|
||||
u16 _12; // _12
|
||||
u16 _14; // _14
|
||||
u16 _16; // _16
|
||||
u16 _18; // _18
|
||||
u16 _1A; // _1A
|
||||
u16 _1C; // _1C
|
||||
u16 _1E; // _1E
|
||||
u16* _20; // _20
|
||||
JUTNameTab _24; // _24
|
||||
u16* _34; // _34
|
||||
JUTNameTab _38; // _38
|
||||
J3DAnmCRegKeyTable* _48; // _48
|
||||
J3DAnmKRegKeyTable* _4C; // _4C
|
||||
s16* _50; // _50
|
||||
s16* _54; // _54
|
||||
s16* _58; // _58
|
||||
s16* _5C; // _5C
|
||||
s16* _60; // _60
|
||||
s16* _64; // _64
|
||||
s16* _68; // _68
|
||||
s16* _6C; // _6C
|
||||
};
|
||||
|
||||
struct J3DAnmTevRegKeyData { };
|
||||
|
||||
/**
|
||||
* @size{0x1C}
|
||||
*/
|
||||
struct J3DAnmCRegKeyTable {
|
||||
J3DAnmKeyTableBase _00[4]; // _00
|
||||
u8 _18[0x4]; // _18
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x1C}
|
||||
*/
|
||||
struct J3DAnmKRegKeyTable {
|
||||
J3DAnmKeyTableBase _00[4]; // _00
|
||||
u8 _18[0x4]; // _18
|
||||
};
|
||||
|
||||
#endif
|
50
include/JSystem/J3D/J3DAnmTexPattern.h
Normal file
50
include/JSystem/J3D/J3DAnmTexPattern.h
Normal file
@ -0,0 +1,50 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMTEXPATTERN_H
|
||||
#define _JSYSTEM_J3D_J3DANMTEXPATTERN_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/JUT/JUTNameTab.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmTexPatternFullTable;
|
||||
|
||||
struct J3DAnmTexPattern : public J3DAnmBase {
|
||||
inline J3DAnmTexPattern()
|
||||
: _0C(nullptr)
|
||||
, _10(nullptr)
|
||||
, _14(0)
|
||||
, _16(0)
|
||||
, _18(nullptr)
|
||||
, _1C()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmTexPattern(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{80074248}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnmLoader.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_TexPattern;
|
||||
}
|
||||
|
||||
void getTexNo(unsigned short, unsigned short*) const;
|
||||
|
||||
u16* _0C; // _0C
|
||||
J3DAnmTexPatternFullTable* _10; // _10
|
||||
u16 _14; // _14
|
||||
u16 _16; // _16
|
||||
u16* _18; // _18
|
||||
JUTNameTab _1C; // _1C
|
||||
};
|
||||
|
||||
struct J3DAnmTexPatternFullData : J3DAnmFullData {
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
void* _18; // _18
|
||||
void* _1C; // _1C
|
||||
};
|
||||
struct J3DAnmTexPatternFullTable { };
|
||||
|
||||
#endif
|
81
include/JSystem/J3D/J3DAnmTextureSRTKey.h
Normal file
81
include/JSystem/J3D/J3DAnmTextureSRTKey.h
Normal file
@ -0,0 +1,81 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMTEXTURESRTKEY_H
|
||||
#define _JSYSTEM_J3D_J3DANMTEXTURESRTKEY_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DAnmTransform.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/JUT/JUTNameTab.h"
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @size{0x7C}
|
||||
*/
|
||||
struct J3DAnmTextureSRTKey : public J3DAnmBase {
|
||||
inline J3DAnmTextureSRTKey()
|
||||
: _30()
|
||||
, _64()
|
||||
{
|
||||
_0C = 0;
|
||||
_1A = 0;
|
||||
_18 = 0;
|
||||
_16 = 0;
|
||||
_14 = 0;
|
||||
_10 = nullptr;
|
||||
_24 = nullptr;
|
||||
_1C = nullptr;
|
||||
_20 = nullptr;
|
||||
_48 = 0;
|
||||
_46 = 0;
|
||||
_44 = 0;
|
||||
_4A = 0;
|
||||
_58 = nullptr;
|
||||
_54 = nullptr;
|
||||
_4C = nullptr;
|
||||
_50 = nullptr;
|
||||
_78 = 0;
|
||||
}
|
||||
|
||||
virtual ~J3DAnmTextureSRTKey(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{80074368}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnmLoader.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_TextureSRTKey;
|
||||
}
|
||||
|
||||
void calcTransform(float, unsigned short, struct J3DTextureSRTInfo*) const;
|
||||
void searchUpdateMaterialID(struct J3DModelData*);
|
||||
|
||||
u32 _0C; // _0C
|
||||
J3DAnmTransformKeyTable* _10; // _10
|
||||
u16 _14; // _14
|
||||
u16 _16; // _16
|
||||
u16 _18; // _18
|
||||
u16 _1A; // _1A
|
||||
f32* _1C; // _1C
|
||||
s16* _20; // _20
|
||||
f32* _24; // _24
|
||||
u8* _28; // _28
|
||||
u16* _2C; // _2C
|
||||
JUTNameTab _30; // _30
|
||||
JGeometry::TVec3f* _40; // _40
|
||||
u16 _44; // _44
|
||||
u16 _46; // _46
|
||||
u16 _48; // _48
|
||||
u16 _4A; // _4A
|
||||
f32* _4C; // _4C
|
||||
s16* _50; // _50
|
||||
f32* _54; // _54
|
||||
J3DAnmTransformKeyTable* _58; // _58
|
||||
u8* _5C; // _5C
|
||||
u16* _60; // _60
|
||||
JUTNameTab _64; // _64
|
||||
JGeometry::TVec3f* _74; // _74
|
||||
u32 _78; // _78
|
||||
};
|
||||
|
||||
struct J3DAnmTextureSRTKeyData { };
|
||||
|
||||
#endif
|
@ -1,30 +1,102 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMTRANSFORM_H
|
||||
#define _JSYSTEM_J3D_J3DANMTRANSFORM_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
__vt__15J3DAnmTransform:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__15J3DAnmTransformFv
|
||||
.4byte getKind__15J3DAnmTransformCFv
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
*/
|
||||
struct J3DTransformInfo;
|
||||
|
||||
struct J3DAnmTransform {
|
||||
virtual ~J3DAnmTransform(); // _00
|
||||
virtual void getKind() const; // _04
|
||||
virtual void _08() = 0; // _08
|
||||
virtual void _0C() = 0; // _0C
|
||||
struct J3DAnmTransformFullTable;
|
||||
struct J3DAnmTransformKeyTable;
|
||||
|
||||
u8 m_04;
|
||||
u8 m_05;
|
||||
s16 m_06;
|
||||
f32 m_08;
|
||||
struct J3DAnmTransform : public J3DAnmBase {
|
||||
inline J3DAnmTransform()
|
||||
: _0C(nullptr)
|
||||
, _10(nullptr)
|
||||
, _14(nullptr)
|
||||
, _18(0)
|
||||
, _1A(0)
|
||||
, _1C(0)
|
||||
, _1E(0)
|
||||
{
|
||||
}
|
||||
|
||||
// _00 VTBL
|
||||
virtual ~J3DAnmTransform(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{80069D3C}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnimation.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_Transform;
|
||||
}
|
||||
virtual void getTransform(unsigned short, J3DTransformInfo*) const = 0; // _10
|
||||
// virtual void _14() = 0; // _14
|
||||
|
||||
f32* _0C; // _0C
|
||||
s16* _10; // _10
|
||||
f32* _14; // _14
|
||||
u16 _18; // _18
|
||||
u16 _1A; // _1A
|
||||
u16 _1C; // _1C
|
||||
u16 _1E; // _1E
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x24}
|
||||
*/
|
||||
struct J3DAnmTransformFull : public J3DAnmTransform {
|
||||
inline J3DAnmTransformFull()
|
||||
: _20(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmTransformFull(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getTransform(unsigned short, J3DTransformInfo*) const; // _10
|
||||
|
||||
J3DAnmTransformFullTable* _20;
|
||||
};
|
||||
|
||||
struct J3DAnmTransformFullData : J3DAnmFullData {
|
||||
u8 _10[0x4]; // _10
|
||||
void* _14; // _14
|
||||
void* _18; // _18
|
||||
void* _1C; // _1C
|
||||
void* _20; // _20
|
||||
};
|
||||
struct J3DAnmTransformFullTable { };
|
||||
|
||||
/**
|
||||
* @size{0x28}
|
||||
*/
|
||||
struct J3DAnmTransformKey : public J3DAnmTransform {
|
||||
inline J3DAnmTransformKey()
|
||||
: J3DAnmTransform()
|
||||
, _20(0)
|
||||
, _24(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmTransformKey(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800743DC}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnmLoader.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_TransformKey;
|
||||
}
|
||||
virtual void getTransform(unsigned short, J3DTransformInfo*) const; // _10 (weak)
|
||||
|
||||
void calcTransform(float, unsigned short, J3DTransformInfo*) const;
|
||||
|
||||
int _20; // _20
|
||||
J3DAnmTransformKeyTable* _24; // _24
|
||||
};
|
||||
|
||||
struct J3DAnmTransformKeyData : public J3DAnmKeyTableBase { };
|
||||
struct J3DAnmTransformKeyTable : public J3DAnmKeyTableBase { };
|
||||
|
||||
#endif
|
||||
|
45
include/JSystem/J3D/J3DAnmVisibilityFull.h
Normal file
45
include/JSystem/J3D/J3DAnmVisibilityFull.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMVISIBILITYFULL_H
|
||||
#define _JSYSTEM_J3D_J3DANMVISIBILITYFULL_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/JUT/JUTNameTab.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmVisibilityFullTable;
|
||||
|
||||
/**
|
||||
* @size{0x18}
|
||||
*/
|
||||
struct J3DAnmVisibilityFull : public J3DAnmBase {
|
||||
inline J3DAnmVisibilityFull()
|
||||
: _0C(0)
|
||||
, _0E(0)
|
||||
, _10(nullptr)
|
||||
, _14(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmVisibilityFull(); // _08 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800741CC}
|
||||
* @reifiedFile{JSystem/J3D/J3DAnmLoader.cpp}
|
||||
*/
|
||||
virtual J3DAnmKind getKind() const // _0C (weak)
|
||||
{
|
||||
return J3DAnmKind_VisibilityFull;
|
||||
}
|
||||
|
||||
u16 _0C; // _0C
|
||||
u16 _0E; // _0E
|
||||
J3DAnmVisibilityFullTable* _10; // _10
|
||||
u8* _14; // _14
|
||||
};
|
||||
|
||||
struct J3DAnmVisibilityFullData : J3DAnmFullData {
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
};
|
||||
struct J3DAnmVisibilityFullTable { };
|
||||
|
||||
#endif
|
95
include/JSystem/J3D/J3DAnmVtxColor.h
Normal file
95
include/JSystem/J3D/J3DAnmVtxColor.h
Normal file
@ -0,0 +1,95 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DANMVTXCOLOR_H
|
||||
#define _JSYSTEM_J3D_J3DANMVTXCOLOR_H
|
||||
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DAnmColor.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAnmVtxColorIndexData {
|
||||
u8 _00[4]; // _00
|
||||
s32 _04; // _04
|
||||
};
|
||||
|
||||
struct J3DAnmVtxColor : public J3DAnmBase {
|
||||
inline J3DAnmVtxColor()
|
||||
: _0C(0)
|
||||
, _0E(0)
|
||||
, _10(nullptr)
|
||||
, _14(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmVtxColor(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, GXColor*) const; // _10 (weak)
|
||||
|
||||
u16 _0C; // _0C
|
||||
u16 _0E; // _0E
|
||||
J3DAnmVtxColorIndexData* _10; // _10
|
||||
J3DAnmVtxColorIndexData* _14; // _14
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x30}
|
||||
*/
|
||||
struct J3DAnmVtxColorFull : public J3DAnmVtxColor {
|
||||
// Note: This does not initialize all members, unlike most of the other J3DAnm*Key and J3DAnm*Full classes.
|
||||
inline J3DAnmVtxColorFull()
|
||||
: _18(nullptr)
|
||||
, _1C(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmVtxColorFull(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, GXColor*) const; // _10
|
||||
|
||||
J3DAnmColorFullTable* _18; // _18
|
||||
J3DAnmColorFullTable* _1C; // _1C
|
||||
u8* _20; // _20
|
||||
u8* _24; // _24
|
||||
u8* _28; // _28
|
||||
u8* _2C; // _2C
|
||||
};
|
||||
|
||||
struct J3DAnmVtxColorFullData : J3DAnmFullData {
|
||||
u8 _10[8]; // _10
|
||||
void* _18; // _18
|
||||
void* _1C; // _1C
|
||||
void* _20; // _20
|
||||
void* _24; // _24
|
||||
void* _28; // _28
|
||||
void* _2C; // _2C
|
||||
void* _30; // _30
|
||||
void* _34; // _34
|
||||
void* _38; // _38
|
||||
void* _3C; // _3C
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x30}
|
||||
*/
|
||||
struct J3DAnmVtxColorKey : public J3DAnmVtxColor {
|
||||
// Note: This does not initialize all members, unlike most of the other J3DAnm*Key and J3DAnm*Full classes.
|
||||
inline J3DAnmVtxColorKey()
|
||||
: _18(nullptr)
|
||||
, _1C(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~J3DAnmVtxColorKey(); // _08 (weak)
|
||||
virtual J3DAnmKind getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, GXColor*) const; // _10
|
||||
|
||||
J3DAnmColorKeyTable* _18; // _18
|
||||
J3DAnmColorKeyTable* _1C; // _1C
|
||||
s16* _20; // _20
|
||||
s16* _24; // _24
|
||||
s16* _28; // _28
|
||||
s16* _2C; // _2C
|
||||
};
|
||||
|
||||
struct J3DAnmVtxColorKeyData { };
|
||||
|
||||
#endif
|
185
include/JSystem/J3D/J3DColorBlock.h
Normal file
185
include/JSystem/J3D/J3DColorBlock.h
Normal file
@ -0,0 +1,185 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DCOLORBLOCK_H
|
||||
#define _JSYSTEM_J3D_J3DCOLORBLOCK_H
|
||||
|
||||
#include "JSystem/J3D/J3DGXColor.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DColorBlock {
|
||||
virtual void load(); // _08 (weak)
|
||||
virtual void reset(J3DColorBlock*); // _0C (weak)
|
||||
virtual void patch(); // _10 (weak)
|
||||
virtual void patchMatColor(); // _14 (weak)
|
||||
virtual void patchLight(); // _18 (weak)
|
||||
virtual void diff(unsigned long); // _1C (weak)
|
||||
virtual void diffMatColor(); // _20 (weak)
|
||||
virtual void diffLight(); // _24 (weak)
|
||||
virtual u32 countDLSize(); // _28 (weak)
|
||||
virtual JBlockType getType() = 0; // _2C
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual J3DGXColor* getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual J3DGXColor* getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual u8 getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual J3DColorChan* getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual J3DLightObj* getLight(unsigned long); // _64 (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual u8 getCullMode() const; // _70 (weak)
|
||||
virtual u32 getMatColorOffset() const; // _74 (weak)
|
||||
virtual u32 getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800617F4}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterial.cpp}
|
||||
*/
|
||||
virtual ~J3DColorBlock() {}; // _84 (weak)
|
||||
};
|
||||
|
||||
struct J3DColorBlockLightOff : public J3DColorBlock {
|
||||
inline J3DColorBlockLightOff()
|
||||
: J3DColorBlock()
|
||||
, _04()
|
||||
, m_colorChannels()
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual J3DGXColor* getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual u8 getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual J3DColorChan* getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual u8 getCullMode() const; // _70 (weak)
|
||||
virtual u32 getMatColorOffset() const; // _74 (weak)
|
||||
virtual u32 getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800616E0}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterial.cpp}
|
||||
*/
|
||||
virtual ~J3DColorBlockLightOff() {}; // _84 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DGXColor _04[2]; // _04
|
||||
u8 m_colorChannelNum; // _0C
|
||||
J3DColorChan m_colorChannels[4]; // _0E
|
||||
u8 m_cullMode; // _16
|
||||
u32 m_materialColorOffset; // _18
|
||||
u32 m_colorChannelOffset; // _1C
|
||||
};
|
||||
|
||||
struct J3DColorBlockAmbientOn : public J3DColorBlockLightOff {
|
||||
inline J3DColorBlockAmbientOn()
|
||||
: J3DColorBlockLightOff()
|
||||
, _20()
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual J3DGXColor* getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual ~J3DColorBlockAmbientOn() {}; // _84 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DGXColor _20[2]; // _20
|
||||
};
|
||||
|
||||
struct J3DColorBlockLightOn : public J3DColorBlock {
|
||||
inline J3DColorBlockLightOn()
|
||||
: J3DColorBlock()
|
||||
, _04()
|
||||
, _0C()
|
||||
, m_colorChannels()
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual J3DGXColor* getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual J3DGXColor* getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual u8 getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual J3DColorChan* getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual J3DLightObj* getLight(unsigned long); // _64 (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual u8 getCullMode() const; // _70 (weak)
|
||||
virtual u32 getMatColorOffset() const; // _74 (weak)
|
||||
virtual u32 getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
virtual ~J3DColorBlockLightOn() {}; // _84 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DGXColor _04[2]; // _04
|
||||
J3DGXColor _0C[2]; // _0C
|
||||
u8 m_colorChannelNum; // _14
|
||||
J3DColorChan m_colorChannels[4]; // _16
|
||||
J3DLightObj* _20; // _20
|
||||
u8 _24[0x1C]; // _24
|
||||
u8 m_cullMode; // _40
|
||||
u32 m_materialColorOffset; // _44
|
||||
u32 m_colorChannelOffset; // _48
|
||||
};
|
||||
|
||||
struct J3DColorBlockNull : public J3DColorBlock {
|
||||
virtual JBlockType getType(); // _2C (weak)
|
||||
/**
|
||||
* @reifiedAddress{8006F664}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterialFactory.cpp}
|
||||
*/
|
||||
virtual ~J3DColorBlockNull() {}; // _84 (weak)
|
||||
};
|
||||
|
||||
#endif
|
23
include/JSystem/J3D/J3DDisplayListObj.h
Normal file
23
include/JSystem/J3D/J3DDisplayListObj.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DDISPLAYLISTOBJ_H
|
||||
#define _JSYSTEM_J3D_J3DDISPLAYLISTOBJ_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
struct J3DDisplayListObj {
|
||||
u8* _00; // _00
|
||||
unkptr _04; // _04
|
||||
u32 _08; // _08
|
||||
int _0C; // _0C
|
||||
|
||||
int newDisplayList(u32);
|
||||
int newSingleDisplayList(u32);
|
||||
int single_To_Double();
|
||||
void setSingleDisplayList(void*, u32);
|
||||
void callDL() const;
|
||||
void beginDL();
|
||||
u32 endDL();
|
||||
void beginPatch();
|
||||
u32 endPatch();
|
||||
};
|
||||
|
||||
#endif
|
141
include/JSystem/J3D/J3DFileBlock.h
Normal file
141
include/JSystem/J3D/J3DFileBlock.h
Normal file
@ -0,0 +1,141 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DFILEBLOCK_H
|
||||
#define _JSYSTEM_J3D_J3DFILEBLOCK_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
struct J3DFileBlockBase;
|
||||
|
||||
/**
|
||||
* @fabricated
|
||||
* @size{0x20}
|
||||
*/
|
||||
struct J3DFileHeader {
|
||||
u32 m_j3dVersion; // _00
|
||||
u32 m_fileVersion; // _04
|
||||
u8 _08[4]; // _08
|
||||
u32 m_blockCount; // _0C
|
||||
u8 _10[0x10]; // _10
|
||||
|
||||
const J3DFileBlockBase* getFirstBlock() const { return reinterpret_cast<const J3DFileBlockBase*>(this + 1); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @fabricated
|
||||
* @size{0x8}
|
||||
*/
|
||||
struct J3DFileBlockBase {
|
||||
u32 m_blockType; // _00
|
||||
int m_size; // _04
|
||||
|
||||
const J3DFileBlockBase* getNext() const
|
||||
{
|
||||
return reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const u8*>(this) + this->m_size);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @fabricated
|
||||
*/
|
||||
enum J3DFileBlockType {
|
||||
J3DFBT_Draw = 'DRW1',
|
||||
J3DFBT_Envelope = 'EVP1',
|
||||
J3DFBT_Info = 'INF1',
|
||||
J3DFBT_Joint = 'JNT1',
|
||||
J3DFBT_MaterialV21 = 'MAT2',
|
||||
J3DFBT_Material = 'MAT3',
|
||||
J3DFBT_MaterialDL = 'MDL3',
|
||||
J3DFBT_Texture = 'TEX1',
|
||||
J3DFBT_Shape = 'SHP1',
|
||||
J3DFBT_Vertex = 'VTX1',
|
||||
|
||||
// Anm Block Types:
|
||||
J3DFBT_AnmTexPattern = 'TPT1',
|
||||
J3DFBT_AnmClusterFull = 'CLF1',
|
||||
J3DFBT_AnmTransformFull = 'ANF1',
|
||||
J3DFBT_AnmColorFull = 'PAF1',
|
||||
J3DFBT_AnmVtxColorFull = 'VCF1',
|
||||
J3DFBT_AnmVisibilityFull = 'VAF1',
|
||||
};
|
||||
|
||||
struct J3DDrawBlock : J3DFileBlockBase {
|
||||
/** @fabricated */
|
||||
// const u32 TypeID = 'DRW1';
|
||||
|
||||
u16 m_count; // _08
|
||||
void* _0C; // _0C
|
||||
void* _14; // _14
|
||||
};
|
||||
|
||||
struct J3DEnvelopeBlock : J3DFileBlockBase {
|
||||
/** Count of envelopes. */
|
||||
u16 m_count; // _08
|
||||
void* _0C; // _0C
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
void* _18; // _18
|
||||
};
|
||||
|
||||
struct J3DJointBlock : J3DFileBlockBase {
|
||||
u16 _08; // _08
|
||||
u32 _0C; // _0C
|
||||
u32 _10; // _10
|
||||
u32 _14; // _14
|
||||
};
|
||||
|
||||
struct J3DMaterialBlock : J3DFileBlockBase {
|
||||
u16 m_count; // _08
|
||||
void* _0C; // _0C
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
u8 _18[0x6C]; // _18
|
||||
};
|
||||
|
||||
struct J3DMaterialBlock_v21 : J3DFileBlockBase {
|
||||
u8 _08[0x70]; // _08
|
||||
};
|
||||
|
||||
struct J3DMaterialDLBlock : J3DFileBlockBase {
|
||||
u16 _08; // _08
|
||||
u32 : 0;
|
||||
u8 _0C[0x14]; // _0C
|
||||
u32 _20; // _20
|
||||
};
|
||||
|
||||
struct J3DModelInfoBlock : J3DFileBlockBase {
|
||||
u16 _08; // _08
|
||||
u32 _0C; // _0C
|
||||
u32 _10; // _10
|
||||
void* _14; // _14
|
||||
};
|
||||
|
||||
struct J3DShapeBlock : J3DFileBlockBase {
|
||||
u16 _08; // _08
|
||||
u32 _0C; // _0C
|
||||
u32 _10; // _10
|
||||
u32 _14; // _14
|
||||
u32 _18; // _18
|
||||
u32 _1C; // _1C
|
||||
u32 _20; // _20
|
||||
u32 _24; // _24
|
||||
u32 _28; // _28
|
||||
};
|
||||
|
||||
struct J3DTextureBlock : J3DFileBlockBase {
|
||||
u16 _08; // _08
|
||||
void* _0C; // _0C
|
||||
void* _10; // _10
|
||||
};
|
||||
|
||||
struct J3DVertexBlock : J3DFileBlockBase {
|
||||
/** @fabricated */
|
||||
// const u32 TypeID = 'VTX1';
|
||||
|
||||
void* _08; // _08
|
||||
void* _0C; // _0C
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
void* _18[2]; // _18
|
||||
void* _20[8]; // _20
|
||||
};
|
||||
|
||||
#endif
|
@ -4,12 +4,14 @@
|
||||
#include "types.h"
|
||||
|
||||
struct J3DFrameCtrl {
|
||||
virtual ~J3DFrameCtrl(); // _00
|
||||
virtual ~J3DFrameCtrl(); // _08 (weak)
|
||||
|
||||
void init(short);
|
||||
void update();
|
||||
|
||||
// _00 VTBL
|
||||
u8 m_attr; // _04
|
||||
u8 _05; // _05
|
||||
// TODO: Rename to m_startFrame
|
||||
short _06; // _06
|
||||
// TODO: Rename to m_endFrame
|
||||
|
@ -3,8 +3,12 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* probably rgba? could inherit Color4 or GXColor or something?
|
||||
*/
|
||||
struct J3DGXColor {
|
||||
// probably rgba? could inherit Color4 or GXColor or something?
|
||||
J3DGXColor();
|
||||
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
@ -12,8 +16,12 @@ struct J3DGXColor {
|
||||
};
|
||||
|
||||
struct J3DGXColorS10 {
|
||||
J3DGXColorS10();
|
||||
|
||||
u16 _00; // _00
|
||||
u16 _02; // _02
|
||||
u16 _04; // _04
|
||||
u16 _06; // _06
|
||||
};
|
||||
|
||||
#endif
|
||||
|
94
include/JSystem/J3D/J3DInd.h
Normal file
94
include/JSystem/J3D/J3DInd.h
Normal file
@ -0,0 +1,94 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DIND_H
|
||||
#define _JSYSTEM_J3D_J3DIND_H
|
||||
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DIndTexCoordScale {
|
||||
J3DIndTexCoordScale();
|
||||
~J3DIndTexCoordScale();
|
||||
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02[2]; // _02
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x1C}
|
||||
*/
|
||||
struct J3DIndTexMtx {
|
||||
J3DIndTexMtx();
|
||||
~J3DIndTexMtx();
|
||||
|
||||
u8 _00[0x1C]; // _00
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DIndTexOrder {
|
||||
J3DIndTexOrder();
|
||||
|
||||
u8 m_texCoordID; // _00
|
||||
u8 m_texMapID; // _01
|
||||
u8 _02; // _02
|
||||
u8 _03; // _03
|
||||
};
|
||||
|
||||
struct J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08 (weak)
|
||||
virtual void diff(unsigned long) = 0; // _0C
|
||||
virtual void load() = 0; // _10
|
||||
virtual u32 countDLSize(); // _14 (weak)
|
||||
virtual JBlockType getType() = 0; // _18
|
||||
virtual void setIndTexStageNum(unsigned char); // _1C (weak)
|
||||
virtual u8 getIndTexStageNum() const; // _20 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, J3DIndTexOrder); // _24 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, const J3DIndTexOrder*); // _28 (weak)
|
||||
virtual J3DIndTexOrder* getIndTexOrder(unsigned long); // _2C (weak)
|
||||
virtual void setIndTexMtx(unsigned long, const J3DIndTexMtx*); // _30 (weak)
|
||||
virtual void setIndTexMtx(unsigned long, J3DIndTexMtx); // _34 (weak)
|
||||
virtual J3DIndTexMtx* getIndTexMtx(unsigned long); // _38 (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*); // _3C (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, J3DIndTexCoordScale); // _40 (weak)
|
||||
virtual J3DIndTexCoordScale* getIndTexCoordScale(unsigned long); // _44 (weak)
|
||||
virtual ~J3DIndBlock(); // _48 (weak)
|
||||
};
|
||||
|
||||
struct J3DIndBlockFull : public J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08
|
||||
virtual void diff(unsigned long); // _0C
|
||||
virtual void load(); // _10
|
||||
virtual u32 countDLSize(); // _14
|
||||
virtual JBlockType getType(); // _18 (weak)
|
||||
virtual void setIndTexStageNum(unsigned char); // _1C (weak)
|
||||
virtual u8 getIndTexStageNum() const; // _20 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, J3DIndTexOrder); // _24 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, const J3DIndTexOrder*); // _28 (weak)
|
||||
virtual J3DIndTexOrder* getIndTexOrder(unsigned long); // _2C (weak)
|
||||
virtual void setIndTexMtx(unsigned long, const J3DIndTexMtx*); // _30 (weak)
|
||||
virtual void setIndTexMtx(unsigned long, J3DIndTexMtx); // _34 (weak)
|
||||
virtual J3DIndTexMtx* getIndTexMtx(unsigned long); // _38 (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*); // _3C (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, J3DIndTexCoordScale); // _40 (weak)
|
||||
virtual J3DIndTexCoordScale* getIndTexCoordScale(unsigned long); // _44 (weak)
|
||||
virtual ~J3DIndBlockFull(); // _48 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u8 m_indTexStageNum; // _04
|
||||
J3DIndTexOrder _05[4]; // _05
|
||||
u32 : 0;
|
||||
J3DIndTexMtx _18[3]; // _18
|
||||
J3DIndTexCoordScale _6C[4]; // _6C
|
||||
};
|
||||
|
||||
struct J3DIndBlockNull : public J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08 (weak)
|
||||
virtual void diff(unsigned long); // _0C (weak)
|
||||
virtual void load(); // _10 (weak)
|
||||
virtual JBlockType getType(); // _18 (weak)
|
||||
virtual ~J3DIndBlockNull(); // _48 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,9 +1,10 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DJOINT_H
|
||||
#define _JSYSTEM_J3D_J3DJOINT_H
|
||||
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/JMath.h"
|
||||
#include "types.h"
|
||||
#include "Quat.h"
|
||||
#include "Vector3.h"
|
||||
#include "JSystem/J3D/J3DMtxCalc.h"
|
||||
|
||||
struct J3DMaterial;
|
||||
@ -38,22 +39,20 @@ struct J3DJoint {
|
||||
*/
|
||||
J3DJoint* getChild() { return m_child; }
|
||||
|
||||
u32 _00; // _00
|
||||
J3DJointCallBack* m_function; // _04
|
||||
u32 _08; // _08
|
||||
J3DJoint* m_child; // _0C
|
||||
J3DJoint* m_parent; // _10
|
||||
u16 m_jointIdx; // _14
|
||||
s8 _16; // _16
|
||||
s8 m_ignoreParentScaling; // _17
|
||||
Vector3f m_scale; // _18
|
||||
s16 m_eulerRot[3]; // _24
|
||||
Quat m_zRotation; // _2C
|
||||
Quat m_yRotation; // _3C
|
||||
u32 _4C; // _4C
|
||||
u32 _50; // _50
|
||||
J3DMtxCalcAnmBase* m_mtxCalc; // _54
|
||||
J3DMaterial* m_material; // _58
|
||||
u32 _00; // _00
|
||||
J3DJointCallBack* m_function; // _04
|
||||
u32 _08; // _08
|
||||
J3DJoint* m_child; // _0C
|
||||
J3DJoint* m_parent; // _10
|
||||
u16 m_jointIdx; // _14
|
||||
s8 _16; // _16
|
||||
u8 m_ignoreParentScaling; // _17
|
||||
J3DTransformInfo m_transformInfo; // _18
|
||||
f32 _38; // _38
|
||||
JGeometry::TVec3f m_yRotation; // _3C
|
||||
JGeometry::TVec3f _48; // _48
|
||||
J3DMtxCalcAnmBase* m_mtxCalc; // _54
|
||||
J3DMaterial* m_material; // _58
|
||||
|
||||
static J3DMtxCalc* sCurrentMtxCalc;
|
||||
};
|
||||
|
@ -5,7 +5,10 @@
|
||||
|
||||
struct J3DJoint;
|
||||
|
||||
struct J3DJointBlock {
|
||||
/**
|
||||
* TODO: This was previously called J3DJointBlock. It's not that, though. Not sure what it is....
|
||||
*/
|
||||
struct J3DJointBlockExceptNotReally {
|
||||
J3DJoint* m_joint; // _00
|
||||
s32 dataSize; // _04
|
||||
u16 jointCount; // _08
|
||||
|
30
include/JSystem/J3D/J3DJointFactory.h
Normal file
30
include/JSystem/J3D/J3DJointFactory.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DJOINTFACTORY_H
|
||||
#define _JSYSTEM_J3D_J3DJOINTFACTORY_H
|
||||
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/J3D/J3DJoint.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DJointInitData;
|
||||
|
||||
struct J3DJointFactory {
|
||||
J3DJointFactory(const J3DJointBlock& block);
|
||||
J3DJoint* create(int jointIndex);
|
||||
|
||||
J3DJointInitData* m_initData; // _00
|
||||
/** Indices into m_initData, indexed by joint number. */
|
||||
u16* m_indexMap; // _04
|
||||
};
|
||||
|
||||
struct J3DJointInitData {
|
||||
u16 _00; // _00
|
||||
s8 m_ignoreParentScaling; // _02
|
||||
J3DTransformInfo m_transformInfo; // _04
|
||||
f32 _24; // _24
|
||||
JGeometry::TVec3f _28; // _28
|
||||
JGeometry::TVec3f _34; // _34
|
||||
};
|
||||
|
||||
#endif
|
@ -19,7 +19,11 @@ struct J3DJointTree {
|
||||
J3DJointTree();
|
||||
|
||||
virtual void calc(J3DMtxBuffer*, const Vec&, const float (&)[3][4]); // _08
|
||||
virtual ~J3DJointTree(); // _0C (weak)
|
||||
/**
|
||||
* @reifiedAddress{80083874}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelData.cpp}
|
||||
*/
|
||||
virtual ~J3DJointTree() {}; // _0C (weak)
|
||||
|
||||
// virtual void _010() = 0; // _010
|
||||
|
||||
@ -37,11 +41,11 @@ struct J3DJointTree {
|
||||
J3DJoint** m_joints; // _18
|
||||
u16 m_jointCnt; // _1C
|
||||
u16 m_envelopeCnt; // _1E
|
||||
u32 _20; // _20
|
||||
u8* _20; // _20
|
||||
u32 m_maxBillBoardCnt; // _24
|
||||
s8* _28; // _28
|
||||
u16* _2C; // _2C
|
||||
u32 _30; // _30
|
||||
float* _28; // _28
|
||||
Mtx* _2C; // _2C
|
||||
u16* _30; // _30
|
||||
J3DDrawMtxData m_mtxData; // _34
|
||||
u32 _40; // _40
|
||||
JUTNameTab* m_nametab; // _44
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "types.h"
|
||||
|
||||
struct J3DMatColorAnm {
|
||||
J3DMatColorAnm();
|
||||
|
||||
u16 _00; // _00
|
||||
u16 _02; // _02
|
||||
u16 _04; // _04
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DMATERIAL_H
|
||||
#define _JSYSTEM_J3D_J3DMATERIAL_H
|
||||
|
||||
#include "JSystem/J3D/J3DTevColorAnm.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/J3D/J3DTexture.h"
|
||||
#include "types.h"
|
||||
@ -16,7 +17,6 @@ struct J3DMaterialAnm;
|
||||
struct J3DPEBlock;
|
||||
struct J3DShape;
|
||||
struct J3DTevBlock;
|
||||
struct J3DTevColorAnm;
|
||||
struct J3DTexGenBlock;
|
||||
struct J3DTexMtxAnm;
|
||||
struct J3DTexture;
|
||||
@ -26,7 +26,17 @@ struct JUTNameTab;
|
||||
* @size{0x4C}
|
||||
*/
|
||||
struct J3DMaterial {
|
||||
J3DMaterial();
|
||||
/**
|
||||
* @reifiedAddress{80070C54}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
inline J3DMaterial()
|
||||
: _40(0x3CF3CF00)
|
||||
, _44(0x00F3CF3C)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
~J3DMaterial();
|
||||
|
||||
virtual void calc(const float (*)[4]); // _00
|
||||
@ -41,36 +51,39 @@ struct J3DMaterial {
|
||||
virtual void change(); // _24
|
||||
|
||||
void calcCurrentMtx();
|
||||
u32 calcSizePEBlock(J3DModelLoaderFlags, u32);
|
||||
u32 calcSizeTevBlock(int);
|
||||
u32 calcSizeTexGenBlock(J3DModelLoaderFlags);
|
||||
static u32 calcSizeColorBlock(u32);
|
||||
static u32 calcSizeIndBlock(int);
|
||||
static u32 calcSizePEBlock(J3DModelLoaderFlags, u32);
|
||||
static u32 calcSizeTexGenBlock(u32);
|
||||
static u32 calcSizeTevBlock(int);
|
||||
u32 countDLSize();
|
||||
J3DColorBlock* createColorBlock(u32);
|
||||
J3DIndBlock* createIndBlock(int);
|
||||
J3DPEBlock* createPEBlock(u32, u32);
|
||||
J3DTevBlock* createTevBlock(int);
|
||||
J3DTexGenBlock* createTexGenBlock(u32);
|
||||
static J3DColorBlock* createColorBlock(u32);
|
||||
static J3DIndBlock* createIndBlock(int);
|
||||
static J3DPEBlock* createPEBlock(u32, u32);
|
||||
static J3DTevBlock* createTevBlock(int);
|
||||
static J3DTexGenBlock* createTexGenBlock(u32);
|
||||
void initialize();
|
||||
int newSharedDisplayList(u32);
|
||||
int newSingleSharedDisplayList(u32);
|
||||
void setCurrentMtx();
|
||||
|
||||
// VTBL _00
|
||||
J3DMaterial* _04; // _04
|
||||
J3DShape* m_shape; // _08
|
||||
J3DJoint* m_joint; // _0C
|
||||
u32 _10; // _10
|
||||
short _14; // _14
|
||||
u32 _18; // _18
|
||||
u8 _1C[4]; // _1C
|
||||
J3DDisplayListObj* _20; // _20
|
||||
J3DMaterial* _04; // _04
|
||||
J3DShape* m_shape; // _08
|
||||
J3DJoint* m_joint; // _0C
|
||||
u32 _10; // _10
|
||||
short _14; // _14
|
||||
u32 _18; // _18
|
||||
u8 _1C[4]; // _1C
|
||||
/* RAM address of display list divided by 16? */
|
||||
u32 _20; // _20
|
||||
J3DColorBlock* m_colorBlock; // _24
|
||||
J3DTexGenBlock* m_texGenBlock; // _28
|
||||
J3DTevBlock* m_tevBlock; // _2C
|
||||
J3DIndBlock* m_indBlock; // _30
|
||||
J3DPEBlock* m_peBlock; // _34
|
||||
J3DMaterial* _38; // _38
|
||||
J3DMaterialAnm* m_anm; // _3C
|
||||
J3DMaterialAnm* _3C; // _3C
|
||||
u32 _40; // _40
|
||||
u32 _44; // _44
|
||||
J3DDisplayListObj* _48; // _48
|
||||
@ -127,6 +140,7 @@ struct J3DMaterialTable {
|
||||
void removeTexMtxAnimator(J3DAnmTextureSRTKey*);
|
||||
|
||||
void allocTevRegAnimator(J3DAnmTevRegKey*, J3DTevColorAnm**);
|
||||
void allocTevRegAnimator(J3DAnmTevRegKey*, J3DTevColorAnm**, J3DTevKColorAnm**);
|
||||
void entryTevRegAnimator(J3DAnmTevRegKey*);
|
||||
void removeTevRegAnimator(J3DAnmTevRegKey*);
|
||||
|
||||
|
242
include/JSystem/J3D/J3DMaterialFactory.h
Normal file
242
include/JSystem/J3D/J3DMaterialFactory.h
Normal file
@ -0,0 +1,242 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DMATERIALFACTORY_H
|
||||
#define _JSYSTEM_J3D_J3DMATERIALFACTORY_H
|
||||
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DAlphaCompInfo {
|
||||
u8 _00[0x5]; // _00
|
||||
};
|
||||
|
||||
struct J3DBlendInfo {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
u8 _03; // _03
|
||||
};
|
||||
|
||||
struct J3DColorChanInfo {
|
||||
u8 _00[0x8]; // _00
|
||||
};
|
||||
|
||||
struct J3DCurrentMtxInfo { };
|
||||
|
||||
struct J3DDisplayListInit { };
|
||||
|
||||
struct J3DFogInfo {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u16 _02; // _02
|
||||
float _04; // _04
|
||||
float _08; // _08
|
||||
float _0C; // _0C
|
||||
float _10; // _10
|
||||
u8 _14; // _14
|
||||
u8 _15; // _15
|
||||
u8 _16; // _16
|
||||
u16 _18[0xA]; // _18
|
||||
};
|
||||
|
||||
struct J3DIndInitData {
|
||||
u8 _00[0x88]; // _00
|
||||
};
|
||||
|
||||
struct J3DLightInfo { };
|
||||
|
||||
struct J3DPatchingInfo { };
|
||||
|
||||
struct J3DTevOrderInfo {
|
||||
u8 m_texCoordID; // _00
|
||||
u8 m_texMapID; // _01
|
||||
u8 m_channelID; // _02
|
||||
};
|
||||
|
||||
struct J3DTevStageInfo {
|
||||
u8 _00[0x13]; // _00
|
||||
};
|
||||
|
||||
struct J3DTevSwapModeInfo {
|
||||
u32 _00;
|
||||
};
|
||||
|
||||
struct J3DTevSwapModeTableInfo { };
|
||||
|
||||
struct J3DTexCoordInfo {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
};
|
||||
|
||||
struct J3DTexCoord2Info { };
|
||||
|
||||
struct J3DTexMtxInfo {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
float _04; // _04
|
||||
float _08; // _08
|
||||
float _0C; // _0C
|
||||
float _10; // _10
|
||||
float _14; // _14
|
||||
u16 _18; // _18
|
||||
float _1C; // _1C
|
||||
float _20; // _20
|
||||
float _24; // _24
|
||||
float _28; // _28
|
||||
float _2C; // _2C
|
||||
float _30; // _30
|
||||
float _34; // _34
|
||||
float _38; // _38
|
||||
float _3C; // _3C
|
||||
float _40; // _40
|
||||
float _44; // _44
|
||||
float _48; // _48
|
||||
float _4C; // _4C
|
||||
float _50; // _50
|
||||
float _54; // _54
|
||||
float _58; // _58
|
||||
float _5C; // _5C
|
||||
float _60; // _60
|
||||
};
|
||||
|
||||
struct J3DZModeInfo {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x14C}
|
||||
*/
|
||||
struct J3DMaterialInitData {
|
||||
u8 _00[0x14C]; // _00
|
||||
};
|
||||
|
||||
struct J3DMaterialFactory {
|
||||
enum MaterialType { NORMAL = 0, LOCKED, PATCHED };
|
||||
|
||||
J3DMaterialFactory(const J3DMaterialBlock& block);
|
||||
J3DMaterialFactory(const J3DMaterialDLBlock& block);
|
||||
|
||||
u32 calcSize(J3DMaterial*, MaterialType, int, u32) const;
|
||||
u32 calcSizeNormalMaterial(J3DMaterial*, int, u32) const;
|
||||
u32 calcSizePatchedMaterial(J3DMaterial*, int, u32) const;
|
||||
u32 calcSizeLockedMaterial(J3DMaterial*, int, u32) const;
|
||||
u32 countUniqueMaterials();
|
||||
J3DMaterial* create(J3DMaterial*, MaterialType, int, u32) const;
|
||||
J3DMaterial* createNormalMaterial(J3DMaterial*, int, u32) const;
|
||||
J3DLockedMaterial* createLockedMaterial(J3DMaterial*, int, u32) const;
|
||||
J3DPatchedMaterial* createPatchedMaterial(J3DMaterial*, int, unsigned long) const;
|
||||
void newAlphaComp(int) const;
|
||||
void newAmbColor(int, int) const;
|
||||
void newBlend(int) const;
|
||||
void newColorChan(int, int) const;
|
||||
void newColorChanNum(int) const;
|
||||
void newCullMode(int) const;
|
||||
void newDither(int) const;
|
||||
void newFog(int) const;
|
||||
void newIndTexCoordScale(int, int) const;
|
||||
void newIndTexMtx(int, int) const;
|
||||
void newIndTexOrder(int, int) const;
|
||||
void newIndTexStageNum(int) const;
|
||||
void newIndTevStage(int, int) const;
|
||||
void newMatColor(int, int) const;
|
||||
void newNBTScale(int) const;
|
||||
void newTevColor(int, int) const;
|
||||
void newTevKColor(int, int) const;
|
||||
void newTevOrder(int, int) const;
|
||||
void newTevStage(int, int) const;
|
||||
void newTevStageNum(int) const;
|
||||
void newTevSwapModeTable(int, int) const;
|
||||
void newTexCoord(int, int) const;
|
||||
void newTexGenNum(int) const;
|
||||
void newTexMtx(int, int) const;
|
||||
void newTexNo(int, int) const;
|
||||
void newZCompLoc(int) const;
|
||||
void newZMode(int) const;
|
||||
void modifyPatchedCurrentMtx(J3DMaterial*, int) const;
|
||||
|
||||
u8 _00[4]; // _00
|
||||
|
||||
J3DMaterialInitData* _04; // _04
|
||||
u16* _08; // _08
|
||||
J3DIndInitData* _0C; // _0C
|
||||
GXColor* _10; // _10
|
||||
u8* _14; // _14
|
||||
J3DColorChanInfo* _18; // _18
|
||||
GXColor* _1C; // _1C
|
||||
J3DLightInfo* _20; // _20
|
||||
u8* _24; // _24
|
||||
J3DTexCoordInfo* _28; // _28
|
||||
J3DTexCoord2Info* _2C; // _2C
|
||||
J3DTexMtxInfo* _30; // _30
|
||||
J3DTexMtxInfo* _34; // _34
|
||||
u16* _38; // _38
|
||||
_GXCullMode* _3C; // _3C
|
||||
J3DTevOrderInfo* _40; // _40
|
||||
GXColorS10* _44; // _44
|
||||
GXColor* _48; // _48
|
||||
u8* _4C; // _4C
|
||||
J3DTevStageInfo* _50; // _50
|
||||
J3DTevSwapModeInfo* _54; // _54
|
||||
J3DTevSwapModeTableInfo* _58; // _58
|
||||
J3DFogInfo* _5C; // _5C
|
||||
J3DAlphaCompInfo* _60; // _60
|
||||
J3DBlendInfo* _64; // _64
|
||||
J3DZModeInfo* _68; // _68
|
||||
u8* _6C; // _6C
|
||||
u8* _70; // _70
|
||||
J3DNBTScaleInfo* _74; // _74
|
||||
J3DDisplayListInit* _78; // _78
|
||||
J3DPatchingInfo* _7C; // _7C
|
||||
J3DCurrentMtxInfo* _80; // _80
|
||||
u8* _84; // _84
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x138}
|
||||
*/
|
||||
struct J3DMaterialInitData_v21 {
|
||||
u8 _00[0x138]; // _00
|
||||
};
|
||||
|
||||
struct J3DMaterialFactory_v21 {
|
||||
u8 _00[4]; // _00
|
||||
|
||||
J3DMaterialInitData_v21* _04; // _04
|
||||
void* _08; // _08
|
||||
void* _0C; // _0C
|
||||
void* _10; // _10
|
||||
void* _14; // _14
|
||||
void* _18; // _18
|
||||
void* _1C; // _1C
|
||||
void* _20; // _20
|
||||
void* _24; // _24
|
||||
void* _28; // _28
|
||||
void* _2C; // _2C
|
||||
void* _30; // _30
|
||||
void* _34; // _34
|
||||
void* _38; // _38
|
||||
void* _3C; // _3C
|
||||
void* _40; // _40
|
||||
void* _44; // _44
|
||||
void* _48; // _48
|
||||
void* _4C; // _4C
|
||||
void* _50; // _50
|
||||
void* _54; // _54
|
||||
void* _58; // _58
|
||||
void* _5C; // _5C
|
||||
void* _60; // _60
|
||||
void* _64; // _64
|
||||
void* _68; // _68
|
||||
void* _6C; // _6C
|
||||
void* _70; // _70
|
||||
void* _74; // _74
|
||||
void* _78; // _78
|
||||
void* _7C; // _7C
|
||||
void* _80; // _80
|
||||
void* _84; // _84
|
||||
};
|
||||
|
||||
#endif
|
@ -26,7 +26,11 @@ struct J3DVtxColorCalc;
|
||||
struct J3DModelData {
|
||||
J3DModelData();
|
||||
|
||||
virtual ~J3DModelData(); // _00
|
||||
/**
|
||||
* @reifiedAddress{80083BB4}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
virtual ~J3DModelData() {}; // _00
|
||||
|
||||
void clear();
|
||||
void newSharedDisplayList(u32);
|
||||
@ -40,7 +44,7 @@ struct J3DModelData {
|
||||
inline u16 getMaterialCount1() { return m_materialTable.m_count1; }
|
||||
|
||||
// VTBL _00
|
||||
u8* m_bmd; // _04
|
||||
const void* m_bmd; // _04
|
||||
u32 m_modelLoaderFlags; // _08
|
||||
u16 _0C; // _0C
|
||||
u16 m_jointSet; // _0E
|
||||
@ -70,14 +74,19 @@ struct J3DModel {
|
||||
virtual void calcMaterial(); // _14
|
||||
virtual void calcDiffTexMtx(); // _18
|
||||
virtual void viewCalc(); // _1C
|
||||
virtual ~J3DModel(); // _20
|
||||
|
||||
/**
|
||||
* @reifiedAddress{800675CC}
|
||||
* @reifiedFile{JSystem/J3D/J3DModel.cpp}
|
||||
*/
|
||||
virtual ~J3DModel() {}; // _20
|
||||
|
||||
void initialize();
|
||||
void entryModelData(J3DModelData*, unsigned long, unsigned long);
|
||||
J3DShapePacket* createShapePacket(J3DModelData*);
|
||||
J3DMatPacket* createMatPacket(J3DModelData*, unsigned long);
|
||||
void newDifferedDisplayList(unsigned long);
|
||||
void newDifferedTexMtx(J3DTexDiffFlag);
|
||||
int entryModelData(J3DModelData*, u32, u32);
|
||||
int createShapePacket(J3DModelData*);
|
||||
int createMatPacket(J3DModelData*, u32);
|
||||
int newDifferedDisplayList(u32);
|
||||
int newDifferedTexMtx(J3DTexDiffFlag);
|
||||
void lock();
|
||||
void makeDL();
|
||||
void diff();
|
||||
@ -109,13 +118,8 @@ struct J3DModel {
|
||||
};
|
||||
|
||||
struct J3DModelHierarchy {
|
||||
short _00;
|
||||
short _02;
|
||||
};
|
||||
|
||||
struct J3DModelLoaderDataBase {
|
||||
static J3DModelData* load(const void*, u32);
|
||||
static J3DModelData* loadBinaryDisplayList(const void*, u32);
|
||||
u16 _00;
|
||||
u16 _02;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
105
include/JSystem/J3D/J3DModelLoader.h
Normal file
105
include/JSystem/J3D/J3DModelLoader.h
Normal file
@ -0,0 +1,105 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DMODELLOADER_H
|
||||
#define _JSYSTEM_J3D_J3DMODELLOADER_H
|
||||
|
||||
#include "types.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
|
||||
struct J3DMaterialTable;
|
||||
struct J3DModelData;
|
||||
struct J3DModelHierarchy;
|
||||
|
||||
struct J3DModelLoaderDataBase {
|
||||
static J3DModelData* load(const void*, u32);
|
||||
static J3DModelData* loadBinaryDisplayList(const void*, u32);
|
||||
};
|
||||
|
||||
struct J3DModelLoader {
|
||||
inline J3DModelLoader()
|
||||
: m_modelData(nullptr)
|
||||
, m_materialTable(nullptr)
|
||||
, m_shapeBlock(nullptr)
|
||||
, m_materialBlock(nullptr)
|
||||
, m_hierarchy(nullptr)
|
||||
, _18(0)
|
||||
, _1A(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual J3DModelData* load(const void*, u32); // _08
|
||||
virtual J3DMaterialTable* loadMaterialTable(const void*); // _0C
|
||||
virtual J3DModelData* loadBinaryDisplayList(const void*, u32); // _10
|
||||
virtual int calcLoadSize(const void*, u32); // _14
|
||||
virtual int calcLoadMaterialTableSize(const void*); // _18
|
||||
virtual int calcLoadBinaryDisplayListSize(const void*, u32); // _1C
|
||||
virtual u16 countMaterialNum(const void*); // _20
|
||||
virtual void setupBBoardInfo(); // _24
|
||||
/**
|
||||
* @reifiedAddress{8006FAA0}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
virtual ~J3DModelLoader() {}; // _28 (weak)
|
||||
virtual void readMaterial(const J3DMaterialBlock*, u32); // _2C (weak)
|
||||
virtual void readMaterial_v21(const J3DMaterialBlock_v21*, u32); // _30 (weak)
|
||||
virtual void readMaterialTable(const J3DMaterialBlock*, u32); // _34 (weak)
|
||||
virtual void readMaterialTable_v21(const J3DMaterialBlock_v21*, u32); // _38 (weak)
|
||||
virtual u32 calcSizeMaterial(const J3DMaterialBlock*, u32); // _3C (weak)
|
||||
virtual u32 calcSizeMaterialTable(const J3DMaterialBlock*, u32); // _40 (weak)
|
||||
|
||||
void readInformation(const J3DModelInfoBlock*, u32);
|
||||
void readVertex(const J3DVertexBlock*);
|
||||
void readEnvelop(const J3DEnvelopeBlock*);
|
||||
void readDraw(const J3DDrawBlock*);
|
||||
void readJoint(const J3DJointBlock*);
|
||||
void readShape(const J3DShapeBlock*, u32);
|
||||
void readTexture(const J3DTextureBlock*);
|
||||
void readTextureTable(const J3DTextureBlock*);
|
||||
void readPatchedMaterial(const J3DMaterialBlock*, u32);
|
||||
void readMaterialDL(const J3DMaterialDLBlock*, u32);
|
||||
void modifyMaterial(u32);
|
||||
int calcSizeInformation(const J3DModelInfoBlock*, u32);
|
||||
int calcSizeJoint(const J3DJointBlock*);
|
||||
int calcSizeEnvelope(const J3DEnvelopeBlock*);
|
||||
int calcSizeDraw(const J3DDrawBlock*);
|
||||
int calcSizeShape(const J3DShapeBlock*, u32);
|
||||
int calcSizeTexture(const J3DTextureBlock*);
|
||||
int calcSizeTextureTable(const J3DTextureBlock*);
|
||||
int calcSizePatchedMaterial(const J3DMaterialBlock*, u32);
|
||||
int calcSizeMaterialDL(const J3DMaterialDLBlock*, u32);
|
||||
|
||||
// VT _00
|
||||
J3DModelData* m_modelData; // _04
|
||||
J3DMaterialTable* m_materialTable; // _08
|
||||
J3DShapeBlock* m_shapeBlock; // _0C
|
||||
const J3DMaterialBlock* m_materialBlock; // _10
|
||||
J3DModelHierarchy* m_hierarchy; // _14
|
||||
u8 _18; // _18
|
||||
u16 _1A; // _1A
|
||||
};
|
||||
|
||||
struct J3DModelLoader_v21 : public J3DModelLoader {
|
||||
inline J3DModelLoader_v21() { }
|
||||
|
||||
/**
|
||||
* @reifiedAddress{8006FA44}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
virtual ~J3DModelLoader_v21() {}; // _28 (weak)
|
||||
virtual void readMaterial_v21(const J3DMaterialBlock_v21*, unsigned long); // _30
|
||||
virtual void readMaterialTable_v21(const J3DMaterialBlock_v21*, unsigned long); // _38
|
||||
};
|
||||
|
||||
struct J3DModelLoader_v26 : public J3DModelLoader {
|
||||
inline J3DModelLoader_v26() { }
|
||||
|
||||
/**
|
||||
* @reifiedAddress{8006F9E8}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
virtual ~J3DModelLoader_v26() {}; // _28 (weak)
|
||||
virtual void readMaterial(const J3DMaterialBlock*, unsigned long); // _2C
|
||||
virtual void readMaterialTable(const J3DMaterialBlock*, unsigned long); // _34
|
||||
virtual u32 calcSizeMaterial(const J3DMaterialBlock*, unsigned long); // _3C
|
||||
virtual u32 calcSizeMaterialTable(const J3DMaterialBlock*, unsigned long); // _40
|
||||
};
|
||||
|
||||
#endif
|
@ -11,35 +11,41 @@
|
||||
struct J3DMtxBufferParent {
|
||||
struct J3DJointTree* m_jointTree; // _00
|
||||
u8* _04; // _04
|
||||
unknown _08; // _08
|
||||
u8* _08; // _08
|
||||
Mtx* m_worldMatrices; // _0C
|
||||
Mtx* _10; // _10
|
||||
Mtx** _14; // _14
|
||||
Mtx** _18; // _18
|
||||
unknown** _1C; // _1C
|
||||
unknown** _20; // _20
|
||||
unknown _24; // _24
|
||||
unknown** _28; // _28
|
||||
Mtx** _14[2]; // _14
|
||||
Mtx33** _1C[2]; // _1C
|
||||
Mtx33*** _24[2]; // _24
|
||||
u32 m_modelType; // _2C
|
||||
u32 m_currentViewNumber; // _30
|
||||
};
|
||||
|
||||
struct J3DMtxBuffer : public J3DMtxBufferParent {
|
||||
virtual ~J3DMtxBuffer(); // _00
|
||||
inline J3DMtxBuffer() { initialize(); }
|
||||
|
||||
/**
|
||||
* @reifiedAddress{80067630}
|
||||
* @reifiedFile{JSystem/J3D/J3DModel.cpp}
|
||||
*/
|
||||
virtual ~J3DMtxBuffer() {}; // _00
|
||||
|
||||
void initialize();
|
||||
void create(struct J3DModelData*, unsigned long);
|
||||
void createAnmMtx(struct J3DModelData*);
|
||||
void createWeightEnvelopeMtx(struct J3DModelData*);
|
||||
void setNoUseDrawMtx();
|
||||
void createDoubleDrawMtx(struct J3DModelData*, unsigned long);
|
||||
void createBumpMtxArray(struct J3DModelData*, unsigned long);
|
||||
int create(struct J3DModelData*, unsigned long);
|
||||
int createAnmMtx(struct J3DModelData*);
|
||||
int createWeightEnvelopeMtx(struct J3DModelData*);
|
||||
int setNoUseDrawMtx();
|
||||
int createDoubleDrawMtx(struct J3DModelData*, unsigned long);
|
||||
int createBumpMtxArray(struct J3DModelData*, unsigned long);
|
||||
void calcWeightEnvelopeMtx();
|
||||
void calcDrawMtx(unsigned long, const Vec&, const Mtx&);
|
||||
void calcNrmMtx();
|
||||
void calcBBoardMtx();
|
||||
|
||||
// _34 VTBL
|
||||
|
||||
static Mtx* sNoUseDrawMtxPtr;
|
||||
static Mtx33* sNoUseNrmMtxPtr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
struct J3DMtxBuffer;
|
||||
|
||||
struct J3DMtxCalc {
|
||||
virtual ~J3DMtxCalc(); // _00
|
||||
virtual ~J3DMtxCalc() {}; // _00
|
||||
virtual void setAnmTransform(J3DAnmTransform*); // _04
|
||||
virtual void getAnmTransform(); // _08
|
||||
virtual void setAnmTransform(unsigned char, J3DAnmTransform*); // _0C
|
||||
@ -30,7 +30,11 @@ struct J3DMtxCalc {
|
||||
};
|
||||
|
||||
struct J3DMtxCalcNoAnmBase : public J3DMtxCalc {
|
||||
virtual ~J3DMtxCalcNoAnmBase(); // _00
|
||||
/**
|
||||
* @reifiedAddress{80070510}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelLoader.cpp}
|
||||
*/
|
||||
virtual ~J3DMtxCalcNoAnmBase() {}; // _00
|
||||
};
|
||||
|
||||
struct J3DMtxCalcAnmBase : public J3DMtxCalc {
|
||||
|
213
include/JSystem/J3D/J3DPE.h
Normal file
213
include/JSystem/J3D/J3DPE.h
Normal file
@ -0,0 +1,213 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DPE_H
|
||||
#define _JSYSTEM_J3D_J3DPE_H
|
||||
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DFog {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u16 _02; // _02
|
||||
f32 _04; // _04
|
||||
f32 _08; // _08
|
||||
f32 _0C; // _0C
|
||||
f32 _10; // _10
|
||||
u8 _14; // _14
|
||||
u8 _15; // _15
|
||||
u8 _16; // _16
|
||||
u8 _17; // _17
|
||||
u16 _18[0xA]; // _18
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DPEBlock {
|
||||
virtual void reset(J3DPEBlock*); // _08 (weak)
|
||||
virtual void load() = 0; // _0C
|
||||
virtual void patch(); // _10 (weak)
|
||||
virtual void diff(unsigned long); // _14 (weak)
|
||||
virtual void diffFog(); // _18 (weak)
|
||||
virtual void diffBlend(); // _1C (weak)
|
||||
virtual u32 countDLSize(); // _20 (weak)
|
||||
virtual JBlockType getType() = 0; // _24
|
||||
virtual void setFog(J3DFog); // _28 (weak)
|
||||
virtual void setFog(J3DFog*); // _2C (weak)
|
||||
virtual J3DFog* getFog(); // _30 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp*); // _34 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp&); // _38 (weak)
|
||||
virtual J3DAlphaComp* getAlphaComp(); // _3C (weak)
|
||||
virtual void setBlend(const J3DBlend*); // _40 (weak)
|
||||
virtual void setBlend(const J3DBlend&); // _44 (weak)
|
||||
virtual J3DBlend* getBlend(); // _48 (weak)
|
||||
virtual void setZMode(const J3DZMode*); // _4C (weak)
|
||||
virtual void setZMode(J3DZMode); // _50 (weak)
|
||||
virtual J3DZMode* getZMode(); // _54 (weak)
|
||||
virtual void setZCompLoc(const unsigned char*); // _58 (weak)
|
||||
virtual void setZCompLoc(unsigned char); // _5C (weak)
|
||||
virtual u8 getZCompLoc() const; // _60 (weak)
|
||||
virtual void setDither(const unsigned char*); // _64 (weak)
|
||||
virtual void setDither(unsigned char); // _68 (weak)
|
||||
virtual u8 getDither() const; // _6C (weak)
|
||||
virtual u32 getFogOffset() const; // _70 (weak)
|
||||
virtual void setFogOffset(unsigned long); // _74 (weak)
|
||||
virtual ~J3DPEBlock(); // _78 (weak)
|
||||
};
|
||||
|
||||
struct J3DPEBlockFogOff : public J3DPEBlock {
|
||||
virtual void reset(J3DPEBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void diff(unsigned long); // _14 (weak)
|
||||
virtual void diffBlend(); // _1C
|
||||
virtual u32 countDLSize(); // _20
|
||||
virtual JBlockType getType(); // _24 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp*); // _34 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp&); // _38 (weak)
|
||||
virtual J3DAlphaComp* getAlphaComp(); // _3C (weak)
|
||||
virtual void setBlend(const J3DBlend*); // _40 (weak)
|
||||
virtual void setBlend(const J3DBlend&); // _44 (weak)
|
||||
virtual J3DBlend* getBlend(); // _48 (weak)
|
||||
virtual void setZMode(const J3DZMode*); // _4C (weak)
|
||||
virtual void setZMode(J3DZMode); // _50 (weak)
|
||||
virtual J3DZMode* getZMode(); // _54 (weak)
|
||||
virtual void setZCompLoc(const unsigned char*); // _58 (weak)
|
||||
virtual void setZCompLoc(unsigned char); // _5C (weak)
|
||||
virtual u8 getZCompLoc() const; // _60 (weak)
|
||||
virtual void setDither(const unsigned char*); // _64 (weak)
|
||||
virtual void setDither(unsigned char); // _68 (weak)
|
||||
virtual u8 getDither() const; // _6C (weak)
|
||||
virtual ~J3DPEBlockFogOff(); // _78 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DAlphaComp m_alphaComp; // _04
|
||||
J3DBlend m_blend; // _08
|
||||
J3DZMode m_zMode; // _0C
|
||||
u8 _0E; // _0E
|
||||
u8 m_dither; // _0F
|
||||
};
|
||||
|
||||
struct J3DPEBlockFull : public J3DPEBlock {
|
||||
virtual void reset(J3DPEBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void diff(unsigned long); // _14
|
||||
virtual void diffFog(); // _18
|
||||
virtual void diffBlend(); // _1C
|
||||
virtual u32 countDLSize(); // _20
|
||||
/**
|
||||
* @reifiedAddress{800816D0}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual JBlockType getType() // _24 (weak)
|
||||
{
|
||||
return JBT_PEFull;
|
||||
}
|
||||
virtual void setFog(J3DFog); // _28 (weak)
|
||||
virtual void setFog(J3DFog*); // _2C (weak)
|
||||
virtual J3DFog* getFog(); // _30 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp*); // _34 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp&); // _38 (weak)
|
||||
virtual J3DAlphaComp* getAlphaComp(); // _3C (weak)
|
||||
virtual void setBlend(const J3DBlend*); // _40 (weak)
|
||||
virtual void setBlend(const J3DBlend&); // _44 (weak)
|
||||
virtual J3DBlend* getBlend(); // _48 (weak)
|
||||
virtual void setZMode(const J3DZMode*); // _4C (weak)
|
||||
virtual void setZMode(J3DZMode); // _50 (weak)
|
||||
virtual J3DZMode* getZMode(); // _54 (weak)
|
||||
virtual void setZCompLoc(const unsigned char*); // _58 (weak)
|
||||
virtual void setZCompLoc(unsigned char); // _5C (weak)
|
||||
virtual u8 getZCompLoc() const; // _60 (weak)
|
||||
/**
|
||||
* @reifiedAddress{80081910}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual void setDither(const unsigned char* dither) // _64 (weak)
|
||||
{
|
||||
m_dither = *dither;
|
||||
}
|
||||
/**
|
||||
* @reifiedAddress{80081908}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual void setDither(unsigned char dither) // _68 (weak)
|
||||
{
|
||||
m_dither = dither;
|
||||
}
|
||||
/**
|
||||
* @reifiedAddress{8008191C}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual u8 getDither() const // _6C (weak)
|
||||
{
|
||||
return m_dither;
|
||||
}
|
||||
/**
|
||||
* @reifiedAddress{80081924}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual u32 getFogOffset() const // _70 (weak)
|
||||
{
|
||||
return m_fogOffset;
|
||||
}
|
||||
/**
|
||||
* @reifiedAddress{8008192C}
|
||||
* @reifiedFile{JSystem/J3D/J3DMatBlock.cpp}
|
||||
*/
|
||||
virtual void setFogOffset(unsigned long fogOffset) // _74 (weak)
|
||||
{
|
||||
m_fogOffset = fogOffset;
|
||||
}
|
||||
virtual ~J3DPEBlockFull(); // _78 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DFog m_fog; // _04
|
||||
J3DAlphaComp m_alphaComp; // _30
|
||||
J3DBlend m_blend; // _34
|
||||
J3DZMode m_zMode; // _38
|
||||
u8 _3A; // _3A
|
||||
u8 m_dither; // _3B
|
||||
u32 m_fogOffset; // _3C
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DPEBlockNull : public J3DPEBlock {
|
||||
virtual void load(); // _0C (weak)
|
||||
virtual JBlockType getType(); // _24 (weak)
|
||||
virtual ~J3DPEBlockNull(); // _78 (weak)
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DPEBlockOpa : public J3DPEBlock {
|
||||
virtual void load(); // _0C
|
||||
virtual u32 countDLSize(); // _20
|
||||
virtual JBlockType getType(); // _24 (weak)
|
||||
virtual ~J3DPEBlockOpa(); // _78 (weak)
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DPEBlockTexEdge : public J3DPEBlock {
|
||||
virtual void load(); // _0C
|
||||
virtual u32 countDLSize(); // _20
|
||||
virtual JBlockType getType(); // _24 (weak)
|
||||
virtual ~J3DPEBlockTexEdge(); // _78 (weak)
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DPEBlockXlu : public J3DPEBlock {
|
||||
virtual void load(); // _0C
|
||||
virtual u32 countDLSize(); // _20
|
||||
virtual JBlockType getType(); // _24 (weak)
|
||||
virtual ~J3DPEBlockXlu(); // _78 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,14 +1,17 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DPACKET_H
|
||||
#define _JSYSTEM_J3D_J3DPACKET_H
|
||||
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
|
||||
struct J3DDrawBuffer;
|
||||
|
||||
struct J3DShapePacket;
|
||||
|
||||
struct J3DPacket {
|
||||
virtual void entry(J3DDrawBuffer*); // _00
|
||||
virtual void draw(); // _04
|
||||
virtual ~J3DPacket(); // _08
|
||||
virtual bool entry(J3DDrawBuffer*); // _08
|
||||
virtual void draw(); // _0C
|
||||
virtual ~J3DPacket(); // _10
|
||||
|
||||
void addChildPacket(J3DPacket*);
|
||||
|
||||
@ -18,8 +21,11 @@ struct J3DPacket {
|
||||
};
|
||||
|
||||
struct J3DDrawPacket : public J3DPacket {
|
||||
virtual void draw(); // _04
|
||||
virtual ~J3DDrawPacket(); // _08
|
||||
virtual void draw(); // _0C
|
||||
virtual ~J3DDrawPacket(); // _10
|
||||
|
||||
int newDisplayList(u32);
|
||||
int newSingleDisplayList(u32);
|
||||
};
|
||||
|
||||
// TODO: Data members
|
||||
@ -27,10 +33,17 @@ struct J3DDrawPacket : public J3DPacket {
|
||||
* @size{0x40}
|
||||
*/
|
||||
struct J3DMatPacket : public J3DDrawPacket {
|
||||
virtual void entry(J3DDrawBuffer*); // _08
|
||||
J3DMatPacket();
|
||||
|
||||
virtual bool entry(J3DDrawBuffer*); // _08
|
||||
virtual void draw(); // _0C
|
||||
virtual ~J3DMatPacket(); // _10
|
||||
|
||||
void addShapePacket(J3DShapePacket*);
|
||||
void beginDiff();
|
||||
u32 endDiff();
|
||||
bool isSame(J3DMatPacket*) const;
|
||||
|
||||
u32 _0C; // _0C
|
||||
u32 _10; // _10
|
||||
u8 _14[0xC]; // _14
|
||||
@ -50,16 +63,19 @@ struct J3DShapePacket_0x24 {
|
||||
s16 _08; // _08
|
||||
};
|
||||
|
||||
// TODO: Data members
|
||||
/**
|
||||
* @size{0x3C}
|
||||
*/
|
||||
struct J3DShapePacket : public J3DDrawPacket {
|
||||
virtual void draw(); // _04
|
||||
virtual ~J3DShapePacket(); // _08
|
||||
J3DShapePacket();
|
||||
|
||||
virtual void draw(); // _0C
|
||||
virtual ~J3DShapePacket(); // _10
|
||||
|
||||
int newDifferedDisplayList(u32 displayListFlag);
|
||||
int newDifferedTexMtx(J3DTexDiffFlag);
|
||||
int calcDifferedBufferSize(u32);
|
||||
void drawFast();
|
||||
|
||||
u32 _0C; // _0C
|
||||
u32 _10; // _10
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DSHAPE_H
|
||||
#define _JSYSTEM_J3D_J3DSHAPE_H
|
||||
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DDrawMtxData;
|
||||
@ -9,6 +10,25 @@ struct J3DMaterial;
|
||||
struct J3DVertexData;
|
||||
struct Vec;
|
||||
|
||||
struct J3DShapeDraw;
|
||||
struct J3DShapeMtx;
|
||||
|
||||
#define J3DShapeMtx_Base 0x0
|
||||
#define J3DShapeMtx_BBoard 0x1
|
||||
#define J3DShapeMtx_Y_BBoard 0x2
|
||||
#define J3DShapeMtx_Multi 0x3
|
||||
|
||||
struct J3DShapeInitData {
|
||||
u8 m_shapeMtxType; // _00
|
||||
u16 _02; // _02
|
||||
u16 m_vtxDescListIndex; // _04
|
||||
u16 m_shapeMtxInitDataIndex; // _06
|
||||
u16 m_shapeDrawInitDataIndex; // _08
|
||||
float _0C; // _0C
|
||||
Vec _10; // _10
|
||||
Vec _1C; // _1C
|
||||
};
|
||||
|
||||
struct J3DShape {
|
||||
enum Flags { IsHidden = 0x1, Invalid = 0xFFFFFFFF };
|
||||
virtual void draw() const; // _00
|
||||
@ -16,8 +36,8 @@ struct J3DShape {
|
||||
virtual void simpleDraw() const; // _08
|
||||
virtual void simpleDrawCache() const; // _0C
|
||||
|
||||
void calcNBTScale(const Vec&, float (*)[3][3], float (*)[3][3]);
|
||||
void countBumpMtxNum() const;
|
||||
void calcNBTScale(const Vec&, Mtx33*, Mtx33*);
|
||||
int countBumpMtxNum() const;
|
||||
void initialize();
|
||||
bool isSameVcdVatCmd(J3DShape*);
|
||||
void loadPreDrawSetting() const;
|
||||
@ -26,7 +46,7 @@ struct J3DShape {
|
||||
|
||||
// VTBL _00
|
||||
J3DMaterial* _04; // _04
|
||||
s16 m_id; // _08
|
||||
u16 m_id; // _08
|
||||
u16 _0A; // _0A
|
||||
u32 m_flags; // _0C
|
||||
f32 _10; // _10
|
||||
@ -36,28 +56,41 @@ struct J3DShape {
|
||||
f32 _20; // _20
|
||||
f32 _24; // _24
|
||||
f32 _28; // _28
|
||||
s32* _2C; // _2C
|
||||
u8* _2C; // _2C
|
||||
s32 _30; // _30
|
||||
u8 m_mode; // _34
|
||||
s32 _38; // _38
|
||||
s32 _3C; // _3C
|
||||
u8 _40[0xC]; // _40
|
||||
J3DShapeMtx** _38; // _38
|
||||
J3DShapeDraw** _3C; // _3C
|
||||
u32 _40; // _40
|
||||
u32 _44; // _44
|
||||
u8 _48; // _48
|
||||
J3DVertexData* m_vtxData; // _4C
|
||||
J3DDrawMtxData* m_drawMtxData; // _50
|
||||
s8* m_flagList; // _54
|
||||
J3DJos32Tree* m_tree1; // _58
|
||||
J3DJos32Tree* m_tree2; // _5C
|
||||
s32* _60; // _60
|
||||
int _64; // _64
|
||||
|
||||
static u8* sOldVcdVatCmd;
|
||||
static u8 sEnvelopeFlag;
|
||||
};
|
||||
|
||||
struct J3DShapeMtx {
|
||||
int getType() const;
|
||||
int getUseMtxNum() const;
|
||||
u16 getUseMtxIndex(u16) const;
|
||||
virtual ~J3DShapeMtx(); // _08 (weak)
|
||||
virtual int getType() const; // _0C (weak)
|
||||
virtual int getUseMtxNum() const; // _10 (weak)
|
||||
virtual u16 getUseMtxIndex(u16) const; // _14 (weak)
|
||||
virtual void load() const; // _18
|
||||
virtual void calcNBTScale(const Vec&, float (*)[3][3], float (*)[3][3]); // _1C
|
||||
|
||||
int _00; // _00
|
||||
void resetMtxLoadCache();
|
||||
void loadMtxIndx_PNGP(int, u16) const;
|
||||
void loadMtxIndx_PCPU(int, u16) const;
|
||||
void loadMtxIndx_NCPU(int, u16) const;
|
||||
void loadMtxIndx_PNCPU(int, u16) const;
|
||||
|
||||
// VTBL _00
|
||||
u16 m_useMtxIndex; // _04
|
||||
};
|
||||
|
||||
@ -78,11 +111,24 @@ struct J3DShapeDraw {
|
||||
};
|
||||
|
||||
struct J3DShapeTable {
|
||||
virtual ~J3DShapeTable(); // _00
|
||||
inline J3DShapeTable()
|
||||
: m_count(0)
|
||||
, m_items(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @reifiedAddress{8008382C}
|
||||
* @reifiedFile{JSystem/J3D/J3DModelData.cpp}
|
||||
*/
|
||||
virtual ~J3DShapeTable() {}; // _00
|
||||
|
||||
void initShapeNodes(J3DDrawMtxData*, J3DVertexData*);
|
||||
void sortVcdVatCmd();
|
||||
|
||||
/** @fabricated */
|
||||
J3DShape* getItem(u16 index) { return m_items[index]; }
|
||||
|
||||
// VTBL _00
|
||||
u16 m_count; // _04
|
||||
J3DShape** m_items; // _08
|
||||
|
30
include/JSystem/J3D/J3DShapeFactory.h
Normal file
30
include/JSystem/J3D/J3DShapeFactory.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DSHAPEFACTORY_H
|
||||
#define _JSYSTEM_J3D_J3DSHAPEFACTORY_H
|
||||
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/J3D/J3DShape.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DShapeFactory {
|
||||
J3DShapeFactory(const J3DShapeBlock&);
|
||||
|
||||
void create(int, u32, _GXVtxDescList*);
|
||||
J3DShapeMtx* newShapeMtx(u32, int, int) const;
|
||||
J3DShapeDraw* newShapeDraw(int, int) const;
|
||||
void allocVcdVatCmdBuffer(u32);
|
||||
int calcSize(int, u32);
|
||||
int calcSizeVcdVatCmdBuffer(u32);
|
||||
int calcSizeShapeMtx(u32, int, int) const;
|
||||
|
||||
J3DShapeInitData* m_initData; // _00
|
||||
u16* m_initDataIndices; // _04
|
||||
_GXVtxDescList* m_vtxDescLists; // _08
|
||||
u16* _0C; // _0C
|
||||
u8* _10; // _10
|
||||
struct J3DShapeMtxInitData* m_mtxInitData; // _14
|
||||
struct J3DShapeDrawInitData* m_drawInitData; // _18
|
||||
unkptr _1C; // _1C
|
||||
};
|
||||
|
||||
#endif
|
@ -2,6 +2,7 @@
|
||||
#define _JSYSTEM_J3D_J3DSYS_H
|
||||
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "types.h"
|
||||
|
||||
@ -16,13 +17,16 @@ struct J3DSys {
|
||||
J3DSys();
|
||||
void drawInit();
|
||||
void reinitGX();
|
||||
static void reinitGenMode();
|
||||
static void reinitIndStages();
|
||||
static void reinitLighting();
|
||||
static void reinitPixelProc();
|
||||
static void reinitTexture();
|
||||
static void reinitTevStages();
|
||||
static void reinitTransform();
|
||||
void reinitGenMode();
|
||||
void reinitIndStages();
|
||||
void reinitLighting();
|
||||
void reinitPixelProc();
|
||||
void reinitTexture();
|
||||
void reinitTevStages();
|
||||
void reinitTransform();
|
||||
void loadPosMtxIndx(int, unsigned short) const;
|
||||
void loadNrmMtxIndx(int, unsigned short) const;
|
||||
void ErrorReport(J3DErrType) const;
|
||||
|
||||
Mtx _00; // _000
|
||||
J3DMtxCalc* m_mtxCalc; // _030
|
||||
@ -57,4 +61,6 @@ struct J3DSys {
|
||||
|
||||
extern J3DSys j3dSys;
|
||||
|
||||
extern s32 j3dDefaultViewNo;
|
||||
|
||||
#endif
|
||||
|
410
include/JSystem/J3D/J3DTevBlock.h
Normal file
410
include/JSystem/J3D/J3DTevBlock.h
Normal file
@ -0,0 +1,410 @@
|
||||
#ifndef _J3DTEVBLOCK_H
|
||||
#define _J3DTEVBLOCK_H
|
||||
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/J3D/J3DGXColor.h"
|
||||
#include "JSystem/J3D/J3DMaterialFactory.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
struct J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08 (weak)
|
||||
virtual void load(); // _0C (weak)
|
||||
virtual void diff(u32); // _10
|
||||
virtual void diffTexNo(); // _14 (weak)
|
||||
virtual void diffTevReg(); // _18 (weak)
|
||||
virtual void diffTexCoordScale(); // _1C (weak)
|
||||
virtual void diffTevStage(); // _20 (weak)
|
||||
virtual void diffTevStageIndirect(); // _24 (weak)
|
||||
virtual void patch(); // _28 (weak)
|
||||
virtual void patchTexNo(); // _2C (weak)
|
||||
virtual void patchTevReg(); // _30 (weak)
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34 (weak)
|
||||
virtual void ptrToIndex() = 0; // _38 (weak)
|
||||
virtual void indexToPtr() = 0; // _3C (weak)
|
||||
virtual JBlockType getType() = 0; // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44 (weak)
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevColor(u32, const J3DGXColorS10*); // _60 (weak)
|
||||
virtual void setTevColor(u32, J3DGXColorS10); // _64 (weak)
|
||||
virtual void getTevColor(u32); // _68 (weak)
|
||||
virtual void setTevKColor(u32, const J3DGXColor*); // _6C (weak)
|
||||
virtual void setTevKColor(u32, J3DGXColor); // _70 (weak)
|
||||
virtual J3DGXColor getTevKColor(u32); // _74 (weak)
|
||||
virtual void setTevKColorSel(u32, const u8*); // _78 (weak)
|
||||
virtual void setTevKColorSel(u32, u8); // _7C (weak)
|
||||
virtual GXTevKColorSel getTevKColorSel(u32); // _80 (weak)
|
||||
virtual void setTevKAlphaSel(u32, const u8*); // _84 (weak)
|
||||
virtual void setTevKAlphaSel(u32, u8); // _88 (weak)
|
||||
virtual u8 getTevKAlphaSel(u32); // _8C (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800602C8}
|
||||
* @reifiedFile{JSystem/J3D/J3DPacket.cpp}
|
||||
*/
|
||||
virtual u8 getTevStageNum() const { return 1; }; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, const J3DTevSwapModeInfo*); // _A8 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); // _AC (weak)
|
||||
virtual void setTevSwapModeTable(u32, const J3DTevSwapModeTable*); // _B0 (weak)
|
||||
virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); // _B4 (weak)
|
||||
virtual J3DTevSwapModeTable* getTevSwapModeTable(u32); // _B8 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual u32 getTevRegOffset() const; // _CC (weak)
|
||||
virtual void setTexNoOffset(u32); // _D0 (weak)
|
||||
virtual void setTevRegOffset(u32); // _D4 (weak)
|
||||
virtual ~J3DTevBlock(); // _D8 (weak)
|
||||
|
||||
void indexToPtr_private(u32);
|
||||
|
||||
u32 m_texNoOffset; // _04
|
||||
};
|
||||
|
||||
struct J3DTevBlock1 : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void diffTexNo(); // _14
|
||||
virtual void diffTevReg(); // _18
|
||||
virtual void diffTexCoordScale(); // _1C
|
||||
virtual void diffTevStage(); // _20
|
||||
virtual void diffTevStageIndirect(); // _24
|
||||
virtual void patch(); // _28
|
||||
virtual void patchTexNo(); // _2C
|
||||
virtual void patchTevReg(); // _30
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34
|
||||
virtual void ptrToIndex(); // _38 (weak)
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
virtual u8 getTevStageNum() const; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual ~J3DTevBlock1(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u16 m_texIndices[1]; // _08
|
||||
J3DTevOrder m_orders[1]; // _0A
|
||||
J3DTevStage m_stages[1]; // _0E
|
||||
J3DIndTevStage m_indStages[1]; // _16
|
||||
u8 _1A[2]; // _1A
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x6C}
|
||||
*/
|
||||
struct J3DTevBlock2 : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void diffTexNo(); // _14
|
||||
virtual void diffTevReg(); // _18
|
||||
virtual void diffTexCoordScale(); // _1C
|
||||
virtual void diffTevStage(); // _20
|
||||
virtual void diffTevStageIndirect(); // _24
|
||||
virtual void patch(); // _28
|
||||
virtual void patchTexNo(); // _2C
|
||||
virtual void patchTevReg(); // _30
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34
|
||||
virtual void ptrToIndex(); // _38 (weak)
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevColor(u32, const J3DGXColorS10*); // _60 (weak)
|
||||
virtual void setTevColor(u32, J3DGXColorS10); // _64 (weak)
|
||||
virtual void getTevColor(u32); // _68 (weak)
|
||||
virtual void setTevKColor(u32, const J3DGXColor*); // _6C (weak)
|
||||
virtual void setTevKColor(u32, J3DGXColor); // _70 (weak)
|
||||
virtual J3DGXColor getTevKColor(u32); // _74 (weak)
|
||||
virtual void setTevKColorSel(u32, const u8*); // _78 (weak)
|
||||
virtual void setTevKColorSel(u32, u8); // _7C (weak)
|
||||
virtual GXTevKColorSel getTevKColorSel(u32); // _80 (weak)
|
||||
virtual void setTevKAlphaSel(u32, const u8*); // _84 (weak)
|
||||
virtual void setTevKAlphaSel(u32, u8); // _88 (weak)
|
||||
virtual u8 getTevKAlphaSel(u32); // _8C (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
virtual u8 getTevStageNum() const; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, const J3DTevSwapModeInfo*); // _A8 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); // _AC (weak)
|
||||
virtual void setTevSwapModeTable(u32, const J3DTevSwapModeTable*); // _B0 (weak)
|
||||
virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); // _B4 (weak)
|
||||
virtual J3DTevSwapModeTable* getTevSwapModeTable(u32); // _B8 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual u32 getTevRegOffset() const; // _CC (weak)
|
||||
virtual void setTevRegOffset(u32); // _D4 (weak)
|
||||
virtual ~J3DTevBlock2(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u16 m_texIndices[2]; // _08
|
||||
J3DTevOrder m_orders[2]; // _0C
|
||||
J3DGXColorS10 _14[4]; // _14
|
||||
u8 m_stageNum; // _34
|
||||
J3DTevStage m_stages[2]; // _35
|
||||
J3DGXColor _45[4]; // _45
|
||||
u8 m_kColorSels[2]; // _55
|
||||
u8 m_kAlphaSels[2]; // _57
|
||||
J3DTevSwapModeTable m_swapModeTables[4]; // _59
|
||||
u8 _5D[3]; // _5D
|
||||
J3DIndTevStage m_indStages[2]; // _60
|
||||
u32 m_regOffset; // _68
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x94}
|
||||
*/
|
||||
struct J3DTevBlock4 : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void diffTexNo(); // _14
|
||||
virtual void diffTevReg(); // _18
|
||||
virtual void diffTexCoordScale(); // _1C
|
||||
virtual void diffTevStage(); // _20
|
||||
virtual void diffTevStageIndirect(); // _24
|
||||
virtual void patch(); // _28
|
||||
virtual void patchTexNo(); // _2C
|
||||
virtual void patchTevReg(); // _30
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34
|
||||
virtual void ptrToIndex(); // _38 (weak)
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevColor(u32, const J3DGXColorS10*); // _60 (weak)
|
||||
virtual void setTevColor(u32, J3DGXColorS10); // _64 (weak)
|
||||
virtual void getTevColor(u32); // _68 (weak)
|
||||
virtual void setTevKColor(u32, const J3DGXColor*); // _6C (weak)
|
||||
virtual void setTevKColor(u32, J3DGXColor); // _70 (weak)
|
||||
virtual J3DGXColor getTevKColor(u32); // _74 (weak)
|
||||
virtual void setTevKColorSel(u32, const u8*); // _78 (weak)
|
||||
virtual void setTevKColorSel(u32, u8); // _7C (weak)
|
||||
virtual GXTevKColorSel getTevKColorSel(u32); // _80 (weak)
|
||||
virtual void setTevKAlphaSel(u32, const u8*); // _84 (weak)
|
||||
virtual void setTevKAlphaSel(u32, u8); // _88 (weak)
|
||||
virtual u8 getTevKAlphaSel(u32); // _8C (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
virtual u8 getTevStageNum() const; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, const J3DTevSwapModeInfo*); // _A8 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); // _AC (weak)
|
||||
virtual void setTevSwapModeTable(u32, const J3DTevSwapModeTable*); // _B0 (weak)
|
||||
virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); // _B4 (weak)
|
||||
virtual J3DTevSwapModeTable* getTevSwapModeTable(u32); // _B8 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual u32 getTevRegOffset() const; // _CC (weak)
|
||||
virtual void setTevRegOffset(u32); // _D4 (weak)
|
||||
virtual ~J3DTevBlock4(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u16 m_texIndices[4]; // _08
|
||||
J3DTevOrder m_orders[4]; // _10
|
||||
u8 m_stageNum; // _20
|
||||
J3DTevStage m_stages[4]; // _21
|
||||
u8 _41; // _41
|
||||
J3DGXColorS10 _42[4]; // _42
|
||||
J3DGXColor _62[4]; // _62
|
||||
u8 _72[0x8]; // _72
|
||||
J3DTevSwapModeTable m_swapModeTables[4]; // _7A
|
||||
u8 _7E[2]; // _7E
|
||||
J3DIndTevStage m_indStages[4]; // _80
|
||||
u32 m_regOffset; // _90
|
||||
u8 _94[4]; // _94
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x174}
|
||||
*/
|
||||
struct J3DTevBlock16 : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08
|
||||
virtual void load(); // _0C
|
||||
virtual void diffTexNo(); // _14
|
||||
virtual void diffTevReg(); // _18
|
||||
virtual void diffTexCoordScale(); // _1C
|
||||
virtual void diffTevStage(); // _20
|
||||
virtual void diffTevStageIndirect(); // _24
|
||||
virtual void patch(); // _28
|
||||
virtual void patchTexNo(); // _2C
|
||||
virtual void patchTevReg(); // _30
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34
|
||||
virtual void ptrToIndex(); // _38
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevColor(u32, const J3DGXColorS10*); // _60 (weak)
|
||||
virtual void setTevColor(u32, J3DGXColorS10); // _64 (weak)
|
||||
virtual void getTevColor(u32); // _68 (weak)
|
||||
virtual void setTevKColor(u32, const J3DGXColor*); // _6C (weak)
|
||||
virtual void setTevKColor(u32, J3DGXColor); // _70 (weak)
|
||||
virtual J3DGXColor getTevKColor(u32); // _74 (weak)
|
||||
virtual void setTevKColorSel(u32, const u8*); // _78 (weak)
|
||||
virtual void setTevKColorSel(u32, u8); // _7C (weak)
|
||||
virtual GXTevKColorSel getTevKColorSel(u32); // _80 (weak)
|
||||
virtual void setTevKAlphaSel(u32, const u8*); // _84 (weak)
|
||||
virtual void setTevKAlphaSel(u32, u8); // _88 (weak)
|
||||
virtual u8 getTevKAlphaSel(u32); // _8C (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
virtual u8 getTevStageNum() const; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, const J3DTevSwapModeInfo*); // _A8 (weak)
|
||||
virtual void setTevSwapModeInfo(u32, J3DTevSwapModeInfo); // _AC (weak)
|
||||
virtual void setTevSwapModeTable(u32, const J3DTevSwapModeTable*); // _B0 (weak)
|
||||
virtual void setTevSwapModeTable(u32, J3DTevSwapModeTable); // _B4 (weak)
|
||||
virtual J3DTevSwapModeTable* getTevSwapModeTable(u32); // _B8 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual u32 getTevRegOffset() const; // _CC (weak)
|
||||
virtual void setTevRegOffset(u32); // _D4 (weak)
|
||||
virtual ~J3DTevBlock16(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u16 m_texIndices[8]; // _08
|
||||
J3DTevOrder m_orders[16]; // _18
|
||||
u8 m_stageNum; // _58
|
||||
J3DTevStage m_stages[16]; // _59
|
||||
u8 _D9; // _D9
|
||||
J3DGXColorS10 _DA[4]; // _DA
|
||||
J3DGXColor _FA[4]; // _FA
|
||||
u8 _10A[0x20]; // _10A
|
||||
J3DTevSwapModeTable m_swapModeTables[4]; // _12A
|
||||
u8 _12E[2]; // _12E
|
||||
J3DIndTevStage m_indStages[16]; // _130
|
||||
u32 m_regOffset; // _170
|
||||
u8 _174[0x10]; // _174
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0x8}
|
||||
*/
|
||||
struct J3DTevBlockNull : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08 (weak)
|
||||
virtual void ptrToIndex(); // _38 (weak)
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual ~J3DTevBlockNull(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
};
|
||||
|
||||
/**
|
||||
* @size{0xD8}
|
||||
*/
|
||||
struct J3DTevBlockPatched : public J3DTevBlock {
|
||||
virtual void reset(J3DTevBlock*); // _08
|
||||
virtual void load(); // _0C (weak)
|
||||
virtual void diffTexNo(); // _14
|
||||
virtual void diffTevReg(); // _18
|
||||
virtual void diffTexCoordScale(); // _1C
|
||||
virtual void diffTevStage(); // _20
|
||||
virtual void diffTevStageIndirect(); // _24
|
||||
virtual void patch(); // _28
|
||||
virtual void patchTexNo(); // _2C
|
||||
virtual void patchTevReg(); // _30
|
||||
virtual void patchTexNoAndTexCoordScale(); // _34
|
||||
virtual void ptrToIndex(); // _38
|
||||
virtual void indexToPtr(); // _3C (weak)
|
||||
virtual JBlockType getType(); // _40 (weak)
|
||||
virtual u32 countDLSize(); // _44
|
||||
virtual void setTexNo(u32, const u16*); // _48 (weak)
|
||||
virtual void setTexNo(u32, u16); // _4C (weak)
|
||||
virtual u16 getTexNo(u32) const; // _50 (weak)
|
||||
virtual void setTevOrder(u32, const J3DTevOrder*); // _54 (weak)
|
||||
virtual void setTevOrder(u32, J3DTevOrder); // _58 (weak)
|
||||
virtual J3DTevOrder* getTevOrder(u32); // _5C (weak)
|
||||
virtual void setTevColor(u32, const J3DGXColorS10*); // _60 (weak)
|
||||
virtual void setTevColor(u32, J3DGXColorS10); // _64 (weak)
|
||||
virtual void getTevColor(u32); // _68 (weak)
|
||||
virtual void setTevKColor(u32, const J3DGXColor*); // _6C (weak)
|
||||
virtual void setTevKColor(u32, J3DGXColor); // _70 (weak)
|
||||
virtual J3DGXColor getTevKColor(u32); // _74 (weak)
|
||||
virtual void setTevKColorSel(u32, const u8*); // _78 (weak)
|
||||
virtual void setTevKColorSel(u32, u8); // _7C (weak)
|
||||
virtual GXTevKColorSel getTevKColorSel(u32); // _80 (weak)
|
||||
virtual void setTevStageNum(const u8*); // _90 (weak)
|
||||
virtual void setTevStageNum(u8); // _94 (weak)
|
||||
virtual u8 getTevStageNum() const; // _98 (weak)
|
||||
virtual void setTevStage(u32, const J3DTevStage*); // _9C (weak)
|
||||
virtual void setTevStage(u32, J3DTevStage); // _A0 (weak)
|
||||
virtual void getTevStage(u32); // _A4 (weak)
|
||||
virtual void setIndTevStage(u32, const J3DIndTevStage*); // _BC (weak)
|
||||
virtual void setIndTevStage(u32, J3DIndTevStage); // _C0 (weak)
|
||||
virtual J3DIndTevStage* getIndTevStage(u32); // _C4 (weak)
|
||||
virtual u32 getTexNoOffset() const; // _C8 (weak)
|
||||
virtual u32 getTevRegOffset() const; // _CC (weak)
|
||||
virtual void setTevRegOffset(u32); // _D4 (weak)
|
||||
virtual ~J3DTevBlockPatched(); // _D8 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
u16 m_texIndices[8]; // _08
|
||||
J3DTevOrder m_orders[8]; // _18
|
||||
J3DTevStage m_stages[8]; // _38
|
||||
J3DIndTevStage m_indStages[8]; // _78
|
||||
J3DGXColorS10 _98[4]; // _98
|
||||
J3DGXColor _B8[4]; // _B8
|
||||
u8 _C8[0x8]; // _C8
|
||||
u8 m_stageNum; // _D0
|
||||
u32 : 0;
|
||||
u32 m_regOffset; // _D4
|
||||
};
|
||||
|
||||
#endif
|
@ -5,11 +5,15 @@
|
||||
|
||||
struct J3DAnmTevRegKey;
|
||||
struct J3DTevColorAnm {
|
||||
J3DTevColorAnm();
|
||||
|
||||
u16 m_index; // _00
|
||||
J3DAnmTevRegKey* m_key; // _04
|
||||
};
|
||||
|
||||
struct J3DTevKColorAnm {
|
||||
J3DTevKColorAnm();
|
||||
|
||||
u16 m_index; // _00
|
||||
J3DAnmTevRegKey* m_key; // _04
|
||||
};
|
||||
|
@ -8,31 +8,42 @@ struct J3DNBTScale;
|
||||
struct J3DTexMtx;
|
||||
|
||||
struct J3DTexGenBlock {
|
||||
virtual void reset(J3DTexGenBlock*); // _00
|
||||
virtual void calc(const float (*)[4]) = 0; // _04
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]) = 0; // _08
|
||||
virtual void calcPostTexMtx(const float (*)[4]) = 0; // _0C
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]) = 0; // _10
|
||||
virtual void load() = 0; // _14
|
||||
virtual void patch() = 0; // _18
|
||||
virtual void diff(u32) = 0; // _1C
|
||||
virtual void diffTexMtx() = 0; // _20
|
||||
virtual void diffTexGen() = 0; // _24
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType() = 0; // _2C
|
||||
virtual void setTexGenNum(const u32*); // _30
|
||||
virtual void setTexGenNum(u32); // _34
|
||||
virtual u32 getTexGenNum() const; // _38
|
||||
virtual void setTexCoord(u32, const J3DTexCoord*); // _3C
|
||||
virtual J3DTexCoord* getTexCoord(u32); // _40
|
||||
virtual void setTexMtx(u32, J3DTexMtx*); // _44
|
||||
virtual J3DTexMtx* getTexMtx(u32); // _48
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _4C
|
||||
virtual void setNBTScale(J3DNBTScale); // _50
|
||||
virtual J3DNBTScale* getNBTScale(); // _54
|
||||
virtual u32 getTexMtxOffset() const; // _58
|
||||
virtual void setTexMtxOffset(u32); // _5C
|
||||
virtual ~J3DTexGenBlock(); // _60
|
||||
virtual void reset(J3DTexGenBlock*); // _08 (weak)
|
||||
virtual void calc(const float (*)[4]) = 0; // _0C
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]) = 0; // _10
|
||||
virtual void calcPostTexMtx(const float (*)[4]) = 0; // _14
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]) = 0; // _18
|
||||
virtual void load() = 0; // _1C
|
||||
virtual void patch() = 0; // _20
|
||||
virtual void diff(u32) = 0; // _24
|
||||
virtual void diffTexMtx() = 0; // _28
|
||||
virtual void diffTexGen() = 0; // _2C
|
||||
virtual u32 countDLSize(); // _30 (weak)
|
||||
virtual JBlockType getType() = 0; // _34
|
||||
virtual void setTexGenNum(const u32*); // _38 (weak)
|
||||
virtual void setTexGenNum(u32); // _3C (weak)
|
||||
/**
|
||||
* @reifiedAddress{800602D0}
|
||||
* @reifiedFile{JSystem/J3D/J3DPacket.cpp}
|
||||
*/
|
||||
virtual u32 getTexGenNum() const // _40 (weak)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void setTexCoord(u32, const J3DTexCoord*); // _44 (weak)
|
||||
virtual J3DTexCoord* getTexCoord(u32); // _48 (weak)
|
||||
virtual void setTexMtx(u32, J3DTexMtx*); // _4C (weak)
|
||||
virtual J3DTexMtx* getTexMtx(u32); // _50 (weak)
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _54 (weak)
|
||||
virtual void setNBTScale(J3DNBTScale); // _58 (weak)
|
||||
virtual J3DNBTScale* getNBTScale(); // _5C (weak)
|
||||
virtual u32 getTexMtxOffset() const; // _60 (weak)
|
||||
virtual void setTexMtxOffset(u32); // _64 (weak)
|
||||
/**
|
||||
* @reifiedAddress{80061A24}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterial.cpp}
|
||||
*/
|
||||
virtual ~J3DTexGenBlock() {}; // _68 (weak)
|
||||
|
||||
// VTBL _00
|
||||
};
|
||||
@ -41,74 +52,108 @@ struct J3DTexGenBlock {
|
||||
* @size{0x4}
|
||||
*/
|
||||
struct J3DTexGenBlockNull : public J3DTexGenBlock {
|
||||
virtual void calc(const float (*)[4]); // _04
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]); // _08
|
||||
virtual void calcPostTexMtx(const float (*)[4]); // _0C
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]); // _10
|
||||
virtual void load(); // _14
|
||||
virtual void patch(); // _18
|
||||
virtual void diff(u32); // _1C
|
||||
virtual void diffTexMtx(); // _20
|
||||
virtual void diffTexGen(); // _24
|
||||
virtual JBlockType getType(); // _2C
|
||||
virtual ~J3DTexGenBlockNull(); // _60
|
||||
virtual void calc(const float (*)[4]); // _0C (weak)
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]); // _10 (weak)
|
||||
virtual void calcPostTexMtx(const float (*)[4]); // _14 (weak)
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]); // _18 (weak)
|
||||
virtual void load(); // _1C (weak)
|
||||
virtual void patch(); // _20 (weak)
|
||||
virtual void diff(u32); // _24 (weak)
|
||||
virtual void diffTexMtx(); // _28 (weak)
|
||||
virtual void diffTexGen(); // _2C (weak)
|
||||
virtual JBlockType getType(); // _34 (weak)
|
||||
/**
|
||||
* @reifiedAddress{8006F5FC}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterialFactory.cpp}
|
||||
*/
|
||||
virtual ~J3DTexGenBlockNull() {}; // _68 (weak)
|
||||
};
|
||||
|
||||
struct J3DTexGenBlockPatched : public J3DTexGenBlock {
|
||||
virtual void reset(J3DTexGenBlock*); // _00
|
||||
virtual void calc(const float (*)[4]); // _04
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]); // _08
|
||||
virtual void calcPostTexMtx(const float (*)[4]); // _0C
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]); // _10
|
||||
virtual void load(); // _14
|
||||
virtual void patch(); // _18
|
||||
virtual void diff(u32); // _1C
|
||||
virtual void diffTexMtx(); // _20
|
||||
virtual void diffTexGen(); // _24
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C
|
||||
virtual void setTexGenNum(const u32*); // _30
|
||||
virtual void setTexGenNum(u32); // _34
|
||||
virtual u32 getTexGenNum() const; // _38
|
||||
virtual void setTexCoord(u32, const J3DTexCoord*); // _3C
|
||||
virtual J3DTexCoord* getTexCoord(u32); // _40
|
||||
virtual void setTexMtx(u32, J3DTexMtx*); // _44
|
||||
virtual J3DTexMtx* getTexMtx(u32); // _48
|
||||
virtual u32 getTexMtxOffset() const; // _58
|
||||
virtual void setTexMtxOffset(u32); // _5C
|
||||
virtual ~J3DTexGenBlockPatched(); // _60
|
||||
inline J3DTexGenBlockPatched()
|
||||
: J3DTexGenBlock()
|
||||
, m_texCoords()
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual void reset(J3DTexGenBlock*); // _08
|
||||
virtual void calc(const float (*)[4]); // _0C
|
||||
virtual void calcWithoutViewMtx(const float (*)[4]); // _10
|
||||
virtual void calcPostTexMtx(const float (*)[4]); // _14
|
||||
virtual void calcPostTexMtxWithoutViewMtx(const float (*)[4]); // _18
|
||||
virtual void load(); // _1C (weak)
|
||||
virtual void patch(); // _20
|
||||
virtual void diff(u32); // _24
|
||||
virtual void diffTexMtx(); // _28
|
||||
virtual void diffTexGen(); // _2C
|
||||
virtual u32 countDLSize(); // _30
|
||||
virtual JBlockType getType(); // _34 (weak)
|
||||
virtual void setTexGenNum(const u32*); // _38 (weak)
|
||||
virtual void setTexGenNum(u32); // _3C (weak)
|
||||
virtual u32 getTexGenNum() const; // _40 (weak)
|
||||
virtual void setTexCoord(u32, const J3DTexCoord*); // _44 (weak)
|
||||
virtual J3DTexCoord* getTexCoord(u32); // _48 (weak)
|
||||
virtual void setTexMtx(u32, J3DTexMtx*); // _4C (weak)
|
||||
virtual J3DTexMtx* getTexMtx(u32); // _50 (weak)
|
||||
virtual u32 getTexMtxOffset() const; // _60 (weak)
|
||||
virtual void setTexMtxOffset(u32); // _64 (weak)
|
||||
/**
|
||||
* @reifiedAddress{800619A0}
|
||||
* @reifiedFile{JSystem/J3D/J3DMaterial.cpp}
|
||||
*/
|
||||
virtual ~J3DTexGenBlockPatched() {}; // _68 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
// VTBL _00
|
||||
u32 m_texgenCnt; // _04
|
||||
J3DTexCoord m_texCoords[8]; // _08
|
||||
J3DTexMtx* m_texMatrices[8]; // _38
|
||||
u32* m_dlistOffs; // _58
|
||||
u32 m_dlistOffs; // _58
|
||||
};
|
||||
|
||||
struct J3DTexGenBlockBasic : public J3DTexGenBlockPatched {
|
||||
virtual void reset(J3DTexGenBlock*); // _00
|
||||
virtual void load(); // _14
|
||||
virtual void patch(); // _18
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _4C
|
||||
virtual void setNBTScale(J3DNBTScale); // _50
|
||||
virtual J3DNBTScale* getNBTScale(); // _54
|
||||
virtual ~J3DTexGenBlockBasic(); // _60
|
||||
inline J3DTexGenBlockBasic()
|
||||
: J3DTexGenBlockPatched()
|
||||
, m_nbtScale(j3dDefaultNBTScaleInfo)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual void reset(J3DTexGenBlock*); // _08
|
||||
virtual void load(); // _1C
|
||||
virtual void patch(); // _20
|
||||
virtual u32 countDLSize(); // _30
|
||||
virtual JBlockType getType(); // _34 (weak)
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _54 (weak)
|
||||
virtual void setNBTScale(J3DNBTScale); // _58 (weak)
|
||||
virtual J3DNBTScale* getNBTScale(); // _5C (weak)
|
||||
virtual ~J3DTexGenBlockBasic() {}; // _68 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DNBTScale m_nbtScale; // _5C
|
||||
};
|
||||
|
||||
struct J3DTexGenBlock4 : public J3DTexGenBlockPatched {
|
||||
virtual void reset(J3DTexGenBlock*); // _00
|
||||
virtual void load(); // _14
|
||||
virtual void patch(); // _18
|
||||
virtual u32 countDLSize(); // _28
|
||||
virtual JBlockType getType(); // _2C
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _4C
|
||||
virtual void setNBTScale(J3DNBTScale); // _50
|
||||
virtual J3DNBTScale* getNBTScale(); // _54
|
||||
virtual ~J3DTexGenBlock4(); // _60
|
||||
inline J3DTexGenBlock4()
|
||||
: J3DTexGenBlockPatched()
|
||||
, m_nbtScale(j3dDefaultNBTScaleInfo)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
virtual void reset(J3DTexGenBlock*); // _08
|
||||
virtual void load(); // _1C
|
||||
virtual void patch(); // _20
|
||||
virtual u32 countDLSize(); // _30
|
||||
virtual JBlockType getType(); // _34 (weak)
|
||||
virtual void setNBTScale(const J3DNBTScale*); // _54 (weak)
|
||||
virtual void setNBTScale(J3DNBTScale); // _58 (weak)
|
||||
virtual J3DNBTScale* getNBTScale(); // _5C (weak)
|
||||
virtual ~J3DTexGenBlock4() {}; // _68 (weak)
|
||||
|
||||
void initialize();
|
||||
|
||||
J3DNBTScale m_nbtScale; // _5C
|
||||
};
|
||||
|
@ -1,10 +1,18 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DTEXMTX_H
|
||||
#define _JSYSTEM_J3D_J3DTEXMTX_H
|
||||
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "types.h"
|
||||
#include "Matrixf.h"
|
||||
|
||||
struct J3DTexMtx {
|
||||
void calc(const float (*)[4]);
|
||||
void calcTexMtx(const float (*)[4]);
|
||||
void calcPostTexMtx(const float (*)[4]);
|
||||
|
||||
void load(unsigned long) const;
|
||||
void loadTexMtx(unsigned long) const;
|
||||
void loadPostTexMtx(unsigned long) const;
|
||||
|
||||
u8 _00; // _00
|
||||
s8 m_flags; // _01
|
||||
u8 _02; // _02
|
||||
@ -35,7 +43,7 @@ struct J3DTexMtx {
|
||||
u32 _58; // _58
|
||||
u32 _5C; // _5C
|
||||
u32 _60; // _60
|
||||
Matrixf _64; // _64
|
||||
Mtx _64; // _64
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "types.h"
|
||||
|
||||
struct J3DTexMtxAnm {
|
||||
J3DTexMtxAnm();
|
||||
|
||||
u32 _00; // _00
|
||||
u32 _04; // _04
|
||||
};
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "types.h"
|
||||
|
||||
struct J3DTexNoAnm {
|
||||
J3DTexNoAnm();
|
||||
|
||||
u32 _00; // _00
|
||||
u32 _04; // _04
|
||||
u32 _08; // _08
|
||||
|
@ -16,6 +16,13 @@ struct _UnknownJ3DTextureParent {
|
||||
* @size{0xC}
|
||||
*/
|
||||
struct J3DTexture : _UnknownJ3DTextureParent {
|
||||
inline J3DTexture(u16 p1, ResTIMG* res)
|
||||
{
|
||||
_00 = p1;
|
||||
_02 = 0;
|
||||
_04 = res;
|
||||
}
|
||||
|
||||
virtual ~J3DTexture(); // _00
|
||||
|
||||
inline void setImageOffset(u32 format) { _04->m_imageDataOffset = (int)((format + _04->m_imageDataOffset) - (u32)_04); }
|
||||
|
@ -1,39 +1,151 @@
|
||||
#ifndef _JSYSTEM_J3D_J3DTYPES_H
|
||||
#define _JSYSTEM_J3D_J3DTYPES_H
|
||||
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/JMath.h"
|
||||
#include "types.h"
|
||||
|
||||
typedef u32 J3DErrType;
|
||||
|
||||
// TODO: Make a bitmask enum
|
||||
/**
|
||||
* @fabricatedName
|
||||
*/
|
||||
typedef u32 J3DModelLoaderFlags;
|
||||
#define J3DMLF_MtxCalc_SoftImage 0x00000001
|
||||
#define J3DMLF_MtxCalc_Maya 0x00000002
|
||||
#define J3DMLF_03 0x00000004
|
||||
#define J3DMLF_04 0x00000008
|
||||
#define J3DMLF_UseConcatViewShapeMatrices 0x00000010
|
||||
#define J3DMLF_06 0x00000020
|
||||
#define J3DMLF_07 0x00000040
|
||||
#define J3DMLF_08 0x00000080
|
||||
#define J3DMLF_09 0x00000100
|
||||
#define J3DMLF_10 0x00000200
|
||||
#define J3DMLF_11 0x00000400
|
||||
#define J3DMLF_12 0x00000800
|
||||
#define J3DMLF_13 0x00001000
|
||||
#define J3DMLF_14 0x00002000
|
||||
#define J3DMLF_15 0x00004000
|
||||
#define J3DMLF_16 0x00008000
|
||||
#define J3DMLF_17 0x00010000
|
||||
#define J3DMLF_18 0x00020000
|
||||
#define J3DMLF_19 0x00040000
|
||||
#define J3DMLF_20 0x00080000
|
||||
#define J3DMLF_21 0x00100000
|
||||
#define J3DMLF_22 0x00200000
|
||||
#define J3DMLF_23 0x00400000
|
||||
#define J3DMLF_24 0x00800000
|
||||
#define J3DMLF_25 0x01000000
|
||||
#define J3DMLF_26 0x02000000
|
||||
#define J3DMLF_27 0x04000000
|
||||
#define J3DMLF_28 0x08000000
|
||||
#define J3DMLF_29 0x10000000
|
||||
#define J3DMLF_30 0x20000000
|
||||
#define J3DMLF_31 0x40000000
|
||||
#define J3DMLF_32 0x80000000
|
||||
|
||||
// TODO: Convert to '' notation when not lazy.
|
||||
enum JBlockType {
|
||||
COLOR_AMBIENT_ON = 0x434c4142,
|
||||
COLOR_NULL = 0x434c4e4c,
|
||||
COLOR_LIGHT_OFF = 0x434c4f46,
|
||||
COLOR_LIGHT_ON = 0x434c4f4e,
|
||||
IND_FULL = 0x49424c46,
|
||||
IND_NULL = 0x49424c4e,
|
||||
PE_TEX_EDGE = 0x50454544,
|
||||
PE_FOG_OFF = 0x50454647,
|
||||
PE_FULL = 0x5045464c,
|
||||
PE_NULL = 0x50454e4c,
|
||||
PE_OPA = 0x50454f50,
|
||||
PE_XLU = 0x5045584c,
|
||||
TEX_GEN_4 = 0x54474234,
|
||||
TEX_GEN_BASIC = 0x54474243,
|
||||
TEX_GEN_NULL = 0x54474e4c,
|
||||
TEX_GEN_PATCHED = 0x54475054,
|
||||
TEV_16 = 0x54563136,
|
||||
TEV_1 = 0x54564231,
|
||||
TEV_2 = 0x54564232,
|
||||
TEV_4 = 0x54564234,
|
||||
TEV_8 = 0x54564238,
|
||||
TEV_NULL = 0x54564e4c,
|
||||
TEV_PATCHED = 0x54565054
|
||||
JBT_ColorAmbientOn = 'CLAB',
|
||||
JBT_ColorNull = 'CLNL',
|
||||
JBT_ColorLightOff = 'CLOF',
|
||||
JBT_ColorLightOn = 'CLON',
|
||||
JBT_IndFull = 'IBLF',
|
||||
JBT_IndNull = 'IBLN',
|
||||
JBT_PETexEdge = 'PEED',
|
||||
JBT_PEFogOff = 'PEFG',
|
||||
JBT_PEFull = 'PEFL',
|
||||
JBT_PENull = 'PENL',
|
||||
JBT_PEOpa = 'PEOP',
|
||||
JBT_PEXlu = 'PEXL',
|
||||
JBT_TexGen4 = 'TGB4',
|
||||
JBT_TexGenBasic = 'TGBC',
|
||||
JBT_TexGenNull = 'TGNL',
|
||||
JBT_TexGenPatched = 'TGPT',
|
||||
JBT_Tev16 = 'TV16',
|
||||
JBT_Tev1 = 'TVB1',
|
||||
JBT_Tev2 = 'TVB2',
|
||||
JBT_Tev4 = 'TVB4',
|
||||
JBT_Tev8 = 'TVB8',
|
||||
JBT_TevNull = 'TVNL',
|
||||
JBT_TevPatched = 'TVPT'
|
||||
};
|
||||
|
||||
struct J3DAlphaComp {
|
||||
u16 _00; // _00
|
||||
u8 _02; // _02
|
||||
u8 _03; // _03
|
||||
};
|
||||
|
||||
struct J3DBlend {
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
u8 _03; // _03
|
||||
};
|
||||
|
||||
typedef u16 J3DZMode;
|
||||
|
||||
struct J3DColorChan {
|
||||
J3DColorChan();
|
||||
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
};
|
||||
|
||||
struct J3DIndTevStage {
|
||||
J3DIndTevStage();
|
||||
|
||||
u8 _00[4]; // _00
|
||||
};
|
||||
|
||||
struct J3DLightObj {
|
||||
JGeometry::TVec3f m_position; // _00
|
||||
JGeometry::TVec3f m_direction; // _0C
|
||||
_GXColor* _18; // _18
|
||||
f32 _1C; // _1C
|
||||
f32 _20; // _20
|
||||
f32 _24; // _24
|
||||
f32 _28; // _28
|
||||
f32 _2C; // _2C
|
||||
f32 _30; // _30
|
||||
|
||||
void load(u32) const;
|
||||
};
|
||||
|
||||
struct J3DTevOrder {
|
||||
J3DTevOrder();
|
||||
|
||||
u8 m_texCoordID; // _00
|
||||
u8 m_texMapID; // _01
|
||||
u8 m_channelID; // _02
|
||||
};
|
||||
|
||||
// TODO: Determine if this needs packing pragmas to make it exactly 1 bytes
|
||||
/**
|
||||
* @size{0x1}
|
||||
*/
|
||||
struct J3DTevSwapModeTable {
|
||||
J3DTevSwapModeTable();
|
||||
|
||||
u8 _00;
|
||||
};
|
||||
|
||||
struct J3DTevStage {
|
||||
J3DTevStage();
|
||||
J3DTevStage(const struct J3DTevStageInfo&);
|
||||
|
||||
void setTevStageInfo(const J3DTevStageInfo&);
|
||||
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
u8 _03; // _03
|
||||
u8 _04; // _04
|
||||
u8 _05; // _05
|
||||
u8 _06; // _06
|
||||
u8 _07; // _07
|
||||
};
|
||||
|
||||
// TODO: Determine if this needs packing pragmas to make it exactly 6 bytes
|
||||
@ -41,21 +153,58 @@ enum JBlockType {
|
||||
* @size{0x6}
|
||||
*/
|
||||
struct J3DTexCoord {
|
||||
J3DTexCoord();
|
||||
|
||||
u8 _00; // _00
|
||||
u8 _01; // _01
|
||||
u8 _02; // _02
|
||||
u16 _04; // _04
|
||||
};
|
||||
|
||||
struct J3DNBTScale {
|
||||
struct J3DTransformInfo {
|
||||
JGeometry::TVec3f m_scale; // _00
|
||||
JGeometry::TVec3<s16> m_eulerRot; // _0C
|
||||
JGeometry::TVec3f m_zRotation; // _14
|
||||
};
|
||||
|
||||
struct J3DNBTScaleInfo {
|
||||
u8 _00; // _00
|
||||
float _04; // _04
|
||||
float _08; // _08
|
||||
float _0C; // _0C
|
||||
};
|
||||
|
||||
struct J3DNBTScale {
|
||||
inline J3DNBTScale()
|
||||
: _00(0)
|
||||
, _04(1.0f)
|
||||
, _08(1.0f)
|
||||
, _0C(1.0f)
|
||||
{
|
||||
}
|
||||
|
||||
/** @fabricated */
|
||||
inline J3DNBTScale(const J3DNBTScaleInfo& info)
|
||||
: _00(info._00)
|
||||
, _04(info._04)
|
||||
, _08(info._08)
|
||||
, _0C(info._0C)
|
||||
{
|
||||
}
|
||||
|
||||
u8 _00; // _00
|
||||
float _04; // _04
|
||||
float _08; // _08
|
||||
float _0C; // _0C
|
||||
};
|
||||
void loadNBTScale(J3DNBTScale&);
|
||||
|
||||
void loadTexCoordGens(u32, J3DTexCoord*);
|
||||
|
||||
enum J3DTexDiffFlag {};
|
||||
|
||||
enum J3DDeformAttachFlag {};
|
||||
enum J3DDeformAttachFlag { DeformAttach_0 = 0, DeformAttach_1 = 1 };
|
||||
|
||||
extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo;
|
||||
|
||||
#endif
|
||||
|
30
include/JSystem/JSupport/JSU.h
Normal file
30
include/JSystem/JSupport/JSU.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef _JSYSTEM_JSU_JSU_H
|
||||
#define _JSYSTEM_JSU_JSU_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// TODO: This is probably used all over the place...
|
||||
inline u8 JSULoByte(u16 p1) { return p1; } // unused/inlined
|
||||
// inline u8* JSULoByte(u16* p1) { return (u8*)p1; } // unused/inlined
|
||||
/** @fabricated */
|
||||
// inline u8 JSUHiByte(u16 p1) { return (p1 / 256); }
|
||||
inline u8 JSUHiByte(u16 p1) { p1 >>= 8; return p1; }
|
||||
// inline u8 JSUHiByte(u16 p1) { return JSULoByte((u8)(p1 / 256)); }
|
||||
// inline u8 JSUHiByte(u16 p1) { return ((u8*)&p1)[0]; }
|
||||
// inline u8* JSUHiByte(u16* p1) { return &((u8*)p1)[0]; }
|
||||
|
||||
template <typename T> T* JSUConvertOffsetToPtr(const void * base, const void* offset) {
|
||||
if (offset == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
return reinterpret_cast<T*>(reinterpret_cast<s32>(base) + reinterpret_cast<s32>(offset));
|
||||
}
|
||||
|
||||
template <typename T> T* JSUConvertOffsetToPtr(const void * base, u32 offset) {
|
||||
if (offset == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
return reinterpret_cast<T*>(reinterpret_cast<u32>(base) + offset);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,12 +1,12 @@
|
||||
#ifndef _SYSSHAPE_MODEL_H
|
||||
#define _SYSSHAPE_MODEL_H
|
||||
|
||||
#include "Matrixf.h"
|
||||
#include "types.h"
|
||||
#include "SysShape/MtxObject.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
|
||||
struct Matrixf;
|
||||
namespace Sys {
|
||||
struct Sphere;
|
||||
} // namespace Sys
|
||||
|
@ -131,7 +131,7 @@ JSYSTEM:=\
|
||||
$(BUILD_DIR)/asm/JSystem/J3D/J3DMaterialFactory.o\
|
||||
$(BUILD_DIR)/src/JSystem/J3D/J3DBinaryFormat.o\
|
||||
$(BUILD_DIR)/asm/JSystem/J3D/J3DModelLoader.o\
|
||||
$(BUILD_DIR)/asm/JSystem/J3D/J3DJointFactory.o\
|
||||
$(BUILD_DIR)/src/JSystem/J3D/J3DJointFactory.o\
|
||||
$(BUILD_DIR)/asm/JSystem/J3D/J3DShapeFactory.o\
|
||||
$(BUILD_DIR)/asm/JSystem/J3D/J3DAnmLoader.o\
|
||||
$(BUILD_DIR)/src/JSystem/J3D/J3DModelSaver.o\
|
||||
|
@ -1,3 +1,13 @@
|
||||
#include "JSystem/J3D/J3DAnmBase.h"
|
||||
#include "JSystem/J3D/J3DAnmCluster.h"
|
||||
#include "JSystem/J3D/J3DAnmColor.h"
|
||||
#include "JSystem/J3D/J3DAnmTevRegKey.h"
|
||||
#include "JSystem/J3D/J3DAnmTexPattern.h"
|
||||
#include "JSystem/J3D/J3DAnmTextureSRTKey.h"
|
||||
#include "JSystem/J3D/J3DAnmTransform.h"
|
||||
#include "JSystem/J3D/J3DAnmVtxColor.h"
|
||||
#include "JSystem/J3D/J3DFrameCtrl.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -127,22 +137,15 @@
|
||||
* Address: 80067678
|
||||
* Size: 000030
|
||||
*/
|
||||
void J3DFrameCtrl::init(short)
|
||||
void J3DFrameCtrl::init(short p1)
|
||||
{
|
||||
/*
|
||||
li r5, 2
|
||||
li r0, 0
|
||||
stb r5, 4(r3)
|
||||
lfs f1, lbl_80516A18@sda21(r2)
|
||||
stb r0, 5(r3)
|
||||
lfs f0, lbl_80516A1C@sda21(r2)
|
||||
sth r0, 6(r3)
|
||||
sth r4, 8(r3)
|
||||
sth r0, 0xa(r3)
|
||||
stfs f1, 0xc(r3)
|
||||
stfs f0, 0x10(r3)
|
||||
blr
|
||||
*/
|
||||
m_attr = 2;
|
||||
_05 = 0;
|
||||
_06 = 0;
|
||||
_08 = p1;
|
||||
_0A = 0;
|
||||
_0C = 1.0f;
|
||||
_10 = 0.0f;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1775,60 +1778,17 @@ lbl_80068A64:
|
||||
* Address: 80068A88
|
||||
* Size: 0000A8
|
||||
*/
|
||||
void J3DAnmColor::searchUpdateMaterialID(J3DModelData*)
|
||||
void J3DAnmColor::searchUpdateMaterialID(J3DModelData* data)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
li r31, 0
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
b lbl_80068B00
|
||||
|
||||
lbl_80068AB4:
|
||||
lwz r30, 0x64(r29)
|
||||
mr r4, r31
|
||||
addi r3, r28, 0x1c
|
||||
bl getName__10JUTNameTabCFUs
|
||||
mr r4, r3
|
||||
mr r3, r30
|
||||
bl getIndex__10JUTNameTabCFPCc
|
||||
cmpwi r3, -1
|
||||
beq lbl_80068AE8
|
||||
lwz r4, 0x18(r28)
|
||||
rlwinm r0, r31, 1, 0xf, 0x1e
|
||||
sthx r3, r4, r0
|
||||
b lbl_80068AFC
|
||||
|
||||
lbl_80068AE8:
|
||||
lis r4, 0x0000FFFF@ha
|
||||
lwz r3, 0x18(r28)
|
||||
addi r4, r4, 0x0000FFFF@l
|
||||
rlwinm r0, r31, 1, 0xf, 0x1e
|
||||
sthx r4, r3, r0
|
||||
|
||||
lbl_80068AFC:
|
||||
addi r31, r31, 1
|
||||
|
||||
lbl_80068B00:
|
||||
lhz r0, 0x14(r28)
|
||||
clrlwi r3, r31, 0x10
|
||||
cmplw r3, r0
|
||||
blt lbl_80068AB4
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
for (u16 i = 0; i < _14; i++) {
|
||||
JUTNameTab* matNameTable = data->m_materialTable._0C;
|
||||
int index = matNameTable->getIndex(m_nameTab.getName(i));
|
||||
if (index != -1) {
|
||||
_18[i] = index;
|
||||
} else {
|
||||
_18[i] = 0xFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2977,7 +2937,7 @@ lbl_80069854:
|
||||
* Address: 8006986C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmColorKey::getKind() const { return 0xB; }
|
||||
J3DAnmKind J3DAnmColorKey::getKind() const { return J3DAnmKind_ColorKey; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3061,7 +3021,7 @@ lbl_80069918:
|
||||
* Address: 80069930
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmColor::getKind() const { return 0x1; }
|
||||
J3DAnmKind J3DAnmColor::getKind() const { return J3DAnmKind_Color; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3125,7 +3085,7 @@ lbl_800699A8:
|
||||
* Address: 800699C0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmColorFull::getKind() const { return 0xA; }
|
||||
J3DAnmKind J3DAnmColorFull::getKind() const { return J3DAnmKind_ColorFull; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3174,7 +3134,7 @@ lbl_80069A1C:
|
||||
* Address: 80069A34
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmVtxColorKey::getKind() const { return 0xF; }
|
||||
J3DAnmKind J3DAnmVtxColorKey::getKind() const { return J3DAnmKind_VtxColorKey; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3219,7 +3179,7 @@ lbl_80069A80:
|
||||
* Address: 80069A98
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmVtxColor::getKind() const { return 0x7; }
|
||||
J3DAnmKind J3DAnmVtxColor::getKind() const { return J3DAnmKind_VtxColor; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3275,7 +3235,7 @@ lbl_80069AF8:
|
||||
* Address: 80069B10
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmVtxColorFull::getKind() const { return 0xE; }
|
||||
J3DAnmKind J3DAnmVtxColorFull::getKind() const { return J3DAnmKind_VtxColorFull; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3324,7 +3284,7 @@ lbl_80069B6C:
|
||||
* Address: 80069B84
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmClusterKey::getKind() const { return 0xD; }
|
||||
J3DAnmKind J3DAnmClusterKey::getKind() const { return J3DAnmKind_ClusterKey; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3369,7 +3329,7 @@ lbl_80069BD0:
|
||||
* Address: 80069BE8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmCluster::getKind() const { return 0x3; }
|
||||
J3DAnmKind J3DAnmCluster::getKind() const { return J3DAnmKind_Cluster; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3431,7 +3391,7 @@ lbl_80069C4C:
|
||||
* Address: 80069C64
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmClusterFull::getKind() const { return 0xC; }
|
||||
J3DAnmKind J3DAnmClusterFull::getKind() const { return J3DAnmKind_ClusterFull; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3480,7 +3440,7 @@ lbl_80069CC0:
|
||||
* Address: 80069CD8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmTransformFull::getKind() const { return 0x9; }
|
||||
J3DAnmKind J3DAnmTransformFull::getKind() const { return J3DAnmKind_TransformFull; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3525,296 +3485,296 @@ lbl_80069D24:
|
||||
* Address: 80069D3C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DAnmTransform::getKind() const { return 0x0; }
|
||||
// J3DAnmKind J3DAnmTransform::getKind() const { return J3DAnmKind_Transform; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80069D44
|
||||
* Size: 000234
|
||||
*/
|
||||
void J3DGetKeyFrameInterpolation<short>(float, J3DAnmKeyTableBase*, short*)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
lis r5, 0x4330
|
||||
lfd f2, lbl_80516A28@sda21(r2)
|
||||
lha r0, 0(r4)
|
||||
stw r5, 8(r1)
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f2
|
||||
fcmpo cr0, f1, f0
|
||||
bge lbl_80069D8C
|
||||
lha r0, 2(r4)
|
||||
stw r5, 8(r1)
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f1, f0, f2
|
||||
b lbl_80069F70
|
||||
// void J3DGetKeyFrameInterpolation<short>(float, J3DAnmKeyTableBase*, short*)
|
||||
// {
|
||||
// /*
|
||||
// stwu r1, -0x10(r1)
|
||||
// lis r5, 0x4330
|
||||
// lfd f2, lbl_80516A28@sda21(r2)
|
||||
// lha r0, 0(r4)
|
||||
// stw r5, 8(r1)
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f0, f0, f2
|
||||
// fcmpo cr0, f1, f0
|
||||
// bge lbl_80069D8C
|
||||
// lha r0, 2(r4)
|
||||
// stw r5, 8(r1)
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f1, f0, f2
|
||||
// b lbl_80069F70
|
||||
|
||||
lbl_80069D8C:
|
||||
lhz r0, 4(r3)
|
||||
cmplwi r0, 0
|
||||
bne lbl_80069E88
|
||||
lhz r6, 0(r3)
|
||||
stw r5, 8(r1)
|
||||
addi r0, r6, -1
|
||||
mulli r3, r0, 6
|
||||
lhax r0, r4, r3
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f2
|
||||
fcmpo cr0, f0, f1
|
||||
cror 2, 0, 2
|
||||
bne lbl_80069E2C
|
||||
add r3, r4, r3
|
||||
stw r5, 8(r1)
|
||||
lha r0, 2(r3)
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f1, f0, f2
|
||||
b lbl_80069F70
|
||||
b lbl_80069E2C
|
||||
// lbl_80069D8C:
|
||||
// lhz r0, 4(r3)
|
||||
// cmplwi r0, 0
|
||||
// bne lbl_80069E88
|
||||
// lhz r6, 0(r3)
|
||||
// stw r5, 8(r1)
|
||||
// addi r0, r6, -1
|
||||
// mulli r3, r0, 6
|
||||
// lhax r0, r4, r3
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f0, f0, f2
|
||||
// fcmpo cr0, f0, f1
|
||||
// cror 2, 0, 2
|
||||
// bne lbl_80069E2C
|
||||
// add r3, r4, r3
|
||||
// stw r5, 8(r1)
|
||||
// lha r0, 2(r3)
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f1, f0, f2
|
||||
// b lbl_80069F70
|
||||
// b lbl_80069E2C
|
||||
|
||||
lbl_80069DEC:
|
||||
srwi r7, r6, 1
|
||||
stw r5, 8(r1)
|
||||
mulli r0, r7, 3
|
||||
slwi r3, r0, 1
|
||||
lhax r0, r4, r3
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f2
|
||||
fcmpo cr0, f1, f0
|
||||
cror 2, 1, 2
|
||||
bne lbl_80069E28
|
||||
add r4, r4, r3
|
||||
subf r6, r7, r6
|
||||
b lbl_80069E2C
|
||||
// lbl_80069DEC:
|
||||
// srwi r7, r6, 1
|
||||
// stw r5, 8(r1)
|
||||
// mulli r0, r7, 3
|
||||
// slwi r3, r0, 1
|
||||
// lhax r0, r4, r3
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f0, f0, f2
|
||||
// fcmpo cr0, f1, f0
|
||||
// cror 2, 1, 2
|
||||
// bne lbl_80069E28
|
||||
// add r4, r4, r3
|
||||
// subf r6, r7, r6
|
||||
// b lbl_80069E2C
|
||||
|
||||
lbl_80069E28:
|
||||
mr r6, r7
|
||||
// lbl_80069E28:
|
||||
// mr r6, r7
|
||||
|
||||
lbl_80069E2C:
|
||||
cmplwi r6, 1
|
||||
bgt lbl_80069DEC
|
||||
psq_l f2, 0(r4), 1, qr5
|
||||
psq_l f0, 6(r4), 1, qr5
|
||||
psq_l f7, 2(r4), 1, qr5
|
||||
fsubs f5, f0, f2
|
||||
psq_l f6, 8(r4), 1, qr5
|
||||
fsubs f3, f1, f2
|
||||
psq_l f0, 10(r4), 1, qr5
|
||||
fsubs f4, f6, f7
|
||||
fdivs f3, f3, f5
|
||||
psq_l f1, 4(r4), 1, qr5
|
||||
fmadds f0, f0, f5, f7
|
||||
fnmsubs f4, f5, f1, f4
|
||||
fmuls f2, f3, f3
|
||||
fsubs f0, f0, f6
|
||||
fsubs f0, f0, f4
|
||||
fmuls f0, f2, f0
|
||||
fmadds f1, f5, f1, f0
|
||||
fmadds f1, f1, f3, f7
|
||||
fmadds f1, f4, f2, f1
|
||||
fsubs f1, f1, f0
|
||||
b lbl_80069F70
|
||||
// lbl_80069E2C:
|
||||
// cmplwi r6, 1
|
||||
// bgt lbl_80069DEC
|
||||
// psq_l f2, 0(r4), 1, qr5
|
||||
// psq_l f0, 6(r4), 1, qr5
|
||||
// psq_l f7, 2(r4), 1, qr5
|
||||
// fsubs f5, f0, f2
|
||||
// psq_l f6, 8(r4), 1, qr5
|
||||
// fsubs f3, f1, f2
|
||||
// psq_l f0, 10(r4), 1, qr5
|
||||
// fsubs f4, f6, f7
|
||||
// fdivs f3, f3, f5
|
||||
// psq_l f1, 4(r4), 1, qr5
|
||||
// fmadds f0, f0, f5, f7
|
||||
// fnmsubs f4, f5, f1, f4
|
||||
// fmuls f2, f3, f3
|
||||
// fsubs f0, f0, f6
|
||||
// fsubs f0, f0, f4
|
||||
// fmuls f0, f2, f0
|
||||
// fmadds f1, f5, f1, f0
|
||||
// fmadds f1, f1, f3, f7
|
||||
// fmadds f1, f4, f2, f1
|
||||
// fsubs f1, f1, f0
|
||||
// b lbl_80069F70
|
||||
|
||||
lbl_80069E88:
|
||||
lhz r6, 0(r3)
|
||||
stw r5, 8(r1)
|
||||
addi r0, r6, -1
|
||||
slwi r3, r0, 3
|
||||
lhax r0, r4, r3
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f2
|
||||
fcmpo cr0, f0, f1
|
||||
cror 2, 0, 2
|
||||
bne lbl_80069F18
|
||||
add r3, r4, r3
|
||||
stw r5, 8(r1)
|
||||
lha r0, 2(r3)
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f1, f0, f2
|
||||
b lbl_80069F70
|
||||
b lbl_80069F18
|
||||
// lbl_80069E88:
|
||||
// lhz r6, 0(r3)
|
||||
// stw r5, 8(r1)
|
||||
// addi r0, r6, -1
|
||||
// slwi r3, r0, 3
|
||||
// lhax r0, r4, r3
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f0, f0, f2
|
||||
// fcmpo cr0, f0, f1
|
||||
// cror 2, 0, 2
|
||||
// bne lbl_80069F18
|
||||
// add r3, r4, r3
|
||||
// stw r5, 8(r1)
|
||||
// lha r0, 2(r3)
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f1, f0, f2
|
||||
// b lbl_80069F70
|
||||
// b lbl_80069F18
|
||||
|
||||
lbl_80069EDC:
|
||||
rlwinm r3, r6, 2, 0, 0x1c
|
||||
stw r5, 8(r1)
|
||||
lhax r0, r4, r3
|
||||
srwi r7, r6, 1
|
||||
xoris r0, r0, 0x8000
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f2
|
||||
fcmpo cr0, f1, f0
|
||||
cror 2, 1, 2
|
||||
bne lbl_80069F14
|
||||
add r4, r4, r3
|
||||
subf r6, r7, r6
|
||||
b lbl_80069F18
|
||||
// lbl_80069EDC:
|
||||
// rlwinm r3, r6, 2, 0, 0x1c
|
||||
// stw r5, 8(r1)
|
||||
// lhax r0, r4, r3
|
||||
// srwi r7, r6, 1
|
||||
// xoris r0, r0, 0x8000
|
||||
// stw r0, 0xc(r1)
|
||||
// lfd f0, 8(r1)
|
||||
// fsubs f0, f0, f2
|
||||
// fcmpo cr0, f1, f0
|
||||
// cror 2, 1, 2
|
||||
// bne lbl_80069F14
|
||||
// add r4, r4, r3
|
||||
// subf r6, r7, r6
|
||||
// b lbl_80069F18
|
||||
|
||||
lbl_80069F14:
|
||||
mr r6, r7
|
||||
// lbl_80069F14:
|
||||
// mr r6, r7
|
||||
|
||||
lbl_80069F18:
|
||||
cmplwi r6, 1
|
||||
bgt lbl_80069EDC
|
||||
psq_l f2, 0(r4), 1, qr5
|
||||
psq_l f0, 8(r4), 1, qr5
|
||||
psq_l f7, 2(r4), 1, qr5
|
||||
fsubs f5, f0, f2
|
||||
psq_l f6, 10(r4), 1, qr5
|
||||
fsubs f3, f1, f2
|
||||
psq_l f0, 12(r4), 1, qr5
|
||||
fsubs f4, f6, f7
|
||||
fdivs f3, f3, f5
|
||||
psq_l f1, 6(r4), 1, qr5
|
||||
fmadds f0, f0, f5, f7
|
||||
fnmsubs f4, f5, f1, f4
|
||||
fmuls f2, f3, f3
|
||||
fsubs f0, f0, f6
|
||||
fsubs f0, f0, f4
|
||||
fmuls f0, f2, f0
|
||||
fmadds f1, f5, f1, f0
|
||||
fmadds f1, f1, f3, f7
|
||||
fmadds f1, f4, f2, f1
|
||||
fsubs f1, f1, f0
|
||||
// lbl_80069F18:
|
||||
// cmplwi r6, 1
|
||||
// bgt lbl_80069EDC
|
||||
// psq_l f2, 0(r4), 1, qr5
|
||||
// psq_l f0, 8(r4), 1, qr5
|
||||
// psq_l f7, 2(r4), 1, qr5
|
||||
// fsubs f5, f0, f2
|
||||
// psq_l f6, 10(r4), 1, qr5
|
||||
// fsubs f3, f1, f2
|
||||
// psq_l f0, 12(r4), 1, qr5
|
||||
// fsubs f4, f6, f7
|
||||
// fdivs f3, f3, f5
|
||||
// psq_l f1, 6(r4), 1, qr5
|
||||
// fmadds f0, f0, f5, f7
|
||||
// fnmsubs f4, f5, f1, f4
|
||||
// fmuls f2, f3, f3
|
||||
// fsubs f0, f0, f6
|
||||
// fsubs f0, f0, f4
|
||||
// fmuls f0, f2, f0
|
||||
// fmadds f1, f5, f1, f0
|
||||
// fmadds f1, f1, f3, f7
|
||||
// fmadds f1, f4, f2, f1
|
||||
// fsubs f1, f1, f0
|
||||
|
||||
lbl_80069F70:
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_80069F70:
|
||||
// addi r1, r1, 0x10
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80069F78
|
||||
* Size: 00017C
|
||||
*/
|
||||
void J3DGetKeyFrameInterpolation<float>(float, J3DAnmKeyTableBase*, float*)
|
||||
{
|
||||
/*
|
||||
lfs f0, 0(r4)
|
||||
fcmpo cr0, f1, f0
|
||||
bge lbl_80069F8C
|
||||
lfs f1, 4(r4)
|
||||
blr
|
||||
// void J3DGetKeyFrameInterpolation<float>(float, J3DAnmKeyTableBase*, float*)
|
||||
// {
|
||||
// /*
|
||||
// lfs f0, 0(r4)
|
||||
// fcmpo cr0, f1, f0
|
||||
// bge lbl_80069F8C
|
||||
// lfs f1, 4(r4)
|
||||
// blr
|
||||
|
||||
lbl_80069F8C:
|
||||
lhz r0, 4(r3)
|
||||
cmplwi r0, 0
|
||||
bne lbl_8006A048
|
||||
lhz r3, 0(r3)
|
||||
addi r0, r3, -1
|
||||
mulli r0, r0, 0xc
|
||||
lfsx f0, r4, r0
|
||||
fcmpo cr0, f0, f1
|
||||
cror 2, 0, 2
|
||||
bne lbl_80069FF0
|
||||
add r3, r4, r0
|
||||
lfs f1, 4(r3)
|
||||
blr
|
||||
b lbl_80069FF0
|
||||
// lbl_80069F8C:
|
||||
// lhz r0, 4(r3)
|
||||
// cmplwi r0, 0
|
||||
// bne lbl_8006A048
|
||||
// lhz r3, 0(r3)
|
||||
// addi r0, r3, -1
|
||||
// mulli r0, r0, 0xc
|
||||
// lfsx f0, r4, r0
|
||||
// fcmpo cr0, f0, f1
|
||||
// cror 2, 0, 2
|
||||
// bne lbl_80069FF0
|
||||
// add r3, r4, r0
|
||||
// lfs f1, 4(r3)
|
||||
// blr
|
||||
// b lbl_80069FF0
|
||||
|
||||
lbl_80069FC4:
|
||||
srwi r5, r3, 1
|
||||
mulli r0, r5, 3
|
||||
slwi r0, r0, 2
|
||||
lfsx f0, r4, r0
|
||||
fcmpo cr0, f1, f0
|
||||
cror 2, 1, 2
|
||||
bne lbl_80069FEC
|
||||
add r4, r4, r0
|
||||
subf r3, r5, r3
|
||||
b lbl_80069FF0
|
||||
// lbl_80069FC4:
|
||||
// srwi r5, r3, 1
|
||||
// mulli r0, r5, 3
|
||||
// slwi r0, r0, 2
|
||||
// lfsx f0, r4, r0
|
||||
// fcmpo cr0, f1, f0
|
||||
// cror 2, 1, 2
|
||||
// bne lbl_80069FEC
|
||||
// add r4, r4, r0
|
||||
// subf r3, r5, r3
|
||||
// b lbl_80069FF0
|
||||
|
||||
lbl_80069FEC:
|
||||
mr r3, r5
|
||||
// lbl_80069FEC:
|
||||
// mr r3, r5
|
||||
|
||||
lbl_80069FF0:
|
||||
cmplwi r3, 1
|
||||
bgt lbl_80069FC4
|
||||
lfs f0, 0(r4)
|
||||
lfs f2, 0xc(r4)
|
||||
fsubs f5, f1, f0
|
||||
lfs f6, 4(r4)
|
||||
fsubs f4, f2, f0
|
||||
lfs f2, 0x10(r4)
|
||||
lfs f7, 8(r4)
|
||||
lfs f8, 0x14(r4)
|
||||
fdivs f3, f5, f4
|
||||
fmuls f0, f3, f3
|
||||
fsubs f4, f6, f2
|
||||
fadds f1, f3, f3
|
||||
fsubs f2, f0, f3
|
||||
fmsubs f0, f1, f2, f0
|
||||
fmadds f1, f7, f2, f7
|
||||
fmadds f0, f0, f4, f6
|
||||
fmadds f1, f8, f2, f1
|
||||
fmsubs f1, f3, f7, f1
|
||||
fnmsubs f1, f5, f1, f0
|
||||
blr
|
||||
// lbl_80069FF0:
|
||||
// cmplwi r3, 1
|
||||
// bgt lbl_80069FC4
|
||||
// lfs f0, 0(r4)
|
||||
// lfs f2, 0xc(r4)
|
||||
// fsubs f5, f1, f0
|
||||
// lfs f6, 4(r4)
|
||||
// fsubs f4, f2, f0
|
||||
// lfs f2, 0x10(r4)
|
||||
// lfs f7, 8(r4)
|
||||
// lfs f8, 0x14(r4)
|
||||
// fdivs f3, f5, f4
|
||||
// fmuls f0, f3, f3
|
||||
// fsubs f4, f6, f2
|
||||
// fadds f1, f3, f3
|
||||
// fsubs f2, f0, f3
|
||||
// fmsubs f0, f1, f2, f0
|
||||
// fmadds f1, f7, f2, f7
|
||||
// fmadds f0, f0, f4, f6
|
||||
// fmadds f1, f8, f2, f1
|
||||
// fmsubs f1, f3, f7, f1
|
||||
// fnmsubs f1, f5, f1, f0
|
||||
// blr
|
||||
|
||||
lbl_8006A048:
|
||||
lhz r3, 0(r3)
|
||||
addi r0, r3, -1
|
||||
slwi r0, r0, 4
|
||||
lfsx f0, r4, r0
|
||||
fcmpo cr0, f0, f1
|
||||
cror 2, 0, 2
|
||||
bne lbl_8006A09C
|
||||
add r3, r4, r0
|
||||
lfs f1, 4(r3)
|
||||
blr
|
||||
b lbl_8006A09C
|
||||
// lbl_8006A048:
|
||||
// lhz r3, 0(r3)
|
||||
// addi r0, r3, -1
|
||||
// slwi r0, r0, 4
|
||||
// lfsx f0, r4, r0
|
||||
// fcmpo cr0, f0, f1
|
||||
// cror 2, 0, 2
|
||||
// bne lbl_8006A09C
|
||||
// add r3, r4, r0
|
||||
// lfs f1, 4(r3)
|
||||
// blr
|
||||
// b lbl_8006A09C
|
||||
|
||||
lbl_8006A074:
|
||||
rlwinm r0, r3, 3, 0, 0x1b
|
||||
srwi r5, r3, 1
|
||||
lfsx f0, r4, r0
|
||||
fcmpo cr0, f1, f0
|
||||
cror 2, 1, 2
|
||||
bne lbl_8006A098
|
||||
add r4, r4, r0
|
||||
subf r3, r5, r3
|
||||
b lbl_8006A09C
|
||||
// lbl_8006A074:
|
||||
// rlwinm r0, r3, 3, 0, 0x1b
|
||||
// srwi r5, r3, 1
|
||||
// lfsx f0, r4, r0
|
||||
// fcmpo cr0, f1, f0
|
||||
// cror 2, 1, 2
|
||||
// bne lbl_8006A098
|
||||
// add r4, r4, r0
|
||||
// subf r3, r5, r3
|
||||
// b lbl_8006A09C
|
||||
|
||||
lbl_8006A098:
|
||||
mr r3, r5
|
||||
// lbl_8006A098:
|
||||
// mr r3, r5
|
||||
|
||||
lbl_8006A09C:
|
||||
cmplwi r3, 1
|
||||
bgt lbl_8006A074
|
||||
lfs f0, 0(r4)
|
||||
lfs f2, 0x10(r4)
|
||||
fsubs f5, f1, f0
|
||||
lfs f6, 4(r4)
|
||||
fsubs f4, f2, f0
|
||||
lfs f2, 0x14(r4)
|
||||
lfs f7, 0xc(r4)
|
||||
lfs f8, 0x18(r4)
|
||||
fdivs f3, f5, f4
|
||||
fmuls f0, f3, f3
|
||||
fsubs f4, f6, f2
|
||||
fadds f1, f3, f3
|
||||
fsubs f2, f0, f3
|
||||
fmsubs f0, f1, f2, f0
|
||||
fmadds f1, f7, f2, f7
|
||||
fmadds f0, f0, f4, f6
|
||||
fmadds f1, f8, f2, f1
|
||||
fmsubs f1, f3, f7, f1
|
||||
fnmsubs f1, f5, f1, f0
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006A09C:
|
||||
// cmplwi r3, 1
|
||||
// bgt lbl_8006A074
|
||||
// lfs f0, 0(r4)
|
||||
// lfs f2, 0x10(r4)
|
||||
// fsubs f5, f1, f0
|
||||
// lfs f6, 4(r4)
|
||||
// fsubs f4, f2, f0
|
||||
// lfs f2, 0x14(r4)
|
||||
// lfs f7, 0xc(r4)
|
||||
// lfs f8, 0x18(r4)
|
||||
// fdivs f3, f5, f4
|
||||
// fmuls f0, f3, f3
|
||||
// fsubs f4, f6, f2
|
||||
// fadds f1, f3, f3
|
||||
// fsubs f2, f0, f3
|
||||
// fmsubs f0, f1, f2, f0
|
||||
// fmadds f1, f7, f2, f7
|
||||
// fmadds f0, f0, f4, f6
|
||||
// fmadds f1, f8, f2, f1
|
||||
// fmsubs f1, f3, f7, f1
|
||||
// fnmsubs f1, f5, f1, f0
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,40 +1,17 @@
|
||||
#include "JSystem/J3D/J3DJointFactory.h"
|
||||
#include "JSystem/J3D/J3DJoint.h"
|
||||
#include "JSystem/JSupport/JSU.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
Generated from dpostproc
|
||||
*/
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80071B20
|
||||
* Size: 000058
|
||||
*/
|
||||
J3DJointFactory::J3DJointFactory(const J3DJointBlock&)
|
||||
J3DJointFactory::J3DJointFactory(const J3DJointBlock& block)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
lwz r4, 0xc(r4)
|
||||
stw r30, 8(r1)
|
||||
mr r30, r3
|
||||
mr r3, r31
|
||||
bl "JSUConvertOffsetToPtr<16J3DJointInitData>__FPCvUl"
|
||||
stw r3, 0(r30)
|
||||
mr r3, r31
|
||||
lwz r4, 0x10(r31)
|
||||
bl "JSUConvertOffsetToPtr<Us>__FPCvUl"
|
||||
stw r3, 4(r30)
|
||||
mr r3, r30
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
m_initData = JSUConvertOffsetToPtr<J3DJointInitData>(&block, block._0C);
|
||||
m_indexMap = JSUConvertOffsetToPtr<u16>(&block, block._10);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -42,110 +19,21 @@ J3DJointFactory::J3DJointFactory(const J3DJointBlock&)
|
||||
* Address: 80071B78
|
||||
* Size: 000180
|
||||
*/
|
||||
void J3DJointFactory::create(int)
|
||||
J3DJoint* J3DJointFactory::create(int jointIndex)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
li r3, 0x5c
|
||||
stw r30, 8(r1)
|
||||
mr r30, r4
|
||||
bl __nw__FUl
|
||||
or. r4, r3, r3
|
||||
beq lbl_80071BAC
|
||||
bl __ct__8J3DJointFv
|
||||
mr r4, r3
|
||||
|
||||
lbl_80071BAC:
|
||||
sth r30, 0x14(r4)
|
||||
slwi r0, r30, 1
|
||||
li r3, 0
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r5, r5, r0
|
||||
slwi r5, r5, 6
|
||||
lhzx r5, r6, r5
|
||||
stb r5, 0x16(r4)
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r5, r5, r0
|
||||
slwi r5, r5, 6
|
||||
add r5, r6, r5
|
||||
lbz r5, 2(r5)
|
||||
stb r5, 0x17(r4)
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r5, r5, r0
|
||||
slwi r5, r5, 6
|
||||
addi r7, r5, 4
|
||||
add r7, r6, r7
|
||||
lfs f0, 0(r7)
|
||||
stfs f0, 0x18(r4)
|
||||
lfs f0, 4(r7)
|
||||
stfs f0, 0x1c(r4)
|
||||
lfs f0, 8(r7)
|
||||
stfs f0, 0x20(r4)
|
||||
lha r5, 0xc(r7)
|
||||
sth r5, 0x24(r4)
|
||||
lha r5, 0xe(r7)
|
||||
sth r5, 0x26(r4)
|
||||
lha r5, 0x10(r7)
|
||||
sth r5, 0x28(r4)
|
||||
lfs f0, 0x14(r7)
|
||||
stfs f0, 0x2c(r4)
|
||||
lfs f0, 0x18(r7)
|
||||
stfs f0, 0x30(r4)
|
||||
lfs f0, 0x1c(r7)
|
||||
stfs f0, 0x34(r4)
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r5, r5, r0
|
||||
slwi r5, r5, 6
|
||||
add r5, r6, r5
|
||||
lfs f0, 0x24(r5)
|
||||
stfs f0, 0x38(r4)
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r5, r5, r0
|
||||
slwi r5, r5, 6
|
||||
addi r5, r5, 0x28
|
||||
add r5, r6, r5
|
||||
lfs f0, 0(r5)
|
||||
stfs f0, 0x3c(r4)
|
||||
lfs f0, 4(r5)
|
||||
stfs f0, 0x40(r4)
|
||||
lfs f0, 8(r5)
|
||||
stfs f0, 0x44(r4)
|
||||
lwz r5, 4(r31)
|
||||
lwz r6, 0(r31)
|
||||
lhzx r0, r5, r0
|
||||
slwi r5, r0, 6
|
||||
addi r5, r5, 0x34
|
||||
add r5, r6, r5
|
||||
lfs f0, 0(r5)
|
||||
stfs f0, 0x48(r4)
|
||||
lfs f0, 4(r5)
|
||||
stfs f0, 0x4c(r4)
|
||||
lfs f0, 8(r5)
|
||||
stfs f0, 0x50(r4)
|
||||
stw r3, 0x54(r4)
|
||||
lbz r0, 0x17(r4)
|
||||
cmplwi r0, 0xff
|
||||
bne lbl_80071CDC
|
||||
stb r3, 0x17(r4)
|
||||
|
||||
lbl_80071CDC:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r4
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
J3DJoint* joint = new J3DJoint();
|
||||
joint->m_jointIdx = jointIndex;
|
||||
joint->_16 = m_initData[m_indexMap[jointIndex]]._00;
|
||||
joint->m_ignoreParentScaling = m_initData[m_indexMap[jointIndex]].m_ignoreParentScaling;
|
||||
joint->m_transformInfo = m_initData[m_indexMap[jointIndex]].m_transformInfo;
|
||||
joint->_38 = m_initData[m_indexMap[jointIndex]]._24;
|
||||
joint->m_yRotation = m_initData[m_indexMap[jointIndex]]._28;
|
||||
joint->_48 = m_initData[m_indexMap[jointIndex]]._34;
|
||||
joint->m_mtxCalc = nullptr;
|
||||
if (joint->m_ignoreParentScaling == 0xFF) {
|
||||
joint->m_ignoreParentScaling = 0;
|
||||
}
|
||||
return joint;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -153,16 +41,6 @@ lbl_80071CDC:
|
||||
* Address: 80071CF8
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DJointInitData>(const void*, unsigned long)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_80071D08
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80071D08:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// void JSUConvertOffsetToPtr<J3DJointInitData>(const void*, unsigned long)
|
||||
// {
|
||||
// }
|
||||
|
@ -51,7 +51,7 @@
|
||||
*/
|
||||
J3DJointTree::J3DJointTree()
|
||||
: m_hierarchy(nullptr)
|
||||
, _08(0)
|
||||
, m_08(0)
|
||||
, m_flags(0)
|
||||
, _10(nullptr)
|
||||
, m_transformCalc(nullptr)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,15 @@
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/J3D/J3DColorBlock.h"
|
||||
#include "JSystem/J3D/J3DDisplayListObj.h"
|
||||
#include "JSystem/J3D/J3DInd.h"
|
||||
#include "JSystem/J3D/J3DPacket.h"
|
||||
#include "JSystem/J3D/J3DPE.h"
|
||||
#include "JSystem/J3D/J3DShape.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "JSystem/J3D/J3DTevBlock.h"
|
||||
#include "JSystem/J3D/J3DTexGenBlock.h"
|
||||
#include "JSystem/J3D/J3DTexMtx.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -193,8 +205,21 @@
|
||||
* Address: 800614E0
|
||||
* Size: 000200
|
||||
*/
|
||||
void J3DMaterial::createColorBlock(unsigned long)
|
||||
J3DColorBlock* J3DMaterial::createColorBlock(u32 type)
|
||||
{
|
||||
J3DColorBlock* result = nullptr;
|
||||
switch (type) {
|
||||
case 0:
|
||||
result = new J3DColorBlockLightOff();
|
||||
break;
|
||||
case 0x40000000:
|
||||
result = new J3DColorBlockLightOn();
|
||||
break;
|
||||
case 0x80000001:
|
||||
result = new J3DColorBlockAmbientOn();
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -347,39 +372,11 @@ lbl_800616C4:
|
||||
* --INFO--
|
||||
* Address: 800616E0
|
||||
* Size: 00005C
|
||||
* __dt__21J3DColorBlockLightOffFv
|
||||
*/
|
||||
J3DColorBlockLightOff::~J3DColorBlockLightOff()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_80061724
|
||||
lis r3, __vt__21J3DColorBlockLightOff@ha
|
||||
addi r0, r3, __vt__21J3DColorBlockLightOff@l
|
||||
stw r0, 0(r31)
|
||||
beq lbl_80061714
|
||||
lis r3, __vt__13J3DColorBlock@ha
|
||||
addi r0, r3, __vt__13J3DColorBlock@l
|
||||
stw r0, 0(r31)
|
||||
|
||||
lbl_80061714:
|
||||
extsh. r0, r4
|
||||
ble lbl_80061724
|
||||
mr r3, r31
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80061724:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DColorBlockLightOff::~J3DColorBlockLightOff()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -448,40 +445,31 @@ J3DGXColor::J3DGXColor() { }
|
||||
* --INFO--
|
||||
* Address: 800617F4
|
||||
* Size: 000048
|
||||
* __dt__13J3DColorBlockFv
|
||||
*/
|
||||
J3DColorBlock::~J3DColorBlock()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_80061824
|
||||
lis r5, __vt__13J3DColorBlock@ha
|
||||
extsh. r0, r4
|
||||
addi r0, r5, __vt__13J3DColorBlock@l
|
||||
stw r0, 0(r31)
|
||||
ble lbl_80061824
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80061824:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DColorBlock::~J3DColorBlock()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006183C
|
||||
* Size: 000164
|
||||
*/
|
||||
void J3DMaterial::createTexGenBlock(unsigned long)
|
||||
J3DTexGenBlock* J3DMaterial::createTexGenBlock(u32 flags)
|
||||
{
|
||||
J3DTexGenBlock* result = nullptr;
|
||||
switch (flags) {
|
||||
case J3DMLF_28:
|
||||
result = new J3DTexGenBlock4();
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
result = new J3DTexGenBlockBasic();
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -589,39 +577,11 @@ lbl_80061988:
|
||||
* --INFO--
|
||||
* Address: 800619A0
|
||||
* Size: 00005C
|
||||
* __dt__21J3DTexGenBlockPatchedFv
|
||||
*/
|
||||
J3DTexGenBlockPatched::~J3DTexGenBlockPatched()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_800619E4
|
||||
lis r3, __vt__21J3DTexGenBlockPatched@ha
|
||||
addi r0, r3, __vt__21J3DTexGenBlockPatched@l
|
||||
stw r0, 0(r31)
|
||||
beq lbl_800619D4
|
||||
lis r3, __vt__14J3DTexGenBlock@ha
|
||||
addi r0, r3, __vt__14J3DTexGenBlock@l
|
||||
stw r0, 0(r31)
|
||||
|
||||
lbl_800619D4:
|
||||
extsh. r0, r4
|
||||
ble lbl_800619E4
|
||||
mr r3, r31
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_800619E4:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DTexGenBlockPatched::~J3DTexGenBlockPatched()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -648,39 +608,18 @@ J3DTexCoord::J3DTexCoord()
|
||||
* --INFO--
|
||||
* Address: 80061A24
|
||||
* Size: 000048
|
||||
* __dt__14J3DTexGenBlockFv
|
||||
*/
|
||||
J3DTexGenBlock::~J3DTexGenBlock()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_80061A54
|
||||
lis r5, __vt__14J3DTexGenBlock@ha
|
||||
extsh. r0, r4
|
||||
addi r0, r5, __vt__14J3DTexGenBlock@l
|
||||
stw r0, 0(r31)
|
||||
ble lbl_80061A54
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80061A54:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DTexGenBlock::~J3DTexGenBlock()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80061A6C
|
||||
* Size: 000374
|
||||
*/
|
||||
void J3DMaterial::createTevBlock(int)
|
||||
J3DTevBlock* J3DMaterial::createTevBlock(int)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -1241,7 +1180,7 @@ lbl_80062164:
|
||||
* Address: 8006217C
|
||||
* Size: 0000E8
|
||||
*/
|
||||
void J3DMaterial::createIndBlock(int)
|
||||
J3DIndBlock* J3DMaterial::createIndBlock(int)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -1464,7 +1403,7 @@ lbl_8006237C:
|
||||
* Address: 80062394
|
||||
* Size: 00027C
|
||||
*/
|
||||
void J3DMaterial::createPEBlock(unsigned long, unsigned long)
|
||||
J3DPEBlock* J3DMaterial::createPEBlock(unsigned long, unsigned long)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -1681,7 +1620,7 @@ lbl_80062640:
|
||||
* Address: 80062658
|
||||
* Size: 000050
|
||||
*/
|
||||
void J3DMaterial::calcSizeColorBlock(unsigned long)
|
||||
u32 J3DMaterial::calcSizeColorBlock(unsigned long)
|
||||
{
|
||||
/*
|
||||
cmpwi r3, 0
|
||||
@ -1722,25 +1661,15 @@ lbl_800626A0:
|
||||
* Address: 800626A8
|
||||
* Size: 00002C
|
||||
*/
|
||||
void J3DMaterial::calcSizeTexGenBlock(unsigned long)
|
||||
u32 J3DMaterial::calcSizeTexGenBlock(u32 flags)
|
||||
{
|
||||
/*
|
||||
lis r0, 0x800
|
||||
cmpw r3, r0
|
||||
beq lbl_800626C4
|
||||
bge lbl_800626CC
|
||||
cmpwi r3, 0
|
||||
beq lbl_800626CC
|
||||
b lbl_800626CC
|
||||
|
||||
lbl_800626C4:
|
||||
li r3, 0x6c
|
||||
blr
|
||||
|
||||
lbl_800626CC:
|
||||
li r3, 0x6c
|
||||
blr
|
||||
*/
|
||||
switch (flags) {
|
||||
case J3DMLF_28:
|
||||
return sizeof(J3DTexGenBlock4);
|
||||
case 0:
|
||||
default:
|
||||
return sizeof(J3DTexGenBlockBasic);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1748,36 +1677,46 @@ lbl_800626CC:
|
||||
* Address: 800626D4
|
||||
* Size: 000048
|
||||
*/
|
||||
void J3DMaterial::calcSizeTevBlock(int)
|
||||
u32 J3DMaterial::calcSizeTevBlock(int count)
|
||||
{
|
||||
/*
|
||||
cmpwi r3, 1
|
||||
li r0, 0
|
||||
bgt lbl_800626E8
|
||||
li r0, 0x1c
|
||||
b lbl_80062714
|
||||
|
||||
lbl_800626E8:
|
||||
cmpwi r3, 2
|
||||
bne lbl_800626F8
|
||||
li r0, 0x6c
|
||||
b lbl_80062714
|
||||
|
||||
lbl_800626F8:
|
||||
cmpwi r3, 4
|
||||
bgt lbl_80062708
|
||||
li r0, 0x94
|
||||
b lbl_80062714
|
||||
|
||||
lbl_80062708:
|
||||
cmpwi r3, 0x10
|
||||
bgt lbl_80062714
|
||||
li r0, 0x174
|
||||
|
||||
lbl_80062714:
|
||||
mr r3, r0
|
||||
blr
|
||||
*/
|
||||
u32 result = 0;
|
||||
if (count <= 1) {
|
||||
result = sizeof(J3DTevBlock1);
|
||||
} else if (count == 2) {
|
||||
result = sizeof(J3DTevBlock2);
|
||||
} else if (count <= 4) {
|
||||
result = sizeof(J3DTevBlock4);
|
||||
} else if (count <= 16) {
|
||||
result = sizeof(J3DTevBlock16);
|
||||
}
|
||||
// switch (count) {
|
||||
// case 0:
|
||||
// case 1:
|
||||
// result = sizeof(J3DTevBlock1);
|
||||
// break;
|
||||
// case 2:
|
||||
// result = sizeof(J3DTevBlock2);
|
||||
// break;
|
||||
// case 3:
|
||||
// case 4:
|
||||
// result = sizeof(J3DTevBlock4);
|
||||
// break;
|
||||
// case 5:
|
||||
// case 6:
|
||||
// case 7:
|
||||
// case 8:
|
||||
// case 9:
|
||||
// case 10:
|
||||
// case 11:
|
||||
// case 12:
|
||||
// case 13:
|
||||
// case 14:
|
||||
// case 15:
|
||||
// case 16:
|
||||
// result = sizeof(J3DTevBlock16);
|
||||
// break;
|
||||
// }
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1785,15 +1724,13 @@ lbl_80062714:
|
||||
* Address: 8006271C
|
||||
* Size: 000014
|
||||
*/
|
||||
void J3DMaterial::calcSizeIndBlock(int)
|
||||
u32 J3DMaterial::calcSizeIndBlock(int count)
|
||||
{
|
||||
/*
|
||||
cmpwi r3, 0
|
||||
li r3, 4
|
||||
beqlr
|
||||
li r3, 0x7c
|
||||
blr
|
||||
*/
|
||||
if (count != 0) {
|
||||
return sizeof(J3DIndBlockFull);
|
||||
} else {
|
||||
return sizeof(J3DIndBlockNull);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1801,7 +1738,7 @@ void J3DMaterial::calcSizeIndBlock(int)
|
||||
* Address: 80062730
|
||||
* Size: 000068
|
||||
*/
|
||||
void J3DMaterial::calcSizePEBlock(unsigned long, unsigned long)
|
||||
u32 J3DMaterial::calcSizePEBlock(unsigned long, unsigned long)
|
||||
{
|
||||
/*
|
||||
cmplwi r3, 0
|
||||
@ -1847,9 +1784,25 @@ lbl_80062790:
|
||||
* --INFO--
|
||||
* Address: 80062798
|
||||
* Size: 000050
|
||||
* initialize__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::initialize()
|
||||
{
|
||||
m_shape = nullptr;
|
||||
_04 = nullptr;
|
||||
m_joint = nullptr;
|
||||
_10 = 1;
|
||||
_14 = -1;
|
||||
_18 = 0;
|
||||
_20 = 0;
|
||||
m_colorBlock = nullptr;
|
||||
m_texGenBlock = nullptr;
|
||||
m_tevBlock = nullptr;
|
||||
m_indBlock = nullptr;
|
||||
m_peBlock = nullptr;
|
||||
_38 = nullptr;
|
||||
_3C = nullptr;
|
||||
_48 = nullptr;
|
||||
/*
|
||||
li r6, 0
|
||||
lis r4, 0x0000FFFF@ha
|
||||
@ -1878,58 +1831,13 @@ void J3DMaterial::initialize()
|
||||
* --INFO--
|
||||
* Address: 800627E8
|
||||
* Size: 0000BC
|
||||
* countDLSize__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::countDLSize()
|
||||
u32 J3DMaterial::countDLSize()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r3
|
||||
lwz r3, 0x28(r3)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x30(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
mr r31, r3
|
||||
lwz r3, 0x24(r29)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x28(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
mr r30, r3
|
||||
lwz r3, 0x2c(r29)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x44(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
add r31, r31, r3
|
||||
lwz r3, 0x30(r29)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x14(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
add r31, r31, r3
|
||||
lwz r3, 0x34(r29)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x20(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
add r3, r31, r3
|
||||
addi r0, r3, 0x1f
|
||||
add r0, r30, r0
|
||||
rlwinm r3, r0, 0, 0, 0x1a
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r0, 0x24(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
return ALIGN_NEXT(+m_colorBlock->countDLSize() + m_texGenBlock->countDLSize() + m_tevBlock->countDLSize() + m_indBlock->countDLSize()
|
||||
+ m_peBlock->countDLSize(),
|
||||
0x20);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1979,21 +1887,21 @@ void J3DColorBlock::load() { }
|
||||
* Address: 800628D0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getCullMode() const { return 0x2; }
|
||||
u8 J3DColorBlock::getCullMode() const { return 0x2; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800628D8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DIndBlock::getIndTexStageNum() const { return 0x0; }
|
||||
u8 J3DIndBlock::getIndTexStageNum() const { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800628E0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getColorChanNum() const { return 0x0; }
|
||||
u8 J3DColorBlock::getColorChanNum() const { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -2401,33 +2309,14 @@ void J3DMaterial::makeSharedDisplayList()
|
||||
* --INFO--
|
||||
* Address: 80062EB8
|
||||
* Size: 000050
|
||||
* load__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::load()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r4, j3dSys@ha
|
||||
stw r0, 0x14(r1)
|
||||
addi r4, r4, j3dSys@l
|
||||
lwz r0, 0x34(r4)
|
||||
lwz r5, 0x10(r3)
|
||||
rlwinm. r0, r0, 0, 0x1e, 0x1e
|
||||
stw r5, 0x54(r4)
|
||||
bne lbl_80062EF8
|
||||
lwz r3, 0x28(r3)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x5c(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
bl loadNBTScale__FR11J3DNBTScale
|
||||
|
||||
lbl_80062EF8:
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
j3dSys._54 = _10;
|
||||
if ((j3dSys._34 & 2) == 0) {
|
||||
loadNBTScale(*m_texGenBlock->getNBTScale());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2435,93 +2324,38 @@ lbl_80062EF8:
|
||||
* Address: 80062F08
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTexGenBlock::getNBTScale() { return 0x0; }
|
||||
J3DNBTScale* J3DTexGenBlock::getNBTScale() { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80062F10
|
||||
* Size: 000064
|
||||
* loadSharedDL__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::loadSharedDL()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r4, j3dSys@ha
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
addi r3, r4, j3dSys@l
|
||||
lwz r0, 0x34(r3)
|
||||
lwz r4, 0x10(r31)
|
||||
rlwinm. r0, r0, 0, 0x1e, 0x1e
|
||||
stw r4, 0x54(r3)
|
||||
bne lbl_80062F60
|
||||
lwz r3, 0x48(r31)
|
||||
bl callDL__17J3DDisplayListObjCFv
|
||||
lwz r3, 0x28(r31)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x5c(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
bl loadNBTScale__FR11J3DNBTScale
|
||||
|
||||
lbl_80062F60:
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
j3dSys._54 = _10;
|
||||
if ((j3dSys._34 & 2) == 0) {
|
||||
_48->callDL();
|
||||
loadNBTScale(*m_texGenBlock->getNBTScale());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80062F74
|
||||
* Size: 000098
|
||||
* patch__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::patch()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r4, j3dSys@ha
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
addi r31, r4, j3dSys@l
|
||||
stw r30, 8(r1)
|
||||
mr r30, r3
|
||||
lwz r0, 0x20(r3)
|
||||
lwz r3, 0x3c(r31)
|
||||
stw r0, 0x34(r3)
|
||||
lwz r3, 0x3c(r31)
|
||||
lwz r3, 0x20(r3)
|
||||
bl beginPatch__17J3DDisplayListObjFv
|
||||
lwz r3, 0x2c(r30)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x28(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
lwz r3, 0x24(r30)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x10(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
lwz r3, 0x28(r30)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x20(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
lwz r3, 0x3c(r31)
|
||||
lwz r3, 0x20(r3)
|
||||
bl endPatch__17J3DDisplayListObjFv
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
|
||||
j3dSys.m_matPacket->_34 = (J3DDisplayListObj*)_20;
|
||||
j3dSys.m_matPacket->_20->beginPatch();
|
||||
m_tevBlock->patch();
|
||||
m_colorBlock->patch();
|
||||
m_texGenBlock->patch();
|
||||
j3dSys.m_matPacket->_20->endPatch();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2698,100 +2532,45 @@ void J3DPEBlock::diff(unsigned long) { }
|
||||
* --INFO--
|
||||
* Address: 80063218
|
||||
* Size: 000078
|
||||
* calc__11J3DMaterialFPA4_Cf
|
||||
*/
|
||||
void J3DMaterial::calc(const float (*)[4])
|
||||
void J3DMaterial::calc(const float (*mtx)[4])
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r5, j3dSys@ha
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
addi r3, r5, j3dSys@l
|
||||
lwz r0, 0x34(r3)
|
||||
rlwinm. r0, r0, 0, 1, 1
|
||||
beq lbl_80063258
|
||||
lwz r3, 0x28(r31)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x14(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
b lbl_8006326C
|
||||
|
||||
lbl_80063258:
|
||||
lwz r3, 0x28(r31)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0xc(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
|
||||
lbl_8006326C:
|
||||
mr r3, r31
|
||||
bl calcCurrentMtx__11J3DMaterialFv
|
||||
mr r3, r31
|
||||
bl setCurrentMtx__11J3DMaterialFv
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (j3dSys._34 & 0x40000000) {
|
||||
m_texGenBlock->calcPostTexMtx(mtx);
|
||||
} else {
|
||||
m_texGenBlock->calc(mtx);
|
||||
}
|
||||
calcCurrentMtx();
|
||||
setCurrentMtx();
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80063290
|
||||
* Size: 00005C
|
||||
* calcDiffTexMtx__11J3DMaterialFPA4_Cf
|
||||
*/
|
||||
void J3DMaterial::calcDiffTexMtx(const float (*)[4])
|
||||
void J3DMaterial::calcDiffTexMtx(const float (*mtx)[4])
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r5, j3dSys@ha
|
||||
stw r0, 0x14(r1)
|
||||
addi r5, r5, j3dSys@l
|
||||
lwz r0, 0x34(r5)
|
||||
rlwinm. r0, r0, 0, 1, 1
|
||||
beq lbl_800632C8
|
||||
lwz r3, 0x28(r3)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x18(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
b lbl_800632DC
|
||||
|
||||
lbl_800632C8:
|
||||
lwz r3, 0x28(r3)
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x10(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
|
||||
lbl_800632DC:
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (j3dSys._34 & 0x40000000) {
|
||||
m_texGenBlock->calcPostTexMtxWithoutViewMtx(mtx);
|
||||
} else {
|
||||
m_texGenBlock->calcWithoutViewMtx(mtx);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800632EC
|
||||
* Size: 000018
|
||||
* setCurrentMtx__11J3DMaterialFv
|
||||
*/
|
||||
void J3DMaterial::setCurrentMtx()
|
||||
{
|
||||
/*
|
||||
lwz r4, 8(r3)
|
||||
lwz r0, 0x40(r3)
|
||||
stw r0, 0x40(r4)
|
||||
lwz r0, 0x44(r3)
|
||||
stw r0, 0x44(r4)
|
||||
blr
|
||||
*/
|
||||
J3DShape* shape = m_shape;
|
||||
shape->_40 = _40;
|
||||
shape->_44 = _44;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2979,7 +2758,7 @@ lbl_80063584:
|
||||
* Address: 80063598
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTexGenBlock::getTexCoord(unsigned long) { return 0x0; }
|
||||
J3DTexCoord* J3DTexGenBlock::getTexCoord(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3110,7 +2889,7 @@ void J3DMaterial::change()
|
||||
* Address: 800636B8
|
||||
* Size: 000094
|
||||
*/
|
||||
void J3DMaterial::newSharedDisplayList(unsigned long)
|
||||
int J3DMaterial::newSharedDisplayList(unsigned long)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -3166,7 +2945,7 @@ lbl_80063734:
|
||||
* Address: 8006374C
|
||||
* Size: 000094
|
||||
*/
|
||||
void J3DMaterial::newSingleSharedDisplayList(unsigned long)
|
||||
int J3DMaterial::newSingleSharedDisplayList(unsigned long)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -3266,6 +3045,7 @@ void J3DPatchedMaterial::makeSharedDisplayList() { }
|
||||
* --INFO--
|
||||
* Address: 80063838
|
||||
* Size: 00001C
|
||||
* load__18J3DPatchedMaterialFv
|
||||
*/
|
||||
void J3DPatchedMaterial::load()
|
||||
{
|
||||
@ -3490,7 +3270,7 @@ void J3DPEBlock::setFog(J3DFog) { }
|
||||
* Address: 80063978
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getFog() { return 0x0; }
|
||||
J3DFog* J3DPEBlock::getFog() { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3511,7 +3291,7 @@ void J3DPEBlock::setAlphaComp(const J3DAlphaComp*) { }
|
||||
* Address: 80063988
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getAlphaComp() { return 0x0; }
|
||||
J3DAlphaComp* J3DPEBlock::getAlphaComp() { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3532,7 +3312,7 @@ void J3DPEBlock::setBlend(const J3DBlend*) { }
|
||||
* Address: 80063998
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getBlend() { return 0x0; }
|
||||
J3DBlend* J3DPEBlock::getBlend() { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3553,7 +3333,7 @@ void J3DPEBlock::setZMode(const J3DZMode*) { }
|
||||
* Address: 800639A8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getZMode() { return 0x0; }
|
||||
J3DZMode* J3DPEBlock::getZMode() { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3574,7 +3354,7 @@ void J3DPEBlock::setZCompLoc(const unsigned char*) { }
|
||||
* Address: 800639B8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getZCompLoc() const { return 0x0; }
|
||||
u8 J3DPEBlock::getZCompLoc() const { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3595,7 +3375,7 @@ void J3DPEBlock::setDither(const unsigned char*) { }
|
||||
* Address: 800639C8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPEBlock::getDither() const { return 0x0; }
|
||||
u8 J3DPEBlock::getDither() const { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3637,7 +3417,7 @@ void J3DIndBlockNull::reset(J3DIndBlock*) { }
|
||||
* Address: 800639E8
|
||||
* Size: 00000C
|
||||
*/
|
||||
void J3DIndBlockNull::getType()
|
||||
JBlockType J3DIndBlockNull::getType()
|
||||
{
|
||||
/*
|
||||
lis r3, 0x49424C4E@ha
|
||||
@ -3710,7 +3490,7 @@ void J3DIndBlock::setIndTexOrder(unsigned long, J3DIndTexOrder) { }
|
||||
* Address: 80063A5C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DIndBlock::getIndTexOrder(unsigned long) { return 0x0; }
|
||||
J3DIndTexOrder* J3DIndBlock::getIndTexOrder(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3731,7 +3511,7 @@ void J3DIndBlock::setIndTexMtx(unsigned long, const J3DIndTexMtx*) { }
|
||||
* Address: 80063A6C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DIndBlock::getIndTexMtx(unsigned long) { return 0x0; }
|
||||
J3DIndTexMtx* J3DIndBlock::getIndTexMtx(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3752,7 +3532,7 @@ void J3DIndBlock::setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*)
|
||||
* Address: 80063A7C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DIndBlock::getIndTexCoordScale(unsigned long) { return 0x0; }
|
||||
J3DIndTexCoordScale* J3DIndBlock::getIndTexCoordScale(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3787,7 +3567,7 @@ void J3DTexGenBlock::setTexMtx(unsigned long, J3DTexMtx*) { }
|
||||
* Address: 80063A94
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTexGenBlock::getTexMtx(unsigned long) { return 0x0; }
|
||||
J3DTexMtx* J3DTexGenBlock::getTexMtx(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3864,7 +3644,7 @@ void J3DColorBlock::setMatColor(unsigned long, const J3DGXColor*) { }
|
||||
* Address: 80063AC8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getMatColor(unsigned long) { return 0x0; }
|
||||
J3DGXColor* J3DColorBlock::getMatColor(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3885,7 +3665,7 @@ void J3DColorBlock::setAmbColor(unsigned long, const J3DGXColor*) { }
|
||||
* Address: 80063AD8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getAmbColor(unsigned long) { return 0x0; }
|
||||
J3DGXColor* J3DColorBlock::getAmbColor(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3920,7 +3700,7 @@ void J3DColorBlock::setColorChan(unsigned long, const J3DColorChan&) { }
|
||||
* Address: 80063AF0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getColorChan(unsigned long) { return 0x0; }
|
||||
J3DColorChan* J3DColorBlock::getColorChan(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -3934,7 +3714,7 @@ void J3DColorBlock::setLight(unsigned long, J3DLightObj*) { }
|
||||
* Address: 80063AFC
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DColorBlock::getLight(unsigned long) { return 0x0; }
|
||||
J3DLightObj* J3DColorBlock::getLight(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "JSystem/J3D/J3DTevBlock.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -216,14 +218,14 @@ lbl_8006A320:
|
||||
* Address: 8006A350
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevKColor(unsigned long) { return 0x0; }
|
||||
J3DGXColor J3DTevBlock::getTevKColor(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006A358
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevColor(unsigned long) { return 0x0; }
|
||||
J3DGXColor J3DTevBlock::getTevColor(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
|
@ -1,3 +1,7 @@
|
||||
#include "JSystem/J3D/J3DMatColorAnm.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/J3D/J3DTexMtxAnm.h"
|
||||
#include "JSystem/J3D/J3DTexNoAnm.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,11 @@
|
||||
#include "JSystem/J3D/J3DMaterialFactory.h"
|
||||
#include "Dolphin/gx.h"
|
||||
#include "JSystem/J3D/J3DColorBlock.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/J3D/J3DPE.h"
|
||||
#include "JSystem/J3D/J3DTevBlock.h"
|
||||
#include "JSystem/J3D/J3DTexGenBlock.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -393,7 +401,7 @@ J3DMaterialFactory::J3DMaterialFactory(const J3DMaterialDLBlock&)
|
||||
* Address: 8006C674
|
||||
* Size: 000048
|
||||
*/
|
||||
void J3DMaterialFactory::countUniqueMaterials()
|
||||
u32 J3DMaterialFactory::countUniqueMaterials()
|
||||
{
|
||||
/*
|
||||
lhz r5, 0(r3)
|
||||
@ -428,7 +436,7 @@ lbl_8006C6A8:
|
||||
* Address: 8006C6BC
|
||||
* Size: 00007C
|
||||
*/
|
||||
void J3DMaterialFactory::create(J3DMaterial*, J3DMaterialFactory::MaterialType, int, unsigned long) const
|
||||
J3DMaterial* J3DMaterialFactory::create(J3DMaterial*, J3DMaterialFactory::MaterialType, int, unsigned long) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -483,7 +491,7 @@ void J3DMaterialFactory::create(J3DMaterial*, J3DMaterialFactory::MaterialType,
|
||||
* Address: 8006C738
|
||||
* Size: 000A0C
|
||||
*/
|
||||
void J3DMaterialFactory::createNormalMaterial(J3DMaterial*, int, unsigned long) const
|
||||
J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial*, int, u32) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -1324,7 +1332,7 @@ void J3DTevBlock::setTevStageNum(unsigned char) { }
|
||||
* Address: 8006D170
|
||||
* Size: 000924
|
||||
*/
|
||||
void J3DMaterialFactory::createPatchedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
J3DPatchedMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -2152,7 +2160,7 @@ lbl_8006DC04:
|
||||
* Address: 8006DC80
|
||||
* Size: 0002B8
|
||||
*/
|
||||
void J3DMaterialFactory::createLockedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
J3DLockedMaterial* J3DMaterialFactory::createLockedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -2366,7 +2374,7 @@ void J3DTevBlock::setTevRegOffset(unsigned long) { }
|
||||
void J3DTevBlock::setTexNoOffset(unsigned long a1)
|
||||
{
|
||||
// Generated from stw r4, 0x4(r3)
|
||||
_04 = a1;
|
||||
m_texNoOffset = a1;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2374,7 +2382,7 @@ void J3DTevBlock::setTexNoOffset(unsigned long a1)
|
||||
* Address: 8006DF44
|
||||
* Size: 000080
|
||||
*/
|
||||
void J3DMaterialFactory::calcSize(J3DMaterial*, J3DMaterialFactory::MaterialType, int, unsigned long) const
|
||||
u32 J3DMaterialFactory::calcSize(J3DMaterial*, MaterialType, int, u32) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -2430,7 +2438,7 @@ void J3DMaterialFactory::calcSize(J3DMaterial*, J3DMaterialFactory::MaterialType
|
||||
* Address: 8006DFC4
|
||||
* Size: 000258
|
||||
*/
|
||||
void J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial*, int, unsigned long) const
|
||||
u32 J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial*, int, u32) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -2642,7 +2650,7 @@ void J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial*, int, unsigned long
|
||||
* Address: 8006E21C
|
||||
* Size: 00013C
|
||||
*/
|
||||
void J3DMaterialFactory::calcSizePatchedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
u32 J3DMaterialFactory::calcSizePatchedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -2751,7 +2759,7 @@ void J3DMaterialFactory::calcSizePatchedMaterial(J3DMaterial*, int, unsigned lon
|
||||
* Address: 8006E358
|
||||
* Size: 000018
|
||||
*/
|
||||
void J3DMaterialFactory::calcSizeLockedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
u32 J3DMaterialFactory::calcSizeLockedMaterial(J3DMaterial*, int, unsigned long) const
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
@ -4235,7 +4243,7 @@ void J3DPEBlockNull::load() { }
|
||||
* Address: 8006F448
|
||||
* Size: 00000C
|
||||
*/
|
||||
void J3DPEBlockNull::getType()
|
||||
JBlockType J3DPEBlockNull::getType()
|
||||
{
|
||||
/*
|
||||
lis r3, 0x50454E4C@ha
|
||||
@ -4321,7 +4329,7 @@ void J3DTevBlockNull::indexToPtr()
|
||||
* Address: 8006F4DC
|
||||
* Size: 00000C
|
||||
*/
|
||||
void J3DTevBlockNull::getType()
|
||||
JBlockType J3DTevBlockNull::getType()
|
||||
{
|
||||
/*
|
||||
lis r3, 0x54564E4C@ha
|
||||
@ -4443,7 +4451,7 @@ void J3DTevBlock::setTevOrder(unsigned long, const J3DTevOrder*) { }
|
||||
* Address: 8006F56C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevOrder(unsigned long) { return 0x0; }
|
||||
J3DTevOrder* J3DTevBlock::getTevOrder(unsigned long) { return nullptr; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -4471,7 +4479,7 @@ void J3DTevBlock::setTevKColorSel(unsigned long, const unsigned char*) { }
|
||||
* Address: 8006F580
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevKColorSel(unsigned long) { return 0x0; }
|
||||
GXTevKColorSel J3DTevBlock::getTevKColorSel(unsigned long) { return GX_TEV_KCSEL_K0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -4485,7 +4493,7 @@ void J3DTevBlock::setTevKAlphaSel(unsigned long, const unsigned char*) { }
|
||||
* Address: 8006F58C
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevKAlphaSel(unsigned long) { return 0x0; }
|
||||
u8 J3DTevBlock::getTevKAlphaSel(unsigned long) { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -4527,7 +4535,7 @@ void J3DTevBlock::setTevSwapModeTable(unsigned long, const J3DTevSwapModeTable*)
|
||||
* Address: 8006F5A8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevSwapModeTable(unsigned long) { return 0x0; }
|
||||
J3DTevSwapModeTable* J3DTevBlock::getTevSwapModeTable(unsigned long) { return nullptr; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -4541,7 +4549,7 @@ void J3DTevBlock::setIndTevStage(unsigned long, const J3DIndTevStage*) { }
|
||||
* Address: 8006F5B4
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getIndTevStage(unsigned long) { return 0x0; }
|
||||
J3DIndTevStage* J3DTevBlock::getIndTevStage(unsigned long) { return nullptr; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -4625,7 +4633,7 @@ void J3DTexGenBlockNull::diffTexGen() { }
|
||||
* Address: 8006F5F0
|
||||
* Size: 00000C
|
||||
*/
|
||||
void J3DTexGenBlockNull::getType()
|
||||
JBlockType J3DTexGenBlockNull::getType()
|
||||
{
|
||||
/*
|
||||
lis r3, 0x54474E4C@ha
|
||||
@ -4639,45 +4647,45 @@ void J3DTexGenBlockNull::getType()
|
||||
* Address: 8006F5FC
|
||||
* Size: 00005C
|
||||
*/
|
||||
J3DTexGenBlockNull::~J3DTexGenBlockNull()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_8006F640
|
||||
lis r3, __vt__18J3DTexGenBlockNull@ha
|
||||
addi r0, r3, __vt__18J3DTexGenBlockNull@l
|
||||
stw r0, 0(r31)
|
||||
beq lbl_8006F630
|
||||
lis r3, __vt__14J3DTexGenBlock@ha
|
||||
addi r0, r3, __vt__14J3DTexGenBlock@l
|
||||
stw r0, 0(r31)
|
||||
// J3DTexGenBlockNull::~J3DTexGenBlockNull()
|
||||
// {
|
||||
// /*
|
||||
// stwu r1, -0x10(r1)
|
||||
// mflr r0
|
||||
// stw r0, 0x14(r1)
|
||||
// stw r31, 0xc(r1)
|
||||
// or. r31, r3, r3
|
||||
// beq lbl_8006F640
|
||||
// lis r3, __vt__18J3DTexGenBlockNull@ha
|
||||
// addi r0, r3, __vt__18J3DTexGenBlockNull@l
|
||||
// stw r0, 0(r31)
|
||||
// beq lbl_8006F630
|
||||
// lis r3, __vt__14J3DTexGenBlock@ha
|
||||
// addi r0, r3, __vt__14J3DTexGenBlock@l
|
||||
// stw r0, 0(r31)
|
||||
|
||||
lbl_8006F630:
|
||||
extsh. r0, r4
|
||||
ble lbl_8006F640
|
||||
mr r3, r31
|
||||
bl __dl__FPv
|
||||
// lbl_8006F630:
|
||||
// extsh. r0, r4
|
||||
// ble lbl_8006F640
|
||||
// mr r3, r31
|
||||
// bl __dl__FPv
|
||||
|
||||
lbl_8006F640:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F640:
|
||||
// lwz r0, 0x14(r1)
|
||||
// mr r3, r31
|
||||
// lwz r31, 0xc(r1)
|
||||
// mtlr r0
|
||||
// addi r1, r1, 0x10
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F658
|
||||
* Size: 00000C
|
||||
*/
|
||||
void J3DColorBlockNull::getType()
|
||||
JBlockType J3DColorBlockNull::getType()
|
||||
{
|
||||
/*
|
||||
lis r3, 0x434C4E4C@ha
|
||||
@ -4691,396 +4699,396 @@ void J3DColorBlockNull::getType()
|
||||
* Address: 8006F664
|
||||
* Size: 00005C
|
||||
*/
|
||||
J3DColorBlockNull::~J3DColorBlockNull()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_8006F6A8
|
||||
lis r3, __vt__17J3DColorBlockNull@ha
|
||||
addi r0, r3, __vt__17J3DColorBlockNull@l
|
||||
stw r0, 0(r31)
|
||||
beq lbl_8006F698
|
||||
lis r3, __vt__13J3DColorBlock@ha
|
||||
addi r0, r3, __vt__13J3DColorBlock@l
|
||||
stw r0, 0(r31)
|
||||
// J3DColorBlockNull::~J3DColorBlockNull()
|
||||
// {
|
||||
// /*
|
||||
// stwu r1, -0x10(r1)
|
||||
// mflr r0
|
||||
// stw r0, 0x14(r1)
|
||||
// stw r31, 0xc(r1)
|
||||
// or. r31, r3, r3
|
||||
// beq lbl_8006F6A8
|
||||
// lis r3, __vt__17J3DColorBlockNull@ha
|
||||
// addi r0, r3, __vt__17J3DColorBlockNull@l
|
||||
// stw r0, 0(r31)
|
||||
// beq lbl_8006F698
|
||||
// lis r3, __vt__13J3DColorBlock@ha
|
||||
// addi r0, r3, __vt__13J3DColorBlock@l
|
||||
// stw r0, 0(r31)
|
||||
|
||||
lbl_8006F698:
|
||||
extsh. r0, r4
|
||||
ble lbl_8006F6A8
|
||||
mr r3, r31
|
||||
bl __dl__FPv
|
||||
// lbl_8006F698:
|
||||
// extsh. r0, r4
|
||||
// ble lbl_8006F6A8
|
||||
// mr r3, r31
|
||||
// bl __dl__FPv
|
||||
|
||||
lbl_8006F6A8:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F6A8:
|
||||
// lwz r0, 0x14(r1)
|
||||
// mr r3, r31
|
||||
// lwz r31, 0xc(r1)
|
||||
// mtlr r0
|
||||
// addi r1, r1, 0x10
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F6C0
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DCurrentMtxInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F6D0
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F6C0
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DCurrentMtxInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F6D0
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F6D0:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F6D0:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F6D8
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DPatchingInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F6E8
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F6D8
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DPatchingInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F6E8
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F6E8:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F6E8:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F6F0
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DDisplayListInit>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F700
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F6F0
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DDisplayListInit>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F700
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F700:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F700:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F708
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DNBTScaleInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F718
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F708
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DNBTScaleInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F718
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F718:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F718:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F720
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DZModeInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F730
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F720
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DZModeInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F730
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F730:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F730:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F738
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DBlendInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F748
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F738
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DBlendInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F748
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F748:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F748:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F750
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DAlphaCompInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F760
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F750
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DAlphaCompInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F760
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F760:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F760:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F768
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DFogInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F778
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F768
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DFogInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F778
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F778:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F778:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F780
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTevSwapModeTableInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F790
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F780
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTevSwapModeTableInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F790
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F790:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F790:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F798
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTevSwapModeInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F7A8
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F798
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTevSwapModeInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F7A8
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F7A8:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F7A8:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F7B0
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTevStageInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F7C0
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F7B0
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTevStageInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F7C0
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F7C0:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F7C0:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F7C8
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTevOrderInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F7D8
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F7C8
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTevOrderInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F7D8
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F7D8:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F7D8:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F7E0
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTexMtxInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F7F0
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F7E0
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTexMtxInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F7F0
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F7F0:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F7F0:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F7F8
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTexCoord2Info>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F808
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F7F8
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTexCoord2Info>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F808
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F808:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F808:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F810
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DTexCoordInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F820
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F810
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DTexCoordInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F820
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F820:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F820:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F828
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DLightInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F838
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F828
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DLightInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F838
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F838:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F838:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F840
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DColorChanInfo>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F850
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F840
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DColorChanInfo>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F850
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F850:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F850:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F858
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DIndInitData>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F868
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F858
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DIndInitData>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F868
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F868:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F868:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8006F870
|
||||
* Size: 000018
|
||||
*/
|
||||
void JSUConvertOffsetToPtr<J3DMaterialInitData>(const void*, const void*)
|
||||
{
|
||||
/*
|
||||
cmplwi r4, 0
|
||||
bne lbl_8006F880
|
||||
li r3, 0
|
||||
blr
|
||||
// /*
|
||||
// * --INFO--
|
||||
// * Address: 8006F870
|
||||
// * Size: 000018
|
||||
// */
|
||||
// void JSUConvertOffsetToPtr<J3DMaterialInitData>(const void*, const void*)
|
||||
// {
|
||||
// /*
|
||||
// cmplwi r4, 0
|
||||
// bne lbl_8006F880
|
||||
// li r3, 0
|
||||
// blr
|
||||
|
||||
lbl_8006F880:
|
||||
add r3, r3, r4
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// lbl_8006F880:
|
||||
// add r3, r3, r4
|
||||
// blr
|
||||
// */
|
||||
// }
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "JSystem/J3D/J3DMaterialFactory.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,11 @@
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DMtxBuffer.h"
|
||||
#include "JSystem/J3D/J3DPacket.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "JSystem/J3D/J3DTexGenBlock.h"
|
||||
#include "JSystem/J3D/J3DTexMtx.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -36,41 +43,24 @@
|
||||
*/
|
||||
void J3DModel::initialize()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lfs f0, lbl_80516A10@sda21(r2)
|
||||
stw r0, 0x14(r1)
|
||||
li r0, 0
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
stw r0, 4(r3)
|
||||
addi r3, r31, 0x24
|
||||
stw r0, 8(r31)
|
||||
stw r0, 0xc(r31)
|
||||
stw r0, 0x10(r31)
|
||||
stw r0, 0x14(r31)
|
||||
stfs f0, 0x18(r31)
|
||||
stfs f0, 0x1c(r31)
|
||||
stfs f0, 0x20(r31)
|
||||
bl PSMTXIdentity
|
||||
addi r3, r31, 0x54
|
||||
bl PSMTXIdentity
|
||||
li r0, 0
|
||||
stw r0, 0x84(r31)
|
||||
stw r0, 0xc0(r31)
|
||||
stw r0, 0xc4(r31)
|
||||
stw r0, 0xc8(r31)
|
||||
stw r0, 0xcc(r31)
|
||||
stw r0, 0xd0(r31)
|
||||
stw r0, 0xd4(r31)
|
||||
stw r0, 0xd8(r31)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
m_modelData = nullptr;
|
||||
_08 = 0;
|
||||
m_displayListFlag = 0;
|
||||
_10 = nullptr;
|
||||
_14 = 0;
|
||||
m_modelScale.x = 1.0f;
|
||||
m_modelScale.y = 1.0f;
|
||||
m_modelScale.z = 1.0f;
|
||||
PSMTXIdentity(_24);
|
||||
PSMTXIdentity(_54);
|
||||
m_mtxBuffer = nullptr;
|
||||
m_matPackets = nullptr;
|
||||
m_shapePackets = nullptr;
|
||||
m_deformData = nullptr;
|
||||
m_skinDeform = nullptr;
|
||||
m_vtxColorCalc = nullptr;
|
||||
_D4 = 0;
|
||||
_D8 = nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -78,69 +68,25 @@ void J3DModel::initialize()
|
||||
* Address: 80066380
|
||||
* Size: 0000C4
|
||||
*/
|
||||
void J3DModel::entryModelData(J3DModelData*, unsigned long, unsigned long)
|
||||
int J3DModel::entryModelData(J3DModelData* data, u32 p2, u32 modelType)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stmw r27, 0xc(r1)
|
||||
mr r28, r4
|
||||
mr r27, r3
|
||||
mr r29, r5
|
||||
mr r30, r6
|
||||
stw r28, 4(r3)
|
||||
li r3, 0x38
|
||||
bl __nw__FUl
|
||||
or. r31, r3, r3
|
||||
beq lbl_800663C4
|
||||
lis r4, __vt__12J3DMtxBuffer@ha
|
||||
addi r0, r4, __vt__12J3DMtxBuffer@l
|
||||
stw r0, 0x34(r31)
|
||||
bl initialize__12J3DMtxBufferFv
|
||||
|
||||
lbl_800663C4:
|
||||
stw r31, 0x84(r27)
|
||||
mr r4, r28
|
||||
mr r5, r30
|
||||
lwz r3, 0x84(r27)
|
||||
bl create__12J3DMtxBufferFP12J3DModelDataUl
|
||||
cmpwi r3, 0
|
||||
beq lbl_800663E4
|
||||
b lbl_80066430
|
||||
|
||||
lbl_800663E4:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
bl createShapePacket__8J3DModelFP12J3DModelData
|
||||
cmpwi r3, 0
|
||||
beq lbl_800663FC
|
||||
b lbl_80066430
|
||||
|
||||
lbl_800663FC:
|
||||
mr r3, r27
|
||||
mr r4, r28
|
||||
mr r5, r29
|
||||
bl createMatPacket__8J3DModelFP12J3DModelDataUl
|
||||
cmpwi r3, 0
|
||||
beq lbl_80066418
|
||||
b lbl_80066430
|
||||
|
||||
lbl_80066418:
|
||||
addi r3, r27, 0x88
|
||||
addi r4, r28, 0x88
|
||||
bl setVertexData__15J3DVertexBufferFP13J3DVertexData
|
||||
mr r3, r27
|
||||
bl prepareShapePackets__8J3DModelFv
|
||||
li r3, 0
|
||||
|
||||
lbl_80066430:
|
||||
lmw r27, 0xc(r1)
|
||||
lwz r0, 0x24(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
m_modelData = data;
|
||||
m_mtxBuffer = new J3DMtxBuffer();
|
||||
int result = m_mtxBuffer->create(data, modelType);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = createShapePacket(data);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = createMatPacket(data, p2);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
m_vertexBuffer.setVertexData(&data->m_vertexData);
|
||||
prepareShapePackets();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -148,63 +94,16 @@ lbl_80066430:
|
||||
* Address: 80066444
|
||||
* Size: 0000BC
|
||||
*/
|
||||
J3DShapePacket* J3DModel::createShapePacket(J3DModelData*)
|
||||
int J3DModel::createShapePacket(J3DModelData* data)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r4
|
||||
stw r30, 0x18(r1)
|
||||
mr r30, r3
|
||||
stw r29, 0x14(r1)
|
||||
lhz r29, 0x7c(r4)
|
||||
cmplwi r29, 0
|
||||
beq lbl_800664E0
|
||||
mulli r3, r29, 0x3c
|
||||
addi r3, r3, 0x10
|
||||
bl __nwa__FUl
|
||||
lis r4, __ct__14J3DShapePacketFv@ha
|
||||
lis r5, __dt__14J3DShapePacketFv@ha
|
||||
addi r4, r4, __ct__14J3DShapePacketFv@l
|
||||
mr r7, r29
|
||||
addi r5, r5, __dt__14J3DShapePacketFv@l
|
||||
li r6, 0x3c
|
||||
bl __construct_new_array
|
||||
stw r3, 0xc4(r30)
|
||||
li r7, 0
|
||||
li r6, 0
|
||||
b lbl_800664D4
|
||||
|
||||
lbl_800664A8:
|
||||
lwz r3, 0x80(r31)
|
||||
rlwinm r0, r7, 2, 0xe, 0x1d
|
||||
lwz r4, 0xc4(r30)
|
||||
addi r7, r7, 1
|
||||
lwzx r5, r3, r0
|
||||
addi r3, r6, 0x28
|
||||
addi r0, r6, 0x38
|
||||
addi r6, r6, 0x3c
|
||||
stwx r5, r4, r3
|
||||
lwz r3, 0xc4(r30)
|
||||
stwx r30, r3, r0
|
||||
|
||||
lbl_800664D4:
|
||||
lhz r0, 0x7c(r31)
|
||||
cmpw r7, r0
|
||||
blt lbl_800664A8
|
||||
|
||||
lbl_800664E0:
|
||||
lwz r0, 0x24(r1)
|
||||
li r3, 0
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
if (data->m_shapeTable.m_count) {
|
||||
m_shapePackets = new J3DShapePacket[data->m_shapeTable.m_count];
|
||||
for (s32 i = 0; i < data->m_shapeTable.m_count; i++) {
|
||||
m_shapePackets[i]._28 = data->m_shapeTable.getItem(i);
|
||||
m_shapePackets[i]._38 = this;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -212,7 +111,7 @@ lbl_800664E0:
|
||||
* Address: 80066500
|
||||
* Size: 0001D8
|
||||
*/
|
||||
J3DMatPacket* J3DModel::createMatPacket(J3DModelData*, unsigned long)
|
||||
int J3DModel::createMatPacket(J3DModelData*, u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
@ -367,54 +266,19 @@ lbl_800666C4:
|
||||
* Address: 800666D8
|
||||
* Size: 000090
|
||||
*/
|
||||
void J3DModel::newDifferedDisplayList(unsigned long)
|
||||
int J3DModel::newDifferedDisplayList(u32 displayListFlag)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
li r30, 0
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
stw r29, 0xc(r3)
|
||||
lwz r3, 4(r3)
|
||||
lhz r31, 0x7c(r3)
|
||||
b lbl_80066738
|
||||
|
||||
lbl_80066710:
|
||||
clrlwi r0, r30, 0x10
|
||||
lwz r3, 0xc4(r28)
|
||||
mulli r0, r0, 0x3c
|
||||
mr r4, r29
|
||||
add r3, r3, r0
|
||||
bl newDifferedDisplayList__14J3DShapePacketFUl
|
||||
cmpwi r3, 0
|
||||
beq lbl_80066734
|
||||
b lbl_80066748
|
||||
|
||||
lbl_80066734:
|
||||
addi r30, r30, 1
|
||||
|
||||
lbl_80066738:
|
||||
clrlwi r0, r30, 0x10
|
||||
cmplw r0, r31
|
||||
blt lbl_80066710
|
||||
li r3, 0
|
||||
|
||||
lbl_80066748:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
m_displayListFlag = displayListFlag;
|
||||
// It sure is wild what pre-fetching the limit will do.
|
||||
// for (u16 i = 0; i < m_modelData->m_shapeTable.m_count; i++) {
|
||||
u16 count = m_modelData->m_shapeTable.m_count;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
int result = m_shapePackets[i].newDifferedDisplayList(displayListFlag);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -422,53 +286,16 @@ lbl_80066748:
|
||||
* Address: 80066768
|
||||
* Size: 00008C
|
||||
*/
|
||||
void J3DModel::newDifferedTexMtx(J3DTexDiffFlag)
|
||||
int J3DModel::newDifferedTexMtx(J3DTexDiffFlag texDiffFlag)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
li r30, 0
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
lwz r3, 4(r3)
|
||||
lhz r31, 0x7c(r3)
|
||||
b lbl_800667C4
|
||||
|
||||
lbl_8006679C:
|
||||
clrlwi r0, r30, 0x10
|
||||
lwz r3, 0xc4(r28)
|
||||
mulli r0, r0, 0x3c
|
||||
mr r4, r29
|
||||
add r3, r3, r0
|
||||
bl newDifferedTexMtx__14J3DShapePacketF14J3DTexDiffFlag
|
||||
cmpwi r3, 0
|
||||
beq lbl_800667C0
|
||||
b lbl_800667D4
|
||||
|
||||
lbl_800667C0:
|
||||
addi r30, r30, 1
|
||||
|
||||
lbl_800667C4:
|
||||
clrlwi r0, r30, 0x10
|
||||
cmplw r0, r31
|
||||
blt lbl_8006679C
|
||||
li r3, 0
|
||||
|
||||
lbl_800667D4:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
u16 count = m_modelData->m_shapeTable.m_count;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
int result = m_shapePackets[i].newDifferedTexMtx(texDiffFlag);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -478,92 +305,10 @@ lbl_800667D4:
|
||||
*/
|
||||
void J3DModel::lock()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
li r6, 0
|
||||
stw r31, 0xc(r1)
|
||||
stw r30, 8(r1)
|
||||
lwz r4, 4(r3)
|
||||
lhz r5, 0x5c(r4)
|
||||
cmpwi r5, 0
|
||||
ble lbl_80066914
|
||||
cmpwi r5, 8
|
||||
addi r7, r5, -8
|
||||
ble lbl_800668E4
|
||||
addi r0, r7, 7
|
||||
li r4, 0
|
||||
srwi r0, r0, 3
|
||||
mtctr r0
|
||||
cmpwi r7, 0
|
||||
ble lbl_800668E4
|
||||
|
||||
lbl_80066838:
|
||||
lwz r30, 0xc0(r3)
|
||||
addi r7, r4, 0x10
|
||||
addi r31, r4, 0x50
|
||||
addi r12, r4, 0x90
|
||||
lwzx r0, r30, r7
|
||||
addi r11, r4, 0xd0
|
||||
addi r10, r4, 0x110
|
||||
addi r9, r4, 0x150
|
||||
ori r0, r0, 1
|
||||
addi r8, r4, 0x190
|
||||
stwx r0, r30, r7
|
||||
addi r7, r4, 0x1d0
|
||||
addi r4, r4, 0x200
|
||||
addi r6, r6, 8
|
||||
lwz r30, 0xc0(r3)
|
||||
lwzx r0, r30, r31
|
||||
ori r0, r0, 1
|
||||
stwx r0, r30, r31
|
||||
lwz r31, 0xc0(r3)
|
||||
lwzx r0, r31, r12
|
||||
ori r0, r0, 1
|
||||
stwx r0, r31, r12
|
||||
lwz r12, 0xc0(r3)
|
||||
lwzx r0, r12, r11
|
||||
ori r0, r0, 1
|
||||
stwx r0, r12, r11
|
||||
lwz r11, 0xc0(r3)
|
||||
lwzx r0, r11, r10
|
||||
ori r0, r0, 1
|
||||
stwx r0, r11, r10
|
||||
lwz r10, 0xc0(r3)
|
||||
lwzx r0, r10, r9
|
||||
ori r0, r0, 1
|
||||
stwx r0, r10, r9
|
||||
lwz r9, 0xc0(r3)
|
||||
lwzx r0, r9, r8
|
||||
ori r0, r0, 1
|
||||
stwx r0, r9, r8
|
||||
lwz r8, 0xc0(r3)
|
||||
lwzx r0, r8, r7
|
||||
ori r0, r0, 1
|
||||
stwx r0, r8, r7
|
||||
bdnz lbl_80066838
|
||||
|
||||
lbl_800668E4:
|
||||
subf r0, r6, r5
|
||||
slwi r7, r6, 6
|
||||
mtctr r0
|
||||
cmpw r6, r5
|
||||
bge lbl_80066914
|
||||
|
||||
lbl_800668F8:
|
||||
lwz r5, 0xc0(r3)
|
||||
addi r4, r7, 0x10
|
||||
addi r7, r7, 0x40
|
||||
lwzx r0, r5, r4
|
||||
ori r0, r0, 1
|
||||
stwx r0, r5, r4
|
||||
bdnz lbl_800668F8
|
||||
|
||||
lbl_80066914:
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
int count = m_modelData->m_materialTable.m_count1;
|
||||
for (int i = 0; i < count; i++) {
|
||||
m_matPackets[i]._10 |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -573,53 +318,13 @@ lbl_80066914:
|
||||
*/
|
||||
void J3DModel::makeDL()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
lis r4, j3dSys@ha
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
addi r31, r4, j3dSys@l
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
li r29, 0
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
stw r28, 0x38(r31)
|
||||
lwz r3, 4(r3)
|
||||
lwz r0, 0x6c(r3)
|
||||
stw r0, 0x58(r31)
|
||||
lhz r30, 0x5c(r3)
|
||||
b lbl_8006699C
|
||||
|
||||
lbl_80066968:
|
||||
lwz r4, 0xc0(r28)
|
||||
rlwinm r3, r29, 6, 0xa, 0x19
|
||||
rlwinm r0, r29, 2, 0xe, 0x1d
|
||||
add r3, r4, r3
|
||||
stw r3, 0x3c(r31)
|
||||
lwz r3, 4(r28)
|
||||
lwz r3, 0x60(r3)
|
||||
lwzx r3, r3, r0
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x10(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
addi r29, r29, 1
|
||||
|
||||
lbl_8006699C:
|
||||
clrlwi r0, r29, 0x10
|
||||
cmplw r0, r30
|
||||
blt lbl_80066968
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
j3dSys._38 = this;
|
||||
j3dSys._58 = m_modelData->m_materialTable.m_texture;
|
||||
u32 count = m_modelData->m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
j3dSys.m_matPacket = &m_matPackets[i];
|
||||
m_modelData->m_materialTable.m_materials1[i]->makeDisplayList();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -629,6 +334,26 @@ lbl_8006699C:
|
||||
*/
|
||||
void J3DModel::calcMaterial()
|
||||
{
|
||||
if (_08 & 4) {
|
||||
j3dSys._34 |= 0x4;
|
||||
} else {
|
||||
j3dSys._34 &= ~0x4;
|
||||
}
|
||||
if (_08 & 8) {
|
||||
j3dSys._34 |= 0x8;
|
||||
} else {
|
||||
j3dSys._34 &= ~0x8;
|
||||
}
|
||||
j3dSys._38 = this;
|
||||
m_modelData->syncJ3DSysFlags();
|
||||
j3dSys._58 = m_modelData->m_materialTable.m_texture;
|
||||
u32 count = m_modelData->m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
j3dSys.m_matPacket = &m_matPackets[i];
|
||||
m_modelData->m_materialTable.m_materials1[i]->makeDisplayList();
|
||||
// TODO: This appears to share code with inside of loop of J3DModelData::simpleCalcMaterial(u16 jointIndex, Mtx*)
|
||||
// TODO: Similarly, ???
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
@ -751,6 +476,25 @@ lbl_80066B0C:
|
||||
*/
|
||||
void J3DModel::calcDiffTexMtx()
|
||||
{
|
||||
j3dSys._38 = this;
|
||||
u32 count = m_modelData->m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
j3dSys.m_matPacket = &m_matPackets[i];
|
||||
J3DMaterial* material = m_modelData->m_materialTable.m_materials1[i];
|
||||
material->calcDiffTexMtx(m_mtxBuffer->m_worldMatrices[material->m_joint->getJntNo()]);
|
||||
}
|
||||
count = m_modelData->m_shapeTable.m_count;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
J3DShapePacket* packet = &m_shapePackets[i];
|
||||
J3DTexGenBlock* block = m_modelData->m_shapeTable.getItem(i)->_04->m_texGenBlock;
|
||||
for (u16 j = 0; j < 8; j++) {
|
||||
J3DTexMtx* texMtx1 = block->getTexMtx(j);
|
||||
J3DShapePacket_0x24* v1 = packet->_24;
|
||||
if (texMtx1 && v1) {
|
||||
PSMTXCopy(texMtx1->_64, v1->_00[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
@ -853,54 +597,15 @@ lbl_80066C4C:
|
||||
* --INFO--
|
||||
* Address: 80066C6C
|
||||
* Size: 00009C
|
||||
* diff__8J3DModelFv
|
||||
*/
|
||||
void J3DModel::diff()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
li r29, 0
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
lis r3, j3dSys@ha
|
||||
lwz r4, 4(r28)
|
||||
addi r31, r3, j3dSys@l
|
||||
lhz r30, 0x5c(r4)
|
||||
b lbl_80066CDC
|
||||
|
||||
lbl_80066CA4:
|
||||
lwz r4, 0xc0(r28)
|
||||
rlwinm r3, r29, 6, 0xa, 0x19
|
||||
rlwinm r0, r29, 2, 0xe, 0x1d
|
||||
add r3, r4, r3
|
||||
stw r3, 0x3c(r31)
|
||||
lwz r3, 4(r28)
|
||||
lwz r4, 0xc(r28)
|
||||
lwz r3, 0x60(r3)
|
||||
lwzx r3, r3, r0
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x24(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
addi r29, r29, 1
|
||||
|
||||
lbl_80066CDC:
|
||||
clrlwi r0, r29, 0x10
|
||||
cmplw r0, r30
|
||||
blt lbl_80066CA4
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
u16 count = m_modelData->m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
j3dSys.m_matPacket = &m_matPackets[i];
|
||||
m_modelData->m_materialTable.m_materials1[i]->diff(m_displayListFlag);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -908,25 +613,12 @@ lbl_80066CDC:
|
||||
* Address: 80066D08
|
||||
* Size: 000034
|
||||
*/
|
||||
void J3DModel::setVtxColorCalc(J3DVtxColorCalc*, J3DDeformAttachFlag)
|
||||
void J3DModel::setVtxColorCalc(J3DVtxColorCalc* vtxColorCalc, J3DDeformAttachFlag deformAttachFlag)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
cmplwi r4, 0
|
||||
stw r0, 0x14(r1)
|
||||
stw r4, 0xd0(r3)
|
||||
beq lbl_80066D2C
|
||||
mr r4, r5
|
||||
addi r3, r3, 0x88
|
||||
bl copyVtxColorArray__15J3DVertexBufferF19J3DDeformAttachFlag
|
||||
|
||||
lbl_80066D2C:
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
m_vtxColorCalc = vtxColorCalc;
|
||||
if (vtxColorCalc) {
|
||||
m_vertexBuffer.copyVtxColorArray(deformAttachFlag);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -936,59 +628,21 @@ lbl_80066D2C:
|
||||
*/
|
||||
void J3DModel::calcWeightEnvelopeMtx()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
lwz r4, 4(r3)
|
||||
lhz r0, 0x2e(r4)
|
||||
cmplwi r0, 0
|
||||
beq lbl_80066D78
|
||||
lwz r0, 8(r3)
|
||||
rlwinm. r0, r0, 0, 0x1b, 0x1b
|
||||
bne lbl_80066D78
|
||||
lwz r0, 8(r4)
|
||||
rlwinm. r0, r0, 0, 0x17, 0x17
|
||||
bne lbl_80066D78
|
||||
lwz r3, 0x84(r3)
|
||||
bl calcWeightEnvelopeMtx__12J3DMtxBufferFv
|
||||
|
||||
lbl_80066D78:
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (m_modelData->m_jointTree.m_envelopeCnt && !(_08 & 0x10) && !(m_modelData->m_modelLoaderFlags & J3DMLF_09)) {
|
||||
m_mtxBuffer->calcWeightEnvelopeMtx();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80066D88
|
||||
* Size: 00004C
|
||||
* update__8J3DModelFv
|
||||
*/
|
||||
void J3DModel::update()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x10(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
mr r3, r31
|
||||
lwz r12, 0(r31)
|
||||
lwz r12, 0xc(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
calc();
|
||||
entry();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1152,9 +806,30 @@ lbl_80066F9C:
|
||||
* --INFO--
|
||||
* Address: 80066FB4
|
||||
* Size: 0000F4
|
||||
* entry__8J3DModelFv
|
||||
*/
|
||||
void J3DModel::entry()
|
||||
{
|
||||
if (_08 & 4) {
|
||||
j3dSys._34 |= 0x4;
|
||||
} else {
|
||||
j3dSys._34 &= ~0x4;
|
||||
}
|
||||
if (_08 & 8) {
|
||||
j3dSys._34 |= 0x8;
|
||||
} else {
|
||||
j3dSys._34 &= ~0x8;
|
||||
}
|
||||
// j3dSys._38 = this;
|
||||
m_modelData->syncJ3DSysFlags();
|
||||
j3dSys._58 = m_modelData->m_materialTable.m_texture;
|
||||
for (u16 i = 0; i < m_modelData->m_jointTree.m_jointCnt; i++) {
|
||||
J3DJoint* joint = m_modelData->m_jointTree.m_joints[i];
|
||||
if (joint->m_material) {
|
||||
joint->entryIn();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -1480,20 +1155,7 @@ lbl_800673F4:
|
||||
* Address: 80067410
|
||||
* Size: 000024
|
||||
*/
|
||||
void J3DModel::calcNrmMtx()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
lwz r3, 0x84(r3)
|
||||
bl calcNrmMtx__12J3DMtxBufferFv
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
void J3DModel::calcNrmMtx() { m_mtxBuffer->calcNrmMtx(); }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -1585,23 +1247,9 @@ lbl_80067520:
|
||||
*/
|
||||
void J3DModel::calcBBoardMtx()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
lwz r4, 4(r3)
|
||||
lhz r0, 0xe(r4)
|
||||
cmplwi r0, 1
|
||||
bne lbl_80067558
|
||||
lwz r3, 0x84(r3)
|
||||
bl calcBBoardMtx__12J3DMtxBufferFv
|
||||
|
||||
lbl_80067558:
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (m_modelData->m_jointSet == 1) {
|
||||
m_mtxBuffer->calcBBoardMtx();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1652,67 +1300,18 @@ lbl_800675BC:
|
||||
* --INFO--
|
||||
* Address: 800675CC
|
||||
* Size: 000064
|
||||
* __dt__8J3DModelFv
|
||||
*/
|
||||
J3DModel::~J3DModel()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 8(r1)
|
||||
or. r30, r3, r3
|
||||
beq lbl_80067614
|
||||
lis r4, __vt__8J3DModel@ha
|
||||
addi r3, r30, 0x88
|
||||
addi r0, r4, __vt__8J3DModel@l
|
||||
li r4, -1
|
||||
stw r0, 0(r30)
|
||||
bl __dt__15J3DVertexBufferFv
|
||||
extsh. r0, r31
|
||||
ble lbl_80067614
|
||||
mr r3, r30
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80067614:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r30
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DModel::~J3DModel()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80067630
|
||||
* Size: 000048
|
||||
* __dt__12J3DMtxBufferFv
|
||||
*/
|
||||
J3DMtxBuffer::~J3DMtxBuffer()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_80067660
|
||||
lis r5, __vt__12J3DMtxBuffer@ha
|
||||
extsh. r0, r4
|
||||
addi r0, r5, __vt__12J3DMtxBuffer@l
|
||||
stw r0, 0x34(r31)
|
||||
ble lbl_80067660
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80067660:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DMtxBuffer::~J3DMtxBuffer()
|
||||
// {
|
||||
// }
|
||||
|
@ -1,3 +1,11 @@
|
||||
#include "Dolphin/gd.h"
|
||||
#include "Dolphin/os.h"
|
||||
#include "JSystem/J3D/J3DDisplayListObj.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "JSystem/J3D/J3DTevBlock.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -31,14 +39,10 @@
|
||||
*/
|
||||
void J3DModelData::clear()
|
||||
{
|
||||
/*
|
||||
li r0, 0
|
||||
stw r0, 4(r3)
|
||||
stw r0, 8(r3)
|
||||
sth r0, 0xc(r3)
|
||||
sth r0, 0xe(r3)
|
||||
blr
|
||||
*/
|
||||
m_bmd = nullptr;
|
||||
m_modelLoaderFlags = 0;
|
||||
_0C = 0;
|
||||
m_jointSet = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -47,119 +51,52 @@ void J3DModelData::clear()
|
||||
* Size: 000080
|
||||
*/
|
||||
J3DModelData::J3DModelData()
|
||||
: m_jointTree()
|
||||
, m_materialTable()
|
||||
, m_shapeTable()
|
||||
, _84()
|
||||
, m_vertexData()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
lis r4, __vt__12J3DModelData@ha
|
||||
stw r0, 0x14(r1)
|
||||
addi r0, r4, __vt__12J3DModelData@l
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
stw r0, 0(r3)
|
||||
addi r3, r31, 0x10
|
||||
bl __ct__12J3DJointTreeFv
|
||||
addi r3, r31, 0x58
|
||||
bl __ct__16J3DMaterialTableFv
|
||||
lis r3, __vt__13J3DShapeTable@ha
|
||||
li r0, 0
|
||||
addi r4, r3, __vt__13J3DShapeTable@l
|
||||
addi r3, r31, 0x88
|
||||
stw r4, 0x78(r31)
|
||||
sth r0, 0x7c(r31)
|
||||
stw r0, 0x80(r31)
|
||||
stw r0, 0x84(r31)
|
||||
bl __ct__13J3DVertexDataFv
|
||||
li r0, 0
|
||||
mr r3, r31
|
||||
stw r0, 4(r31)
|
||||
stw r0, 8(r31)
|
||||
sth r0, 0xc(r31)
|
||||
sth r0, 0xe(r31)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r0, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
clear();
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8008382C
|
||||
* Size: 000048
|
||||
* __dt__13J3DShapeTableFv
|
||||
*/
|
||||
J3DShapeTable::~J3DShapeTable()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
or. r31, r3, r3
|
||||
beq lbl_8008385C
|
||||
lis r5, __vt__13J3DShapeTable@ha
|
||||
extsh. r0, r4
|
||||
addi r0, r5, __vt__13J3DShapeTable@l
|
||||
stw r0, 0(r31)
|
||||
ble lbl_8008385C
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_8008385C:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DShapeTable::~J3DShapeTable()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80083874
|
||||
* Size: 000064
|
||||
* __dt__12J3DJointTreeFv
|
||||
*/
|
||||
J3DJointTree::~J3DJointTree()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 8(r1)
|
||||
or. r30, r3, r3
|
||||
beq lbl_800838BC
|
||||
lis r4, __vt__12J3DJointTree@ha
|
||||
addi r3, r30, 0x34
|
||||
addi r0, r4, __vt__12J3DJointTree@l
|
||||
li r4, -1
|
||||
stw r0, 0(r30)
|
||||
bl __dt__14J3DDrawMtxDataFv
|
||||
extsh. r0, r31
|
||||
ble lbl_800838BC
|
||||
mr r3, r30
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_800838BC:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r30
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DJointTree::~J3DJointTree()
|
||||
// {
|
||||
// }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800838D8
|
||||
* Size: 000094
|
||||
*/
|
||||
void J3DModelData::newSharedDisplayList(unsigned long)
|
||||
void J3DModelData::newSharedDisplayList(u32 flags)
|
||||
{
|
||||
u16 count = m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
if (flags & J3DMLF_19) {
|
||||
J3DMaterial* material = m_materialTable.m_materials1[i];
|
||||
material->newSingleSharedDisplayList(material->countDLSize());
|
||||
} else {
|
||||
J3DMaterial* material = m_materialTable.m_materials1[i];
|
||||
material->newSharedDisplayList(material->countDLSize());
|
||||
}
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
@ -216,6 +153,20 @@ lbl_8008394C:
|
||||
*/
|
||||
void J3DModelData::indexToPtr()
|
||||
{
|
||||
j3dSys._58 = m_materialTable.m_texture;
|
||||
static int sInterruptFlag = OSDisableInterrupts();
|
||||
OSDisableScheduler();
|
||||
u16 count = m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
J3DMaterial* material = m_materialTable.m_materials1[i];
|
||||
GDCurrentDL currentDL;
|
||||
GDInitGDLObj(¤tDL, material->_48->_00, material->_48->_08);
|
||||
__GDCurrentDL = ¤tDL;
|
||||
material->m_tevBlock->indexToPtr();
|
||||
}
|
||||
__GDCurrentDL = nullptr;
|
||||
OSEnableScheduler();
|
||||
OSRestoreInterrupts(sInterruptFlag);
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
@ -282,44 +233,12 @@ lbl_800839FC:
|
||||
*/
|
||||
void J3DModelData::makeSharedDL()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
li r30, 0
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r3
|
||||
lis r3, j3dSys@ha
|
||||
lwz r0, 0x6c(r29)
|
||||
addi r3, r3, j3dSys@l
|
||||
stw r0, 0x58(r3)
|
||||
lhz r31, 0x5c(r29)
|
||||
b lbl_80083A88
|
||||
|
||||
lbl_80083A68:
|
||||
lwz r3, 0x60(r29)
|
||||
rlwinm r0, r30, 2, 0xe, 0x1d
|
||||
lwzx r3, r3, r0
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x14(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
addi r30, r30, 1
|
||||
|
||||
lbl_80083A88:
|
||||
clrlwi r0, r30, 0x10
|
||||
cmplw r0, r31
|
||||
blt lbl_80083A68
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
j3dSys._58 = m_materialTable.m_texture;
|
||||
u16 count = m_materialTable.m_count1;
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
J3DMaterial* material = m_materialTable.m_materials1[i];
|
||||
material->makeSharedDisplayList();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -327,8 +246,12 @@ lbl_80083A88:
|
||||
* Address: 80083AB0
|
||||
* Size: 0000C8
|
||||
*/
|
||||
void J3DModelData::simpleCalcMaterial(unsigned short, float (*)[4])
|
||||
void J3DModelData::simpleCalcMaterial(u16 jointIndex, Mtx*) // float (*)[4])
|
||||
{
|
||||
syncJ3DSysFlags();
|
||||
for (J3DMaterial* material = m_jointTree.m_joints[jointIndex]->m_material; material != nullptr; material = material->_04) {
|
||||
// TODO: ???
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
@ -404,78 +327,19 @@ lbl_80083B54:
|
||||
*/
|
||||
void J3DModelData::syncJ3DSysFlags() const
|
||||
{
|
||||
/*
|
||||
lwz r0, 8(r3)
|
||||
rlwinm. r0, r0, 0, 0x1a, 0x1a
|
||||
beq lbl_80083B9C
|
||||
lis r3, j3dSys@ha
|
||||
addi r3, r3, j3dSys@l
|
||||
lwz r0, 0x34(r3)
|
||||
oris r0, r0, 0x4000
|
||||
stw r0, 0x34(r3)
|
||||
blr
|
||||
|
||||
lbl_80083B9C:
|
||||
lis r3, j3dSys@ha
|
||||
addi r3, r3, j3dSys@l
|
||||
lwz r0, 0x34(r3)
|
||||
rlwinm r0, r0, 0, 2, 0
|
||||
stw r0, 0x34(r3)
|
||||
blr
|
||||
*/
|
||||
if (m_modelLoaderFlags & J3DMLF_06) {
|
||||
j3dSys._34 |= 0x40000000;
|
||||
} else {
|
||||
j3dSys._34 &= ~0x40000000;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80083BB4
|
||||
* Size: 000098
|
||||
* __dt__12J3DModelDataFv
|
||||
*/
|
||||
J3DModelData::~J3DModelData()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 8(r1)
|
||||
or. r30, r3, r3
|
||||
beq lbl_80083C30
|
||||
lis r3, __vt__12J3DModelData@ha
|
||||
addic. r0, r30, 0x78
|
||||
addi r0, r3, __vt__12J3DModelData@l
|
||||
stw r0, 0(r30)
|
||||
beq lbl_80083BF4
|
||||
lis r3, __vt__13J3DShapeTable@ha
|
||||
addi r0, r3, __vt__13J3DShapeTable@l
|
||||
stw r0, 0x78(r30)
|
||||
|
||||
lbl_80083BF4:
|
||||
addi r3, r30, 0x58
|
||||
li r4, -1
|
||||
bl __dt__16J3DMaterialTableFv
|
||||
addic. r0, r30, 0x10
|
||||
beq lbl_80083C20
|
||||
lis r4, __vt__12J3DJointTree@ha
|
||||
addi r3, r30, 0x44
|
||||
addi r0, r4, __vt__12J3DJointTree@l
|
||||
li r4, -1
|
||||
stw r0, 0x10(r30)
|
||||
bl __dt__14J3DDrawMtxDataFv
|
||||
|
||||
lbl_80083C20:
|
||||
extsh. r0, r31
|
||||
ble lbl_80083C30
|
||||
mr r3, r30
|
||||
bl __dl__FPv
|
||||
|
||||
lbl_80083C30:
|
||||
lwz r0, 0x14(r1)
|
||||
mr r3, r30
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
}
|
||||
// J3DModelData::~J3DModelData()
|
||||
// {
|
||||
// }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,12 @@
|
||||
#include "JSystem/J3D/J3DFileBlock.h"
|
||||
#include "JSystem/J3D/J3DJoint.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/J3D/J3DMaterialFactory.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DModelLoader.h"
|
||||
#include "JSystem/J3D/J3DShapeFactory.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/JSupport/JSU.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -9,32 +18,17 @@
|
||||
* Address: 80087900
|
||||
* Size: 000040
|
||||
*/
|
||||
void J3DModelLoader::countMaterialNum(const void*)
|
||||
u16 J3DModelLoader::countMaterialNum(const void* stream)
|
||||
{
|
||||
/*
|
||||
lwz r0, 0xc(r4)
|
||||
addi r4, r4, 0x20
|
||||
mtctr r0
|
||||
cmplwi r0, 0
|
||||
ble lbl_80087938
|
||||
|
||||
lbl_80087914:
|
||||
lwz r3, 0(r4)
|
||||
addis r0, r3, 0xb2bf
|
||||
cmplwi r0, 0x5433
|
||||
bne lbl_8008792C
|
||||
lhz r3, 8(r4)
|
||||
blr
|
||||
|
||||
lbl_8008792C:
|
||||
lwz r0, 4(r4)
|
||||
add r4, r4, r0
|
||||
bdnz lbl_80087914
|
||||
|
||||
lbl_80087938:
|
||||
li r3, 0
|
||||
blr
|
||||
*/
|
||||
const J3DFileHeader* header = (const J3DFileHeader*)stream;
|
||||
u32 count = header->m_blockCount;
|
||||
const J3DFileBlockBase* block = header->getFirstBlock();
|
||||
for (int i = 0; i < count; block = block->getNext(), i++) {
|
||||
if (block->m_blockType == J3DFBT_Material) {
|
||||
return ((const J3DMaterialBlock*)block)->m_count;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -42,8 +36,47 @@ lbl_80087938:
|
||||
* Address: 80087940
|
||||
* Size: 0001B0
|
||||
*/
|
||||
void J3DModelLoader::calcLoadSize(const void*, unsigned long)
|
||||
int J3DModelLoader::calcLoadSize(const void* stream, u32 flags)
|
||||
{
|
||||
u32 blockCount = reinterpret_cast<const J3DFileHeader*>(stream)->m_blockCount;
|
||||
// const J3DFileBlockBase* nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const J3DFileHeader*>(stream) + 1);
|
||||
const J3DFileBlockBase* nextBlock = reinterpret_cast<const J3DFileHeader*>(stream)->getFirstBlock();
|
||||
// TODO: What sizeof will get us a size of 0xE4?
|
||||
int size = 0xE4;
|
||||
for (u32 i = 0; i < blockCount; i++) {
|
||||
switch (nextBlock->m_blockType) {
|
||||
case J3DFBT_Info:
|
||||
size += calcSizeInformation((const J3DModelInfoBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_Joint:
|
||||
size += calcSizeJoint((const J3DJointBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_MaterialV21:
|
||||
break;
|
||||
case J3DFBT_Material:
|
||||
size += calcSizeMaterial((const J3DMaterialBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_Shape:
|
||||
size += calcSizeShape((const J3DShapeBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_Texture:
|
||||
size += calcSizeTexture((const J3DTextureBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Envelope:
|
||||
size += calcSizeEnvelope((const J3DEnvelopeBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Draw:
|
||||
size += calcSizeDraw((const J3DDrawBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Vertex:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const u8*>(nextBlock) + nextBlock->m_size);
|
||||
nextBlock = nextBlock->getNext();
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
@ -187,8 +220,33 @@ lbl_80087AD0:
|
||||
* Address: 80087AF0
|
||||
* Size: 0000CC
|
||||
*/
|
||||
void J3DModelLoader::calcLoadMaterialTableSize(const void*)
|
||||
int J3DModelLoader::calcLoadMaterialTableSize(const void* stream)
|
||||
{
|
||||
u32 blockCount = reinterpret_cast<const J3DFileHeader*>(stream)->m_blockCount;
|
||||
// const J3DFileBlockBase* nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const J3DFileHeader*>(stream) + 1);
|
||||
const J3DFileBlockBase* nextBlock = reinterpret_cast<const J3DFileHeader*>(stream)->getFirstBlock();
|
||||
bool hasTextureTable = false;
|
||||
// TODO: What sizeof will get us a size of 0x20? Is this just the file header???
|
||||
int size = 0x20;
|
||||
for (u32 i = 0; i < blockCount; i++) {
|
||||
switch (nextBlock->m_blockType) {
|
||||
case J3DFBT_Material:
|
||||
size += calcSizeMaterialTable((const J3DMaterialBlock*)nextBlock, J3DMLF_21 | J3DMLF_25 | J3DMLF_29 | J3DMLF_31);
|
||||
break;
|
||||
case J3DFBT_Texture:
|
||||
size += calcSizeTextureTable((const J3DTextureBlock*)nextBlock);
|
||||
hasTextureTable = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const u8*>(nextBlock) + nextBlock->m_size);
|
||||
nextBlock = nextBlock->getNext();
|
||||
}
|
||||
if (!hasTextureTable) {
|
||||
size += 0xC;
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
@ -263,8 +321,59 @@ lbl_80087BA4:
|
||||
* Address: 80087BBC
|
||||
* Size: 000210
|
||||
*/
|
||||
void J3DModelLoader::calcLoadBinaryDisplayListSize(const void*, unsigned long)
|
||||
int J3DModelLoader::calcLoadBinaryDisplayListSize(const void* stream, u32 flags)
|
||||
{
|
||||
const J3DFileHeader* header = (const J3DFileHeader*)stream;
|
||||
u32 blockCount = header->m_blockCount;
|
||||
// const J3DFileBlockBase* nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const J3DFileHeader*>(stream) + 1);
|
||||
const J3DFileBlockBase* nextBlock = header->getFirstBlock();
|
||||
u32 matFlags = flags & (J3DMLF_25 | J3DMLF_26);
|
||||
int size = sizeof(J3DModelData);
|
||||
for (u32 i = 0; i < blockCount; i++) {
|
||||
switch (nextBlock->m_blockType) {
|
||||
case J3DFBT_Info:
|
||||
size += calcSizeInformation((const J3DModelInfoBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_Joint:
|
||||
size += calcSizeJoint((const J3DJointBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Shape:
|
||||
size += calcSizeShape((const J3DShapeBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_Texture:
|
||||
size += calcSizeTexture((const J3DTextureBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_MaterialDL:
|
||||
size += calcSizeMaterialDL((const J3DMaterialDLBlock*)nextBlock, flags);
|
||||
break;
|
||||
case J3DFBT_MaterialV21:
|
||||
break;
|
||||
case J3DFBT_Material:
|
||||
m_materialBlock = (const J3DMaterialBlock*)nextBlock;
|
||||
matFlags |= (J3DMLF_21 | J3DMLF_29 | J3DMLF_31);
|
||||
if ((flags & (J3DMLF_13 | J3DMLF_14)) == 0) {
|
||||
_18 = 1;
|
||||
size += calcSizeMaterial((const J3DMaterialBlock*)nextBlock, matFlags);
|
||||
} else if ((flags & (J3DMLF_13 | J3DMLF_14)) == J3DMLF_14) {
|
||||
_18 = 1;
|
||||
size += calcSizePatchedMaterial((const J3DMaterialBlock*)nextBlock, matFlags);
|
||||
}
|
||||
break;
|
||||
case J3DFBT_Envelope:
|
||||
size += calcSizeEnvelope((const J3DEnvelopeBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Draw:
|
||||
size += calcSizeDraw((const J3DDrawBlock*)nextBlock);
|
||||
break;
|
||||
case J3DFBT_Vertex:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// nextBlock = reinterpret_cast<const J3DFileBlockBase*>(reinterpret_cast<const u8*>(nextBlock) + nextBlock->m_size);
|
||||
nextBlock = nextBlock->getNext();
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
@ -436,57 +545,24 @@ lbl_80087DAC:
|
||||
* Address: 80087DCC
|
||||
* Size: 000090
|
||||
*/
|
||||
void J3DModelLoader::calcSizeInformation(const J3DModelInfoBlock*, unsigned long)
|
||||
int J3DModelLoader::calcSizeInformation(const J3DModelInfoBlock* block, u32 flags)
|
||||
{
|
||||
/*
|
||||
.loc_0x0:
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
mr r6, r4
|
||||
stw r0, 0x14(r1)
|
||||
lhz r0, 0x8(r4)
|
||||
stw r31, 0xC(r1)
|
||||
li r31, 0
|
||||
or r0, r5, r0
|
||||
rlwinm r0,r0,0,28,31
|
||||
stw r30, 0x8(r1)
|
||||
cmpwi r0, 0x1
|
||||
mr r30, r3
|
||||
beq- .loc_0x58
|
||||
bge- .loc_0x44
|
||||
cmpwi r0, 0
|
||||
bge- .loc_0x50
|
||||
b .loc_0x64
|
||||
|
||||
.loc_0x44:
|
||||
cmpwi r0, 0x3
|
||||
bge- .loc_0x64
|
||||
b .loc_0x60
|
||||
|
||||
.loc_0x50:
|
||||
li r31, 0x4
|
||||
b .loc_0x64
|
||||
|
||||
.loc_0x58:
|
||||
li r31, 0x4
|
||||
b .loc_0x64
|
||||
|
||||
.loc_0x60:
|
||||
li r31, 0x4
|
||||
|
||||
.loc_0x64:
|
||||
lwz r4, 0x14(r6)
|
||||
mr r3, r6
|
||||
bl -0x16360
|
||||
stw r3, 0x14(r30)
|
||||
mr r3, r31
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xC(r1)
|
||||
lwz r30, 0x8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
int size = 0;
|
||||
switch ((flags | block->_08) & (J3DMLF_MtxCalc_SoftImage | J3DMLF_MtxCalc_Maya | J3DMLF_03 | J3DMLF_04)) {
|
||||
case 0:
|
||||
size = 4;
|
||||
break;
|
||||
case J3DMLF_MtxCalc_SoftImage:
|
||||
size = 4;
|
||||
break;
|
||||
case J3DMLF_MtxCalc_Maya:
|
||||
size = 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_hierarchy = JSUConvertOffsetToPtr<J3DModelHierarchy>(block, block->_14);
|
||||
return size;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -494,23 +570,15 @@ void J3DModelLoader::calcSizeInformation(const J3DModelInfoBlock*, unsigned long
|
||||
* Address: 80087E5C
|
||||
* Size: 00002C
|
||||
*/
|
||||
void J3DModelLoader::calcSizeJoint(const J3DJointBlock*)
|
||||
int J3DModelLoader::calcSizeJoint(const J3DJointBlock* block)
|
||||
{
|
||||
/*
|
||||
lwz r0, 0x14(r4)
|
||||
li r3, 0
|
||||
cmplwi r0, 0
|
||||
beq lbl_80087E70
|
||||
li r3, 0x10
|
||||
|
||||
lbl_80087E70:
|
||||
lhz r4, 8(r4)
|
||||
mulli r0, r4, 0x5c
|
||||
slwi r4, r4, 2
|
||||
add r3, r3, r4
|
||||
add r3, r3, r0
|
||||
blr
|
||||
*/
|
||||
int size = 0;
|
||||
if (block->_14) {
|
||||
size = 0x10;
|
||||
}
|
||||
size += (block->_08 * sizeof(J3DJoint*));
|
||||
size += (block->_08 * sizeof(J3DJoint));
|
||||
return size;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -518,14 +586,10 @@ lbl_80087E70:
|
||||
* Address: 80087E88
|
||||
* Size: 000010
|
||||
*/
|
||||
void J3DModelLoader::calcSizeEnvelope(const J3DEnvelopeBlock*)
|
||||
int J3DModelLoader::calcSizeEnvelope(const J3DEnvelopeBlock* block)
|
||||
{
|
||||
/*
|
||||
lhz r0, 8(r4)
|
||||
sth r0, 0x1a(r3)
|
||||
li r3, 0
|
||||
blr
|
||||
*/
|
||||
_1A = block->m_count;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -533,24 +597,35 @@ void J3DModelLoader::calcSizeEnvelope(const J3DEnvelopeBlock*)
|
||||
* Address: 80087E98
|
||||
* Size: 000014
|
||||
*/
|
||||
void J3DModelLoader::calcSizeDraw(const J3DDrawBlock*)
|
||||
{
|
||||
/*
|
||||
lhz r3, 0x1a(r3)
|
||||
lhz r0, 8(r4)
|
||||
subf r0, r3, r0
|
||||
slwi r3, r0, 1
|
||||
blr
|
||||
*/
|
||||
}
|
||||
int J3DModelLoader::calcSizeDraw(const J3DDrawBlock* block) { return (block->m_count - _1A) * 2; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 80087EAC
|
||||
* Size: 0000E4
|
||||
*/
|
||||
void J3DModelLoader_v26::calcSizeMaterial(const J3DMaterialBlock*, unsigned long)
|
||||
u32 J3DModelLoader_v26::calcSizeMaterial(const J3DMaterialBlock* block, u32 flags)
|
||||
{
|
||||
int padding = 0;
|
||||
J3DMaterialFactory factory(*block);
|
||||
u16 count = block->m_count;
|
||||
u32 uniqueCount = factory.countUniqueMaterials();
|
||||
if (block->_14) {
|
||||
padding = 0x10;
|
||||
}
|
||||
u32 size = padding + (count * sizeof(J3DMaterial*));
|
||||
// TODO: the casting of uniqueCount smells like a u16 argument to an inline
|
||||
if (flags & J3DMLF_22) {
|
||||
// calc for allocated materials as well
|
||||
size += ALIGN_NEXT((u16)uniqueCount * sizeof(J3DMaterial), 0x20);
|
||||
for (u16 i = 0; i < (u16)uniqueCount; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::NORMAL, i, flags);
|
||||
}
|
||||
}
|
||||
for (u32 i = 0; i < count; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::NORMAL, i, flags);
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
.loc_0x0:
|
||||
stwu r1, -0xB0(r1)
|
||||
@ -632,63 +707,22 @@ void J3DModelLoader_v26::calcSizeMaterial(const J3DMaterialBlock*, unsigned long
|
||||
* Address: 80087F90
|
||||
* Size: 0000B4
|
||||
*/
|
||||
void J3DModelLoader::calcSizeShape(const J3DShapeBlock*, unsigned long)
|
||||
int J3DModelLoader::calcSizeShape(const J3DShapeBlock* block, u32 flags)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x40(r1)
|
||||
mflr r0
|
||||
stw r0, 0x44(r1)
|
||||
stw r31, 0x3c(r1)
|
||||
li r31, 0
|
||||
stw r30, 0x38(r1)
|
||||
mr r30, r4
|
||||
stw r29, 0x34(r1)
|
||||
mr r29, r5
|
||||
stw r28, 0x30(r1)
|
||||
mr r28, r3
|
||||
addi r3, r1, 8
|
||||
bl __ct__15J3DShapeFactoryFRC13J3DShapeBlock
|
||||
lwz r0, 0x14(r30)
|
||||
lhz r4, 8(r30)
|
||||
cmplwi r0, 0
|
||||
beq lbl_80087FD8
|
||||
li r31, 0x10
|
||||
|
||||
lbl_80087FD8:
|
||||
slwi r0, r4, 2
|
||||
addi r3, r1, 8
|
||||
add r31, r31, r0
|
||||
bl calcSizeVcdVatCmdBuffer__15J3DShapeFactoryFUl
|
||||
lwz r30, 0x14(r28)
|
||||
add r31, r31, r3
|
||||
b lbl_80088014
|
||||
|
||||
lbl_80087FF4:
|
||||
cmplwi r0, 0x12
|
||||
bne lbl_80088010
|
||||
lhz r4, 2(r30)
|
||||
mr r5, r29
|
||||
addi r3, r1, 8
|
||||
bl calcSize__15J3DShapeFactoryFiUl
|
||||
add r31, r31, r3
|
||||
|
||||
lbl_80088010:
|
||||
addi r30, r30, 4
|
||||
|
||||
lbl_80088014:
|
||||
lhz r0, 0(r30)
|
||||
cmplwi r0, 0
|
||||
bne lbl_80087FF4
|
||||
lwz r0, 0x44(r1)
|
||||
mr r3, r31
|
||||
lwz r31, 0x3c(r1)
|
||||
lwz r30, 0x38(r1)
|
||||
lwz r29, 0x34(r1)
|
||||
lwz r28, 0x30(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x40
|
||||
blr
|
||||
*/
|
||||
int size = 0;
|
||||
J3DShapeFactory factory(*block);
|
||||
int count = block->_08;
|
||||
if (block->_14) {
|
||||
size = 0x10;
|
||||
}
|
||||
size += count * sizeof(J3DShape*);
|
||||
size += factory.calcSizeVcdVatCmdBuffer(count);
|
||||
for (J3DModelHierarchy* hierarchy = m_hierarchy; hierarchy->_00 != 0; hierarchy = hierarchy + 1) {
|
||||
if (hierarchy->_00 == 0x12) {
|
||||
size += factory.calcSize(hierarchy->_02, flags);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -696,19 +730,23 @@ lbl_80088014:
|
||||
* Address: 80088044
|
||||
* Size: 00001C
|
||||
*/
|
||||
void J3DModelLoader::calcSizeTexture(const J3DTextureBlock*)
|
||||
int J3DModelLoader::calcSizeTexture(const J3DTextureBlock* block)
|
||||
{
|
||||
/*
|
||||
lwz r0, 0x10(r4)
|
||||
li r3, 0
|
||||
cmplwi r0, 0
|
||||
beq lbl_80088058
|
||||
li r3, 0x10
|
||||
// TODO: use sizeofs here.
|
||||
int padding = 0;
|
||||
if (block->_10) {
|
||||
padding = 0x10;
|
||||
}
|
||||
return padding + 0xC;
|
||||
}
|
||||
|
||||
lbl_80088058:
|
||||
addi r3, r3, 0xc
|
||||
blr
|
||||
*/
|
||||
inline u32 calcSizeForCount(J3DMaterialFactory& factory, u16 count, u32 flags, int padding)
|
||||
{
|
||||
u32 size = padding + (count * sizeof(J3DMaterial*));
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::NORMAL, i, flags);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -716,8 +754,20 @@ lbl_80088058:
|
||||
* Address: 80088060
|
||||
* Size: 0000A0
|
||||
*/
|
||||
void J3DModelLoader_v26::calcSizeMaterialTable(const J3DMaterialBlock*, unsigned long)
|
||||
u32 J3DModelLoader_v26::calcSizeMaterialTable(const J3DMaterialBlock* block, u32 flags)
|
||||
{
|
||||
int size = 0;
|
||||
u32 count = block->m_count;
|
||||
J3DMaterialFactory factory(*block);
|
||||
if (block->_14) {
|
||||
size = 0x10;
|
||||
}
|
||||
// return calcSizeForCount(factory, count, flags, padding);
|
||||
size += (count * sizeof(J3DMaterial*));
|
||||
for (int i = 0; (u16)i < (u16)count; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::NORMAL, (u16)i, flags);
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
.loc_0x0:
|
||||
stwu r1, -0xA0(r1)
|
||||
@ -774,19 +824,14 @@ void J3DModelLoader_v26::calcSizeMaterialTable(const J3DMaterialBlock*, unsigned
|
||||
* Address: 80088100
|
||||
* Size: 00001C
|
||||
*/
|
||||
void J3DModelLoader::calcSizeTextureTable(const J3DTextureBlock*)
|
||||
int J3DModelLoader::calcSizeTextureTable(const J3DTextureBlock* block)
|
||||
{
|
||||
/*
|
||||
lwz r0, 0x10(r4)
|
||||
li r3, 0
|
||||
cmplwi r0, 0
|
||||
beq lbl_80088114
|
||||
li r3, 0x10
|
||||
|
||||
lbl_80088114:
|
||||
addi r3, r3, 0xc
|
||||
blr
|
||||
*/
|
||||
// TODO: use sizeofs here.
|
||||
int padding = 0;
|
||||
if (block->_10) {
|
||||
padding = 0x10;
|
||||
}
|
||||
return padding + 0xC;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -794,8 +839,20 @@ lbl_80088114:
|
||||
* Address: 8008811C
|
||||
* Size: 0000A0
|
||||
*/
|
||||
void J3DModelLoader::calcSizePatchedMaterial(const J3DMaterialBlock*, unsigned long)
|
||||
int J3DModelLoader::calcSizePatchedMaterial(const J3DMaterialBlock* block, u32 flags)
|
||||
{
|
||||
int padding = 0;
|
||||
u32 count = block->m_count;
|
||||
J3DMaterialFactory factory(*block);
|
||||
if (block->_14) {
|
||||
padding = 0x10;
|
||||
}
|
||||
// return calcSizeForCount(factory, count, flags, padding);
|
||||
u32 size = padding + (count * sizeof(J3DMaterial*));
|
||||
for (int i = 0; (u16)i < (u16)count; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::PATCHED, (u16)i, flags);
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
.loc_0x0:
|
||||
stwu r1, -0xA0(r1)
|
||||
@ -852,8 +909,28 @@ void J3DModelLoader::calcSizePatchedMaterial(const J3DMaterialBlock*, unsigned l
|
||||
* Address: 800881BC
|
||||
* Size: 0000D0
|
||||
*/
|
||||
void J3DModelLoader::calcSizeMaterialDL(const J3DMaterialDLBlock*, unsigned long)
|
||||
int J3DModelLoader::calcSizeMaterialDL(const J3DMaterialDLBlock* block, u32 flags)
|
||||
{
|
||||
int size = 0;
|
||||
J3DMaterialFactory factory(*block);
|
||||
u16 count;
|
||||
if (!this->_18) {
|
||||
count = block->_08;
|
||||
if (block->_20) {
|
||||
size = 0x10;
|
||||
}
|
||||
size += count * sizeof(J3DLockedMaterial*);
|
||||
for (int i = 0; (u16)i < count; i++) {
|
||||
size += factory.calcSize(nullptr, J3DMaterialFactory::LOCKED, (u16)i, flags);
|
||||
}
|
||||
} else {
|
||||
count = block->_08;
|
||||
size += count * sizeof(J3DLockedMaterial*);
|
||||
for (int i = 0; (u16)i < count; i++) {
|
||||
size += factory.calcSize((J3DMaterial*)this, J3DMaterialFactory::LOCKED, (u16)i, flags);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
/*
|
||||
.loc_0x0:
|
||||
stwu r1, -0xB0(r1)
|
||||
|
@ -1,3 +1,9 @@
|
||||
#include "Dolphin/mtx.h"
|
||||
#include "JSystem/J3D/J3DMaterial.h"
|
||||
#include "JSystem/JKR/JKRHeap.h"
|
||||
#include "JSystem/J3D/J3DMtxBuffer.h"
|
||||
#include "JSystem/J3D/J3DModel.h"
|
||||
#include "JSystem/J3D/J3DTexGenBlock.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -39,24 +45,19 @@
|
||||
*/
|
||||
void J3DMtxBuffer::initialize()
|
||||
{
|
||||
/*
|
||||
li r4, 0
|
||||
li r0, 1
|
||||
stw r4, 0(r3)
|
||||
stw r4, 4(r3)
|
||||
stw r4, 8(r3)
|
||||
stw r4, 0xc(r3)
|
||||
stw r4, 0x10(r3)
|
||||
stw r4, 0x14(r3)
|
||||
stw r4, 0x18(r3)
|
||||
stw r4, 0x1c(r3)
|
||||
stw r4, 0x20(r3)
|
||||
stw r4, 0x24(r3)
|
||||
stw r4, 0x28(r3)
|
||||
stw r0, 0x2c(r3)
|
||||
stw r4, 0x30(r3)
|
||||
blr
|
||||
*/
|
||||
m_jointTree = nullptr;
|
||||
_04 = nullptr;
|
||||
_08 = 0;
|
||||
m_worldMatrices = nullptr;
|
||||
_10 = nullptr;
|
||||
_14[0] = nullptr;
|
||||
_14[1] = nullptr;
|
||||
_1C[0] = nullptr;
|
||||
_1C[1] = nullptr;
|
||||
_24[0] = 0;
|
||||
_24[1] = nullptr;
|
||||
m_modelType = 1;
|
||||
m_currentViewNumber = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -64,101 +65,43 @@ void J3DMtxBuffer::initialize()
|
||||
* Address: 80088918
|
||||
* Size: 00011C
|
||||
*/
|
||||
void J3DMtxBuffer::create(J3DModelData*, unsigned long)
|
||||
int J3DMtxBuffer::create(J3DModelData* data, u32 modelType)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
mr r30, r5
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
addi r0, r29, 0x10
|
||||
stw r28, 0x10(r1)
|
||||
mr r28, r3
|
||||
stw r30, 0x2c(r3)
|
||||
stw r0, 0(r3)
|
||||
bl createAnmMtx__12J3DMtxBufferFP12J3DModelData
|
||||
cmpwi r3, 0
|
||||
beq lbl_8008895C
|
||||
b lbl_80088A14
|
||||
|
||||
lbl_8008895C:
|
||||
mr r3, r28
|
||||
mr r4, r29
|
||||
bl createWeightEnvelopeMtx__12J3DMtxBufferFP12J3DModelData
|
||||
or. r31, r3, r3
|
||||
beq lbl_80088974
|
||||
b lbl_80088A14
|
||||
|
||||
lbl_80088974:
|
||||
lwz r3, 8(r29)
|
||||
rlwinm. r0, r3, 0x18, 0x1f, 0x1f
|
||||
beq lbl_8008898C
|
||||
mr r3, r28
|
||||
bl setNoUseDrawMtx__12J3DMtxBufferFv
|
||||
b lbl_800889CC
|
||||
|
||||
lbl_8008898C:
|
||||
rlwinm r0, r3, 0, 0x1b, 0x1b
|
||||
cmpwi r0, 0x10
|
||||
beq lbl_800889A8
|
||||
bge lbl_800889B8
|
||||
cmpwi r0, 0
|
||||
beq lbl_800889B8
|
||||
b lbl_800889B8
|
||||
|
||||
lbl_800889A8:
|
||||
mr r3, r28
|
||||
bl setNoUseDrawMtx__12J3DMtxBufferFv
|
||||
mr r31, r3
|
||||
b lbl_800889CC
|
||||
|
||||
lbl_800889B8:
|
||||
mr r3, r28
|
||||
mr r4, r29
|
||||
mr r5, r30
|
||||
bl createDoubleDrawMtx__12J3DMtxBufferFP12J3DModelDataUl
|
||||
mr r31, r3
|
||||
|
||||
lbl_800889CC:
|
||||
cmpwi r31, 0
|
||||
beq lbl_800889DC
|
||||
mr r3, r31
|
||||
b lbl_80088A14
|
||||
|
||||
lbl_800889DC:
|
||||
lwz r0, 8(r29)
|
||||
rlwinm. r0, r0, 0, 0x1b, 0x1b
|
||||
beq lbl_800889F4
|
||||
li r0, 0
|
||||
sth r0, 0xc(r29)
|
||||
b lbl_80088A10
|
||||
|
||||
lbl_800889F4:
|
||||
mr r3, r28
|
||||
mr r4, r29
|
||||
mr r5, r30
|
||||
bl createBumpMtxArray__12J3DMtxBufferFP12J3DModelDataUl
|
||||
or. r31, r3, r3
|
||||
beq lbl_80088A10
|
||||
b lbl_80088A14
|
||||
|
||||
lbl_80088A10:
|
||||
mr r3, r31
|
||||
|
||||
lbl_80088A14:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
m_modelType = modelType;
|
||||
m_jointTree = &data->m_jointTree;
|
||||
int result = createAnmMtx(data);
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
result = createWeightEnvelopeMtx(data);
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
if (data->m_modelLoaderFlags >> 8 & 1) {
|
||||
setNoUseDrawMtx();
|
||||
} else {
|
||||
switch (data->m_modelLoaderFlags & 0x10) {
|
||||
case 0x10:
|
||||
result = setNoUseDrawMtx();
|
||||
break;
|
||||
case 0x0:
|
||||
default:
|
||||
result = createDoubleDrawMtx(data, modelType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
if ((data->m_modelLoaderFlags & 0x10) != 0) {
|
||||
data->_0C = 0;
|
||||
} else {
|
||||
result = createBumpMtxArray(data, modelType);
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -166,35 +109,13 @@ lbl_80088A14:
|
||||
* Address: 80088A34
|
||||
* Size: 00005C
|
||||
*/
|
||||
void J3DMtxBuffer::createAnmMtx(J3DModelData*)
|
||||
int J3DMtxBuffer::createAnmMtx(J3DModelData* data)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 8(r1)
|
||||
mr r30, r3
|
||||
lhz r3, 0x2c(r4)
|
||||
cmplwi r3, 0
|
||||
beq lbl_80088A74
|
||||
bl __nwa__FUl
|
||||
stw r3, 4(r30)
|
||||
lhz r0, 0x2c(r31)
|
||||
mulli r3, r0, 0x30
|
||||
bl __nwa__FUl
|
||||
stw r3, 0xc(r30)
|
||||
|
||||
lbl_80088A74:
|
||||
lwz r0, 0x14(r1)
|
||||
li r3, 0
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (data->m_jointTree.m_jointCnt) {
|
||||
_04 = new u8[data->m_jointTree.m_jointCnt];
|
||||
m_worldMatrices = new Mtx[data->m_jointTree.m_jointCnt];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -202,35 +123,13 @@ lbl_80088A74:
|
||||
* Address: 80088A90
|
||||
* Size: 00005C
|
||||
*/
|
||||
void J3DMtxBuffer::createWeightEnvelopeMtx(J3DModelData*)
|
||||
int J3DMtxBuffer::createWeightEnvelopeMtx(J3DModelData* data)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 8(r1)
|
||||
mr r30, r3
|
||||
lhz r3, 0x2e(r4)
|
||||
cmplwi r3, 0
|
||||
beq lbl_80088AD0
|
||||
bl __nwa__FUl
|
||||
stw r3, 8(r30)
|
||||
lhz r0, 0x2e(r31)
|
||||
mulli r3, r0, 0x30
|
||||
bl __nwa__FUl
|
||||
stw r3, 0x10(r30)
|
||||
|
||||
lbl_80088AD0:
|
||||
lwz r0, 0x14(r1)
|
||||
li r3, 0
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
if (data->m_jointTree.m_envelopeCnt) {
|
||||
_08 = new u8[data->m_jointTree.m_envelopeCnt];
|
||||
_10 = new Mtx[data->m_jointTree.m_envelopeCnt];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -238,8 +137,43 @@ lbl_80088AD0:
|
||||
* Address: 80088AEC
|
||||
* Size: 00002C
|
||||
*/
|
||||
void J3DMtxBuffer::setNoUseDrawMtx()
|
||||
int J3DMtxBuffer::setNoUseDrawMtx()
|
||||
{
|
||||
// const Mtx33* norm = sNoUseNrmMtxPtr;
|
||||
// _14 = _18 = sNoUseDrawMtxPtr;
|
||||
// _1C = _20 = norm;
|
||||
// _28 = nullptr;
|
||||
// _24 = 0;
|
||||
// const Mtx44** draw = &sNoUseDrawMtxPtr;
|
||||
// const Mtx33** nrm = &sNoUseNrmMtxPtr;
|
||||
// _18 = *draw;
|
||||
// _14 = *draw;
|
||||
// _20 = *nrm;
|
||||
// _1C = *nrm;
|
||||
// _28 = nullptr;
|
||||
// _24 = 0;
|
||||
Mtx** draw = &sNoUseDrawMtxPtr;
|
||||
Mtx33** nrm = &sNoUseNrmMtxPtr;
|
||||
for (int i = 1; i >= 0; i--) {
|
||||
_14[i] = draw;
|
||||
}
|
||||
for (int i = 1; i >= 0; i--) {
|
||||
_1C[i] = nrm;
|
||||
}
|
||||
for (int i = 1; i >= 0; i--) {
|
||||
// _14[i] = sNoUseDrawMtxPtr;
|
||||
// _1C[i] = sNoUseNrmMtxPtr;
|
||||
_24[i] = nullptr;
|
||||
}
|
||||
// const Mtx44* draw = sNoUseDrawMtxPtr;
|
||||
// const Mtx33* nrm = sNoUseNrmMtxPtr;
|
||||
// _18 = draw;
|
||||
// _14 = draw;
|
||||
// _20 = nrm;
|
||||
// _1C = nrm;
|
||||
// _28 = nullptr;
|
||||
// _24 = 0;
|
||||
return 0;
|
||||
/*
|
||||
addi r5, r13, sNoUseDrawMtxPtr__12J3DMtxBuffer@sda21
|
||||
addi r4, r13, sNoUseNrmMtxPtr__12J3DMtxBuffer@sda21
|
||||
@ -260,78 +194,24 @@ void J3DMtxBuffer::setNoUseDrawMtx()
|
||||
* Address: 80088B18
|
||||
* Size: 0000E0
|
||||
*/
|
||||
void J3DMtxBuffer::createDoubleDrawMtx(J3DModelData*, unsigned long)
|
||||
int J3DMtxBuffer::createDoubleDrawMtx(J3DModelData* data, u32 p2)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
stw r0, 0x34(r1)
|
||||
stmw r25, 0x14(r1)
|
||||
or. r27, r5, r5
|
||||
mr r25, r3
|
||||
mr r26, r4
|
||||
beq lbl_80088B74
|
||||
mr r30, r25
|
||||
slwi r29, r27, 2
|
||||
li r28, 0
|
||||
li r31, 0
|
||||
|
||||
lbl_80088B48:
|
||||
mr r3, r29
|
||||
bl __nwa__FUl
|
||||
stw r3, 0x14(r30)
|
||||
mr r3, r29
|
||||
bl __nwa__FUl
|
||||
stw r3, 0x1c(r30)
|
||||
addi r28, r28, 1
|
||||
cmpwi r28, 2
|
||||
stw r31, 0x24(r30)
|
||||
addi r30, r30, 4
|
||||
blt lbl_80088B48
|
||||
|
||||
lbl_80088B74:
|
||||
li r28, 0
|
||||
mr r30, r25
|
||||
|
||||
lbl_80088B7C:
|
||||
li r31, 0
|
||||
li r29, 0
|
||||
b lbl_80088BC8
|
||||
|
||||
lbl_80088B88:
|
||||
lhz r0, 0x44(r26)
|
||||
cmplwi r0, 0
|
||||
beq lbl_80088BC0
|
||||
mulli r3, r0, 0x30
|
||||
li r4, 0x20
|
||||
bl __nwa__FUli
|
||||
lwz r5, 0x14(r30)
|
||||
li r4, 0x20
|
||||
stwx r3, r5, r29
|
||||
lhz r0, 0x44(r26)
|
||||
mulli r3, r0, 0x24
|
||||
bl __nwa__FUli
|
||||
lwz r4, 0x1c(r30)
|
||||
stwx r3, r4, r29
|
||||
|
||||
lbl_80088BC0:
|
||||
addi r29, r29, 4
|
||||
addi r31, r31, 1
|
||||
|
||||
lbl_80088BC8:
|
||||
cmplw r31, r27
|
||||
blt lbl_80088B88
|
||||
addi r28, r28, 1
|
||||
addi r30, r30, 4
|
||||
cmpwi r28, 2
|
||||
blt lbl_80088B7C
|
||||
lmw r25, 0x14(r1)
|
||||
li r3, 0
|
||||
lwz r0, 0x34(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
*/
|
||||
if (p2) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
_14[i] = new Mtx*[p2];
|
||||
_1C[i] = new Mtx33*[p2];
|
||||
_24[i] = nullptr;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < p2; j++) {
|
||||
if (data->m_jointTree.m_mtxData.m_count) {
|
||||
_14[i][j] = new (0x20) Mtx[data->m_jointTree.m_mtxData.m_count];
|
||||
_1C[i][j] = new (0x20) Mtx33[data->m_jointTree.m_mtxData.m_count];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -339,8 +219,54 @@ lbl_80088BC8:
|
||||
* Address: 80088BF8
|
||||
* Size: 000214
|
||||
*/
|
||||
void J3DMtxBuffer::createBumpMtxArray(J3DModelData*, unsigned long)
|
||||
int J3DMtxBuffer::createBumpMtxArray(J3DModelData* data, u32 p2)
|
||||
{
|
||||
if (data->m_jointTree.m_flags == 0) {
|
||||
u16 materialCount = data->m_materialTable.m_count1;
|
||||
u16 bumpMtxCount = 0;
|
||||
u16 v1 = 0;
|
||||
for (u16 i = 0; i < materialCount; i++) {
|
||||
J3DMaterial* material = data->m_materialTable.m_materials1[i];
|
||||
if (material->m_texGenBlock->getNBTScale()->_00 == 1) {
|
||||
bumpMtxCount += material->m_shape->countBumpMtxNum();
|
||||
v1++;
|
||||
}
|
||||
}
|
||||
if (bumpMtxCount != 0 && p2 != 0) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
_24[i] = new Mtx33**[v1];
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 2; i++) {
|
||||
u16 materialCount = data->m_materialTable.m_count1;
|
||||
int shapeCount = 0;
|
||||
for (u16 matIndex = 0; matIndex < materialCount; matIndex++) {
|
||||
J3DMaterial* material = data->m_materialTable.m_materials1[matIndex];
|
||||
if (material->m_texGenBlock->getNBTScale()->_00 == 1) {
|
||||
_24[i][shapeCount] = new Mtx33*[p2];
|
||||
material->m_shape->_64 = shapeCount;
|
||||
shapeCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 2; i++) {
|
||||
u16 materialCount = data->m_materialTable.m_count1;
|
||||
int j = 0;
|
||||
for (u16 matIndex = 0; matIndex < materialCount; matIndex++) {
|
||||
J3DMaterial* material = data->m_materialTable.m_materials1[matIndex];
|
||||
if (material->m_texGenBlock->getNBTScale()->_00 == 1) {
|
||||
for (int k = 0; k < p2; k++) {
|
||||
_24[i][j][k] = new (0x20) Mtx33[data->m_jointTree.m_mtxData.m_count];
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (v1) {
|
||||
data->_0C = 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
/*
|
||||
stwu r1, -0x40(r1)
|
||||
mflr r0
|
||||
@ -668,8 +594,10 @@ lbl_80088FC8:
|
||||
* Address: 8008902C
|
||||
* Size: 000304
|
||||
*/
|
||||
void J3DMtxBuffer::calcDrawMtx(unsigned long, const Vec&, const float (&)[3][4])
|
||||
void J3DMtxBuffer::calcDrawMtx(u32 p1, const Vec& vec, const Mtx& mtx)
|
||||
{
|
||||
switch (p1) {
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x80(r1)
|
||||
mflr r0
|
||||
|
@ -1,3 +1,7 @@
|
||||
#include "JSystem/J3D/J3DDisplayListObj.h"
|
||||
#include "JSystem/J3D/J3DPacket.h"
|
||||
#include "JSystem/J3D/J3DTevBlock.h"
|
||||
#include "JSystem/J3D/J3DTexGenBlock.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -67,7 +71,7 @@
|
||||
* Address: 8005F82C
|
||||
* Size: 000060
|
||||
*/
|
||||
void J3DDisplayListObj::newDisplayList(unsigned long)
|
||||
int J3DDisplayListObj::newDisplayList(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -102,7 +106,7 @@ void J3DDisplayListObj::newDisplayList(unsigned long)
|
||||
* Address: 8005F88C
|
||||
* Size: 000058
|
||||
*/
|
||||
void J3DDisplayListObj::newSingleDisplayList(unsigned long)
|
||||
int J3DDisplayListObj::newSingleDisplayList(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -135,7 +139,7 @@ void J3DDisplayListObj::newSingleDisplayList(unsigned long)
|
||||
* Address: 8005F8E4
|
||||
* Size: 000068
|
||||
*/
|
||||
void J3DDisplayListObj::single_To_Double()
|
||||
int J3DDisplayListObj::single_To_Double()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -174,7 +178,7 @@ lbl_8005F934:
|
||||
* Address: 8005F94C
|
||||
* Size: 000020
|
||||
*/
|
||||
void J3DDisplayListObj::setSingleDisplayList(void*, unsigned long)
|
||||
void J3DDisplayListObj::setSingleDisplayList(void* p1, u32 p2)
|
||||
{
|
||||
/*
|
||||
addi r0, r5, 0x1f
|
||||
@ -250,7 +254,7 @@ void J3DDisplayListObj::beginDL()
|
||||
* Address: 8005F9F8
|
||||
* Size: 00005C
|
||||
*/
|
||||
void J3DDisplayListObj::endDL()
|
||||
u32 J3DDisplayListObj::endDL()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -319,7 +323,7 @@ void J3DDisplayListObj::beginPatch()
|
||||
* Address: 8005FAB4
|
||||
* Size: 00003C
|
||||
*/
|
||||
void J3DDisplayListObj::endPatch()
|
||||
u32 J3DDisplayListObj::endPatch()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -345,7 +349,7 @@ void J3DDisplayListObj::endPatch()
|
||||
* Address: 8005FAF0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DPacket::entry(J3DDrawBuffer*) { return 0x1; }
|
||||
bool J3DPacket::entry(J3DDrawBuffer*) { return 0x1; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
@ -449,7 +453,7 @@ lbl_8005FBA8:
|
||||
* Address: 8005FBC0
|
||||
* Size: 0000A4
|
||||
*/
|
||||
void J3DDrawPacket::newDisplayList(unsigned long)
|
||||
int J3DDrawPacket::newDisplayList(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -507,7 +511,7 @@ lbl_8005FC4C:
|
||||
* Address: 8005FC64
|
||||
* Size: 00009C
|
||||
*/
|
||||
void J3DDrawPacket::newSingleDisplayList(unsigned long)
|
||||
int J3DDrawPacket::newSingleDisplayList(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -718,7 +722,7 @@ void J3DMatPacket::beginDiff()
|
||||
* Address: 8005FE78
|
||||
* Size: 000060
|
||||
*/
|
||||
void J3DMatPacket::endDiff()
|
||||
u32 J3DMatPacket::endDiff()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -753,7 +757,7 @@ void J3DMatPacket::endDiff()
|
||||
* Address: 8005FED8
|
||||
* Size: 000024
|
||||
*/
|
||||
void J3DMatPacket::isSame(J3DMatPacket*) const
|
||||
bool J3DMatPacket::isSame(J3DMatPacket*) const
|
||||
{
|
||||
/*
|
||||
lwz r5, 0x34(r3)
|
||||
@ -902,7 +906,7 @@ lbl_8006003C:
|
||||
* Address: 80060054
|
||||
* Size: 000274
|
||||
*/
|
||||
void J3DShapePacket::calcDifferedBufferSize(unsigned long)
|
||||
int J3DShapePacket::calcDifferedBufferSize(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
@ -1108,21 +1112,21 @@ lbl_800602A0:
|
||||
* Address: 800602C8
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTevBlock::getTevStageNum() const { return 0x1; }
|
||||
// u8 J3DTevBlock::getTevStageNum() const { return 0x1; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800602D0
|
||||
* Size: 000008
|
||||
*/
|
||||
u32 J3DTexGenBlock::getTexGenNum() const { return 0x0; }
|
||||
// u32 J3DTexGenBlock::getTexGenNum() const { return 0x0; }
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 800602D8
|
||||
* Size: 0000BC
|
||||
*/
|
||||
void J3DShapePacket::newDifferedDisplayList(unsigned long)
|
||||
int J3DShapePacket::newDifferedDisplayList(u32)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
@ -1188,7 +1192,7 @@ lbl_8006037C:
|
||||
* Address: 80060394
|
||||
* Size: 000114
|
||||
*/
|
||||
void J3DShapePacket::newDifferedTexMtx(J3DTexDiffFlag)
|
||||
int J3DShapePacket::newDifferedTexMtx(J3DTexDiffFlag)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
@ -1552,7 +1556,7 @@ lbl_800607DC:
|
||||
* Address: 800607F0
|
||||
* Size: 000060
|
||||
*/
|
||||
void J3DMatPacket::entry(J3DDrawBuffer*)
|
||||
bool J3DMatPacket::entry(J3DDrawBuffer*)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
|
@ -1,4 +1,9 @@
|
||||
#include "JSystem/J3D/J3DShape.h"
|
||||
#include "Dolphin/gd.h"
|
||||
#include "Dolphin/gx.h"
|
||||
#include "Dolphin/os.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "JSystem/J3D/J3DVertexData.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -42,36 +47,28 @@
|
||||
*/
|
||||
void J3DShape::initialize()
|
||||
{
|
||||
/*
|
||||
li r5, 0
|
||||
lis r4, 0x0000FFFF@ha
|
||||
stw r5, 4(r3)
|
||||
addi r4, r4, 0x0000FFFF@l
|
||||
lfs f0, lbl_805169A8@sda21(r2)
|
||||
addi r0, r13, j3dDefaultViewNo@sda21
|
||||
sth r4, 8(r3)
|
||||
sth r5, 0xa(r3)
|
||||
stw r5, 0xc(r3)
|
||||
stfs f0, 0x10(r3)
|
||||
stfs f0, 0x14(r3)
|
||||
stfs f0, 0x18(r3)
|
||||
stfs f0, 0x1c(r3)
|
||||
stfs f0, 0x20(r3)
|
||||
stfs f0, 0x24(r3)
|
||||
stfs f0, 0x28(r3)
|
||||
stw r5, 0x30(r3)
|
||||
stw r5, 0x38(r3)
|
||||
stw r5, 0x3c(r3)
|
||||
stw r5, 0x4c(r3)
|
||||
stw r5, 0x50(r3)
|
||||
stw r5, 0x54(r3)
|
||||
stw r5, 0x58(r3)
|
||||
stw r5, 0x5c(r3)
|
||||
stw r0, 0x60(r3)
|
||||
stb r5, 0x34(r3)
|
||||
stb r5, 0x48(r3)
|
||||
blr
|
||||
*/
|
||||
_04 = nullptr;
|
||||
m_id = 0xFFFF;
|
||||
_0A = 0;
|
||||
m_flags = 0;
|
||||
_10 = 0.0f;
|
||||
_14 = 0.0f;
|
||||
_18 = 0.0f;
|
||||
_1C = 0.0f;
|
||||
_20 = 0.0f;
|
||||
_24 = 0.0f;
|
||||
_28 = 0.0f;
|
||||
_30 = nullptr;
|
||||
_38 = nullptr;
|
||||
_3C = nullptr;
|
||||
m_vtxData = nullptr;
|
||||
m_drawMtxData = nullptr;
|
||||
m_flagList = nullptr;
|
||||
m_tree1 = nullptr;
|
||||
m_tree2 = nullptr;
|
||||
_60 = &j3dDefaultViewNo;
|
||||
m_mode = 0;
|
||||
_48 = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -79,44 +76,11 @@ void J3DShape::initialize()
|
||||
* Address: 800608C0
|
||||
* Size: 000078
|
||||
*/
|
||||
void J3DShape::calcNBTScale(const Vec&, float (*)[3][3], float (*)[3][3])
|
||||
void J3DShape::calcNBTScale(const Vec& p1, float (*p2)[3][3], float (*p3)[3][3])
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stmw r27, 0xc(r1)
|
||||
mr r27, r3
|
||||
mr r28, r4
|
||||
mr r29, r5
|
||||
mr r30, r6
|
||||
li r31, 0
|
||||
b lbl_80060914
|
||||
|
||||
lbl_800608E8:
|
||||
lwz r3, 0x38(r27)
|
||||
rlwinm r0, r31, 2, 0xe, 0x1d
|
||||
mr r4, r28
|
||||
mr r5, r29
|
||||
lwzx r3, r3, r0
|
||||
mr r6, r30
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x1c(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
addi r31, r31, 1
|
||||
|
||||
lbl_80060914:
|
||||
lhz r0, 0xa(r27)
|
||||
clrlwi r3, r31, 0x10
|
||||
cmplw r3, r0
|
||||
blt lbl_800608E8
|
||||
lmw r27, 0xc(r1)
|
||||
lwz r0, 0x24(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
for (u16 i = 0; i < _0A; i++) {
|
||||
_38[i]->calcNBTScale(p1, p2, p3);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -124,46 +88,13 @@ lbl_80060914:
|
||||
* Address: 80060938
|
||||
* Size: 000080
|
||||
*/
|
||||
void J3DShape::countBumpMtxNum() const
|
||||
int J3DShape::countBumpMtxNum() const
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
lhz r31, 0xa(r3)
|
||||
stw r30, 0x18(r1)
|
||||
lwz r30, 0x38(r3)
|
||||
stw r29, 0x14(r1)
|
||||
li r29, 0
|
||||
stw r28, 0x10(r1)
|
||||
li r28, 0
|
||||
b lbl_80060988
|
||||
|
||||
lbl_80060968:
|
||||
rlwinm r0, r28, 2, 0xe, 0x1d
|
||||
lwzx r3, r30, r0
|
||||
lwz r12, 0(r3)
|
||||
lwz r12, 0x10(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
add r29, r29, r3
|
||||
addi r28, r28, 1
|
||||
|
||||
lbl_80060988:
|
||||
clrlwi r0, r28, 0x10
|
||||
cmplw r0, r31
|
||||
blt lbl_80060968
|
||||
lwz r0, 0x24(r1)
|
||||
mr r3, r29
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
int count = 0;
|
||||
for (u16 i = 0; i < _0A; i++) {
|
||||
count += _38[i]->getUseMtxNum();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -171,87 +102,17 @@ lbl_80060988:
|
||||
* Address: 800609B8
|
||||
* Size: 0000EC
|
||||
*/
|
||||
bool J3DShape::isSameVcdVatCmd(J3DShape*)
|
||||
bool J3DShape::isSameVcdVatCmd(J3DShape* other)
|
||||
{
|
||||
/*
|
||||
li r0, 0x18
|
||||
lwz r4, 0x2c(r4)
|
||||
lwz r3, 0x2c(r3)
|
||||
li r6, 0
|
||||
mtctr r0
|
||||
|
||||
lbl_800609CC:
|
||||
lbz r5, 0(r4)
|
||||
lbz r0, 0(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_800609E4
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_800609E4:
|
||||
lbz r5, 1(r4)
|
||||
lbz r0, 1(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_800609FC
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_800609FC:
|
||||
lbz r5, 2(r4)
|
||||
lbz r0, 2(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A14
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A14:
|
||||
lbz r5, 3(r4)
|
||||
lbz r0, 3(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A2C
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A2C:
|
||||
lbz r5, 4(r4)
|
||||
lbz r0, 4(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A44
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A44:
|
||||
lbz r5, 5(r4)
|
||||
lbz r0, 5(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A5C
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A5C:
|
||||
lbz r5, 6(r4)
|
||||
lbz r0, 6(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A74
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A74:
|
||||
lbz r5, 7(r4)
|
||||
lbz r0, 7(r3)
|
||||
cmplw r5, r0
|
||||
beq lbl_80060A8C
|
||||
li r3, 0
|
||||
blr
|
||||
|
||||
lbl_80060A8C:
|
||||
addi r6, r6, 7
|
||||
addi r3, r3, 8
|
||||
addi r4, r4, 8
|
||||
bdnz lbl_800609CC
|
||||
li r3, 1
|
||||
blr
|
||||
*/
|
||||
u8* otherVatCmd = other->_2C;
|
||||
u8* thisVatCmd = _2C;
|
||||
// TODO: is the 0xC0 a sizeof?
|
||||
for (int i = 0; i < 0xC0; i++) {
|
||||
if (otherVatCmd[i] != thisVatCmd[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -505,6 +366,20 @@ lbl_80060D70:
|
||||
*/
|
||||
void J3DShape::makeVcdVatCmd()
|
||||
{
|
||||
// static int sInterruptFlag = OSDisableInterrupts();
|
||||
// OSDisableScheduler();
|
||||
// GDCurrentDL displayList;
|
||||
// // TODO: Is 0xC0 a sizeof something?
|
||||
// GDInitGDLObj(&displayList, _2C, 0xC0);
|
||||
// __GDCurrentDL = &displayList;
|
||||
// GDSetVtxDescv(_30);
|
||||
// makeVtxArrayCmd();
|
||||
// J3DGDSetVtxAttrFmtv(0, m_vtxData->_14, m_mode);
|
||||
// GDPadCurr32();
|
||||
// GDFlushCurrToMem();
|
||||
// __GDCurrentDL = nullptr;
|
||||
// OSEnableScheduler();
|
||||
// OSRestoreInterrupts(sInterruptFlag);
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
@ -558,6 +433,23 @@ lbl_80060DD0:
|
||||
*/
|
||||
void J3DShape::loadPreDrawSetting() const
|
||||
{
|
||||
if (sOldVcdVatCmd != _2C) {
|
||||
// TODO: Is 0xC0 a sizeof?
|
||||
GXCallDisplayList(_2C, 0xC0);
|
||||
sOldVcdVatCmd = _2C;
|
||||
}
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x30;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _40;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x40;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _44;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x10;
|
||||
HW_REG(GXFIFO_ADDR, u16) = 0x0001;
|
||||
HW_REG(GXFIFO_ADDR, u16) = 0x1018;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _40;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _44;
|
||||
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -974,6 +866,39 @@ lbl_80061348:
|
||||
*/
|
||||
void J3DShape::simpleDrawCache() const
|
||||
{
|
||||
if (sOldVcdVatCmd != _2C) {
|
||||
GXCallDisplayList(_2C, 0xC0);
|
||||
sOldVcdVatCmd = _2C;
|
||||
}
|
||||
if (sEnvelopeFlag && _48 == 0) {
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x30;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _40;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x40;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _44;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x10;
|
||||
HW_REG(GXFIFO_ADDR, u16) = 1;
|
||||
HW_REG(GXFIFO_ADDR, u16) = 0x1018;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _40;
|
||||
HW_REG(GXFIFO_ADDR, u32) = _44;
|
||||
}
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0xA0;
|
||||
HW_REG(GXFIFO_ADDR, u32) = j3dSys._10C & 0x7FFFFFFF;
|
||||
if (m_mode == 0) {
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0xA1;
|
||||
HW_REG(GXFIFO_ADDR, u32) = j3dSys._110 & 0x7FFFFFFF;
|
||||
}
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0x08;
|
||||
HW_REG(GXFIFO_ADDR, u8) = 0xA2;
|
||||
HW_REG(GXFIFO_ADDR, u32) = j3dSys._114 & 0x7FFFFFFF;
|
||||
for (u16 i = 0; i < _0A; ++i) {
|
||||
if (_3C[i] != nullptr) {
|
||||
_3C[i]->draw();
|
||||
}
|
||||
}
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "JSystem/J3D/J3DShape.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "Dolphin/gx.h"
|
||||
#include "Dolphin/os.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -132,6 +134,11 @@
|
||||
.4byte 0x00000000
|
||||
*/
|
||||
|
||||
static GXColor ColorBlack = { 0x00, 0x00, 0x00, 0x00 };
|
||||
static GXColor ColorWhite = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
||||
static u8 NullTexData[0x10] = { 0x0 };
|
||||
|
||||
/*
|
||||
* --INFO--
|
||||
* Address: 8005DAAC
|
||||
@ -217,19 +224,11 @@ J3DSys::J3DSys()
|
||||
* Address: 8005DBC0
|
||||
* Size: 000024
|
||||
*/
|
||||
void J3DSys::loadPosMtxIndx(int, unsigned short) const
|
||||
void J3DSys::loadPosMtxIndx(int p1, unsigned short p2) const
|
||||
{
|
||||
/*
|
||||
mulli r0, r4, 0xc
|
||||
li r4, 0x20
|
||||
lis r3, 0xCC008000@ha
|
||||
stb r4, 0xCC008000@l(r3)
|
||||
clrlwi r0, r0, 0x10
|
||||
sth r5, -0x8000(r3)
|
||||
ori r0, r0, 0xb000
|
||||
sth r0, -0x8000(r3)
|
||||
blr
|
||||
*/
|
||||
HW_REG(0xCC008000, u8) = 0x20;
|
||||
HW_REG(0xCC008000, u16) = p2;
|
||||
HW_REG(0xCC008000, u16) = (u16)(p1 * 0xC) | 0xB000;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -237,20 +236,11 @@ void J3DSys::loadPosMtxIndx(int, unsigned short) const
|
||||
* Address: 8005DBE4
|
||||
* Size: 000028
|
||||
*/
|
||||
void J3DSys::loadNrmMtxIndx(int, unsigned short) const
|
||||
void J3DSys::loadNrmMtxIndx(int p1, unsigned short p2) const
|
||||
{
|
||||
/*
|
||||
mulli r3, r4, 9
|
||||
li r0, 0x28
|
||||
lis r4, 0xCC008000@ha
|
||||
stb r0, 0xCC008000@l(r4)
|
||||
addi r0, r3, 0x400
|
||||
clrlwi r0, r0, 0x10
|
||||
sth r5, -0x8000(r4)
|
||||
ori r0, r0, 0x8000
|
||||
sth r0, -0x8000(r4)
|
||||
blr
|
||||
*/
|
||||
HW_REG(0xCC008000, u8) = 0x28;
|
||||
HW_REG(0xCC008000, u16) = p2;
|
||||
HW_REG(0xCC008000, u16) = (u16)(p1 * 9 + 0x400) | 0x8000;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -816,31 +806,13 @@ lbl_8005E3B0:
|
||||
*/
|
||||
void J3DSys::reinitGX()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
bl reinitGenMode__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitLighting__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitTransform__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitTexture__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitTevStages__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitIndStages__6J3DSysFv
|
||||
mr r3, r31
|
||||
bl reinitPixelProc__6J3DSysFv
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
*/
|
||||
reinitGenMode();
|
||||
reinitLighting();
|
||||
reinitTransform();
|
||||
reinitTexture();
|
||||
reinitTevStages();
|
||||
reinitIndStages();
|
||||
reinitPixelProc();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -850,6 +822,12 @@ void J3DSys::reinitGX()
|
||||
*/
|
||||
void J3DSys::reinitGenMode()
|
||||
{
|
||||
// GXSetNumChans(0);
|
||||
// GXSetNumTexGens(1);
|
||||
// GXSetNumTevStages(1);
|
||||
// GXSetNumIndStages(0);
|
||||
// GXSetCullMode(2);
|
||||
// GXSetCoPlanar(0);
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -880,51 +858,20 @@ void J3DSys::reinitGenMode()
|
||||
*/
|
||||
void J3DSys::reinitLighting()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 4
|
||||
li r4, 0
|
||||
stw r0, 0x24(r1)
|
||||
li r5, 0
|
||||
li r6, 1
|
||||
li r7, 0
|
||||
li r8, 0
|
||||
li r9, 2
|
||||
bl GXSetChanCtrl
|
||||
li r3, 5
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
li r6, 1
|
||||
li r7, 0
|
||||
li r8, 0
|
||||
li r9, 2
|
||||
bl GXSetChanCtrl
|
||||
lwz r0, ColorBlack@sda21(r13)
|
||||
addi r4, r1, 0x14
|
||||
li r3, 4
|
||||
stw r0, 0x14(r1)
|
||||
bl GXSetChanAmbColor
|
||||
lwz r0, ColorBlack@sda21(r13)
|
||||
addi r4, r1, 0x10
|
||||
li r3, 5
|
||||
stw r0, 0x10(r1)
|
||||
bl GXSetChanAmbColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0xc
|
||||
li r3, 4
|
||||
stw r0, 0xc(r1)
|
||||
bl GXSetChanMatColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 8
|
||||
li r3, 5
|
||||
stw r0, 8(r1)
|
||||
bl GXSetChanMatColor
|
||||
lwz r0, 0x24(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetChanCtrl(GX_COLOR1A1, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
// GXColor a = ColorBlack;
|
||||
// GXSetChanAmbColor(4, &a);
|
||||
// GXColor b = ColorBlack;
|
||||
// GXSetChanAmbColor(5, &b);
|
||||
// GXColor c = ColorWhite;
|
||||
// GXSetChanMatColor(4, &c);
|
||||
// GXColor d = ColorWhite;
|
||||
// GXSetChanMatColor(5, &d);
|
||||
GXSetChanAmbColor(4, ColorBlack);
|
||||
GXSetChanAmbColor(5, ColorBlack);
|
||||
GXSetChanMatColor(4, ColorWhite);
|
||||
GXSetChanMatColor(5, ColorWhite);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1010,49 +957,16 @@ void J3DSys::reinitTransform()
|
||||
*/
|
||||
void J3DSys::reinitTexture()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
lis r4, NullTexData@ha
|
||||
li r5, 4
|
||||
stw r0, 0x34(r1)
|
||||
addi r3, r1, 8
|
||||
addi r4, r4, NullTexData@l
|
||||
li r6, 4
|
||||
li r7, 3
|
||||
li r8, 0
|
||||
li r9, 0
|
||||
li r10, 0
|
||||
bl GXInitTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 0
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 1
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 2
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 3
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 4
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 5
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 6
|
||||
bl GXLoadTexObj
|
||||
addi r3, r1, 8
|
||||
li r4, 7
|
||||
bl GXLoadTexObj
|
||||
lwz r0, 0x34(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
*/
|
||||
GXTexObj texObj;
|
||||
GXInitTexObj(&texObj, &NullTexData, 4, 4, GX_TF_IA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP0);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP1);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP2);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP3);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP4);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP5);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP6);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP7);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1062,204 +976,43 @@ void J3DSys::reinitTexture()
|
||||
*/
|
||||
void J3DSys::reinitTevStages()
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x30(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
li r4, 0xff
|
||||
stw r0, 0x34(r1)
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
stw r31, 0x2c(r1)
|
||||
bl GXSetTevOrder
|
||||
li r3, 1
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 2
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 3
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 4
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 5
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 6
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 7
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 8
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 9
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xa
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xb
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xc
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xd
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xe
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
li r3, 0xf
|
||||
li r4, 0xff
|
||||
li r5, 0xff
|
||||
li r6, 0xff
|
||||
bl GXSetTevOrder
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0x20
|
||||
li r3, 1
|
||||
stw r0, 0x20(r1)
|
||||
bl GXSetTevColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0x1c
|
||||
li r3, 2
|
||||
stw r0, 0x1c(r1)
|
||||
bl GXSetTevColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0x18
|
||||
li r3, 3
|
||||
stw r0, 0x18(r1)
|
||||
bl GXSetTevColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0x14
|
||||
li r3, 0
|
||||
stw r0, 0x14(r1)
|
||||
bl GXSetTevKColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0x10
|
||||
li r3, 1
|
||||
stw r0, 0x10(r1)
|
||||
bl GXSetTevKColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 0xc
|
||||
li r3, 2
|
||||
stw r0, 0xc(r1)
|
||||
bl GXSetTevKColor
|
||||
lwz r0, ColorWhite@sda21(r13)
|
||||
addi r4, r1, 8
|
||||
li r3, 3
|
||||
stw r0, 8(r1)
|
||||
bl GXSetTevKColor
|
||||
li r31, 0
|
||||
|
||||
lbl_8005E8A0:
|
||||
mr r3, r31
|
||||
li r4, 0xa
|
||||
li r5, 0xf
|
||||
li r6, 0xf
|
||||
li r7, 0xf
|
||||
bl GXSetTevColorIn
|
||||
mr r3, r31
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
li r6, 0
|
||||
li r7, 1
|
||||
li r8, 0
|
||||
bl GXSetTevColorOp
|
||||
mr r3, r31
|
||||
li r4, 5
|
||||
li r5, 7
|
||||
li r6, 7
|
||||
li r7, 7
|
||||
bl GXSetTevAlphaIn
|
||||
mr r3, r31
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
li r6, 0
|
||||
li r7, 1
|
||||
li r8, 0
|
||||
bl GXSetTevAlphaOp
|
||||
mr r3, r31
|
||||
li r4, 6
|
||||
bl GXSetTevKColorSel
|
||||
mr r3, r31
|
||||
li r4, 0
|
||||
bl GXSetTevKAlphaSel
|
||||
mr r3, r31
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
bl GXSetTevSwapMode
|
||||
addi r31, r31, 1
|
||||
cmplwi r31, 0x10
|
||||
blt lbl_8005E8A0
|
||||
li r3, 0
|
||||
li r4, 0
|
||||
li r5, 1
|
||||
li r6, 2
|
||||
li r7, 3
|
||||
bl GXSetTevSwapModeTable
|
||||
li r3, 1
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
li r6, 0
|
||||
li r7, 3
|
||||
bl GXSetTevSwapModeTable
|
||||
li r3, 2
|
||||
li r4, 1
|
||||
li r5, 1
|
||||
li r6, 1
|
||||
li r7, 3
|
||||
bl GXSetTevSwapModeTable
|
||||
li r3, 3
|
||||
li r4, 2
|
||||
li r5, 2
|
||||
li r6, 2
|
||||
li r7, 3
|
||||
bl GXSetTevSwapModeTable
|
||||
li r3, 7
|
||||
li r4, 0
|
||||
li r5, 0
|
||||
li r6, 7
|
||||
li r7, 0
|
||||
bl GXSetAlphaCompare
|
||||
lwz r0, 0x34(r1)
|
||||
lwz r31, 0x2c(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x30
|
||||
blr
|
||||
*/
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE1, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE2, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE3, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE4, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE5, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE6, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE7, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE8, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE9, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE10, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE11, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE12, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE13, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE14, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevOrder(GX_TEVSTAGE15, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL);
|
||||
GXSetTevColor(GX_TEVREG0, ColorWhite);
|
||||
GXSetTevColor(GX_TEVREG1, ColorWhite);
|
||||
GXSetTevColor(GX_TEVREG2, ColorWhite);
|
||||
GXSetTevKColor(GX_KCOLOR0, ColorWhite);
|
||||
GXSetTevKColor(GX_KCOLOR1, ColorWhite);
|
||||
GXSetTevKColor(GX_KCOLOR2, ColorWhite);
|
||||
GXSetTevKColor(GX_KCOLOR3, ColorWhite);
|
||||
for (u32 i = 0; i < 0x10; i++) {
|
||||
GXSetTevColorIn((GXTevStageID)i, GX_CC_RASC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
|
||||
GXSetTevColorOp((GXTevStageID)i, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn((GXTevStageID)i, GX_CA_RASA, GX_ZERO, GX_ZERO, GX_ZERO);
|
||||
GXSetTevAlphaOp((GXTevStageID)i, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevKColorSel((GXTevStageID)i, GX_TEV_KCSEL_K2_R);
|
||||
GXSetTevKAlphaSel((GXTevStageID)i, 0);
|
||||
GXSetTevSwapMode((GXTevStageID)i, 0, 0);
|
||||
}
|
||||
GXSetTevSwapModeTable(GX_TEV_SWAP0, 0, 1, 2, 3);
|
||||
GXSetTevSwapModeTable(GX_TEV_SWAP1, 0, 0, 0, 3);
|
||||
GXSetTevSwapModeTable(GX_TEV_SWAP2, 1, 1, 1, 3);
|
||||
GXSetTevSwapModeTable(GX_TEV_SWAP3, 2, 2, 2, 3);
|
||||
GXSetAlphaCompare(7, 0, 0, 7, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1269,6 +1022,20 @@ lbl_8005E8A0:
|
||||
*/
|
||||
void J3DSys::reinitIndStages()
|
||||
{
|
||||
// for (u32 i = 0; i < 0x10; i++) {
|
||||
// GXSetTevDirect(i);
|
||||
// }
|
||||
// GXSetIndTexOrder(0, 0, 0);
|
||||
// GXSetIndTexOrder(1, 1, 1);
|
||||
// GXSetIndTexOrder(2, 2, 2);
|
||||
// GXSetIndTexOrder(3, 3, 3);
|
||||
// GXSetIndTexCoordScale(0, 0, 0);
|
||||
// GXSetIndTexCoordScale(1, 0, 0);
|
||||
// GXSetIndTexCoordScale(2, 0, 0);
|
||||
// GXSetIndTexCoordScale(3, 0, 0);
|
||||
// GXSetIndTexMtx(1, IndMtx, 1);
|
||||
// GXSetIndTexMtx(2, IndMtx, 1);
|
||||
// GXSetIndTexMtx(3, IndMtx, 1);
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
@ -1344,6 +1111,14 @@ lbl_8005E9DC:
|
||||
*/
|
||||
void J3DSys::reinitPixelProc()
|
||||
{
|
||||
GXSetBlendMode(GX_BM_NONE, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR);
|
||||
GXSetColorUpdate(GX_TRUE);
|
||||
GXSetAlphaUpdate(GX_TRUE);
|
||||
GXSetDither(GX_TRUE);
|
||||
GXSetFog(GX_FOG_NONE, 1.0f, 0.1f, 1.0f, 0.0f, ColorBlack);
|
||||
GXSetFogRangeAdj(GX_FALSE, 0, nullptr);
|
||||
GXSetZMode(GX_TRUE, GX_LTEQUAL, GX_TRUE);
|
||||
GXSetZCompLoc(GX_TRUE);
|
||||
/*
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "JSystem/J3D/J3DTexMtx.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,11 @@
|
||||
#include "Dolphin/os.h"
|
||||
#include "Dolphin/stl.h"
|
||||
#include "JSystem/J3D/J3DDrawMtxData.h"
|
||||
#include "JSystem/J3D/J3DTypes.h"
|
||||
#include "JSystem/J3D/J3DVertexBuffer.h"
|
||||
#include "JSystem/J3D/J3DVertexData.h"
|
||||
#include "JSystem/J3D/J3DSys.h"
|
||||
#include "JSystem/JKR/JKRHeap.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@ -10,35 +18,41 @@
|
||||
* Size: 000068
|
||||
*/
|
||||
J3DVertexData::J3DVertexData()
|
||||
// : _00(0)
|
||||
// , _04(0)
|
||||
// , _08(0)
|
||||
// , _0C(0)
|
||||
// , _10(0)
|
||||
// , _14(nullptr)
|
||||
// , _18(nullptr)
|
||||
// , _1C(nullptr)
|
||||
// , _20(nullptr)
|
||||
// , _24(nullptr)
|
||||
// , _28(nullptr)
|
||||
// , _2C(static_cast<(int*)[8]>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr))
|
||||
// , _4C(0)
|
||||
// , _50(4)
|
||||
// , _54(0)
|
||||
// , _58(4)
|
||||
{
|
||||
/*
|
||||
li r4, 0
|
||||
li r0, 4
|
||||
stw r4, 0(r3)
|
||||
stw r4, 4(r3)
|
||||
stw r4, 8(r3)
|
||||
stw r4, 0xc(r3)
|
||||
stw r4, 0x10(r3)
|
||||
stw r4, 0x14(r3)
|
||||
stw r4, 0x18(r3)
|
||||
stw r4, 0x1c(r3)
|
||||
stw r4, 0x20(r3)
|
||||
stw r4, 0x24(r3)
|
||||
stw r4, 0x28(r3)
|
||||
stw r4, 0x2c(r3)
|
||||
stw r4, 0x30(r3)
|
||||
stw r4, 0x34(r3)
|
||||
stw r4, 0x38(r3)
|
||||
stw r4, 0x3c(r3)
|
||||
stw r4, 0x40(r3)
|
||||
stw r4, 0x44(r3)
|
||||
stw r4, 0x48(r3)
|
||||
stb r4, 0x4c(r3)
|
||||
stw r0, 0x50(r3)
|
||||
stb r4, 0x54(r3)
|
||||
stw r0, 0x58(r3)
|
||||
blr
|
||||
*/
|
||||
_00 = 0;
|
||||
_04 = 0;
|
||||
_08 = 0;
|
||||
_0C = 0;
|
||||
_10 = 0;
|
||||
_14 = nullptr;
|
||||
_18 = nullptr;
|
||||
_1C = nullptr;
|
||||
_20 = nullptr;
|
||||
_24 = nullptr;
|
||||
_28 = nullptr;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
_2C[i] = nullptr;
|
||||
}
|
||||
_4C = 0;
|
||||
_50 = 4;
|
||||
_54 = 0;
|
||||
_58 = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -46,8 +60,22 @@ J3DVertexData::J3DVertexData()
|
||||
* Address: 8005EBE8
|
||||
* Size: 000060
|
||||
*/
|
||||
void J3DVertexBuffer::setVertexData(J3DVertexData*)
|
||||
void J3DVertexBuffer::setVertexData(J3DVertexData* data)
|
||||
{
|
||||
_00 = data;
|
||||
_04 = data->_18;
|
||||
_0C = data->_1C;
|
||||
_14[0] = data->_24;
|
||||
_08 = 0;
|
||||
_10 = 0;
|
||||
_14[1] = nullptr;
|
||||
_1C = data->_18;
|
||||
_24 = data->_1C;
|
||||
_20 = 0;
|
||||
_28 = 0;
|
||||
_2C = _04;
|
||||
_30 = _0C;
|
||||
_34 = _14;
|
||||
/*
|
||||
stw r4, 0(r3)
|
||||
li r5, 0
|
||||
@ -83,6 +111,23 @@ void J3DVertexBuffer::setVertexData(J3DVertexData*)
|
||||
*/
|
||||
void J3DVertexBuffer::init()
|
||||
{
|
||||
_00 = nullptr;
|
||||
_08 = 0;
|
||||
_04 = nullptr;
|
||||
_10 = 0;
|
||||
_0C = nullptr;
|
||||
_14[1] = nullptr;
|
||||
_14[0] = nullptr;
|
||||
_20 = 0;
|
||||
_1C = nullptr;
|
||||
_28 = 0;
|
||||
_24 = nullptr;
|
||||
_2C = nullptr;
|
||||
_30 = nullptr;
|
||||
_34 = nullptr;
|
||||
_2C = _04;
|
||||
_30 = _0C;
|
||||
_34 = _14;
|
||||
/*
|
||||
li r0, 0
|
||||
stw r0, 0(r3)
|
||||
@ -144,6 +189,9 @@ lbl_8005ECC4:
|
||||
*/
|
||||
void J3DVertexBuffer::setArray() const
|
||||
{
|
||||
// j3dSys._10C = _2C;
|
||||
// j3dSys._110 = _30;
|
||||
// j3dSys._114 = _34;
|
||||
/*
|
||||
lis r4, j3dSys@ha
|
||||
lwz r6, 0x2c(r3)
|
||||
@ -162,98 +210,26 @@ void J3DVertexBuffer::setArray() const
|
||||
* Address: 8005ED00
|
||||
* Size: 000128
|
||||
*/
|
||||
void J3DVertexBuffer::copyVtxColorArray(J3DDeformAttachFlag)
|
||||
void J3DVertexBuffer::copyVtxColorArray(J3DDeformAttachFlag flag)
|
||||
{
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r3
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
lwz r0, 0x14(r3)
|
||||
cmplwi r0, 0
|
||||
beq lbl_8005ED34
|
||||
lwz r0, 0x18(r31)
|
||||
cmplwi r0, 0
|
||||
bne lbl_8005EE0C
|
||||
|
||||
lbl_8005ED34:
|
||||
clrlwi. r0, r4, 0x1f
|
||||
beq lbl_8005EDB0
|
||||
li r29, 0
|
||||
mr r30, r31
|
||||
|
||||
lbl_8005ED44:
|
||||
cmpwi r29, 0
|
||||
beq lbl_8005ED58
|
||||
lwz r0, 0x14(r30)
|
||||
cmplwi r0, 0
|
||||
bne lbl_8005ED9C
|
||||
|
||||
lbl_8005ED58:
|
||||
lwz r3, 0(r31)
|
||||
li r4, 0x20
|
||||
lwz r0, 8(r3)
|
||||
slwi r3, r0, 2
|
||||
bl __nwa__FUli
|
||||
stw r3, 0x14(r30)
|
||||
lwz r4, 0(r31)
|
||||
lwz r3, 0x14(r30)
|
||||
lwz r0, 8(r4)
|
||||
lwz r4, 0x24(r4)
|
||||
slwi r5, r0, 2
|
||||
bl memcpy
|
||||
lwz r4, 0(r31)
|
||||
lwz r3, 0x14(r30)
|
||||
lwz r0, 8(r4)
|
||||
slwi r4, r0, 2
|
||||
bl DCStoreRange
|
||||
|
||||
lbl_8005ED9C:
|
||||
addi r29, r29, 1
|
||||
addi r30, r30, 4
|
||||
cmpwi r29, 2
|
||||
blt lbl_8005ED44
|
||||
b lbl_8005EE0C
|
||||
|
||||
lbl_8005EDB0:
|
||||
lwz r3, 0(r31)
|
||||
lwz r0, 0x24(r3)
|
||||
stw r0, 0x14(r31)
|
||||
lwz r0, 0x18(r31)
|
||||
cmplwi r0, 0
|
||||
bne lbl_8005EDE0
|
||||
lwz r3, 0(r31)
|
||||
li r4, 0x20
|
||||
lwz r0, 8(r3)
|
||||
slwi r3, r0, 2
|
||||
bl __nwa__FUli
|
||||
stw r3, 0x18(r31)
|
||||
|
||||
lbl_8005EDE0:
|
||||
lwz r4, 0(r31)
|
||||
lwz r3, 0x18(r31)
|
||||
lwz r0, 8(r4)
|
||||
lwz r4, 0x24(r4)
|
||||
slwi r5, r0, 2
|
||||
bl memcpy
|
||||
lwz r4, 0(r31)
|
||||
lwz r3, 0x18(r31)
|
||||
lwz r0, 8(r4)
|
||||
slwi r4, r0, 2
|
||||
bl DCStoreRange
|
||||
|
||||
lbl_8005EE0C:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
if (_14[0] == 0 || _14[1] == nullptr) {
|
||||
if (flag & DeformAttach_1) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (i == 0 || _14[i] == nullptr) {
|
||||
_14[i] = new (0x20) void*[_00->_08];
|
||||
memcpy(_14[i], _00->_24, _00->_08 << 2);
|
||||
DCStoreRange(_14[i], _00->_08 << 2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_14[0] = _00->_24;
|
||||
if (_14[1] == nullptr) {
|
||||
_14[1] = new (0x20) void*[_00->_08];
|
||||
}
|
||||
memcpy(_14[1], _00->_24, _00->_08 << 2);
|
||||
DCStoreRange(_14[1], _00->_08 << 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -262,14 +238,10 @@ lbl_8005EE0C:
|
||||
* Size: 000014
|
||||
*/
|
||||
J3DDrawMtxData::J3DDrawMtxData()
|
||||
: m_count(0)
|
||||
, _04(nullptr)
|
||||
, _08(nullptr)
|
||||
{
|
||||
/*
|
||||
li r0, 0
|
||||
sth r0, 0(r3)
|
||||
stw r0, 4(r3)
|
||||
stw r0, 8(r3)
|
||||
blr
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -19,7 +19,7 @@ void E3DAnimRes::load(J3DModelData* param_1, JKRArchive* param_2, char* param_3)
|
||||
pAnmTransform_0x0 = (J3DAnmTransform*)J3DAnmLoaderDataBase::load(pvVar1);
|
||||
pMtxCalcAnm_0x4 = J3DNewMtxCalcAnm((param_1->m_jointTree).m_08 & 0xf, pAnmTransform_0x0);
|
||||
float_0x8 = 0.0f;
|
||||
float_0xC = pAnmTransform_0x0->m_06 - 2.0f;
|
||||
float_0xC = pAnmTransform_0x0->_06 - 2.0f;
|
||||
float_0x10 = float_0x8;
|
||||
float_0x14 = float_0xC;
|
||||
float_0x18 = sys->m_secondsPerFrame * 60.0f * 0.5f;
|
||||
|
@ -1,17 +0,0 @@
|
||||
#ifndef _J3DANMBASE_H
|
||||
#define _J3DANMBASE_H
|
||||
|
||||
/*
|
||||
__vt__10J3DAnmBase:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__10J3DAnmBaseFv
|
||||
.4byte 0
|
||||
*/
|
||||
|
||||
struct J3DAnmBase {
|
||||
virtual ~J3DAnmBase(); // _08 (weak)
|
||||
virtual void _0C() = 0; // _0C
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMCLUSTER_H
|
||||
#define _J3DANMCLUSTER_H
|
||||
|
||||
/*
|
||||
__vt__13J3DAnmCluster:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__13J3DAnmClusterFv
|
||||
.4byte getKind__13J3DAnmClusterCFv
|
||||
.4byte getWeight__13J3DAnmClusterCFUs
|
||||
*/
|
||||
|
||||
struct J3DAnmCluster {
|
||||
virtual ~J3DAnmCluster(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMCLUSTERFULL_H
|
||||
#define _J3DANMCLUSTERFULL_H
|
||||
|
||||
/*
|
||||
__vt__17J3DAnmClusterFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__17J3DAnmClusterFullFv
|
||||
.4byte getKind__17J3DAnmClusterFullCFv
|
||||
.4byte getWeight__17J3DAnmClusterFullCFUs
|
||||
*/
|
||||
|
||||
struct J3DAnmClusterFull {
|
||||
virtual ~J3DAnmClusterFull(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMCLUSTERKEY_H
|
||||
#define _J3DANMCLUSTERKEY_H
|
||||
|
||||
/*
|
||||
__vt__16J3DAnmClusterKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__16J3DAnmClusterKeyFv
|
||||
.4byte getKind__16J3DAnmClusterKeyCFv
|
||||
.4byte getWeight__16J3DAnmClusterKeyCFUs
|
||||
*/
|
||||
|
||||
struct J3DAnmClusterKey {
|
||||
virtual ~J3DAnmClusterKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getWeight(unsigned short) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
#ifndef _J3DANMCOLOR_H
|
||||
#define _J3DANMCOLOR_H
|
||||
|
||||
/*
|
||||
__vt__11J3DAnmColor:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__11J3DAnmColorFv
|
||||
.4byte getKind__11J3DAnmColorCFv
|
||||
.4byte getColor__11J3DAnmColorCFUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmColor {
|
||||
virtual ~J3DAnmColor(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, _GXColor*) const; // _10 (weak)
|
||||
|
||||
void searchUpdateMaterialID(J3DModelData*);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMCOLORFULL_H
|
||||
#define _J3DANMCOLORFULL_H
|
||||
|
||||
/*
|
||||
__vt__15J3DAnmColorFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__15J3DAnmColorFullFv
|
||||
.4byte getKind__15J3DAnmColorFullCFv
|
||||
.4byte getColor__15J3DAnmColorFullCFUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmColorFull {
|
||||
virtual ~J3DAnmColorFull(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, _GXColor*) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMCOLORKEY_H
|
||||
#define _J3DANMCOLORKEY_H
|
||||
|
||||
/*
|
||||
__vt__14J3DAnmColorKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__14J3DAnmColorKeyFv
|
||||
.4byte getKind__14J3DAnmColorKeyCFv
|
||||
.4byte getColor__14J3DAnmColorKeyCFUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmColorKey {
|
||||
virtual ~J3DAnmColorKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned short, _GXColor*) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,33 +0,0 @@
|
||||
#ifndef _J3DANMFULLLOADER_V15_H
|
||||
#define _J3DANMFULLLOADER_V15_H
|
||||
|
||||
/*
|
||||
__vt__20J3DAnmFullLoader_v15:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__20J3DAnmFullLoader_v15FPCv
|
||||
.4byte setResource__20J3DAnmFullLoader_v15FP10J3DAnmBasePCv
|
||||
.4byte __dt__20J3DAnmFullLoader_v15Fv
|
||||
*/
|
||||
|
||||
struct J3DAnmFullLoader_v15 {
|
||||
virtual void load(const void*); // _08
|
||||
virtual void setResource(J3DAnmBase*, const void*); // _0C
|
||||
virtual ~J3DAnmFullLoader_v15(); // _10
|
||||
|
||||
J3DAnmFullLoader_v15();
|
||||
void readAnmTransform(const J3DAnmTransformFullData*);
|
||||
void setAnmTransform(J3DAnmTransformFull*, const J3DAnmTransformFullData*);
|
||||
void readAnmColor(const J3DAnmColorFullData*);
|
||||
void setAnmColor(J3DAnmColorFull*, const J3DAnmColorFullData*);
|
||||
void readAnmTexPattern(const J3DAnmTexPatternFullData*);
|
||||
void setAnmTexPattern(J3DAnmTexPattern*, const J3DAnmTexPatternFullData*);
|
||||
void readAnmVisibility(const J3DAnmVisibilityFullData*);
|
||||
void setAnmVisibility(J3DAnmVisibilityFull*, const J3DAnmVisibilityFullData*);
|
||||
void readAnmCluster(const J3DAnmClusterFullData*);
|
||||
void setAnmCluster(J3DAnmClusterFull*, const J3DAnmClusterFullData*);
|
||||
void readAnmVtxColor(const J3DAnmVtxColorFullData*);
|
||||
void setAnmVtxColor(J3DAnmVtxColorFull*, const J3DAnmVtxColorFullData*);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,33 +0,0 @@
|
||||
#ifndef _J3DANMKEYLOADER_V15_H
|
||||
#define _J3DANMKEYLOADER_V15_H
|
||||
|
||||
/*
|
||||
__vt__19J3DAnmKeyLoader_v15:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__19J3DAnmKeyLoader_v15FPCv
|
||||
.4byte setResource__19J3DAnmKeyLoader_v15FP10J3DAnmBasePCv
|
||||
.4byte __dt__19J3DAnmKeyLoader_v15Fv
|
||||
*/
|
||||
|
||||
struct J3DAnmKeyLoader_v15 {
|
||||
virtual void load(const void*); // _08
|
||||
virtual void setResource(J3DAnmBase*, const void*); // _0C
|
||||
virtual ~J3DAnmKeyLoader_v15(); // _10
|
||||
|
||||
J3DAnmKeyLoader_v15();
|
||||
void readAnmTransform(const J3DAnmTransformKeyData*);
|
||||
void setAnmTransform(J3DAnmTransformKey*, const J3DAnmTransformKeyData*);
|
||||
void readAnmTextureSRT(const J3DAnmTextureSRTKeyData*);
|
||||
void setAnmTextureSRT(J3DAnmTextureSRTKey*, const J3DAnmTextureSRTKeyData*);
|
||||
void readAnmColor(const J3DAnmColorKeyData*);
|
||||
void setAnmColor(J3DAnmColorKey*, const J3DAnmColorKeyData*);
|
||||
void readAnmCluster(const J3DAnmClusterKeyData*);
|
||||
void setAnmCluster(J3DAnmClusterKey*, const J3DAnmClusterKeyData*);
|
||||
void readAnmTevReg(const J3DAnmTevRegKeyData*);
|
||||
void setAnmTevReg(J3DAnmTevRegKey*, const J3DAnmTevRegKeyData*);
|
||||
void readAnmVtxColor(const J3DAnmVtxColorKeyData*);
|
||||
void setAnmVtxColor(J3DAnmVtxColorKey*, const J3DAnmVtxColorKeyData*);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMLOADER_H
|
||||
#define _J3DANMLOADER_H
|
||||
|
||||
/*
|
||||
__vt__12J3DAnmLoader:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__12J3DAnmLoaderFv
|
||||
*/
|
||||
|
||||
struct J3DAnmLoader {
|
||||
virtual void _08() = 0; // _08
|
||||
virtual void _0C() = 0; // _0C
|
||||
virtual ~J3DAnmLoader(); // _10 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
#ifndef _J3DANMTEVREGKEY_H
|
||||
#define _J3DANMTEVREGKEY_H
|
||||
|
||||
/*
|
||||
__vt__15J3DAnmTevRegKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__15J3DAnmTevRegKeyFv
|
||||
.4byte getKind__15J3DAnmTevRegKeyCFv
|
||||
*/
|
||||
|
||||
struct J3DAnmTevRegKey {
|
||||
virtual ~J3DAnmTevRegKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
|
||||
void getTevColorReg(unsigned short, _GXColorS10*) const;
|
||||
void getTevKonstReg(unsigned short, _GXColor*) const;
|
||||
void searchUpdateMaterialID(J3DModelData*);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMTEXPATTERN_H
|
||||
#define _J3DANMTEXPATTERN_H
|
||||
|
||||
/*
|
||||
__vt__16J3DAnmTexPattern:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__16J3DAnmTexPatternFv
|
||||
.4byte getKind__16J3DAnmTexPatternCFv
|
||||
*/
|
||||
|
||||
struct J3DAnmTexPattern {
|
||||
virtual ~J3DAnmTexPattern(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
|
||||
void getTexNo(unsigned short, unsigned short*) const;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,20 +0,0 @@
|
||||
#ifndef _J3DANMTEXTURESRTKEY_H
|
||||
#define _J3DANMTEXTURESRTKEY_H
|
||||
|
||||
/*
|
||||
__vt__19J3DAnmTextureSRTKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__19J3DAnmTextureSRTKeyFv
|
||||
.4byte getKind__19J3DAnmTextureSRTKeyCFv
|
||||
*/
|
||||
|
||||
struct J3DAnmTextureSRTKey {
|
||||
virtual ~J3DAnmTextureSRTKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
|
||||
void calcTransform(float, unsigned short, J3DTextureSRTInfo*) const;
|
||||
void searchUpdateMaterialID(J3DModelData*);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
#ifndef _J3DANMTRANSFORM_H
|
||||
#define _J3DANMTRANSFORM_H
|
||||
|
||||
/*
|
||||
__vt__15J3DAnmTransform:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__15J3DAnmTransformFv
|
||||
.4byte getKind__15J3DAnmTransformCFv
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
*/
|
||||
|
||||
struct J3DAnmTransform {
|
||||
virtual ~J3DAnmTransform(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void _10() = 0; // _10
|
||||
virtual void _14() = 0; // _14
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMTRANSFORMFULL_H
|
||||
#define _J3DANMTRANSFORMFULL_H
|
||||
|
||||
/*
|
||||
__vt__19J3DAnmTransformFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__19J3DAnmTransformFullFv
|
||||
.4byte getKind__19J3DAnmTransformFullCFv
|
||||
.4byte getTransform__19J3DAnmTransformFullCFUsP16J3DTransformInfo
|
||||
*/
|
||||
|
||||
struct J3DAnmTransformFull {
|
||||
virtual ~J3DAnmTransformFull(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getTransform(unsigned short, J3DTransformInfo*) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
#ifndef _J3DANMTRANSFORMKEY_H
|
||||
#define _J3DANMTRANSFORMKEY_H
|
||||
|
||||
/*
|
||||
__vt__18J3DAnmTransformKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__18J3DAnmTransformKeyFv
|
||||
.4byte getKind__18J3DAnmTransformKeyCFv
|
||||
.4byte getTransform__18J3DAnmTransformKeyCFUsP16J3DTransformInfo
|
||||
*/
|
||||
|
||||
struct J3DAnmTransformKey {
|
||||
virtual ~J3DAnmTransformKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getTransform(unsigned short, J3DTransformInfo*) const; // _10 (weak)
|
||||
|
||||
void calcTransform(float, unsigned short, J3DTransformInfo*) const;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,17 +0,0 @@
|
||||
#ifndef _J3DANMVISIBILITYFULL_H
|
||||
#define _J3DANMVISIBILITYFULL_H
|
||||
|
||||
/*
|
||||
__vt__20J3DAnmVisibilityFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__20J3DAnmVisibilityFullFv
|
||||
.4byte getKind__20J3DAnmVisibilityFullCFv
|
||||
*/
|
||||
|
||||
struct J3DAnmVisibilityFull {
|
||||
virtual ~J3DAnmVisibilityFull(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMVTXCOLOR_H
|
||||
#define _J3DANMVTXCOLOR_H
|
||||
|
||||
/*
|
||||
__vt__14J3DAnmVtxColor:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__14J3DAnmVtxColorFv
|
||||
.4byte getKind__14J3DAnmVtxColorCFv
|
||||
.4byte getColor__14J3DAnmVtxColorCFUcUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmVtxColor {
|
||||
virtual ~J3DAnmVtxColor(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, _GXColor*) const; // _10 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMVTXCOLORFULL_H
|
||||
#define _J3DANMVTXCOLORFULL_H
|
||||
|
||||
/*
|
||||
__vt__18J3DAnmVtxColorFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__18J3DAnmVtxColorFullFv
|
||||
.4byte getKind__18J3DAnmVtxColorFullCFv
|
||||
.4byte getColor__18J3DAnmVtxColorFullCFUcUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmVtxColorFull {
|
||||
virtual ~J3DAnmVtxColorFull(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, _GXColor*) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#ifndef _J3DANMVTXCOLORKEY_H
|
||||
#define _J3DANMVTXCOLORKEY_H
|
||||
|
||||
/*
|
||||
__vt__17J3DAnmVtxColorKey:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__17J3DAnmVtxColorKeyFv
|
||||
.4byte getKind__17J3DAnmVtxColorKeyCFv
|
||||
.4byte getColor__17J3DAnmVtxColorKeyCFUcUsP8_GXColor
|
||||
*/
|
||||
|
||||
struct J3DAnmVtxColorKey {
|
||||
virtual ~J3DAnmVtxColorKey(); // _08 (weak)
|
||||
virtual void getKind() const; // _0C (weak)
|
||||
virtual void getColor(unsigned char, unsigned short, _GXColor*) const; // _10
|
||||
};
|
||||
|
||||
#endif
|
@ -1,77 +0,0 @@
|
||||
#ifndef _J3DCOLORBLOCK_H
|
||||
#define _J3DCOLORBLOCK_H
|
||||
|
||||
/*
|
||||
__vt__13J3DColorBlock:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__13J3DColorBlockFv
|
||||
.4byte reset__13J3DColorBlockFP13J3DColorBlock
|
||||
.4byte patch__13J3DColorBlockFv
|
||||
.4byte patchMatColor__13J3DColorBlockFv
|
||||
.4byte patchLight__13J3DColorBlockFv
|
||||
.4byte diff__13J3DColorBlockFUl
|
||||
.4byte diffMatColor__13J3DColorBlockFv
|
||||
.4byte diffLight__13J3DColorBlockFv
|
||||
.4byte countDLSize__13J3DColorBlockFv
|
||||
.4byte 0
|
||||
.4byte setMatColor__13J3DColorBlockFUlPC10J3DGXColor
|
||||
.4byte setMatColor__13J3DColorBlockFUl10J3DGXColor
|
||||
.4byte getMatColor__13J3DColorBlockFUl
|
||||
.4byte setAmbColor__13J3DColorBlockFUlPC10J3DGXColor
|
||||
.4byte setAmbColor__13J3DColorBlockFUl10J3DGXColor
|
||||
.4byte getAmbColor__13J3DColorBlockFUl
|
||||
.4byte setColorChanNum__13J3DColorBlockFUc
|
||||
.4byte setColorChanNum__13J3DColorBlockFPCUc
|
||||
.4byte getColorChanNum__13J3DColorBlockCFv
|
||||
.4byte setColorChan__13J3DColorBlockFUlRC12J3DColorChan
|
||||
.4byte setColorChan__13J3DColorBlockFUlPC12J3DColorChan
|
||||
.4byte getColorChan__13J3DColorBlockFUl
|
||||
.4byte setLight__13J3DColorBlockFUlP11J3DLightObj
|
||||
.4byte getLight__13J3DColorBlockFUl
|
||||
.4byte setCullMode__13J3DColorBlockFPCUc
|
||||
.4byte setCullMode__13J3DColorBlockFUc
|
||||
.4byte getCullMode__13J3DColorBlockCFv
|
||||
.4byte getMatColorOffset__13J3DColorBlockCFv
|
||||
.4byte getColorChanOffset__13J3DColorBlockCFv
|
||||
.4byte setMatColorOffset__13J3DColorBlockFUl
|
||||
.4byte setColorChanOffset__13J3DColorBlockFUl
|
||||
.4byte __dt__13J3DColorBlockFv
|
||||
*/
|
||||
|
||||
struct J3DColorBlock {
|
||||
virtual void load(); // _08 (weak)
|
||||
virtual void reset(J3DColorBlock*); // _0C (weak)
|
||||
virtual void patch(); // _10 (weak)
|
||||
virtual void patchMatColor(); // _14 (weak)
|
||||
virtual void patchLight(); // _18 (weak)
|
||||
virtual void diff(unsigned long); // _1C (weak)
|
||||
virtual void diffMatColor(); // _20 (weak)
|
||||
virtual void diffLight(); // _24 (weak)
|
||||
virtual void countDLSize(); // _28 (weak)
|
||||
virtual void _2C() = 0; // _2C
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual void getLight(unsigned long); // _64 (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual void getCullMode() const; // _70 (weak)
|
||||
virtual void getMatColorOffset() const; // _74 (weak)
|
||||
virtual void getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
virtual ~J3DColorBlock(); // _84 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,116 +0,0 @@
|
||||
#ifndef _J3DCOLORBLOCKAMBIENTON_H
|
||||
#define _J3DCOLORBLOCKAMBIENTON_H
|
||||
|
||||
/*
|
||||
__vt__22J3DColorBlockAmbientOn:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__22J3DColorBlockAmbientOnFv
|
||||
.4byte reset__22J3DColorBlockAmbientOnFP13J3DColorBlock
|
||||
.4byte patch__21J3DColorBlockLightOffFv
|
||||
.4byte patchMatColor__21J3DColorBlockLightOffFv
|
||||
.4byte patchLight__21J3DColorBlockLightOffFv
|
||||
.4byte diff__21J3DColorBlockLightOffFUl
|
||||
.4byte diffMatColor__21J3DColorBlockLightOffFv
|
||||
.4byte diffLight__21J3DColorBlockLightOffFv
|
||||
.4byte countDLSize__22J3DColorBlockAmbientOnFv
|
||||
.4byte getType__22J3DColorBlockAmbientOnFv
|
||||
.4byte setMatColor__21J3DColorBlockLightOffFUlPC10J3DGXColor
|
||||
.4byte setMatColor__21J3DColorBlockLightOffFUl10J3DGXColor
|
||||
.4byte getMatColor__21J3DColorBlockLightOffFUl
|
||||
.4byte setAmbColor__22J3DColorBlockAmbientOnFUlPC10J3DGXColor
|
||||
.4byte setAmbColor__22J3DColorBlockAmbientOnFUl10J3DGXColor
|
||||
.4byte getAmbColor__22J3DColorBlockAmbientOnFUl
|
||||
.4byte setColorChanNum__21J3DColorBlockLightOffFUc
|
||||
.4byte setColorChanNum__21J3DColorBlockLightOffFPCUc
|
||||
.4byte getColorChanNum__21J3DColorBlockLightOffCFv
|
||||
.4byte setColorChan__21J3DColorBlockLightOffFUlRC12J3DColorChan
|
||||
.4byte setColorChan__21J3DColorBlockLightOffFUlPC12J3DColorChan
|
||||
.4byte getColorChan__21J3DColorBlockLightOffFUl
|
||||
.4byte setLight__13J3DColorBlockFUlP11J3DLightObj
|
||||
.4byte getLight__13J3DColorBlockFUl
|
||||
.4byte setCullMode__21J3DColorBlockLightOffFPCUc
|
||||
.4byte setCullMode__21J3DColorBlockLightOffFUc
|
||||
.4byte getCullMode__21J3DColorBlockLightOffCFv
|
||||
.4byte getMatColorOffset__21J3DColorBlockLightOffCFv
|
||||
.4byte getColorChanOffset__21J3DColorBlockLightOffCFv
|
||||
.4byte setMatColorOffset__21J3DColorBlockLightOffFUl
|
||||
.4byte setColorChanOffset__21J3DColorBlockLightOffFUl
|
||||
.4byte __dt__22J3DColorBlockAmbientOnFv
|
||||
*/
|
||||
|
||||
struct J3DColorBlockLightOff {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void _60() = 0; // _60
|
||||
virtual void _64() = 0; // _64
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual void getCullMode() const; // _70 (weak)
|
||||
virtual void getMatColorOffset() const; // _74 (weak)
|
||||
virtual void getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
};
|
||||
|
||||
struct J3DColorBlock {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void _10() = 0; // _10
|
||||
virtual void _14() = 0; // _14
|
||||
virtual void _18() = 0; // _18
|
||||
virtual void _1C() = 0; // _1C
|
||||
virtual void _20() = 0; // _20
|
||||
virtual void _24() = 0; // _24
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void _30() = 0; // _30
|
||||
virtual void _34() = 0; // _34
|
||||
virtual void _38() = 0; // _38
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void _48() = 0; // _48
|
||||
virtual void _4C() = 0; // _4C
|
||||
virtual void _50() = 0; // _50
|
||||
virtual void _54() = 0; // _54
|
||||
virtual void _58() = 0; // _58
|
||||
virtual void _5C() = 0; // _5C
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual void getLight(unsigned long); // _64 (weak)
|
||||
};
|
||||
|
||||
struct J3DColorBlockAmbientOn : public J3DColorBlockLightOff, public J3DColorBlock {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual ~J3DColorBlockAmbientOn(); // _84 (weak)
|
||||
|
||||
void initialize();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,103 +0,0 @@
|
||||
#ifndef _J3DCOLORBLOCKLIGHTOFF_H
|
||||
#define _J3DCOLORBLOCKLIGHTOFF_H
|
||||
|
||||
/*
|
||||
__vt__21J3DColorBlockLightOff:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__21J3DColorBlockLightOffFv
|
||||
.4byte reset__21J3DColorBlockLightOffFP13J3DColorBlock
|
||||
.4byte patch__21J3DColorBlockLightOffFv
|
||||
.4byte patchMatColor__21J3DColorBlockLightOffFv
|
||||
.4byte patchLight__21J3DColorBlockLightOffFv
|
||||
.4byte diff__21J3DColorBlockLightOffFUl
|
||||
.4byte diffMatColor__21J3DColorBlockLightOffFv
|
||||
.4byte diffLight__21J3DColorBlockLightOffFv
|
||||
.4byte countDLSize__21J3DColorBlockLightOffFv
|
||||
.4byte getType__21J3DColorBlockLightOffFv
|
||||
.4byte setMatColor__21J3DColorBlockLightOffFUlPC10J3DGXColor
|
||||
.4byte setMatColor__21J3DColorBlockLightOffFUl10J3DGXColor
|
||||
.4byte getMatColor__21J3DColorBlockLightOffFUl
|
||||
.4byte setAmbColor__13J3DColorBlockFUlPC10J3DGXColor
|
||||
.4byte setAmbColor__13J3DColorBlockFUl10J3DGXColor
|
||||
.4byte getAmbColor__13J3DColorBlockFUl
|
||||
.4byte setColorChanNum__21J3DColorBlockLightOffFUc
|
||||
.4byte setColorChanNum__21J3DColorBlockLightOffFPCUc
|
||||
.4byte getColorChanNum__21J3DColorBlockLightOffCFv
|
||||
.4byte setColorChan__21J3DColorBlockLightOffFUlRC12J3DColorChan
|
||||
.4byte setColorChan__21J3DColorBlockLightOffFUlPC12J3DColorChan
|
||||
.4byte getColorChan__21J3DColorBlockLightOffFUl
|
||||
.4byte setLight__13J3DColorBlockFUlP11J3DLightObj
|
||||
.4byte getLight__13J3DColorBlockFUl
|
||||
.4byte setCullMode__21J3DColorBlockLightOffFPCUc
|
||||
.4byte setCullMode__21J3DColorBlockLightOffFUc
|
||||
.4byte getCullMode__21J3DColorBlockLightOffCFv
|
||||
.4byte getMatColorOffset__21J3DColorBlockLightOffCFv
|
||||
.4byte getColorChanOffset__21J3DColorBlockLightOffCFv
|
||||
.4byte setMatColorOffset__21J3DColorBlockLightOffFUl
|
||||
.4byte setColorChanOffset__21J3DColorBlockLightOffFUl
|
||||
.4byte __dt__21J3DColorBlockLightOffFv
|
||||
.4byte 0
|
||||
*/
|
||||
|
||||
struct J3DColorBlock {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual void getLight(unsigned long); // _64 (weak)
|
||||
};
|
||||
|
||||
struct J3DColorBlockLightOff : public J3DColorBlock {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual void getCullMode() const; // _70 (weak)
|
||||
virtual void getMatColorOffset() const; // _74 (weak)
|
||||
virtual void getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
virtual ~J3DColorBlockLightOff(); // _84 (weak)
|
||||
virtual void _88() = 0; // _88
|
||||
|
||||
void initialize();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,79 +0,0 @@
|
||||
#ifndef _J3DCOLORBLOCKLIGHTON_H
|
||||
#define _J3DCOLORBLOCKLIGHTON_H
|
||||
|
||||
/*
|
||||
__vt__20J3DColorBlockLightOn:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__20J3DColorBlockLightOnFv
|
||||
.4byte reset__20J3DColorBlockLightOnFP13J3DColorBlock
|
||||
.4byte patch__20J3DColorBlockLightOnFv
|
||||
.4byte patchMatColor__20J3DColorBlockLightOnFv
|
||||
.4byte patchLight__20J3DColorBlockLightOnFv
|
||||
.4byte diff__20J3DColorBlockLightOnFUl
|
||||
.4byte diffMatColor__20J3DColorBlockLightOnFv
|
||||
.4byte diffLight__20J3DColorBlockLightOnFv
|
||||
.4byte countDLSize__20J3DColorBlockLightOnFv
|
||||
.4byte getType__20J3DColorBlockLightOnFv
|
||||
.4byte setMatColor__20J3DColorBlockLightOnFUlPC10J3DGXColor
|
||||
.4byte setMatColor__20J3DColorBlockLightOnFUl10J3DGXColor
|
||||
.4byte getMatColor__20J3DColorBlockLightOnFUl
|
||||
.4byte setAmbColor__20J3DColorBlockLightOnFUlPC10J3DGXColor
|
||||
.4byte setAmbColor__20J3DColorBlockLightOnFUl10J3DGXColor
|
||||
.4byte getAmbColor__20J3DColorBlockLightOnFUl
|
||||
.4byte setColorChanNum__20J3DColorBlockLightOnFUc
|
||||
.4byte setColorChanNum__20J3DColorBlockLightOnFPCUc
|
||||
.4byte getColorChanNum__20J3DColorBlockLightOnCFv
|
||||
.4byte setColorChan__20J3DColorBlockLightOnFUlRC12J3DColorChan
|
||||
.4byte setColorChan__20J3DColorBlockLightOnFUlPC12J3DColorChan
|
||||
.4byte getColorChan__20J3DColorBlockLightOnFUl
|
||||
.4byte setLight__20J3DColorBlockLightOnFUlP11J3DLightObj
|
||||
.4byte getLight__20J3DColorBlockLightOnFUl
|
||||
.4byte setCullMode__20J3DColorBlockLightOnFPCUc
|
||||
.4byte setCullMode__20J3DColorBlockLightOnFUc
|
||||
.4byte getCullMode__20J3DColorBlockLightOnCFv
|
||||
.4byte getMatColorOffset__20J3DColorBlockLightOnCFv
|
||||
.4byte getColorChanOffset__20J3DColorBlockLightOnCFv
|
||||
.4byte setMatColorOffset__20J3DColorBlockLightOnFUl
|
||||
.4byte setColorChanOffset__20J3DColorBlockLightOnFUl
|
||||
.4byte __dt__20J3DColorBlockLightOnFv
|
||||
*/
|
||||
|
||||
struct J3DColorBlockLightOn {
|
||||
virtual void load(); // _08
|
||||
virtual void reset(J3DColorBlock*); // _0C
|
||||
virtual void patch(); // _10
|
||||
virtual void patchMatColor(); // _14
|
||||
virtual void patchLight(); // _18
|
||||
virtual void diff(unsigned long); // _1C
|
||||
virtual void diffMatColor(); // _20
|
||||
virtual void diffLight(); // _24
|
||||
virtual void countDLSize(); // _28
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual void getLight(unsigned long); // _64 (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual void getCullMode() const; // _70 (weak)
|
||||
virtual void getMatColorOffset() const; // _74 (weak)
|
||||
virtual void getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
virtual ~J3DColorBlockLightOn(); // _84 (weak)
|
||||
|
||||
void initialize();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,83 +0,0 @@
|
||||
#ifndef _J3DCOLORBLOCKNULL_H
|
||||
#define _J3DCOLORBLOCKNULL_H
|
||||
|
||||
/*
|
||||
__vt__17J3DColorBlockNull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__13J3DColorBlockFv
|
||||
.4byte reset__13J3DColorBlockFP13J3DColorBlock
|
||||
.4byte patch__13J3DColorBlockFv
|
||||
.4byte patchMatColor__13J3DColorBlockFv
|
||||
.4byte patchLight__13J3DColorBlockFv
|
||||
.4byte diff__13J3DColorBlockFUl
|
||||
.4byte diffMatColor__13J3DColorBlockFv
|
||||
.4byte diffLight__13J3DColorBlockFv
|
||||
.4byte countDLSize__13J3DColorBlockFv
|
||||
.4byte getType__17J3DColorBlockNullFv
|
||||
.4byte setMatColor__13J3DColorBlockFUlPC10J3DGXColor
|
||||
.4byte setMatColor__13J3DColorBlockFUl10J3DGXColor
|
||||
.4byte getMatColor__13J3DColorBlockFUl
|
||||
.4byte setAmbColor__13J3DColorBlockFUlPC10J3DGXColor
|
||||
.4byte setAmbColor__13J3DColorBlockFUl10J3DGXColor
|
||||
.4byte getAmbColor__13J3DColorBlockFUl
|
||||
.4byte setColorChanNum__13J3DColorBlockFUc
|
||||
.4byte setColorChanNum__13J3DColorBlockFPCUc
|
||||
.4byte getColorChanNum__13J3DColorBlockCFv
|
||||
.4byte setColorChan__13J3DColorBlockFUlRC12J3DColorChan
|
||||
.4byte setColorChan__13J3DColorBlockFUlPC12J3DColorChan
|
||||
.4byte getColorChan__13J3DColorBlockFUl
|
||||
.4byte setLight__13J3DColorBlockFUlP11J3DLightObj
|
||||
.4byte getLight__13J3DColorBlockFUl
|
||||
.4byte setCullMode__13J3DColorBlockFPCUc
|
||||
.4byte setCullMode__13J3DColorBlockFUc
|
||||
.4byte getCullMode__13J3DColorBlockCFv
|
||||
.4byte getMatColorOffset__13J3DColorBlockCFv
|
||||
.4byte getColorChanOffset__13J3DColorBlockCFv
|
||||
.4byte setMatColorOffset__13J3DColorBlockFUl
|
||||
.4byte setColorChanOffset__13J3DColorBlockFUl
|
||||
.4byte __dt__17J3DColorBlockNullFv
|
||||
.4byte 0
|
||||
*/
|
||||
|
||||
struct J3DColorBlock {
|
||||
virtual void load(); // _08 (weak)
|
||||
virtual void reset(J3DColorBlock*); // _0C (weak)
|
||||
virtual void patch(); // _10 (weak)
|
||||
virtual void patchMatColor(); // _14 (weak)
|
||||
virtual void patchLight(); // _18 (weak)
|
||||
virtual void diff(unsigned long); // _1C (weak)
|
||||
virtual void diffMatColor(); // _20 (weak)
|
||||
virtual void diffLight(); // _24 (weak)
|
||||
virtual void countDLSize(); // _28 (weak)
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual void setMatColor(unsigned long, const J3DGXColor*); // _30 (weak)
|
||||
virtual void setMatColor(unsigned long, J3DGXColor); // _34 (weak)
|
||||
virtual void getMatColor(unsigned long); // _38 (weak)
|
||||
virtual void setAmbColor(unsigned long, const J3DGXColor*); // _3C (weak)
|
||||
virtual void setAmbColor(unsigned long, J3DGXColor); // _40 (weak)
|
||||
virtual void getAmbColor(unsigned long); // _44 (weak)
|
||||
virtual void setColorChanNum(unsigned char); // _48 (weak)
|
||||
virtual void setColorChanNum(const unsigned char*); // _4C (weak)
|
||||
virtual void getColorChanNum() const; // _50 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan&); // _54 (weak)
|
||||
virtual void setColorChan(unsigned long, const J3DColorChan*); // _58 (weak)
|
||||
virtual void getColorChan(unsigned long); // _5C (weak)
|
||||
virtual void setLight(unsigned long, J3DLightObj*); // _60 (weak)
|
||||
virtual void getLight(unsigned long); // _64 (weak)
|
||||
virtual void setCullMode(const unsigned char*); // _68 (weak)
|
||||
virtual void setCullMode(unsigned char); // _6C (weak)
|
||||
virtual void getCullMode() const; // _70 (weak)
|
||||
virtual void getMatColorOffset() const; // _74 (weak)
|
||||
virtual void getColorChanOffset() const; // _78 (weak)
|
||||
virtual void setMatColorOffset(unsigned long); // _7C (weak)
|
||||
virtual void setColorChanOffset(unsigned long); // _80 (weak)
|
||||
};
|
||||
|
||||
struct J3DColorBlockNull : public J3DColorBlock {
|
||||
virtual void getType(); // _2C (weak)
|
||||
virtual ~J3DColorBlockNull(); // _84 (weak)
|
||||
virtual void _88() = 0; // _88
|
||||
};
|
||||
|
||||
#endif
|
@ -1,18 +0,0 @@
|
||||
#ifndef _J3DFRAMECTRL_H
|
||||
#define _J3DFRAMECTRL_H
|
||||
|
||||
/*
|
||||
__vt__12J3DFrameCtrl:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__12J3DFrameCtrlFv
|
||||
*/
|
||||
|
||||
struct J3DFrameCtrl {
|
||||
virtual ~J3DFrameCtrl(); // _08 (weak)
|
||||
|
||||
void init(short);
|
||||
void update();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,47 +0,0 @@
|
||||
#ifndef _J3DINDBLOCK_H
|
||||
#define _J3DINDBLOCK_H
|
||||
|
||||
/*
|
||||
__vt__11J3DIndBlock:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte reset__11J3DIndBlockFP11J3DIndBlock
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte countDLSize__11J3DIndBlockFv
|
||||
.4byte 0
|
||||
.4byte setIndTexStageNum__11J3DIndBlockFUc
|
||||
.4byte getIndTexStageNum__11J3DIndBlockCFv
|
||||
.4byte setIndTexOrder__11J3DIndBlockFUl14J3DIndTexOrder
|
||||
.4byte setIndTexOrder__11J3DIndBlockFUlPC14J3DIndTexOrder
|
||||
.4byte getIndTexOrder__11J3DIndBlockFUl
|
||||
.4byte setIndTexMtx__11J3DIndBlockFUlPC12J3DIndTexMtx
|
||||
.4byte setIndTexMtx__11J3DIndBlockFUl12J3DIndTexMtx
|
||||
.4byte getIndTexMtx__11J3DIndBlockFUl
|
||||
.4byte setIndTexCoordScale__11J3DIndBlockFUlPC19J3DIndTexCoordScale
|
||||
.4byte setIndTexCoordScale__11J3DIndBlockFUl19J3DIndTexCoordScale
|
||||
.4byte getIndTexCoordScale__11J3DIndBlockFUl
|
||||
.4byte __dt__11J3DIndBlockFv
|
||||
*/
|
||||
|
||||
struct J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08 (weak)
|
||||
virtual void _0C() = 0; // _0C
|
||||
virtual void _10() = 0; // _10
|
||||
virtual void countDLSize(); // _14 (weak)
|
||||
virtual void _18() = 0; // _18
|
||||
virtual void setIndTexStageNum(unsigned char); // _1C (weak)
|
||||
virtual void getIndTexStageNum() const; // _20 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, J3DIndTexOrder); // _24 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, const J3DIndTexOrder*); // _28 (weak)
|
||||
virtual void getIndTexOrder(unsigned long); // _2C (weak)
|
||||
virtual void setIndTexMtx(unsigned long, const J3DIndTexMtx*); // _30 (weak)
|
||||
virtual void setIndTexMtx(unsigned long, J3DIndTexMtx); // _34 (weak)
|
||||
virtual void getIndTexMtx(unsigned long); // _38 (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*); // _3C (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, J3DIndTexCoordScale); // _40 (weak)
|
||||
virtual void getIndTexCoordScale(unsigned long); // _44 (weak)
|
||||
virtual ~J3DIndBlock(); // _48 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,49 +0,0 @@
|
||||
#ifndef _J3DINDBLOCKFULL_H
|
||||
#define _J3DINDBLOCKFULL_H
|
||||
|
||||
/*
|
||||
__vt__15J3DIndBlockFull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte reset__15J3DIndBlockFullFP11J3DIndBlock
|
||||
.4byte diff__15J3DIndBlockFullFUl
|
||||
.4byte load__15J3DIndBlockFullFv
|
||||
.4byte countDLSize__15J3DIndBlockFullFv
|
||||
.4byte getType__15J3DIndBlockFullFv
|
||||
.4byte setIndTexStageNum__15J3DIndBlockFullFUc
|
||||
.4byte getIndTexStageNum__15J3DIndBlockFullCFv
|
||||
.4byte setIndTexOrder__15J3DIndBlockFullFUl14J3DIndTexOrder
|
||||
.4byte setIndTexOrder__15J3DIndBlockFullFUlPC14J3DIndTexOrder
|
||||
.4byte getIndTexOrder__15J3DIndBlockFullFUl
|
||||
.4byte setIndTexMtx__15J3DIndBlockFullFUlPC12J3DIndTexMtx
|
||||
.4byte setIndTexMtx__15J3DIndBlockFullFUl12J3DIndTexMtx
|
||||
.4byte getIndTexMtx__15J3DIndBlockFullFUl
|
||||
.4byte setIndTexCoordScale__15J3DIndBlockFullFUlPC19J3DIndTexCoordScale
|
||||
.4byte setIndTexCoordScale__15J3DIndBlockFullFUl19J3DIndTexCoordScale
|
||||
.4byte getIndTexCoordScale__15J3DIndBlockFullFUl
|
||||
.4byte __dt__15J3DIndBlockFullFv
|
||||
*/
|
||||
|
||||
struct J3DIndBlockFull {
|
||||
virtual void reset(J3DIndBlock*); // _08
|
||||
virtual void diff(unsigned long); // _0C
|
||||
virtual void load(); // _10
|
||||
virtual void countDLSize(); // _14
|
||||
virtual void getType(); // _18 (weak)
|
||||
virtual void setIndTexStageNum(unsigned char); // _1C (weak)
|
||||
virtual void getIndTexStageNum() const; // _20 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, J3DIndTexOrder); // _24 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, const J3DIndTexOrder*); // _28 (weak)
|
||||
virtual void getIndTexOrder(unsigned long); // _2C (weak)
|
||||
virtual void setIndTexMtx(unsigned long, const J3DIndTexMtx*); // _30 (weak)
|
||||
virtual void setIndTexMtx(unsigned long, J3DIndTexMtx); // _34 (weak)
|
||||
virtual void getIndTexMtx(unsigned long); // _38 (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*); // _3C (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, J3DIndTexCoordScale); // _40 (weak)
|
||||
virtual void getIndTexCoordScale(unsigned long); // _44 (weak)
|
||||
virtual ~J3DIndBlockFull(); // _48 (weak)
|
||||
|
||||
void initialize();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,54 +0,0 @@
|
||||
#ifndef _J3DINDBLOCKNULL_H
|
||||
#define _J3DINDBLOCKNULL_H
|
||||
|
||||
/*
|
||||
__vt__15J3DIndBlockNull:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte reset__15J3DIndBlockNullFP11J3DIndBlock
|
||||
.4byte diff__15J3DIndBlockNullFUl
|
||||
.4byte load__15J3DIndBlockNullFv
|
||||
.4byte countDLSize__11J3DIndBlockFv
|
||||
.4byte getType__15J3DIndBlockNullFv
|
||||
.4byte setIndTexStageNum__11J3DIndBlockFUc
|
||||
.4byte getIndTexStageNum__11J3DIndBlockCFv
|
||||
.4byte setIndTexOrder__11J3DIndBlockFUl14J3DIndTexOrder
|
||||
.4byte setIndTexOrder__11J3DIndBlockFUlPC14J3DIndTexOrder
|
||||
.4byte getIndTexOrder__11J3DIndBlockFUl
|
||||
.4byte setIndTexMtx__11J3DIndBlockFUlPC12J3DIndTexMtx
|
||||
.4byte setIndTexMtx__11J3DIndBlockFUl12J3DIndTexMtx
|
||||
.4byte getIndTexMtx__11J3DIndBlockFUl
|
||||
.4byte setIndTexCoordScale__11J3DIndBlockFUlPC19J3DIndTexCoordScale
|
||||
.4byte setIndTexCoordScale__11J3DIndBlockFUl19J3DIndTexCoordScale
|
||||
.4byte getIndTexCoordScale__11J3DIndBlockFUl
|
||||
.4byte __dt__15J3DIndBlockNullFv
|
||||
*/
|
||||
|
||||
struct J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08 (weak)
|
||||
virtual void diff(unsigned long); // _0C (weak)
|
||||
virtual void load(); // _10 (weak)
|
||||
virtual void countDLSize(); // _14 (weak)
|
||||
virtual void getType(); // _18 (weak)
|
||||
virtual void setIndTexStageNum(unsigned char); // _1C (weak)
|
||||
virtual void getIndTexStageNum() const; // _20 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, J3DIndTexOrder); // _24 (weak)
|
||||
virtual void setIndTexOrder(unsigned long, const J3DIndTexOrder*); // _28 (weak)
|
||||
virtual void getIndTexOrder(unsigned long); // _2C (weak)
|
||||
virtual void setIndTexMtx(unsigned long, const J3DIndTexMtx*); // _30 (weak)
|
||||
virtual void setIndTexMtx(unsigned long, J3DIndTexMtx); // _34 (weak)
|
||||
virtual void getIndTexMtx(unsigned long); // _38 (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, const J3DIndTexCoordScale*); // _3C (weak)
|
||||
virtual void setIndTexCoordScale(unsigned long, J3DIndTexCoordScale); // _40 (weak)
|
||||
virtual void getIndTexCoordScale(unsigned long); // _44 (weak)
|
||||
};
|
||||
|
||||
struct J3DIndBlockNull : public J3DIndBlock {
|
||||
virtual void reset(J3DIndBlock*); // _08 (weak)
|
||||
virtual void diff(unsigned long); // _0C (weak)
|
||||
virtual void load(); // _10 (weak)
|
||||
virtual void getType(); // _18 (weak)
|
||||
virtual ~J3DIndBlockNull(); // _48 (weak)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,64 +0,0 @@
|
||||
#ifndef _J3DMODELLOADER_H
|
||||
#define _J3DMODELLOADER_H
|
||||
|
||||
/*
|
||||
__vt__14J3DModelLoader:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte load__14J3DModelLoaderFPCvUl
|
||||
.4byte loadMaterialTable__14J3DModelLoaderFPCv
|
||||
.4byte loadBinaryDisplayList__14J3DModelLoaderFPCvUl
|
||||
.4byte calcLoadSize__14J3DModelLoaderFPCvUl
|
||||
.4byte calcLoadMaterialTableSize__14J3DModelLoaderFPCv
|
||||
.4byte calcLoadBinaryDisplayListSize__14J3DModelLoaderFPCvUl
|
||||
.4byte countMaterialNum__14J3DModelLoaderFPCv
|
||||
.4byte setupBBoardInfo__14J3DModelLoaderFv
|
||||
.4byte __dt__14J3DModelLoaderFv
|
||||
.4byte readMaterial__14J3DModelLoaderFPC16J3DMaterialBlockUl
|
||||
.4byte readMaterial_v21__14J3DModelLoaderFPC20J3DMaterialBlock_v21Ul
|
||||
.4byte readMaterialTable__14J3DModelLoaderFPC16J3DMaterialBlockUl
|
||||
.4byte readMaterialTable_v21__14J3DModelLoaderFPC20J3DMaterialBlock_v21Ul
|
||||
.4byte calcSizeMaterial__14J3DModelLoaderFPC16J3DMaterialBlockUl
|
||||
.4byte calcSizeMaterialTable__14J3DModelLoaderFPC16J3DMaterialBlockUl
|
||||
*/
|
||||
|
||||
struct J3DModelLoader {
|
||||
virtual void load(const void*, unsigned long); // _08
|
||||
virtual void loadMaterialTable(const void*); // _0C
|
||||
virtual void loadBinaryDisplayList(const void*, unsigned long); // _10
|
||||
virtual void calcLoadSize(const void*, unsigned long); // _14
|
||||
virtual void calcLoadMaterialTableSize(const void*); // _18
|
||||
virtual void calcLoadBinaryDisplayListSize(const void*, unsigned long); // _1C
|
||||
virtual void countMaterialNum(const void*); // _20
|
||||
virtual void setupBBoardInfo(); // _24
|
||||
virtual ~J3DModelLoader(); // _28 (weak)
|
||||
virtual void readMaterial(const J3DMaterialBlock*, unsigned long); // _2C (weak)
|
||||
virtual void readMaterial_v21(const J3DMaterialBlock_v21*, unsigned long); // _30 (weak)
|
||||
virtual void readMaterialTable(const J3DMaterialBlock*, unsigned long); // _34 (weak)
|
||||
virtual void readMaterialTable_v21(const J3DMaterialBlock_v21*, unsigned long); // _38 (weak)
|
||||
virtual void calcSizeMaterial(const J3DMaterialBlock*, unsigned long); // _3C (weak)
|
||||
virtual void calcSizeMaterialTable(const J3DMaterialBlock*, unsigned long); // _40 (weak)
|
||||
|
||||
void readInformation(const J3DModelInfoBlock*, unsigned long);
|
||||
void readVertex(const J3DVertexBlock*);
|
||||
void readEnvelop(const J3DEnvelopeBlock*);
|
||||
void readDraw(const J3DDrawBlock*);
|
||||
void readJoint(const J3DJointBlock*);
|
||||
void readShape(const J3DShapeBlock*, unsigned long);
|
||||
void readTexture(const J3DTextureBlock*);
|
||||
void readTextureTable(const J3DTextureBlock*);
|
||||
void readPatchedMaterial(const J3DMaterialBlock*, unsigned long);
|
||||
void readMaterialDL(const J3DMaterialDLBlock*, unsigned long);
|
||||
void modifyMaterial(unsigned long);
|
||||
void calcSizeInformation(const J3DModelInfoBlock*, unsigned long);
|
||||
void calcSizeJoint(const J3DJointBlock*);
|
||||
void calcSizeEnvelope(const J3DEnvelopeBlock*);
|
||||
void calcSizeDraw(const J3DDrawBlock*);
|
||||
void calcSizeShape(const J3DShapeBlock*, unsigned long);
|
||||
void calcSizeTexture(const J3DTextureBlock*);
|
||||
void calcSizeTextureTable(const J3DTextureBlock*);
|
||||
void calcSizePatchedMaterial(const J3DMaterialBlock*, unsigned long);
|
||||
void calcSizeMaterialDL(const J3DMaterialDLBlock*, unsigned long);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,71 +0,0 @@
|
||||
#ifndef _J3DPEBLOCK_H
|
||||
#define _J3DPEBLOCK_H
|
||||
|
||||
/*
|
||||
__vt__10J3DPEBlock:
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte reset__10J3DPEBlockFP10J3DPEBlock
|
||||
.4byte 0
|
||||
.4byte patch__10J3DPEBlockFv
|
||||
.4byte diff__10J3DPEBlockFUl
|
||||
.4byte diffFog__10J3DPEBlockFv
|
||||
.4byte diffBlend__10J3DPEBlockFv
|
||||
.4byte countDLSize__10J3DPEBlockFv
|
||||
.4byte 0
|
||||
.4byte setFog__10J3DPEBlockF6J3DFog
|
||||
.4byte setFog__10J3DPEBlockFP6J3DFog
|
||||
.4byte getFog__10J3DPEBlockFv
|
||||
.4byte setAlphaComp__10J3DPEBlockFPC12J3DAlphaComp
|
||||
.4byte setAlphaComp__10J3DPEBlockFRC12J3DAlphaComp
|
||||
.4byte getAlphaComp__10J3DPEBlockFv
|
||||
.4byte setBlend__10J3DPEBlockFPC8J3DBlend
|
||||
.4byte setBlend__10J3DPEBlockFRC8J3DBlend
|
||||
.4byte getBlend__10J3DPEBlockFv
|
||||
.4byte setZMode__10J3DPEBlockFPC8J3DZMode
|
||||
.4byte setZMode__10J3DPEBlockF8J3DZMode
|
||||
.4byte getZMode__10J3DPEBlockFv
|
||||
.4byte setZCompLoc__10J3DPEBlockFPCUc
|
||||
.4byte setZCompLoc__10J3DPEBlockFUc
|
||||
.4byte getZCompLoc__10J3DPEBlockCFv
|
||||
.4byte setDither__10J3DPEBlockFPCUc
|
||||
.4byte setDither__10J3DPEBlockFUc
|
||||
.4byte getDither__10J3DPEBlockCFv
|
||||
.4byte getFogOffset__10J3DPEBlockCFv
|
||||
.4byte setFogOffset__10J3DPEBlockFUl
|
||||
.4byte __dt__10J3DPEBlockFv
|
||||
*/
|
||||
|
||||
struct J3DPEBlock {
|
||||
virtual void reset(J3DPEBlock*); // _08 (weak)
|
||||
virtual void _0C() = 0; // _0C
|
||||
virtual void patch(); // _10 (weak)
|
||||
virtual void diff(unsigned long); // _14 (weak)
|
||||
virtual void diffFog(); // _18 (weak)
|
||||
virtual void diffBlend(); // _1C (weak)
|
||||
virtual void countDLSize(); // _20 (weak)
|
||||
virtual void _24() = 0; // _24
|
||||
virtual void setFog(J3DFog); // _28 (weak)
|
||||
virtual void setFog(J3DFog*); // _2C (weak)
|
||||
virtual void getFog(); // _30 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp*); // _34 (weak)
|
||||
virtual void setAlphaComp(const J3DAlphaComp&); // _38 (weak)
|
||||
virtual void getAlphaComp(); // _3C (weak)
|
||||
virtual void setBlend(const J3DBlend*); // _40 (weak)
|
||||
virtual void setBlend(const J3DBlend&); // _44 (weak)
|
||||
virtual void getBlend(); // _48 (weak)
|
||||
virtual void setZMode(const J3DZMode*); // _4C (weak)
|
||||
virtual void setZMode(J3DZMode); // _50 (weak)
|
||||
virtual void getZMode(); // _54 (weak)
|
||||
virtual void setZCompLoc(const unsigned char*); // _58 (weak)
|
||||
virtual void setZCompLoc(unsigned char); // _5C (weak)
|
||||
virtual void getZCompLoc() const; // _60 (weak)
|
||||
virtual void setDither(const unsigned char*); // _64 (weak)
|
||||
virtual void setDither(unsigned char); // _68 (weak)
|
||||
virtual void getDither() const; // _6C (weak)
|
||||
virtual void getFogOffset() const; // _70 (weak)
|
||||
virtual void setFogOffset(unsigned long); // _74 (weak)
|
||||
virtual ~J3DPEBlock(); // _78 (weak)
|
||||
};
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user