diff options
author | Treeki <treeki@gmail.com> | 2012-08-28 03:51:38 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-08-28 03:51:38 +0200 |
commit | 80a9d3f3ab5a08447bbbde669e7a077ffc3f1178 (patch) | |
tree | 6716124d4343837b896c5e0bf9fea161e4864ace /include | |
parent | f65f7b8050e2922900dcbebada6ca5ee875873f7 (diff) | |
download | kamek-80a9d3f3ab5a08447bbbde669e7a077ffc3f1178.tar.gz kamek-80a9d3f3ab5a08447bbbde669e7a077ffc3f1178.zip |
some header file changes/fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/bufferoption.h | 33 | ||||
-rw-r--r-- | include/g3dhax.h | 17 | ||||
-rwxr-xr-x | include/game.h | 54 |
3 files changed, 102 insertions, 2 deletions
diff --git a/include/bufferoption.h b/include/bufferoption.h new file mode 100644 index 0000000..62bfbb6 --- /dev/null +++ b/include/bufferoption.h @@ -0,0 +1,33 @@ +#ifndef BUFFEROPTION_H +#define BUFFEROPTION_H +enum BufferOption +{ + BUFFER_RESTEXOBJ = 0x00000001, + BUFFER_RESTLUTOBJ = 0x00000002, + BUFFER_RESTEXSRT = 0x00000004, + BUFFER_RESCHAN = 0x00000008, + BUFFER_RESGENMODE = 0x00000010, + BUFFER_RESMATMISC = 0x00000020, + BUFFER_VIS = 0x00000040, + + BUFFER_RESPIX = 0x00000080, + BUFFER_RESTEVCOLOR = 0x00000100, + BUFFER_RESINDMTXANDSCALE = 0x00000200, + BUFFER_RESTEXCOORDGEN = 0x00000400, + BUFFER_RESTEV = 0x00000800, + + BUFFER_VTXPOS = 0x00001000, + BUFFER_VTXNRM = 0x00002000, + BUFFER_VTXCLR = 0x00004000, + + ALWAYS_BUFFER_ANM_SHP = 0x01000000, + + ANM_MATCLR = BUFFER_RESTEVCOLOR | BUFFER_RESCHAN, + ANM_TEXPAT = BUFFER_RESTEXOBJ | BUFFER_RESTLUTOBJ, + ANM_TEXSRT = BUFFER_RESTEXSRT, + ANM_VIS = BUFFER_VIS, + ANM_SHP = BUFFER_VTXPOS | BUFFER_VTXNRM | BUFFER_VTXCLR, + ANM_VTX = ANM_SHP, + ANM_ALL = ANM_MATCLR | ANM_TEXPAT | ANM_TEXSRT | ANM_VIS | ANM_VTX +}; +#endif /* BUFFEROPTION_H */ diff --git a/include/g3dhax.h b/include/g3dhax.h index 551af40..8a2063a 100644 --- a/include/g3dhax.h +++ b/include/g3dhax.h @@ -17,6 +17,14 @@ namespace nw4r { } }; + class ResNode { + public: + void* data; + ResNode(void *p = NULL) { data = p; } + + u32 GetID() { return data ? (*((u32*)( ((u32)data) + 0xC ))) : 0; } + }; + class ResMdl { public: void * /*ResMdlData*/ data; @@ -26,6 +34,8 @@ namespace nw4r { } void * /*ResMat*/ GetResMat(const char *str) const; + + ResNode GetResNode(const char *str) const; }; class ResAnmChr { public: void* data; ResAnmChr(void *p = NULL) { data = p; } }; @@ -254,9 +264,12 @@ namespace m3d { void setScale(Vec *scale); void calcWorld(bool unk); + bool getMatrixForNode(u32 nodeID, MtxPtr matrix); // bmdl_c 801682C0 + void bindAnim(banm_c *animation, float unk); - char data[0x3C]; + void *scnObj; + char data[0x38]; }; @@ -437,5 +450,7 @@ void SetupTextures_Enemy(m3d::mdl_c *model, int sceneID); // 800B4170 void SetupTextures_MapObj(m3d::mdl_c *model, int sceneID); // 800B42B0 void SetupTextures_Item(m3d::mdl_c *model, int sceneID); // 800B43D0 +#include <bufferoption.h> + #endif diff --git a/include/game.h b/include/game.h index 51f8faf..af235b9 100755 --- a/include/game.h +++ b/include/game.h @@ -10,6 +10,7 @@ #include <rvl/arc.h>
#define offsetof(type, member) ((u32) &(((type *) 0)->member))
+#include <g3dhax.h>
template <typename T>
inline T min(T one, T two) { return (one < two) ? one : two; }
@@ -2233,6 +2234,8 @@ public: char yetAnotherAnimation[40]; // actually m3d::banm_c afaics -- is it even 40 bytes?
Vec HeadPos; // maybe not an array
Vec HatPos; // maybe not an array
+ Mtx finalMatrix;
+ Mtx firstMatrix;
Vec headOffs;
Vec pos;
u8 player_id_1;
@@ -2264,6 +2267,11 @@ public: u32 _204;
u32 _208;
+ class ModelThing {
+ public:
+ m3d::mdl_c body, head;
+ };
+
virtual int _vf0C(); // 800D6DA0
virtual void prepare(); // 800D5720
virtual void finaliseModel(); // 800D5740
@@ -2271,7 +2279,7 @@ public: virtual void update3DStuff(); // 800D5760
virtual void _vf20(); // 800D6D90
virtual void draw(); // 800D5C70
- virtual int getCurrentModel(); // 800D5870
+ virtual ModelThing *getCurrentModel(); // 800D5870
virtual int getCurrentResFile(); // 800D62D0
virtual void setPowerup(u8 powerup_id); // 800D5730
virtual void setPowerupTexture(); // 800D5CC0
@@ -2310,6 +2318,48 @@ public: };
+class dPlayerModel_c : public dPlayerModelBase_c {
+ public:
+ // methods? what do you need those for...
+ // (not bothering with them either)
+ nw4r::g3d::ResFile modelResFile, animResFile1, animResFile2;
+
+ u8 effectClass0[296];
+ u8 effectClass1[296];
+
+ ModelThing models[4];
+
+ // maybe these are mAllocator_c?
+ u8 body_switch_animation[12];
+ mHeapAllocator_c allocator0;
+ u32 anim0linked;
+
+ u8 anim1[12];
+ mHeapAllocator_c allocator1;
+ u32 anim1linked;
+
+ u8 headSwitchAnimation[12];
+ mHeapAllocator_c allocator2;
+ u32 anim2linked;
+
+ u8 animForProp[12];
+ mHeapAllocator_c allocator3;
+ u32 anim3linked;
+
+ u8 animForPeng[12];
+ mHeapAllocator_c allocator4;
+ u32 anim4linked;
+
+ u8 anim5[12];
+ mHeapAllocator_c allocator5;
+ u32 anim5linked;
+
+ u32 currentPlayerModelID;
+ u32 lastPlayerModelID;
+ // tons of crap more, don't feel like fixing this up atm
+};
+
+
class dPlayerModelHandler_c {
public:
dPlayerModelHandler_c(u8 player_id); // 800D6DB0
@@ -2943,6 +2993,8 @@ namespace mHeap { extern void *gameHeaps[3];
};
+void WriteNumberToTextBox(int *number, const int *fieldLength, nw4r::lyt::TextBox *textBox, bool unk); // 800B3B60
+
#endif
|