mirror of https://github.com/zeldaret/tp.git
1680 lines
64 KiB
C++
1680 lines
64 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: JPABaseShape
|
|
//
|
|
|
|
#include "JSystem/JParticle/JPABaseShape.h"
|
|
#include "JSystem/JParticle/JPAParticle.h"
|
|
#include "JSystem/JParticle/JPAEmitter.h"
|
|
#include "JSystem/JParticle/JPAResourceManager.h"
|
|
#include "JSystem/JMath/JMATrigonometric.h"
|
|
#include "dolphin/mtx/mtxvec.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/gx/GX.h"
|
|
#include "dolphin/types.h"
|
|
|
|
//
|
|
// Types:
|
|
//
|
|
|
|
struct JPAClrAnmKeyData {};
|
|
|
|
struct JKRHeap {
|
|
/* 802CE474 */ void alloc(u32, int, JKRHeap*);
|
|
};
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" void JPASetPointSize__FP18JPAEmitterWorkData();
|
|
extern "C" void JPASetLineWidth__FP18JPAEmitterWorkData();
|
|
extern "C" void JPASetPointSize__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPASetLineWidth__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPARegistPrm__FP18JPAEmitterWorkData();
|
|
extern "C" void JPARegistEnv__FP18JPAEmitterWorkData();
|
|
extern "C" void JPARegistPrmEnv__FP18JPAEmitterWorkData();
|
|
extern "C" void JPARegistAlpha__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPARegistPrmAlpha__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPARegistPrmAlphaEnv__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPARegistAlphaEnv__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPARegistEnv__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcClrIdxNormal__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcClrIdxNormal__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcClrIdxRepeat__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcClrIdxRepeat__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcClrIdxReverse__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcClrIdxReverse__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcClrIdxMerge__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcClrIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcClrIdxRandom__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcClrIdxRandom__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcPrm__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcPrm__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcEnv__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcEnv__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcColorCopy__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPAGenTexCrdMtxIdt__FP18JPAEmitterWorkData();
|
|
extern "C" void JPAGenTexCrdMtxAnm__FP18JPAEmitterWorkData();
|
|
extern "C" void JPAGenTexCrdMtxPrj__FP18JPAEmitterWorkData();
|
|
extern "C" void JPAGenCalcTexCrdMtxAnm__FP18JPAEmitterWorkData();
|
|
extern "C" void JPALoadCalcTexCrdMtxAnm__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPALoadTex__FP18JPAEmitterWorkData();
|
|
extern "C" void JPALoadTexAnm__FP18JPAEmitterWorkData();
|
|
extern "C" void JPALoadTexAnm__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcTexIdxNormal__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcTexIdxNormal__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcTexIdxRepeat__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcTexIdxRepeat__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcTexIdxReverse__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcTexIdxReverse__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcTexIdxMerge__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcTexIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPACalcTexIdxRandom__FP18JPAEmitterWorkData();
|
|
extern "C" void JPACalcTexIdxRandom__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPALoadPosMtxCam__FP18JPAEmitterWorkData();
|
|
extern "C" static void loadPrjAnm__FPC18JPAEmitterWorkDataPA4_Cf();
|
|
extern "C" void JPADrawBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawRotBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawRotYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void func_802782B4();
|
|
extern "C" void func_802782D0();
|
|
extern "C" void func_802782EC();
|
|
extern "C" void func_80278320();
|
|
extern "C" void func_8027833C();
|
|
extern "C" static void rotTypeY__FffRA3_A4_f();
|
|
extern "C" static void rotTypeX__FffRA3_A4_f();
|
|
extern "C" static void rotTypeZ__FffRA3_A4_f();
|
|
extern "C" static void rotTypeXYZ__FffRA3_A4_f();
|
|
extern "C" static void basePlaneTypeXY__FPA4_fff();
|
|
extern "C" static void basePlaneTypeXZ__FPA4_fff();
|
|
extern "C" static void basePlaneTypeX__FPA4_fff();
|
|
extern "C" void JPADrawDirection__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawRotDirection__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawDBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawRotation__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawPoint__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void JPADrawLine__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" void func_80279364();
|
|
extern "C" void func_8027936C();
|
|
extern "C" void JPADrawStripe__FP18JPAEmitterWorkData();
|
|
extern "C" void JPADrawStripeX__FP18JPAEmitterWorkData();
|
|
extern "C" void JPADrawEmitterCallBackB__FP18JPAEmitterWorkData();
|
|
extern "C" void JPADrawParticleCallBack__FP18JPAEmitterWorkDataP15JPABaseParticle();
|
|
extern "C" static void makeColorTable__FPP8_GXColorPC16JPAClrAnmKeyDataUcsP7JKRHeap();
|
|
extern "C" void __ct__12JPABaseShapeFPCUcP7JKRHeap();
|
|
extern "C" void setGX__12JPABaseShapeCFP18JPAEmitterWorkData();
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void func_8027EEB0();
|
|
extern "C" void alloc__7JKRHeapFUliP7JKRHeap();
|
|
extern "C" void load__10JUTTextureF11_GXTexMapID();
|
|
extern "C" void _savegpr_22();
|
|
extern "C" void _savegpr_24();
|
|
extern "C" void _savegpr_28();
|
|
extern "C" void _savegpr_29();
|
|
extern "C" void _restgpr_22();
|
|
extern "C" void _restgpr_24();
|
|
extern "C" void _restgpr_28();
|
|
extern "C" void _restgpr_29();
|
|
extern "C" u8 sincosTable___5JMath[65536];
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* ############################################################################################## */
|
|
/* 804552A8-804552B0 0038A8 0004+04 7/7 0/0 0/0 .sdata2 @2262 */
|
|
SECTION_SDATA2 static f32 lit_2262[1 + 1 /* padding */] = {
|
|
25.0f,
|
|
/* padding */
|
|
0.0f,
|
|
};
|
|
|
|
/* 80276A90-80276ACC 2713D0 003C+00 0/0 1/1 0/0 .text JPASetPointSize__FP18JPAEmitterWorkData */
|
|
void JPASetPointSize(JPAEmitterWorkData* work) {
|
|
GXSetPointSize((u8)(lit_2262[0] * work->mGlobalPtclScl.x), GX_TO_ONE);
|
|
}
|
|
|
|
/* 80276ACC-80276B08 27140C 003C+00 0/0 1/1 0/0 .text JPASetLineWidth__FP18JPAEmitterWorkData */
|
|
void JPASetLineWidth(JPAEmitterWorkData* work) {
|
|
GXSetLineWidth((u8)(lit_2262[0] * work->mGlobalPtclScl.x), GX_TO_ONE);
|
|
}
|
|
|
|
/* 80276B08-80276B4C 271448 0044+00 0/0 1/1 0/0 .text
|
|
* JPASetPointSize__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPASetPointSize(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
GXSetPointSize((u8)(lit_2262[0] * work->mGlobalPtclScl.x * ptcl->mParticleScaleX), GX_TO_ONE);
|
|
}
|
|
|
|
/* 80276B4C-80276B90 27148C 0044+00 0/0 1/1 0/0 .text
|
|
* JPASetLineWidth__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPASetLineWidth(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
GXSetLineWidth((u8)(lit_2262[0] * work->mGlobalPtclScl.x * ptcl->mParticleScaleX), GX_TO_ONE);
|
|
}
|
|
|
|
/* 80276B90-80276C2C 2714D0 009C+00 0/0 1/1 0/0 .text JPARegistPrm__FP18JPAEmitterWorkData */
|
|
void JPARegistPrm(JPAEmitterWorkData* work) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = emtr->mPrmClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
}
|
|
|
|
/* 80276C2C-80276CB0 27156C 0084+00 0/0 1/1 0/0 .text JPARegistEnv__FP18JPAEmitterWorkData */
|
|
void JPARegistEnv(JPAEmitterWorkData* work) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor env = emtr->mEnvClr;
|
|
env.r = COLOR_MULTI(env.r, emtr->mGlobalEnvClr.r);
|
|
env.g = COLOR_MULTI(env.g, emtr->mGlobalEnvClr.g);
|
|
env.b = COLOR_MULTI(env.b, emtr->mGlobalEnvClr.b);
|
|
GXSetTevColor(GX_TEVREG1, env);
|
|
}
|
|
|
|
/* 80276CB0-80276DB0 2715F0 0100+00 0/0 1/1 0/0 .text JPARegistPrmEnv__FP18JPAEmitterWorkData */
|
|
void JPARegistPrmEnv(JPAEmitterWorkData* work) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = emtr->mPrmClr;
|
|
GXColor env = emtr->mEnvClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
env.r = COLOR_MULTI(env.r, emtr->mGlobalEnvClr.r);
|
|
env.g = COLOR_MULTI(env.g, emtr->mGlobalEnvClr.g);
|
|
env.b = COLOR_MULTI(env.b, emtr->mGlobalEnvClr.b);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
GXSetTevColor(GX_TEVREG1, env);
|
|
}
|
|
|
|
/* 80276DB0-80276E60 2716F0 00B0+00 0/0 1/1 0/0 .text
|
|
* JPARegistAlpha__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPARegistAlpha(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = emtr->mPrmClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
prm.a = COLOR_MULTI(prm.a, ptcl->mPrmColorAlphaAnm);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
}
|
|
|
|
/* 80276E60-80276F10 2717A0 00B0+00 0/0 1/1 0/0 .text
|
|
* JPARegistPrmAlpha__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPARegistPrmAlpha(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = ptcl->mPrmClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
prm.a = COLOR_MULTI(prm.a, ptcl->mPrmColorAlphaAnm);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
}
|
|
|
|
/* 80276F10-80277024 271850 0114+00 0/0 1/1 0/0 .text
|
|
* JPARegistPrmAlphaEnv__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPARegistPrmAlphaEnv(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = ptcl->mPrmClr;
|
|
GXColor env = ptcl->mEnvClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
prm.a = COLOR_MULTI(prm.a, ptcl->mPrmColorAlphaAnm);
|
|
env.r = COLOR_MULTI(env.r, emtr->mGlobalEnvClr.r);
|
|
env.g = COLOR_MULTI(env.g, emtr->mGlobalEnvClr.g);
|
|
env.b = COLOR_MULTI(env.b, emtr->mGlobalEnvClr.b);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
GXSetTevColor(GX_TEVREG1, env);
|
|
}
|
|
|
|
/* 80277024-80277138 271964 0114+00 0/0 1/1 0/0 .text
|
|
* JPARegistAlphaEnv__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPARegistAlphaEnv(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor prm = emtr->mPrmClr;
|
|
GXColor env = ptcl->mEnvClr;
|
|
prm.r = COLOR_MULTI(prm.r, emtr->mGlobalPrmClr.r);
|
|
prm.g = COLOR_MULTI(prm.g, emtr->mGlobalPrmClr.g);
|
|
prm.b = COLOR_MULTI(prm.b, emtr->mGlobalPrmClr.b);
|
|
prm.a = COLOR_MULTI(prm.a, emtr->mGlobalPrmClr.a);
|
|
prm.a = COLOR_MULTI(prm.a, ptcl->mPrmColorAlphaAnm);
|
|
env.r = COLOR_MULTI(env.r, emtr->mGlobalEnvClr.r);
|
|
env.g = COLOR_MULTI(env.g, emtr->mGlobalEnvClr.g);
|
|
env.b = COLOR_MULTI(env.b, emtr->mGlobalEnvClr.b);
|
|
GXSetTevColor(GX_TEVREG0, prm);
|
|
GXSetTevColor(GX_TEVREG1, env);
|
|
}
|
|
|
|
/* 80277138-802771BC 271A78 0084+00 0/0 1/1 0/0 .text
|
|
* JPARegistEnv__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPARegistEnv(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
GXColor env = ptcl->mEnvClr;
|
|
env.r = COLOR_MULTI(env.r, emtr->mGlobalEnvClr.r);
|
|
env.g = COLOR_MULTI(env.g, emtr->mGlobalEnvClr.g);
|
|
env.b = COLOR_MULTI(env.b, emtr->mGlobalEnvClr.b);
|
|
GXSetTevColor(GX_TEVREG1, env);
|
|
}
|
|
|
|
/* 802771BC-802771E8 271AFC 002C+00 0/0 1/1 0/0 .text JPACalcClrIdxNormal__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcClrIdxNormal(JPAEmitterWorkData* work) {
|
|
JPABaseShape* bsp = work->mpRes->getBsp();
|
|
// can't get the extsh to appear in the right spot...
|
|
s16 keyFrame;
|
|
if (work->mpEmtr->mTick < bsp->getClrAnmMaxFrm()) {
|
|
keyFrame = work->mpEmtr->mTick;
|
|
} else {
|
|
keyFrame = bsp->getClrAnmMaxFrm();
|
|
}
|
|
work->mClrKeyFrame = keyFrame;
|
|
}
|
|
|
|
/* 802771E8-80277210 271B28 0028+00 0/0 1/1 0/0 .text
|
|
* JPACalcClrIdxNormal__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcClrIdxNormal(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s16 age = param_1->mAge;
|
|
s16 maxFrm = shape->getClrAnmMaxFrm();
|
|
s16 keyFrame;
|
|
if (age < maxFrm) {
|
|
keyFrame = age;
|
|
} else {
|
|
keyFrame = maxFrm;
|
|
}
|
|
work->mClrKeyFrame = keyFrame;
|
|
}
|
|
|
|
/* 80277210-80277240 271B50 0030+00 0/0 1/1 0/0 .text JPACalcClrIdxRepeat__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcClrIdxRepeat(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
work->mClrKeyFrame = work->mpEmtr->mTick % (shape->getClrAnmMaxFrm() + 1);
|
|
}
|
|
|
|
/* 80277240-8027727C 271B80 003C+00 0/0 1/1 0/0 .text
|
|
* JPACalcClrIdxRepeat__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcClrIdxRepeat(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 tick = shape->getClrLoopOfst(param_1->mAnmRandom);
|
|
tick = param_1->mAge + tick;
|
|
work->mClrKeyFrame = tick % (shape->getClrAnmMaxFrm() + 1);
|
|
}
|
|
|
|
/* 8027727C-802772BC 271BBC 0040+00 0/0 1/1 0/0 .text JPACalcClrIdxReverse__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcClrIdxReverse(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
int maxFrm = shape->getClrAnmMaxFrm();
|
|
u32 tick = work->mpEmtr->mTick;
|
|
u32 uVar1 = tick / maxFrm;
|
|
tick = tick % maxFrm;
|
|
uVar1 &= 1;
|
|
work->mClrKeyFrame = tick + (uVar1) * (maxFrm - tick * 2);
|
|
}
|
|
|
|
/* 802772BC-80277308 271BFC 004C+00 0/0 1/1 0/0 .text
|
|
* JPACalcClrIdxReverse__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcClrIdxReverse(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 tick = param_1->mAge + shape->getClrLoopOfst(param_1->mAnmRandom);
|
|
s32 maxFrm = shape->getClrAnmMaxFrm();
|
|
s32 rem = tick % maxFrm;
|
|
work->mClrKeyFrame = rem + ((tick / maxFrm) & 1) * (maxFrm - rem * 2);
|
|
}
|
|
|
|
/* 80277308-80277314 271C48 000C+00 0/0 1/1 0/0 .text JPACalcClrIdxMerge__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcClrIdxMerge(JPAEmitterWorkData* work) {
|
|
work->mClrKeyFrame = 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 804552B0-804552B8 0038B0 0008+00 4/4 0/0 0/0 .sdata2 @2623 */
|
|
SECTION_SDATA2 static f64 lit_2623 = 4503601774854144.0 /* cast s32 to float */;
|
|
|
|
/* 80277314-80277384 271C54 0070+00 0/0 1/1 0/0 .text
|
|
* JPACalcClrIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPACalcClrIdxMerge(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 maxFrm = shape->getClrAnmMaxFrm() + 1;
|
|
s32 tick = (s32)(param_1->mTime * maxFrm) + shape->getClrLoopOfst(param_1->mAnmRandom);
|
|
work->mClrKeyFrame = tick % maxFrm;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPACalcClrIdxMerge(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPACalcClrIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80277384-80277390 271CC4 000C+00 0/0 1/1 0/0 .text JPACalcClrIdxRandom__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcClrIdxRandom(JPAEmitterWorkData* work) {
|
|
work->mClrKeyFrame = 0;
|
|
}
|
|
|
|
/* 80277390-802773C4 271CD0 0034+00 0/0 1/1 0/0 .text
|
|
* JPACalcClrIdxRandom__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcClrIdxRandom(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 tick = shape->getClrLoopOfst(param_1->mAnmRandom);
|
|
s32 maxFrm = shape->getClrAnmMaxFrm() + 1;
|
|
work->mClrKeyFrame = tick % maxFrm;
|
|
}
|
|
|
|
/* 802773C4-80277404 271D04 0040+00 0/0 1/1 0/0 .text JPACalcPrm__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcPrm(JPAEmitterWorkData* work) {
|
|
work->mpRes->getBsp()->getPrmClr(work->mClrKeyFrame, &work->mpEmtr->mPrmClr);
|
|
}
|
|
|
|
/* 80277404-80277440 271D44 003C+00 0/0 1/1 0/0 .text
|
|
* JPACalcPrm__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcPrm(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
work->mpRes->getBsp()->getPrmClr(work->mClrKeyFrame, &ptcl->mPrmClr);
|
|
}
|
|
|
|
/* 80277440-80277480 271D80 0040+00 0/0 1/1 0/0 .text JPACalcEnv__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcEnv(JPAEmitterWorkData* work) {
|
|
work->mpRes->getBsp()->getEnvClr(work->mClrKeyFrame, &work->mpEmtr->mEnvClr);
|
|
}
|
|
|
|
/* 80277480-802774BC 271DC0 003C+00 0/0 1/1 0/0 .text
|
|
* JPACalcEnv__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcEnv(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
work->mpRes->getBsp()->getEnvClr(work->mClrKeyFrame, &ptcl->mEnvClr);
|
|
}
|
|
|
|
/* 802774BC-80277504 271DFC 0048+00 0/0 1/1 0/0 .text
|
|
* JPACalcColorCopy__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcColorCopy(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
JPABaseEmitter* emtr = work->mpEmtr;
|
|
ptcl->mPrmClr = emtr->mPrmClr;
|
|
ptcl->mEnvClr = emtr->mEnvClr;
|
|
}
|
|
|
|
/* 80277504-8027753C 271E44 0038+00 0/0 1/1 0/0 .text JPAGenTexCrdMtxIdt__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPAGenTexCrdMtxIdt(JPAEmitterWorkData* param_0) {
|
|
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE, GX_PTIDENTITY);
|
|
}
|
|
|
|
/* 8027753C-80277574 271E7C 0038+00 0/0 1/1 0/0 .text JPAGenTexCrdMtxAnm__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPAGenTexCrdMtxAnm(JPAEmitterWorkData* param_0) {
|
|
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX0, GX_FALSE, GX_PTIDENTITY);
|
|
}
|
|
|
|
/* 80277574-802775AC 271EB4 0038+00 0/0 1/1 0/0 .text JPAGenTexCrdMtxPrj__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPAGenTexCrdMtxPrj(JPAEmitterWorkData* param_0) {
|
|
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX3x4, GX_TG_POS, GX_TEXMTX0, GX_FALSE, GX_PTIDENTITY);
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 804552B8-804552BC 0038B8 0004+00 9/9 0/0 0/0 .sdata2 @2740 */
|
|
SECTION_SDATA2 static f32 lit_2740 = 0.5f;
|
|
|
|
/* 804552BC-804552C0 0038BC 0004+00 14/14 0/0 0/0 .sdata2 @2741 */
|
|
SECTION_SDATA2 static f32 lit_2741 = 1.0f;
|
|
|
|
/* 804552C0-804552C8 0038C0 0004+04 19/19 0/0 0/0 .sdata2 @2742 */
|
|
SECTION_SDATA2 static f32 lit_2742[1 + 1 /* padding */] = {
|
|
0.0f,
|
|
/* padding */
|
|
0.0f,
|
|
};
|
|
|
|
/* 804552C8-804552D0 0038C8 0008+00 6/6 0/0 0/0 .sdata2 @2744 */
|
|
SECTION_SDATA2 static f64 lit_2744 = 4503599627370496.0 /* cast u32 to float */;
|
|
|
|
/* 802775AC-80277758 271EEC 01AC+00 0/0 1/1 0/0 .text
|
|
* JPAGenCalcTexCrdMtxAnm__FP18JPAEmitterWorkData */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPAGenCalcTexCrdMtxAnm(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
f32 dVar16 = work->mpEmtr->mTick;
|
|
f32 dVar15 = 0.5f * (1.0f + shape->getTilingS());
|
|
f32 dVar14 = 0.5f * (1.0f + shape->getTilingT());
|
|
f32 dVar11 = (dVar16 * shape->getIncTransX()) + shape->getInitTransX();
|
|
f32 dVar10 = (dVar16 * shape->getIncTransY()) + shape->getInitTransY();
|
|
f32 dVar13 = (dVar16 * shape->getIncScaleX()) + shape->getInitScaleX();
|
|
f32 dVar12 = (dVar16 * shape->getIncScaleY()) + shape->getInitScaleY();
|
|
s32 local_c0 = (dVar16 * shape->getIncRot()) + shape->getInitRot();
|
|
f32 dVar8 = JMASSin(local_c0);
|
|
f32 dVar9 = JMASCos(local_c0);
|
|
Mtx local_108;
|
|
local_108[0][0] = dVar13 * dVar9;
|
|
local_108[0][1] = -dVar13 * dVar8;
|
|
local_108[0][2] = 0.0f;
|
|
local_108[0][3] =
|
|
(dVar15 + (dVar13 * ((dVar8 * (dVar14 + dVar10)) - (dVar9 * (dVar15 + dVar11)))));
|
|
local_108[1][0] = dVar12 * dVar8;
|
|
local_108[1][1] = dVar12 * dVar9;
|
|
local_108[1][2] = 0.0f;
|
|
local_108[1][3] =
|
|
(dVar14 + (-dVar12 * ((dVar8 * (dVar15 + dVar11)) + (dVar9 * (dVar14 + dVar10)))));
|
|
local_108[2][0] = 0.0f;
|
|
local_108[2][1] = 0.0f;
|
|
local_108[2][2] = 1.0f;
|
|
local_108[2][3] = 0.0f;
|
|
GXLoadTexMtxImm(local_108, 0x1e, GX_MTX2x4);
|
|
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 0x1e, false, 0x7d);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPAGenCalcTexCrdMtxAnm(JPAEmitterWorkData* param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPAGenCalcTexCrdMtxAnm__FP18JPAEmitterWorkData.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80277758-802778EC 272098 0194+00 0/0 1/1 0/0 .text
|
|
* JPALoadCalcTexCrdMtxAnm__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPALoadCalcTexCrdMtxAnm(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
f32 dVar16 = param_1->mAge;
|
|
f32 dVar15 = 0.5f * (1.0f + shape->getTilingS());
|
|
f32 dVar14 = 0.5f * (1.0f + shape->getTilingT());
|
|
f32 dVar11 = (dVar16 * shape->getIncTransX()) + shape->getInitTransX();
|
|
f32 dVar10 = (dVar16 * shape->getIncTransY()) + shape->getInitTransY();
|
|
f32 dVar13 = (dVar16 * shape->getIncScaleX()) + shape->getInitScaleX();
|
|
f32 dVar12 = (dVar16 * shape->getIncScaleY()) + shape->getInitScaleY();
|
|
s32 local_c0 = (dVar16 * shape->getIncRot()) + shape->getInitRot();
|
|
f32 dVar8 = JMASSin(local_c0);
|
|
f32 dVar9 = JMASCos(local_c0);
|
|
Mtx local_108;
|
|
local_108[0][0] = dVar13 * dVar9;
|
|
local_108[0][1] = -dVar13 * dVar8;
|
|
local_108[0][2] = 0.0f;
|
|
local_108[0][3] =
|
|
(dVar15 + (dVar13 * ((dVar8 * (dVar14 + dVar10)) - (dVar9 * (dVar15 + dVar11)))));
|
|
local_108[1][0] = dVar12 * dVar8;
|
|
local_108[1][1] = dVar12 * dVar9;
|
|
local_108[1][2] = 0.0f;
|
|
local_108[1][3] =
|
|
(dVar14 + (-dVar12 * ((dVar8 * (dVar15 + dVar11)) + (dVar9 * (dVar14 + dVar10)))));
|
|
local_108[2][0] = 0.0f;
|
|
local_108[2][1] = 0.0f;
|
|
local_108[2][2] = 1.0f;
|
|
local_108[2][3] = 0.0f;
|
|
GXLoadTexMtxImm(local_108, 0x1e, GX_MTX2x4);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPALoadCalcTexCrdMtxAnm(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPALoadCalcTexCrdMtxAnm__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 802778EC-80277940 27222C 0054+00 0/0 1/1 0/0 .text JPALoadTex__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPALoadTex(JPAEmitterWorkData* work) {
|
|
work->mpResMgr->load(work->mpRes->getTexIdx(work->mpRes->getBsp()->getTexIdx()), GX_TEXMAP0);
|
|
}
|
|
|
|
/* 80277940-80277990 272280 0050+00 0/0 1/1 0/0 .text JPALoadTexAnm__FP18JPAEmitterWorkData */
|
|
void JPALoadTexAnm(JPAEmitterWorkData* work) {
|
|
work->mpResMgr->load(work->mpRes->getTexIdx(work->mpEmtr->mTexAnmIdx), GX_TEXMAP0);
|
|
}
|
|
|
|
/* 80277990-802779DC 2722D0 004C+00 0/0 1/1 0/0 .text
|
|
* JPALoadTexAnm__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPALoadTexAnm(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
work->mpResMgr->load(work->mpRes->getTexIdx(ptcl->mTexAnmIdx), GX_TEXMAP0);
|
|
}
|
|
|
|
/* 802779DC-80277A18 27231C 003C+00 0/0 1/1 0/0 .text JPACalcTexIdxNormal__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcTexIdxNormal(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
u8 tick = shape->getTexAnmKeyNum() - 1 < work->mpEmtr->mTick ? shape->getTexAnmKeyNum() - 1 : work->mpEmtr->mTick;
|
|
work->mpEmtr->mTexAnmIdx = shape->getTexIdx(tick);
|
|
}
|
|
|
|
/* 80277A18-80277A50 272358 0038+00 0/0 1/1 0/0 .text
|
|
* JPACalcTexIdxNormal__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcTexIdxNormal(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
u8 tick = shape->getTexAnmKeyNum() - 1 < param_1->mAge ? shape->getTexAnmKeyNum() - 1 : param_1->mAge;
|
|
param_1->mTexAnmIdx = shape->getTexIdx(tick);
|
|
}
|
|
|
|
/* 80277A50-80277A88 272390 0038+00 0/0 1/1 0/0 .text JPACalcTexIdxRepeat__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcTexIdxRepeat(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
work->mpEmtr->mTexAnmIdx = shape->getTexIdx(work->mpEmtr->mTick % shape->getTexAnmKeyNum());
|
|
}
|
|
|
|
/* 80277A88-80277ACC 2723C8 0044+00 0/0 1/1 0/0 .text
|
|
* JPACalcTexIdxRepeat__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcTexIdxRepeat(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
param_1->mTexAnmIdx = shape->getTexIdx(((int)shape->getTexLoopOfst(param_1->mAnmRandom) + param_1->mAge) % shape->getTexAnmKeyNum());
|
|
}
|
|
|
|
/* 80277ACC-80277B1C 27240C 0050+00 0/0 1/1 0/0 .text JPACalcTexIdxReverse__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcTexIdxReverse(JPAEmitterWorkData* work) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
int tick = work->mpEmtr->mTick;
|
|
int keyNum = (int)shape->getTexAnmKeyNum() - 1;
|
|
int div = tick / keyNum;
|
|
int rem = tick % keyNum;
|
|
work->mpEmtr->mTexAnmIdx = shape->getTexIdx(rem + (div & 1) * (keyNum - rem * 2));
|
|
}
|
|
|
|
/* 80277B1C-80277B78 27245C 005C+00 0/0 1/1 0/0 .text
|
|
* JPACalcTexIdxReverse__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcTexIdxReverse(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 tick = shape->getTexLoopOfst(param_1->mAnmRandom) + param_1->mAge;
|
|
int keyNum = (int)shape->getTexAnmKeyNum() - 1;
|
|
int div = tick / keyNum;
|
|
int rem = tick % keyNum;
|
|
param_1->mTexAnmIdx = shape->getTexIdx(rem + (div & 1) * (keyNum - rem * 2));
|
|
}
|
|
|
|
/* 80277B78-80277B94 2724B8 001C+00 0/0 1/1 0/0 .text JPACalcTexIdxMerge__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcTexIdxMerge(JPAEmitterWorkData* work) {
|
|
work->mpEmtr->mTexAnmIdx = work->mpRes->getBsp()->getTexIdx();
|
|
}
|
|
|
|
/* 80277B94-80277C0C 2724D4 0078+00 0/0 1/1 0/0 .text
|
|
* JPACalcTexIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPACalcTexIdxMerge(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
s32 maxFrm = shape->getTexAnmKeyNum();
|
|
s32 tick = (s32)(maxFrm * param_1->mTime) + shape->getTexLoopOfst(param_1->mAnmRandom);
|
|
param_1->mTexAnmIdx = shape->getTexIdx(tick % maxFrm);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPACalcTexIdxMerge(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPACalcTexIdxMerge__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80277C0C-80277C28 27254C 001C+00 0/0 1/1 0/0 .text JPACalcTexIdxRandom__FP18JPAEmitterWorkData
|
|
*/
|
|
void JPACalcTexIdxRandom(JPAEmitterWorkData* work) {
|
|
work->mpEmtr->mTexAnmIdx = work->mpRes->getBsp()->getTexIdx();
|
|
}
|
|
|
|
/* 80277C28-80277C64 272568 003C+00 0/0 1/1 0/0 .text
|
|
* JPACalcTexIdxRandom__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPACalcTexIdxRandom(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
param_1->mTexAnmIdx = shape->getTexIdx(((int)shape->getTexLoopOfst(param_1->mAnmRandom)) % shape->getTexAnmKeyNum());
|
|
}
|
|
|
|
/* 80277C64-80277C8C 2725A4 0028+00 0/0 1/1 0/0 .text JPALoadPosMtxCam__FP18JPAEmitterWorkData */
|
|
void JPALoadPosMtxCam(JPAEmitterWorkData* work) {
|
|
GXLoadPosMtxImm(work->mPosCamMtx, GX_PNMTX0);
|
|
}
|
|
|
|
/* 80277C8C-80277C90 2725CC 0004+00 1/0 0/0 0/0 .text noLoadPrj__FPC18JPAEmitterWorkDataPA4_Cf */
|
|
static void noLoadPrj(JPAEmitterWorkData const* work, const Mtx srt) {
|
|
/* empty function */
|
|
}
|
|
|
|
/* 80277C90-80277CC8 2725D0 0038+00 1/0 0/0 0/0 .text loadPrj__FPC18JPAEmitterWorkDataPA4_Cf */
|
|
void loadPrj(JPAEmitterWorkData const* work, const Mtx srt) {
|
|
Mtx mtx;
|
|
MTXConcat(work->mPrjMtx, srt, mtx);
|
|
GXLoadTexMtxImm(mtx, GX_TEXMTX0, GX_MTX3x4);
|
|
}
|
|
|
|
/* 80277CC8-80277E88 272608 01C0+00 1/0 0/0 0/0 .text loadPrjAnm__FPC18JPAEmitterWorkDataPA4_Cf */
|
|
// Mathces with literals
|
|
#ifdef NONMATCHING
|
|
static void loadPrjAnm(JPAEmitterWorkData const* work, f32 const (*param_1)[4]) {
|
|
JPABaseShape* shape = work->mpRes->getBsp();
|
|
f32 dVar16 = work->mpEmtr->getAge();
|
|
f32 dVar15 = 0.5f * (1.0f + shape->getTilingS());
|
|
f32 dVar14 = 0.5f * (1.0f + shape->getTilingT());
|
|
f32 dVar11 = (dVar16 * shape->getIncTransX()) + shape->getInitTransX();
|
|
f32 dVar10 = (dVar16 * shape->getIncTransY()) + shape->getInitTransY();
|
|
f32 dVar13 = (dVar16 * shape->getIncScaleX()) + shape->getInitScaleX();
|
|
f32 dVar12 = (dVar16 * shape->getIncScaleY()) + shape->getInitScaleY();
|
|
s32 local_c0 = (dVar16 * shape->getIncRot()) + shape->getInitRot();
|
|
f32 dVar8 = JMASSin(local_c0);
|
|
f32 dVar9 = JMASCos(local_c0);
|
|
Mtx local_108;
|
|
local_108[0][0] = dVar13 * dVar9;
|
|
local_108[0][1] = -dVar13 * dVar8;
|
|
local_108[0][2] =
|
|
(dVar15 + (dVar13 * ((dVar8 * (dVar14 + dVar10)) - (dVar9 * (dVar15 + dVar11)))));
|
|
local_108[0][3] = 0.0f;
|
|
local_108[1][0] = dVar12 * dVar8;
|
|
local_108[1][1] = dVar12 * dVar9;
|
|
local_108[1][2] =
|
|
(dVar14 + (-dVar12 * ((dVar8 * (dVar15 + dVar11)) + (dVar9 * (dVar14 + dVar10)))));
|
|
local_108[1][3] = 0.0f;
|
|
local_108[2][0] = 0.0f;
|
|
local_108[2][1] = 0.0f;
|
|
local_108[2][2] = 1.0f;
|
|
local_108[2][3] = 0.0f;
|
|
MTXConcat(local_108, work->mPrjMtx, local_108);
|
|
MTXConcat(local_108, param_1, local_108);
|
|
GXLoadTexMtxImm(local_108, 0x1e, GX_MTX3x4);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void loadPrjAnm(JPAEmitterWorkData const* param_0, f32 const (*param_1)[4]) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/loadPrjAnm__FPC18JPAEmitterWorkDataPA4_Cf.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* ############################################################################################## */
|
|
/* 803C42E0-803C4300 021400 0020+00 10/9 0/0 0/0 .data jpa_dl */
|
|
SECTION_DATA static u8 jpa_dl[32] = {
|
|
0x80, 0x00, 0x04, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
|
|
/* 803C4300-803C4320 021420 0020+00 1/0 0/0 0/0 .data jpa_dl_x */
|
|
SECTION_DATA static u8 jpa_dl_x[32] = {
|
|
0x80, 0x00, 0x08, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x48, 0x00, 0x49, 0x01, 0x4A,
|
|
0x02, 0x4B, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
|
|
typedef void (*projectionFunc)(JPAEmitterWorkData const*, const Mtx);
|
|
|
|
/* 803C4320-803C432C -00001 000C+00 6/10 0/0 0/0 .data p_prj */
|
|
static projectionFunc p_prj[3] = {
|
|
noLoadPrj,
|
|
loadPrj,
|
|
loadPrjAnm,
|
|
};
|
|
|
|
/* 80277E88-80277F70 2727C8 00E8+00 0/0 1/1 0/0 .text
|
|
* JPADrawBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawBillboard(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_48;
|
|
MTXMultVec(work->mPosCamMtx, param_1->mPosition, local_48);
|
|
Mtx local_38;
|
|
local_38[0][0] = work->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
local_38[0][3] = local_48.x;
|
|
local_38[1][1] = work->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
local_38[1][3] = local_48.y;
|
|
local_38[2][2] = 1.0f;
|
|
local_38[2][3] = local_48.z;
|
|
local_38[2][1] = 0.0f;
|
|
local_38[2][0] = 0.0f;
|
|
local_38[1][2] = 0.0f;
|
|
local_38[1][0] = 0.0f;
|
|
local_38[0][2] = 0.0f;
|
|
local_38[0][1] = 0.0f;
|
|
GXLoadPosMtxImm(local_38, 0);
|
|
p_prj[work->mPrjType](work, local_38);
|
|
GXCallDisplayList(jpa_dl, sizeof(jpa_dl));
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80277F70-80278088 2728B0 0118+00 0/0 1/1 0/0 .text
|
|
* JPADrawRotBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawRotBillboard(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_48;
|
|
MTXMultVec(work->mPosCamMtx, param_1->mPosition, local_48);
|
|
f32 sinRot = JMASSin(param_1->mRotateAngle);
|
|
f32 cosRot = JMASCos(param_1->mRotateAngle);
|
|
f32 particleX = work->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 particleY = work->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
|
|
Mtx local_38;
|
|
local_38[0][0] = cosRot * particleX;
|
|
local_38[0][1] = -sinRot * particleY;
|
|
local_38[0][3] = local_48.x;
|
|
local_38[1][0] = sinRot * particleX;
|
|
local_38[1][1] = cosRot * particleY;
|
|
local_38[1][3] = local_48.y;
|
|
local_38[2][2] = 1.0f;
|
|
local_38[2][3] = local_48.z;
|
|
local_38[2][1] = 0.0f;
|
|
local_38[2][0] = 0.0f;
|
|
local_38[1][2] = 0.0f;
|
|
local_38[0][2] = 0.0f;
|
|
GXLoadPosMtxImm(local_38, 0);
|
|
p_prj[work->mPrjType](work, local_38);
|
|
GXCallDisplayList(jpa_dl, sizeof(jpa_dl));
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawRotBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawRotBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278088-80278184 2729C8 00FC+00 0/0 1/1 0/0 .text
|
|
* JPADrawYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawYBillboard(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_48;
|
|
MTXMultVec(work->mPosCamMtx, param_1->mPosition, local_48);
|
|
Mtx local_38;
|
|
f32 particleY = work->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
local_38[0][0] = work->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
local_38[0][3] = local_48.x;
|
|
local_38[1][1] = work->mYBBCamMtx[1][1] * particleY;
|
|
local_38[1][2] = work->mYBBCamMtx[1][2];
|
|
local_38[1][3] = local_48.y;
|
|
local_38[2][1] = work->mYBBCamMtx[2][1] * particleY;
|
|
local_38[2][2] = work->mYBBCamMtx[2][2];
|
|
local_38[2][3] = local_48.z;
|
|
local_38[2][0] = 0.0f;
|
|
local_38[1][0] = 0.0f;
|
|
local_38[0][2] = 0.0f;
|
|
local_38[0][1] = 0.0f;
|
|
GXLoadPosMtxImm(local_38, 0);
|
|
p_prj[work->mPrjType](work, local_38);
|
|
GXCallDisplayList(jpa_dl, sizeof(jpa_dl));
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawYBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278184-802782B4 272AC4 0130+00 0/0 1/1 0/0 .text
|
|
* JPADrawRotYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Mathces with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawRotYBillboard(JPAEmitterWorkData* work, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_48;
|
|
MTXMultVec(work->mPosCamMtx, param_1->mPosition, local_48);
|
|
f32 sinRot = JMASSin(param_1->mRotateAngle);
|
|
f32 cosRot = JMASCos(param_1->mRotateAngle);
|
|
Mtx local_38;
|
|
f32 particleX = work->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 particleY = work->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
f32 local_98 = (float)(sinRot * particleX);
|
|
f32 local_94 = (float)(cosRot * particleY);
|
|
f32 local_90 = work->mYBBCamMtx[1][1];
|
|
f32 fVar1 = work->mYBBCamMtx[2][1];
|
|
local_38[0][0] = (float)(cosRot * particleX);
|
|
local_38[0][1] = (float)(-sinRot * particleY);
|
|
local_38[0][2] = 0.0f;
|
|
local_38[0][3] = local_48.x;
|
|
local_38[1][0] = local_98 * local_90;
|
|
local_38[1][1] = local_94 * local_90;
|
|
local_38[1][2] = -fVar1;
|
|
local_38[1][3] = local_48.y;
|
|
local_38[2][0] = local_98 * fVar1;
|
|
local_38[2][1] = local_94 * fVar1;
|
|
local_38[2][2] = local_90;
|
|
local_38[2][3] = local_48.z;
|
|
GXLoadPosMtxImm(local_38, 0);
|
|
p_prj[work->mPrjType](work, local_38);
|
|
GXCallDisplayList(jpa_dl, sizeof(jpa_dl));
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawRotYBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawRotYBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 802782B4-802782D0 272BF4 001C+00 1/0 0/0 0/0 .text
|
|
* dirTypeVel__FPC18JPAEmitterWorkDataPC15JPABaseParticlePQ29JGeometry8TVec3<f> */
|
|
void dirTypeVel(JPAEmitterWorkData const* work, JPABaseParticle const* param_1,
|
|
JGeometry::TVec3<f32>* param_2) {
|
|
param_1->getVelVec(*param_2);
|
|
}
|
|
|
|
/* 802782D0-802782EC 272C10 001C+00 1/0 0/0 0/0 .text
|
|
* dirTypePos__FPC18JPAEmitterWorkDataPC15JPABaseParticlePQ29JGeometry8TVec3<f> */
|
|
void dirTypePos(JPAEmitterWorkData const* work, JPABaseParticle const* param_1,
|
|
JGeometry::TVec3<f32>* param_2) {
|
|
param_1->getLocalPosition(*param_2);
|
|
}
|
|
|
|
/* 802782EC-80278320 272C2C 0034+00 1/0 0/0 0/0 .text
|
|
* dirTypePosInv__FPC18JPAEmitterWorkDataPC15JPABaseParticlePQ29JGeometry8TVec3<f> */
|
|
void dirTypePosInv(JPAEmitterWorkData const* work, JPABaseParticle const* param_1,
|
|
JGeometry::TVec3<f32>* param_2) {
|
|
param_1->getLocalPosition(*param_2);
|
|
param_2->negate();
|
|
}
|
|
|
|
/* 80278320-8027833C 272C60 001C+00 1/0 0/0 0/0 .text
|
|
* dirTypeEmtrDir__FPC18JPAEmitterWorkDataPC15JPABaseParticlePQ29JGeometry8TVec3<f> */
|
|
void dirTypeEmtrDir(JPAEmitterWorkData const* work, JPABaseParticle const* param_1,
|
|
JGeometry::TVec3<f32>* param_2) {
|
|
param_2->set(work->mGlobalEmtrDir);
|
|
}
|
|
|
|
/* 8027833C-802783D4 272C7C 0098+00 1/0 0/0 0/0 .text
|
|
* dirTypePrevPtcl__FPC18JPAEmitterWorkDataPC15JPABaseParticlePQ29JGeometry8TVec3<f> */
|
|
void dirTypePrevPtcl(JPAEmitterWorkData const* work, JPABaseParticle const* param_1,
|
|
JGeometry::TVec3<f32>* param_2) {
|
|
JGeometry::TVec3<f32> aTStack_24;
|
|
param_1->getGlobalPosition(aTStack_24);
|
|
JPANode<JPABaseParticle>* end = work->mpAlivePtcl->getEnd();
|
|
JPANode<JPABaseParticle>* prev = work->mpCurNode->getPrev();
|
|
|
|
if (end != prev) {
|
|
JPABaseParticle* particle = work->mpCurNode->getPrev()->getObject();
|
|
particle->getGlobalPosition(*param_2);
|
|
} else {
|
|
work->mpEmtr->calcEmitterGlobalPosition(param_2);
|
|
}
|
|
param_2->sub(aTStack_24);
|
|
}
|
|
|
|
/* 802783D4-80278414 272D14 0040+00 1/0 0/0 0/0 .text rotTypeY__FffRA3_A4_f */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
static void rotTypeY(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
param_2[0][0] = param_1;
|
|
param_2[0][1] = 0.0f;
|
|
param_2[0][2] = -param_0;
|
|
param_2[0][3] = 0.0f;
|
|
param_2[1][0] = 0.0f;
|
|
param_2[1][1] = 1.0f;
|
|
param_2[1][2] = 0.0f;
|
|
param_2[1][3] = 0.0f;
|
|
param_2[2][0] = param_0;
|
|
param_2[2][1] = 0.0f;
|
|
param_2[2][2] = param_1;
|
|
param_2[2][3] = 0.0f;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void rotTypeY(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/rotTypeY__FffRA3_A4_f.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278414-80278454 272D54 0040+00 1/0 0/0 0/0 .text rotTypeX__FffRA3_A4_f */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
static void rotTypeX(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
param_2[0][0] = 1.0f;
|
|
param_2[0][1] = 0.0f;
|
|
param_2[0][2] = 0.0f;
|
|
param_2[0][3] = 0.0f;
|
|
param_2[1][0] = 0.0f;
|
|
param_2[1][1] = param_1;
|
|
param_2[1][2] = -param_0;
|
|
param_2[1][3] = 0.0f;
|
|
param_2[2][0] = 0.0f;
|
|
param_2[2][1] = param_0;
|
|
param_2[2][2] = param_1;
|
|
param_2[2][3] = 0.0f;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void rotTypeX(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/rotTypeX__FffRA3_A4_f.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278454-80278494 272D94 0040+00 1/0 0/0 0/0 .text rotTypeZ__FffRA3_A4_f */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
static void rotTypeZ(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
param_2[0][0] = param_1;
|
|
param_2[0][1] = -param_0;
|
|
param_2[0][2] = 0.0f;
|
|
param_2[0][3] = 0.0f;
|
|
param_2[1][0] = param_0;
|
|
param_2[1][1] = param_1;
|
|
param_2[1][2] = 0.0f;
|
|
param_2[1][3] = 0.0f;
|
|
param_2[2][0] = 0.0f;
|
|
param_2[2][1] = 0.0f;
|
|
param_2[2][2] = 1.0f;
|
|
param_2[2][3] = 0.0f;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void rotTypeZ(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/rotTypeZ__FffRA3_A4_f.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* ############################################################################################## */
|
|
/* 804552D0-804552D4 0038D0 0004+00 1/1 0/0 0/0 .sdata2 @3145 */
|
|
SECTION_SDATA2 static f32 lit_3145 = 0.33333298563957214f;
|
|
|
|
/* 804552D4-804552D8 0038D4 0004+00 1/1 0/0 0/0 .sdata2 @3146 */
|
|
SECTION_SDATA2 static f32 lit_3146 = 0.5773500204086304f;
|
|
|
|
/* 80278494-802784F0 272DD4 005C+00 1/0 0/0 0/0 .text rotTypeXYZ__FffRA3_A4_f */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
static void rotTypeXYZ(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
f32 f3 = 0.33333298563957214f * (1.0f - param_1);
|
|
f32 fVar1;
|
|
f32 f4;
|
|
f4 = f3 + 0.5773500204086304f * param_0;
|
|
fVar1 = f3 - 0.5773500204086304f * param_0;
|
|
f3 += param_1;
|
|
param_2[0][0] = f3;
|
|
param_2[0][1] = fVar1;
|
|
param_2[0][2] = f4;
|
|
param_2[0][3] = 0.0f;
|
|
param_2[1][0] = f4;
|
|
param_2[1][1] = f3;
|
|
param_2[1][2] = fVar1;
|
|
param_2[1][3] = 0.0f;
|
|
param_2[2][0] = fVar1;
|
|
param_2[2][1] = f4;
|
|
param_2[2][2] = f3;
|
|
param_2[2][3] = 0.0f;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void rotTypeXYZ(f32 param_0, f32 param_1, f32 (¶m_2)[3][4]) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/rotTypeXYZ__FffRA3_A4_f.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 802784F0-8027853C 272E30 004C+00 1/0 0/0 0/0 .text basePlaneTypeXY__FPA4_fff */
|
|
static void basePlaneTypeXY(f32 (*param_0)[4], f32 param_1, f32 param_2) {
|
|
param_0[0][0] *= param_1;
|
|
param_0[1][0] *= param_1;
|
|
param_0[2][0] *= param_1;
|
|
param_0[0][1] *= param_2;
|
|
param_0[1][1] *= param_2;
|
|
param_0[2][1] *= param_2;
|
|
}
|
|
|
|
/* 8027853C-80278588 272E7C 004C+00 1/0 0/0 0/0 .text basePlaneTypeXZ__FPA4_fff */
|
|
static void basePlaneTypeXZ(f32 (*param_0)[4], f32 param_1, f32 param_2) {
|
|
param_0[0][0] *= param_1;
|
|
param_0[1][0] *= param_1;
|
|
param_0[2][0] *= param_1;
|
|
param_0[0][2] *= param_2;
|
|
param_0[1][2] *= param_2;
|
|
param_0[2][2] *= param_2;
|
|
}
|
|
|
|
/* 80278588-802785F8 272EC8 0070+00 1/0 0/0 0/0 .text basePlaneTypeX__FPA4_fff */
|
|
static void basePlaneTypeX(f32 (*param_0)[4], f32 param_1, f32 param_2) {
|
|
param_0[0][0] *= param_1;
|
|
param_0[1][0] *= param_1;
|
|
param_0[2][0] *= param_1;
|
|
param_0[0][1] *= param_2;
|
|
param_0[1][1] *= param_2;
|
|
param_0[2][1] *= param_2;
|
|
param_0[0][2] *= param_1;
|
|
param_0[1][2] *= param_1;
|
|
param_0[2][2] *= param_1;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 803C432C-803C4340 -00001 0014+00 2/5 0/0 0/0 .data p_direction */
|
|
typedef void (*dirTypeFunc)(JPAEmitterWorkData const*, JPABaseParticle const*, JGeometry::TVec3<f32>*);
|
|
static dirTypeFunc p_direction[5] = {
|
|
dirTypeVel, dirTypePos, dirTypePosInv,
|
|
dirTypeEmtrDir, dirTypePrevPtcl,
|
|
};
|
|
|
|
/* 803C4340-803C4354 -00001 0014+00 0/2 0/0 0/0 .data p_rot */
|
|
typedef void (*rotTypeFunc)(f32, f32, f32 (&)[3][4]);
|
|
#pragma push
|
|
#pragma force_active on
|
|
static rotTypeFunc p_rot[5] = {
|
|
rotTypeY, rotTypeX, rotTypeZ,
|
|
rotTypeXYZ, rotTypeY,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803C4354-803C4360 -00001 000C+00 0/3 0/0 0/0 .data p_plane */
|
|
|
|
typedef void (*planeFunc)(f32 (*)[4], f32, f32);
|
|
|
|
static planeFunc p_plane[3] = {
|
|
basePlaneTypeXY,
|
|
basePlaneTypeXZ,
|
|
basePlaneTypeX,
|
|
};
|
|
|
|
/* 804507A0-804507A8 -00001 0008+00 3/3 0/0 0/0 .sdata p_dl */
|
|
SECTION_SDATA static u8* p_dl[2] = {
|
|
jpa_dl,
|
|
jpa_dl_x,
|
|
};
|
|
|
|
/* 804552D8-804552DC 0038D8 0004+00 6/6 0/0 0/0 .sdata2 @3281 */
|
|
SECTION_SDATA2 static f32 lit_3281 = 32.0f;
|
|
|
|
/* 804552DC-804552E0 0038DC 0004+00 6/6 0/0 0/0 .sdata2 @3282 */
|
|
SECTION_SDATA2 static f32 lit_3282 = 3.0f;
|
|
|
|
/* 802785F8-80278994 272F38 039C+00 0/0 1/1 0/0 .text
|
|
* JPADrawDirection__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawDirection(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_6c;
|
|
JGeometry::TVec3<f32> local_78;
|
|
p_direction[param_0->mDirType](param_0, param_1, &local_6c);
|
|
if (!local_6c.isZero()) {
|
|
local_6c.normalize();
|
|
local_78.cross(param_1->mBaseAxis, local_6c);
|
|
if (!local_78.isZero()) {
|
|
local_78.normalize();
|
|
param_1->mBaseAxis.cross(local_6c, local_78);
|
|
param_1->mBaseAxis.normalize();
|
|
Mtx local_60;
|
|
f32 fVar1 = param_0->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 fVar2 = param_0->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
local_60[0][0] = param_1->mBaseAxis.x;
|
|
local_60[0][1] = local_6c.x;
|
|
local_60[0][2] = local_78.x;
|
|
local_60[0][3] = param_1->mPosition.x;
|
|
local_60[1][0] = param_1->mBaseAxis.y;
|
|
local_60[1][1] = local_6c.y;
|
|
local_60[1][2] = local_78.y;
|
|
local_60[1][3] = param_1->mPosition.y;
|
|
local_60[2][0] = param_1->mBaseAxis.z;
|
|
local_60[2][1] = local_6c.z;
|
|
local_60[2][2] = local_78.z;
|
|
local_60[2][3] = param_1->mPosition.z;
|
|
p_plane[param_0->mPlaneType](local_60, fVar1, fVar2);
|
|
MTXConcat(param_0->mPosCamMtx, local_60, local_60);
|
|
GXLoadPosMtxImm(local_60, 0);
|
|
p_prj[param_0->mPrjType](param_0, local_60);
|
|
GXCallDisplayList(p_dl[param_0->mDLType], sizeof(jpa_dl));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawDirection(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawDirection__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278994-80278DA8 2732D4 0414+00 0/0 1/1 0/0 .text
|
|
* JPADrawRotDirection__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawRotDirection(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
f32 sinRot = JMASSin(param_1->mRotateAngle);
|
|
f32 cosRot = JMASCos(param_1->mRotateAngle);
|
|
JGeometry::TVec3<f32> local_6c;
|
|
JGeometry::TVec3<f32> local_78;
|
|
p_direction[param_0->mDirType](param_0, param_1, &local_6c);
|
|
if (!local_6c.isZero()) {
|
|
local_6c.normalize();
|
|
local_78.cross(param_1->mBaseAxis, local_6c);
|
|
if (!local_78.isZero()) {
|
|
local_78.normalize();
|
|
param_1->mBaseAxis.cross(local_6c, local_78);
|
|
param_1->mBaseAxis.normalize();
|
|
f32 particleX = param_0->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 particleY = param_0->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
Mtx auStack_80;
|
|
Mtx local_60;
|
|
p_rot[param_0->mRotType](sinRot, cosRot, auStack_80);
|
|
p_plane[param_0->mPlaneType](auStack_80, particleX, particleY);
|
|
local_60[0][0] = param_1->mBaseAxis.x;
|
|
local_60[0][1] = local_6c.x;
|
|
local_60[0][2] = local_78.x;
|
|
local_60[0][3] = param_1->mPosition.x;
|
|
local_60[1][0] = param_1->mBaseAxis.y;
|
|
local_60[1][1] = local_6c.y;
|
|
local_60[1][2] = local_78.y;
|
|
local_60[1][3] = param_1->mPosition.y;
|
|
local_60[2][0] = param_1->mBaseAxis.z;
|
|
local_60[2][1] = local_6c.z;
|
|
local_60[2][2] = local_78.z;
|
|
local_60[2][3] = param_1->mPosition.z;
|
|
MTXConcat(local_60, auStack_80, auStack_80);
|
|
MTXConcat(param_0->mPosCamMtx, auStack_80, local_60);
|
|
GXLoadPosMtxImm(local_60, 0);
|
|
p_prj[param_0->mPrjType](param_0, local_60);
|
|
GXCallDisplayList(p_dl[param_0->mDLType], sizeof(jpa_dl));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawRotDirection(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawRotDirection__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278DA8-80278FC8 2736E8 0220+00 0/0 1/1 0/0 .text
|
|
* JPADrawDBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawDBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_70;
|
|
p_direction[param_0->mDirType](param_0, param_1, &local_70);
|
|
JGeometry::TVec3<f32> aTStack_7c;
|
|
aTStack_7c.set(param_0->mPosCamMtx[2][0], param_0->mPosCamMtx[2][1],
|
|
param_0->mPosCamMtx[2][2]);
|
|
local_70.cross(local_70, aTStack_7c);
|
|
if (!local_70.isZero()) {
|
|
local_70.normalize();
|
|
MTXMultVecSR(param_0->mPosCamMtx, local_70, local_70);
|
|
JGeometry::TVec3<f32> local_88;
|
|
MTXMultVec(param_0->mPosCamMtx, param_1->mPosition, local_88);
|
|
f32 particleX = param_0->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 particleY = param_0->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
Mtx local_60;
|
|
local_60[0][0] = local_70.x * particleX;
|
|
local_60[0][1] = -local_70.y * particleY;
|
|
local_60[0][3] = local_88.x;
|
|
local_60[1][0] = local_70.y * particleX;
|
|
local_60[1][1] = local_70.x * particleY;
|
|
local_60[1][3] = local_88.y;
|
|
local_60[2][2] = 1.0f;
|
|
local_60[2][3] = local_88.z;
|
|
local_60[2][1] = 0.0f;
|
|
local_60[2][0] = 0.0f;
|
|
local_60[1][2] = 0.0f;
|
|
local_60[0][2] = 0.0f;
|
|
GXLoadPosMtxImm(local_60, 0);
|
|
p_prj[param_0->mPrjType](param_0, local_60);
|
|
GXCallDisplayList(jpa_dl, sizeof(jpa_dl));
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawDBillboard(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawDBillboard__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80278FC8-80279110 273908 0148+00 0/0 1/1 0/0 .text
|
|
* JPADrawRotation__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPADrawRotation(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
f32 sinRot = JMASSin(param_1->mRotateAngle);
|
|
f32 cosRot = JMASCos(param_1->mRotateAngle);
|
|
f32 particleX = param_0->mGlobalPtclScl.x * param_1->mParticleScaleX;
|
|
f32 particleY = param_0->mGlobalPtclScl.y * param_1->mParticleScaleY;
|
|
Mtx auStack_88;
|
|
p_rot[param_0->mRotType](sinRot, cosRot, auStack_88);
|
|
p_plane[param_0->mPlaneType](auStack_88, particleX, particleY);
|
|
auStack_88[0][3] = param_1->mPosition.x;
|
|
auStack_88[1][3] = param_1->mPosition.y;
|
|
auStack_88[2][3] = param_1->mPosition.z;
|
|
MTXConcat(param_0->mPosCamMtx, auStack_88, auStack_88);
|
|
GXLoadPosMtxImm(auStack_88, 0);
|
|
p_prj[param_0->mPrjType](param_0, auStack_88);
|
|
GXCallDisplayList(p_dl[param_0->mDLType], sizeof(jpa_dl));
|
|
}
|
|
}
|
|
|
|
/* 80279110-802791B0 273A50 00A0+00 0/0 1/1 0/0 .text
|
|
* JPADrawPoint__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
#ifdef NONMATCHING
|
|
// literal only
|
|
void JPADrawPoint(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
if (!!(ptcl->mStatus & JPAPtclStts_Invisible))
|
|
return;
|
|
|
|
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
|
GXBegin(GX_POINTS, GX_VTXFMT1, 1);
|
|
GXPosition3f32(ptcl->mPosition.x, ptcl->mPosition.y, ptcl->mPosition.z);
|
|
GXTexCoord2f32(0.0f, 0.0f);
|
|
i_GXEnd();
|
|
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawPoint(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawPoint__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 802791B0-80279364 273AF0 01B4+00 0/0 1/1 0/0 .text
|
|
* JPADrawLine__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void JPADrawLine(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
if (param_1->checkStatus(8) == 0) {
|
|
JGeometry::TVec3<f32> local_1c;
|
|
JGeometry::setTVec3f(¶m_1->mPosition.x, &local_1c.x);
|
|
JGeometry::TVec3<f32> local_28;
|
|
param_1->getVelVec(local_28);
|
|
if (!local_28.isZero()) {
|
|
local_28.setLength(param_0->mGlobalPtclScl.y * (25.0f * param_1->mParticleScaleY));
|
|
local_28.sub(local_1c, local_28);
|
|
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
|
GXBegin(GX_LINES, GX_VTXFMT1, 2);
|
|
GXPosition3f32(local_1c.x, local_1c.y, local_1c.z);
|
|
GXTexCoord2f32(0.0f, 0.0f);
|
|
GXPosition3f32(local_28.x, local_28.y, local_28.z);
|
|
GXTexCoord2f32(0.0f, 1.0f);
|
|
i_GXEnd();
|
|
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawLine(JPAEmitterWorkData* param_0, JPABaseParticle* param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawLine__FP18JPAEmitterWorkDataP15JPABaseParticle.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80279364-8027936C 273CA4 0008+00 2/2 0/0 0/0 .text getNext__FP26JPANode<15JPABaseParticle> */
|
|
JPANode<JPABaseParticle>* getNext(JPANode<JPABaseParticle>* param_0) {
|
|
return param_0->getNext();
|
|
}
|
|
|
|
/* 8027936C-80279374 273CAC 0008+00 2/2 0/0 0/0 .text getPrev__FP26JPANode<15JPABaseParticle> */
|
|
JPANode<JPABaseParticle>* getPrev(JPANode<JPABaseParticle>* param_0) {
|
|
return param_0->getPrev();
|
|
}
|
|
|
|
typedef JPANode<JPABaseParticle>* (*getNodeFunc)(JPANode<JPABaseParticle>*);
|
|
|
|
/* 80279374-8027996C 273CB4 05F8+00 0/0 1/1 0/0 .text JPADrawStripe__FP18JPAEmitterWorkData */
|
|
// local_d4 is optimized away.
|
|
#ifdef NONMATCHING
|
|
void JPADrawStripe(JPAEmitterWorkData* param_0) {
|
|
JPABaseShape* shape = param_0->mpRes->getBsp();
|
|
u32 uVar5 = param_0->mpAlivePtcl->getNum();
|
|
if (uVar5 < 2) {
|
|
return;
|
|
}
|
|
|
|
f32 dVar16 = 0.0f;
|
|
f32 dVar15 = 1.0f / (uVar5 - 1.0f);
|
|
f32 dVar14 = (1.0f + param_0->mPivot.x) *
|
|
(25.0f * param_0->mGlobalPtclScl.x);
|
|
f32 dVar13 = (1.0f - param_0->mPivot.x) *
|
|
(25.0f * param_0->mGlobalPtclScl.x);
|
|
Mtx local_c8;
|
|
f32 dVar11;
|
|
f32 dVar12;
|
|
JGeometry::TVec3<f32> local_ec;
|
|
JGeometry::TVec3<f32> local_e0;
|
|
JGeometry::TVec3<f32> local_d4;
|
|
JGeometry::TVec3<f32> local_f8;
|
|
JGeometry::TVec3<f32> local_104;
|
|
getNodeFunc pcVar9;
|
|
JPANode<JPABaseParticle>* startNode;
|
|
if (shape->isDrawFwdAhead()) {
|
|
startNode = param_0->mpAlivePtcl->getLast();
|
|
pcVar9 = getPrev;
|
|
dVar16 = 1.0f;
|
|
dVar15 = -dVar15;
|
|
} else {
|
|
startNode = param_0->mpAlivePtcl->getFirst();
|
|
pcVar9 = getNext;
|
|
}
|
|
|
|
GXLoadPosMtxImm(param_0->mPosCamMtx, 0);
|
|
p_prj[param_0->mPrjType](param_0, param_0->mPosCamMtx);
|
|
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
|
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT1, uVar5 << 1);
|
|
for (JPANode<JPABaseParticle>* this_00 = startNode; this_00 != param_0->mpAlivePtcl->getEnd();
|
|
this_00 = pcVar9(this_00), dVar16 += dVar15) {
|
|
param_0->mpCurNode = this_00;
|
|
JPABaseParticle* pTVar7 = this_00->getObject();
|
|
local_ec.set(pTVar7->mPosition);
|
|
dVar11 = JMASSin(pTVar7->mRotateAngle);
|
|
dVar12 = JMASCos(pTVar7->mRotateAngle);
|
|
local_e0.x = -pTVar7->mParticleScaleX * dVar14;
|
|
local_e0.y = 0.0f;
|
|
local_e0.z = 0.0f;
|
|
local_e0.set(local_e0.x * dVar12, 0.0f, local_e0.x * dVar11);
|
|
local_d4.x = pTVar7->mParticleScaleX * dVar13;
|
|
local_d4.y = 0.0f;
|
|
local_d4.z = 0.0f;
|
|
local_d4.set(local_d4.x * dVar12, 0.0f, local_d4.x * dVar11);
|
|
p_direction[param_0->mDirType](param_0, pTVar7, &local_f8);
|
|
if (local_f8.isZero()) {
|
|
local_f8.set(0.0f, 1.0f, 0.0f);
|
|
} else {
|
|
local_f8.normalize();
|
|
}
|
|
local_104.cross(pTVar7->mBaseAxis, local_f8);
|
|
if (local_104.isZero()) {
|
|
local_104.set(1.0f, 0.0f, 0.0f);
|
|
} else {
|
|
local_104.normalize();
|
|
}
|
|
pTVar7->mBaseAxis.cross(local_f8, local_104);
|
|
pTVar7->mBaseAxis.normalize();
|
|
|
|
local_c8[0][0] = local_104.x;
|
|
local_c8[0][1] = local_f8.x;
|
|
local_c8[0][2] = pTVar7->mBaseAxis.x;
|
|
local_c8[0][3] = 0.0f;
|
|
local_c8[1][0] = local_104.y;
|
|
local_c8[1][1] = local_f8.y;
|
|
local_c8[1][2] = pTVar7->mBaseAxis.y;
|
|
local_c8[1][3] = 0.0f;
|
|
local_c8[2][0] = local_104.z;
|
|
local_c8[2][1] = local_f8.z;
|
|
local_c8[2][2] = pTVar7->mBaseAxis.z;
|
|
local_c8[2][3] = 0.0f;
|
|
MTXMultVecArraySR(local_c8, local_e0, local_e0, 2);
|
|
GXPosition3f32(local_e0.x + local_ec.x, local_e0.y + local_ec.y,
|
|
local_e0.z + local_ec.z);
|
|
GXTexCoord2f32(0.0f, dVar16);
|
|
GXPosition3f32(local_d4.x + local_ec.x, local_d4.y + local_ec.y,
|
|
local_d4.z + local_ec.z);
|
|
GXTexCoord2f32(1.0f, dVar16);
|
|
|
|
}
|
|
i_GXEnd();
|
|
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawStripe(JPAEmitterWorkData* param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawStripe__FP18JPAEmitterWorkData.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 8027996C-8027A3D8 2742AC 0A6C+00 0/0 1/1 0/0 .text JPADrawStripeX__FP18JPAEmitterWorkData */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JPADrawStripeX(JPAEmitterWorkData* param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/JPADrawStripeX__FP18JPAEmitterWorkData.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8027A3D8-8027A414 274D18 003C+00 0/0 1/1 0/0 .text
|
|
* JPADrawEmitterCallBackB__FP18JPAEmitterWorkData */
|
|
void JPADrawEmitterCallBackB(JPAEmitterWorkData* work) {
|
|
if (work->mpEmtr->mpEmtrCallBack == NULL)
|
|
return;
|
|
|
|
work->mpEmtr->mpEmtrCallBack->drawAfter(work->mpEmtr);
|
|
}
|
|
|
|
/* 8027A414-8027A454 274D54 0040+00 0/0 1/1 0/0 .text
|
|
* JPADrawParticleCallBack__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
|
void JPADrawParticleCallBack(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
|
if (work->mpEmtr->mpPtclCallBack == NULL)
|
|
return;
|
|
|
|
work->mpEmtr->mpPtclCallBack->draw(work->mpEmtr, ptcl);
|
|
}
|
|
|
|
/* 8027A454-8027A6DC 274D94 0288+00 1/1 0/0 0/0 .text
|
|
* makeColorTable__FPP8_GXColorPC16JPAClrAnmKeyDataUcsP7JKRHeap */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void makeColorTable(_GXColor** param_0, JPAClrAnmKeyData const* param_1, u8 param_2,
|
|
s16 param_3, JKRHeap* param_4) {
|
|
nofralloc
|
|
#include "asm/JSystem/JParticle/JPABaseShape/makeColorTable__FPP8_GXColorPC16JPAClrAnmKeyDataUcsP7JKRHeap.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8027A6DC-8027A7E8 27501C 010C+00 0/0 1/1 0/0 .text __ct__12JPABaseShapeFPCUcP7JKRHeap
|
|
*/
|
|
JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) {
|
|
mpData = (const JPABaseShapeData*)pData;
|
|
|
|
if (isTexCrdAnm()) {
|
|
mpTexCrdMtxAnmTbl = (const void*)(pData + sizeof(JPABaseShapeData));
|
|
} else {
|
|
mpTexCrdMtxAnmTbl = NULL;
|
|
}
|
|
|
|
if (isTexAnm()) {
|
|
u32 offs = sizeof(JPABaseShapeData);
|
|
if (isTexCrdAnm())
|
|
offs = sizeof(JPABaseShapeData) + 0x28;
|
|
mpTexIdxAnimTbl = (const u8*)(pData + offs);
|
|
} else {
|
|
mpTexIdxAnimTbl = NULL;
|
|
}
|
|
|
|
if (isPrmAnm()) {
|
|
makeColorTable(&mpPrmClrAnmTbl, (JPAClrAnmKeyData*)(pData + mpData->mClrPrmAnmOffset),
|
|
mpData->mClrPrmKeyNum, mpData->mClrAnmFrmMax, pHeap);
|
|
} else {
|
|
mpPrmClrAnmTbl = NULL;
|
|
}
|
|
|
|
if (isEnvAnm()) {
|
|
makeColorTable(&mpEnvClrAnmTbl, (JPAClrAnmKeyData*)(pData + mpData->mClrEnvAnmOffset),
|
|
mpData->mClrEnvKeyNum, mpData->mClrAnmFrmMax, pHeap);
|
|
} else {
|
|
mpEnvClrAnmTbl = NULL;
|
|
}
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 803C4360-803C436C 021480 000C+00 0/1 0/0 0/0 .data st_bm__12JPABaseShape */
|
|
SECTION_DATA GXBlendMode JPABaseShape::st_bm[3] = {
|
|
GX_BM_NONE,
|
|
GX_BM_BLEND,
|
|
GX_BM_LOGIC,
|
|
};
|
|
|
|
/* 803C436C-803C4394 02148C 0028+00 0/1 0/0 0/0 .data st_bf__12JPABaseShape */
|
|
SECTION_DATA GXBlendFactor JPABaseShape::st_bf[10] = {
|
|
GX_BL_ZERO, GX_BL_ONE, GX_BL_SRC_COLOR, GX_BL_INV_SRC_COLOR,
|
|
GX_BL_SRC_COLOR, GX_BL_INV_SRC_COLOR, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA,
|
|
GX_BL_DST_ALPHA, GX_BL_INV_DST_ALPHA,
|
|
};
|
|
|
|
/* 803C4394-803C43D4 0214B4 0040+00 0/1 0/0 0/0 .data st_lo__12JPABaseShape */
|
|
SECTION_DATA GXLogicOp JPABaseShape::st_lo[16] = {
|
|
GX_LO_CLEAR, GX_LO_SET, GX_LO_COPY, GX_LO_INV_COPY, GX_LO_NOOP, GX_LO_INV,
|
|
GX_LO_AND, GX_LO_NAND, GX_LO_OR, GX_LO_NOR, GX_LO_XOR, GX_LO_EQUIV,
|
|
GX_LO_REV_AND, GX_LO_INV_AND, GX_LO_REV_OR, GX_LO_INV_OR,
|
|
};
|
|
|
|
/* 803C43D4-803C43F4 0214F4 0020+00 0/1 0/0 0/0 .data st_c__12JPABaseShape */
|
|
SECTION_DATA GXCompare JPABaseShape::st_c[8] = {
|
|
GX_NEVER, GX_LESS, GX_LEQUAL, GX_EQUAL, GX_NEQUAL, GX_GEQUAL, GX_GREATER, GX_ALWAYS,
|
|
};
|
|
|
|
/* 803C43F4-803C4404 021514 0010+00 0/1 0/0 0/0 .data st_ao__12JPABaseShape */
|
|
SECTION_DATA GXAlphaOp JPABaseShape::st_ao[4] = {
|
|
GX_AOP_AND,
|
|
GX_AOP_OR,
|
|
GX_AOP_XOR,
|
|
GX_AOP_XNOR,
|
|
};
|
|
|
|
/* 803C4404-803C4464 021524 0060+00 0/1 0/0 0/0 .data st_ca__12JPABaseShape */
|
|
SECTION_DATA GXTevColorArg JPABaseShape::st_ca[6][4] = {
|
|
{
|
|
GX_CC_ZERO,
|
|
GX_CC_TEXC,
|
|
GX_CC_ONE,
|
|
GX_CC_ZERO,
|
|
},
|
|
{
|
|
GX_CC_ZERO,
|
|
GX_CC_C0,
|
|
GX_CC_TEXC,
|
|
GX_CC_ZERO,
|
|
},
|
|
{
|
|
GX_CC_C0,
|
|
GX_CC_ONE,
|
|
GX_CC_TEXC,
|
|
GX_CC_ZERO,
|
|
},
|
|
{
|
|
GX_CC_C1,
|
|
GX_CC_C0,
|
|
GX_CC_TEXC,
|
|
GX_CC_ZERO,
|
|
},
|
|
{
|
|
GX_CC_ZERO,
|
|
GX_CC_TEXC,
|
|
GX_CC_C0,
|
|
GX_CC_C1,
|
|
},
|
|
{
|
|
GX_CC_ZERO,
|
|
GX_CC_ZERO,
|
|
GX_CC_ZERO,
|
|
GX_CC_C0,
|
|
},
|
|
};
|
|
|
|
/* 803C4464-803C4488 021584 0020+04 0/1 0/0 0/0 .data st_aa__12JPABaseShape */
|
|
SECTION_DATA GXTevAlphaArg JPABaseShape::st_aa[2][4] = {
|
|
{
|
|
GX_CA_ZERO,
|
|
GX_CA_TEXA,
|
|
GX_CA_A0,
|
|
GX_CA_ZERO,
|
|
},
|
|
{
|
|
GX_CA_ZERO,
|
|
GX_CA_ZERO,
|
|
GX_CA_ZERO,
|
|
GX_CA_A0,
|
|
},
|
|
};
|
|
|
|
/* 8027A7E8-8027A918 275128 0130+00 0/0 1/1 0/0 .text setGX__12JPABaseShapeCFP18JPAEmitterWorkData
|
|
*/
|
|
void JPABaseShape::setGX(JPAEmitterWorkData* work) const {
|
|
const GXTevColorArg* colorArg = getTevColorArg();
|
|
const GXTevAlphaArg* alphaArg = getTevAlphaArg();
|
|
GXSetBlendMode(getBlendMode(), getBlendSrc(), getBlendDst(), getLogicOp());
|
|
GXSetZMode(getZEnable(), getZCmp(), getZUpd());
|
|
GXSetAlphaCompare(getAlphaCmp0(), getAlphaRef0(), getAlphaOp(), getAlphaCmp1(), getAlphaRef1());
|
|
GXSetTevColorIn(GX_TEVSTAGE0, colorArg[0], colorArg[1], colorArg[2], colorArg[3]);
|
|
GXSetTevAlphaIn(GX_TEVSTAGE0, alphaArg[0], alphaArg[1], alphaArg[2], alphaArg[3]);
|
|
GXSetTevDirect(GX_TEVSTAGE0);
|
|
GXSetTevDirect(GX_TEVSTAGE1);
|
|
GXSetZCompLoc(getZCompLoc());
|
|
}
|