mirror of
https://github.com/zeldaret/ss
synced 2026-05-28 00:15:59 -04:00
JPAExtraShape, JPAChildShape OK
This commit is contained in:
@@ -1770,6 +1770,7 @@ JSystem/JParticle/JPAExtraShape.cpp:
|
||||
|
||||
JSystem/JParticle/JPAChildShape.cpp:
|
||||
.text start:0x8031DBA0 end:0x8031DD48 align:16
|
||||
.sdata2 start:0x8057CEB0 end:0x8057CEB8
|
||||
|
||||
JSystem/JParticle/JPAExTexShape.cpp:
|
||||
.text start:0x8031DD50 end:0x8031E094 align:16
|
||||
|
||||
@@ -18523,13 +18523,13 @@ JPACalcScaleCopy__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D640; /
|
||||
JPACalcScaleAnmNormal__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D650; // type:function size:0xC
|
||||
JPACalcScaleAnmRepeatX__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D660; // type:function size:0x64
|
||||
JPACalcScaleAnmRepeatY__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D6D0; // type:function size:0x64
|
||||
JPACalcScaleAnmReverseX__FP18JPAEmitterWorkDataPC15JPABaseParticle = .text:0x8031D740; // type:function size:0x94
|
||||
JPACalcScaleAnmReverseX__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D740; // type:function size:0x94
|
||||
JPACalcScaleAnmReverseY__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D7E0; // type:function size:0x94
|
||||
JPACalcAlphaAnm__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D880; // type:function size:0x90
|
||||
JPACalcAlphaFlickAnm__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031D910; // type:function size:0x148
|
||||
__ct__13JPAExtraShapeFPCUc = .text:0x8031DA60; // type:function size:0x34
|
||||
init__13JPAExtraShapeFv = .text:0x8031DAA0; // type:function size:0xF8
|
||||
fn_8031DBA0 = .text:0x8031DBA0; // type:function size:0x18
|
||||
fn_8031DBA0__FP18JPAEmitterWorkData = .text:0x8031DBA0; // type:function size:0x18
|
||||
JPARegistChildPrmEnv__FP18JPAEmitterWorkData = .text:0x8031DBC0; // type:function size:0x114
|
||||
JPACalcChildAlphaOut__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031DCE0; // type:function size:0x30
|
||||
JPACalcChildScaleOut__FP18JPAEmitterWorkDataP15JPABaseParticle = .text:0x8031DD10; // type:function size:0x28
|
||||
|
||||
+2
-2
@@ -1211,8 +1211,8 @@ config.libs = [
|
||||
Object(Matching, "JSystem/JParticle/JPAResourceManager.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPAResource.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPABaseShape.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPAExtraShape.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPAChildShape.cpp"),
|
||||
Object(Matching, "JSystem/JParticle/JPAExtraShape.cpp"),
|
||||
Object(Matching, "JSystem/JParticle/JPAChildShape.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPAExTexShape.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPADynamicsBlock.cpp"),
|
||||
Object(NonMatching, "JSystem/JParticle/JPAFieldBlock.cpp"),
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
/* 0x00 */ const JPAChildShapeData* mpData;
|
||||
};
|
||||
|
||||
void fn_8031DBA0(JPAEmitterWorkData*);
|
||||
void JPARegistChildPrmEnv(JPAEmitterWorkData*);
|
||||
|
||||
void JPACalcChildAlphaOut(JPAEmitterWorkData*, JPABaseParticle*);
|
||||
|
||||
@@ -17,8 +17,9 @@ struct JPAExTexShapeData {
|
||||
/* 0x08 */ u32 mFlags;
|
||||
/* 0x0C */ f32 mIndTexMtx[2][3];
|
||||
/* 0x24 */ s8 mExpScale;
|
||||
/* 0x25 */ s8 mIndTexIdx;
|
||||
/* 0x26 */ s8 mSecTexIdx;
|
||||
/* 0x25 */ u8 _0x25[0x4E - 0x25];
|
||||
/* 0x4E */ s8 mIndTexIdx;
|
||||
/* 0x4F */ s8 mSecTexIdx;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,7 +46,7 @@ void __GXSetVCD(void);
|
||||
void __GXCalculateVLim(void);
|
||||
void __GXSetVAT(void);
|
||||
|
||||
static void GXSetTexCoordGen(GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx);
|
||||
void GXSetTexCoordGen(GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx);
|
||||
// // TODO: What matrix index is this???
|
||||
// GXSetTexCoordGen2(id, type, src, texMtxIdx, FALSE, 125);
|
||||
// }
|
||||
|
||||
+3
-1
@@ -4,11 +4,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "rvl/MTX/mtx.h"
|
||||
// IWYU pragma: begin_exports
|
||||
#include "rvl/MTX/mtx.h"
|
||||
#include "rvl/MTX/mtx44.h"
|
||||
#include "rvl/MTX/mtxvec.h"
|
||||
#include "rvl/MTX/quat.h"
|
||||
#include "rvl/MTX/vec.h"
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -7,7 +7,13 @@
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
#include "rvl/GX.h"
|
||||
#include "rvl/OS.h"
|
||||
|
||||
// SS addition
|
||||
void fn_8031DBA0(JPAEmitterWorkData* work) {
|
||||
if (work->mpEmtr->mAlivePtclBase.getNum() == 0) {
|
||||
work->mpEmtr->deleteAllParticle();
|
||||
}
|
||||
}
|
||||
|
||||
/* 8027AEBC-8027AFDC 2757FC 0120+00 0/0 1/1 0/0 .text JPARegistChildPrmEnv__FP18JPAEmitterWorkData
|
||||
*/
|
||||
|
||||
@@ -6,15 +6,19 @@
|
||||
#include "JSystem/JParticle/JPAExTexShape.h"
|
||||
#include "JSystem/JParticle/JPAResourceManager.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
#include "rvl/MTX.h"
|
||||
#include "rvl/GX.h"
|
||||
|
||||
/* 8027B040-8027B13C 275980 00FC+00 0/0 1/1 0/0 .text JPALoadExTex__FP18JPAEmitterWorkData */
|
||||
void JPALoadExTex(JPAEmitterWorkData* work) {
|
||||
Mtx m;
|
||||
JPAExTexShape* ets = work->mpRes->getEts();
|
||||
|
||||
|
||||
GXTexCoordID secTexCoordID = GX_TEXCOORD1;
|
||||
if (ets->isUseIndirect()) {
|
||||
GXSetTexCoordGen2(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE,
|
||||
MTXIdentity(m);
|
||||
GXLoadTexMtxImm(m, GX_TEXMTX2, GX_MTX2x4);
|
||||
GXSetTexCoordGen2(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX2, GX_FALSE,
|
||||
GX_PTIDENTITY);
|
||||
u8 texIdx = ets->getIndTexIdx();
|
||||
work->mpResMgr->load(work->mpRes->getTexIdx(texIdx), GX_TEXMAP2);
|
||||
|
||||
@@ -71,23 +71,24 @@ void JPACalcScaleAnmRepeatY(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
* JPACalcScaleAnmReverseX__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
||||
void JPACalcScaleAnmReverseX(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||
s32 cycle = ptcl->mAge / esp->getScaleAnmCycleX();
|
||||
f32 cycle = ptcl->mAge / esp->getScaleAnmCycleX() & 1;
|
||||
f32 base = (ptcl->mAge % esp->getScaleAnmCycleX()) / (f32)esp->getScaleAnmCycleX();
|
||||
work->mScaleAnm = base + ((cycle & 1) * (1.0f - base * 2.0f));
|
||||
work->mScaleAnm = base + (cycle * (1.0f - base * 2.0f));
|
||||
}
|
||||
|
||||
/* 8027AB7C-8027AC10 2754BC 0094+00 0/0 1/1 0/0 .text
|
||||
* JPACalcScaleAnmReverseY__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
||||
void JPACalcScaleAnmReverseY(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||
s32 cycle = ptcl->mAge / esp->getScaleAnmCycleY();
|
||||
f32 cycle = ptcl->mAge / esp->getScaleAnmCycleY() & 1;
|
||||
f32 base = (ptcl->mAge % esp->getScaleAnmCycleY()) / (f32)esp->getScaleAnmCycleY();
|
||||
work->mScaleAnm = base + ((cycle & 1) * (1.0f - base * 2.0f));
|
||||
work->mScaleAnm = base + (cycle * (1.0f - base * 2.0f));
|
||||
}
|
||||
|
||||
/* 8027AC10-8027AC98 275550 0088+00 0/0 1/1 0/0 .text
|
||||
* JPACalcAlphaAnm__FP18JPAEmitterWorkDataP15JPABaseParticle */
|
||||
void JPACalcAlphaAnm(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
0.0f; // float order
|
||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||
f32 alpha;
|
||||
if (ptcl->mTime < esp->getAlphaInTiming()) {
|
||||
|
||||
Reference in New Issue
Block a user