diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2024-02-03 12:28:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-03 02:28:50 -0800 |
| commit | c4cd497fd6c374ec3a7ca7c4b7b94b70a4328d20 (patch) | |
| tree | 4fd63b67afcb3f73a643bb8e13f667c3e4ff2d04 /include/Z2AudioLib | |
| parent | 228b5e17d8418a31e13386ad66d367884b978212 (diff) | |
Work on Z2EnvSeMgr (#2059)
Diffstat (limited to 'include/Z2AudioLib')
| -rw-r--r-- | include/Z2AudioLib/Z2Creature.h | 1 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2EnvSeMgr.h | 52 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2SeMgr.h | 34 |
3 files changed, 37 insertions, 50 deletions
diff --git a/include/Z2AudioLib/Z2Creature.h b/include/Z2AudioLib/Z2Creature.h index 00506ac0dd..b787cb89ac 100644 --- a/include/Z2AudioLib/Z2Creature.h +++ b/include/Z2AudioLib/Z2Creature.h @@ -82,6 +82,7 @@ public: Z2SoundObjSimple& getKantera() { return mKantera; } u8 getLinkHp() const { return mLinkHp; } u8 getMovingTime() { return mMovingTime; } + u8 isWolfSmellOpen() const { return mWolfEyeOpen; } static Z2CreatureLink* mLinkPtr; diff --git a/include/Z2AudioLib/Z2EnvSeMgr.h b/include/Z2AudioLib/Z2EnvSeMgr.h index 9b65c8acf3..46efbcdfbb 100644 --- a/include/Z2AudioLib/Z2EnvSeMgr.h +++ b/include/Z2AudioLib/Z2EnvSeMgr.h @@ -5,11 +5,21 @@ #include "Z2AudioLib/Z2SeMgr.h" #include "global.h" +enum WindType { + WIND_TYPE_0, + WIND_TYPE_1, + WIND_TYPE_2, + WIND_TYPE_3, +}; + struct Z2EnvSeBase { /* 802C589C */ Z2EnvSeBase(Vec* param_0 = NULL); /* 802C58AC */ ~Z2EnvSeBase(); - /* 802C5908 */ void startEnvSe(JAISoundID, f32, f32, f32, f32, f32, u32); - /* 802C5AB4 */ void startEnvSeLevel(JAISoundID, f32, f32, f32, f32, f32, u32); + /* 802C5908 */ bool startEnvSe(JAISoundID, f32, f32, f32, f32, f32, u32); + /* 802C5AB4 */ bool startEnvSeLevel(JAISoundID, f32, f32, f32, f32, f32, u32); + + JAISoundHandle* getHandle() { return &mHandle; } + void setPos(Vec* pos) { mPos = pos; } /* 0x0 */ Vec* mPos; /* 0x4 */ JAISoundHandle mHandle; @@ -20,7 +30,7 @@ struct Z2EnvSeAutoPan : public Z2EnvSeBase { /* 802C5F28 */ ~Z2EnvSeAutoPan(); /* 802C5F7C */ void setPanParam(f32, f32, bool, bool, f32, f32); /* 802C5F98 */ void calcPan(); - /* 802C60E0 */ void startEnvSeAutoPanLevel(JAISoundID, f32, f32, f32); + /* 802C60E0 */ bool startEnvSeAutoPanLevel(JAISoundID, f32, f32, f32); /* 0x08 */ f32 field_0x8; /* 0x0C */ f32 field_0xc; @@ -35,7 +45,7 @@ struct Z2EnvSeDir : public Z2EnvSeBase { /* 802C5D1C */ ~Z2EnvSeDir(); /* 802C5D70 */ void setPanDir(Vec*); /* 802C5D9C */ void calcPan(f32); - /* 802C5E90 */ void startEnvSeDirLevel(JAISoundID, f32, f32); + /* 802C5E90 */ bool startEnvSeDirLevel(JAISoundID, f32, f32); /* 0x08 */ f32 field_0x8; /* 0x0C */ f32 field_0xc; @@ -51,30 +61,30 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> { /* 802C6AC0 */ void initSceneEnvSe(s32, s8, f32); /* 802C6C1C */ void playSceneEnvSe(); /* 802C6C84 */ void initStaticEnvSe(u8, u8, u8, u8, Vec*); - /* 802C70C8 */ void startStaticEnvSe(s8); + /* 802C70C8 */ bool startStaticEnvSe(s8); /* 802C780C */ void registWindowPos(Vec*); - /* 802C7830 */ void startRainSe(s32, s8); + /* 802C7830 */ bool startRainSe(s32, s8); /* 802C7CF4 */ void startNearThunderSe(s8); /* 802C7E68 */ void startFarThunderSe(Vec*, s8); /* 802C7FB4 */ void setSnowPower(s8); /* 802C7FBC */ void initStrongWindSe(); /* 802C7FC8 */ void setWindDirection(Vec*); - /* 802C800C */ void startStrongWindSe(s8); + /* 802C800C */ bool startStrongWindSe(s8); /* 802C80F8 */ void initRiverSe(u8, u8, u8, u8); /* 802C8234 */ void registRiverSePos(Vec*); /* 802C8258 */ void setHyrulSewerOpen(bool); - /* 802C8300 */ void startRiverSe(s8); + /* 802C8300 */ bool startRiverSe(s8); /* 802C8730 */ void initFallSe(u8, u8, u8, u8); /* 802C886C */ void registFallSePos(Vec*); - /* 802C8890 */ void startFallSe(s8); + /* 802C8890 */ bool startFallSe(s8); /* 802C8A90 */ void initEtcSe(u8, u8, u8, u8); /* 802C8C24 */ void registEtcSePos(Vec*); - /* 802C8C48 */ void startEtcSe(s8); + /* 802C8C48 */ bool startEtcSe(s8); /* 802C92C8 */ void registWolfSmellSePos(Vec*); - /* 802C92EC */ void startFogWipeTrigger(Vec*); + /* 802C92EC */ bool startFogWipeTrigger(Vec*); /* 802C93A0 */ void setFogWipeWidth(f32); /* 802C93E4 */ f32 getFogDensity(); - /* 802C9400 */ void startFogSe(); + /* 802C9400 */ bool startFogSe(); /* 802C950C */ void initLv3WaterSe(u8, u8, u8, u8); /* 802C9F58 */ void registLv3WaterSePos(u8, Vec*); /* 802CA794 */ void startLv3WaterSe(s8); @@ -90,9 +100,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> { /* 0x01C */ Z2EnvSeAutoPan field_0x1c; /* 0x038 */ u8 field_0x38; /* 0x039 */ u8 field_0x39; - /* 0x03C */ f32 field_0x3c; - /* 0x040 */ f32 field_0x40; - /* 0x044 */ f32 field_0x44; + /* 0x03C */ Vec field_0x3c; /* 0x048 */ f32 field_0x48; /* 0x04C */ f32 field_0x4c; /* 0x050 */ f32 field_0x50; @@ -115,11 +123,11 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> { /* 0x118 */ Z2EnvSeBase field_0x118; /* 0x120 */ Z2Calc::FNoise1f field_0x120; /* 0x130 */ Z2Calc::FNoise1f field_0x130; - /* 0x140 */ u8 field_0x140; - /* 0x141 */ u8 mSnowPower; + /* 0x140 */ s8 field_0x140; + /* 0x141 */ s8 mSnowPower; /* 0x144 */ Z2EnvSeDir field_0x144; /* 0x160 */ u8 mWindType; - /* 0x164 */ Z2MultiSeMgr field_0x164; + /* 0x164 */ Z2MultiSeMgr mRiverSeMgr; /* 0x180 */ Z2EnvSeBase field_0x180; /* 0x188 */ u8 field_0x188; /* 0x18C */ Z2Calc::FNoise1f field_0x18c; @@ -127,14 +135,14 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> { /* 0x1AC */ f32 field_0x1ac; /* 0x1B0 */ f32 field_0x1b0; /* 0x1B4 */ f32 field_0x1b4; - /* 0x1B8 */ u8 field_0x1b8; - /* 0x1BC */ Z2MultiSeMgr field_0x1bc; + /* 0x1B8 */ s8 field_0x1b8; + /* 0x1BC */ Z2MultiSeMgr mFallSeMgr; /* 0x1D8 */ Z2EnvSeBase field_0x1d8; /* 0x1E0 */ u8 field_0x1e0; /* 0x1E4 */ f32 field_0x1e4; /* 0x1E8 */ f32 field_0x1e8; /* 0x1EC */ f32 field_0x1ec; - /* 0x1F0 */ Z2MultiSeMgr field_0x1f0; + /* 0x1F0 */ Z2MultiSeMgr mEtcSeMgr; /* 0x20C */ Z2EnvSeBase field_0x20c; /* 0x214 */ u8 field_0x214; /* 0x218 */ f32 field_0x218; @@ -158,7 +166,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> { /* 0x2B4 */ f32 field_0x2b4; /* 0x2B8 */ f32 field_0x2b8; /* 0x2BC */ f32 field_0x2bc; - /* 0x2C0 */ Z2MultiSeMgr field_0x2c0; + /* 0x2C0 */ Z2MultiSeMgr mWolfSmellSeMgr; /* 0x2DC */ Z2EnvSeBase field_0x2dc; /* 0x2E4 */ u8 field_0x2e4; /* 0x2E8 */ Z2Calc::FNoise1f field_0x2e8; diff --git a/include/Z2AudioLib/Z2SeMgr.h b/include/Z2AudioLib/Z2SeMgr.h index 3760af1fa5..fb8c218c65 100644 --- a/include/Z2AudioLib/Z2SeMgr.h +++ b/include/Z2AudioLib/Z2SeMgr.h @@ -26,45 +26,23 @@ struct Z2MultiSeMgr { } f32 getMaxPowR() { - if (mMaxPowR > 1.0f) { - return 1.0f; - } else if (mMaxPowR < 0.0f) { - return 0.0f; - } else { - return mMaxPowR; - } + return (mMaxPowR > 1.0f) ? 1.0f : (mMaxPowR < 0.0f ? 0.0f : mMaxPowR); } f32 getMaxPowL() { - if (mMaxPowL > 1.0f) { - return 1.0f; - } else if (mMaxPowL < 0.0f) { - return 0.0f; - } else { - return mMaxPowL; - } + return (mMaxPowL > 1.0f) ? 1.0f : (mMaxPowL < 0.0f ? 0.0f : mMaxPowL); } f32 getMaxPowB() { - if (mMaxPowB > 1.0f) { - return 1.0f; - } else if (mMaxPowB < 0.0f) { - return 0.0f; - } else { - return mMaxPowB; - } + return (mMaxPowB > 1.0f) ? 1.0f : (mMaxPowB < 0.0f ? 0.0f : mMaxPowB); } f32 getMaxPowF() { - if (mMaxPowF > 1.0f) { - return 1.0f; - } else if (mMaxPowF < 0.0f) { - return 0.0f; - } else { - return mMaxPowF; - } + return (mMaxPowF > 1.0f) ? 1.0f : (mMaxPowF < 0.0f ? 0.0f : mMaxPowF); } + s8 getPosCount() { return mPosCount; } + /* 0x00 */ float mVolumeScale; /* 0x04 */ float mMaxVolume; /* 0x08 */ float mMaxPowL; |
