Jsystem work (#399)

* Almost match JASBasicInst

* JASDrumSet OK

* Some JAudio2 struct adjustment

* Match JKRHeap::callAllDisposer

* JAISe OK

* Fix setAutoDelete

* JAISound OK

* Match a few functions in linklist

* Few matches in d_a_e_ym

* JUTTexture OK

* Work on JUTGamePad

* Import JUTResource

* Work on JUTResFont::getFontCode
This commit is contained in:
hatal175
2023-08-06 06:12:26 +03:00
committed by GitHub
parent 8b34c0210f
commit dc985026fa
79 changed files with 519 additions and 2705 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ public:
/* 0x27c */ JAITempoMgr mTempoMgr;
};
/* 8029F6D8 */ virtual bool getNumChild() const;
/* 8029F6E0 */ virtual bool getChild(int);
/* 8029F6D8 */ virtual s32 getNumChild() const;
/* 8029F6E0 */ virtual JAISoundChild* getChild(int);
/* 8029F6E8 */ virtual void releaseChild(int);
/* 8029F84C */ virtual JASTrack* getTrack();
/* 8029F854 */ virtual JASTrack* getChildTrack(int);
+56
View File
@@ -2,5 +2,61 @@
#define JASBASICINST_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASOscillator.h"
#include "JSystem/JAudio2/JASSoundParams.h"
struct JKRHeap;
struct JASInstParam : public JASSoundParams {
JASInstParam() {
field_0x14 = NULL;
field_0x18 = 0;
field_0x1a = 0;
field_0x1c = 0;
field_0x1d = 0;
field_0x1e = 0;
}
JASOscillator::Data** field_0x14;
u16 field_0x18;
u16 field_0x1a;
u8 field_0x1c;
u8 field_0x1d;
u8 field_0x1e;
};
struct JASInst {
virtual ~JASInst() {}
virtual bool getParam(int, int, JASInstParam*) const = 0;
virtual u32 getType() const = 0;
};
struct JASBasicInst : public JASInst {
struct TKeymap {
/* 80298250 */ ~TKeymap();
/* 802982D4 */ TKeymap();
s32 field_0x0;
u16 field_0x4;
u16 field_0x6;
f32 field_0x8;
f32 field_0xc;
};
/* 80298014 */ JASBasicInst();
/* 8029819C */ void setKeyRegionCount(u32, JKRHeap*);
/* 8029821C */ void setOsc(int, JASOscillator::Data const*);
/* 8029822C */ TKeymap* getKeyRegion(int);
/* 8029807C */ virtual ~JASBasicInst();
/* 802980F8 */ virtual bool getParam(int, int, JASInstParam*) const;
/* 802982E0 */ virtual u32 getType() const { return 'BSIC'; };
f32 mVolume;
f32 mPitch;
JASOscillator::Data const* field_0xc[2];
u32 mKeymapCount;
TKeymap* mKeymap;
};
#endif /* JASBASICINST_H */
+28
View File
@@ -2,5 +2,33 @@
#define JASDRUMSET_H
#include "dolphin/types.h"
#include "JSystem/JAudio2/JASBasicInst.h"
struct JKRHeap;
struct JASDrumSet : public JASInst {
struct TPerc {
/* 802984C4 */ TPerc();
/* 802984E4 */ void setRelease(u32);
f32 mVolume;
f32 mPitch;
f32 mPan;
u16 field_0xc;
u16 field_0xe;
f32 field_0x10;
f32 field_0x14;
};
/* 802982EC */ JASDrumSet();
/* 80298314 */ virtual ~JASDrumSet();
/* 80298370 */ void newPercArray(u8, JKRHeap*);
/* 802983CC */ virtual bool getParam(int, int, JASInstParam*) const;
/* 802984B4 */ void setPerc(int, JASDrumSet::TPerc*);
/* 802984EC */ virtual u32 getType() const;
TPerc** field_0x4;
u8 field_0x8;
};
#endif /* JASDRUMSET_H */
+2
View File
@@ -5,6 +5,8 @@
struct JASOscillator {
struct Point {};
struct Data {
/* 0x00 */ u32 _00;
/* 0x04 */ f32 _04;
+13 -9
View File
@@ -2,6 +2,7 @@
#define JASTRACK_H
#include "JSystem/JAudio2/JASGadget.h"
#include "JSystem/JAudio2/JASOscillator.h"
struct JASSoundParams;
@@ -15,12 +16,6 @@ struct JASDsp {
static u32 FILTER_MODE_IIR;
};
struct JASOscillator {
struct Point {};
struct Data {};
};
struct JASChannel {
/* 8029AAD0 */ void release(u16);
/* 8029AB64 */ void setOscInit(u32, JASOscillator::Data const*);
@@ -126,8 +121,8 @@ struct JASTrack {
int getChannelMgrCount() { return channelMgrCount; }
u8 getStatus() const { return mStatus; }
JASTrack* getChild(u32 index) { return field_0x130[index]; }
void setAutoDelete(bool param_0) {
field_0x216 = (param_0 << 4) | field_0x216 & ~0x10;
inline void setAutoDelete(u8 param_0) {
field_0x216.autoDelete = param_0;
}
/* 0x000 */ u8 field_0x0[0x5c]; // JASSeqCtrl
@@ -154,7 +149,16 @@ struct JASTrack {
/* 0x204 */ short field_0x204[8];
/* 0x214 */ char field_0x214;
/* 0x215 */ u8 mStatus;
/* 0x216 */ u8 field_0x216;
/* 0x216 */ struct {
u8 flag0 : 1;
u8 flag1 : 1;
u8 flag2 : 1;
u8 autoDelete : 1;
u8 flag4 : 1;
u8 flag5 : 1;
u8 flag6 : 1;
u8 flag7 : 1;
} field_0x216;
/* 0x218 */ f32 field_0x218;
/* 0x21C */ f32 field_0x21c;
/* 0x220 */ u32 field_0x220;