work on Z2SoundMgr and Z2SeMgr (#2055)

This commit is contained in:
Caroline Madsen
2024-01-30 19:08:37 -05:00
committed by GitHub
parent 1c891adeb8
commit 255cc868e4
49 changed files with 1341 additions and 980 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ public:
static Z2AudioMgr* mAudioMgrPtr;
/* 0x0514 */ virtual int startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
/* 0x0514 */ virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
/* 0x0518 */ bool mResettingFlag;
/* 0x0519 */ bool field_0x519;
/* 0x051C */ JASAudioReseter mAudioReseter;
+1
View File
@@ -7,6 +7,7 @@ namespace Z2Calc {
enum CurveSign {
CURVE_SIGN_0 = 0,
CURVE_SIGN_1 = 1,
CURVE_SIGN_2 = 2,
};
struct FNoise1f {
+2 -2
View File
@@ -39,7 +39,7 @@ struct Z2LinkSoundStarter : public Z2SoundStarter {
Z2LinkSoundStarter();
inline virtual ~Z2LinkSoundStarter();
virtual int startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, f32,
virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, f32,
f32, f32, f32, f32, u32);
};
@@ -127,7 +127,7 @@ struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);
/* 802C5078 */ inline virtual ~Z2RideSoundStarter();
/* 802C5284 */ virtual int startSound(JAISoundID, JAISoundHandle*,
/* 802C5284 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
+4
View File
@@ -56,4 +56,8 @@ extern u8 struct_8045086A;
extern u8 struct_8045086B;
extern u8 data_8045086C;
extern u8 struct_80451340;
extern u8 struct_80451341;
extern u8 struct_80451342;
#endif /* Z2PARAM_H */
+1
View File
@@ -37,6 +37,7 @@ public:
void setInGame(bool i_inGame) { inGame = i_inGame; }
bool isInDarkness() const { return inDarkness; }
s8 getRoomReverb() const { return dComIfGp_getReverb(roomNum); }
bool isMovieDemo() { return sceneNum == 2 || sceneNum == 8 || sceneNum == 9; }
private:
/* 0x00 */ long BGM_ID;
+63 -13
View File
@@ -8,19 +8,69 @@
struct Z2MultiSeMgr {
Z2MultiSeMgr();
~Z2MultiSeMgr();
void registMultiSePos(Vec*);
s8 registMultiSePos(Vec*);
void resetMultiSePos();
void getPanPower();
void getDolbyPower();
f32 getPanPower();
f32 getDolbyPower();
void setVolumeScale(f32 param_0) { mVolumeScale = param_0; }
f32 getMaxVolume() {
if (mMaxVolume > 1.0f) {
return 1.0f;
} else if (mMaxVolume < 0.0f) {
return 0.0f;
} else {
return mMaxVolume;
}
}
f32 getMaxPowR() {
if (mMaxPowR > 1.0f) {
return 1.0f;
} else if (mMaxPowR < 0.0f) {
return 0.0f;
} else {
return mMaxPowR;
}
}
f32 getMaxPowL() {
if (mMaxPowL > 1.0f) {
return 1.0f;
} else if (mMaxPowL < 0.0f) {
return 0.0f;
} else {
return mMaxPowL;
}
}
f32 getMaxPowB() {
if (mMaxPowB > 1.0f) {
return 1.0f;
} else if (mMaxPowB < 0.0f) {
return 0.0f;
} else {
return mMaxPowB;
}
}
f32 getMaxPowF() {
if (mMaxPowF > 1.0f) {
return 1.0f;
} else if (mMaxPowF < 0.0f) {
return 0.0f;
} else {
return mMaxPowF;
}
}
/* 0x00 */ float mVolumeScale;
/* 0x04 */ float mMaxVolume;
/* 0x08 */ float mMaxPowL;
/* 0x0C */ float mMaxPowR;
/* 0x10 */ float mMaxPowB;
/* 0x14 */ float mMaxPowF;
/* 0x10 */ float mMaxPowF;
/* 0x14 */ float mMaxPowB;
/* 0x18 */ s8 mPosCount;
}; // Size = 0x1C
@@ -28,8 +78,8 @@ struct Z2MultiSeObj : Z2MultiSeMgr {
Z2MultiSeObj();
~Z2MultiSeObj() {}
/* 0x1C */ u32 field_0x1c;
/* 0x20 */ u8 field_0x20;
/* 0x1C */ u32 mSoundID;
/* 0x20 */ s8 field_0x20;
}; // Size = 0x24
class Z2SeMgr : public JASGlobalInstance<Z2SeMgr> {
@@ -40,8 +90,8 @@ public:
/* 802AB830 */ void modHeightAtCamera(Vec const**);
/* 802AB93C */ void incrCrowdSize();
/* 802AB960 */ void decrCrowdSize();
/* 802AB984 */ void seStart(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
/* 802AC50C */ void seStartLevel(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
/* 802AB984 */ bool seStart(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
/* 802AC50C */ bool seStartLevel(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
/* 802AD8B0 */ void seStop(JAISoundID, u32);
/* 802AD94C */ void seStopAll(u32);
/* 802AD9F4 */ void seMoveVolumeAll(f32, u32);
@@ -52,19 +102,19 @@ public:
/* 802ADE5C */ void setLevObjSE(u32, Vec*, s8);
/* 802ADFF4 */ void setMultiTriggerSE(u32, Vec*, s8);
/* 802AE184 */ void processSeFramework();
/* 802AE524 */ void isLevelSe(JAISoundID);
/* 802AE524 */ bool isLevelSe(JAISoundID);
/* 802AE5B0 */ bool isSoundCulling(JAISoundID);
/* 802B9AC4 */ void resetCrowdSize();
private:
/* 0x000 */ JAISoundHandle mSoundHandle[24];
/* 0x060 */ JAISoundHandles field_0x60;
/* 0x060 */ JAISoundHandles mSoundHandles;
/* 0x068 */ Z2MultiSeObj mLevelObjSe[10];
/* 0x1D0 */ u8 mLevelObjectSeCount;
/* 0x1D4 */ Z2MultiSeObj mMultiTriggerSe[10];
/* 0x33C */ u8 mMultiTriggerSeCount;
/* 0x33D */ u8 field_0x33d[0x60];
/* 0x3A0 */ u32 mModY[8];
/* 0x340 */ Vec field_0x340[8];
/* 0x3A0 */ Vec const* mModY[8];
/* 0x3C0 */ u8 field_0x3c0;
/* 0x3C1 */ u8 field_0x3c1;
/* 0x3C2 */ u8 field_0x3c2;
+1
View File
@@ -183,6 +183,7 @@ public:
}
JAISoundHandle* getMainBgmHandle() { return &mMainBgmHandle; }
JAISoundHandle* getSubBgmHandle() { return &mSubBgmHandle; }
/* 0x00 */ JAISoundHandle mMainBgmHandle;
/* 0x04 */ JAISoundHandle mSubBgmHandle;
+1 -1
View File
@@ -12,7 +12,7 @@ public:
/* 802BB448 */ virtual u16 getAudibleSw(JAISoundID) const;
/* 802BB00C */ virtual u16 getBgmSeqResourceID(JAISoundID) const;
/* 802BBA88 */ virtual s32 getStreamFileEntry(JAISoundID);
/* 802BB090 */ virtual u32 getSoundType(JAISoundID) const;
/* 802BB090 */ virtual int getSoundType(JAISoundID) const;
/* 802BB0D8 */ virtual int getCategory(JAISoundID) const;
/* 802BB0E0 */ virtual u32 getPriority(JAISoundID) const;
/* 802BB6DC */ virtual void getSeInfo(JAISoundID, JAISe*) const;
+2 -2
View File
@@ -23,7 +23,7 @@ public:
/* 802AA8C8 */ void stop();
/* 802AA908 */ void initParams();
/* 802AA9E8 */ void multiVolumeSoundID(JAISoundID, f32);
/* 802AAAC4 */ void isPlayingSoundID(JAISoundID);
/* 802AAAC4 */ bool isPlayingSoundID(JAISoundID);
/* 802A9EE8 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*);
@@ -36,7 +36,7 @@ private:
/* 0x004 */ JAISeMgr mSeMgr;
/* 0x728 */ JAISeqMgr mSeqMgr;
/* 0x79C */ JAIStreamMgr mStreamMgr;
/* 0x80C */ JAISoundID field_0x80c;
/* 0x80C */ JAISoundID mSoundID;
}; // Size: 0x810
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
+2 -2
View File
@@ -10,8 +10,8 @@ struct Z2SoundStarter : public JAISoundStarter, public JASGlobalInstance<Z2Sound
u16 getPortData(JAISoundHandle*, u32, s8);
virtual ~Z2SoundStarter() {}
virtual int startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
virtual int startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, float,
virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, float,
float, float, float, float, u32);
};
+1 -1
View File
@@ -10,7 +10,7 @@ struct Z2SpeechStarter : public Z2SoundStarter {
/* 802CCFB8 */ Z2SpeechStarter();
/* 802CBCEC */ virtual ~Z2SpeechStarter();
/* 802CCFF8 */ virtual int startSound(JAISoundID, JAISoundHandle*,
/* 802CCFF8 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
};
+1
View File
@@ -29,6 +29,7 @@ struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
f32 getCameraInWaterDepthRatio() const { return mCameraInWaterDepthRatio; }
u8 getHour() { return mHour; }
bool isPaused() { return mIsMenuIn; }
bool isHeartGuageOn() { return mHeartGaugeOn; }
/* 0x00 */ u8 mHour;
/* 0x01 */ u8 mMinute;