summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/game.h143
1 files changed, 143 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index a75629e..efd62bd 100755
--- a/include/game.h
+++ b/include/game.h
@@ -2707,6 +2707,149 @@ class dEffectBreakMgr_c {
};
+class EGG::Effect7C {
+ public:
+ virtual ~Effect7C();
+ virtual void clear();
+
+ u8 data[0x94];
+};
+
+class EGG::Effect {
+ public:
+ Effect(); // 802D7D90
+ virtual ~Effect();
+
+ char effectName[32];
+ u32 secondVarFromSpawnFunc;
+ u32 flags; // 1 = has translation, 2 = matrix was set, 4 = ?
+
+ float _2C, _30, _34;
+ Vec translate;
+ Mtx matrix;
+
+ u32 HandleBase_00, HandleBase_04;
+
+ Effect7C ef7C;
+
+ virtual bool _vf0C();
+ virtual void _vf10(); // related to RetireEmitterAll?
+ virtual void _vf14(); // also related to RetireEmitterAll?
+ virtual void _vf18(); // related to RetireEmitterAll and RetireParticleAll?
+ virtual void _vf1C(bool flag); // sets or clears some flag
+ virtual void _vf20(bool flag); // sets or clears another flag
+ virtual void _vf24(bool flag); // sets or clears both of those flags
+
+ // all these functions have a strange purpose
+ // _vf54 is the one sole exception to everything written below!
+ //
+ // they all call through to ef7C methods, which modify two bitfields stored in it:
+ // void EGG::Effect7C::modifyBitfields(u32 mask, u32 flagBit) {
+ // if (flagBit & 1)
+ // this->_04 |= mask;
+ // else
+ // this->_04 &= ~mask;
+ // if (flagBit & 2)
+ // this->_08 |= mask;
+ // else
+ // this->_08 &= ~mask;
+ // }
+ // after that, the methods set value(s) passed by the caller
+ virtual void _vf28(u16 unk, u32 flagBit); // flag is 1, value stored to its 0xC
+ virtual void _vf2C(float unk, u32 flagBit); // flag is 2, value stored to its 0x10
+ virtual void _vf30(u16 unk, u32 flagBit); // flag is 4, value stored to its 0x14
+ virtual void _vf34(u16 unk, u32 flagBit); // flag is 8, value stored to its 0x16
+ virtual void _vf38(char unk, u32 flagBit); // flag is 0x10, value stored to its 0x18
+ virtual void _vf3C(float unk, u32 flagBit); // flag is 0x20, value stored to its 0x1C
+ virtual void _vf40(float unk, u32 flagBit); // flag is 0x40, value stored to its 0x20
+ virtual void _vf44(float unk, u32 flagBit); // flag is 0x80, value stored to its 0x24
+ virtual void _vf48(float unk, u32 flagBit); // flag is 0x100, value stored to its 0x28
+ virtual void _vf4C(Vec *unk, u32 flagBit); // flag is 0x200, values stored at its 0x2C
+ virtual void _vf50(Vec *unk, u32 flagBit); // flag is 0x400, values stored at its 0x38
+ virtual void _vf54(Vec *unk);
+ virtual void _vf58(u8 r, u8 g, u8 b, u8 a, u32 flagBit); // flag is 0x1000, value stored to its 0x44
+
+ // this one is similar, but it stores two colours into an array at 0x48
+ // alpha values are ignored
+ // valid indices are 0 and 1 afaics?
+ // flag is 0x2000 << index (so, 0x2000 or 0x4000)
+ virtual void _vf5C(GXColor one, GXColor two, int index, u32 flagBit);
+
+ // this one sets the alpha for those colours
+ // flag is 0x8000 or 0x10000
+ virtual void _vf60(u8 one, u8 two, int index, u32 flagBit);
+
+ virtual void _vf64(Vec2 *vec, u32 flagBit); // flag is 0x20000, values stored at its 0x58
+ virtual void _vf68(Vec2 *vec, u32 flagBit); // flag is 0x40000, values stored at its 0x60
+ virtual void _vf6C(Vec *vec, u32 flagBit); // flag is 0x80000, values stored at its 0x68
+ virtual void _vf70(Vec *vec, u32 flagBit); // flag is 0x100000, values stored at its 0x74
+
+ // a bit of a special case: this one will set/clear 0x10000000 depending on flagBit
+ // but it'll also set 0x20000000 if anotherFlag is true
+ // if anotherFlag is false, it'll clear 0x20000000 even if flagBit is set
+ // values stored at ef7C's 0x80
+ virtual void _vf74(Vec *vec, bool anotherFlag, u32 flagBit);
+
+ virtual void _vf78(Vec *vec, u32 flagBit); // flag is 0x40000000, values stored at its 0x8C
+
+ virtual void _vf7C(Vec *one, Vec2 *two=0); // sets transformation vals and calls vf68
+
+ // stores to _2C, _30, _34
+ virtual void setXformValsFromParams(float one, float two, float three);
+ virtual void setXformValsFromVEC3(Vec *vec);
+
+ virtual void setTranslationFromVEC3(Vec *vec);
+ virtual void setMatrix(Mtx *mtx);
+
+ virtual void _vf90(/* ??? */); // absolutely zero idea what this does
+
+ virtual void makeItHappen(); // for internal use?
+
+ virtual void clear(); // resets all properties, etc
+};
+
+namespace mEf;
+class mEf::effect_c : public EGG::Effect {
+ public:
+ ~effect_c();
+
+ void clear();
+
+ virtual bool probablyCreateWithName(const char *name, u32 unk);
+ virtual bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ virtual bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
+
+ // these two deal with mEf::effectCB_c and crap. absolutely no idea.
+ virtual bool _vfA8(/* tons and tons of params */);
+ virtual bool _vfAC(/* a slightly smaller amount of params */);
+
+ virtual bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ virtual bool _vfB4(Mtx *mtx);
+};
+
+class mEf::es2 : public EGG::Effect {
+ public:
+ // vtable: 80329CA0
+ ~es2();
+
+ void _vf10();
+ void _vf18();
+
+ void makeItHappen();
+ bool probablyCreateWithName(const char *name, u32 unk);
+ bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
+ bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ bool _vfB4(Mtx *mtx);
+
+ virtual u8 returnField11D(); // does exactly what it says on the tin
+
+ u32 _114, _118;
+ u8 _11C, _11D;
+ u32 _120, _124;
+};
+
+
struct SSM { short width, height; float xScale, yScale; };
extern SSM ScreenSizesAndMultipliers[3];
extern int currentScreenSizeID;