Skip to content

Commit

Permalink
d_particle work
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Jul 14, 2024
1 parent 5f6ef2a commit e402425
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 89 deletions.
4 changes: 2 additions & 2 deletions include/JSystem/JParticle/JPAEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ class JPABaseEmitter {
void getBaseEnvColor(GXColor&) {}
void getBasePrmColor(GXColor&) {}
void getCamMtxPtr() {}
void getChildParticleList() {}
JSUList<JPABaseParticle>* getChildParticleList() { return &mChildParticles; }
void getCurrentCreateNumber() const {}
void getFrame() {}
void getGlobalParticleScale(JGeometry::TVec3<f32>&) const {}
void getParticleList() {}
JSUList<JPABaseParticle>* getParticleList() { return &mActiveParticles; }
void getgReRDirection(JGeometry::TVec3<f32>&) {}
void isChildDraw() {}
void isContinuousParticle() {}
Expand Down
24 changes: 12 additions & 12 deletions include/SSystem/SComponent/c_xyz.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ struct cXyz : Vec {
~cXyz() {}
/* inlined */ cXyz() {}
cXyz(f32 x, f32 y, f32 z) {
this->x = x;
this->y = y;
this->z = z;
x = x;
y = y;
z = z;
}
cXyz(const cXyz& vec) {
this->x = vec.x;
this->y = vec.y;
this->z = vec.z;
x = vec.x;
y = vec.y;
z = vec.z;
}
cXyz(const Vec& vec) {
this->x = vec.x;
this->y = vec.y;
this->z = vec.z;
x = vec.x;
y = vec.y;
z = vec.z;
}
void operator=(const Vec& vec) {
this->x = vec.x;
this->y = vec.y;
this->z = vec.z;
x = vec.x;
y = vec.y;
z = vec.z;
}
cXyz operator+(Vec const&) const;
cXyz operator-(Vec const&) const;
Expand Down
28 changes: 5 additions & 23 deletions include/d/d_particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,30 +212,12 @@ class dPa_J3DmodelEmitter_c : public dPa_modelEmitter_c {

/* 0x10 */ JPABaseEmitter* mpBaseEmitter;
/* 0x14 */ JKRSolidHeap* mpHeap;
/* 0x18 */ J3DModelData* field_0x18;
/* 0x18 */ J3DModelData* modelData;
/* 0x1C */ J3DAnmTexPattern* field_0x1c;
/* 0x20 */ J3DTexNoAnm* field_0x20;
/* 0x24 */ u16 field_0x24;
/* 0x26 */ u8 field_0x26;
/* 0x28 */ J3DLightInfo field_0x28;
/* 0x5C */ u8 field_0x5c[0x9c - 0x5c];
/* 0x9C */ cXyz field_0x9c;
/* 0xA8 */ GXColorS10 field_0xa8;
/* 0xB0 */ GXColor field_0xb0;
/* 0xB4 */ GXColor field_0xb4;
/* 0xB8 */ GXColorS10 field_0xb8;
/* 0xC0 */ f32 field_0xc0;
/* 0xC4 */ f32 field_0xc4;
/* 0xC8 */ f32 field_0xc8;
/* 0xCC */ u8 field_0xcc;
/* 0xCD */ u8 field_0xcd;
/* 0xCE */ u8 field_0xce;
/* 0xCF */ u8 field_0xcf;
/* 0xD0 */ u8 field_0xd0;
/* 0xD1 */ u8 field_0xd1;
/* 0xD2 */ u8 field_0xd2;
/* 0xD3 */ u8 field_0xd3;
/* 0xD4 */ u8 field_0xd4;
/* 0x5C */ dKy_tevstr_c tevStr;
};

class dPa_J3Dmodel_c {
Expand All @@ -258,13 +240,13 @@ class dPa_smokePcallBack : public JPACallBackBase2<JPABaseEmitter*, JPABaseParti

class dPa_selectTexEcallBack : public dPa_levelEcallBack {
public:
dPa_selectTexEcallBack(u8 param_1) { field_0x4 = param_1; }
dPa_selectTexEcallBack(u8 tex) { mTexNo = tex; }
virtual ~dPa_selectTexEcallBack() {}

virtual void draw(JPABaseEmitter*);
virtual void setup(JPABaseEmitter*, const cXyz*, const csXyz*, s8);

/* 0x04 */ u8 field_0x4;
/* 0x04 */ u8 mTexNo;
};

class dPa_windPcallBack : public JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*> {
Expand Down Expand Up @@ -378,7 +360,7 @@ class dPa_control_c {
void createRoomScene(void const*);
bool readScene(u8, mDoDvdThd_toMainRam_c**);
void createScene(void const*);
void removeRoomScene();
bool removeRoomScene();
void removeScene();
void calc3D();
void calc2D();
Expand Down
8 changes: 4 additions & 4 deletions src/JSystem/JParticle/JPADraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ void JPADraw::drawParticle() {
for (s32 i = 0; i < execEmtrPVisNum; i++)
mpExecEmtrPVis[i]->exec(&dc);

JSUList<JPABaseParticle> * activeParticles = &dc.pbe->mActiveParticles;
JSUList<JPABaseParticle> * activeParticles = dc.pbe->getParticleList();
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = activeParticles->getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
Expand Down Expand Up @@ -879,7 +879,7 @@ void JPADraw::drawChild() {
for (s32 i = 0; i < execEmtrCVisNum; i++)
mpExecEmtrCVis[i]->exec(&dc);

JSUList<JPABaseParticle> * childParticles = &dc.pbe->mChildParticles;
JSUList<JPABaseParticle> * childParticles = dc.pbe->getChildParticleList();
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = childParticles->getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
Expand Down Expand Up @@ -930,7 +930,7 @@ void JPADraw::zDrawParticle() {
for (s32 i = 0; i < execEmtrPVisNum; i++)
mpExecEmtrPVis[i]->exec(&dc);

JSUList<JPABaseParticle> * activeParticles = &dc.pbe->mActiveParticles;
JSUList<JPABaseParticle> * activeParticles = dc.pbe->getParticleList();
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = activeParticles->getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
Expand Down Expand Up @@ -979,7 +979,7 @@ void JPADraw::zDrawChild() {
for (s32 i = 0; i < execEmtrCVisNum; i++)
mpExecEmtrCVis[i]->exec(&dc);

JSUList<JPABaseParticle> * childParticles = &dc.pbe->mChildParticles;
JSUList<JPABaseParticle> * childParticles = dc.pbe->getChildParticleList();
if (dc.pbsp->getListOrder() == 0) {
for (JSULink<JPABaseParticle> * link = childParticles->getFirst(); link != NULL; link = link->getNext()) {
JPABaseParticle * ptcl = (JPABaseParticle*)link->getObject();
Expand Down
2 changes: 1 addition & 1 deletion src/d/d_ovlp_fade2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void dOvlpFd2_dlst_c::draw() {
GXSetCullMode(GX_CULL_NONE);
GXSetDither(GX_TRUE);
GXSetClipMode(GX_CLIP_DISABLE);
GXLoadPosMtxImm(g_mDoMtx_identity, GX_PNMTX0);
GXLoadPosMtxImm(mDoMtx_getIdentity(), GX_PNMTX0);
GXSetCurrentMtx(GX_PNMTX0);

GXBegin(GX_QUADS, GX_VTXFMT0, 4);
Expand Down
2 changes: 1 addition & 1 deletion src/d/d_ovlp_fade4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void dDlst_2Dt_Sp_c::draw() {
GXSetCullMode(GX_CULL_NONE);
GXSetDither(GX_FALSE);
GXSetClipMode(GX_CLIP_DISABLE);
GXLoadPosMtxImm(g_mDoMtx_identity, GX_PNMTX0);
GXLoadPosMtxImm(mDoMtx_getIdentity(), GX_PNMTX0);
GXSetCurrentMtx(GX_PNMTX0);

f32 x1, y1;
Expand Down
Loading

0 comments on commit e402425

Please sign in to comment.