mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 13:08:33 -04:00
J3D setup (#155)
* setup j3d classes * remove asm * fixes * fix newDifferedDisplayList
This commit is contained in:
@@ -1,156 +1,122 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: J3DMaterialAnm
|
||||
//
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct _GXColorS10 {};
|
||||
|
||||
struct _GXColor {};
|
||||
|
||||
struct J3DTextureSRTInfo {};
|
||||
|
||||
struct J3DTexNoAnm {};
|
||||
|
||||
struct J3DTexMtxAnm {};
|
||||
|
||||
struct J3DTevKColorAnm {};
|
||||
|
||||
struct J3DTevColorAnm {};
|
||||
|
||||
struct J3DMaterial {};
|
||||
|
||||
struct J3DMatColorAnm {};
|
||||
|
||||
struct J3DMaterialAnm {
|
||||
/* 800A4820 */ ~J3DMaterialAnm();
|
||||
/* 8032C320 */ void initialize();
|
||||
/* 8032C3C4 */ void calc(J3DMaterial*) const;
|
||||
/* 8032C5A4 */ void setMatColorAnm(int, J3DMatColorAnm*);
|
||||
/* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*);
|
||||
/* 8032C624 */ void setTexNoAnm(int, J3DTexNoAnm*);
|
||||
/* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*);
|
||||
/* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*);
|
||||
};
|
||||
|
||||
struct J3DAnmTextureSRTKey {
|
||||
/* 80329F14 */ void calcTransform(f32, u16, J3DTextureSRTInfo*) const;
|
||||
};
|
||||
|
||||
struct J3DAnmTevRegKey {
|
||||
/* 8032B1F8 */ void getTevColorReg(u16, _GXColorS10*) const;
|
||||
/* 8032B4BC */ void getTevKonstReg(u16, _GXColor*) const;
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void initialize__14J3DMaterialAnmFv();
|
||||
extern "C" void calc__14J3DMaterialAnmCFP11J3DMaterial();
|
||||
extern "C" void setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm();
|
||||
extern "C" void setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm();
|
||||
extern "C" void setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm();
|
||||
extern "C" void setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm();
|
||||
extern "C" void setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm();
|
||||
extern "C" extern void* __vt__14J3DMaterialAnm[4];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__14J3DMaterialAnmFv();
|
||||
extern "C" void calcTransform__19J3DAnmTextureSRTKeyCFfUsP17J3DTextureSRTInfo();
|
||||
extern "C" void getTevColorReg__15J3DAnmTevRegKeyCFUsP11_GXColorS10();
|
||||
extern "C" void getTevKonstReg__15J3DAnmTevRegKeyCFUsP8_GXColor();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _restgpr_27();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 8032C320-8032C3C4 326C60 00A4+00 0/0 5/5 72/72 .text initialize__14J3DMaterialAnmFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::initialize() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/initialize__14J3DMaterialAnmFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
void J3DMaterialAnm::initialize() {
|
||||
for (int i = 0; i < ARRAY_SIZE(mMatColorAnm); i++) {
|
||||
mMatColorAnm[i].setAnmFlag(false);
|
||||
}
|
||||
|
||||
/* 8032C3C4-8032C5A4 326D04 01E0+00 1/0 4/4 2/2 .text calc__14J3DMaterialAnmCFP11J3DMaterial */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::calc(J3DMaterial* param_0) const {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/calc__14J3DMaterialAnmCFP11J3DMaterial.s"
|
||||
}
|
||||
#pragma pop
|
||||
for (int i = 0; i < ARRAY_SIZE(mTexNoAnm); i++) {
|
||||
mTexNoAnm[i].setAnmFlag(false);
|
||||
}
|
||||
|
||||
/* 8032C5A4-8032C5E4 326EE4 0040+00 0/0 2/2 0/0 .text
|
||||
* setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::setMatColorAnm(int param_0, J3DMatColorAnm* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setMatColorAnm__14J3DMaterialAnmFiP14J3DMatColorAnm.s"
|
||||
}
|
||||
#pragma pop
|
||||
for (int i = 0; i < ARRAY_SIZE(mTevColorAnm); i++) {
|
||||
mTevColorAnm[i].setAnmFlag(false);
|
||||
}
|
||||
|
||||
/* 8032C5E4-8032C624 326F24 0040+00 0/0 3/3 0/0 .text
|
||||
* setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::setTexMtxAnm(int param_0, J3DTexMtxAnm* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexMtxAnm__14J3DMaterialAnmFiP12J3DTexMtxAnm.s"
|
||||
}
|
||||
#pragma pop
|
||||
for (int i = 0; i < ARRAY_SIZE(mTevKColorAnm); i++) {
|
||||
mTevKColorAnm[i].setAnmFlag(false);
|
||||
}
|
||||
|
||||
/* 8032C624-8032C664 326F64 0040+00 0/0 2/2 0/0 .text
|
||||
* setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::setTexNoAnm(int param_0, J3DTexNoAnm* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTexNoAnm__14J3DMaterialAnmFiP11J3DTexNoAnm.s"
|
||||
for (int i = 0; i < ARRAY_SIZE(mTexMtxAnm); i++) {
|
||||
mTexMtxAnm[i].setAnmFlag(false);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8032C664-8032C6A4 326FA4 0040+00 0/0 3/3 0/0 .text
|
||||
* setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::setTevColorAnm(int param_0, J3DTevColorAnm* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevColorAnm__14J3DMaterialAnmFiP14J3DTevColorAnm.s"
|
||||
}
|
||||
#pragma pop
|
||||
void J3DMaterialAnm::calc(J3DMaterial* pMat) const {
|
||||
for (u32 i = 0; i < ARRAY_SIZE(mMatColorAnm); i++) {
|
||||
if (mMatColorAnm[i].getAnmFlag()) {
|
||||
_GXColor* color = pMat->getColorBlock()->getMatColor(i);
|
||||
mMatColorAnm[i].calc(color);
|
||||
}
|
||||
}
|
||||
|
||||
/* 8032C6A4-8032C6E4 326FE4 0040+00 0/0 3/3 0/0 .text
|
||||
* setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J3DMaterialAnm::setTevKColorAnm(int param_0, J3DTevKColorAnm* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAnm/setTevKColorAnm__14J3DMaterialAnmFiP15J3DTevKColorAnm.s"
|
||||
u16 tmp;
|
||||
for (u32 i = 0; i < ARRAY_SIZE(mTexNoAnm); i++) {
|
||||
if (mTexNoAnm[i].getAnmFlag()) {
|
||||
mTexNoAnm[i].calc(&tmp);
|
||||
pMat->getTevBlock()->setTexNo(i, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < 3; i++) {
|
||||
if (mTevColorAnm[i].getAnmFlag()) {
|
||||
_GXColorS10* color = pMat->getTevBlock()->getTevColor(i);
|
||||
mTevColorAnm[i].calc(color);
|
||||
}
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < ARRAY_SIZE(mTevKColorAnm); i++) {
|
||||
if (mTevKColorAnm[i].getAnmFlag()) {
|
||||
_GXColor* color = pMat->getTevBlock()->getTevKColor(i);
|
||||
mTevKColorAnm[i].calc(color);
|
||||
}
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < ARRAY_SIZE(mTexMtxAnm); i++) {
|
||||
if (mTexMtxAnm[i].getAnmFlag()) {
|
||||
J3DTexMtx* texMtx = pMat->getTexGenBlock()->getTexMtx(i);
|
||||
mTexMtxAnm[i].calc(&texMtx->getTexMtxInfo().field_0x10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void J3DMaterialAnm::setMatColorAnm(int idx, J3DMatColorAnm* p_matColorAnm) {
|
||||
if (p_matColorAnm == NULL) {
|
||||
mMatColorAnm[idx].setAnmFlag(false);
|
||||
} else {
|
||||
mMatColorAnm[idx] = *p_matColorAnm;
|
||||
}
|
||||
}
|
||||
|
||||
void J3DMaterialAnm::setTexMtxAnm(int idx, J3DTexMtxAnm* p_texMtxAnm) {
|
||||
if (p_texMtxAnm == NULL) {
|
||||
mTexMtxAnm[idx].setAnmFlag(false);
|
||||
} else {
|
||||
mTexMtxAnm[idx] = *p_texMtxAnm;
|
||||
}
|
||||
}
|
||||
|
||||
void J3DMaterialAnm::setTexNoAnm(int idx, J3DTexNoAnm* p_texNoAnm) {
|
||||
if (p_texNoAnm == NULL) {
|
||||
mTexNoAnm[idx].setAnmFlag(false);
|
||||
} else {
|
||||
mTexNoAnm[idx] = *p_texNoAnm;
|
||||
}
|
||||
}
|
||||
|
||||
void J3DMaterialAnm::setTevColorAnm(int idx, J3DTevColorAnm* p_tevColorAnm) {
|
||||
if (p_tevColorAnm == NULL) {
|
||||
mTevColorAnm[idx].setAnmFlag(false);
|
||||
} else {
|
||||
mTevColorAnm[idx] = *p_tevColorAnm;
|
||||
}
|
||||
}
|
||||
|
||||
void J3DMaterialAnm::setTevKColorAnm(int idx, J3DTevKColorAnm* p_tevKColorAnm) {
|
||||
if (p_tevKColorAnm == NULL) {
|
||||
mTevKColorAnm[idx].setAnmFlag(false);
|
||||
} else {
|
||||
mTevKColorAnm[idx] = *p_tevKColorAnm;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CEE60-803CEE70 02BF80 0010+00 0/0 10/10 74/74 .data __vt__14J3DMaterialAnm */
|
||||
|
||||
Reference in New Issue
Block a user