diff options
-rw-r--r-- | include/g3dhax.h | 9 | ||||
-rwxr-xr-x | include/game.h | 54 | ||||
-rw-r--r-- | kamek_pal.x | 11 |
3 files changed, 45 insertions, 29 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
diff --git a/kamek_pal.x b/kamek_pal.x index dc68d43..7e91ce8 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -1,4 +1,6 @@ SECTIONS { + SmoothRotation__FPsss = 0x8015F630; + KazanRock_OriginalCollisionCallback = 0x8081F420; KazanRock_Explode = 0x8081F190; @@ -52,6 +54,7 @@ SECTIONS { DetachSound__Q34nw4r3snd11SoundHandleFv = 0x8027A340; Stop__Q44nw4r3snd6detail10BasicSoundFi = 0x80266390; + SetPitch__Q44nw4r3snd6detail10BasicSoundFf = 0x802675F0; StrmSound_SetTrackVolume = 0x8027F9D0; RESTART_CRSIN_LevelStartStruct = 0x80374060; @@ -758,6 +761,7 @@ SECTIONS { setup__7PhysicsFP8dActor_cffffPvPvPvUcUcP7Point2d = 0x8007FA40; setup__7PhysicsFP8dActor_cPQ27Physics4InfoUcUcP7Point2d = 0x8007FB10; globalListHead__7Physics = 0x8042A0C0; + setPtrToRotation__7PhysicsFPs = 0x8007FD80; spinningPhysicsCallback = 0x808A2380; /* spinningPhysicsCallback__7Physics = 0x808A2380; */ @@ -1464,8 +1468,8 @@ SECTIONS { bindEntry__Q23m3d11anmTexPat_cFPQ23m3d5mdl_cPQ34nw4r3g3d12ResAnmTexPatii = 0x80166d10; process__Q23m3d11anmTexPat_cFv = 0x80166f10; processOneEntry__Q23m3d11anmTexPat_cFv = 0x80166fc0; - getFrameForEntry__Q23m3d11anmTexPat_cFv = 0x80167020; - setFrameForEntry__Q23m3d11anmTexPat_cFfi = 0x80167020; + getFrameForEntry__Q23m3d11anmTexPat_cFi = 0x80167020; + setFrameForEntry__Q23m3d11anmTexPat_cFfi = 0x80167030; getUpdateRateForEntry__Q23m3d11anmTexPat_cFv = 0x80167040; setUpdateRateForEntry__Q23m3d11anmTexPat_cFfi = 0x80167050; isEntryAnimationDone__Q23m3d11anmTexPat_cFv = 0x80167060; @@ -1699,6 +1703,9 @@ SECTIONS { HurtMarioBecauseOfBeingSquashed = 0x80056370; + instance__7StageE4 = 0x8042A020; + killAllEnemiesAtLevelEnd__7StageE4Fi = 0x80066A40; + .text : { FILL (0) |