Z2AudioMgr / various JAudio setup (#152)

* audioMgr setup

* bunch of JAudio setup
This commit is contained in:
TakaRikka
2021-09-30 07:13:49 -07:00
committed by GitHub
parent 4efaff5faf
commit 5390dfe55f
103 changed files with 1329 additions and 2696 deletions
+134
View File
@@ -1,6 +1,140 @@
#ifndef Z2AUDIENCE_H
#define Z2AUDIENCE_H
#include "JSystem/JAudio2/JAIAudience.h"
#include "JSystem/JGeometry.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct Z2Audible;
struct Z2AudioCamera {
/* 802BC758 */ Z2AudioCamera();
/* 802BC788 */ void init();
/* 802BC8AC */ void setCameraState(f32 (*)[4], Vec&, Vec&, f32, f32, bool, bool);
/* 802BC7DC */ void setCameraState(f32 const (*)[4], Vec&, bool);
/* 802BCBEC */ void convertAbsToRel(Z2Audible*, int);
/* 802BCC7C */ void convertAbsToRel(Vec&, Vec*) const;
/* 802BCCC0 */ void isInSight(Vec&) const;
/* 0x00 */ u8 field_0x0[0x30]; // set up JGeometry::TPosition3
/* 0x30 */ JGeometry::TVec3<f32> mVel;
/* 0x3C */ JGeometry::TVec3<f32> mPos;
/* 0x48 */ JGeometry::TVec3<f32> field_0x48;
/* 0x54 */ f32 mFovySin;
/* 0x58 */ f32 mVolCenterZ;
/* 0x5C */ f32 mTargetVolume;
/* 0x60 */ f32 mDolbyCenterZ;
/* 0x64 */ f32 mCamDist;
/* 0x68 */ f32 field_0x68;
/* 0x6C */ f32 field_0x6c;
/* 0x70 */ bool mSetMainCamera;
}; // Size: 0x74
struct Z2SpotMic {
/* 802BCD28 */ Z2SpotMic();
/* 802BCDA8 */ void clearMicState(int);
/* 802BCDE8 */ void calcVolumeFactor(int);
/* 802BCE14 */ void setMicState(Z2AudioCamera*, int);
/* 802BCF5C */ void calcMicDist(Z2Audible*);
/* 802BCFE4 */ void calcMicPriority(f32);
/* 802BD03C */ void calcMicVolume(f32, int, f32);
/* 0x00 */ f32 field_0x0;
/* 0x04 */ f32 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
/* 0x10 */ int field_0x10[1];
/* 0x14 */ Vec* mPosPtr;
/* 0x18 */ f32 field_0x18[1];
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20[1];
/* 0x24 */ bool mIgnoreIfOut;
/* 0x25 */ bool mMicOn;
/* 0x26 */ u8 field_0x26[1];
}; // Size: 0x28
struct Z2Audience3DSetting {
/* 802BC248 */ Z2Audience3DSetting();
/* 802BC284 */ void init();
/* 802BC308 */ void initVolumeDist();
/* 802BC4D0 */ void updateVolumeDist(f32);
/* 802BC6A4 */ void initDolbyDist();
/* 802BC6F8 */ void updateDolbyDist(f32, f32);
/* 0x000 */ f32 field_0x0;
/* 0x004 */ f32 field_0x4;
/* 0x008 */ f32 field_0x8;
/* 0x00C */ f32 field_0xc;
/* 0x010 */ f32 field_0x10;
/* 0x014 */ f32 field_0x14;
/* 0x018 */ f32 field_0x18;
/* 0x01C */ f32 field_0x1c;
/* 0x020 */ f32 field_0x20;
/* 0x024 */ f32 field_0x24;
/* 0x028 */ f32 field_0x28;
/* 0x02C */ f32 field_0x2c;
/* 0x030 */ f32 field_0x30;
/* 0x034 */ f32 field_0x34;
/* 0x038 */ f32 field_0x38;
/* 0x03C */ f32 field_0x3c;
/* 0x040 */ f32 field_0x40;
/* 0x044 */ f32 field_0x44;
/* 0x048 */ f32 field_0x48;
/* 0x04C */ f32 field_0x4c;
/* 0x050 */ f32 field_0x50;
/* 0x054 */ f32 field_0x54;
/* 0x058 */ f32 field_0x58;
/* 0x05C */ f32 field_0x5c;
/* 0x060 */ f32 field_0x60;
/* 0x064 */ int field_0x64;
/* 0x068 */ f32 field_0x68;
/* 0x06C */ f32 field_0x6c;
/* 0x070 */ f32 field_0x70[15];
/* 0x0AC */ f32 field_0xac[15];
/* 0x0E8 */ f32 field_0xe8[15];
/* 0x124 */ bool mVolumeDistInit;
/* 0x125 */ bool mDolbyDistInit;
}; // Size: 0x128
struct Z2AudibleChannel {
/* 802BBE74 */ Z2AudibleChannel();
};
struct Z2Audience : public JAIAudience {
/* 802BD130 */ Z2Audience();
/* 802BD2DC */ void setAudioCamera(f32 (*)[4], Vec&, Vec&, f32, f32, bool, int, bool);
/* 802BD704 */ void calcOffMicSound(f32);
/* 802BD90C */ void setTargetVolume(f32, int);
/* 802BD92C */ void convertAbsToRel(Vec&, Vec*, int);
/* 802BD95C */ void calcRelPosVolume(Vec const&, f32, int);
/* 802BDA44 */ void calcRelPosPan(Vec const&, int);
/* 802BDB44 */ void calcRelPosDolby(Vec const&, int);
/* 802BDBDC */ void calcVolume_(f32, int) const;
/* 802BDC44 */ void calcDeltaPriority_(f32, int, bool) const;
/* 802BDCB0 */ void calcPitchDoppler_(JGeometry::TVec3<f32> const&,
JGeometry::TVec3<f32> const&,
JGeometry::TVec3<f32> const&, f32) const;
/* 802BDD00 */ void calcFxMix_(f32, int) const;
/* 802BDD48 */ void calcPitch_(Z2AudibleChannel*, Z2Audible const*, Z2AudioCamera const*) const;
/* 802BD1FC */ virtual ~Z2Audience();
/* 802BD338 */ virtual JAIAudible* newAudible(JGeometry::TVec3<f32> const&, JAISoundID,
JGeometry::TVec3<f32> const*, u32);
/* 802BDED4 */ virtual void getMaxChannels();
/* 802BD4D4 */ virtual void deleteAudible(JAIAudible*);
/* 802BD5B8 */ virtual void calcPriority(JAIAudible*);
/* 802BD71C */ virtual void mixChannelOut(JASSoundParams const&, JAIAudible*, int);
/* 0x004 */ f32 field_0x4;
/* 0x008 */ u8 field_0x8;
/* 0x00C */ Z2Audience3DSetting mSetting;
/* 0x134 */ Z2AudioCamera mAudioCamera[1];
/* 0x1A8 */ Z2SpotMic mSpotMic[1];
/* 0x1D0 */ Z2SpotMic* mLinkMic;
/* 0x1D4 */ s32 mNumPlayers;
/* 0x1D8 */ u8 field_0x1d8[4];
/* 0x1DC */ bool mUsingOffMicVol;
}; // Size: 0x1E0
#endif /* Z2AUDIENCE_H */
+24 -9
View File
@@ -5,41 +5,56 @@
#include "JSystem/JAudio2/JASAudioReseter.h"
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
#include "Z2AudioLib/Z2Audience.h"
#include "Z2AudioLib/Z2FxLineMgr.h"
#include "Z2AudioLib/Z2SceneMgr.h"
#include "Z2AudioLib/Z2SeMgr.h"
#include "Z2AudioLib/Z2SeqMgr.h"
#include "Z2AudioLib/Z2SoundMgr.h"
#include "Z2AudioLib/Z2SoundObjMgr.h"
#include "Z2AudioLib/Z2SoundStarter.h"
#include "Z2AudioLib/Z2SpeechMgr2.h"
#include "Z2AudioLib/Z2StatusMgr.h"
#include "dolphin/types.h"
class Z2AudioMgr {
public:
Z2AudioMgr();
~Z2AudioMgr() {}
void init(JKRSolidHeap*, u32, void*, JKRArchive*);
void setOutputMode(u32);
void zeldaGFrameWork();
void gframeProcess();
void resetProcess(u32, bool);
void resetRecover();
void hasReset() const;
void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
bool hasReset() const;
static Z2AudioMgr* getInterface() { return mAudioMgrPtr; }
static Z2AudioMgr* mAudioMgrPtr;
private:
/* 0x0000 */ Z2SeMgr mSeMgr;
/* 0x03D0 */ Z2SeqMgr mSeqMgr;
/* 0x04A4 */ Z2SceneMgr mSceneMgr;
/* 0x04C4 */ Z2StatusMgr mStatusMgr;
/* 0x04F4 */ Z2SoundObjMgr mSoundObjMgr;
/* 0x0514 */ /* virtual */ void startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*);
/* 0x0514 */ void* vtable; // remove later
/* 0x0518 */ bool mResettingFlag;
/* 0x0519 */ bool field_0x519;
/* 0x051C */ JASAudioReseter mAudioReseter;
/* 0x052C */ Z2SoundStarter mSoundStarter;
/* 0x0530 */ // Z2SoundMgr mSoundMgr;
/* 0x0D40 */ // JAISoundInfo mSoundInfo;
/* 0x0D4C */ // Z2Audience mAudience;
/* 0x0F2C */ // Z2SpeechMgr2 mSpeechMgr;
/* 0x1370 */ // Z2FxLineMgr mFxLineMgr;
};
/* 0x0530 */ Z2SoundMgr mSoundMgr;
/* 0x0D40 */ // Z2SoundInfo mSoundInfo;
/* 0x0D40 */ void* mSoundInfo[3]; // remove later
/* 0x0D4C */ Z2Audience mAudience;
/* 0x0F2C */ Z2SpeechMgr2 mSpeechMgr;
/* 0x1370 */ Z2FxLineMgr mFxLineMgr;
}; // Size: 0x138C
STATIC_ASSERT(sizeof(Z2AudioMgr) == 0x138C);
#endif /* Z2AUDIOMGR_H */
+36 -28
View File
@@ -35,16 +35,16 @@ private:
};
struct Z2LinkSoundStarter : public Z2SoundStarter {
Z2LinkSoundStarter(void);
~Z2LinkSoundStarter();
/* 802C4928 */ void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32,
f32, f32, f32, f32, f32, u32);
Z2LinkSoundStarter();
virtual ~Z2LinkSoundStarter();
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, f32,
f32, f32, f32, f32, u32);
};
#pragma pack(push, 1)
class Z2CreatureLink : public Z2Creature {
public:
Z2CreatureLink(void);
Z2CreatureLink();
~Z2CreatureLink();
void setLinkState(u8);
@@ -76,43 +76,51 @@ public:
private:
/* 0x90 */ Z2LinkSoundStarter mLinkSoundStarter;
/* 0x94 */ Z2SoundObjSimple mSoundObjSimple;
/* 0x94 */ Z2SoundObjSimple mKantera;
/* 0xB4 */ cXyz field_0xb4;
/* 0xC0 */ u8 mLinkState;
/* 0xC1 */ u8 unk193;
/* 0xC2 */ u8 unk194;
/* 0xC1 */ u8 field_0xc1;
/* 0xC2 */ u8 mMarkState;
/* 0xC3 */ u8 mLinkHp;
/* 0xC4 */ u8 mBootsType;
/* 0xC5 */ u8 mLanternState;
/* 0xC6 */ u8 unk198;
/* 0xC7 */ u8 unk199;
/* 0xC8 */ u8 unk200;
/* 0xC9 */ u8 unk201;
/* 0xCA */ u8 mSinkDepth;
/* 0xCB */ u8 flags1;
/* 0xCC */ u8 flags2;
};
#pragma pack(pop)
/* 0xC4 */ u8 mLinkBootsType;
/* 0xC5 */ u8 mKanteraState;
/* 0xC6 */ u8 mLinkSwordType;
/* 0xC7 */ u8 mLinkShieldType;
/* 0xC8 */ u8 mMoveSpeed;
/* 0xC9 */ u8 mMovingTime;
/* 0xCA */ s8 mSinkDepth;
/* 0xCB */ u8 mFlags;
/* 0xCC */ u8 mFlags2;
}; // Size: 0xD0
class Z2CreatureRide {
class Z2CreatureRide;
struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);
/* 802C5078 */ virtual ~Z2RideSoundStarter();
/* 802C5284 */ virtual void startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
/* 0x4 */ Z2CreatureRide* mRide;
};
class Z2CreatureRide : public Z2Creature {
public:
Z2CreatureRide();
~Z2CreatureRide();
void deleteObject();
void init(Vec*, Vec*, u8, u8);
void setLinkRiding(bool);
virtual void deleteObject();
private:
/* 0x00 */ void* vtable;
/* 0x04 */ u8 Z2Creature_members[140];
/* 0x90 */ u8 Z2RideSoundStarter[8];
/* 0x90 */ Z2RideSoundStarter mSoundStarter;
/* 0x98 */ bool mLinkRiding;
/* 0x99 */ u8 padding[3];
};
}; // Size: 0x9C
class Z2CreatureEnemy : public Z2Creature {
public:
virtual void test(); // temp to build OK, remove later
/* 802C0F64 */ Z2CreatureEnemy();
/* 802C0FC4 */ virtual void deleteObject();
/* 802C1094 */ void init(Vec*, Vec*, u8, u8);
+23
View File
@@ -1,6 +1,29 @@
#ifndef Z2FXLINEMGR_H
#define Z2FXLINEMGR_H
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "dolphin/types.h"
struct Z2FxLineEditNode {};
struct Z2FxLineConfig {};
struct Z2FxLineMgr {
/* 802BA7DC */ Z2FxLineMgr();
/* 802BA7FC */ void initDataArc(JKRArchive*, JKRHeap*);
/* 802BAC28 */ void setLineID(s8, bool, bool);
/* 802BAC74 */ void setLine(Z2FxLineConfig*, bool, bool);
/* 802BAE1C */ void setFxForceOff(bool);
/* 802BAE48 */ void setUnderWaterFx(bool);
/* 802BAEB8 */ void setSceneFx(s32);
/* 0x00 */ int field_0x0;
/* 0x04 */ void* mFxLineBuffer[4];
/* 0x14 */ s8 mLineID;
/* 0x15 */ s8 mFxDataNum;
/* 0x16 */ bool mSetUnderWaterFx;
/* 0x18 */ Z2FxLineEditNode* mHIOEdit;
}; // Size: 0x1C
#endif /* Z2FXLINEMGR_H */
+39
View File
@@ -3,4 +3,43 @@
#include "dolphin/types.h"
struct Z2Param {
static f32 DISTANCE_MAX;
static f32 MAX_VOLUME_DISTANCE;
static f32 DOLBY_CENTER_VALUE;
static f32 DOLBY_FLONT_DISTANCE_MAX;
static f32 DOLBY_BEHIND_DISTANCE_MAX;
static f32 DISTANCE_FX_PARAM;
static f32 SONIC_SPEED;
static f32 VOL_BGM_DEFAULT;
static f32 VOL_SE_SYSTEM_DEFAULT;
static f32 VOL_SE_LINK_VOICE_DEFAULT;
static f32 VOL_SE_LINK_MOTION_DEFAULT;
static f32 VOL_SE_LINK_FOOTNOTE_DEFAULT;
static f32 VOL_SE_CHAR_VOICE_DEFAULT;
static f32 VOL_SE_CHAR_MOVE_DEFAULT;
static f32 VOL_SE_OBJECT_DEFAULT;
static f32 VOL_SE_ATMOSPHERE_DEFAULT;
static f32 VOL_BGM_TALKING;
static f32 VOL_SE_SYSTEM_TALKING;
static f32 VOL_SE_LINK_VOICE_TALKING;
static f32 VOL_SE_LINK_MOTION_TALKING;
static f32 VOL_SE_LINK_FOOTNOTE_TALKING;
static f32 VOL_SE_CHAR_VOICE_TALKING;
static f32 VOL_SE_CHAR_MOVE_TALKING;
static f32 VOL_SE_OBJECT_TALKING;
static f32 VOL_SE_ATMOSPHERE_TALKING;
static f32 VOL_BGM_PAUSING;
static f32 VOL_SE_SYSTEM_PAUSING;
static f32 VOL_SE_LINK_VOICE_PAUSING;
static f32 VOL_SE_LINK_MOTION_PAUSING;
static f32 VOL_SE_LINK_FOOTNOTE_PAUSING;
static f32 VOL_SE_CHAR_VOICE_PAUSING;
static f32 VOL_SE_CHAR_MOVE_PAUSING;
static f32 VOL_SE_OBJECT_PAUSING;
static f32 VOL_SE_ATMOSPHERE_PAUSING;
static f32 MIN_DISTANCE_VOLUME;
static f32 ENEMY_LASTHIT_MUTE_VOLUME;
};
#endif /* Z2PARAM_H */
+2 -1
View File
@@ -24,7 +24,7 @@ struct Z2MultiSeMgr {
struct Z2MultiSeObj : Z2MultiSeMgr {
Z2MultiSeObj();
~Z2MultiSeObj();
~Z2MultiSeObj() {}
/* 0x1C */ u32 field_0x1c;
/* 0x20 */ u8 field_0x20;
@@ -52,6 +52,7 @@ public:
/* 802AE184 */ void processSeFramework();
/* 802AE524 */ void isLevelSe(JAISoundID);
/* 802AE5B0 */ void isSoundCulling(JAISoundID);
/* 802B9AC4 */ void resetCrowdSize();
private:
/* 0x000 */ JAISoundHandle mSoundHandle[24];
+24 -4
View File
@@ -12,8 +12,13 @@ struct TTransition {
}; // Size = 0xC
struct Z2SoundFader {
void move(f32 vol, u32 count) {
mIntensity = vol;
mTransition.zero();
}
/* 0x0 */ float mIntensity;
/* 0x4 */ TTransition mTransition;
/* 0x4 */ JAISoundParamsTransition::TTransition mTransition;
}; // Size = 0x10
class Z2SeqMgr {
@@ -67,6 +72,21 @@ public:
void taktModeMute();
void taktModeMuteOff();
void setFieldBgmPlay(bool);
/* 802B99AC */ void unMuteSceneBgm(u32);
/* 802B9A24 */ void muteSceneBgm(u32, f32);
/* 802B9AD0 */ void setTwilightGateVol(f32);
/* 802B9AFC */ void setWindStoneVol(f32, u32);
void i_setTwilightGateVol(f32 vol) { mTwilightGateVol = vol; }
void i_setWindStoneVol(f32 vol, u32 count) { field_0x94.move(vol, count); }
void i_bgmAllUnMute(u32 count) { field_0x74.move(1.0f, count); }
void i_unMuteSceneBgm(u32 count) {
field_0x34.move(1.0f, 0);
field_0x44.move(1.0f, count);
}
private:
/* 0x00 */ JAISoundHandle mMainBgmHandle;
@@ -84,7 +104,7 @@ private:
/* 0x84 */ Z2SoundFader field_0x84;
/* 0x94 */ Z2SoundFader field_0x94;
/* 0xA4 */ Z2SoundFader field_0xa4;
/* 0xB4 */ float mTwilightGateVolume;
/* 0xB4 */ f32 mTwilightGateVol;
/* 0xB8 */ u16 field_0xb8;
/* 0xBA */ u8 field_0xba;
/* 0xBB */ u8 field_0xbb;
@@ -97,8 +117,8 @@ private:
/* 0xC2 */ u8 field_0xc2;
/* 0xC3 */ u8 field_0xc3;
/* 0xC4 */ u8 field_0xc4;
/* 0xC8 */ float field_0xc8;
/* 0xCC */ float field_0xcc;
/* 0xC8 */ f32 field_0xc8;
/* 0xCC */ f32 field_0xcc;
/* 0xD0 */ u8 mFlags;
}; // Size = 0xD4
+48
View File
@@ -3,4 +3,52 @@
#include "dolphin/types.h"
struct JAISeq {};
struct JAISound {};
struct JAIStream {};
struct JAISe {};
struct JAISoundID {};
struct JAISoundInfo {
virtual void getSoundType(JAISoundID) const = 0;
virtual void getCategory(JAISoundID) const = 0;
virtual void getPriority(JAISoundID) const = 0;
virtual void getSeInfo(JAISoundID, JAISe*) const = 0;
virtual void getSeqInfo(JAISoundID, JAISeq*) const = 0;
virtual void getStreamInfo(JAISoundID, JAIStream*) const = 0;
virtual ~JAISoundInfo();
};
struct JAUSoundInfo {
virtual void getAudibleSw(JAISoundID) const = 0;
virtual void getBgmSeqResourceID(JAISoundID) const = 0;
};
struct JAIStreamDataMgr {
virtual void getStreamFileEntry(JAISoundID) = 0;
virtual ~JAIStreamDataMgr();
};
struct Z2SoundInfo /* : public JAISoundInfo, public JAUSoundInfo, public JAIStreamDataMgr */ {
/* 802BB00C */ void getBgmSeqResourceID(JAISoundID) const;
/* 802BB158 */ void getAudibleSwFull(JAISoundID);
/* 802BB448 */ void getAudibleSw(JAISoundID) const;
/* 802BBA10 */ void getStreamFilePath(JAISoundID);
/* 802BBA88 */ void getStreamFileEntry(JAISoundID);
/* 802BBAC8 */ void getSwBit(JAISoundID) const;
/* 802BBB48 */ void getSoundInfo_(JAISoundID, JAISound*) const;
/* 802BB090 */ void getSoundType(JAISoundID) const;
/* 802BB0D8 */ void getCategory(JAISoundID) const;
/* 802BB0E0 */ void getPriority(JAISoundID) const;
/* 802BB6DC */ void getSeInfo(JAISoundID, JAISe*) const;
/* 802BB8B4 */ void getSeqInfo(JAISoundID, JAISeq*) const;
/* 802BB8E0 */ void getStreamInfo(JAISoundID, JAIStream*) const;
/* 802BBBE0 */ virtual ~Z2SoundInfo();
};
#endif /* Z2SOUNDINFO_H */
+33
View File
@@ -1,6 +1,39 @@
#ifndef Z2SOUNDMGR_H
#define Z2SOUNDMGR_H
#include "JSystem/JAudio2/JAISeMgr.h"
#include "JSystem/JAudio2/JAISeqMgr.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JAIStreamMgr.h"
#include "dolphin/types.h"
class Z2SoundMgr {
public:
/* 802A9E80 */ Z2SoundMgr();
/* 802AA1B0 */ void calc();
/* 802AA270 */ void setIIR(JAISound*, s16 const*);
/* 802AA33C */ void setFilterOff(JAISound*);
/* 802AA430 */ void resetFilterAll();
/* 802AA528 */ void mixOut();
/* 802AA67C */ void framework();
/* 802AA6B0 */ void pauseAllGameSound(bool);
/* 802AA7DC */ void stopSoundID(JAISoundID);
/* 802AA84C */ void stopSync();
/* 802AA8C8 */ void stop();
/* 802AA908 */ void initParams();
/* 802AA9E8 */ void multiVolumeSoundID(JAISoundID, f32);
/* 802AAAC4 */ void isPlayingSoundID(JAISoundID);
/* 802A9EE8 */ /* virtual */ void startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*);
/* 0x000 */ void* vtable; // remove later
private:
/* 0x004 */ JAISeMgr mSeMgr;
/* 0x728 */ JAISeqMgr mSeqMgr;
/* 0x79C */ JAIStreamMgr mStreamMgr;
/* 0x80C */ JAISoundID field_0x80c;
}; // Size: 0x810
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
#endif /* Z2SOUNDMGR_H */
+4 -6
View File
@@ -18,7 +18,6 @@ public:
bool isAlive() const { return mIsInitialized; }
virtual void temp(); // temp to build OK, remove later
virtual void framework(u32, s8);
virtual void dispose();
virtual bool stopOK(Z2SoundHandlePool& pool);
@@ -26,7 +25,6 @@ public:
virtual void startSound(JAISoundID, u32, s8);
virtual void startLevelSound(JAISoundID, u32, s8);
// Z2SoundObjBase_vtable* vtable;
/* 0x14 */ Z2SoundStarter* mSoundStarter;
/* 0x18 */ Vec* mSoundPos;
/* 0x1C */ u16 field_0x1c;
@@ -34,9 +32,10 @@ public:
/* 0x1F */ bool mIsInitialized;
};
class Z2SoundObjSimple : protected Z2SoundObjBase {
class Z2SoundObjSimple : public Z2SoundObjBase {
public:
Z2SoundObjSimple();
~Z2SoundObjSimple();
virtual void temp(); // temp to build OK, remove later
virtual void init(Vec* pSoundPos, u8 pNumHandles);
@@ -44,7 +43,7 @@ public:
virtual void startLevelSound(JAISoundID, u32, s8);
};
class Z2SoundObjAnime : protected Z2SoundObjBase {
class Z2SoundObjAnime : public Z2SoundObjBase {
public:
/* 802BEB94 */ Z2SoundObjAnime();
/* 802BEBFC */ void initAnime(void*, bool, f32, f32);
@@ -58,7 +57,6 @@ public:
/* 802BF898 */ void playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3<f32> const&,
f32);
virtual void temp(); // temp to build OK, remove later
/* 802BEBDC */ virtual void init(Vec*, u8);
/* 0x20 */ void* field_0x20; // JAUSoundAnimation*
@@ -73,7 +71,7 @@ public:
/* 0x44 */ bool field_0x44;
};
class Z2DopplerSoundObjBase : protected Z2SoundHandles {
class Z2DopplerSoundObjBase : public Z2SoundHandles {
Z2DopplerSoundObjBase();
~Z2DopplerSoundObjBase();
+6 -13
View File
@@ -4,26 +4,19 @@
#include "JSystem/JAudio2/JAISound.h"
#include "dolphin/types.h"
struct Z2SoundStarter_vtable {
void* field_0x0;
void* field_0x4;
void* dtor;
void* startSound1;
void* startSound2;
struct JAISoundStarter {
virtual ~JAISoundStarter();
};
struct Z2SoundStarter {
// Z2SoundStarter_vtable* vtable;
struct Z2SoundStarter : public JAISoundStarter {
Z2SoundStarter(bool);
virtual ~Z2SoundStarter();
void setPortData(JAISoundHandle*, u32, u16, s8);
void getPortData(JAISoundHandle*, u32, s8);
virtual ~Z2SoundStarter();
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, float,
float, float, float, float, u32);
void setPortData(JAISoundHandle*, u32, u16, s8);
void getPortData(JAISoundHandle*, u32, s8);
};
#endif /* Z2SOUNDSTARTER_H */
+42
View File
@@ -1,6 +1,48 @@
#ifndef Z2SPEECHMGR2_H
#define Z2SPEECHMGR2_H
#include "JSystem/JAudio2/JAISoundHandles.h"
#include "JSystem/JMath/random.h"
#include "Z2AudioLib/Z2SoundStarter.h"
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
struct Z2SpeechStarter : public Z2SoundStarter {
/* 802CCFB8 */ Z2SpeechStarter();
/* 802CBCEC */ virtual ~Z2SpeechStarter();
/* 802CCFF8 */ virtual void startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
};
struct Z2SpeechMgr2 {
/* 802CBC60 */ Z2SpeechMgr2();
/* 802CBD88 */ void setString(u16 const*, s16, u8, u16);
/* 802CBF60 */ void setTextCount(s16);
/* 802CC190 */ void speakOneWord(bool);
/* 802CC2FC */ void isNonVerbal();
/* 802CC4C0 */ void selectUnit(bool);
/* 802CC738 */ void selectTail();
/* 802CC9D0 */ void framework();
/* 802CCA18 */ void playOneShotVoice(u8, u16, Vec*, s8);
/* 802CCF88 */ void isMidnaSpeak();
/* 0x000 */ JAISoundHandle field_0x0;
/* 0x004 */ JAISoundHandle field_0x4;
/* 0x008 */ JMath::TRandom_fast_ random;
/* 0x00C */ Z2SpeechStarter mSpeech;
/* 0x010 */ u16 field_0x10[500];
/* 0x3F8 */ u16 field_0x3f8;
/* 0x3FA */ u16 field_0x3fa;
/* 0x3FC */ u16 field_0x3fc;
/* 0x3FE */ u8 field_0x3fe;
/* 0x3FF */ u8 field_0x3ff;
/* 0x400 */ u8 field_0x400;
/* 0x401 */ u8 field_0x401;
/* 0x402 */ u8 field_0x402[64];
}; // Size: 0x444
STATIC_ASSERT(sizeof(Z2SpeechMgr2) == 0x444);
#endif /* Z2SPEECHMGR2_H */