Merge branch 'master' into d_a_do

This commit is contained in:
Pheenoh
2023-01-04 09:22:18 -07:00
488 changed files with 11939 additions and 19368 deletions
@@ -43,11 +43,14 @@ public:
u16 getDrawFullWgtMtxNum() const { return mDrawMtxData.mDrawFullWgtMtxNum; }
u16 getJointNum() const { return mJointNum; }
u16 getDrawMtxNum() const { return mDrawMtxData.mEntryNum; }
u8 getDrawMtxFlag(u16 idx) const { return mDrawMtxData.mDrawMtxFlag[idx]; }
u8 getDrawMtxIndex(u16 idx) const { return mDrawMtxData.mDrawMtxIndex[idx]; }
JUTNameTab* getJointName() const { return mJointName; }
J3DJoint* getRootNode() { return mRootNode; }
J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; }
J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; }
Mtx& getInvJointMtx(s32 idx) const { return mInvJointMtx[idx]; }
u32 getModelDataType() const { return mModelDataType; }
private:
/* 0x04 */ J3DModelHierarchy* mHierarchy;
+2 -1
View File
@@ -65,12 +65,13 @@ public:
void offFlag(u32 flag) { mFlags &= ~flag; }
bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; }
bool isCpuSkinningOn() const { return (mFlags & 4) && (mFlags & 8); }
bool isCpuSkinningOn() const { return (mFlags & J3DMdlFlag_SkinPosCpu) && (mFlags & J3DMdlFlag_SkinNrmCpu); }
Mtx& getBaseTRMtx() { return mBaseTransformMtx; }
void i_setBaseTRMtx(Mtx m) { PSMTXCopy(m, mBaseTransformMtx); }
u32 getMtxCalcMode() const { return mFlags & 0x03; }
J3DVertexBuffer* getVertexBuffer() const { return (J3DVertexBuffer*)&mVertexBuffer; }
J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; }
J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; }
Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); }
Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); }
@@ -38,11 +38,14 @@ public:
J3DTexture* getTexture() const { return mMaterialTable.getTexture(); }
JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); }
u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); }
u32 getModelDataType() const { return mJointTree.getModelDataType(); }
void* getVtxPosArray() const { return mVertexData.getVtxPosArray(); }
void* getVtxNrmArray() const { return mVertexData.getVtxNrmArray(); }
GXColor* getVtxColorArray(u8 idx) const { return mVertexData.getVtxColorArray(idx); }
bool checkFlag(u32 flag) const { return !!(mFlags & flag); }
bool checkBumpFlag() const { return mbHasBumpArray; }
bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; }
u32 getFlag() const { return mFlags; }
u16 checkBumpFlag() const { return mbHasBumpArray; }
void setBumpFlag(u32 flag) { mbHasBumpArray = flag; }
bool checkBBoardFlag() const { return mbHasBillboard == 1; }
bool isLocked() { return mMaterialTable.isLocked(); }
void entryTexMtxAnimator(J3DAnmTextureSRTKey* anm) { mMaterialTable.entryTexMtxAnimator(anm); }
+29 -29
View File
@@ -14,11 +14,11 @@ public:
/* 80326214 */ void initialize();
/* 80326258 */ s32 create(J3DModelData*, u32);
/* 80326364 */ void createAnmMtx(J3DModelData*);
/* 803263F0 */ void createWeightEnvelopeMtx(J3DModelData*);
/* 8032648C */ void setNoUseDrawMtx();
/* 803264B8 */ void createDoubleDrawMtx(J3DModelData*, u32);
/* 80326664 */ void createBumpMtxArray(J3DModelData*, u32);
/* 80326364 */ s32 createAnmMtx(J3DModelData*);
/* 803263F0 */ s32 createWeightEnvelopeMtx(J3DModelData*);
/* 8032648C */ s32 setNoUseDrawMtx();
/* 803264B8 */ s32 createDoubleDrawMtx(J3DModelData*, u32);
/* 80326664 */ s32 createBumpMtxArray(J3DModelData*, u32);
/* 803268D4 */ void calcWeightEnvelopeMtx();
/* 80326ACC */ void calcDrawMtx(u32, Vec const&, f32 const (&)[3][4]);
/* 80326D3C */ void calcNrmMtx();
@@ -26,26 +26,29 @@ public:
MtxP getAnmMtx(int idx) const { return mpAnmMtx[idx]; }
void setScaleFlag(int idx, u8 flag) { mScaleFlagArray[idx] = flag; }
void setScaleFlag(int idx, u8 flag) { mpScaleFlagArr[idx] = flag; }
u32* getCurrentViewNoPtr() { return &mCurrentViewNo; }
u8* getScaleFlagArray() const { return mScaleFlagArray; }
Mtx** getDrawMtxPtrPtr() const { return mpDrawMtxArr; }
Mtx* getDrawMtxPtr() const { return mpDrawMtxArr[mCurrentViewNo]; }
Mtx33** getNrmMtxPtrPtr() const { return mpNrmMtxArr; }
Mtx33* getNrmMtxPtr() const { return mpNrmMtxArr[mCurrentViewNo]; }
Mtx33** getBumpMtxPtrPtr() const { return mpBumpMtxArr; }
Mtx33* getBumpMtxPtr(int idx) const { return mpBumpMtxArr[idx]; }
u8* getScaleFlagArray() const { return mpScaleFlagArr; }
u8 getScaleFlag(u16 idx) const { return mpScaleFlagArr[idx]; }
Mtx** getDrawMtxPtrPtr() const { return mpDrawMtxArr[1]; }
Mtx* getDrawMtxPtr() const { return mpDrawMtxArr[1][mCurrentViewNo]; }
Mtx* getDrawMtx(u16 idx) const { return &mpDrawMtxArr[1][mCurrentViewNo][idx]; }
Mtx33** getNrmMtxPtrPtr() const { return mpNrmMtxArr[1]; }
Mtx33* getNrmMtxPtr() const { return mpNrmMtxArr[1][mCurrentViewNo]; }
Mtx33* getNrmMtx(u16 idx) const { return &mpNrmMtxArr[1][mCurrentViewNo][idx]; }
Mtx33*** getBumpMtxPtrPtr() const { return mpBumpMtxArr[1]; }
Mtx33* getBumpMtxPtr(int idx) const { return mpBumpMtxArr[1][idx][mCurrentViewNo]; }
void swapDrawMtx() {
Mtx* tmp = mpOldDrawMtxArr[mCurrentViewNo];
mpOldDrawMtxArr[mCurrentViewNo] = mpDrawMtxArr[mCurrentViewNo];
mpDrawMtxArr[mCurrentViewNo] = tmp;
Mtx* tmp = mpDrawMtxArr[0][mCurrentViewNo];
mpDrawMtxArr[0][mCurrentViewNo] = mpDrawMtxArr[1][mCurrentViewNo];
mpDrawMtxArr[1][mCurrentViewNo] = tmp;
}
void swapNrmMtx() {
Mtx33* tmp = mpOldNrmMtxArr[mCurrentViewNo];
mpOldNrmMtxArr[mCurrentViewNo] = mpNrmMtxArr[mCurrentViewNo];
mpNrmMtxArr[mCurrentViewNo] = tmp;
Mtx33* tmp = mpNrmMtxArr[0][mCurrentViewNo];
mpNrmMtxArr[0][mCurrentViewNo] = mpNrmMtxArr[1][mCurrentViewNo];
mpNrmMtxArr[1][mCurrentViewNo] = tmp;
}
static Mtx sNoUseDrawMtx;
@@ -55,19 +58,16 @@ public:
private:
/* 0x00 */ J3DJointTree* mJointTree;
/* 0x04 */ u8* mScaleFlagArray;
/* 0x08 */ u8* mEnvScaleFlag;
/* 0x04 */ u8* mpScaleFlagArr;
/* 0x08 */ u8* mpEvlpScaleFlagArr;
/* 0x0C */ Mtx* mpAnmMtx;
/* 0x10 */ Mtx* mpWeightEnvMtx;
/* 0x14 */ Mtx** mpOldDrawMtxArr;
/* 0x18 */ Mtx** mpDrawMtxArr;
/* 0x1C */ Mtx33** mpOldNrmMtxArr;
/* 0x20 */ Mtx33** mpNrmMtxArr;
/* 0x24 */ u32 field_0x24;
/* 0x28 */ Mtx33** mpBumpMtxArr;
/* 0x10 */ Mtx* mpWeightEvlpMtx;
/* 0x14 */ Mtx** mpDrawMtxArr[2];
/* 0x1C */ Mtx33** mpNrmMtxArr[2];
/* 0x28 */ Mtx33*** mpBumpMtxArr[2];
/* 0x2C */ u32 mFlags;
/* 0x30 */ u32 mCurrentViewNo;
/* 0x34 */ Mtx** mUserAnmMtx;
/* 0x34 */ Mtx* mpUserAnmMtx;
public:
/* 803283B4 */ virtual ~J3DMtxBuffer();
+6 -6
View File
@@ -148,7 +148,7 @@ public:
/* 8031730C */ virtual bool countDLSize();
/* 80323544 */ virtual void setTexNo(u32, u16 const*);
/* 8000E0AC */ virtual void setTexNo(u32, u16);
/* 8000DF94 */ virtual void getTexNo(u32) const;
/* 8000DF94 */ virtual u32 getTexNo(u32) const;
/* 80323548 */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 8000E0BC */ virtual void setTevOrder(u32, J3DTevOrder);
/* 8000DFB8 */ virtual bool getTevOrder(u32);
@@ -211,7 +211,7 @@ public:
/* 80317BB4 */ virtual s32 countDLSize();
/* 803229D0 */ virtual void setTexNo(u32, u16 const*);
/* 803229C0 */ virtual void setTexNo(u32, u16);
/* 803229E4 */ virtual void getTexNo(u32) const;
/* 803229E4 */ virtual u32 getTexNo(u32) const;
/* 80322A08 */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 803229F4 */ virtual void setTevOrder(u32, J3DTevOrder);
/* 80322A1C */ virtual void getTevOrder(u32);
@@ -275,7 +275,7 @@ public:
/* 80317BCC */ virtual s32 countDLSize();
/* 8032202C */ virtual void setTexNo(u32, u16 const*);
/* 8032201C */ virtual void setTexNo(u32, u16);
/* 80322040 */ virtual void getTexNo(u32) const;
/* 80322040 */ virtual u32 getTexNo(u32) const;
/* 80322064 */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 80322050 */ virtual void setTevOrder(u32, J3DTevOrder);
/* 80322078 */ virtual void getTevOrder(u32);
@@ -345,7 +345,7 @@ public:
/* 80317BC4 */ virtual s32 countDLSize();
/* 803223F0 */ virtual void setTexNo(u32, u16 const*);
/* 803223E0 */ virtual void setTexNo(u32, u16);
/* 80322404 */ virtual void getTexNo(u32) const;
/* 80322404 */ virtual u32 getTexNo(u32) const;
/* 80322428 */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 80322414 */ virtual void setTevOrder(u32, J3DTevOrder);
/* 8032243C */ virtual void getTevOrder(u32);
@@ -415,7 +415,7 @@ public:
/* 80317BD4 */ virtual s32 countDLSize();
/* 80321C60 */ virtual void setTexNo(u32, u16 const*);
/* 80321C50 */ virtual void setTexNo(u32, u16);
/* 80321C74 */ virtual void getTexNo(u32) const;
/* 80321C74 */ virtual u32 getTexNo(u32) const;
/* 80321C98 */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 80321C84 */ virtual void setTevOrder(u32, J3DTevOrder);
/* 80321CAC */ virtual void getTevOrder(u32);
@@ -485,7 +485,7 @@ public:
/* 80317BBC */ virtual s32 countDLSize();
/* 803227B4 */ virtual void setTexNo(u32, u16 const*);
/* 803227A4 */ virtual void setTexNo(u32, u16);
/* 803227C8 */ virtual void getTexNo(u32) const;
/* 803227C8 */ virtual u32 getTexNo(u32) const;
/* 803227EC */ virtual void setTevOrder(u32, J3DTevOrder const*);
/* 803227D8 */ virtual void setTevOrder(u32, J3DTevOrder);
/* 80322800 */ virtual void getTevOrder(u32);
+2 -1
View File
@@ -60,6 +60,7 @@ public:
}
}
J3DNBTScale* getNBTScale() const { return mTexGenBlock->getNBTScale(); }
u32 getTexNo(u32 idx) const { return mTevBlock->getTexNo(idx); }
void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); }
@@ -71,7 +72,7 @@ public:
/* 0x14 */ u16 mIndex;
/* 0x18 */ u32 mInvalid;
/* 0x1C */ u32 field_0x1c;
/* 0x20 */ u32 field_0x20;
/* 0x20 */ u32 mDiffFlag;
/* 0x24 */ J3DColorBlock* mColorBlock;
/* 0x28 */ J3DTexGenBlock* mTexGenBlock;
/* 0x2C */ J3DTevBlock* mTevBlock;
+4 -3
View File
@@ -15,6 +15,7 @@ class J3DModel;
class J3DMtxBuffer;
class J3DShape;
class J3DTexMtx;
class J3DTexMtxObj;
class J3DTexture;
class J3DDisplayListObj {
@@ -100,13 +101,13 @@ public:
void offFlag(u32 flag) { mFlags &= ~flag; }
void lock() { onFlag(LOCKED); }
void unlock() { offFlag(LOCKED); }
J3DTexMtx* getTexMtxObj() const { return mpTexMtx; }
J3DTexMtxObj* getTexMtxObj() const { return mpTexMtxObj; }
public:
/* 0x10 */ u32 mFlags;
/* 0x14 */ char mPad0[0x0C]; // unk
/* 0x20 */ J3DDisplayListObj* mpDisplayListObj;
/* 0x24 */ J3DTexMtx* mpTexMtx;
/* 0x24 */ J3DTexMtxObj* mpTexMtxObj;
}; // Size: 0x28
class J3DShapePacket : public J3DDrawPacket {
@@ -149,7 +150,7 @@ public:
J3DShapePacket* getShapePacket() const { return mpShapePacket; }
void setShapePacket(J3DShapePacket* packet) { mpShapePacket = packet; }
void setInitShapePacket(J3DShapePacket* packet) { mpInitShapePacket = packet; }
bool isChanged() const { return mDiffFlag < 0; }
bool isChanged() const { return mDiffFlag & 0x80000000; }
virtual ~J3DMatPacket();
virtual int entry(J3DDrawBuffer*);
+1
View File
@@ -101,6 +101,7 @@ public:
u32 getBumpMtxOffset() const { return mBumpMtxOffset; }
inline J3DMaterial* getMaterial() const { return mMaterial; }
inline u32 getIndex() const { return mIndex; }
inline u32 getPipeline() const { return (mFlags >> 2) & 0x07; }
inline u32 getTexMtxLoadType() const { return mFlags & 0xF000; }
inline u32 getMtxGroupNum() const { return mMtxGroupNum; }
+9 -1
View File
@@ -7,6 +7,14 @@
class J3DTexMtx;
class J3DTexGenBlock;
class J3DTexMtxObj {
public:
Mtx& getMtx(u16 idx) { return mpTexMtx[idx]; }
private:
/* 0x00 */ Mtx *mpTexMtx;
};
class J3DDifferedTexMtx {
public:
/* 8031322C */ static void loadExecute(f32 const (*)[4]);
@@ -17,7 +25,7 @@ public:
}
static J3DTexGenBlock* sTexGenBlock;
static J3DTexMtx* sTexMtxObj;
static J3DTexMtxObj* sTexMtxObj;
};
extern u8 struct_804515B0[4];
@@ -54,6 +54,7 @@ public:
/* 803243BC */ void loadPostTexMtx(u32) const;
J3DTexMtxInfo& getTexMtxInfo() { return mTexMtxInfo; }
Mtx& getMtx() { return mMtx; }
private:
/* 0x00 */ J3DTexMtxInfo mTexMtxInfo;
+55 -59
View File
@@ -10,17 +10,23 @@
class JAISoundID {
public:
operator u32() const { return this->mId; }
void operator=(JAISoundID const& other) {mId = other.mId;};
operator u32() const { return this->mId.mFullId; }
void operator=(JAISoundID const& other) { mId.mFullId = other.mId.mFullId; };
JAISoundID(u32 pId) { mId = pId; };
JAISoundID(u32 pId) { mId.mFullId = pId; };
JAISoundID(JAISoundID const& other) {mId = other.mId;};
JAISoundID(JAISoundID const& other) { mId = other.mId; };
JAISoundID() {}
private:
u32 mId;
union {
u32 mFullId;
struct {
u16 mSoundType;
u16 mShortId;
} mAdvancedId; // Debug doesn't have an inline for referencing the short ID so I assume
// it's similar to this
} mId;
};
struct JASTrack {
@@ -30,11 +36,9 @@ struct JASTrack {
/* 80292918 */ void writePort(u32, u16);
/* 8029297C */ void readPort(u32);
inline int getChannelMgrCount() {
return channelMgrCount;
}
inline int getChannelMgrCount() { return channelMgrCount; }
/* 0x0 */u8 field_0x0[0x1d0];
/* 0x0 */ u8 field_0x0[0x1d0];
/* 0x1d0 */ int channelMgrCount;
};
@@ -49,54 +53,50 @@ struct JAISoundStatus_ {
user_data = 0;
}
bool isAlive(); //used in assert
bool isAlive(); // used in assert
inline bool isPlaying() {
return state.unk==5;
}
inline bool isPlaying() { return state.unk == 5; }
inline bool isPaused() {
return field_0x0.flags.paused;
}
inline bool isPaused() { return field_0x0.flags.paused; }
/* 0x0 */ union {
u8 value;
struct{
u8 flag1:1;
u8 paused:1;
u8 flag3:1;
u8 flag4:1;
u8 flag5:1;
u8 flag6:1;
u8 flag7:1;
u8 flag8:1;
}flags;
}field_0x0;
struct {
u8 flag1 : 1;
u8 paused : 1;
u8 flag3 : 1;
u8 flag4 : 1;
u8 flag5 : 1;
u8 flag6 : 1;
u8 flag7 : 1;
u8 flag8 : 1;
} flags;
} field_0x0;
/* 0x1 */ union {
u8 value;
struct{
u8 flag1:1;
u8 flag2:1;
u8 flag3:1;
u8 flag4:1;
u8 flag5:1;
u8 flag6:1;
u8 flag7:1;
u8 flag8:1;
}flags;
}field_0x1;
struct {
u8 flag1 : 1;
u8 flag2 : 1;
u8 flag3 : 1;
u8 flag4 : 1;
u8 flag5 : 1;
u8 flag6 : 1;
u8 flag7 : 1;
u8 flag8 : 1;
} flags;
} field_0x1;
/* 0x2 */ struct {
u8 unk;
struct {
u8 flag1:1;
u8 flag2:1;
u8 flag3:1;
u8 flag4:1;
u8 flag5:1;
u8 flag6:1;
u8 flag7:1;
u8 flag8:1;
}flags;
u8 flag1 : 1;
u8 flag2 : 1;
u8 flag3 : 1;
u8 flag4 : 1;
u8 flag5 : 1;
u8 flag6 : 1;
u8 flag7 : 1;
u8 flag8 : 1;
} flags;
} state;
/* 0x4 */ u32 user_data;
}; // Size: 0x6
@@ -111,21 +111,19 @@ struct JAISoundFader {
mTransition.zero();
}
void fadeOut(u32 fadeCount) {
if (fadeCount!=0) {
mTransition.set(0.0f,mIntensity,fadeCount);
}else{
if (fadeCount != 0) {
mTransition.set(0.0f, mIntensity, fadeCount);
} else {
forceOut();
}
}
bool isOut() {
if(mTransition.mCount != 0 || mIntensity < 0.01f) {
if (mTransition.mCount != 0 || mIntensity < 0.01f) {
return true;
}
return false;
}
inline void calc() {
mIntensity = mTransition.apply(mIntensity);
}
inline void calc() { mIntensity = mTransition.apply(mIntensity); }
/* 0x00 */ f32 mIntensity;
/* 0x04 */ JAISoundParamsTransition::TTransition mTransition;
@@ -181,16 +179,14 @@ public:
u32 getUserData() const { return status_.user_data; }
bool isHandleAttached() const { return handle_ != NULL; }
void removeLifeTime_() {
status_.field_0x1.flags.flag1 = false;
}
void removeLifeTime_() { status_.field_0x1.flags.flag1 = false; }
void stop_JAISound_() {
status_.state.flags.flag5 = 0;
status_.state.flags.flag1 = 1;
}
bool isStopping() {
bool isStopping = false;
if(status_.state.flags.flag1) {
if (status_.state.flags.flag1) {
isStopping = status_.state.flags.flag5 ? fader.isOut() : true;
}
return isStopping;
+1 -1
View File
@@ -10,7 +10,7 @@ public:
/* 8028F9EC */ void allocCallStack(void (*)(void*), void*);
/* 8028F850 */ void allocCallStack(void (*)(void*), void const*, u32);
/* 8028FC54 */ void sendCmdMsg(void (*)(void*), void*);
/* 8028FB5C */ void sendCmdMsg(void (*)(void*), void const*, u32);
/* 8028FB5C */ int sendCmdMsg(void (*)(void*), void const*, u32);
/* 8028FE88 */ void pause(bool);
/* 8028F724 */ virtual ~JASTaskThread();
+104
View File
@@ -1,6 +1,110 @@
#ifndef JASWAVEARCLOADER_H
#define JASWAVEARCLOADER_H
#include "dol2asm.h"
#include "dolphin/types.h"
#include "global.h"
#include "MSL_C/MSL_Common/Src/string.h"
#include "dolphin/os/OSMutex.h"
#include "JSystem/JAudio2/JASDvdThread.h"
#include "JSystem/JAudio2/JASHeapCtrl.h"
#include "JSystem/JKernel/JKRDvdAramRipper.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
struct JASDisposer {
JASDisposer() {}
/* 8029A7B8 */ virtual ~JASDisposer() {}
/* 80290BCC */ virtual void onDispose();
};
struct JASHeap : JSUTree<JASHeap> {
/* 80290140 */ JASHeap(JASDisposer*);
/* 802901AC */ void initRootHeap(void*, u32);
/* 8029021C */ bool alloc(JASHeap*, u32);
/* 802903F4 */ bool allocTail(JASHeap*, u32);
/* 802904E4 */ void free();
/* 80290608 */ void insertChild(JASHeap*, JASHeap*, void*, u32, bool);
/* 802906F0 */ void getTailHeap();
/* 8029077C */ void getTailOffset();
/* 802907E0 */ void getCurOffset();
/* 80290B54 */ ~JASHeap() {}
void* getBase() { return mBase; }
/* 0x1C */ OSMutex mMutex;
/* 0x38 */ JASDisposer* mDisposer;
/* 0x3C */ void* mBase;
/* 0x40 */ u32 _3c;
/* 0x44 */ u32 _40;
};
struct JASKernel {
/* 802909B8 */ void setupRootHeap(JKRSolidHeap*, u32);
/* 80290AC0 */ static JKRHeap* getSystemHeap();
/* 80290AC8 */ u32 getCommandHeap();
/* 80290AD0 */ void setupAramHeap(u32, u32);
/* 80290B08 */ static JASHeap* getAramHeap();
static u8 audioAramHeap[68];
static u8 sAramBase[4];
static JKRHeap* sSystemHeap;
static u8 sCommandHeap[4];
};
#define DIR_MAX 64
struct JASWaveArcLoader {
/* 8029A0A0 */ static JASHeap* getRootHeap();
/* 8029A0D0 */ static void setCurrentDir(char const*);
/* 8029A130 */ static char* getCurrentDir();
static char sCurrentDir[DIR_MAX];
static JASHeap* sAramHeap;
};
struct JASWaveArc : JASDisposer {
/* 8029A13C */ JASWaveArc();
/* 8029A258 */ bool loadSetup(u32);
/* 8029A2EC */ bool eraseSetup();
/* 8029A378 */ static void loadToAramCallback(void*);
/* 8029A404 */ bool sendLoadCmd();
/* 8029A4C0 */ bool load(JASHeap*);
/* 8029A580 */ bool loadTail(JASHeap*);
/* 8029A640 */ void erase();
/* 8029A6AC */ void setEntryNum(s32);
/* 8029A70C */ void setFileName(char const*);
/* 8029A1B4 */ virtual ~JASWaveArc();
/* 8029A664 */ virtual void onDispose();
/* 80298FA0 */ virtual void onLoadDone();
/* 80298FA4 */ virtual void onEraseDone();
struct loadToAramCallbackParams {
// not official struct name
/* 0x0 */ JASWaveArc* mWavArc;
/* 0x4 */ long mEntryNum;
/* 0x8 */ u32 mBase;
/* 0xC */ u32 _c;
};
/* 0x04 */ JASHeap mHeap;
/* 0x48 */ u32 _48;
/* 0x4C */ volatile s32 _4c;
/* 0x50 */ int mEntryNum;
/* 0x54 */ u32 mFileLength;
/* 0x58 */ u16 _58;
/* 0x5A */ u16 _5a;
/* 0x5C */ OSMutex mMutex;
};
struct JASMutexLock {
JASMutexLock(OSMutex* mutex) {
mMutex = mutex;
OSLockMutex(mMutex);
}
~JASMutexLock() { OSUnlockMutex(mMutex); }
/* 0x0 */ OSMutex* mMutex;
};
#endif /* JASWAVEARCLOADER_H */
+24
View File
@@ -1,6 +1,30 @@
#ifndef JAUBANKTABLE_H
#define JAUBANKTABLE_H
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/types.h"
template <typename T>
struct JASPtrTable {
T* get(u32 value) const {
if (value >= mLength) {
return NULL;
}
return mTable[value];
}
T** mTable;
u32 mLength;
};
struct JASBank;
struct JAUBankTable {
/* 802A4AA0 */ /*virtual*/ JASBank* getBank(u32) const;
/* 0x0 */ void* vtable;
/* 0x4 */ JASPtrTable<JASBank> mBankPtrTable;
};
struct JAUBankTableDictionary : JSUList<JAUBankTable> {
/* 802A4A80 */ void appendBankTable(JSULink<JAUBankTable>*);
};
#endif /* JAUBANKTABLE_H */
@@ -1,6 +1,33 @@
#ifndef JAUSTREAMFILETABLE_H
#define JAUSTREAMFILETABLE_H
#include "JSystem/JAudio2/JAISound.h"
#include "dolphin/types.h"
struct BinaryStreamFileTable {
/* 0x0 */ char mIdentifier[4];
/* 0x4 */ int mNumFiles;
/* 0x8 */ int mFilePathOffsets[];
};
struct JAUStreamFileTable {
/* 802A7420 */ JAUStreamFileTable();
/* 802A742C */ void init(void const*);
/* 802A7478 */ int getNumFiles() const;
/* 802A7484 */ const char* getFilePath(int) const;
/* 0x0 */ const BinaryStreamFileTable* mData;
};
struct JAIStreamDataMgr {
/* 802A3AD8 */ ~JAIStreamDataMgr();
};
struct JAUStreamDataMgr_StreamFileTable : JAIStreamDataMgr {
/* 802A74AC */ virtual int getStreamFileEntry(JAISoundID);
/* 802A74E8 */ virtual ~JAUStreamDataMgr_StreamFileTable() {}
/* 0x4 */ JAUStreamFileTable mStreamFileTable;
};
#endif /* JAUSTREAMFILETABLE_H */
+13 -1
View File
@@ -1,6 +1,18 @@
#ifndef MSL_COMMON_SRC_FILE_POS_H
#define MSL_COMMON_SRC_FILE_POS_H
#include "dolphin/types.h"
#include "MSL_C/MSL_Common/Src/ansi_files.h"
#ifdef __cplusplus
extern "C" {
#endif
int fseek(FILE* file, long offset, int mode);
int _fseek(FILE* file, fpos_t offset, int mode);
long ftell(FILE* file);
#ifdef __cplusplus
}
#endif
#endif /* MSL_COMMON_SRC_FILE_POS_H */
+12 -1
View File
@@ -1,6 +1,17 @@
#ifndef MSL_COMMON_SRC_ABORT_EXIT_H
#define MSL_COMMON_SRC_ABORT_EXIT_H
#include "dolphin/types.h"
#ifdef __cplusplus
extern "C" {
#endif
void exit(int status);
void abort(void);
extern void (*__stdio_exit)(void);
#ifdef __cplusplus
};
#endif
#endif /* MSL_COMMON_SRC_ABORT_EXIT_H */
+12 -1
View File
@@ -1,6 +1,17 @@
#ifndef MSL_COMMON_SRC_ALLOC_H
#define MSL_COMMON_SRC_ALLOC_H
#include "dolphin/types.h"
#include "MSL_C/MSL_Common/Src/ansi_files.h"
#ifdef __cplusplus
extern "C" {
#endif
void free(FILE* file);
void __pool_free();
#ifdef __cplusplus
}
#endif
#endif /* MSL_COMMON_SRC_ALLOC_H */
+81 -19
View File
@@ -1,11 +1,33 @@
#ifndef MSL_COMMON_SRC_ANSI_FILES_H
#define MSL_COMMON_SRC_ANSI_FILES_H
#include "MSL_C/MSL_Common/Src/stddef.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
typedef unsigned long __file_handle;
typedef unsigned long fpos_t;
#ifndef __cplusplus
typedef unsigned short wchar_t;
#endif
#define set_error(file) \
do { \
(file)->file_state.error = 1; \
(file)->buffer_length = 0; \
} while (0)
enum __file_kinds {
/* 0x0 */ CLOSED_FILE,
/* 0x1 */ DISK_FILE,
/* 0x2 */ CONSOLE_FILE,
/* 0x3 */ UNAVAILABLE_FILE,
__closed_file,
__disk_file,
__console_file,
__unavailable_file,
};
enum __file_orientation {
@@ -23,6 +45,26 @@ typedef struct _file_modes {
unsigned int binary_io : 1;
} file_modes;
enum __io_modes {
__read = 1,
__write = 2,
__read_write = 3,
__append = 4,
};
enum __io_states {
__neutral,
__writing,
__reading,
__rereading,
};
enum __io_results {
__no_io_error,
__io_error,
__io_EOF,
};
typedef struct _file_states {
unsigned int io_state : 3;
unsigned int free_buffer : 1;
@@ -30,28 +72,34 @@ typedef struct _file_states {
unsigned char error;
} file_states;
typedef void (*__idle_proc)(void);
typedef int (*__pos_proc)(__file_handle file, fpos_t* position, int mode, __idle_proc idle_proc);
typedef int (*__io_proc)(__file_handle file, unsigned char* buff, size_t* count,
__idle_proc idle_proc);
typedef int (*__close_proc)(__file_handle file);
typedef struct _FILE {
/* 0x00 */ unsigned int handle;
/* 0x00 */ __file_handle handle;
/* 0x04 */ file_modes file_mode;
/* 0x08 */ file_states file_state;
/* 0x0C */ unsigned char flag;
/* 0x0C */ unsigned char is_dynamically_allocated;
/* 0x0D */ char char_buffer;
/* 0x0E */ char char_buffer_2;
/* 0x0E */ char char_buffer_overflow;
/* 0x0F */ char ungetc_buffer[2];
/* 0x12 */ unsigned short ungetc_wide_buffer[2];
/* 0x18 */ unsigned int position;
/* 0x12 */ wchar_t ungetc_wide_buffer[2];
/* 0x18 */ unsigned long position;
/* 0x1C */ unsigned char* buffer;
/* 0x20 */ unsigned int buffer_size;
/* 0x20 */ unsigned long buffer_size;
/* 0x24 */ unsigned char* buffer_ptr;
/* 0x28 */ unsigned int buffer_length;
/* 0x2C */ unsigned int buffer_alignment;
/* 0x30 */ unsigned int buffer_length2;
/* 0x34 */ unsigned int buffer_position;
/* 0x38 */ void* position_fn;
/* 0x3C */ void* read_fn;
/* 0x40 */ void* write_fn;
/* 0x44 */ void* close_fn;
/* 0x48 */ void* unknown;
/* 0x28 */ unsigned long buffer_length;
/* 0x2C */ unsigned long buffer_alignment;
/* 0x30 */ unsigned long save_buffer_length;
/* 0x34 */ unsigned long buffer_position;
/* 0x38 */ __pos_proc position_fn;
/* 0x3C */ __io_proc read_fn;
/* 0x40 */ __io_proc write_fn;
/* 0x44 */ __close_proc close_fn;
/* 0x48 */ __idle_proc idle_fn;
/* 0x4C */ struct _FILE* next_file;
} FILE;
@@ -62,6 +110,20 @@ typedef struct _files {
FILE empty;
} files;
#define _IONBF 0
#define _IOLBF 1
#define _IOFBF 2
extern files __files;
extern int __close_console(__file_handle file);
extern int __write_console(__file_handle file, unsigned char* buf, size_t* count, __idle_proc idle_fn);
extern int __read_console(__file_handle file, unsigned char* buf, size_t* count, __idle_proc idle_fn);
unsigned int __flush_all(void);
void __close_all(void);
#ifdef __cplusplus
};
#endif
#endif /* MSL_COMMON_SRC_ANSI_FILES_H */
+14 -1
View File
@@ -1,6 +1,19 @@
#ifndef MSL_COMMON_SRC_ARITH_H
#define MSL_COMMON_SRC_ARITH_H
#include "dolphin/types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
int quot; /* quotient */
int rem; /* remainder */
} div_t;
div_t div(int numerator, int denominator);
#ifdef __cplusplus
}
#endif
#endif /* MSL_COMMON_SRC_ARITH_H */

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