d_a_alink_swim work / fix JASGlobalInstance (#288)

* daalink / z2linkmgr wip

* first cleanup of JASGlobalInstance data

* fix sInstance stuff part 2

* more d_a_alink_swim work

* remove asm
This commit is contained in:
TakaRikka
2023-02-16 13:09:22 -08:00
committed by GitHub
parent ebc54b9a93
commit af684e72c6
301 changed files with 2061 additions and 3166 deletions
@@ -595,6 +595,7 @@ public:
f32 getRate() const { return mRate; }
f32 getFrame() const { return mFrame; }
s16 getEnd() const { return mEnd; }
s16 getStart() const { return mStart; }
u8 getAttribute() const { return mAttribute; }
u8 getState() const { return mState; }
void setAttribute(u8 attr) { mAttribute = attr; }
+4 -2
View File
@@ -4,8 +4,8 @@
#include "JSystem/JAudio2/JAIAudience.h"
#include "JSystem/JAudio2/JAISeqDataMgr.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/types.h"
struct JASNonCopyable {
/* 0x0 */ int field_0x0;
@@ -48,7 +48,9 @@ public:
/* 0x68 */ int mMaxActiveSe;
}; // Size: 0x6C
class JAISeMgr : public JAISeqDataUser, public JAISoundActivity {
class JAISeMgr : public JAISeqDataUser,
public JAISoundActivity,
public JASGlobalInstance<JAISeMgr> {
public:
/* 802A0074 */ JAISeMgr(bool);
/* 802A0268 */ void setCategoryArrangement(JAISeCategoryArrangement const&);
+2 -2
View File
@@ -4,12 +4,12 @@
#include "JSystem/JAudio2/JAIAudience.h"
#include "JSystem/JAudio2/JAISeqDataMgr.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/types.h"
struct JAISeq;
class JAISeqMgr : public JAISeqDataUser {
class JAISeqMgr : public JAISeqDataUser, public JASGlobalInstance<JAISeqMgr> {
public:
/* 802A1914 */ JAISeqMgr(bool);
/* 802A1A08 */ void freeDeadSeq_();
+1 -12
View File
@@ -29,18 +29,7 @@ public:
} mId;
};
struct JASTrack {
/* 80291444 */ void setChannelMgrCount(u32);
/* 802919F4 */ void assignExtBuffer(u32, JASSoundParams*);
/* 80291C30 */ void openChild(u32);
/* 80292918 */ void writePort(u32, u16);
/* 8029297C */ void readPort(u32);
inline int getChannelMgrCount() { return channelMgrCount; }
/* 0x0 */ u8 field_0x0[0x1d0];
/* 0x1d0 */ int channelMgrCount;
};
class JASTrack;
struct JAISoundStatus_ {
/* 802A2220 */ s32 lockWhenPrepared();
+2 -2
View File
@@ -32,7 +32,7 @@ public:
class JAISoundHandles {
public:
JAISoundHandles(JAISoundHandle* pHandle, int param_1) {
*mSoundHandle = pHandle;
mSoundHandle = pHandle;
numHandles_ = param_1;
};
@@ -40,7 +40,7 @@ public:
JAISoundHandle* getFreeHandle();
private:
JAISoundHandle** mSoundHandle;
JAISoundHandle* mSoundHandle;
int numHandles_;
};
+2 -2
View File
@@ -1,10 +1,10 @@
#ifndef JAISOUNDSTARTER_H
#define JAISOUNDSTARTER_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
struct JAISoundStarter {
struct JAISoundStarter : public JASGlobalInstance<JAISoundStarter> {
/* 802A2F6C */ JAISoundStarter(bool);
/* 802A2FEC */ void startLevelSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
+2 -2
View File
@@ -2,8 +2,8 @@
#define JAISTREAMMGR_H
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/types.h"
class JAIStreamMgr;
@@ -15,7 +15,7 @@ struct JAIStream {
/* 802A388C */ void JAIStreamMgr_calc_();
};
class JAIStreamMgr {
class JAIStreamMgr : public JASGlobalInstance<JAIStreamMgr> {
public:
/* 802A3B68 */ JAIStreamMgr(bool);
/* 802A3C3C */ void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
+2 -2
View File
@@ -1,9 +1,9 @@
#ifndef JASAUDIOTHREAD_H
#define JASAUDIOTHREAD_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
struct JASAudioThread {
struct JASAudioThread : public JASGlobalInstance<JASAudioThread> {
/* 8029CCDC */ JASAudioThread(int, int, u32);
/* 8029CD4C */ void create(s32);
/* 8029CDC0 */ void stop();
+10 -10
View File
@@ -3,21 +3,21 @@
#include "dolphin/types.h"
template <class T>
template<class T>
class JASGlobalInstance {
public:
inline T* getInstance() { return sInstance; }
JASGlobalInstance(T* inst) {
sInstance = inst;
}
inline JASGlobalInstance(bool param) {
if (param) {
ASSERT(sInstance == 0);
//if (this!=NULL) {
sInstance = (T*)this;
//We need a better way to compute the location of sInstance
//sInstance = (T*)((char*)this-(char*)&(((T*)NULL)->JASGlobalInstance<T>));
//}
~JASGlobalInstance() {
if (this == sInstance) {
sInstance = NULL;
}
}
static T* getInstance() { return sInstance; }
static T* sInstance;
};
+10 -1
View File
@@ -1,8 +1,8 @@
#ifndef JASTRACK_H
#define JASTRACK_H
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JAudio2/JASSoundParams.h"
#include "dolphin/types.h"
struct JASDsp {
struct TChannel {
@@ -106,6 +106,15 @@ struct JASTrack {
static u8 const sPitchEnvOsc[24];
static u8 sDefaultBankTable[1036];
static u8 sTrackList[16];
int getChannelMgrCount() { return channelMgrCount; }
/* 0x000 */ u8 field_0x0[0x1d0];
/* 0x1D0 */ int channelMgrCount;
};
struct JASDefaultBankTable : public JASGlobalInstance<JASDefaultBankTable> {
/* 802934B4 */ ~JASDefaultBankTable();
};
#endif /* JASTRACK_H */
+12 -1
View File
@@ -1,6 +1,17 @@
#ifndef JAUSOUNDTABLE_H
#define JAUSOUNDTABLE_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
struct JAUSoundTable : public JASGlobalInstance<JAUSoundTable> {
/* 802A7114 */ void init(void const*);
/* 802A7160 */ void getTypeID(JAISoundID) const;
/* 802A728C */ void getData(JAISoundID) const;
};
struct JAUSoundNameTable : public JASGlobalInstance<JAUSoundNameTable> {
/* 802A73D4 */ void init(void const*);
};
#endif /* JAUSOUNDTABLE_H */
+8 -3
View File
@@ -54,16 +54,21 @@ inline T cLib_checkBit(T& value, u8 bit) {
template <typename T>
inline T cLib_minMaxLimit(T val, T min, T max) {
T ret;
T var_r30;
if (val < min) {
ret = min;
} else {
if (val > max) {
val = max;
var_r30 = max;
} else {
var_r30 = val;
}
ret = val;
ret = var_r30;
}
return ret;
return (T)ret;
}
template <typename T>
+10 -2
View File
@@ -2,9 +2,9 @@
#define Z2AUDIENCE_H
#include "JSystem/JAudio2/JAIAudience.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JGeometry.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct Z2Audible;
@@ -40,6 +40,8 @@ struct Z2SpotMic {
/* 802BCFE4 */ void calcMicPriority(f32);
/* 802BD03C */ void calcMicVolume(f32, int, f32);
void setPosPtr(Vec* i_posPtr) { mPosPtr = i_posPtr; }
/* 0x00 */ f32 field_0x0;
/* 0x04 */ f32 field_0x4;
/* 0x08 */ f32 field_0x8;
@@ -101,7 +103,7 @@ struct Z2AudibleChannel {
/* 802BBE74 */ Z2AudibleChannel();
};
struct Z2Audience : public JAIAudience {
struct Z2Audience : public JAIAudience, public JASGlobalInstance<Z2Audience> {
/* 802BD130 */ Z2Audience();
/* 802BD2DC */ void setAudioCamera(f32 (*)[4], Vec&, Vec&, f32, f32, bool, int, bool);
/* 802BD704 */ void calcOffMicSound(f32);
@@ -126,6 +128,8 @@ struct Z2Audience : public JAIAudience {
/* 802BD5B8 */ virtual u32 calcPriority(JAIAudible*);
/* 802BD71C */ virtual void mixChannelOut(JASSoundParams const&, JAIAudible*, int);
Z2SpotMic* getLinkMic() { return mLinkMic; }
/* 0x004 */ f32 field_0x4;
/* 0x008 */ u8 field_0x8;
/* 0x00C */ Z2Audience3DSetting mSetting;
@@ -137,4 +141,8 @@ struct Z2Audience : public JAIAudience {
/* 0x1DC */ bool mUsingOffMicVol;
}; // Size: 0x1E0
inline Z2Audience* Z2GetAudience() {
return JASGlobalInstance<Z2Audience>::getInstance();
}
#endif /* Z2AUDIENCE_H */
+27 -14
View File
@@ -3,7 +3,6 @@
#include "SSystem/SComponent/c_xyz.h"
#include "Z2AudioLib/Z2SoundObject.h"
#include "dolphin/types.h"
class Z2Creature {
public:
@@ -27,8 +26,9 @@ public:
virtual void startCreatureExtraSoundLevel(JAISoundID, u32, s8);
virtual void startCollisionSE(u32, u32);
private:
/* 0x04 */ int field_0x04;
Vec* getCurrentPos() const { return mpPos; }
/* 0x04 */ Vec* mpPos;
/* 0x08 */ Z2SoundObjAnime mSoundObjAnime;
/* 0x50 */ Z2SoundObjSimple mSoundObjSimple1;
/* 0x70 */ Z2SoundObjSimple mSoundObjSimple2;
@@ -37,12 +37,12 @@ private:
struct Z2LinkSoundStarter : public Z2SoundStarter {
Z2LinkSoundStarter();
virtual ~Z2LinkSoundStarter();
inline virtual ~Z2LinkSoundStarter();
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, f32,
f32, f32, f32, f32, u32);
};
class Z2CreatureLink : public Z2Creature {
class Z2CreatureLink : public Z2Creature, public Z2LinkSoundStarter {
public:
Z2CreatureLink();
~Z2CreatureLink();
@@ -72,14 +72,13 @@ public:
int startHitItemSE(u32, u32, Z2SoundObjBase*, float);
void setResumeAttack(bool);
void setInWater(bool status) {
mFlags = (u8)((mFlags & ~0x40) | ((status << 6) & 0x40)); // what is going on here
}
void setInWater(bool status) { mInWater = status; }
bool isInWater() { return mInWater; }
static Z2CreatureLink* mLinkPtr;
private:
/* 0x90 */ Z2LinkSoundStarter mLinkSoundStarter;
/* 0x90 Z2LinkSoundStarter */
/* 0x94 */ Z2SoundObjSimple mKantera;
/* 0xB4 */ cXyz field_0xb4;
/* 0xC0 */ u8 mLinkState;
@@ -93,8 +92,22 @@ private:
/* 0xC8 */ u8 mMoveSpeed;
/* 0xC9 */ u8 mMovingTime;
/* 0xCA */ s8 mSinkDepth;
/* 0xCB */ u8 mFlags;
/* 0xCC */ u8 mFlags2;
/* 0xCB */ bool mWolfEyeOpen : 1;
/* 0xCB */ bool mInWater : 1;
/* 0xCB */ bool mResumeAttack : 1;
/* 0xCB */ bool mFlag3 : 1;
/* 0xCB */ bool mFlag4 : 1;
/* 0xCB */ bool mFlag5 : 1;
/* 0xCB */ bool mRiding : 1;
/* 0xCB */ bool mMagnetized : 1;
/* 0xCC */ bool mFlag8 : 1;
/* 0xCC */ bool mUsingIronBall : 1;
/* 0xCC */ bool mFlag10 : 1;
/* 0xCC */ bool mFlag11 : 1;
/* 0xCC */ bool mFlag12 : 1;
/* 0xCC */ bool mFlag13 : 1;
/* 0xCC */ bool mFlag14 : 1;
/* 0xCC */ bool mFlag15 : 1;
}; // Size: 0xD0
inline Z2CreatureLink* Z2GetLink() {
@@ -105,7 +118,7 @@ class Z2CreatureRide;
struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);
/* 802C5078 */ virtual ~Z2RideSoundStarter();
/* 802C5078 */ inline virtual ~Z2RideSoundStarter();
/* 802C5284 */ virtual void startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
@@ -113,7 +126,7 @@ struct Z2RideSoundStarter : public Z2SoundStarter {
/* 0x4 */ Z2CreatureRide* mRide;
};
class Z2CreatureRide : public Z2Creature {
class Z2CreatureRide : public Z2Creature, public Z2RideSoundStarter {
public:
Z2CreatureRide();
~Z2CreatureRide();
@@ -123,7 +136,7 @@ public:
virtual void deleteObject();
private:
/* 0x90 */ Z2RideSoundStarter mSoundStarter;
/* 0x90 */ // Z2RideSoundStarter mSoundStarter;
/* 0x98 */ bool mLinkRiding;
}; // Size: 0x9C
+2 -2
View File
@@ -1,10 +1,10 @@
#ifndef Z2ENVSEMGR_H
#define Z2ENVSEMGR_H
#include "JSystem/JAudio2/JASGadget.h"
#include "Z2AudioLib/Z2Calc.h"
#include "Z2AudioLib/Z2SeMgr.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct Z2EnvSeBase {
/* 802C589C */ Z2EnvSeBase(Vec*);
@@ -43,7 +43,7 @@ struct Z2EnvSeDir : public Z2EnvSeBase {
/* 0x10 */ Vec mPanDir;
}; // Size: 0x1C
struct Z2EnvSeMgr {
struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> {
/* 802C611C */ Z2EnvSeMgr();
/* 802C6540 */ ~Z2EnvSeMgr();
/* 802C66B0 */ void framework();
+6 -2
View File
@@ -3,13 +3,13 @@
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
struct Z2FxLineEditNode {};
struct Z2FxLineConfig {};
struct Z2FxLineMgr {
struct Z2FxLineMgr : public JASGlobalInstance<Z2FxLineMgr> {
/* 802BA7DC */ Z2FxLineMgr();
/* 802BA7FC */ void initDataArc(JKRArchive*, JKRHeap*);
/* 802BAC28 */ void setLineID(s8, bool, bool);
@@ -26,4 +26,8 @@ struct Z2FxLineMgr {
/* 0x18 */ Z2FxLineEditNode* mHIOEdit;
}; // Size: 0x1C
inline Z2FxLineMgr* Z2GetFxLineMgr() {
return JASGlobalInstance<Z2FxLineMgr>::getInstance();
}
#endif /* Z2FXLINEMGR_H */
+6 -2
View File
@@ -2,9 +2,9 @@
#define Z2SCENEMGR_H
#include "JSystem/JAudio2/JAISound.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
class Z2SceneMgr {
class Z2SceneMgr : public JASGlobalInstance<Z2SceneMgr> {
public:
Z2SceneMgr();
void setInDarkness(bool);
@@ -55,4 +55,8 @@ private:
/* 0x1E */ bool inDarkness;
}; // Size = 0x20
inline Z2SceneMgr* Z2GetSceneMgr() {
return JASGlobalInstance<Z2SceneMgr>::getInstance();
}
#endif /* Z2SCENEMGR_H */
+6 -2
View File
@@ -2,8 +2,8 @@
#define Z2SEMGR_H
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
struct Z2MultiSeMgr {
Z2MultiSeMgr();
@@ -30,7 +30,7 @@ struct Z2MultiSeObj : Z2MultiSeMgr {
/* 0x20 */ u8 field_0x20;
}; // Size = 0x24
class Z2SeMgr {
class Z2SeMgr : public JASGlobalInstance<Z2SeMgr> {
public:
/* 802AB64C */ Z2SeMgr();
/* 802AB750 */ void initSe();
@@ -78,6 +78,10 @@ private:
/* 0x3CC */ u8 mCrowdSize;
}; // Size = 0x3D0
inline Z2SeMgr* Z2GetSeMgr() {
return JASGlobalInstance<Z2SeMgr>::getInstance();
}
// JAISoundID's for sound effects
enum Z2SoundID {
Z2SE_SY_DUMMY = 0x0,
+8 -2
View File
@@ -2,7 +2,7 @@
#define Z2SEQMGR_H
#include "JSystem/JAudio2/JAISound.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
// move TTransition / Z2SoundFader ?
struct TTransition {
@@ -21,7 +21,7 @@ struct Z2SoundFader {
/* 0x4 */ JAISoundParamsTransition::TTransition mTransition;
}; // Size = 0x10
class Z2SeqMgr {
class Z2SeqMgr : public JASGlobalInstance<Z2SeqMgr> {
public:
Z2SeqMgr();
@@ -77,6 +77,8 @@ public:
/* 802B9AD0 */ void setTwilightGateVol(f32);
/* 802B9AFC */ void setWindStoneVol(f32, u32);
void onEnemyDamage() { setBattleSeqState(2); }
void i_setTwilightGateVol(f32 vol) { mTwilightGateVol = vol; }
void i_setWindStoneVol(f32 vol, u32 count) { mWindStone.move(vol, count); }
@@ -122,6 +124,10 @@ private:
/* 0xD0 */ u8 mFlags;
}; // Size = 0xD4
inline Z2SeqMgr* Z2GetSeqMgr() {
return JASGlobalInstance<Z2SeqMgr>::getInstance();
}
enum Z2BgmID {
Z2BGM_FIELD_LINK_DAY = 0x1000000,
Z2BGM_FIELD_LINK_NIGHT = 0x1000001,
+9 -10
View File
@@ -1,19 +1,18 @@
#ifndef Z2SOUNDINFO_H
#define Z2SOUNDINFO_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"
struct JAISeq {};
struct JAISeq;
struct JAISound {};
struct JAISound;
struct JAIStream {};
struct JAIStream;
struct JAISe {};
struct JAISe;
struct JAISoundID {};
struct JAISoundInfo {
struct JAISoundInfo : public JASGlobalInstance<JAISoundInfo> {
virtual void getSoundType(JAISoundID) const = 0;
virtual void getCategory(JAISoundID) const = 0;
virtual void getPriority(JAISoundID) const = 0;
@@ -23,7 +22,7 @@ struct JAISoundInfo {
virtual ~JAISoundInfo();
};
struct JAUSoundInfo {
struct JAUSoundInfo : public JASGlobalInstance<JAUSoundInfo> {
virtual void getAudibleSw(JAISoundID) const = 0;
virtual void getBgmSeqResourceID(JAISoundID) const = 0;
};
@@ -33,7 +32,7 @@ struct JAIStreamDataMgr {
virtual ~JAIStreamDataMgr();
};
struct Z2SoundInfo /* : public JAISoundInfo, public JAUSoundInfo, public JAIStreamDataMgr */ {
struct Z2SoundInfo /* : public JAISoundInfo, public JAUSoundInfo, public JAIStreamDataMgr */ : public JASGlobalInstance<Z2SoundInfo> {
/* 802BB00C */ void getBgmSeqResourceID(JAISoundID) const;
/* 802BB158 */ void getAudibleSwFull(JAISoundID);
/* 802BB448 */ void getAudibleSw(JAISoundID) const;
+3 -5
View File
@@ -5,9 +5,9 @@
#include "JSystem/JAudio2/JAISeqMgr.h"
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JAIStreamMgr.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
class Z2SoundMgr {
class Z2SoundMgr : public JASGlobalInstance<Z2SoundMgr> {
public:
/* 802A9E80 */ Z2SoundMgr();
/* 802AA1B0 */ void calc();
@@ -39,10 +39,8 @@ private:
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
extern Z2SoundMgr* data_80450B60;
inline Z2SoundMgr* Z2GetSoundMgr() {
return data_80450B60;
return JASGlobalInstance<Z2SoundMgr>::getInstance();
}
#endif /* Z2SOUNDMGR_H */
+6 -2
View File
@@ -1,11 +1,11 @@
#ifndef Z2SOUNDOBJMGR_H
#define Z2SOUNDOBJMGR_H
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JSupport/JSUList.h"
#include "Z2AudioLib/Z2Creature.h"
#include "dolphin/types.h"
class Z2SoundObjMgr : protected JSUList<Z2CreatureEnemy> {
class Z2SoundObjMgr : protected JSUList<Z2CreatureEnemy>, public JASGlobalInstance<Z2SoundObjMgr> {
public:
Z2SoundObjMgr();
void setForceBattleArea(bool, u16, u16, u16);
@@ -36,4 +36,8 @@ private:
/* 0x1C */ bool mForceBattle;
}; // Size = 0x20
inline Z2SoundObjMgr* Z2GetSoundObjMgr() {
return JASGlobalInstance<Z2SoundObjMgr>::getInstance();
}
#endif /* Z2SOUNDOBJMGR_H */
+1
View File
@@ -17,6 +17,7 @@ public:
void startCollisionSE(u32, u32, Z2SoundObjBase*);
bool isAlive() const { return mIsInitialized; }
void setSoundStarter(Z2SoundStarter* i_soundStarter) { mSoundStarter = i_soundStarter; }
virtual void framework(u32, s8);
virtual void dispose();
+2 -2
View File
@@ -3,9 +3,9 @@
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JAISoundStarter.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
struct Z2SoundStarter : public JAISoundStarter {
struct Z2SoundStarter : public JAISoundStarter, public JASGlobalInstance<Z2SoundStarter> {
Z2SoundStarter(bool);
void setPortData(JAISoundHandle*, u32, u16, s8);
void getPortData(JAISoundHandle*, u32, s8);
+2 -2
View File
@@ -2,10 +2,10 @@
#define Z2SPEECHMGR2_H
#include "JSystem/JAudio2/JAISoundHandles.h"
#include "JSystem/JAudio2/JASGadget.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();
@@ -16,7 +16,7 @@ struct Z2SpeechStarter : public Z2SoundStarter {
f32, u32);
};
struct Z2SpeechMgr2 {
struct Z2SpeechMgr2 : public JASGlobalInstance<Z2SpeechMgr2> {
/* 802CBC60 */ Z2SpeechMgr2();
/* 802CBD88 */ void setString(u16 const*, s16, u8, u16);
/* 802CBF60 */ void setTextCount(s16);
+8 -4
View File
@@ -2,9 +2,9 @@
#define Z2STATUSMGR_H
#include "dolphin/mtx/vec.h"
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
struct Z2StatusMgr {
struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
Z2StatusMgr();
void heartGaugeOn();
void processHeartGaugeSound();
@@ -34,11 +34,15 @@ struct Z2StatusMgr {
/* 0x0C */ bool mIsMenuIn;
/* 0x10 */ u32 mCameraMapInfo;
/* 0x14 */ u32 field_0x14;
/* 0x18 */ float mUnderwaterDepth;
/* 0x1C */ float mCameraInWaterDepthRatio;
/* 0x18 */ f32 mUnderwaterDepth;
/* 0x1C */ f32 mCameraInWaterDepthRatio;
/* 0x20 */ Vec mPolygonPosition;
/* 0x2C */ u8 mDemoStatus;
/* 0x2D */ u8 mHeartGaugeOn;
}; // Size = 0x30
inline Z2StatusMgr* Z2GetStatusMgr() {
return JASGlobalInstance<Z2StatusMgr>::getInstance();
}
#endif /* Z2STATUSMGR_H */
+2 -3
View File
@@ -1,9 +1,9 @@
#ifndef Z2WOLFHOWLMGR_H
#define Z2WOLFHOWLMGR_H
#include "dolphin/types.h"
#include "Z2AudioLib/Z2SoundObject.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "Z2AudioLib/Z2SoundObject.h"
#include "dolphin/types.h"
/*
* Z2WolfHowlData
@@ -37,7 +37,6 @@ public:
void startGuideMelody(bool);
void skipCorrectDemo();
private:
/* 0x00 */ JAISoundHandle field_0x00;
/* 0x04 */ JAISoundHandle field_0x04;
+6 -2
View File
@@ -1742,7 +1742,7 @@ public:
/* 800D72BC */ int setDamagePoint(int i_dmgAmount, int i_checkZoraMag, int i_setDmgTimer, int);
/* 800D7478 */ void setDamagePointNormal(int);
/* 800D74A4 */ void setLandDamagePoint(int);
/* 800D74F4 */ void getDamageVec(dCcD_GObjInf*);
/* 800D74F4 */ Vec* getDamageVec(dCcD_GObjInf*);
/* 800D76C4 */ void setDashDamage();
/* 800D7768 */ static bool checkIcePolygonDamage(cBgS_PolyInfo*);
/* 800D77C8 */ BOOL checkMagicArmorNoDamage();
@@ -3292,6 +3292,10 @@ public:
return getDirectionFromAngle(field_0x2fe2 - current.angle.y);
}
bool checkAnmEnd(daPy_frameCtrl_c* i_frameCtrl) {
return i_frameCtrl->checkAnmEnd();
}
static int getBallModelIdx() { return 0x25; }
static int getBallBtkIdx() { return 0x49; }
static int getBallBrkIdx() { return 0x41; }
@@ -3620,7 +3624,7 @@ private:
/* 0x03006 */ s16 field_0x3006;
/* 0x03008 */ s16 field_0x3008;
/* 0x0300A */ s16 field_0x300a;
/* 0x0300C */ s16 mCommonCounter; // might need more accurate name
/* 0x0300C */ s16 field_0x300c; // might need more accurate name
/* 0x0300E */ s16 field_0x300e;
/* 0x03010 */ s16 field_0x3010;
/* 0x03012 */ s16 field_0x3012;
+4 -5
View File
@@ -195,9 +195,7 @@ public:
/* 0x0590 */ u32 mEndResetFlg2;
/* 0x0594 */ f32 field_0x594;
/* 0x0598 */ f32 field_0x598;
/* 0x059C */ s16 mBodyAngleX;
/* 0x059E */ s16 mBodyAngleY;
/* 0x05A0 */ u8 field_0x5a0[0x4];
/* 0x059C */ csXyz mBodyAngle;
/* 0x05A4 */ cXyz mHeadTopPos;
/* 0x05B0 */ cXyz mItemPos;
/* 0x05BC */ cXyz mSwordTopPos;
@@ -238,6 +236,7 @@ public:
enum daPy_FLG1 {
FLG1_UNK_40000000 = 0x40000000,
FLG1_UNK_20000000 = 0x20000000,
FLG1_UNK_10000000 = 0x10000000,
FLG1_UNK_4000000 = 0x4000000,
FLG1_IS_WOLF = 0x2000000,
@@ -711,8 +710,8 @@ public:
}
}
s16 getBodyAngleX() const { return mBodyAngleX; }
s16 getBodyAngleY() const { return mBodyAngleY; }
s16 getBodyAngleX() const { return mBodyAngle.x; }
s16 getBodyAngleY() const { return mBodyAngle.y; }
// some functions use these function as an inline
// is there a better way to handle this?
+1 -1
View File
@@ -62,7 +62,7 @@ struct stage_stag_info_class {
/* 0x24 */ f32 field_0x24;
/* 0x28 */ u8 mMsgGroup;
/* 0x2A */ u16 mStageTitleNo;
/* 0x2C */ u8 mParticleNo;
/* 0x2C */ u8 mParticleNo[16];
};
struct stage_scls_info_class {
+6
View File
@@ -96,6 +96,12 @@ void OSVReport(char* format, va_list list);
void OSVAttention(char* fmt, va_list args);
void OSReportInit(void);
extern u8 __OSReport_disable;
extern u8 __OSReport_Error_disable;
extern u8 __OSReport_Warning_disable;
extern u8 __OSReport_System_disable;
extern u8 __OSReport_enable;
void OSReportInit__Fv(void); // needed for inline asm
u8* OSGetStackPointer(void);
+1
View File
@@ -19,6 +19,7 @@ void fopKyM_Delete(void* param_1);
static int fopKyM_Create(s16 param_1, fopKyM_CreateFunc param_2, void* param_3);
base_process_class* fopKyM_fastCreate(s16 param_0, int param_1, cXyz* param_2, cXyz* param_3,
fopKyM_CreateFunc);
int fopKyM_createWpillar(cXyz const* i_pos, f32 scale, int i_param);
inline void* fopKyM_GetAppend(void* param_0) {
return fpcM_GetAppend(param_0);
+6 -3
View File
@@ -1,10 +1,13 @@
#ifndef M_DO_M_DO_AUDIO_H
#define M_DO_M_DO_AUDIO_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JAudio2/JASTrack.h"
#include "JSystem/JAudio2/JAUSoundTable.h"
#include "Z2AudioLib/Z2AudioMgr.h"
#include "Z2AudioLib/Z2EnvSeMgr.h"
#include "Z2AudioLib/Z2SoundInfo.h"
#include "Z2AudioLib/Z2WolfHowlMgr.h"
class mDoAud_zelAudio_c {
public:
@@ -80,8 +83,8 @@ inline void mDoAud_setInDarkness(bool state) {
}
inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
Z2AudioMgr::getInterface()->mSeMgr.seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f, -1.0f,
-1.0f, 0);
Z2AudioMgr::getInterface()->mSeMgr.seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f,
-1.0f, -1.0f, 0);
}
inline void i_mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
-6
View File
@@ -66,10 +66,4 @@ struct mDoMain {
static s8 developmentMode;
};
extern bool __OSReport_disable;
extern bool __OSReport_Error_disable;
extern bool __OSReport_Warning_disable;
extern bool __OSReport_System_disable;
extern bool __OSReport_enable;
#endif /* M_DO_M_DO_MAIN_H */