Z2Audio player debug work / fix actor method returns (#3140)

* Z2Audio player debug work

* fix actor method returns

* wii build fix
This commit is contained in:
TakaRikka
2026-03-30 02:10:42 -07:00
committed by GitHub
parent cb6ee4b21e
commit 5685fa58c6
30 changed files with 1508 additions and 746 deletions
@@ -24,6 +24,15 @@ public:
void setGXforPrint();
void setGXforDraw();
void color(const JUtility::TColor& color0, const JUtility::TColor& color1) {
color(color0, color1, color0, color1);
}
void lineWidth(u8 width) {
field_0x16 = width;
GXSetLineWidth(field_0x16, GX_TO_ZERO);
}
/* 0x00 */ J2DPrint* field_0x0;
/* 0x04 */ JUtility::TColor field_0x4;
/* 0x08 */ JUtility::TColor field_0x8;
@@ -16,8 +16,8 @@ public:
y = i_y;
}
/* 0x00*/ int x;
/* 0x04*/ int y;
/* 0x00 */ int x;
/* 0x04 */ int y;
};
class JAWWindow {
@@ -29,9 +29,9 @@ public:
virtual void drawSelf(f32, f32);
virtual void drawSelf(f32, f32, Mtx*);
/* 0x0FC */ JAWGraphContext field_0xfc;
/* 0x0FC */ JAWGraphContext m_graf;
/* 0x118 */ JAWWindow* m_pParent;
/* 0x11C */ JUTPoint field_0x11c;
/* 0x11C */ JUTPoint m_point;
};
class TJ2DWindowDraw : public J2DWindow {
@@ -94,21 +94,29 @@ public:
static JUtility::TColor convJudaColor(u16);
void padProc(const JUTGamePad&);
void setWindowColor(const JUtility::TColor& color) {
setWindowColor(color, color, color, color);
}
void setWindowColor(u8 r, u8 g, u8 b, u8 a) {
setWindowColor(JUtility::TColor(r, g, b, a));
}
/* 0x004 */ Mtx mMatrix;
/* 0x034 */ u8 field_0x34[0x38 - 0x34];
/* 0x038 */ TJ2DWindowDraw field_0x38;
/* 0x180 */ J2DTextBox field_0x180;
/* 0x2B0 */ TWindowText field_0x2b0;
/* 0x3D8 */ JUtility::TColor field_0x3d8;
/* 0x3DC */ JUtility::TColor field_0x3dc;
/* 0x3E0 */ JUtility::TColor field_0x3e0;
/* 0x3E4 */ JUtility::TColor field_0x3e4;
/* 0x038 */ TJ2DWindowDraw m_drawWindow;
/* 0x180 */ J2DTextBox m_titleText;
/* 0x2B0 */ TWindowText m_windowText;
/* 0x3D8 */ JUtility::TColor m_windowColor0;
/* 0x3DC */ JUtility::TColor m_windowColor1;
/* 0x3E0 */ JUtility::TColor m_windowColor2;
/* 0x3E4 */ JUtility::TColor m_windowColor3;
/* 0x3E8 */ int field_0x3e8;
/* 0x3EC */ u8 field_0x3ec;
/* 0x3EC */ u8 m_isInit;
void setMatrix(Mtx mtx) { MTXCopy(mtx, mMatrix); }
void setAlpha(u8 alpha) { field_0x38.setAlpha(alpha); }
void draw(int x, int y, const J2DGrafContext* p_grafCtx) { field_0x38.drawPane(x, y, p_grafCtx); }
void setAlpha(u8 alpha) { m_drawWindow.setAlpha(alpha); }
void draw(int x, int y, const J2DGrafContext* p_grafCtx) { m_drawWindow.drawPane(x, y, p_grafCtx); }
};
#endif /* JAWWINDOW_H */
@@ -49,6 +49,12 @@ public:
JAISoundID(const JAISoundID& other) { id_.composite_ = other.id_.composite_; };
JAISoundID(unsigned int sectionID, unsigned int groupID, unsigned int waveID) {
id_.info.type.parts.sectionID = sectionID;
id_.info.type.parts.groupID = groupID;
id_.info.waveID = waveID;
}
JAISoundID() {}
bool isAnonymous() const { return id_.composite_ == -1; }
@@ -322,6 +328,8 @@ public:
status_.field_0x0.flags.paused = param_0;
}
bool isPaused() const { return status_.field_0x0.flags.paused; }
void updateLifeTime(u32 lifeTime) {
if (lifeTime > lifeTime_) {
lifeTime_ = lifeTime;
@@ -33,6 +33,9 @@ public:
bool isAllocated() const { return mBase; }
u32 getSize() const { return mSize; }
JSUTree<JASHeap>* getFirstChild() { return mTree.getFirstChild(); }
JSUTree<JASHeap>* getEndChild() { return mTree.getEndChild(); }
/* 0x00 */ JSUTree<JASHeap> mTree;
/* 0x1C */ OSMutex mMutex;
/* 0x34 */ JASDisposer* mDisposer;
@@ -54,6 +54,8 @@ struct JASWaveArc : JASDisposer {
virtual void onEraseDone() {}
s32 getStatus() const { return mStatus; }
u32 getFileSize() const { return mFileLength; }
JASHeap* getHeap() { return &mHeap; }
struct loadToAramCallbackParams {
// not official struct name
@@ -148,6 +148,8 @@ struct JAUSoundTable : public JASGlobalInstance<JAUSoundTable> {
void init(void const*);
u8 getTypeID(JAISoundID) const;
JAUSoundTableItem* getData(JAISoundID) const;
int getNumGroups_inSection(u8) const;
int getNumItems_inGroup(u8, u8) const;
JAUSoundTableItem* getItem(JAUSoundTableGroup* group, int index) const {
u32 offset = group->getItemOffset(index);
@@ -230,6 +230,8 @@ public:
return *this;
}
operator int() { return (int)mTree; }
T* getObject() const { return this->mTree->getObject(); }
bool operator==(const JSUTree<T>* other) const { return this->mTree == other; }