diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2023-08-18 10:01:51 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-18 01:01:51 -0600 |
| commit | 00bbaf6216935df56f2b88456d60ea894ac20a53 (patch) | |
| tree | 6f04d4b9e137e71d85cd07133cccd8f912007f00 /include | |
| parent | 114582643fcdb8b99499984e7e8e1f6c4e0671da (diff) | |
Z2WolfHowlMgr, d_bg_s, quat OK (#1887)
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JAudio2/JAISound.h | 20 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2Audience.h | 7 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2Creature.h | 1 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2SceneMgr.h | 3 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2SeqMgr.h | 4 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2SoundMgr.h | 3 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2WolfHowlMgr.h | 32 | ||||
| -rw-r--r-- | include/d/bg/d_bg_w_base.h | 2 | ||||
| -rw-r--r-- | include/d/d_demo.h | 5 |
9 files changed, 61 insertions, 16 deletions
diff --git a/include/JSystem/JAudio2/JAISound.h b/include/JSystem/JAudio2/JAISound.h index 47b1e354e6..db2165326a 100644 --- a/include/JSystem/JAudio2/JAISound.h +++ b/include/JSystem/JAudio2/JAISound.h @@ -116,6 +116,17 @@ struct JAISoundFader { forceOut(); } } + void fadeIn(u32 param_1) { + if (param_1 == 0) { + forceIn(); + } else { + mTransition.set(1.0f, mIntensity, param_1); + } + } + void fadeInFromOut(u32 param_1) { + mIntensity = 0.0f; + fadeIn(param_1); + } bool isOut() { return (mTransition.mCount == 0 && mIntensity < 0.01f); } @@ -261,6 +272,15 @@ public: return audible_ != NULL; } + void fadeIn(u32 param_1) { + fader.fadeInFromOut(param_1); + return; + } + + s32 getCount() const { return mCount; } + + JAISoundParamsMove& getAuxiliary() { return params.mMove; } + /* 0x04 */ JAISoundHandle* handle_; /* 0x08 */ JAIAudible* audible_; /* 0x0C */ JAIAudience* audience_; diff --git a/include/Z2AudioLib/Z2Audience.h b/include/Z2AudioLib/Z2Audience.h index 4a91d14469..df3f518727 100644 --- a/include/Z2AudioLib/Z2Audience.h +++ b/include/Z2AudioLib/Z2Audience.h @@ -15,6 +15,8 @@ struct Z2AudioCamera { /* 802BCBEC */ void convertAbsToRel(Z2Audible*, int); /* 802BCC7C */ void convertAbsToRel(Vec&, Vec*) const; /* 802BCCC0 */ void isInSight(Vec&) const; + JGeometry::TVec3<f32>* getPos() { return &mPos; } + /* 0x00 */ u8 field_0x0[0x30]; // set up JGeometry::TPosition3 /* 0x30 */ JGeometry::TVec3<f32> mVel; @@ -128,6 +130,11 @@ struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> { /* 802BD71C */ virtual void mixChannelOut(JASSoundParams const&, JAIAudible*, int); Z2SpotMic* getLinkMic() { return mLinkMic; } + JGeometry::TVec3<f32> getAudioCamPos() { + JGeometry::TVec3<f32> pos; + JGeometry::setTVec3f(*(Vec*)mAudioCamera[0].getPos(), *(Vec*)pos); + return pos; + } /* 0x004 */ f32 field_0x4; /* 0x008 */ u8 field_0x8; diff --git a/include/Z2AudioLib/Z2Creature.h b/include/Z2AudioLib/Z2Creature.h index f6dac02f0f..cbc20652b6 100644 --- a/include/Z2AudioLib/Z2Creature.h +++ b/include/Z2AudioLib/Z2Creature.h @@ -75,6 +75,7 @@ public: void setInWater(bool status) { mInWater = status; } bool isInWater() { return mInWater; } + u8 getLinkState() const { return mLinkState; } static Z2CreatureLink* mLinkPtr; diff --git a/include/Z2AudioLib/Z2SceneMgr.h b/include/Z2AudioLib/Z2SceneMgr.h index 4cb65bf48a..1f6d9d5ebd 100644 --- a/include/Z2AudioLib/Z2SceneMgr.h +++ b/include/Z2AudioLib/Z2SceneMgr.h @@ -28,7 +28,8 @@ public: void loadSeWave(u32); void loadBgmWave(u32); - bool isSceneExist() { return sceneExist; } + bool isSceneExist() const { return sceneExist; } + int getCurrentSceneNum() const { return sceneNum; } private: /* 0x00 */ long BGM_ID; diff --git a/include/Z2AudioLib/Z2SeqMgr.h b/include/Z2AudioLib/Z2SeqMgr.h index 0313d0da0d..8d9f2dfb36 100644 --- a/include/Z2AudioLib/Z2SeqMgr.h +++ b/include/Z2AudioLib/Z2SeqMgr.h @@ -94,6 +94,10 @@ public: mAllBgmMaster.mTransition.set(val, mAllBgmMaster.mIntensity, count); } + bool isItemGetDemo() { + return field_0x08.isSoundAttached() || field_0xba != 0; + } + private: /* 0x00 */ JAISoundHandle mMainBgmHandle; /* 0x04 */ JAISoundHandle mSubBgmHandle; diff --git a/include/Z2AudioLib/Z2SoundMgr.h b/include/Z2AudioLib/Z2SoundMgr.h index dffb7174b2..5fb0c5acc9 100644 --- a/include/Z2AudioLib/Z2SoundMgr.h +++ b/include/Z2AudioLib/Z2SoundMgr.h @@ -23,9 +23,8 @@ public: /* 802AA9E8 */ void multiVolumeSoundID(JAISoundID, f32); /* 802AAAC4 */ void isPlayingSoundID(JAISoundID); - /* 802A9EE8 */ /* virtual */ void startSound(JAISoundID, JAISoundHandle*, + /* 802A9EE8 */ virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*); - /* 0x000 */ void* vtable; // remove later JAISeMgr* getSeMgr() { return &mSeMgr; } diff --git a/include/Z2AudioLib/Z2WolfHowlMgr.h b/include/Z2AudioLib/Z2WolfHowlMgr.h index 82c9846415..e48633730d 100644 --- a/include/Z2AudioLib/Z2WolfHowlMgr.h +++ b/include/Z2AudioLib/Z2WolfHowlMgr.h @@ -12,9 +12,15 @@ * The high byte of each u16 line corresponds to bar type (low, middle, high) * The low byte of each u16 line corresponds to length of note */ + +struct SongNote { + u8 barType; + u8 length; +}; + struct Z2WolfHowlData { u8 mLineNum; - u16* mSongData; + SongNote* mSongData; }; class Z2WolfHowlMgr : public JASGlobalInstance<Z2WolfHowlMgr> { @@ -23,17 +29,17 @@ public: void resetState(); void calcVolumeMod(f32); - void getNowPitch(); - void getNowInputValue(); + f32 getNowPitch(); + f32 getNowInputValue(); void calcPitchMod(f32, f32); void startWolfHowlSound(f32, f32, bool, f32); void setCorrectData(s8, Z2WolfHowlData*); - void getCorrectLine(u8); - void getCorrectLineNum(); - void checkLine(); - void getOnLineNum(); + SongNote getCorrectLine(u8); + u8 getCorrectLineNum(); + s8 checkLine(); + s8 getOnLineNum(); void startWindStoneSound(s8, Vec*); - void startGuideMelody(bool); + int startGuideMelody(bool); void skipCorrectDemo(); private: @@ -41,7 +47,7 @@ private: /* 0x04 */ JAISoundHandle field_0x04; /* 0x08 */ JAISoundHandle field_0x08; /* 0x0C */ Z2WolfHowlData* mpCurSong; - /* 0x10 */ Z2WolfHowlData** mpSongList; + /* 0x10 */ Z2WolfHowlData* mpSongList; /* 0x14 */ f32 mNowInputValue; /* 0x18 */ f32 field_0x18; /* 0x1C */ f32 field_0x1c; @@ -53,16 +59,18 @@ private: /* 0x34 */ f32 field_0x34; /* 0x38 */ f32 field_0x38[10]; /* 0x60 */ f32 field_0x60[10]; - /* 0x88 */ void* mTimer; + /* 0x88 */ u32 mTimer; /* 0x8C */ u8 mReleaseTimer; /* 0x8D */ u8 field_0x8d; /* 0x8E */ s8 mCorrectCurveID; /* 0x8F */ u8 field_0x8f; /* 0x90 */ s16 field_0x90; /* 0x92 */ u16 field_0x92[20]; - /* 0xBA */ s8 field_0xba; + /* 0xBA */ u8 field_0xba; /* 0xBB */ s8 field_0xbb; - /* 0xBC */ s8 field_0xbc; + /* 0xBC */ u8 field_0xbc; + /* 0xBD */ s8 field_0xbd; + /* 0xBE */ u16 field_0xbe; }; #endif /* Z2WOLFHOWLMGR_H */ diff --git a/include/d/bg/d_bg_w_base.h b/include/d/bg/d_bg_w_base.h index f0c358376c..22ee138595 100644 --- a/include/d/bg/d_bg_w_base.h +++ b/include/d/bg/d_bg_w_base.h @@ -23,7 +23,7 @@ public: PRIORITY_0, }; - typedef s32 (*PushPull_CallBack)(cBgS_PolyInfo const&, fopAc_ac_c*, s16, + typedef bool (*PushPull_CallBack)(fopAc_ac_c*, fopAc_ac_c*, s16, dBgW_Base::PushPullLabel); /* 8007E5A8 */ dBgW_Base(); diff --git a/include/d/d_demo.h b/include/d/d_demo.h index 407a82fdf3..582e4946f4 100644 --- a/include/d/d_demo.h +++ b/include/d/d_demo.h @@ -8,6 +8,7 @@ #include "SSystem/SComponent/c_xyz.h" #include "dolphin/gx/GXEnum.h" #include "dolphin/gx/GXStruct.h" +#include "Z2AudioLib/Z2SoundStarter.h" class J3DModel; class dDemo_actor_c; @@ -301,4 +302,8 @@ public: static const u8* m_branchData; }; +inline Z2SoundStarter* Z2GetSoundStarter() { + return JASGlobalInstance<Z2SoundStarter>::getInstance(); +} + #endif /* D_D_DEMO_H */ |
