mirror of
https://github.com/zeldaret/tp
synced 2026-06-07 12:07:34 -04:00
JAHostIO and friends (#3131)
This commit is contained in:
@@ -2,10 +2,43 @@
|
||||
#define JAHSOUNDPLAYERNODE_H
|
||||
|
||||
#include "JSystem/JAHostIO/JAHFrameNode.h"
|
||||
#include "JSystem/JAHostIO/JAHUAsnData.h"
|
||||
#include "JSystem/JAHostIO/JAHUTableEdit.h"
|
||||
|
||||
class JAHPlayBox : public JAHUSeBox {
|
||||
public:
|
||||
JAHPlayBox();
|
||||
|
||||
virtual void onCurrentNodeFrame();
|
||||
|
||||
public:
|
||||
/* 0x85 */ u8 unk85;
|
||||
};
|
||||
|
||||
class JAHSoundPlayerNode : public JAHFrameNode {
|
||||
public:
|
||||
JAHSoundPlayerNode();
|
||||
|
||||
virtual void message(JAHControl&);
|
||||
virtual void onCurrentNodeFrame();
|
||||
|
||||
u8 getContMode() const;
|
||||
|
||||
public:
|
||||
/* 0x70 */ s32 unk70;
|
||||
/* 0x74 */ s32 unk74;
|
||||
/* 0x78 */ s32 unk78;
|
||||
/* 0x7C */ u8 unk7C;
|
||||
/* 0x7D */ u8 unk7D;
|
||||
/* 0x7E */ u8 unk7E;
|
||||
/* 0x7F */ u8 unk7F;
|
||||
/* 0x80 */ s32 unk80;
|
||||
/* 0x84 */ s32 unk84;
|
||||
/* 0x88 */ s64 unk88;
|
||||
/* 0x90 */ s64 unk90;
|
||||
/* 0x98 */ JAHPlayBox unk98;
|
||||
/* 0x120 */ bool unk120;
|
||||
/* 0x122 */ JAHUAsn unk122;
|
||||
};
|
||||
|
||||
#endif /* JAHSOUNDPLAYERNODE_H */
|
||||
|
||||
@@ -9,17 +9,19 @@ class JAHVirtualNode;
|
||||
class JAHFrameNode : public JAHioNode {
|
||||
public:
|
||||
JAHFrameNode(const char*);
|
||||
/* vt[07] */ virtual ~JAHFrameNode();
|
||||
/* vt[02] */ virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
/* vt[05] */ virtual void genMessage(JORMContext*);
|
||||
/* vt[06] */ virtual void listenNodeEvent(const JORNodeEvent*);
|
||||
/* vt[0C] */ virtual s32 getNodeType();
|
||||
/* vt[0C] */ virtual s32 getNodeType() { return 1; }
|
||||
/* vt[11] */ virtual void onCurrentNodeFrame();
|
||||
/* vt[12] */ virtual void onFrame();
|
||||
|
||||
void framework();
|
||||
void currentFramework();
|
||||
|
||||
void callAllVirtualMessages(JAHControl&);
|
||||
void appendVirNode(JAHVirtualNode*);
|
||||
|
||||
JSULink<JAHFrameNode>* getFrameNodeLink() { return &mFrameNodeLink; }
|
||||
|
||||
/* 0x44 */ JSUTree<JAHVirtualNode> mTree;
|
||||
|
||||
@@ -3,18 +3,22 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
template<class T>
|
||||
template <class T>
|
||||
class JAHSingletonBase {
|
||||
public:
|
||||
JAHSingletonBase() { sInstance = (T*)this; }
|
||||
virtual ~JAHSingletonBase() { sInstance = NULL; }
|
||||
|
||||
static T* newInstance() {
|
||||
// clang-format off
|
||||
JUT_ASSERT(82, sInstance==NULL);
|
||||
// clang-format on
|
||||
if (!sInstance) {
|
||||
sInstance = new T();
|
||||
}
|
||||
// clang-format off
|
||||
JUT_ASSERT(85, sInstance!=NULL);
|
||||
// clang-format on
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef JAHUASNNDATA_H
|
||||
#define JAHUASNNDATA_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class JORReflexible;
|
||||
class JAHControl;
|
||||
|
||||
class JAHUAsn {
|
||||
public:
|
||||
JAHUAsn(u16 param_1) : unk0(param_1) {}
|
||||
|
||||
u8 getAttribute(u32);
|
||||
u16 getSubNum(s32, s32);
|
||||
u16 getDataNum(s32, s32, s32);
|
||||
const char* getName(s32, s32, s32, s32);
|
||||
u32 getDataId(s32, s32, s32, s32);
|
||||
u8 getCategory(u32);
|
||||
u8 getSub(u32);
|
||||
u16 getDataPerCat(u32);
|
||||
u16 getDataPerSub(u32);
|
||||
u32 getNextId(u32, bool);
|
||||
|
||||
void createComboBoxCategory(JAHControl&);
|
||||
void createComboBoxSub(JAHControl&, s32, s32);
|
||||
void createComboBoxData(JAHControl&, s32, s32, s32);
|
||||
void checkAndUpdateNameBox(s32*, s32*, s32*, s32*, s32, s32, s32, JORReflexible*);
|
||||
void updateNameBoxAll(s32*, s32*, s32*, s32*, JORReflexible*);
|
||||
|
||||
private:
|
||||
void __updateNameBoxCategory(s32*, JORReflexible*);
|
||||
void __updateNameBoxSub(s32, s32, s32*, JORReflexible*);
|
||||
void __updateNameBoxData(s32, s32, s32, s32*, JORReflexible*);
|
||||
u32 __GetSubNo(s32);
|
||||
u32 __GetDataNo(s32);
|
||||
|
||||
/* 0x0 */ u16 unk0;
|
||||
};
|
||||
|
||||
#endif /* JAHUASNNDATA_H */
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef JAHUGLOBAL_H
|
||||
#define JAHUGLOBAL_H
|
||||
|
||||
#include <cstring>
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
inline void JAHUDialog_CatComment(char* param_1, const char* param_2, const char* param_3) {
|
||||
if (param_3) {
|
||||
std::strcpy(param_1, param_3);
|
||||
std::strcat(param_1, "\n\n");
|
||||
}
|
||||
std::strcat(param_1, param_2);
|
||||
}
|
||||
|
||||
inline void JAHUDialog_OK(const char* mes, const char* param_2, const char* param_3) {
|
||||
char buffer[128];
|
||||
if (param_3) {
|
||||
JAHUDialog_CatComment(buffer, mes, param_3);
|
||||
} else {
|
||||
// clang-format off
|
||||
JUT_ASSERT(144, std::strlen(mes)<128-1)
|
||||
// clang-format on
|
||||
std::strcpy(buffer, mes);
|
||||
}
|
||||
|
||||
JORMessageBox(buffer, param_2, 0x30);
|
||||
}
|
||||
|
||||
#endif /* JAHUGLOBAL_H */
|
||||
@@ -2,10 +2,47 @@
|
||||
#define JAHUTABLEDIT_H
|
||||
|
||||
#include "JSystem/JAHostIO/JAHVirtualNode.h"
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
|
||||
class JAHUAsn;
|
||||
|
||||
class JAHUSeBox : public JAHVirtualNode {
|
||||
public:
|
||||
JAHUSeBox();
|
||||
JAHUSeBox(u32, u32*);
|
||||
|
||||
virtual void message(JAHControl&);
|
||||
virtual void onCurrentNodeFrame();
|
||||
virtual void propertyEvent(JAH_P_Event, u32);
|
||||
virtual void nodeEvent(JAH_N_Event);
|
||||
virtual void trigPlayButton();
|
||||
virtual void trigStopButton();
|
||||
virtual void soundPlay();
|
||||
virtual void soundStop();
|
||||
|
||||
u8 checkNameSetChange();
|
||||
void updateNameSet(JORReflexible*);
|
||||
void setId(u32, bool, JORReflexible*);
|
||||
u32 getId() const { return unk58; }
|
||||
|
||||
public:
|
||||
/* 0x40 */ JAISoundHandle unk40;
|
||||
/* 0x44 */ JAISoundHandle unk44;
|
||||
/* 0x48 */ bool unk48;
|
||||
/* 0x4C */ u32 unk4C;
|
||||
/* 0x50 */ u32 unk50;
|
||||
/* 0x54 */ u32 unk54;
|
||||
/* 0x58 */ u32 unk58;
|
||||
/* 0x5C */ u32* unk5C;
|
||||
/* 0x60 */ JAHUAsn* mAsnCalc;
|
||||
/* 0x64 */ s32 unk64;
|
||||
/* 0x68 */ s32 unk68;
|
||||
/* 0x6C */ s32 unk6C;
|
||||
/* 0x70 */ s32 unk70;
|
||||
/* 0x74 */ s32 unk74;
|
||||
/* 0x78 */ s32 unk78;
|
||||
/* 0x7C */ s32 unk7C;
|
||||
/* 0x80 */ s32 unk80;
|
||||
/* 0x84 */ bool unk84;
|
||||
};
|
||||
|
||||
#endif /* JAHUTABLEDIT_H */
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#ifndef JAHUPDATE_H
|
||||
#define JAHUPDATE_H
|
||||
|
||||
#include "JSystem/JAHostIO/JAHioNode.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "types.h"
|
||||
|
||||
namespace JAHUpdate {
|
||||
|
||||
extern JAHioNode* spNode;
|
||||
extern JORMContext* spMc;
|
||||
|
||||
inline void startUpdateNode(JAHioNode* param_1) {
|
||||
spMc = attachJORMContext(8);
|
||||
spNode = param_1;
|
||||
spMc->startUpdateNode(spNode);
|
||||
}
|
||||
|
||||
inline void endUpdateNode() {
|
||||
spMc->endUpdateNode();
|
||||
releaseJORMContext(spMc);
|
||||
spMc = NULL;
|
||||
spNode = NULL;
|
||||
}
|
||||
|
||||
inline void buttonOn(JAHioNode* param_1, u32 param_2) {
|
||||
bool b = false;
|
||||
if (spMc != NULL)
|
||||
b = true;
|
||||
|
||||
if (!b)
|
||||
startUpdateNode(param_1);
|
||||
|
||||
spMc->updateButton(1, param_2, 0);
|
||||
|
||||
if (!b)
|
||||
endUpdateNode();
|
||||
}
|
||||
|
||||
inline void buttonOff(JAHioNode* param_1, u32 param_2) {
|
||||
bool b = false;
|
||||
if (spMc != NULL)
|
||||
b = true;
|
||||
|
||||
if (!b)
|
||||
startUpdateNode(param_1);
|
||||
|
||||
spMc->updateButton(1, param_2, 0x40000000);
|
||||
|
||||
if (!b)
|
||||
endUpdateNode();
|
||||
}
|
||||
|
||||
} // namespace JAHUpdate
|
||||
|
||||
#endif /* JAHUPDATE_H */
|
||||
@@ -8,13 +8,28 @@ class JAHControl;
|
||||
|
||||
class JAHVirtualNode {
|
||||
public:
|
||||
JAHVirtualNode();
|
||||
JAHVirtualNode(const char*);
|
||||
|
||||
virtual void updateNode();
|
||||
virtual void message(JAHControl&);
|
||||
virtual void message(JAHControl&) {}
|
||||
virtual void onFrame();
|
||||
virtual void onCurrentNodeFrame();
|
||||
virtual void propertyEvent(JAH_P_Event, u32);
|
||||
virtual void nodeEvent(JAH_N_Event);
|
||||
virtual void virtualMessage(JAHControl&);
|
||||
|
||||
void callAllVirtualMessages(JAHControl&);
|
||||
JAHioNode* getMaster();
|
||||
void framework();
|
||||
void currentFramework();
|
||||
void listenVirtualPropertyEvent(JAH_P_Event, u32);
|
||||
void listenVirtualNodeEvent(JAH_N_Event);
|
||||
void setVirNodeName(const char*);
|
||||
|
||||
JSUTree<JAHVirtualNode>* getVirTree() { return &mTree; }
|
||||
static u32 getVirNodeNum() { return smVirNodeNum; }
|
||||
|
||||
static u32 smVirNodeNum;
|
||||
|
||||
/* 0x04 */ JSUTree<JAHVirtualNode> mTree;
|
||||
/* 0x20 */ char mName[32];
|
||||
|
||||
@@ -1,22 +1,42 @@
|
||||
#ifndef JAHIOMESSAGE_H
|
||||
#define JAHIOMESSAGE_H
|
||||
|
||||
#include <JSystem/JHostIO/JORMContext.h>
|
||||
#include <types.h>
|
||||
|
||||
class JAHioNode;
|
||||
class JORMContext;
|
||||
class JAHControl;
|
||||
|
||||
class JAHControl {
|
||||
public:
|
||||
JAHControl(JORMContext*, JAHioNode*);
|
||||
void returnY(u16);
|
||||
void indent(s8);
|
||||
void makeComment(const char*, u32, u8, u32);
|
||||
|
||||
void makeComment(const char*, u32, u8, u32);
|
||||
void makeButtonL(const char*, u32, u16, u32);
|
||||
void makeCommentL(const char*, u32, u16, u32);
|
||||
void endComboBox();
|
||||
void startComboBoxL(const char*, s32*, u16, u16, u32);
|
||||
void makeSlider(const char*, s32*, s32, s32, u32);
|
||||
void makeSlider(const char*, s16*, s16, s16, u32);
|
||||
void makeSlider(const char*, f32*, f32, f32, u32);
|
||||
void makeButton(const char*, u32, u8, u32);
|
||||
void endRadioButton();
|
||||
void makeRadioButtonItem(const char*, u8);
|
||||
void startRadioButton(const char*, u8*, u8, u32);
|
||||
void makeCheckBox(const char*, u8*, u8, bool, u32);
|
||||
void makeSlider(const char*, u8*, u8, u8, u32);
|
||||
void makeComboBoxItem(const char*, u8);
|
||||
void makeComboBoxItem(const char*, s32);
|
||||
void startComboBox(const char*, u8*, u8, u32);
|
||||
|
||||
static u16 getComboWidth(u8 itemNo) { return smComboWidth[itemNo]; }
|
||||
static u16 getLineHeight() { return smLineHeight; }
|
||||
static u16 getContWidth() { return smContWidth; }
|
||||
static u16 getIntervalX() { return smIntX; }
|
||||
static u16 getNameWidth() { return smNameWidth; }
|
||||
static u32 getContWidth() { return smContWidth; }
|
||||
static u32 getIntervalX() { return smIntX; }
|
||||
static u32 getNameWidth() { return smNameWidth; }
|
||||
|
||||
static u16 smButtonWidth[];
|
||||
static u16 smCommentWidth[];
|
||||
@@ -34,9 +54,7 @@ public:
|
||||
u16 getY() { return mY; }
|
||||
JORMContext* getContext() { return mContext; }
|
||||
|
||||
void tabX(u16 param_1) {
|
||||
mX += param_1 + smIntX;
|
||||
}
|
||||
void tabX(u16 param_1) { mX += smIntX + param_1; }
|
||||
void returnYDirectSize(u16 param_1) {
|
||||
mY += param_1;
|
||||
mX = smXLeft + field_0x4 * smIndentSize;
|
||||
@@ -49,4 +67,164 @@ public:
|
||||
/* 0x0C */ JAHioNode* mNode;
|
||||
};
|
||||
|
||||
// There's a funky dependency loop between JAHControl and JAHContTemplate, which must be resolved
|
||||
// THIS way, as makeSlider etc functions must be defined NOT out-of-line for their string literal
|
||||
// symbols to get the correct mangling.
|
||||
|
||||
class JAHContTemplate {
|
||||
public:
|
||||
template <class T>
|
||||
static void startComboBox(JAHControl* param_1, const char* param_2, T* param_3, u16 param_4,
|
||||
u16 param_5, u32 param_6) {
|
||||
if (param_2) {
|
||||
param_1->getContext()->genLabel(param_2, 0, param_6, NULL, param_1->getX(),
|
||||
param_1->getY(), param_4, param_1->getLineHeight());
|
||||
param_1->tabX(param_4);
|
||||
}
|
||||
|
||||
param_1->getContext()->startComboBox(param_2, param_3, param_6, NULL, param_1->getX(),
|
||||
param_1->getY() - 7, param_5,
|
||||
param_1->getLineHeight());
|
||||
param_1->tabX(param_5);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void makeSlider(JAHControl* param_1, const char* param_2, T* param_3, T param_4,
|
||||
T param_5, u32 param_6) {
|
||||
if (param_2) {
|
||||
param_1->getContext()->genLabel(param_2, 0, param_6, NULL, param_1->getX(),
|
||||
param_1->getY(), param_1->getNameWidth(),
|
||||
param_1->getLineHeight());
|
||||
}
|
||||
|
||||
param_1->getContext()->genSlider(
|
||||
"---", param_3, param_4, param_5, param_6, NULL,
|
||||
(u32)param_1->getX() + param_1->getNameWidth() + param_1->getIntervalX(),
|
||||
param_1->getY() - 3, param_1->getContWidth(), param_1->getLineHeight());
|
||||
param_1->returnY(1);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void startRadioButton(JAHControl* param_1, const char* param_2, T* param_3, T param_4,
|
||||
u32 param_5) {
|
||||
if (param_2) {
|
||||
param_1->getContext()->genLabel(param_2, 0, param_5, NULL, param_1->getX(),
|
||||
param_1->getY(), param_1->getNameWidth() + 48,
|
||||
param_1->getLineHeight());
|
||||
}
|
||||
param_1->getContext()->startRadioButton(
|
||||
param_2, param_3, param_5, NULL,
|
||||
(u32)param_1->getX() + param_1->getNameWidth() + param_1->getIntervalX() + 48,
|
||||
param_1->getY(), param_1->getContWidth() + 250, param_4 * 18);
|
||||
|
||||
param_1->returnYDirectSize(param_4 * 18);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void makeCheckBox(JAHControl* param_1, const char* param_2, T* param_3, T param_4,
|
||||
bool param_5, u32 param_6) {
|
||||
if (!param_5) {
|
||||
param_1->getContext()->genCheckBox(param_2, param_3, param_4, param_6, NULL,
|
||||
param_1->getX(), param_1->getY(), 1000,
|
||||
param_1->getLineHeight());
|
||||
} else {
|
||||
param_1->getContext()->genCheckBox(param_2, param_3, param_4, param_6, NULL,
|
||||
param_1->getX() + param_1->getNameWidth() +
|
||||
param_1->getIntervalX() + 52,
|
||||
param_1->getY(), 1000, param_1->getLineHeight());
|
||||
}
|
||||
param_1->returnY(1);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void startComboBox(JAHControl* param_1, const char* param_2, T* param_3, T param_4,
|
||||
u32 param_5) {
|
||||
if (param_2) {
|
||||
param_1->getContext()->genLabel(param_2, 0, param_5, NULL, param_1->getX(),
|
||||
param_1->getY(), param_1->getNameWidth() + 48,
|
||||
param_1->getLineHeight());
|
||||
}
|
||||
|
||||
param_1->getContext()->startComboBox(
|
||||
param_2, param_3, param_5, NULL,
|
||||
param_1->getX() + param_1->getNameWidth() + param_1->getIntervalX() + 48,
|
||||
param_1->getY() - 7, param_1->getComboWidth(param_4), param_1->getLineHeight());
|
||||
}
|
||||
};
|
||||
|
||||
inline void JAHControl::makeButtonL(const char* param_1, u32 param_2, u16 param_3, u32 param_4) {
|
||||
mContext->genButton(param_1, param_2, param_4, NULL, mX, mY - 5, param_3, smLineHeight);
|
||||
tabX(param_3);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeCommentL(const char* param_1, u32 param_2, u16 param_3, u32 param_4) {
|
||||
mContext->genLabel(param_1, param_2, param_4, NULL, mX, mY, param_3, smLineHeight);
|
||||
tabX(param_3);
|
||||
}
|
||||
|
||||
inline void JAHControl::endComboBox() {
|
||||
mContext->endComboBox();
|
||||
}
|
||||
|
||||
inline void JAHControl::startComboBoxL(const char* param_1, s32* param_2, u16 param_3, u16 param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::startComboBox(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeSlider(const char* param_1, s32* param_2, s32 param_3, s32 param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::makeSlider(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeSlider(const char* param_1, s16* param_2, s16 param_3, s16 param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::makeSlider(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeSlider(const char* param_1, f32* param_2, f32 param_3, f32 param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::makeSlider(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeSlider(const char* param_1, u8* param_2, u8 param_3, u8 param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::makeSlider(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeButton(const char* param_1, u32 param_2, u8 param_3, u32 param_4) {
|
||||
mContext->genButton(param_1, param_2, param_4, NULL, mX, mY - 5, smButtonWidth[param_3],
|
||||
smLineHeight);
|
||||
returnY(1);
|
||||
}
|
||||
|
||||
inline void JAHControl::endRadioButton() {
|
||||
mContext->endRadioButton();
|
||||
}
|
||||
|
||||
inline void JAHControl::makeRadioButtonItem(const char* param_1, u8 param_2) {
|
||||
mContext->genRadioButtonItem(param_1, param_2, 0, -1, -1, 128, 16);
|
||||
}
|
||||
|
||||
inline void JAHControl::startRadioButton(const char* param_1, u8* param_2, u8 param_3,
|
||||
u32 param_4) {
|
||||
JAHContTemplate::startRadioButton(this, param_1, param_2, param_3, param_4);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeCheckBox(const char* param_1, u8* param_2, u8 param_3, bool param_4,
|
||||
u32 param_5) {
|
||||
JAHContTemplate::makeCheckBox(this, param_1, param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeComboBoxItem(const char* label, u8 itemNo) {
|
||||
makeComboBoxItem(label, (s32)itemNo);
|
||||
}
|
||||
|
||||
inline void JAHControl::makeComboBoxItem(const char* label, s32 itemNo) {
|
||||
mContext->genComboBoxItem(label, itemNo);
|
||||
}
|
||||
|
||||
inline void JAHControl::startComboBox(const char* label, u8* param_2, u8 param_3, u32 param_4) {
|
||||
JAHContTemplate::startComboBox(this, label, param_2, param_3, param_4);
|
||||
}
|
||||
|
||||
#endif /* JAHIOMESSAGE_H */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef JASDSPINTERFACE_H
|
||||
#define JASDSPINTERFACE_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <types.h>
|
||||
|
||||
struct JASWaveInfo;
|
||||
|
||||
@@ -192,7 +192,11 @@ struct JAUSoundNameTable : public JASGlobalInstance<JAUSoundNameTable> {
|
||||
JAUSoundNameTable(bool param_0) : JASGlobalInstance<JAUSoundNameTable>(param_0) {
|
||||
}
|
||||
~JAUSoundNameTable() {}
|
||||
int getNumGroups_inSection(u8) const;
|
||||
int getNumItems_inGroup(u8, u8) const;
|
||||
void init(void const*);
|
||||
const char* getName(JAISoundID) const;
|
||||
const char* getGroupName(JAISoundID) const;
|
||||
|
||||
JAUSoundTable_<JAUSoundNameTableRoot,JAUSoundNameTableSection,JAUSoundNameTableGroup,void> field_0x0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef JOREVENT_H
|
||||
#define JOREVENT_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class JORReflexible;
|
||||
|
||||
struct JOREvent {};
|
||||
|
||||
struct JORPropertyEvent : JOREvent {
|
||||
enum EKind {
|
||||
EKind_HasListener = (1 << 30),
|
||||
EKind_ValueID = (1 << 29),
|
||||
EKind_FloatValue = (1 << 9),
|
||||
};
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x4 - 0x0];
|
||||
/* 0x04 */ u32 type;
|
||||
/* 0x08 */ u32 kind;
|
||||
/* 0x0C */ char* id; // id?
|
||||
/* 0x10 */ JORReflexible* field_0x10; // ?
|
||||
/* 0x14 */ u32 field_0x14;
|
||||
union {
|
||||
u32 U32;
|
||||
u16 U16[2];
|
||||
}
|
||||
/* 0x18 */ field_0x18;
|
||||
};
|
||||
|
||||
struct JORGenEvent : JOREvent {};
|
||||
|
||||
struct JORNodeEvent : JOREvent {
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
};
|
||||
|
||||
#endif /* JOREVENT_H */
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
/* 0x08 */ u32 m_fileAttribute;
|
||||
/* 0x0C */ u32 m_lowDateTime;
|
||||
/* 0x10 */ u32 m_highDateTime;
|
||||
/* 0x14 */ char* m_filename;
|
||||
/* 0x14 */ char m_filename[];
|
||||
};
|
||||
|
||||
class JORFile {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <dolphin.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JHostIO/JOREvent.h"
|
||||
#include "JSystem/JSupport/JSUMemoryStream.h"
|
||||
|
||||
#define MCTX_MSG_RESET 0
|
||||
@@ -194,9 +194,7 @@ public:
|
||||
void startUpdateNode(JORReflexible* obj) { putNode(obj); }
|
||||
|
||||
void genNodeSub(const char* label, JORReflexible* i_node, u32, u32);
|
||||
void putNode(JORReflexible* obj) {
|
||||
mOutputStream << (uintptr_t)obj;
|
||||
}
|
||||
void putNode(JORReflexible* obj) { mOutputStream << (uintptr_t)obj; }
|
||||
void invalidNode(JORReflexible* i_node, u32);
|
||||
|
||||
void genControl(u32 type, u32 kind, const char* label, u32 style, u32 id,
|
||||
@@ -221,6 +219,10 @@ public:
|
||||
u16 posX = -1, u16 posY = -1, u16 width = JORM_DEFAULT_WIDTH,
|
||||
u16 height = JORM_DEFAULT_HEIGHT);
|
||||
|
||||
void updateButton(u32 param_1, u32 param_2, u32 param_3) {
|
||||
updateControl(param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
void genLabel(const char* label, u32 id, u32 style = 0, JOREventListener* pListener = NULL,
|
||||
u16 posX = -1, u16 posY = -1, u16 width = JORM_DEFAULT_WIDTH,
|
||||
u16 height = JORM_DEFAULT_HEIGHT);
|
||||
@@ -270,6 +272,7 @@ public:
|
||||
DEFINE_START_COMBO_BOX_ID(s32, JORPropertyEvent::EKind_ValueID)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX(u8)
|
||||
DEFINE_UPDATE_COMBO_BOX(s32)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX_ID(s32)
|
||||
|
||||
@@ -279,6 +282,16 @@ public:
|
||||
genSelectorItemSub(label, itemNo, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void editComboBoxItem(u32 param_0, u32 param_1, const char* param_2, s32 param_3, u32 param_4);
|
||||
|
||||
void addComboBoxItem(u32 param_1, s32* param_2, const char* param_3, s32 param_4, u32 param_5) {
|
||||
editComboBoxItem(param_1, (uintptr_t)param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
void removeComboBoxItem(u32 param_1, s32* param_2, u32 param_3) {
|
||||
editComboBoxItem(param_1, (uintptr_t)param_2, NULL, 0, param_3);
|
||||
}
|
||||
|
||||
/**
|
||||
* === RADIO BUTTON ===
|
||||
*/
|
||||
@@ -313,8 +326,6 @@ public:
|
||||
updateSelectorSub(mode, (uintptr_t)pSrc, *pSrc, param_3);
|
||||
}
|
||||
|
||||
void editComboBoxItem(u32 param_0, u32 param_1, const char* param_2, s32 param_3, u32 param_4);
|
||||
|
||||
void openMessageBox(void* param_0, u32 style, const char* message, const char* title);
|
||||
|
||||
/* 0x00000 */ u8 mBuffer[0x10000];
|
||||
|
||||
@@ -2,36 +2,12 @@
|
||||
#define JORREFLEXIBLE_H
|
||||
|
||||
#include <types.h>
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
|
||||
class JORReflexible;
|
||||
|
||||
struct JOREvent {};
|
||||
|
||||
struct JORPropertyEvent : JOREvent {
|
||||
enum EKind {
|
||||
EKind_HasListener = (1 << 30),
|
||||
EKind_ValueID = (1 << 29),
|
||||
EKind_FloatValue = (1 << 9),
|
||||
};
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x4 - 0x0];
|
||||
/* 0x04 */ u32 type;
|
||||
/* 0x08 */ u32 kind;
|
||||
/* 0x0C */ char* id; // id?
|
||||
/* 0x10 */ JORReflexible* field_0x10; // ?
|
||||
/* 0x14 */ u32 field_0x14;
|
||||
union {
|
||||
u32 U32;
|
||||
u16 U16[2];
|
||||
}
|
||||
/* 0x18 */ field_0x18;
|
||||
};
|
||||
|
||||
struct JORGenEvent : JOREvent {};
|
||||
|
||||
struct JORNodeEvent : JOREvent {
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
};
|
||||
struct JOREvent;
|
||||
struct JORPropertyEvent;
|
||||
struct JORGenEvent;
|
||||
struct JORNodeEvent;
|
||||
|
||||
class JORMContext;
|
||||
class JORServer;
|
||||
@@ -48,8 +24,8 @@ class JORReflexible : public JOREventListener {
|
||||
public:
|
||||
#if DEBUG
|
||||
JORReflexible() {}
|
||||
static JORServer* getJORServer();
|
||||
|
||||
static JORServer* getJORServer() { return JORServer::getInstance(); }
|
||||
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
virtual void listen(u32, const JOREvent*);
|
||||
virtual void genObjectInfo(const JORGenEvent*);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRCompression.h"
|
||||
#include "JSystem/JKernel/JKRFileLoader.h"
|
||||
#include "global.h"
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
bool setErrorFlag(bool errorFlag);
|
||||
bool isSubHeap(JKRHeap* heap) const;
|
||||
void* getAltAramStartAdr();
|
||||
static void* getAltAramStartAdr();
|
||||
|
||||
/* vt[03] */ virtual void callAllDisposer();
|
||||
/* vt[04] */ virtual u32 getHeapType() = 0;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include "JSystem/JSupport/JSUIosBase.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
class JSUInputStream : public JSUIosBase {
|
||||
public:
|
||||
JSUInputStream() {}
|
||||
@@ -89,17 +89,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
s32 read(bool& val) {
|
||||
return read(&val, sizeof(bool));
|
||||
}
|
||||
s32 read(bool& val) { return read(&val, sizeof(bool)); }
|
||||
|
||||
s32 read(u8& val) {
|
||||
return read(&val, sizeof(u8));
|
||||
}
|
||||
s32 read(u8& val) { return read(&val, sizeof(u8)); }
|
||||
|
||||
s32 read(u32& param_0) {
|
||||
return read(¶m_0, 4);
|
||||
}
|
||||
s32 read(u32& param_0) { return read(¶m_0, 4); }
|
||||
|
||||
// TODO: return value probably wrong
|
||||
s32 read(void*, s32);
|
||||
@@ -108,9 +102,9 @@ public:
|
||||
|
||||
// move?
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
template <typename T>
|
||||
T* JSUConvertOffsetToPtr(const void*, const void*);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "JSystem/JSupport/JSURandomOutputStream.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
* @ingroup jsystem-jsupport
|
||||
*
|
||||
*/
|
||||
class JSUMemoryInputStream : public JSURandomInputStream {
|
||||
public:
|
||||
JSUMemoryInputStream(const void* res, s32 size) { setBuffer(res, size); }
|
||||
@@ -19,9 +19,7 @@ public:
|
||||
s32 getLength() const;
|
||||
s32 getPosition() const;
|
||||
|
||||
void* getPointer() const {
|
||||
return (u8*)mBuffer + mPosition;
|
||||
}
|
||||
void* getPointer() const { return (u8*)mBuffer + mPosition; }
|
||||
|
||||
private:
|
||||
/* 0x08 */ const void* mBuffer;
|
||||
@@ -39,7 +37,7 @@ public:
|
||||
virtual ~JSUMemoryOutputStream() {}
|
||||
virtual s32 writeData(const void*, s32);
|
||||
virtual s32 getLength() const;
|
||||
virtual s32 getPosition() const;
|
||||
virtual s32 getPosition() const { return mPosition; }
|
||||
virtual s32 seek(s32, JSUStreamSeekFrom);
|
||||
virtual s32 getAvailable() const;
|
||||
virtual s32 seekPos(s32, JSUStreamSeekFrom);
|
||||
|
||||
Reference in New Issue
Block a user