various Z2Audio / JAudio debug cleanup (#2876)

* some JAudio work

* audio cleanup checkpoint

* checkpoint more audio cleanup

* fix symbols

* more z2 cleanup

* fix regression

* fix build

* some fixes
This commit is contained in:
TakaRikka
2025-11-27 21:19:33 -08:00
committed by GitHub
parent 767caeecc3
commit 6f96e66518
113 changed files with 6425 additions and 5542 deletions
+69 -60
View File
@@ -12,36 +12,39 @@
struct Z2Audible;
struct Z2AudibleAbsPos {
/* 802BBCDC */ void calc(JGeometry::TVec3<f32> const&);
/* 802BBD18 */ void init(JGeometry::TVec3<f32>*, JGeometry::TVec3<f32> const&,
JGeometry::TVec3<f32> const*);
/* 802BBCDC */ void calc(const JGeometry::TVec3<f32>& pos);
/* 802BBD18 */ void init(JGeometry::TVec3<f32>*, const JGeometry::TVec3<f32>&,
const JGeometry::TVec3<f32>*);
/* 0x00 */ JGeometry::TVec3<f32> field_0x0;
/* 0x0C */ JGeometry::TVec3<f32> field_0xc;
/* 0x0C */ JGeometry::TVec3<f32> velocity_;
};
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 */ bool convertAbsToRel(Vec&, Vec*) const;
/* 802BC8AC */ void setCameraState(f32 (*)[4], Vec& pos, Vec&, f32, f32, bool, bool);
/* 802BC7DC */ void setCameraState(f32 const (*)[4], Vec& pos, bool);
/* 802BCBEC */ void convertAbsToRel(Z2Audible* audible, int channelNum);
/* 802BCC7C */ bool convertAbsToRel(Vec& src, Vec* dst) const;
/* 802BCCC0 */ bool isInSight(Vec&) const;
JGeometry::TVec3<f32>* getPos() { return &mPos; }
const JGeometry::TVec3<f32>* getPos() const { return &mPos; }
f32 getVolCenterZ() const { return mVolCenterZ; }
void setMainCamera() { mSetMainCamera = true; }
void setTargetVolume(f32 volume) {
if (volume < 0.0f) {
volume = 0.0f;
void setMainCamera(bool param_0) { mSetMainCamera = param_0; }
void setTargetVolume(f32 vol) {
JUT_ASSERT(281, vol <= 1.f);
if (vol < 0.0f) {
vol = 0.0f;
}
mTargetVolume = volume;
mTargetVolume = vol;
}
f32 getDolbyCenterZ() const { return mDolbyCenterZ; }
f32 getFovySin() const { return mFovySin; }
const JGeometry::TVec3<f32>* getVel() const { return &mVel; }
/* 0x00 */ JGeometry::TPosition3f32 field_0x0;
/* 0x30 */ JGeometry::TVec3<f32> mVel;
/* 0x3C */ JGeometry::TVec3<f32> mPos;
@@ -58,15 +61,15 @@ struct Z2AudioCamera {
struct Z2SpotMic {
/* 802BCD28 */ Z2SpotMic();
/* 802BCDA8 */ void clearMicState(int);
/* 802BCDE8 */ void calcVolumeFactor(int);
/* 802BCE14 */ void setMicState(Z2AudioCamera*, int);
/* 802BCF5C */ f32 calcMicDist(Z2Audible*);
/* 802BCDA8 */ void clearMicState(int camID);
/* 802BCDE8 */ void calcVolumeFactor(int camID);
/* 802BCE14 */ void setMicState(Z2AudioCamera* camera, int camID);
/* 802BCF5C */ f32 calcMicDist(Z2Audible* audible);
/* 802BCFE4 */ u32 calcMicPriority(f32);
/* 802BD03C */ f32 calcMicVolume(f32, int, f32);
/* 802BD03C */ f32 calcMicVolume(f32, int camID, f32);
void setPosPtr(Vec* i_posPtr) { mPosPtr = i_posPtr; }
bool isOn() const { return mMicOn; }
void setPosPtr(Vec* posPtr) { mPosPtr = posPtr; }
bool isOn() { return mMicOn; }
/* 0x00 */ f32 field_0x0;
/* 0x04 */ f32 field_0x4;
@@ -79,7 +82,7 @@ struct Z2SpotMic {
/* 0x20 */ f32 field_0x20[1];
/* 0x24 */ bool mIgnoreIfOut;
/* 0x25 */ bool mMicOn;
/* 0x26 */ u8 field_0x26[1];
/* 0x26 */ bool field_0x26[1];
}; // Size: 0x28
struct Z2Audience3DSetting {
@@ -152,14 +155,14 @@ struct Z2AudibleRelPos {
struct Z2AudibleChannel {
/* 802BBE74 */ Z2AudibleChannel();
void init() {
field_0x0.init();
mParams.init();
field_0x28 = -1.0f;
mPan = 0.5f;
mDolby = 0.0f;
field_0x34 = 1.0f;
}
/* 0x00 */ JASSoundParams field_0x0;
/* 0x00 */ JASSoundParams mParams;
/* 0x14 */ Z2AudibleRelPos field_0x14;
/* 0x28 */ f32 field_0x28;
/* 0x2c */ f32 mPan;
@@ -168,65 +171,71 @@ struct Z2AudibleChannel {
};
struct Z2Audible : public JAIAudible, public JASPoolAllocObject<Z2Audible> {
/* 802BBD94 */ Z2Audible(JGeometry::TVec3<f32> const&, JGeometry::TVec3<f32> const*, u32, bool);
/* 802BBD94 */ Z2Audible(const JGeometry::TVec3<f32>& pos, const JGeometry::TVec3<f32>*, u32 channel, bool);
/* 802BBE98 */ void calc();
/* 802BBED0 */ JASSoundParams* getOuterParams(int);
/* 802BBEE4 */ void setOuterParams(JASSoundParams const&, JASSoundParams const&, int);
/* 802BC204 */ Z2AudibleChannel* getChannel(int);
/* 802BBED0 */ JASSoundParams* getOuterParams(int index);
/* 802BBEE4 */ void setOuterParams(const JASSoundParams& outParams, const JASSoundParams& inParams, int index);
/* 802BC204 */ Z2AudibleChannel* getChannel(int index);
/* 802BC218 */ u32 getDistVolBit();
/* 802BD510 */ ~Z2Audible();
bool isDoppler() {
return ((*(u8*)&field_0x10.field_0x0) >> 4) & 0xf;
}
JAUAudibleParam* getAudibleParam() { return &field_0x10; }
const JAUAudibleParam* getAudibleParam() const { return &field_0x10; }
void setAudibleParam(JAUAudibleParam param) { field_0x10 = param; }
const JGeometry::TVec3<f32>* getVel() const { return &field_0x14.field_0xc; }
/* 0x10 */ JAUAudibleParam field_0x10;
/* 0x14 */ Z2AudibleAbsPos field_0x14;
/* 0x2C */ Z2AudibleChannel field_0x2c[1];
bool isDoppler() {
return ((*(u8*)&mParam.field_0x0) >> 4) & 0xf;
}
const JGeometry::TVec3<f32>& getPos() const { return mPos; }
JAUAudibleParam* getAudibleParam() { return &mParam; }
const JAUAudibleParam* getAudibleParam() const { return &mParam; }
void setAudibleParam(JAUAudibleParam param) { mParam.field_0x0.raw = param.field_0x0.raw; }
const JGeometry::TVec3<f32>* getVel() const { return &mAbsPos.velocity_; }
/* 0x10 */ JAUAudibleParam mParam;
/* 0x14 */ Z2AudibleAbsPos mAbsPos;
/* 0x2C */ Z2AudibleChannel mChannel[1];
/* 0x64 */ f32 field_0x64[1];
};
struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> {
/* 802BD130 */ Z2Audience();
/* 802BD2DC */ void setAudioCamera(f32 (*)[4], Vec&, Vec&, f32, f32, bool, int, bool);
/* 802BD2DC */ void setAudioCamera(f32 (*)[4], Vec&, Vec&, f32, f32, bool, int camID, bool);
/* 802BD704 */ f32 calcOffMicSound(f32);
/* 802BD90C */ void setTargetVolume(f32, int);
/* 802BD92C */ bool convertAbsToRel(Vec&, Vec*, int);
/* 802BD95C */ f32 calcRelPosVolume(Vec const&, f32, int);
/* 802BDA44 */ f32 calcRelPosPan(Vec const&, int);
/* 802BDB44 */ f32 calcRelPosDolby(Vec const&, int);
/* 802BDBDC */ f32 calcVolume_(f32, int) const;
/* 802BDC44 */ u32 calcDeltaPriority_(f32, int, bool) const;
/* 802BDCB0 */ f32 calcPitchDoppler_(JGeometry::TVec3<f32> const&,
JGeometry::TVec3<f32> const&,
JGeometry::TVec3<f32> const&, f32) const;
/* 802BDD00 */ f32 calcFxMix_(f32, int) const;
/* 802BDD48 */ f32 calcPitch_(Z2AudibleChannel*, Z2Audible const*, Z2AudioCamera const*) const;
/* 802BD90C */ void setTargetVolume(f32 volume, int index);
/* 802BD92C */ bool convertAbsToRel(Vec& src, Vec* dst, int camID);
/* 802BD95C */ f32 calcRelPosVolume(const Vec&, f32, int camID);
/* 802BDA44 */ f32 calcRelPosPan(const Vec&, int camID);
/* 802BDB44 */ f32 calcRelPosDolby(const Vec&, int camID);
/* 802BDBDC */ f32 calcVolume_(f32, int distVolBit) const;
/* 802BDC44 */ u32 calcDeltaPriority_(f32, int distVolBit, bool) const;
/* 802BDCB0 */ f32 calcPitchDoppler_(const JGeometry::TVec3<f32>&,
const JGeometry::TVec3<f32>&,
const JGeometry::TVec3<f32>&, f32) const;
/* 802BDD00 */ f32 calcFxMix_(f32, int distVolBit) const;
/* 802BDD48 */ f32 calcPitch_(Z2AudibleChannel* channel, const Z2Audible* audible, const Z2AudioCamera* camera) const;
/* 802BD1FC */ virtual ~Z2Audience();
/* 802BD338 */ virtual JAIAudible* newAudible(JGeometry::TVec3<f32> const&, JAISoundID,
JGeometry::TVec3<f32> const*, u32);
/* 802BD338 */ virtual JAIAudible* newAudible(const JGeometry::TVec3<f32>& pos, JAISoundID soundID,
const JGeometry::TVec3<f32>*, u32);
/* 802BDED4 */ virtual int getMaxChannels();
/* 802BD4D4 */ virtual void deleteAudible(JAIAudible*);
/* 802BD5B8 */ virtual u32 calcPriority(JAIAudible*);
/* 802BD71C */ virtual void mixChannelOut(JASSoundParams const&, JAIAudible*, int);
/* 802BD4D4 */ virtual void deleteAudible(JAIAudible* audible);
/* 802BD5B8 */ virtual u32 calcPriority(JAIAudible* audible);
/* 802BD71C */ virtual void mixChannelOut(const JASSoundParams& outParams, JAIAudible* audible, int channelNum);
Z2SpotMic* getLinkMic() { return mLinkMic; }
JGeometry::TVec3<f32> getAudioCamPos(int idx) {
return *mAudioCamera[idx].getPos();
JGeometry::TVec3<f32> getAudioCamPos(int camID) {
return *mAudioCamera[camID].getPos();
}
Z2Audience3DSetting* getSetting() { return &mSetting; }
const Z2AudioCamera* getAudioCamera(int camID) const { return &mAudioCamera[camID]; }
/* 0x004 */ f32 field_0x4;
/* 0x008 */ u8 field_0x8;
/* 0x00C */ Z2Audience3DSetting mSetting;
/* 0x134 */ Z2AudioCamera mAudioCamera[1];
/* 0x1A8 */ Z2SpotMic mSpotMic[1];
/* 0x1D0 */ Z2SpotMic* mLinkMic;
/* 0x1D4 */ s32 mMaxChannels;
/* 0x1D4 */ s32 mNumPlayers;
/* 0x1D8 */ u8 field_0x1d8[4];
/* 0x1DC */ bool mUsingOffMicVol;
}; // Size: 0x1E0
+3 -3
View File
@@ -8,9 +8,9 @@ public:
Z2AudioArcLoader(JAUSection*);
virtual ~Z2AudioArcLoader() {}
virtual bool readCommandMore(u32);
void readBFCA(const void*);
virtual void readBSTN(const void*, u32);
virtual bool readCommandMore(u32 command);
void readBFCA(const void* addr);
virtual void readBSTN(const void* addr, u32);
};
#endif /* Z2AUDIOARCLOADER_H */
+2 -2
View File
@@ -8,14 +8,14 @@ class JKRArchive;
class Z2AudioCS {
public:
void newSpkSoundMemPool();
static void newSpkSoundMemPool();
int init(JKRHeap*, JKRArchive*, s32, s32);
void update();
static void connect(s32);
static void disconnect(s32);
static void extensionProcess(s32, s32);
u32 getHandleSoundID(s32);
void start(s32, s32);
static void start(s32, s32);
static int startLevel(s32, s32);
};
+8 -6
View File
@@ -12,6 +12,7 @@
#include "Z2AudioLib/Z2SoundObjMgr.h"
#include "Z2AudioLib/Z2SpeechMgr2.h"
#include "Z2AudioLib/Z2StatusMgr.h"
#include "Z2AudioLib/Z2DebugSys.h"
#include "global.h"
class JKRArchive;
@@ -21,23 +22,21 @@ class Z2AudioMgr : public Z2SeMgr, public Z2SeqMgr, public Z2SceneMgr, public Z2
public:
Z2AudioMgr();
~Z2AudioMgr() {}
void init(JKRSolidHeap*, u32, void*, JKRArchive*);
void setOutputMode(u32);
void init(JKRSolidHeap* heap, u32 memSize, void* baaData, JKRArchive* seqArc);
void setOutputMode(u32 mode);
void zeldaGFrameWork();
void gframeProcess();
void resetProcess(u32, bool);
void resetRecover();
bool hasReset() const;
bool startLevelSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
bool isResetting() { return mResettingFlag; }
static Z2AudioMgr* getInterface() { return mAudioMgrPtr; }
static Z2AudioMgr* mAudioMgrPtr;
#if DEBUG
u8 padding[0xC];
#endif
/* 0x0514 */ virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
/* 0x0514 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
/* 0x0518 */ bool mResettingFlag;
/* 0x0519 */ bool field_0x519;
/* 0x051C */ JASAudioReseter mAudioReseter;
@@ -47,6 +46,9 @@ public:
/* 0x0D4C */ Z2Audience mAudience;
/* 0x0F2C */ Z2SpeechMgr2 mSpeechMgr;
/* 0x1370 */ Z2FxLineMgr mFxLineMgr;
#if DEBUG
/* 0x13BC */ Z2DebugSys mDebugSys;
#endif
}; // Size: 0x138C
#if VERSION != VERSION_SHIELD_DEBUG
+22 -21
View File
@@ -14,35 +14,36 @@ static const Vec cNullVec = {0.0f, 0.0f, 0.0f};
#endif
enum CurveSign {
CURVE_SIGN_0 = 0,
CURVE_SIGN_1 = 1,
CURVE_SIGN_2 = 2,
CURVE_NEGATIVE = 0,
CURVE_POSITIVE = 1,
CURVE_LINEAR = 2,
};
struct FNoise1f {
FNoise1f(float param_0 = 0.1f, float param_1 = 0.0f, float param_2 = 0.01f) {
unk0 = param_0;
unk4 = param_0;
unk8 = param_2;
unk12 = param_1;
FNoise1f(f32 value = 0.1f, f32 threshold = 0.0f, f32 step = 0.01f) {
value_ = value;
targetValue_ = value;
step_ = step;
threshold_ = threshold;
}
void setParam(float, float, float);
float tau(float);
float calcNoise1f();
float unk0;
float unk4;
float unk8;
float unk12;
void setParam(f32 value, f32 threshold, f32 step);
f32 tau(f32 input);
f32 calcNoise1f();
f32 value_;
f32 targetValue_;
f32 step_;
f32 threshold_;
};
float linearTransform(float, float, float, float, float, bool);
float getParamByExp(float, float, float, float, float, float, Z2Calc::CurveSign);
float getRandom(float, float, float);
float getRandom_0_1(void);
f32 linearTransform(f32 inValue, f32 inMin, f32 inMax, f32 outMin, f32 outMax, bool noClamp);
f32 getParamByExp(f32 value, f32 inMin, f32 inMax, f32 exponent, f32 outMin, f32 outMax, CurveSign curveSign);
f32 getRandom(f32 magnitude, f32 exponent, f32 bias);
f32 getRandom_0_1();
extern f32 cEqualCSlope;
extern f32 cEqualPSlope;
extern const f32 cEqualCSlope;
extern const f32 cEqualPSlope;
} // namespace Z2Calc
#endif /* Z2CALC_H */
+36 -36
View File
@@ -9,22 +9,22 @@ public:
Z2Creature();
~Z2Creature();
void init(Vec*, Vec*, u8, u8);
void init(Vec*, Vec*, Vec*, u8, u8, u8);
void initAnime(void*, bool, f32, f32);
void init(Vec* animePosPtr, Vec* simplePosPtr, u8 animeHandleNum, u8 simpleHandleNum);
void init(Vec* animePosPtr, Vec* simplePosPtr, Vec* simple2PosPtr, u8 animeHandleNum, u8 simpleHandleNum, u8 simple2HandleNum);
void initAnime(void* animation, bool, f32 startFrame, f32);
void updateAnime(f32, f32);
void stopAnime();
virtual void deleteObject();
virtual void setSoundStarter(Z2SoundStarter*);
virtual void framework(u32, s8);
virtual Z2SoundHandlePool* startCreatureSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID, s8);
virtual Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID, s8);
virtual Z2SoundHandlePool* startCreatureExtraSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startCreatureExtraSoundLevel(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startCollisionSE(u32, u32);
virtual void setSoundStarter(Z2SoundStarter* soundStarter);
virtual void framework(u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCreatureSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID soundID, s8 reverb);
virtual Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID soundID, s8 reverb);
virtual Z2SoundHandlePool* startCreatureExtraSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCreatureExtraSoundLevel(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCollisionSE(u32 hitID, u32 mapinfo);
Vec* getCurrentPos() const { return mpPos; }
@@ -38,18 +38,18 @@ class Z2CreatureEnemy : public Z2Creature, public JSULink<Z2CreatureEnemy> {
public:
/* 802C0F64 */ Z2CreatureEnemy();
/* 802C0FC4 */ virtual void deleteObject();
/* 802C1094 */ void init(Vec*, Vec*, u8, u8);
/* 802C1094 */ void init(Vec* animePosPtr, Vec* simplePosPtr, u8 animeHandleNum, u8 simpleHandleNum);
/* 802C10B4 */ void init(Vec*, Vec*, Vec*, u8, u8, u8);
/* 802C10D4 */ virtual void framework(u32, s8);
/* 802C110C */ virtual Z2SoundHandlePool* startCreatureSound(JAISoundID, u32, s8);
/* 802C136C */ virtual Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID, u32, s8);
/* 802C168C */ virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID, s8);
/* 802C1948 */ virtual Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID, s8);
/* 802C199C */ virtual Z2SoundHandlePool* startCreatureExtraSound(JAISoundID, u32, s8);
/* 802C19D8 */ virtual Z2SoundHandlePool* startCreatureExtraSoundLevel(JAISoundID, u32, s8);
/* 802C1A14 */ virtual Z2SoundHandlePool* startCollisionSE(u32, u32);
/* 802C1B7C */ void setLinkSearch(bool);
/* 802C1B90 */ void setEnemyName(char const*);
/* 802C10D4 */ virtual void framework(u32 mapinfo, s8 reverb);
/* 802C110C */ virtual Z2SoundHandlePool* startCreatureSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 802C136C */ virtual Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 802C168C */ virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID soundID, s8 reverb);
/* 802C1948 */ virtual Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID soundID, s8 reverb);
/* 802C199C */ virtual Z2SoundHandlePool* startCreatureExtraSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 802C19D8 */ virtual Z2SoundHandlePool* startCreatureExtraSoundLevel(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 802C1A14 */ virtual Z2SoundHandlePool* startCollisionSE(u32 hitID, u32 mapinfo);
/* 802C1B7C */ void setLinkSearch(bool isLinkSearch);
/* 802C1B90 */ void setEnemyName(const char* enemyName);
/* 0xA0 */ u8 mEnemyID;
/* 0xA1 */ s8 field_0xa1;
@@ -61,11 +61,11 @@ class Z2CreatureCitizen : public Z2Creature, public JSULink<Z2CreatureCitizen> {
public:
/* 802C0C10 */ Z2CreatureCitizen();
/* 802C0C6C */ ~Z2CreatureCitizen();
/* 802C0CE4 */ void init(Vec*, Vec*, u8, u8);
/* 802C0CE4 */ void init(Vec* animePosPtr, Vec* simplePosPtr, u8 animeHandleNum, u8 simpleHandleNum);
/* 802C0D04 */ virtual void deleteObject();
/* 802C0D48 */ void setMdlType(s8, bool, bool);
/* 802C0E18 */ void playVoice(int);
/* 802C0ED8 */ virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID, s8);
/* 802C0ED8 */ virtual Z2SoundHandlePool* startCreatureVoice(JAISoundID soundID, s8 reverb);
private:
/* 0xA0 */ s8 mCitizenID;
@@ -77,15 +77,15 @@ private:
class Z2CreatureSumomo : public Z2Creature {
public:
/* 802C1BE8 */ Z2CreatureSumomo();
/* 802C1C24 */ void playSumomoBgm(u32);
/* 802C1C24 */ void playSumomoBgm(u32 dist);
/* 802C1CA0 */ void deleteObject();
}; // Size: 0x90
class Z2SoundObjBeeGroup : public Z2SoundObjBase {
public:
/* 802C1D10 */ Z2SoundObjBeeGroup();
/* 802C1D4C */ void init(Vec*, u8);
/* 802C1D6C */ void playBeeGroupSound(JAISoundID, u8);
/* 802C1D4C */ void init(Vec* posPtr, u8 handleNum);
/* 802C1D6C */ void playBeeGroupSound(JAISoundID soundID, u8);
}; // Size: 0x20
class Z2CreatureFM : public Z2CreatureEnemy {
@@ -93,9 +93,9 @@ public:
/* 802C1F54 */ Z2CreatureFM();
/* 802C1FB0 */ void deleteObject();
/* 802C1FFC */ void init(Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, u8, u8, u8, u8, u8, u8);
/* 802C20E8 */ void framework(u32, s8);
/* 802C2194 */ Z2SoundHandlePool* startChainSound(JAISoundID, u8, f32, u32, s8);
/* 802C2290 */ Z2SoundHandlePool* startChainSoundLevel(JAISoundID, u8, f32, u32, s8);
/* 802C20E8 */ void framework(u32 mapinfo, s8 reverb);
/* 802C2194 */ Z2SoundHandlePool* startChainSound(JAISoundID soundID, u8, f32, u32 mapinfo, s8 reverb);
/* 802C2290 */ Z2SoundHandlePool* startChainSoundLevel(JAISoundID soundID, u8, f32, u32 mapinfo, s8 reverb);
/* 0x0A4 */ Z2SoundObjSimple field_0xa4;
/* 0x0C4 */ Z2SoundObjSimple field_0xc4;
@@ -106,7 +106,7 @@ public:
class Z2CreatureGob : public Z2Creature {
public:
/* 802C24B0 */ void init(Vec*, Vec*, Vec*, u8, u8, u8);
/* 802C24D0 */ Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID, s8);
/* 802C24D0 */ Z2SoundHandlePool* startCreatureVoiceLevel(JAISoundID soundID, s8 reverb);
};
class Z2CreatureOI : public Z2CreatureEnemy {
@@ -115,10 +115,10 @@ public:
/* 802C25EC */ void deleteObject();
/* 802C2670 */ void init(Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*, Vec*,
Vec*);
/* 802C2864 */ void framework(u32, s8);
/* 802C29D4 */ Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID, u32, s8);
/* 802C2C84 */ Z2SoundHandlePool* startTentacleSound(JAISoundID, u8, u32, s8);
/* 802C2CD4 */ Z2SoundHandlePool* startTentacleSoundLevel(JAISoundID, u8, f32, u32, s8);
/* 802C2864 */ void framework(u32 mapinfo, s8 reverb);
/* 802C29D4 */ Z2SoundHandlePool* startCreatureSoundLevel(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 802C2C84 */ Z2SoundHandlePool* startTentacleSound(JAISoundID soundID, u8, u32 mapinfo, s8 reverb);
/* 802C2CD4 */ Z2SoundHandlePool* startTentacleSoundLevel(JAISoundID soundID, u8, f32, u32 mapinfo, s8 reverb);
/* 0x0A4 */ Z2SoundObjSimple field_0xa4;
/* 0x0C4 */ Z2SoundObjSimple field_0xc4;
+9 -2
View File
@@ -2,9 +2,16 @@
#define Z2DEBUGSYS_H
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JAudio2/JAISeqDataMgr.h"
// Only here for instance sub. No known code.
struct Z2DebugSys : public JASGlobalInstance<Z2DebugSys> {
Z2DebugSys();
~Z2DebugSys();
void initJAW();
void initSoundHioNode();
void debugframework();
JAISeqDataMgr* initSeSeqDataMgr(const void*);
};
#endif
#endif
+35 -35
View File
@@ -12,10 +12,10 @@ enum WindType {
};
struct Z2EnvSeBase {
/* 802C589C */ Z2EnvSeBase(Vec* param_0 = NULL);
/* 802C589C */ Z2EnvSeBase(Vec* posPtr = NULL);
/* 802C58AC */ ~Z2EnvSeBase();
/* 802C5908 */ bool startEnvSe(JAISoundID, f32, f32, f32, f32, f32, u32);
/* 802C5AB4 */ bool startEnvSeLevel(JAISoundID, f32, f32, f32, f32, f32, u32);
/* 802C5908 */ bool startEnvSe(JAISoundID soundID, f32 fxMix, f32 volume, f32 pan, f32 dolby, f32 pitch, u32 moveSteps);
/* 802C5AB4 */ bool startEnvSeLevel(JAISoundID soundID, f32 fxMix, f32 volume, f32 pan, f32 dolby, f32 pitch, u32 moveSteps);
JAISoundHandle* getHandle() { return &mHandle; }
void setPos(Vec* pos) { mPos = pos; }
@@ -27,12 +27,12 @@ struct Z2EnvSeBase {
struct Z2EnvSeAutoPan : public Z2EnvSeBase {
/* 802C5ECC */ Z2EnvSeAutoPan();
/* 802C5F28 */ ~Z2EnvSeAutoPan();
/* 802C5F7C */ void setPanParam(f32, f32, bool, bool, f32, f32);
/* 802C5F7C */ void setPanParam(f32 pan, f32 dolby, bool, bool, f32, f32);
/* 802C5F98 */ void calcPan();
/* 802C60E0 */ bool startEnvSeAutoPanLevel(JAISoundID, f32, f32, f32);
/* 802C60E0 */ bool startEnvSeAutoPanLevel(JAISoundID soundID, f32 fxMix, f32 volume, f32 pitch);
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
/* 0x08 */ f32 mPan;
/* 0x0C */ f32 mDolby;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ bool field_0x18;
@@ -40,14 +40,14 @@ struct Z2EnvSeAutoPan : public Z2EnvSeBase {
}; // Size: 0x1C
struct Z2EnvSeDir : public Z2EnvSeBase {
/* 802C5C9C */ Z2EnvSeDir(Vec* param_0 = NULL);
/* 802C5C9C */ Z2EnvSeDir(Vec* dir = NULL);
/* 802C5D1C */ ~Z2EnvSeDir();
/* 802C5D70 */ void setPanDir(Vec*);
/* 802C5D70 */ void setPanDir(Vec* dir);
/* 802C5D9C */ void calcPan(f32);
/* 802C5E90 */ bool startEnvSeDirLevel(JAISoundID, f32, f32);
/* 802C5E90 */ bool startEnvSeDirLevel(JAISoundID soundID, f32 fxMix, f32 volume);
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
/* 0x08 */ f32 mPan;
/* 0x0C */ f32 mDolby;
/* 0x10 */ Vec mPanDir;
}; // Size: 0x1C
@@ -57,40 +57,40 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> {
/* 802C66B0 */ void framework();
/* 802C6998 */ void resetScene();
/* 802C699C */ void resetSceneInner();
/* 802C6AC0 */ void initSceneEnvSe(s32, s8, f32);
/* 802C6AC0 */ void initSceneEnvSe(s32 sceneID, s8 room, f32);
/* 802C6C1C */ void playSceneEnvSe();
/* 802C6C84 */ void initStaticEnvSe(u8, u8, u8, u8, Vec*);
/* 802C70C8 */ bool startStaticEnvSe(s8);
/* 802C780C */ void registWindowPos(Vec*);
/* 802C70C8 */ bool startStaticEnvSe(s8 reverb);
/* 802C780C */ void registWindowPos(Vec* posPtr);
/* 802C7830 */ bool startRainSe(s32, s8);
/* 802C7CF4 */ void startNearThunderSe(s8);
/* 802C7E68 */ void startFarThunderSe(Vec*, s8);
/* 802C7FB4 */ void setSnowPower(s8);
/* 802C7CF4 */ void startNearThunderSe(s8 reverb);
/* 802C7E68 */ void startFarThunderSe(Vec* posPtr, s8 reverb);
/* 802C7FB4 */ void setSnowPower(s8 reverb);
/* 802C7FBC */ void initStrongWindSe();
/* 802C7FC8 */ void setWindDirection(Vec*);
/* 802C800C */ bool startStrongWindSe(s8);
/* 802C7FC8 */ void setWindDirection(Vec* dir);
/* 802C800C */ bool startStrongWindSe(s8 reverb);
/* 802C80F8 */ void initRiverSe(u8, u8, u8, u8);
/* 802C8234 */ void registRiverSePos(Vec*);
/* 802C8258 */ void setHyrulSewerOpen(bool);
/* 802C8300 */ bool startRiverSe(s8);
/* 802C8234 */ void registRiverSePos(Vec* posPtr);
/* 802C8258 */ void setHyrulSewerOpen(bool isSewerOpen);
/* 802C8300 */ bool startRiverSe(s8 reverb);
/* 802C8730 */ void initFallSe(u8, u8, u8, u8);
/* 802C886C */ void registFallSePos(Vec*);
/* 802C8890 */ bool startFallSe(s8);
/* 802C886C */ void registFallSePos(Vec* posPtr);
/* 802C8890 */ bool startFallSe(s8 reverb);
/* 802C8A90 */ void initEtcSe(u8, u8, u8, u8);
/* 802C8C24 */ void registEtcSePos(Vec*);
/* 802C8C48 */ bool startEtcSe(s8);
/* 802C92C8 */ void registWolfSmellSePos(Vec*);
/* 802C92EC */ bool startFogWipeTrigger(Vec*);
/* 802C93A0 */ void setFogWipeWidth(f32);
/* 802C8C24 */ void registEtcSePos(Vec* posPtr);
/* 802C8C48 */ bool startEtcSe(s8 reverb);
/* 802C92C8 */ void registWolfSmellSePos(Vec* posPtr);
/* 802C92EC */ void startFogWipeTrigger(Vec* pos);
/* 802C93A0 */ void setFogWipeWidth(f32 width);
/* 802C93E4 */ f32 getFogDensity();
/* 802C9400 */ bool startFogSe();
/* 802C950C */ void initLv3WaterSe(u8, u8, u8, u8);
/* 802C9F58 */ void registLv3WaterSePos(u8, Vec*);
/* 802CA794 */ void startLv3WaterSe(s8);
/* 802C9F58 */ void registLv3WaterSePos(u8, Vec* posPtr);
/* 802CA794 */ void startLv3WaterSe(s8 reverb);
void setWindType(u8 i_type) { mWindType = i_type; }
void registSmellSePos(Vec* param_0) { registEtcSePos(param_0); }
void startSmellSe(s8 param_0) { startEtcSe(param_0); }
void setWindType(u8 type) { mWindType = type; }
void registSmellSePos(Vec* posPtr) { registEtcSePos(posPtr); }
void startSmellSe(s8 reverb) { startEtcSe(reverb); }
void initSmellSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
initEtcSe(param_0, param_1, param_2, param_3);
}
+5 -5
View File
@@ -27,12 +27,12 @@ struct Z2FxLineConfig {
struct Z2FxLineMgr : public JASGlobalInstance<Z2FxLineMgr> {
/* 802BA7DC */ Z2FxLineMgr();
/* 802BA7FC */ void initDataArc(JKRArchive*, JKRHeap*);
/* 802BAC28 */ void setLineID(s8, bool, bool);
/* 802BAC74 */ void setLine(Z2FxLineConfig*, bool, bool);
/* 802BA7FC */ void initDataArc(JKRArchive* arc, JKRHeap* heap);
/* 802BAC28 */ void setLineID(s8 fxID, bool, bool);
/* 802BAC74 */ void setLine(Z2FxLineConfig* config, bool, bool);
/* 802BAE1C */ void setFxForceOff(bool);
/* 802BAE48 */ void setUnderWaterFx(bool);
/* 802BAEB8 */ void setSceneFx(s32);
/* 802BAE48 */ void setUnderWaterFx(bool isUnderWaterFx);
/* 802BAEB8 */ void setSceneFx(s32 sceneNo);
/* 0x00 */ Z2FxLineConfig* mConfig;
/* 0x04 */ void* mFxLineBuffer[4];
+43 -40
View File
@@ -9,8 +9,10 @@ public:
Z2LinkSoundStarter();
inline virtual ~Z2LinkSoundStarter();
virtual bool startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, f32,
f32, f32, f32, f32, u32);
virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle,
const JGeometry::TVec3<f32>* posPtr, u32 mapinfo,
f32 fxMix, f32 pitch, f32 volume, f32 pan,
f32 dolby, u32 moveSteps);
};
class Z2CreatureLink : public Z2Creature, public Z2LinkSoundStarter {
@@ -19,41 +21,41 @@ public:
~Z2CreatureLink();
void setLinkGroupInfo(u8);
void setLinkHp(s32, s32);
void setLinkSwordType(s32, s32);
void setLinkShieldType(s32, s32);
void setLinkBootsType(s32);
void setLinkHp(s32 linkHp, s32);
void setLinkSwordType(s32 swordType, s32);
void setLinkShieldType(s32 shieldType, s32);
void setLinkBootsType(s32 bootsType);
virtual void deleteObject();
void init(Vec*, Vec*, Vec*);
void initKantera(Vec*);
void deleteKantera(void);
void setKanteraState(u8);
virtual void framework(u32, s8);
void setSinkDepth(s8);
void setRiding(bool);
void setMagnetized(bool);
void setWolfEyeOpen(bool);
Z2SoundHandlePool* startLinkSound(JAISoundID, u32, s8);
JAISoundHandle* startLinkSoundLevel(JAISoundID, u32, s8);
Z2SoundHandlePool* startLinkVoice(JAISoundID, s8);
Z2SoundHandlePool* startLinkVoiceLevel(JAISoundID, s8);
void startLinkSwordSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startCollisionSE(u32, u32);
Z2SoundHandlePool* startHitItemSE(u32, u32, Z2SoundObjBase*, float);
void setResumeAttack(bool);
void init(Vec* animePosPtr, Vec* simplePosPtr, Vec* simple2PosPtr);
void initKantera(Vec* posPtr);
void deleteKantera();
void setKanteraState(u8 state);
virtual void framework(u32 mapinfo, s8 reverb);
void setSinkDepth(s8 sinkDepth);
void setRiding(bool isRiding);
void setMagnetized(bool isMagnetized);
void setWolfEyeOpen(bool wolfEyeOpen);
Z2SoundHandlePool* startLinkSound(JAISoundID, u32 mapinfo, s8 reverb);
JAISoundHandle* startLinkSoundLevel(JAISoundID, u32 mapinfo, s8 reverb);
Z2SoundHandlePool* startLinkVoice(JAISoundID, s8 reverb);
Z2SoundHandlePool* startLinkVoiceLevel(JAISoundID, s8 reverb);
void startLinkSwordSound(JAISoundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startCollisionSE(u32 hitID, u32 mapinfo);
Z2SoundHandlePool* startHitItemSE(u32 soundID, u32 mapinfo, Z2SoundObjBase* other, f32 speed);
void setResumeAttack(bool resumeAttack);
void setInWater(bool status) { mInWater = status; }
void setInWater(bool inWater) { mInWater = inWater; }
bool isInWater() { return mInWater; }
u8 getLinkState() { return mLinkState; }
u8 getMoveSpeed() const { return mMoveSpeed; }
bool isRiding() const { return mRiding; }
void setLinkState(u8 i_state) { mLinkState = i_state; }
u8 getMoveSpeed() { return mMoveSpeed; }
bool isRiding() { return mRiding; }
void setLinkState(u8 state) { mLinkState = state; }
Z2SoundObjSimple& getKantera() { return mKantera; }
u8 getLinkHp() const { return mLinkHp; }
u8 getLinkHp() { return mLinkHp; }
u8 getMovingTime() { return mMovingTime; }
u8 isWolfSmellOpen() const { return mWolfEyeOpen; }
void setUsingIronBall(bool i_using) { mUsingIronBall = i_using; }
void setMarkState(u8 i_state) { mMarkState = i_state; }
bool isWolfSmellOpen() { return mWolfEyeOpen; }
void setUsingIronBall(bool isUsingIronBall) { mUsingIronBall = isUsingIronBall; }
void setMarkState(u8 state) { mMarkState = state; }
static Z2CreatureLink* mLinkPtr;
@@ -63,7 +65,7 @@ public:
private:
/* 0x90 Z2LinkSoundStarter */
/* 0x94 */ Z2SoundObjSimple mKantera;
/* 0xB4 */ cXyz field_0xb4;
/* 0xB4 */ Vec field_0xb4;
/* 0xC0 */ u8 mLinkState;
/* 0xC1 */ u8 field_0xc1;
/* 0xC2 */ u8 mMarkState;
@@ -99,11 +101,12 @@ inline Z2CreatureLink* Z2GetLink() {
class Z2CreatureRide;
struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide* ride);
/* 802C5284 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
/* 802C5284 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle,
const JGeometry::TVec3<f32>* posPtr, u32 mapinfo,
f32 fxMix, f32 pitch, f32 volume, f32 pan,
f32 dolby, u32 moveSteps);
/* 0x4 */ Z2CreatureRide* mRide;
};
@@ -112,8 +115,8 @@ class Z2CreatureRide : public Z2Creature, public Z2RideSoundStarter {
public:
Z2CreatureRide();
~Z2CreatureRide();
void init(Vec*, Vec*, u8, u8);
void setLinkRiding(bool);
void init(Vec* animePosPtr, Vec* simplePosPtr, u8 animeHandleNum, u8 simpleHandleNum);
void setLinkRiding(bool isRiding);
bool isLinkRiding() { return mLinkRiding; }
@@ -127,10 +130,10 @@ private:
class Z2SoundObjCoach : public Z2SoundObjBase {
public:
/* 802C54B8 */ Z2SoundObjCoach();
/* 802C54FC */ void init(Vec*, u8);
/* 802C54FC */ void init(Vec* posPtr, u8 handleNum);
/* 802C551C */ Z2SoundHandlePool* startWheelSound(f32);
/* 802C56C0 */ Z2SoundHandlePool* startFireSound(u16);
/* 802C57C0 */ Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
/* 802C57C0 */ Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
private:
/* 0x20 */ f32 field_0x20;
+20 -16
View File
@@ -40,24 +40,28 @@ struct Z2Param {
static f32 VOL_SE_ATMOSPHERE_PAUSING;
static f32 MIN_DISTANCE_VOLUME;
static f32 ENEMY_LASTHIT_MUTE_VOLUME;
// made up names based on HIO labels
static u8 SCENE_CHANGE_BGM_FADEOUT_TIME;
static u8 BGM_CROSS_FADEIN_TIME;
static u8 BGM_CROSS_FADEOUT_TIME;
static u8 BATTLE_BGM_WAIT_TIME;
static u8 FOUND_TRACK_FI_TIME;
static u8 FOUND_TRACK_FO_TIME;
static u8 CLOSE_BATTLE_TRACK_FI_TIME;
static u8 CLOSE_BATTLE_TRACK_FO_TIME;
static u8 ENDING_BLOW_VOL_DOWN_TIME;
static u8 ENDING_BLOW_VOL_LOWER_TIME;
static u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME;
static u8 ENDING_BLOW_MIN_FINISH_TIME;
static u8 DARK_SE_FILTER_ON;
static u8 DARK_SE_LOW_PASS_FILTER_SETTING;
static u8 SYSTEM_SE_USE_DARK_SE_SETTING;
};
extern u8 struct_80450860;
extern u8 struct_80450861;
extern u8 struct_80450862;
extern u8 struct_80450863;
extern u8 struct_80450864;
extern u8 struct_80450865;
extern u8 struct_80450866;
extern u8 struct_80450867;
extern u8 struct_80450868;
extern u8 struct_80450869;
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 */
+101 -96
View File
@@ -9,12 +9,13 @@ s8 dComIfGp_getReverb(int roomNo);
class Z2SceneMgr : public JASGlobalInstance<Z2SceneMgr> {
public:
Z2SceneMgr();
void setInDarkness(bool);
void setSceneExist(bool);
void setFadeOutStart(u8);
void setFadeInStart(u8);
void setSceneName(char*, s32, s32);
void sceneChange(JAISoundID, u8, u8, u8, u8, u8, bool);
void setInDarkness(bool inDarkness);
void setSceneExist(bool isSceneExist);
void setFadeOutStart(u8 fadeType);
void setFadeInStart(u8 fadeType);
void setSceneName(char* spot, s32 room, s32 layer);
void sceneChange(JAISoundID bgm, u8 seWave1, u8 seWave2, u8 bgmWave1, u8 bgmWave2,
u8 demoWave, bool);
void framework();
void load1stDynamicWave();
void _load1stWaveInner_1();
@@ -24,18 +25,22 @@ public:
void sceneBgmStart();
void loadStaticWaves();
BOOL checkFirstWaves();
bool eraseSeWave(u32);
bool eraseBgmWave(u32);
s32 getWaveLoadStatus(u32, u32);
bool loadSeWave(u32);
bool loadBgmWave(u32);
bool eraseSeWave(u32 wave);
bool eraseBgmWave(u32 wave);
s32 getWaveLoadStatus(u32 wave, u32 bank);
bool loadSeWave(u32 wave);
bool loadBgmWave(u32 wave);
#if PLATFORM_SHIELD
bool loadSceneWave(u32 wave, u32 bank);
#endif
bool isSceneExist() { return sceneExist; }
int getCurrentSceneNum() { return sceneNum; }
s8 getCurrentRoomNum() { return roomNum; }
bool isInGame() { return inGame; }
void setInGame(bool i_inGame) { inGame = i_inGame; }
bool isInDarkness() const { return inDarkness; }
void setInGame(bool isInGame) { inGame = isInGame; }
bool isInDarkness() { return inDarkness_; }
s8 getRoomReverb() { return dComIfGp_getReverb(roomNum); }
bool isMovieDemo() { return sceneNum == 2 || sceneNum == 8 || sceneNum == 9; }
s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); }
@@ -64,95 +69,95 @@ private:
/* 0x1B */ bool field_0x1b;
/* 0x1C */ bool inGame;
/* 0x1D */ bool sceneExist;
/* 0x1E */ bool inDarkness;
/* 0x1E */ bool inDarkness_;
}; // Size = 0x20
inline Z2SceneMgr* Z2GetSceneMgr() {
return JASGlobalInstance<Z2SceneMgr>::getInstance();
}
enum Spot { // aka scene
/* 0x00 */ SPOT_ORDON_RANCH,
/* 0x01 */ SPOT_ORDON_VILLAGE,
/* 0x02 */ SPOT_ORDON_INTERIOR,
/* 0x03 */ SPOT_ORDON_SPRING,
/* 0x04 */ SPOT_TWILIGHT_HYRULE_CASTLE,
/* 0x05 */ SPOT_FARON_WOODS,
/* 0x06 */ SPOT_CORO_SHOP,
/* 0x07 */ SPOT_SACRED_GROVE,
/* 0x08 */ SPOT_KAKARIKO_VILLAGE,
/* 0x09 */ SPOT_KAKARIKO_INTERIOR,
/* 0x0A */ SPOT_SANCTUARY_BASEMENT,
/* 0x0B */ SPOT_DEATH_MOUNTAIN,
/* 0x0C */ SPOT_SUMO_HALL,
/* 0x0D */ SPOT_KAKARIKO_GRAVEYARD,
/* 0x0E */ SPOT_HIDDEN_VILLAGE,
/* 0x0F */ SPOT_IMPAZ_HOUSE,
/* 0x10 */ SPOT_LAKE_HYLIA,
/* 0x11 */ SPOT_ZORAS_RIVER,
/* 0x12 */ SPOT_UPPER_ZORAS_RIVER,
/* 0x13 */ SPOT_FISHING_POND,
/* 0x14 */ SPOT_HENA_CABIN,
/* 0x15 */ SPOT_ZORAS_DOMAIN,
/* 0x16 */ SPOT_CASTLE_TOWN,
/* 0x17 */ SPOT_CASTLE_TOWN_INTERIOR,
/* 0x18 */ SPOT_CASTLE_TOWN_SHOPS,
/* 0x19 */ SPOT_STAR_TENT,
/* 0x1A */ SPOT_SNOWPEAK,
/* 0x1B */ SPOT_ARBITERS_GROUNDS_EXTERIOR,
/* 0x1C */ SPOT_GERUDO_DESERT,
/* 0x1D */ SPOT_MIRROR_CHAMBER,
/* 0x1E */ SPOT_HYRULE_FIELD,
/* 0x1F */ SPOT_CASTLE_TOWN_GATES,
/* 0x20 */ SPOT_HYLIA_BRIDGE_BATTLE,
/* 0x21 */ SPOT_SHADES_REALM,
/* 0x22 */ SPOT_ELDIN_BRIDGE_BATTLE,
/* 0x23 */ SPOT_NONE,
/* 0x24 */ SPOT_LIGHT_SPIRIT_CHAMBER,
/* 0x25 */ SPOT_CASTLE_THRONE_ROOM,
/* 0x26 */ SPOT_ENEMY_TEST,
/* 0x27 */ SPOT_FORTRESS,
/* 0x28 */ SPOT_FOREST_TEMPLE,
/* 0x29 */ SPOT_FOREST_TEMPLE_MINIBOSS,
/* 0x2A */ SPOT_FOREST_TEMPLE_BOSS,
/* 0x2B */ SPOT_GORON_MINES,
/* 0x2C */ SPOT_GORON_MINES_MINIBOSS,
/* 0x2D */ SPOT_GORON_MINES_BOSS,
/* 0x2E */ SPOT_LAKEBED_TEMPLE,
/* 0x2F */ SPOT_LAKEBED_TEMPLE_MINIBOSS,
/* 0x30 */ SPOT_LAKEBED_TEMPLE_BOSS,
/* 0x31 */ SPOT_ARBITERS_GROUNDS,
/* 0x32 */ SPOT_ARBITERS_GROUNDS_MINIBOSS,
/* 0x33 */ SPOT_ARBITERS_GROUNDS_BOSS,
/* 0x34 */ SPOT_SNOWPEAK_RUINS,
/* 0x35 */ SPOT_SNOWPEAK_RUINS_MINIBOSS,
/* 0x36 */ SPOT_SNOWPEAK_RUINS_BOSS,
/* 0x37 */ SPOT_TEMPLE_OF_TIME,
/* 0x38 */ SPOT_TEMPLE_OF_TIME_MINIBOSS,
/* 0x39 */ SPOT_TEMPLE_OF_TIME_BOSS,
/* 0x3A */ SPOT_CITY_IN_THE_SKY,
/* 0x3B */ SPOT_CITY_IN_THE_SKY_MINIBOSS,
/* 0x3C */ SPOT_CITY_IN_THE_SKY_BOSS,
/* 0x3D */ SPOT_PALACE_OF_TWILIGHT,
/* 0x3E */ SPOT_PALACE_OF_TWILIGHT_MINIBOSS_A,
/* 0x3F */ SPOT_PALACE_OF_TWILIGHT_MINIBOSS_B,
/* 0x40 */ SPOT_PALACE_OF_TWILIGHT_THRONE_ROOM,
/* 0x41 */ SPOT_PALACE_OF_TWILIGHT_BOSS,
/* 0x42 */ SPOT_HYRULE_CASTLE,
/* 0x43 */ SPOT_FINAL_BATTLE_THRONE_ROOM,
/* 0x44 */ SPOT_FINAL_BATTLE_FIELD,
/* 0x45 */ SPOT_FINAL_BATTLE_CUTSCENE,
/* 0x46 */ SPOT_ICE_BLOCK_PUZZLE,
/* 0x47 */ SPOT_CAVE_OF_ORDEALS,
/* 0x48 */ SPOT_GORGE_LANTERN_CAVE,
/* 0x49 */ SPOT_LAKE_LANTERN_CAVE,
/* 0x4A */ SPOT_ELDIN_MAGNET_CAVE,
/* 0x4B */ SPOT_GROTTO_GRASS_1,
/* 0x4C */ SPOT_GROTTO_GRASS_2,
/* 0x4D */ SPOT_GROTTO_ROCK_1,
/* 0x4E */ SPOT_GROTTO_ROCK_2,
/* 0x4F */ SPOT_GROTTO_POND,
/* 0x50 */ SPOT_FARON_WOODS_CAVE,
enum Z2Scene {
/* 0x00 */ Z2SCENE_ORDON_RANCH,
/* 0x01 */ Z2SCENE_ORDON_VILLAGE,
/* 0x02 */ Z2SCENE_ORDON_INTERIOR,
/* 0x03 */ Z2SCENE_ORDON_SPRING,
/* 0x04 */ Z2SCENE_TWILIGHT_HYRULE_CASTLE,
/* 0x05 */ Z2SCENE_FARON_WOODS,
/* 0x06 */ Z2SCENE_CORO_SHOP,
/* 0x07 */ Z2SCENE_SACRED_GROVE,
/* 0x08 */ Z2SCENE_KAKARIKO_VILLAGE,
/* 0x09 */ Z2SCENE_KAKARIKO_INTERIOR,
/* 0x0A */ Z2SCENE_SANCTUARY_BASEMENT,
/* 0x0B */ Z2SCENE_DEATH_MOUNTAIN,
/* 0x0C */ Z2SCENE_SUMO_HALL,
/* 0x0D */ Z2SCENE_KAKARIKO_GRAVEYARD,
/* 0x0E */ Z2SCENE_HIDDEN_VILLAGE,
/* 0x0F */ Z2SCENE_IMPAZ_HOUSE,
/* 0x10 */ Z2SCENE_LAKE_HYLIA,
/* 0x11 */ Z2SCENE_ZORAS_RIVER,
/* 0x12 */ Z2SCENE_UPPER_ZORAS_RIVER,
/* 0x13 */ Z2SCENE_FISHING_POND,
/* 0x14 */ Z2SCENE_HENA_CABIN,
/* 0x15 */ Z2SCENE_ZORAS_DOMAIN,
/* 0x16 */ Z2SCENE_CASTLE_TOWN,
/* 0x17 */ Z2SCENE_CASTLE_TOWN_INTERIOR,
/* 0x18 */ Z2SCENE_CASTLE_TOWN_SHOPS,
/* 0x19 */ Z2SCENE_STAR_TENT,
/* 0x1A */ Z2SCENE_SNOWPEAK,
/* 0x1B */ Z2SCENE_ARBITERS_GROUNDS_EXTERIOR,
/* 0x1C */ Z2SCENE_GERUDO_DESERT,
/* 0x1D */ Z2SCENE_MIRROR_CHAMBER,
/* 0x1E */ Z2SCENE_HYRULE_FIELD,
/* 0x1F */ Z2SCENE_CASTLE_TOWN_GATES,
/* 0x20 */ Z2SCENE_HYLIA_BRIDGE_BATTLE,
/* 0x21 */ Z2SCENE_SHADES_REALM,
/* 0x22 */ Z2SCENE_ELDIN_BRIDGE_BATTLE,
/* 0x23 */ Z2SCENE_NONE,
/* 0x24 */ Z2SCENE_LIGHT_SPIRIT_CHAMBER,
/* 0x25 */ Z2SCENE_CASTLE_THRONE_ROOM,
/* 0x26 */ Z2SCENE_ENEMY_TEST,
/* 0x27 */ Z2SCENE_FORTRESS,
/* 0x28 */ Z2SCENE_FOREST_TEMPLE,
/* 0x29 */ Z2SCENE_FOREST_TEMPLE_MINIBOSS,
/* 0x2A */ Z2SCENE_FOREST_TEMPLE_BOSS,
/* 0x2B */ Z2SCENE_GORON_MINES,
/* 0x2C */ Z2SCENE_GORON_MINES_MINIBOSS,
/* 0x2D */ Z2SCENE_GORON_MINES_BOSS,
/* 0x2E */ Z2SCENE_LAKEBED_TEMPLE,
/* 0x2F */ Z2SCENE_LAKEBED_TEMPLE_MINIBOSS,
/* 0x30 */ Z2SCENE_LAKEBED_TEMPLE_BOSS,
/* 0x31 */ Z2SCENE_ARBITERS_GROUNDS,
/* 0x32 */ Z2SCENE_ARBITERS_GROUNDS_MINIBOSS,
/* 0x33 */ Z2SCENE_ARBITERS_GROUNDS_BOSS,
/* 0x34 */ Z2SCENE_SNOWPEAK_RUINS,
/* 0x35 */ Z2SCENE_SNOWPEAK_RUINS_MINIBOSS,
/* 0x36 */ Z2SCENE_SNOWPEAK_RUINS_BOSS,
/* 0x37 */ Z2SCENE_TEMPLE_OF_TIME,
/* 0x38 */ Z2SCENE_TEMPLE_OF_TIME_MINIBOSS,
/* 0x39 */ Z2SCENE_TEMPLE_OF_TIME_BOSS,
/* 0x3A */ Z2SCENE_CITY_IN_THE_SKY,
/* 0x3B */ Z2SCENE_CITY_IN_THE_SKY_MINIBOSS,
/* 0x3C */ Z2SCENE_CITY_IN_THE_SKY_BOSS,
/* 0x3D */ Z2SCENE_PALACE_OF_TWILIGHT,
/* 0x3E */ Z2SCENE_PALACE_OF_TWILIGHT_MINIBOSS_A,
/* 0x3F */ Z2SCENE_PALACE_OF_TWILIGHT_MINIBOSS_B,
/* 0x40 */ Z2SCENE_PALACE_OF_TWILIGHT_THRONE_ROOM,
/* 0x41 */ Z2SCENE_PALACE_OF_TWILIGHT_BOSS,
/* 0x42 */ Z2SCENE_HYRULE_CASTLE,
/* 0x43 */ Z2SCENE_FINAL_BATTLE_THRONE_ROOM,
/* 0x44 */ Z2SCENE_FINAL_BATTLE_FIELD,
/* 0x45 */ Z2SCENE_FINAL_BATTLE_CUTSCENE,
/* 0x46 */ Z2SCENE_ICE_BLOCK_PUZZLE,
/* 0x47 */ Z2SCENE_CAVE_OF_ORDEALS,
/* 0x48 */ Z2SCENE_GORGE_LANTERN_CAVE,
/* 0x49 */ Z2SCENE_LAKE_LANTERN_CAVE,
/* 0x4A */ Z2SCENE_ELDIN_MAGNET_CAVE,
/* 0x4B */ Z2SCENE_GROTTO_GRASS_1,
/* 0x4C */ Z2SCENE_GROTTO_GRASS_2,
/* 0x4D */ Z2SCENE_GROTTO_ROCK_1,
/* 0x4E */ Z2SCENE_GROTTO_ROCK_2,
/* 0x4F */ Z2SCENE_GROTTO_POND,
/* 0x50 */ Z2SCENE_FARON_WOODS_CAVE,
};
#endif /* Z2SCENEMGR_H */
+37 -37
View File
@@ -7,56 +7,50 @@
struct Z2MultiSeMgr {
Z2MultiSeMgr();
~Z2MultiSeMgr();
s8 registMultiSePos(Vec*);
s8 registMultiSePos(Vec* posPtr);
void resetMultiSePos();
f32 getPanPower();
f32 getDolbyPower();
void setVolumeScale(f32 param_0) { mVolumeScale = param_0; }
void setVolumeScale(f32 volumeScale) { volumeScale_ = volumeScale; }
f32 getMaxVolume() {
if (mMaxVolume > 1.0f) {
return 1.0f;
} else if (mMaxVolume < 0.0f) {
return 0.0f;
} else {
return mMaxVolume;
}
return (maxVolume_ > 1.0f) ? 1.0f : (maxVolume_ < 0.0f ? 0.0f : maxVolume_);
}
f32 getMaxPowR() {
return (mMaxPowR > 1.0f) ? 1.0f : (mMaxPowR < 0.0f ? 0.0f : mMaxPowR);
return (maxPowR_ > 1.0f) ? 1.0f : (maxPowR_ < 0.0f ? 0.0f : maxPowR_);
}
f32 getMaxPowL() {
return (mMaxPowL > 1.0f) ? 1.0f : (mMaxPowL < 0.0f ? 0.0f : mMaxPowL);
return (maxPowL_ > 1.0f) ? 1.0f : (maxPowL_ < 0.0f ? 0.0f : maxPowL_);
}
f32 getMaxPowB() {
return (mMaxPowB > 1.0f) ? 1.0f : (mMaxPowB < 0.0f ? 0.0f : mMaxPowB);
return (maxPowB_ > 1.0f) ? 1.0f : (maxPowB_ < 0.0f ? 0.0f : maxPowB_);
}
f32 getMaxPowF() {
return (mMaxPowF > 1.0f) ? 1.0f : (mMaxPowF < 0.0f ? 0.0f : mMaxPowF);
return (maxPowF_ > 1.0f) ? 1.0f : (maxPowF_ < 0.0f ? 0.0f : maxPowF_);
}
s8 getPosCount() { return mPosCount; }
s8 getPosCount() { return posCount_; }
/* 0x00 */ float mVolumeScale;
/* 0x04 */ float mMaxVolume;
/* 0x08 */ float mMaxPowL;
/* 0x0C */ float mMaxPowR;
/* 0x10 */ float mMaxPowF;
/* 0x14 */ float mMaxPowB;
/* 0x18 */ s8 mPosCount;
/* 0x00 */ f32 volumeScale_;
/* 0x04 */ f32 maxVolume_;
/* 0x08 */ f32 maxPowL_;
/* 0x0C */ f32 maxPowR_;
/* 0x10 */ f32 maxPowF_;
/* 0x14 */ f32 maxPowB_;
/* 0x18 */ s8 posCount_;
}; // Size = 0x1C
struct Z2MultiSeObj : Z2MultiSeMgr {
Z2MultiSeObj();
~Z2MultiSeObj() {}
/* 0x1C */ u32 mSoundID;
/* 0x20 */ s8 field_0x20;
/* 0x1C */ u32 soundID_;
/* 0x20 */ s8 reverb_;
}; // Size = 0x24
class Z2SeMgr : public JASGlobalInstance<Z2SeMgr> {
@@ -64,23 +58,25 @@ public:
/* 802AB64C */ Z2SeMgr();
/* 802AB750 */ void initSe();
/* 802AB80C */ void resetModY();
/* 802AB830 */ void modHeightAtCamera(Vec const**);
/* 802AB830 */ void modHeightAtCamera(const Vec**);
/* 802AB93C */ void incrCrowdSize();
/* 802AB960 */ void decrCrowdSize();
/* 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);
/* 802AB984 */ bool seStart(JAISoundID soundID, const Vec* posPtr, u32, s8 reverb,
f32 pitch, f32 volume, f32 pan, f32 dolby, u8);
/* 802AC50C */ bool seStartLevel(JAISoundID soundID, const Vec* posPtr, u32, s8 reverb,
f32 pitch, f32 volume, f32 pan, f32 dolby, u8);
/* 802AD8B0 */ void seStop(JAISoundID soundID, u32 fadeTime);
/* 802AD94C */ void seStopAll(u32 fadeTime);
/* 802AD9F4 */ void seMoveVolumeAll(f32 volume, u32 moveTime);
/* 802ADB14 */ void messageSePlay(u16, Vec*, s8);
/* 802ADB50 */ void talkInSe();
/* 802ADC54 */ void talkOutSe();
/* 802ADD58 */ void menuInSe();
/* 802ADE5C */ void setLevObjSE(u32, Vec*, s8);
/* 802ADFF4 */ void setMultiTriggerSE(u32, Vec*, s8);
/* 802ADE5C */ void setLevObjSE(u32 soundID, Vec* posPtr, s8 reverb);
/* 802ADFF4 */ void setMultiTriggerSE(u32 soundID, Vec* posPtr, s8 reverb);
/* 802AE184 */ void processSeFramework();
/* 802AE524 */ bool isLevelSe(JAISoundID);
/* 802AE5B0 */ bool isSoundCulling(JAISoundID);
/* 802AE524 */ bool isLevelSe(JAISoundID soundID);
/* 802AE5B0 */ bool isSoundCulling(JAISoundID soundID);
/* 802B9AC4 */ void resetCrowdSize() { mCrowdSize = 0; }
#if PLATFORM_WII || PLATFORM_SHIELD
@@ -90,12 +86,19 @@ public:
private:
/* 0x000 */ JAISoundHandle mSoundHandle[24];
/* 0x060 */ JAISoundHandles mSoundHandles;
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x068 */ JAISoundHandle dbg_field_0x68;
/* 0x06C */ f32 dbg_field_0x6c;
/* 0x070 */ f32 dbg_field_0x70;
/* 0x074 */ f32 dbg_field_0x74;
/* 0x078 */ f32 dbg_field_0x78;
#endif
/* 0x068 */ Z2MultiSeObj mLevelObjSe[10];
/* 0x1D0 */ u8 mLevelObjectSeCount;
/* 0x1D4 */ Z2MultiSeObj mMultiTriggerSe[10];
/* 0x33C */ u8 mMultiTriggerSeCount;
/* 0x340 */ Vec field_0x340[8];
/* 0x3A0 */ Vec const* mModY[8];
/* 0x3A0 */ const Vec* mModY[8];
/* 0x3C0 */ u8 field_0x3c0;
/* 0x3C1 */ u8 field_0x3c1;
/* 0x3C2 */ u8 field_0x3c2;
@@ -109,9 +112,6 @@ private:
/* 0x3CA */ u8 field_0x3ca;
/* 0x3CB */ u8 field_0x3cb;
/* 0x3CC */ u8 mCrowdSize;
#if DEBUG
u8 semgr_pad[0x14];
#endif
}; // Size = 0x3D0
inline Z2SeMgr* Z2GetSeMgr() {
+78 -67
View File
@@ -5,89 +5,89 @@
#include "JSystem/JAudio2/JASGadget.h"
struct Z2SoundFader {
void move(f32 vol, u32 count) {
if (count != 0) {
mTransition.set(vol, mIntensity, count);
void move(f32 value, u32 moveTime) {
if (moveTime != 0) {
transition_.set(value, intensity_, moveTime);
} else {
mIntensity = vol;
mTransition.zero();
intensity_ = value;
transition_.zero();
}
}
void forceIn() {
mIntensity = 1.0f;
mTransition.zero();
intensity_ = 1.0f;
transition_.zero();
}
void forceOut() {
mIntensity = 0.0f;
mTransition.zero();
intensity_ = 0.0f;
transition_.zero();
}
void fadeIn(u32 count) {
if (count != 0) {
mTransition.set(1.0f, mIntensity, count);
void fadeIn(u32 fadeTime) {
if (fadeTime != 0) {
transition_.set(1.0f, intensity_, fadeTime);
} else {
forceIn();
}
}
void fadeOut(u32 count) {
if (count != 0) {
mTransition.set(0.0f, mIntensity, count);
void fadeOut(u32 fadeTime) {
if (fadeTime != 0) {
transition_.set(0.0f, intensity_, fadeTime);
} else {
forceOut();
}
}
void fadeInFromOut(u32 count) {
mIntensity = 0.0f;
fadeIn(count);
void fadeInFromOut(u32 fadeTime) {
intensity_ = 0.0f;
fadeIn(fadeTime);
}
u32 getCount() {
return mTransition.mCount;
return transition_.remainingSteps_;
}
f32 getIntensity() {
return mIntensity;
f32 getIntensity() const {
return intensity_;
}
f32 getDest() {
if (getCount() != 0) {
return mTransition.mDest;
return transition_.targetValue_;
} else {
return mIntensity;
return intensity_;
}
}
void calc() {
mIntensity = mTransition.apply(mIntensity);
intensity_ = transition_.apply(intensity_);
}
f32 get() {
return getIntensity();
}
/* 0x0 */ float mIntensity;
/* 0x4 */ JAISoundParamsTransition::TTransition mTransition;
/* 0x0 */ f32 intensity_;
/* 0x4 */ JAISoundParamsTransition::TTransition transition_;
}; // Size = 0x10
class Z2SeqMgr : public JASGlobalInstance<Z2SeqMgr> {
public:
Z2SeqMgr();
void bgmStart(u32 i_bgmID, u32, s32);
void bgmStop(u32 i_bgmID, s32);
void subBgmStart(u32);
void bgmStart(u32 bgmID, u32 fadeTime, s32);
void bgmStop(u32 fadeTime, s32);
void subBgmStart(u32 bgmID);
void subBgmStop();
void subBgmStopInner();
void bgmStreamPrepare(u32);
void bgmStreamPrepare(u32 bgmID);
bool bgmStreamCheckReady();
void bgmStreamPlay();
void bgmStreamStop(u32);
void changeBgmStatus(s32);
void changeSubBgmStatus(s32);
void bgmStreamStop(u32 fadeTime);
void changeBgmStatus(s32 status);
void changeSubBgmStatus(s32 status);
void onVariantBgmJumpEnd(bool);
void changeFishingBgm(s32);
void talkInBgm();
@@ -96,23 +96,24 @@ public:
void menuOutBgm();
void fanfareFramework();
void stopWolfHowlSong();
void setHeightVolMod(bool, u32);
void setTimeProcVolMod(bool, u32);
void setHeightVolMod(bool isVolMod, u32 fadeTime);
void setTimeProcVolMod(bool isVolMod, u32 fadeTime);
void processBgmFramework();
bool checkBgmIDPlaying(u32);
f32 getChildTrackVolume(JAISoundHandle*, int);
void setChildTrackVolume(JAISoundHandle*, int, float, u32, float, float);
bool checkBgmIDPlaying(u32 bgmID);
f32 getChildTrackVolume(JAISoundHandle* handle, int trackId);
void setChildTrackVolume(JAISoundHandle* handle, int trackId, f32 volume,
u32 moveTime, f32 pan, f32 dolby);
void resetBattleBgmParams();
void setBattleBgmOff(bool);
void setBattleSearched(bool);
void setBattleDistIgnore(bool);
void setBattleGhostMute(bool);
void setBattleDistState(u8);
void setBattleSeqState(u8);
void setBattleLastHit(u8);
void setBattleBgmOff(bool isBgmOff);
void setBattleSearched(bool isBattleSearched);
void setBattleDistIgnore(bool isBattleDistIgnore);
void setBattleGhostMute(bool isBattleGhostMute);
void setBattleDistState(u8 state);
void setBattleSeqState(u8 state);
void setBattleLastHit(u8 lastHit);
void battleBgmFramework();
void startBattleBgm(bool);
void stopBattleBgm(u8, u8);
void startBattleBgm(bool isFadeIn);
void stopBattleBgm(u8 subFadeoutTime, u8 mainFadeinTime);
void fieldBgmStart();
void fieldRidingMute();
void onFieldBgmJumpStart();
@@ -120,28 +121,33 @@ public:
void fieldBgmFramework();
void mbossBgmMuteProcess();
void bgmSetSwordUsing(s32);
void bgmNowBattle(float);
void bgmNowBattle(f32);
void taktModeMute();
void taktModeMuteOff();
void setFieldBgmPlay(bool value) { mFlags.mFieldBgmPlay = value; }
/* 802B99AC */ void unMuteSceneBgm(u32 count) {
/* 802B99AC */ void unMuteSceneBgm(u32 fadeTime) {
mBgmPause.move(1.0f, 0);
mSceneBgm.move(1.0f, count);
mSceneBgm.move(1.0f, fadeTime);
}
/* 802B9A24 */ void muteSceneBgm(u32 count, f32 vol) { mSceneBgm.move(vol, count); }
/* 802B9A24 */ void muteSceneBgm(u32 fadeTime, f32 vol) { mSceneBgm.move(vol, fadeTime); }
/* 802B9AD0 */ void setTwilightGateVol(f32 vol) {
mTwilightGateVol = vol < 0.0f ? 0.0f : vol > 1.0f ? 1.0f : vol;
}
/* 802B9AFC */ void setWindStoneVol(f32 vol, u32 count) { mWindStone.move(vol, count); };
/* 802B9AFC */ void setWindStoneVol(f32 vol, u32 fadeTime) { mWindStone.move(vol, fadeTime); };
void onEnemyDamage() { setBattleSeqState(2); }
void bgmAllMute(u32 count, f32 val) {
mAllBgmMaster.mTransition.set(val, mAllBgmMaster.mIntensity, count);
void bgmAllMute(u32 fadeTime, f32 val) {
mAllBgmMaster.move(val, fadeTime);
}
void bgmAllUnMute(u32 count) {
mAllBgmMaster.move(1.0f, count);
void bgmAllUnMute(u32 fadeTime) {
mAllBgmMaster.move(1.0f, fadeTime);
}
bool isItemGetDemo() {
@@ -149,35 +155,40 @@ public:
}
u32 getMainBgmID() {
u32 id;
if (mMainBgmHandle) {
return mMainBgmHandle->getID();
id = mMainBgmHandle->getID();
} else {
id = -1;
}
return -1;
return id;
}
u32 getSubBgmID() {
u32 id;
if (mSubBgmHandle) {
return mSubBgmHandle->getID();
id = mSubBgmHandle->getID();
} else {
id = -1;
}
return -1;
return id;
}
u32 getStreamBgmID() {
u32 id;
if (mStreamBgmHandle) {
return mStreamBgmHandle->getID();
id = mStreamBgmHandle->getID();
} else {
id = -1;
}
return -1;
return id;
}
bool checkBgmPlaying() {
bool ret = false;
if (mMainBgmHandle || mStreamBgmHandle) {
ret = true;
}
return ret;
return mMainBgmHandle || mStreamBgmHandle;
}
u32 checkPlayingSubBgmFlag() {
+14 -9
View File
@@ -14,33 +14,38 @@ public:
Z2SoundHandles();
~Z2SoundHandles();
void initHandlesPool(u8 pNumHandles);
void initHandlesPool(u8 handleNum);
void deleteHandlesPool();
Z2SoundHandlePool* getFreeHandle();
Z2SoundHandlePool* getLowPrioSound(JAISoundID pSoundId);
Z2SoundHandlePool* getLowPrioSound(JAISoundID soundID);
bool isActive() const;
Z2SoundHandlePool* getHandleSoundID(JAISoundID pSoundId);
Z2SoundHandlePool* getHandleUserData(u32 pUserData);
Z2SoundHandlePool* getHandleSoundID(JAISoundID soundID);
Z2SoundHandlePool* getHandleUserData(u32 userData);
void stopAllSounds(u32 fadeout);
void stopAllSounds(u32 fadeTime);
void stopSound(JAISoundID soundID, u32 param_1) {
void stopSound(JAISoundID soundID, u32 fadeTime) {
// u32 cast is a fakematch
JAISoundHandle* phandle = getHandleSoundID((u32)soundID);
if (phandle != NULL) {
(*phandle)->stop(param_1);
(*phandle)->stop(fadeTime);
}
}
void setPos(const JGeometry::TVec3<f32>& pos);
int getNumHandles() const { return getNumLinks(); }
Z2SoundHandlePool* getHandle(int index) { return (Z2SoundHandlePool*)getNth(index); }
Z2SoundHandlePool* getHandle(int index) {
JUT_ASSERT(49, index >= 0);
JUT_ASSERT(50, index < getNumLinks());
return (Z2SoundHandlePool*)getNth(index);
}
private:
/* 0xC */ u8 mNumHandles;
/* 0xC */ u8 handleNum_;
};
#endif /* Z2SOUNDHANDLES_H */
+17 -14
View File
@@ -4,27 +4,30 @@
#include "JSystem/JAudio2/JAISoundInfo.h"
#include "JSystem/JAudio2/JAIStreamDataMgr.h"
#include "JSystem/JAudio2/JAUSoundInfo.h"
#include "JSystem/JAudio2/JAUSoundTable.h"
class Z2SoundInfo : public JAISoundInfo, public JAUSoundInfo, public JAIStreamDataMgr, public JASGlobalInstance<Z2SoundInfo> {
public:
Z2SoundInfo() : JAISoundInfo(true), JAUSoundInfo(true), JASGlobalInstance<Z2SoundInfo>(true) {}
/* 802BB448 */ virtual u16 getAudibleSw(JAISoundID) const;
/* 802BB00C */ virtual u16 getBgmSeqResourceID(JAISoundID) const;
/* 802BBA88 */ virtual s32 getStreamFileEntry(JAISoundID);
/* 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;
/* 802BB8B4 */ virtual void getSeqInfo(JAISoundID, JAISeq*) const;
/* 802BB8E0 */ virtual void getStreamInfo(JAISoundID, JAIStream*) const;
/* 802BB448 */ virtual u16 getAudibleSw(JAISoundID soundID) const;
/* 802BB00C */ virtual u16 getBgmSeqResourceID(JAISoundID soundID) const;
/* 802BBA88 */ virtual s32 getStreamFileEntry(JAISoundID soundID);
/* 802BB090 */ virtual int getSoundType(JAISoundID soundID) const;
/* 802BB0D8 */ virtual int getCategory(JAISoundID soundID) const;
/* 802BB0E0 */ virtual u32 getPriority(JAISoundID soundID) const;
/* 802BB6DC */ virtual void getSeInfo(JAISoundID soundID, JAISe* sePtr) const;
/* 802BB8B4 */ virtual void getSeqInfo(JAISoundID soundID, JAISeq* seqPtr) const;
/* 802BB8E0 */ virtual void getStreamInfo(JAISoundID soundID, JAIStream* streamPtr) const;
/* 802BBBE0 */ virtual ~Z2SoundInfo() {}
/* 802BB158 */ JAUAudibleParam getAudibleSwFull(JAISoundID);
/* 802BBA10 */ const char* getStreamFilePath(JAISoundID);
/* 802BBAC8 */ int getSwBit(JAISoundID) const;
/* 802BBB48 */ void getSoundInfo_(JAISoundID, JAISound*) const;
/* 802BB158 */ JAUAudibleParam getAudibleSwFull(JAISoundID soundID);
/* 802BBA10 */ const char* getStreamFilePath(JAISoundID soundID);
/* 802BBAC8 */ int getSwBit(JAISoundID soundID) const;
/* 802BBB48 */ void getSoundInfo_(JAISoundID soundID, JAISound* soundPtr) const;
BOOL isValid() const;
BOOL isValid() const {
return JASGlobalInstance<JAUSoundTable>::getInstance() != NULL && JASGlobalInstance<JAUSoundTable>::getInstance()->isValid();
}
};
+17 -18
View File
@@ -5,39 +5,38 @@
#include "JSystem/JAudio2/JAISeqMgr.h"
#include "JSystem/JAudio2/JAIStreamMgr.h"
u16 seqCallback(JASTrack* param_0, u16 param_1);
u16 seqCallback(JASTrack* track, u16 command);
class Z2SoundMgr : public JASGlobalInstance<Z2SoundMgr> {
public:
/* 802A9E80 */ Z2SoundMgr();
/* 802AA1B0 */ void calc();
/* 802AA270 */ void setIIR(JAISound*, s16 const*);
/* 802AA33C */ void setFilterOff(JAISound*);
/* 802AA270 */ void setIIR(JAISound* sound, const s16* iir);
/* 802AA33C */ void setFilterOff(JAISound* sound);
/* 802AA430 */ void resetFilterAll();
/* 802AA528 */ void mixOut();
/* 802AA67C */ void framework();
/* 802AA6B0 */ void pauseAllGameSound(bool);
/* 802AA7DC */ void stopSoundID(JAISoundID);
/* 802AA6B0 */ void pauseAllGameSound(bool paused);
/* 802AA7DC */ void stopSoundID(JAISoundID soundID);
/* 802AA84C */ void stopSync();
/* 802AA8C8 */ void stop();
/* 802AA908 */ void initParams();
/* 802AA9E8 */ void multiVolumeSoundID(JAISoundID, f32);
/* 802AAAC4 */ bool isPlayingSoundID(JAISoundID);
/* 802AA9E8 */ void multiVolumeSoundID(JAISoundID soundID, f32 volume);
/* 802AAAC4 */ bool isPlayingSoundID(JAISoundID soundID);
/* 802A9EE8 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*);
/* 802A9EE8 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
JAISeMgr* getSeMgr() { return &mSeMgr; }
const JAISeMgr* getSeMgr() const { return &mSeMgr; }
JAISeqMgr* getSeqMgr() { return &mSeqMgr; }
const JAISeqMgr* getSeqMgr() const { return &mSeqMgr; }
JAIStreamMgr* getStreamMgr() { return &mStreamMgr; }
JAISeMgr* getSeMgr() { return &seMgr_; }
const JAISeMgr* getSeMgr() const { return &seMgr_; }
JAISeqMgr* getSeqMgr() { return &seqMgr_; }
const JAISeqMgr* getSeqMgr() const { return &seqMgr_; }
JAIStreamMgr* getStreamMgr() { return &streamMgr_; }
private:
/* 0x004 */ JAISeMgr mSeMgr;
/* 0x728 */ JAISeqMgr mSeqMgr;
/* 0x79C */ JAIStreamMgr mStreamMgr;
/* 0x80C */ JAISoundID mSoundID;
/* 0x004 */ JAISeMgr seMgr_;
/* 0x728 */ JAISeqMgr seqMgr_;
/* 0x79C */ JAIStreamMgr streamMgr_;
/* 0x80C */ JAISoundID soundID_;
}; // Size: 0x810
#if VERSION != VERSION_SHIELD_DEBUG
+22 -13
View File
@@ -3,6 +3,8 @@
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JSupport/JSUList.h"
#include "Z2AudioLib/Z2SoundObject.h"
#include "global.h"
class Z2CreatureEnemy;
@@ -83,32 +85,39 @@ enum Z2EnemyID {
class Z2SoundObjMgr : public JASGlobalInstance<Z2SoundObjMgr>, protected JSUList<Z2CreatureEnemy> {
public:
Z2SoundObjMgr();
void setForceBattleArea(bool, u16, u16, u16);
void setForceBattleArea(bool forceBattle, u16, u16, u16);
void searchEnemy();
void setGhostEnemyState(u8);
u8 getEnemyID(char const*, JSULink<Z2CreatureEnemy>*);
void setGhostEnemyState(u8 state);
u8 getEnemyID(const char* enemyName, JSULink<Z2CreatureEnemy>* enemyLink);
void setBattleInit();
bool checkBattleFinish();
void deleteEnemyAll();
bool removeEnemy(JSULink<Z2CreatureEnemy>*);
bool removeEnemy(JSULink<Z2CreatureEnemy>* enemyLink);
u8 isTwilightBattle();
u8 getEnemyNumNear() { return mEnemyNumNear; }
u8 getEnemyNumVeryFar() { return mEnemyNumVeryFar; }
bool isForceBattle() { return mForceBattle; }
u8 getEnemyNumNear() const { return enemuNumNear_; }
u8 getEnemyNumVeryFar() { return enemuNumVeryFar_; }
bool isForceBattle() { return forceBattle_; }
JSUList<Z2CreatureEnemy>* getEnemyList() { return this; }
#if VERSION == VERSION_SHIELD_DEBUG
JSUList<Z2SoundObjBase>* getAllList() { return &allList_; }
#endif
private:
/* 0x0C */ Z2EnemyArea mEnemyArea;
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x0C */ JSUList<Z2SoundObjBase> allList_;
#endif
/* 0x0C */ Z2EnemyArea enemyArea_;
/* 0x14 */ u8 field_0x14;
/* 0x15 */ u8 mEnemyNumNear;
/* 0x15 */ u8 enemuNumNear_;
/* 0x16 */ u8 field_0x16;
/* 0x17 */ u8 mEnemyNumVeryFar;
/* 0x17 */ u8 enemuNumVeryFar_;
/* 0x18 */ u8 field_0x18;
/* 0x19 */ u8 mGhostEnemyState;
/* 0x19 */ u8 ghostEnemyState_;
/* 0x1A */ u8 field_0x1a;
/* 0x1B */ u8 mTwilightBattle;
/* 0x1C */ bool mForceBattle;
/* 0x1B */ u8 twilightBattle_;
/* 0x1C */ bool forceBattle_;
}; // Size = 0x20
inline Z2SoundObjMgr* Z2GetSoundObjMgr() {
+56 -53
View File
@@ -6,33 +6,33 @@
class Z2SoundStarter;
class Z2SoundObjBase : public Z2SoundHandles {
class Z2SoundObjBase : public Z2SoundHandles
#if VERSION == VERSION_SHIELD_DEBUG
, public JSULink<Z2SoundObjBase>
#endif
{
public:
Z2SoundObjBase();
~Z2SoundObjBase();
void deleteObject();
Z2SoundHandlePool* startCollisionSE(u32, u32, Z2SoundObjBase*);
Z2SoundHandlePool* startCollisionSE(u32 hitID, u32 mapinfo, Z2SoundObjBase* other);
bool isAlive() const { return mIsInitialized; }
void setSoundStarter(Z2SoundStarter* i_soundStarter) { mSoundStarter = i_soundStarter; }
bool isAlive() { return alive_; }
void setSoundStarter(Z2SoundStarter* soundStarter) { soundStarter_ = soundStarter; }
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x10 */ u8 unk_0x10[0x20 - 0x10];
#endif
virtual void framework(u32, s8 reverb);
virtual void framework(u32 mapinfo, s8 reverb);
virtual void dispose();
virtual bool stopOK(Z2SoundHandlePool& pool);
virtual void init(Vec* pSoundPos, u8 pNumHandles);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual bool stopOK(Z2SoundHandlePool& handlePool);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 0x14 */ Z2SoundStarter* mSoundStarter;
/* 0x18 */ JGeometry::TVec3<f32>* mSoundPos;
/* 0x14 */ Z2SoundStarter* soundStarter_;
/* 0x18 */ JGeometry::TVec3<f32>* pos_;
/* 0x1C */ u16 field_0x1c;
/* 0x1E */ s8 field_0x1e;
/* 0x1F */ bool mIsInitialized;
/* 0x1E */ s8 reverb_;
/* 0x1F */ bool alive_;
};
class Z2SoundObjSimple : public Z2SoundObjBase {
@@ -40,51 +40,54 @@ public:
Z2SoundObjSimple();
~Z2SoundObjSimple() {}
virtual void init(Vec* pSoundPos, u8 pNumHandles);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
};
class Z2SoundObjAnime : public Z2SoundObjBase {
public:
/* 802BEB94 */ Z2SoundObjAnime();
/* 802BEBFC */ void initAnime(void*, bool, f32, f32);
/* 802BEBFC */ void initAnime(void* animation, bool, f32 startFrame, f32);
/* 802BED68 */ void ageSounds_();
/* 802BEED4 */ void updateAnime(f32, f32);
/* 802BF304 */ void updateSoundLifeTime_(f32, f32);
/* 802BF660 */ void startSoundInner(JGeometry::TVec3<f32> const&, f32, Z2SoundStarter*, u32,
s8);
/* 802BF890 */ u32 getSoundID(JAUSoundAnimationSound const*,
JGeometry::TVec3<f32> const&, f32);
/* 802BF898 */ bool playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3<f32> const&,
f32);
/* 802BF660 */ void startSoundInner(const JGeometry::TVec3<f32>& pos, f32 param_1,
Z2SoundStarter* soundStarter, u32 mapinfo, s8 reverb);
/* 802BF890 */ u32 getSoundID(const JAUSoundAnimationSound* animationSound, const JGeometry::TVec3<f32>&, f32);
/* 802BF898 */ bool playsSound(const JAUSoundAnimationSound* animationSound, const JGeometry::TVec3<f32>&, f32);
/* 802BEBDC */ virtual void init(Vec*, u8);
/* 802BEBDC */ virtual void init(Vec* posPtr, u8 handleNum);
void stopAnime() { mpAnimation = NULL; }
void setLoopStartFrame(f32 i_frame) {
mStartSoundFrame = i_frame;
mStartSoundIndex = mpAnimation->getStartSoundIndex(i_frame);
}
void setLoopEndFrame(f32 i_frame) {
mEndSoundFrame = i_frame;
mEndSoundIndex = mpAnimation->getEndSoundIndex(i_frame);
}
void setLoopFrame(f32 i_startFrame, f32 i_endFrame) {
setLoopStartFrame(i_startFrame);
setLoopEndFrame(i_endFrame);
void stopAnime() { animation_ = NULL; }
void setLoopStartFrame(f32 frame) {
JUT_ASSERT(119, animation_);
startSoundFrame_ = frame;
startSoundIndex_ = animation_->getStartSoundIndex(frame);
}
/* 0x20 */ JAUSoundAnimation* mpAnimation;
void setLoopEndFrame(f32 frame) {
JUT_ASSERT(125, animation_);
endSoundFrame_ = frame;
endSoundIndex_ = animation_->getEndSoundIndex(frame);
}
void setLoopFrame(f32 startFrame, f32 endFrame) {
setLoopStartFrame(startFrame);
setLoopEndFrame(endFrame);
}
/* 0x20 */ JAUSoundAnimation* animation_;
/* 0x24 */ int field_0x24;
/* 0x28 */ f32 mCurSoundFrame;
/* 0x2C */ f32 mStartSoundFrame;
/* 0x30 */ f32 mEndSoundFrame;
/* 0x34 */ int mStartSoundIndex;
/* 0x38 */ int mEndSoundIndex;
/* 0x28 */ f32 curSoundFrame_;
/* 0x2C */ f32 startSoundFrame_;
/* 0x30 */ f32 endSoundFrame_;
/* 0x34 */ int startSoundIndex_;
/* 0x38 */ int endSoundIndex_;
/* 0x3C */ int field_0x3c;
/* 0x40 */ int mCurSoundIndex;
/* 0x44 */ bool mReverse;
/* 0x40 */ int curSoundIndex_;
/* 0x44 */ bool reverse_;
};
class Z2DopplerSoundObjBase : public Z2SoundObjBase {
@@ -92,10 +95,10 @@ public:
Z2DopplerSoundObjBase();
~Z2DopplerSoundObjBase();
virtual void framework(u32, s8);
virtual void init(Vec*, u8);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual void framework(u32 mapinfo, s8 reverb);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 0x20 */ JGeometry::TVec3<f32> field_0x20;
/* 0x2C */ JGeometry::TVec3<f32> field_0x2c;
@@ -104,7 +107,7 @@ public:
class Z2SoundObjArrow : public Z2DopplerSoundObjBase {
public:
/* 802BEB38 */ Z2SoundObjArrow();
/* 802BEB74 */ virtual void init(Vec*, u8);
/* 802BEB74 */ virtual void init(Vec* posPtr, u8 handleNum);
};
#endif /* Z2SOUNDOBJECT_H */
+7 -6
View File
@@ -4,14 +4,15 @@
#include "JSystem/JAudio2/JAISoundStarter.h"
struct Z2SoundStarter : public JAISoundStarter, public JASGlobalInstance<Z2SoundStarter> {
Z2SoundStarter(bool);
void setPortData(JAISoundHandle*, u32, u16, s8);
u16 getPortData(JAISoundHandle*, u32, s8);
Z2SoundStarter(bool setInstance);
void setPortData(JAISoundHandle* handlePtr, u32 portNum, u16 data, s8 childIndex);
u16 getPortData(JAISoundHandle* handlePtr, u32 portNum, s8 childIndex);
virtual ~Z2SoundStarter() {}
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);
virtual bool startSound(JAISoundID soundID, JAISoundHandle* handlePtr, const JGeometry::TVec3<f32>* posPtr);
virtual bool startSound(JAISoundID soundID, JAISoundHandle* handlePtr,
const JGeometry::TVec3<f32>* posPtr, u32 mapinfo, f32 fxMix,
f32 pitch, f32 volume, f32 pan, f32 dolby, u32 moveSteps);
};
inline Z2SoundStarter* Z2GetSoundStarter() {
+6 -6
View File
@@ -2,7 +2,7 @@
#define Z2STATUSMGR_H
#include "JSystem/JAudio2/JASGadget.h"
#include "dolphin/mtx.h"
#include <dolphin/mtx.h>
struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
Z2StatusMgr();
@@ -13,13 +13,13 @@ struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
void menuIn();
void menuOut();
bool isMovieDemo();
void setDemoName(char*);
void setDemoName(char* demoName);
void processTime();
bool checkDayTime();
void setEventBit(void*);
void setCameraPolygonPos(Vec*);
void setEventBit(void* eventBit);
void setCameraPolygonPos(Vec* polygonPos);
void setCameraGroupInfo(u8);
void setCameraInWaterDepth(float);
void setCameraInWaterDepth(f32 depth);
u8 getDemoStatus() { return mDemoStatus; }
void setHour(s32 hour) { mHour = hour; }
@@ -28,7 +28,7 @@ struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
f32 getCameraInWaterDepth() { return mUnderwaterDepth; }
f32 getCameraInWaterDepthRatio() { return mCameraInWaterDepthRatio; }
u8 getHour() { return mHour; }
bool isPaused() { return mPauseFlag; }
u8 isPaused() { return mPauseFlag; }
bool isHeartGuageOn() { return mHeartGaugeOn; }
void getCameraMapInfo(u32 info) { mCameraMapInfo = info; }
void setPauseFlag(u8 flag) { mPauseFlag = flag; }
+40 -21
View File
@@ -13,14 +13,33 @@
* The low byte of each u16 line corresponds to length of note
*/
struct SongNote {
u8 barType;
struct Z2WolfHowlLine {
u8 type;
u8 length;
};
#define HOWL_LINE_HIGH 1
#define HOWL_LINE_MID 2
#define HOWL_LINE_LOW 3
struct Z2WolfHowlData {
u8 mLineNum;
SongNote* mSongData;
u8 lineNum;
Z2WolfHowlLine* lineData;
};
enum Z2WolfHowlCurveID {
Z2WOLFHOWL_NONE = -1,
Z2WOLFHOWL_TOBIKUSA,
Z2WOLFHOWL_UMAKUSA,
Z2WOLFHOWL_ZELDASONG,
Z2WOLFHOWL_HEALINGSONG,
Z2WOLFHOWL_SOULREQUIEM,
Z2WOLFHOWL_LIGHTPRELUDE,
Z2WOLFHOWL_NEWSONG1,
Z2WOLFHOWL_NEWSONG2,
Z2WOLFHOWL_NEWSONG3,
Z2WOLFHOWL_MAX
};
class Z2WolfHowlMgr : public JASGlobalInstance<Z2WolfHowlMgr> {
@@ -32,32 +51,32 @@ public:
f32 getNowPitch();
f32 getNowInputValue();
void calcPitchMod(f32, f32);
s8 startWolfHowlSound(f32, f32, bool, f32);
void setCorrectData(s8, Z2WolfHowlData*);
SongNote getCorrectLine(u8);
s8 startWolfHowlSound(f32, f32 stickValue, bool isHowl, f32);
void setCorrectData(s8 curveID, Z2WolfHowlData* data);
Z2WolfHowlLine getCorrectLine(u8 lineIndex);
u8 getCorrectLineNum();
s8 checkLine();
s8 getOnLineNum();
void startWindStoneSound(s8, Vec*);
int startGuideMelody(bool);
void startWindStoneSound(s8 curveID, Vec* pos);
int startGuideMelody(bool startSound);
void skipCorrectDemo();
void setCorrectCurve(s8 i_curve) { setCorrectData(i_curve, NULL); }
void setCorrectCurve(s8 curveID) { setCorrectData(curveID, NULL); }
u32 getTimer() { return mTimer; }
u8 getReleaseTimer() { return mReleaseTimer; }
u8 getCorrectCurveID() { return mCorrectCurveID; }
private:
/* 0x00 */ JAISoundHandle field_0x00;
/* 0x04 */ JAISoundHandle field_0x04;
/* 0x08 */ JAISoundHandle field_0x08;
/* 0x0C */ Z2WolfHowlData* mpCurSong;
/* 0x10 */ Z2WolfHowlData* mpSongList;
/* 0x00 */ JAISoundHandle mWolfHowlHandle;
/* 0x04 */ JAISoundHandle mWindStoneHandle;
/* 0x08 */ JAISoundHandle mGuideHandle;
/* 0x0C */ Z2WolfHowlData* mNowHowlData;
/* 0x10 */ Z2WolfHowlData* mGuideData;
/* 0x14 */ f32 mNowInputValue;
/* 0x18 */ f32 field_0x18;
/* 0x18 */ f32 mWolfHowlVolume;
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x24 */ f32 mNowPitch;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ u8 field_0x2c[4];
/* 0x30 */ f32 field_0x30;
@@ -69,13 +88,13 @@ private:
/* 0x8D */ u8 field_0x8d;
/* 0x8E */ s8 mCorrectCurveID;
/* 0x8F */ u8 field_0x8f;
/* 0x90 */ s16 field_0x90;
/* 0x90 */ s16 mCorrectScore;
/* 0x92 */ u16 field_0x92[20];
/* 0xBA */ u8 field_0xba;
/* 0xBA */ u8 mNowLineIndex;
/* 0xBB */ s8 field_0xbb;
/* 0xBC */ u8 field_0xbc;
/* 0xBC */ u8 mNowLineScore;
/* 0xBD */ s8 field_0xbd;
/* 0xBE */ u16 field_0xbe;
/* 0xBE */ u16 mFullScore;
};
#endif /* Z2WOLFHOWLMGR_H */