tp/libs/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp

211 lines
7.4 KiB
C++

//
// Generated By: dol2asm
// Translation Unit: J3DMaterialAttach
//
#include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h"
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
#include "JSystem/J3DGraphBase/J3DTevs.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Forward References:
//
extern "C" void clear__16J3DMaterialTableFv();
extern "C" void __ct__16J3DMaterialTableFv();
extern "C" void __dt__16J3DMaterialTableFv();
extern "C" void removeMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor();
extern "C" void removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern();
extern "C" void removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey();
extern "C" void removeTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey();
extern "C" void createTexMtxForAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey();
extern "C" void entryMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor();
extern "C" void entryTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern();
extern "C" void entryTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey();
extern "C" void entryTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey();
//
// External References:
//
extern "C" void* __nw__FUl();
extern "C" void __dl__FPv();
extern "C" void __as__13J3DTexMtxInfoFRC13J3DTexMtxInfo();
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" void _savegpr_22();
extern "C" void _savegpr_24();
extern "C" void _savegpr_26();
extern "C" void _savegpr_27();
extern "C" void _restgpr_22();
extern "C" void _restgpr_24();
extern "C" void _restgpr_26();
extern "C" void _restgpr_27();
extern "C" extern u8 const j3dDefaultTexMtxInfo[100];
extern "C" extern void* __vt__11J3DTexNoAnm[3];
//
// Declarations:
//
/* 8032F5A8-8032F5D0 329EE8 0028+00 0/0 1/1 0/0 .text clear__16J3DMaterialTableFv */
void J3DMaterialTable::clear() {
mMaterialNum = 0;
mUniqueMatNum = 0;
mMaterialNodePointer = NULL;
mMaterialName = NULL;
field_0x10 = 0;
mTexture = NULL;
mTextureName = NULL;
field_0x1c = 0;
}
/* ############################################################################################## */
/* 803CEE80-803CEE90 02BFA0 000C+04 2/2 0/0 0/0 .data __vt__16J3DMaterialTable */
SECTION_DATA extern void* __vt__16J3DMaterialTable[3 + 1 /* padding */] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__16J3DMaterialTableFv,
/* padding */
NULL,
};
/* 8032F5D0-8032F604 329F10 0034+00 0/0 2/2 0/0 .text __ct__16J3DMaterialTableFv */
J3DMaterialTable::J3DMaterialTable() {
mMaterialNum = 0;
mUniqueMatNum = 0;
mMaterialNodePointer = NULL;
mMaterialName = NULL;
field_0x10 = 0;
mTexture = NULL;
mTextureName = NULL;
field_0x1c = 0;
}
/* 8032F604-8032F64C 329F44 0048+00 1/0 1/1 0/0 .text __dt__16J3DMaterialTableFv */
J3DMaterialTable::~J3DMaterialTable() {}
/* 8032F64C-8032F6F8 329F8C 00AC+00 0/0 1/1 5/5 .text
* removeMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor */
#ifdef NONMATCHING
bool J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* pAnmColor) {
bool ret = false;
u16 updateMatNum = pAnmColor->getUpdateMaterialNum();
for (u16 i = 0; i < updateMatNum; i++) {
if (pAnmColor->isValidUpdateMaterialID(i)) {
u16 updateMatID = pAnmColor->getUpdateMaterialID(i);
J3DMaterial* materialNode = getMaterialNodePointer(i);
if (materialNode->getMaterialAnm() == NULL) {
ret = true;
} else {
materialNode->getMaterialAnm()->setMatColorAnm(0, NULL);
}
}
}
return ret;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm bool J3DMaterialTable::removeMatColorAnimator(J3DAnmColor* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor.s"
}
#pragma pop
#endif
/* 8032F6F8-8032F7B4 32A038 00BC+00 0/0 5/5 10/10 .text
* removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::removeTexNoAnimator(J3DAnmTexPattern* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern.s"
}
#pragma pop
/* 8032F7B4-8032F880 32A0F4 00CC+00 0/0 4/4 26/26 .text
* removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::removeTexMtxAnimator(J3DAnmTextureSRTKey* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey.s"
}
#pragma pop
/* 8032F880-8032F9C0 32A1C0 0140+00 0/0 7/7 24/24 .text
* removeTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::removeTevRegAnimator(J3DAnmTevRegKey* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/removeTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey.s"
}
#pragma pop
/* 8032F9C0-8032FAF4 32A300 0134+00 1/1 0/0 0/0 .text
* createTexMtxForAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::createTexMtxForAnimator(J3DAnmTextureSRTKey* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/createTexMtxForAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey.s"
}
#pragma pop
/* 8032FAF4-8032FBC8 32A434 00D4+00 0/0 1/1 0/0 .text
* entryMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::entryMatColorAnimator(J3DAnmColor* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/entryMatColorAnimator__16J3DMaterialTableFP11J3DAnmColor.s"
}
#pragma pop
/* 8032FBC8-8032FCC4 32A508 00FC+00 0/0 7/7 1/1 .text
* entryTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::entryTexNoAnimator(J3DAnmTexPattern* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/entryTexNoAnimator__16J3DMaterialTableFP16J3DAnmTexPattern.s"
}
#pragma pop
/* 8032FCC4-8032FE70 32A604 01AC+00 0/0 14/14 6/6 .text
* entryTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::entryTexMtxAnimator(J3DAnmTextureSRTKey* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/entryTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey.s"
}
#pragma pop
/* 8032FE70-8032FFEC 32A7B0 017C+00 0/0 10/10 4/4 .text
* entryTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J3DMaterialTable::entryTevRegAnimator(J3DAnmTevRegKey* param_0) {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DMaterialAttach/entryTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey.s"
}
#pragma pop