some bomb/bomb2 matches, TVec3::cubic match

This commit is contained in:
LagoLunatic
2023-12-20 00:08:40 -05:00
parent 3b2fcca7d4
commit cfe547b37d
6 changed files with 274 additions and 133 deletions
+14
View File
@@ -289,6 +289,20 @@ struct TVec3<f32> {
};
return res;
}
template<typename S>
void cubic(const JGeometry::TVec3<f32>& vec1, const JGeometry::TVec3<f32>& vec2, const JGeometry::TVec3<f32>& vec3, const JGeometry::TVec3<f32>& vec4, f32 f19) {
// TODO: name variables properly
f32 f5 = f19 * f19;
f32 f4 = f5 * f19;
f32 f3 = 1.0f + ((2.0f * f4) - (3.0f * f5));
f32 f2 = (-2.0f * f4) + (3.0f * f5);
f32 f1 = f19 + (f4 - (2.0f * f5));
f32 f0 = (f4 - f5);
this->x = (f3 * vec1.x) + (f2 * vec2.x) + (f1 * vec4.x) + (f0 * vec3.z);
this->y = (f3 * vec1.y) + (f2 * vec2.y) + (f1 * vec4.y) + (f0 * vec3.y);
this->z = (f3 * vec1.z) + (f2 * vec2.z) + (f1 * vec4.z) + (f0 * vec3.x);
}
};
template <typename T>
+22
View File
@@ -34,6 +34,28 @@ public:
~JPABaseParticle() {}
JPABaseParticle() : mLink(this), mCurFrame(0.0f) {}
void setOffsetPosition(f32 x, f32 y, f32 z) { mGlobalPosition.set(x, y, z); }
void setOffsetPosition(const JGeometry::TVec3<f32>& pos) { mGlobalPosition.set(pos); }
void calcCB(JPABaseEmitter*) {}
void checkStatus(u32) {}
void clearStatus(u32) {}
void drawCB(JPABaseEmitter*) {}
void getAge() const {}
void getDrawParamCPtr() {}
void getDrawParamPPtr() {}
void getGlobalPosition(JGeometry::TVec3<f32>&) const {}
void getHeight() {}
void getLifeTime() const {}
void getLocalPosition(JGeometry::TVec3<f32>&) const {}
void getOffsetPosition(JGeometry::TVec3<f32>&) const {}
void getVelVec(JGeometry::TVec3<f32>&) const {}
void getWidth() {}
void initStatus(u32) {}
void isInvisibleParticle() {}
void setCallBackPtr(JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*>*) {}
void setDeleteParticleFlag() {}
void setInvisibleParticleFlag() {}
void setStatus(u32) {}
public:
/* 0x00 */ JSULink<JPABaseParticle> mLink;
+9 -13
View File
@@ -9,14 +9,11 @@
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_ext.h"
class daBomb_fuseSmokeEcallBack : public dPa_levelEcallBack {
public:
daBomb_fuseSmokeEcallBack() {}
~daBomb_fuseSmokeEcallBack();
~daBomb_fuseSmokeEcallBack() {}
void init(JPABaseEmitter*);
void execute(JPABaseEmitter*);
void executeAfter(JPABaseEmitter*);
void draw(JPABaseEmitter*);
@@ -33,11 +30,9 @@ public:
class daBomb_fuseSparksEcallBack : public dPa_levelEcallBack {
public:
daBomb_fuseSparksEcallBack() {}
~daBomb_fuseSparksEcallBack();
~daBomb_fuseSparksEcallBack() {}
void init(JPABaseEmitter*);
void execute(JPABaseEmitter*);
void executeAfter(JPABaseEmitter*);
void draw(JPABaseEmitter*);
void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);
@@ -136,7 +131,12 @@ public:
PRM_VERSION_S = 0x1F,
};
void attrType() const {}
struct Attr_c {
const char* resName;
u32 heapSize;
};
const Attr_c& attrType() const { return m_attrType[mType]; }
s16 getBombRestTime();
s16 getBombCheck_Flag();
@@ -213,11 +213,7 @@ private:
/* 0x7C4 */ int mMassCounter;
/* 0x7C8 */ int field_0x7C8;
struct AttrType {
const char* resName;
u32 heapSize;
};
static const AttrType m_attrType[];
static const Attr_c m_attrType[];
}; // Size 0x7CC
#endif /* D_A_BOMB_H */
+2 -5
View File
@@ -14,13 +14,12 @@ namespace daBomb2 {
class FuseSmokeCB_c : public dPa_levelEcallBack {
public:
FuseSmokeCB_c() {}
virtual ~FuseSmokeCB_c();
virtual ~FuseSmokeCB_c() {}
void setOldPosP(const cXyz*, const cXyz*);
void deleteCallBack();
//void init(JPABaseEmitter*);
void execute(JPABaseEmitter*);
void executeAfter(JPABaseEmitter*);
void draw(JPABaseEmitter*);
@@ -37,13 +36,11 @@ namespace daBomb2 {
class FuseSparksCB_c : public dPa_levelEcallBack {
public:
FuseSparksCB_c() {}
virtual ~FuseSparksCB_c();
virtual ~FuseSparksCB_c() {}
void deleteCallBack();
//void init(JPABaseEmitter*);
void execute(JPABaseEmitter*);
//void executeAfter(JPABaseEmitter*);
void draw(JPABaseEmitter*);
void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8);