Z2AudioLib: Migrate declarations out of functions.h to respective files (#96)

Removes the strong dependency on a single header file and moves
declarations to their respective header file.

This allows for making dependencies explicit in cpp files and other
headers, and also makes it much easier to track where everything related
to a particular component is.

This change also creates a few header files that previously didn't
exist, making it much nicer for people implementing things, as they
won't need to create the header file, it'll just be there ready to go.

Ideally functions.h wouldn't even be a thing, as this header adds a lot
of preprocessing overhead due to its size, and will continue to grow
significantly larger over the lifespan of the project, which can also
impact the performance of editors that do dependency lookups and
context-aware syntax highlighting.
This commit is contained in:
LC
2021-01-25 12:57:46 -05:00
committed by GitHub
parent 9165dfe8cf
commit ec9b03241d
90 changed files with 1074 additions and 714 deletions
+8
View File
@@ -0,0 +1,8 @@
#ifndef JAIAUDIBLE_H_
#define JAIAUDIBLE_H_
extern "C" {
void JAIAudible_NS_dtor(void);
}
#endif // JAIAUDIBLE_H_
@@ -3,4 +3,8 @@
struct JAIAudience {};
extern "C" {
void JAIAudience_NS_dtor(void);
}
#endif // JAIAUDIENCE_H_
@@ -0,0 +1,9 @@
#ifndef JAISECATEGORYMGR_H_
#define JAISECATEGORYMGR_H_
extern "C" {
void JAISeCategoryMgr_NS_pause(void);
void JAISeCategoryMgr_NS_stop(void);
}
#endif // JAISECATEGORYMGR_H_
+17 -3
View File
@@ -1,9 +1,23 @@
#ifndef _JAI_SE_MGR_H
#define _JAI_SE_MGR_H
#ifndef JAI_SE_MGR_H_
#define JAI_SE_MGR_H_
class JAISeCategoryMgr {
public:
~JAISeCategoryMgr();
};
#endif
extern "C" {
void JAISeMgr_NS_dtor(void);
void JAISeMgr_NS_calc(void);
void JAISeMgr_NS_getNumActiveSe(void);
void JAISeMgr_NS_initParams(void);
void JAISeMgr_NS_mixOut(void);
void JAISeMgr_NS_setAudience(void);
void JAISeMgr_NS_setCategoryArrangement(void);
void JAISeMgr_NS_setSeqDataMgr(void);
void JAISeMgr_NS_startSound(void);
void JAISeMgr_NS_stop(void);
void JAISeMgr_NS_stopSoundID(void);
}
#endif // JAI_SE_MGR_H_
+14
View File
@@ -0,0 +1,14 @@
#ifndef JAISEQMGR_H_
#define JAISEQMGR_H_
// Additional symbols needed for JAISeqMgr
extern "C" {
void JAISeqMgr_NS_calc(void);
void JAISeqMgr_NS_mixOut(void);
void JAISeqMgr_NS_startSound(void);
void JAISeqMgr_NS_stopSoundID(void);
void JAISeqMgr_NS_stop(void);
void JAISeqMgr_NS_stop_X1_(void);
}
#endif // JAISEQMGR_H_
+18 -5
View File
@@ -120,11 +120,6 @@ public:
u8 field_0x93;
};
extern "C" {
void stop__8JAISoundFUl(JAISound*, u32 fadeout);
void stop__8JAISoundFv(JAISound*);
}
class JAISoundHandle {
public:
JAISoundHandle(); // noninline in JAUClusterSound.cpp
@@ -145,4 +140,22 @@ private:
JAISound* mSound;
};
extern "C" {
void __ct__14JAISoundHandleFv(void);
void releaseSound__14JAISoundHandleFv(void);
void JAISoundHandle_NS_dtor(void);
void stop__8JAISoundFUl(JAISound*, u32 fadeout);
void stop__8JAISoundFv(JAISound*);
void JAISoundID_NS___as(void);
void JAISoundID_X1_(void);
void JAISound_NS_acceptsNewAudible(void);
void JAISound_NS_getID(void);
void JAISound_NS_newAudible(void);
void JAISound_NS_releaseHandle(void);
}
#endif
@@ -8,4 +8,9 @@ public:
JAISoundHandle mHandles[24];
};
extern "C" {
void JAISoundHandles_NS_getFreeHandle(void);
void JAISoundHandles_NS_getHandleSoundID(void);
}
#endif // JAISOUNDHANDLES_H_
+9
View File
@@ -0,0 +1,9 @@
#ifndef JAISOUNDINFO_H_
#define JAISOUNDINFO_H_
extern "C" {
void JAISoundInfo(void);
void JAISoundInfo_NS_dtor(void);
}
#endif // JAISOUNDINFO_H_
@@ -0,0 +1,13 @@
#ifndef JAISOUNDPARAMSMOVE_H_
#define JAISOUNDPARAMSMOVE_H_
extern "C" {
void JAISoundParamsMove_NS_moveDolby(void);
void JAISoundParamsMove_NS_moveFxMix(void);
void JAISoundParamsMove_NS_movePan(void);
void JAISoundParamsMove_NS_movePitch(void);
void moveVolume__18JAISoundParamsMoveFfUl(void);
}
#endif // JAISOUNDPARAMSMOVE_H_
+10
View File
@@ -0,0 +1,10 @@
#ifndef JAISOUNDSTARTER_H_
#define JAISOUNDSTARTER_H_
extern "C" {
void JAISoundStarter_NS_ctor(void);
void JAISoundStarter_NS_dtor(void);
void JAISoundStarter_NS_startLevelSound(void);
}
#endif // JAISOUNDSTARTER_H_
+10
View File
@@ -0,0 +1,10 @@
#ifndef JAISOUNDSTATUS_H_
#define JAISOUNDSTATUS_H_
// Additional symbols needed for JAISoundStatus
extern "C" {
void JAISoundStatus__NS_lockWhenPrepared(void);
void JAISoundStatus__NS_unlockIfLocked(void);
}
#endif // JAISOUNDSTATUS_H_
@@ -0,0 +1,8 @@
#ifndef JAISTREAMARAMMGR_H_
#define JAISTREAMARAMMGR_H_
extern "C" {
void JAIStreamAramMgr_NS_dtor(void);
}
#endif // JAISTREAMARAMMGR_H_
@@ -0,0 +1,8 @@
#ifndef JAISTREAMDATAMGR_H_
#define JAISTREAMDATAMGR_H_
extern "C" {
void JAIStreamDataMgr_NS_dtor(void);
}
#endif // JAISTREAMDATAMGR_H_
+15
View File
@@ -0,0 +1,15 @@
#ifndef JAISTREAMMGR_H_
#define JAISTREAMMGR_H_
// Additional symbols needed for JAIStreamMgr
extern "C" {
void JAIStreamMgr_NS_calc(void);
void JAIStreamMgr_NS_isActive(void);
void JAIStreamMgr_NS_mixOut(void);
void JAIStreamMgr_NS_startSound(void);
void JAIStreamMgr_NS_stop(void);
void JAIStreamMgr_NS_stop_X1_(void);
void JAIStreamMgr_NS_stopSoundID(void);
}
#endif // JAISTREAMMGR_H_
+11
View File
@@ -0,0 +1,11 @@
#ifndef JASAUDIORESETER_H_
#define JASAUDIORESETER_H_
extern "C" {
void JASAudioReseter(void);
void JASAudioReseter_NS_checkDone(void);
void JASAudioReseter_NS_resume(void);
void JASAudioReseter_NS_start(void);
}
#endif // JASAUDIORESETER_H_
+12
View File
@@ -0,0 +1,12 @@
#ifndef JASDRIVER_H_
#define JASDRIVER_H_
extern "C" {
void setOutputMode__9JASDriverFUl(void);
void JASDriver_NS_getSubFrames(void);
void JASDriver_NS_setOutputMode(void);
void JASDriver_NS_waitSubFrame(void);
}
#endif // JASDRIVER_H_
+8
View File
@@ -0,0 +1,8 @@
#ifndef JASDSP_H_
#define JASDSP_H_
extern "C" {
void JASDsp_NS_setFXLine(void);
}
#endif // JASDSP_H_
@@ -0,0 +1,12 @@
#ifndef JASGENERICMEMPOOL_H_
#define JASGENERICMEMPOOL_H_
extern "C" {
void JASGenericMemPool(void);
void JASGenericMemPool_NS_alloc(void);
void JASGenericMemPool_NS_dtor(void);
void JASGenericMemPool_NS_free(void);
void JASGenericMemPool_NS_newMemPool(void);
}
#endif // JASGENERICMEMPOOL_H_
+11
View File
@@ -0,0 +1,11 @@
#ifndef JASHEAP_H_
#define JASHEAP_H_
extern "C" {
void JASHeap_NS_alloc(void);
void JASHeap_NS___defctor(void);
void JASHeap_NS_dtor(void);
void JASHeap_NS_free(void);
}
#endif // JASHEAP_H_
+8
View File
@@ -0,0 +1,8 @@
#ifndef JASKERNEL_H_
#define JASKERNEL_H_
extern "C" {
void JASKernel_NS_getAramHeap(void);
}
#endif // JASKERNEL_H_

Some files were not shown because too many files have changed in this diff Show More