summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h2
-rw-r--r--include/daEnDosun_c.h74
-rw-r--r--include/daEnemy_c.h30
-rw-r--r--include/g3dhax.h16
-rwxr-xr-xinclude/game.h114
5 files changed, 227 insertions, 9 deletions
diff --git a/include/common.h b/include/common.h
index e212eb4..a070a56 100644
--- a/include/common.h
+++ b/include/common.h
@@ -40,7 +40,7 @@ typedef f32 ROMtx[4][3];
typedef f32 (*ROMtxPtr)[3];
typedef struct { f32 x, y; } VEC2, Vec2, *Vec2Ptr, Point2d, *Point2dPtr;
-typedef struct { f32 x, y, z; } VEC3, Vec, *VecPtr, Point3d, *Point3dPtr;
+typedef struct { f32 x, y, z; } VEC3, Vec, Vec3, *VecPtr, Point3d, *Point3dPtr;
typedef struct { s16 x; s16 y; s16 z; }S16Vec, *S16VecPtr;
typedef struct { f32 x, y, z, w; } Quaternion, *QuaternionPtr, Qtrn, *QtrnPtr;
diff --git a/include/daEnDosun_c.h b/include/daEnDosun_c.h
new file mode 100644
index 0000000..49acabe
--- /dev/null
+++ b/include/daEnDosun_c.h
@@ -0,0 +1,74 @@
+#ifndef __DOSUN_H
+#define __DOSUN_H
+
+#include <daEnemy_c.h>
+
+/* All Addresses NTSCv2 */
+
+class daEnDosun_c : public daEnemy_c {
+public:
+ //vtable // 80ae8268
+ //ctor - Normal // 809f5ad0
+ //ctor - Big // 809f5b60
+ int onCreate(); // 809f5bf0
+ int onDelete(); // 809f5fd0
+ int onExecute(); // 809f5e50
+ int onDraw(); // 809f5ea0
+ //~daEnBigDosun_c(); // 809f7140
+ void kill(); // 809f7110
+ void killedByLevelClear(); // 809f6810
+ void collisionCat3_StarPower(ActivePhysics* apThis, ActivePhysics *apOther); // 809f6050
+ void _vf108(ActivePhysics* apThis, ActivePhysics* apOther); // 809f5fe0
+ void collisionCatD_GroundPound(ActivePhysics* apThis, ActivePhysics* apOther); // 809f7130
+ void _vf110(ActivePhysics* apThis, ActivePhysics* apOther); // 809f6090
+ void collisionCat7_WMWaggleWater(ActivePhysics* apThis, ActivePhysics* apOther); // 809f7120
+ void collisionCat9_RollingObject(ActivePhysics* apThis, ActivePhysics* apOther); // 809f70a0
+ void collisionCat1_Fireball_E_Explosion(ActivePhysics* apThis, ActivePhysics* apOther); // 809f70e0
+ bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics* apThis, ActivePhysics* apOther); // 809f70b0
+ void _vf144(int something); // 809f6120
+ //State Functions
+ void DieFall_Begin(); // 809f6e00
+ void DieFall_Execute(); // 809f6f10
+ void DieFall_End(); // 809f6f00
+ void Ice_Begin(); // 809f7020
+ void Ice_Execute(); // 809f7090
+ void Ice_End(); // 809f7080
+ bool CreateIceActors(); // 809f6260
+
+ mHeapAllocator_c allocator; // _524
+ nw4r::g3d::ResFile resFile; // _540
+ m3d::mdl_c bodyModel; // _544
+ m3d::anmVis_c anmVis; // _584
+ //u8 collision_struct[4]; // _5BC
+ u32 collision_struct; // _5BC
+ u32 _5C0, _5C4, _5C8;
+ float posXrelated_1; // _5CC
+ u32 bigOrSmall; // _5D0 0=small,1=big
+ u32 holdsFromSettings; // _5D4
+ u16 puruMoveCounter; // _5D8
+ u16 _5DA;
+ u32 countdownTimer; // _5DC
+ u32 anotherCounter; // _5E0
+ float posXrelated_2; // _5E4
+ float posYrelated_1; // _5E8
+ u32 _5EC;
+
+ /* don't have params yet */
+ void setupBodyModel(); // 809f63f0
+ void s_809F6530(); // 809f6530
+ void spawnEffects(); // 809f66a0
+
+ USING_STATES(daEnDosun_c);
+ REF_NINTENDO_STATE(UpWait);
+ REF_NINTENDO_STATE(DownMoveWait);
+ REF_NINTENDO_STATE(PuruMove);
+ REF_NINTENDO_STATE(DownMove_Kameck);
+ REF_NINTENDO_STATE(DownMove);
+ REF_NINTENDO_STATE(DownWait);
+ REF_NINTENDO_STATE(UpMove);
+ REF_NINTENDO_STATE(DieFall);
+ REF_NINTENDO_STATE(Ice);
+};
+
+#endif
+
diff --git a/include/daEnemy_c.h b/include/daEnemy_c.h
new file mode 100644
index 0000000..36fd574
--- /dev/null
+++ b/include/daEnemy_c.h
@@ -0,0 +1,30 @@
+#ifndef __ENEMY_H
+#define __ENEMY_H
+
+#include <common.h>
+#include <game.h>
+#include <g3dhax.h>
+
+/* All Addresses NTSCv2 */
+
+class daEnemy_c : public dEn_c {
+public:
+ int _vf58(); // 809a54e0 // daEnAkoya_c
+ void _vf5C(); // 809a54d0 // daEnAkoya_c
+ int _vf68(); // 809a5520 // daEnAkoya_c
+ //u8* _vf6C(); // 809a3550 // daEnAkoya_c
+ //FIXME
+ u8* ptrToWhichPlayer(); // 809a3550 // daEnAkoya_c
+ int _vf74(); // 809a5510 // dActorState_c
+ void _vf7C(); // 809a5500 // dActorState_c
+ void _vfB8(); // 809a54f0 // dActorState_c
+ void _vf228(); // 809a5560 // smthg w/InitlScale
+ void _vf23C(); // 809a5550 // nullsub
+ void _vf240(); // 809a5540 // nullsub
+ int _vf244(); // 809a5530 // return 0;
+
+ void setupBodyModel(); //FIXME
+};
+
+#endif
+
diff --git a/include/g3dhax.h b/include/g3dhax.h
index d4aa9a0..f13aab3 100644
--- a/include/g3dhax.h
+++ b/include/g3dhax.h
@@ -29,6 +29,7 @@ namespace nw4r {
};
class ResAnmChr { public: void* data; ResAnmChr(void *p = NULL) { data = p; } };
+ class ResAnmVis { public: void* data; ResAnmVis(void *p = NULL) { data = p; } };
class ResAnmTexPat { public: void* data; ResAnmTexPat(void *p = NULL) { data = p; } };
class ResAnmTexSrt { public: void* data; ResAnmTexSrt(void *p = NULL) { data = p; } };
@@ -49,7 +50,7 @@ namespace nw4r {
void * /*ResTex*/ GetResTex(const ResName n) const;
void * /*ResTex*/ GetResTex(u32 idx) const;
ResAnmChr GetResAnmChr(const char *str) const;
- void * /*ResAnmVis*/ GetResAnmVis(const char *str) const;
+ ResAnmVis GetResAnmVis(const char *str) const;
void * /*ResAnmClr*/ GetResAnmClr(const char *str) const;
ResAnmTexPat GetResAnmTexPat(const char *str) const;
ResAnmTexSrt GetResAnmTexSrt(const char *str) const;
@@ -279,7 +280,7 @@ namespace m3d {
// 28 might be Max Frame?
float _28, _2C, currentFrame;
- u8 _34;
+ u8 _34; // animation group??
};
class anmChr_c : public fanm_c {
@@ -293,6 +294,17 @@ namespace m3d {
void bind(/*b*/mdl_c *model, nw4r::g3d::ResAnmChr anmRes, int unk);
};
+ class anmVis_c : public fanm_c {
+ public:
+ ~anmVis_c();
+ int _vf0C();
+
+ bool setup(nw4r::g3d::ResMdl modelRes, nw4r::g3d::ResAnmVis anmRes,
+ mAllocator_c *allocator, u32 *sizeOutPtr);
+
+ void bind(/*b*/mdl_c *model, nw4r::g3d::ResAnmVis anmRes, int unk);
+ };
+
class anmTexPat_c : public banm_c {
public:
class child_c : public fanm_c {
diff --git a/include/game.h b/include/game.h
index 0fa72c9..5fd71d5 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1232,6 +1232,107 @@ public:
};
+class dStageActor_c; // forward declaration
+class collisionMgr_c {
+public:
+ collisionMgr_c();
+ virtual ~collisionMgr_c();
+
+ //FIXME params and returns and add more
+ void Clear1();
+ void Clear2();
+ void Init(dStageActor_c*,u8*,u8*,u8*);
+
+ void Clear3();
+ int CollidedWithTile();
+
+ dStageActor_c* owner;
+ void* struct1_ptr;
+ void* struct2_ptr;
+ void* some_ptr;
+ Vec3* parent_pos_ptr;
+ Vec3* parent_last_pos_ptr;
+ Vec3* parent_speed_ptr;
+ Vec3 someVelocityThing;
+ float xDeltaMaybe;
+ float yDeltaMaybe;
+ u8 _34[24]; //FIXME
+ float someFloat;
+ void* class2DC_ptr; //FIXME
+ void* another_ptr;
+ void* ptr_to_ptr_to_underneath_actor;
+ u8 _5C[44]; //FIXME
+ u32 bitfield_for_checks;
+ u32 bitfield_backup;
+ u32 _90, _94;
+ u8 which_player_of_parent;
+ u8 which_controller;
+ u16 _9A, _9C;
+ u8 _9E[2]; //FIXME
+ u32 another_bitfield;
+ u8 _A4;
+ u8 _A5[3]; //FIXME
+ u32 yet_another_bitfield;
+ u8 _AC;
+ u8 _AD[3]; //FIXME
+ u32 directional_bitfields[2]; // left right
+ u8 flagsB8;
+ u8 flagsB9;
+ u8 _BA[2]; //FIXME
+ u8 _BC, _BD;
+ u16 _BE;
+ u8 _C0, _C1;
+ u16 _C2;
+ u8 _C4[4]; //FIXME
+ u16 _C8;
+ u8 _CA[22]; //FIXME
+ u8 _E0, _E1, _E2;
+ u8 _E3; //FIXME
+ u8 _E4, _E5;
+ u8 _E6[2]; //FIXME
+ u32 current_layer_ptr;
+ u8 current_layer;
+ u8 _ED[3]; //FIXME
+};
+
+class freezeMgr_c {
+public:
+ u32 some_count;
+ u32 ice_timer1;
+ u32 ice_timer2;
+ u32 _mstate; //0=not,1=frozen,3=die_coin
+ u32 _10;
+ u32 _nstate; //1=countdown,2=meltedNormal
+ u32 spawns_coin; //1=delete,3=coin
+ u32 _1C_timerLenType;
+ u32 _20_defaultTimerLenType;
+ u32 _24;
+ u32 _28;
+ u32 perm_freeze;
+ u32 _30;
+ u32 actorIds[12];
+ void* owner; // _64
+
+ freezeMgr_c();
+ ~freezeMgr_c();
+ //FIXME add params and returns
+ void doSomethingCool1();
+ void doSomethingCool2();
+ void setSomething(u32,u32,u32);
+ void Create_ICEACTORs(void*,int);
+ void Delete_ICEACTORs();
+ void SetIceTimer_pt1();
+ void SetIceTimer_pt2();
+ void CheckIceTimer_lte_Value();
+ void doSomethingCool3();
+ void doSomethingCool4();
+ void doSomethingCool5();
+ void doSomethingCool6();
+ void DoMeltNormal();
+ void doSomethingCool7();
+ void CheckCountdownTimer();
+};
+
class fBase_c {
public:
u32 id;
@@ -1339,7 +1440,7 @@ public:
Vec pos;
Vec last_pos;
Vec pos_delta;
- Vec _D0;
+ Vec pos_delta2;
Vec scale;
Vec speed;
Vec max_speed;
@@ -1370,8 +1471,7 @@ public:
float _140;
u32 _144;
ActivePhysics aPhysics;
- u8 classAt1EC[236];
- u32 _2D8;
+ collisionMgr_c collMgr;
u8 classAt2DC[0x34];
u32 _310, _314;
float spriteSomeRectX, spriteSomeRectY;
@@ -1426,7 +1526,7 @@ public:
virtual void _vfA4(void *other); // AcPy/PlBase? similar to vf94 but not quite the same
virtual float _vfA8(void *other); // AcPy/PlBase? what DOES this do...? does a bit of float math
virtual void _vfAC(void *other); // copies somethingRelatedToScale into scale, then multiplies scale by vfA8's return
- virtual void _vfB0(); // plays Wm_en_burst_s at actor position
+ virtual void killedByLevelClear(); // plays Wm_en_burst_s at actor position
virtual void _vfB4(); // params unknown. nullsub
virtual void _vfB8(); // params unknown. nullsub
virtual void _vfBC(); // params unknown. nullsub
@@ -1512,7 +1612,9 @@ public:
u32 _474, _478;
dEn_c *_47C;
u32 _480;
- u8 classAt484[0x4EC - 0x484];
+ //FIXME verify that size fits
+ //u8 classAt484[0x4EC - 0x484];
+ freezeMgr_c frzMgr;
u32 _4EC;
float _4F0, _4F4, _4F8;
u32 flags_4FC;
@@ -1634,7 +1736,7 @@ public:
virtual void _vf220(void *other); // some type of actor, PlBase? calls vf3F4 on other with r4=this, r5=0
virtual void _vf224(); // stores a couple of values into the struct at 464
virtual void _vf228(); // more fun stuff with 464 and floats
- virtual bool _vf22C(); // does stuff involving ICE_ACTORs and arrays
+ virtual bool CreateIceActors(); // does stuff involving ICE_ACTORs and arrays
virtual void _vf230(); // "relatedToPlayerOrYoshiCollision" apparently. nullsub, params unknown for now.
virtual void _vf234(); // nullsub, params unknown
virtual void _vf238(); // calls vf34 on class394, params unknown