summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-22 00:22:16 +0100
committerTreeki <treeki@gmail.com>2013-02-22 00:22:16 +0100
commit47c6a8826430eb0836cb0ef811f7492cae76e91c (patch)
treef014a382f3858de1c1d38bbccafb5c3f3236646c /include
parent79bc1010ca47c234fe372bca82368f076970a2b8 (diff)
downloadkamek-47c6a8826430eb0836cb0ef811f7492cae76e91c.tar.gz
kamek-47c6a8826430eb0836cb0ef811f7492cae76e91c.zip
lots of API updates
Diffstat (limited to 'include')
-rw-r--r--include/g3dhax.h9
-rwxr-xr-xinclude/game.h54
2 files changed, 36 insertions, 27 deletions
diff --git a/include/g3dhax.h b/include/g3dhax.h
index 85dc922..bc52403 100644
--- a/include/g3dhax.h
+++ b/include/g3dhax.h
@@ -252,7 +252,7 @@ namespace m3d {
virtual void _vf0C();
virtual void _vf10();
virtual bool scheduleForDrawing();
- virtual void bindAnim(void *anim, float boo);
+ virtual void bindAnim(banm_c *anim);
virtual void _vf1C();
bool setup(nw4r::g3d::ResMdl model, void *allocator, u32 bufferOption, int nView, u32 *size);
@@ -336,7 +336,7 @@ namespace m3d {
void bind(/*b*/mdl_c *model, nw4r::g3d::ResAnmVis anmRes, bool playsOnce);
};
- class anmClr_c : public fanm_c {
+ class anmClr_c : public banm_c {
public:
class child_c : public fanm_c {
~child_c();
@@ -364,6 +364,9 @@ namespace m3d {
void setEntryByte34(u8 value, int number);
float getEntryField28(int number);
+ private:
+ child_c *children;
+
};
class anmTexPat_c : public banm_c {
@@ -397,7 +400,7 @@ namespace m3d {
void setEntryByte34(u8 value, int number);
float getEntryField28(int number);
- private:
+ //private:
child_c *children;
void processOneEntry(int number);
diff --git a/include/game.h b/include/game.h
index 4d9def6..aa26018 100755
--- a/include/game.h
+++ b/include/game.h
@@ -589,6 +589,14 @@ class mMtx {
+float FastS16toFloat(s16 value) {
+ register s16 *pValue = &value;
+ register float output;
+ asm { psq_l output, 0(pValue), 1, 3 }
+ return output;
+}
+
+
namespace nw4r {
namespace math {
float CosFIdx(float);
@@ -2800,7 +2808,7 @@ public:
dPlayerModelBase_c(u8 player_id); // 800D5420
virtual ~dPlayerModelBase_c(); // 800D55D0
- char allocator[28]; // actually a mHeapAllocatorSubclass but I don't have that
+ mHeapAllocator_c allocator;
u32 _20;
u32 _24;
char someAnimation[2][0x38]; // actually PlayerAnim's
@@ -2903,29 +2911,12 @@ class dPlayerModel_c : public dPlayerModelBase_c {
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;
+ m3d::anmTexPat_c bodySwitchAnim;
+ m3d::anmClr_c bodyStarAnmClr;
+ m3d::anmTexPat_c headSwitchAnim;
+ m3d::anmTexPat_c propHeadSwitchAnim;
+ m3d::anmTexPat_c pengHeadSwitchAnim;
+ m3d::anmClr_c headStarAnmClr;
u32 currentPlayerModelID;
u32 lastPlayerModelID;
@@ -3727,6 +3718,7 @@ bool FreeBreft(int efNum);
// a bad hack
extern "C" void Stop__Q44nw4r3snd6detail10BasicSoundFi(void *_this, int unk);
extern "C" void StrmSound_SetTrackVolume(void *_this, u32 mask, int count, float value);
+extern "C" void SetPitch__Q44nw4r3snd6detail10BasicSoundFf(void *_this, float value);
namespace nw4r {
namespace snd {
@@ -3740,6 +3732,8 @@ namespace nw4r {
bool Exists() { return (data != 0); }
void Stop(int unk) { Stop__Q44nw4r3snd6detail10BasicSoundFi(data, unk); }
+ void SetPitch(float value) { SetPitch__Q44nw4r3snd6detail10BasicSoundFf(data, value); }
+
void *GetSound() const { return data; }
void DetachSound();
@@ -3822,6 +3816,15 @@ class dStockItem_c : public dBase_c {
};
+class StageE4 {
+ public:
+ static StageE4 *instance;
+
+ void killAllEnemiesAtLevelEnd(int type);
+ // 0=normal, 1=?, 2=kill indiscriminately, for ambush levels
+ // just use 0.
+};
+
// Some ugly code
extern void *SelectCursorPointer;
extern "C" void UpdateSelectCursor(nw4r::lyt::Pane *pane, int whichOne, bool unkBool);
@@ -3836,5 +3839,8 @@ inline int Player_VF3D4(void *self) {
extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handle, int id, int unk);
+
+bool SmoothRotation(s16 *pValue, s16 target, s16 stepSize);
+
#endif