mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 13:08:33 -04:00
Merge commit '46da46b152472c668875d67c336f59ded62d3ecc' into compile
This commit is contained in:
@@ -24,8 +24,7 @@ public:
|
||||
|
||||
const JGeometry::TBox2<f32>* getOrtho() const { return &mOrtho; }
|
||||
void setOrtho(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near) {
|
||||
JGeometry::TBox2<f32> ortho(x, y, x + width, y + height);
|
||||
setOrtho(ortho, far, near);
|
||||
setOrtho(JGeometry::TBox2<f32>(x, y, x + width, y + height), far, near);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef J3DANIMATION_H
|
||||
#define J3DANIMATION_H
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DJoint.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTNameTab.h"
|
||||
@@ -978,52 +977,4 @@ public:
|
||||
/* 0x10 */ f32 mFrame;
|
||||
}; // Size: 0x14
|
||||
|
||||
struct J3DMtxCalcAnmBase: public J3DMtxCalc {
|
||||
J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; }
|
||||
~J3DMtxCalcAnmBase() {}
|
||||
J3DAnmTransform* getAnmTransform() { return mAnmTransform; }
|
||||
void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; }
|
||||
|
||||
J3DAnmTransform* mAnmTransform;
|
||||
};
|
||||
|
||||
struct J3DMtxCalcAnimationAdaptorBase {
|
||||
J3DMtxCalcAnimationAdaptorBase() {}
|
||||
void change(J3DAnmTransform*) {}
|
||||
};
|
||||
|
||||
template <typename A0>
|
||||
struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase {
|
||||
J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {}
|
||||
|
||||
void calc(J3DMtxCalcAnmBase* pMtxCalc) {
|
||||
J3DTransformInfo transform;
|
||||
J3DTransformInfo* transform_p;
|
||||
if (pMtxCalc->getAnmTransform() != NULL) {
|
||||
pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform);
|
||||
transform_p = &transform;
|
||||
} else {
|
||||
transform_p = &J3DMtxCalc::getJoint()->getTransformInfo();
|
||||
}
|
||||
|
||||
A0::calcTransform(*transform_p);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename A0, typename B0>
|
||||
struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase {
|
||||
J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {}
|
||||
~J3DMtxCalcAnimation() {}
|
||||
|
||||
void setAnmTransform(J3DAnmTransform* pAnmTransform) {
|
||||
mAnmTransform = pAnmTransform;
|
||||
field_0x8.change(pAnmTransform);
|
||||
}
|
||||
|
||||
void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); }
|
||||
void calc() { field_0x8.calc(this); }
|
||||
|
||||
A0 field_0x8;
|
||||
};
|
||||
|
||||
#endif /* J3DANIMATION_H */
|
||||
|
||||
@@ -145,6 +145,54 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct J3DMtxCalcAnmBase: public J3DMtxCalc {
|
||||
J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; }
|
||||
~J3DMtxCalcAnmBase() {}
|
||||
J3DAnmTransform* getAnmTransform() { return mAnmTransform; }
|
||||
void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; }
|
||||
|
||||
J3DAnmTransform* mAnmTransform;
|
||||
};
|
||||
|
||||
struct J3DMtxCalcAnimationAdaptorBase {
|
||||
J3DMtxCalcAnimationAdaptorBase() {}
|
||||
void change(J3DAnmTransform*) {}
|
||||
};
|
||||
|
||||
template <typename A0>
|
||||
struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase {
|
||||
J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {}
|
||||
|
||||
void calc(J3DMtxCalcAnmBase* pMtxCalc) {
|
||||
J3DTransformInfo transform;
|
||||
J3DTransformInfo* transform_p;
|
||||
if (pMtxCalc->getAnmTransform() != NULL) {
|
||||
pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform);
|
||||
transform_p = &transform;
|
||||
} else {
|
||||
transform_p = &J3DMtxCalc::getJoint()->getTransformInfo();
|
||||
}
|
||||
|
||||
A0::calcTransform(*transform_p);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename A0, typename B0>
|
||||
struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase {
|
||||
J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {}
|
||||
~J3DMtxCalcAnimation() {}
|
||||
|
||||
void setAnmTransform(J3DAnmTransform* pAnmTransform) {
|
||||
mAnmTransform = pAnmTransform;
|
||||
field_0x8.change(pAnmTransform);
|
||||
}
|
||||
|
||||
void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); }
|
||||
void calc() { field_0x8.calc(this); }
|
||||
|
||||
A0 field_0x8;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef J3DJOINTTREE_H
|
||||
#define J3DJOINTTREE_H
|
||||
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTransform.h"
|
||||
|
||||
class J3DJoint;
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#define JORM_DEFAULT_WIDTH 0x200
|
||||
#define JORM_DEFAULT_HEIGHT 0x18
|
||||
#define JORM_DEFAULT_COMBOBOX_WIDTH 0x100
|
||||
#define JORM_DEFAULT_COMBOBOX_HEIGHT 0x1a
|
||||
|
||||
#define DEFINE_GEN_CHECKBOX(T, kind) \
|
||||
void genCheckBox(const char* label, T* pSrc, T mask, u32 style = 0, \
|
||||
@@ -65,7 +67,8 @@
|
||||
#define DEFINE_START_COMBO_BOX(T, kind) \
|
||||
void startComboBox(const char* label, T* pSrc, u32 style = 0, \
|
||||
JOREventListener* pListener = NULL, u16 posX = -1, u16 posY = -1, \
|
||||
u16 width = JORM_DEFAULT_WIDTH, u16 height = JORM_DEFAULT_HEIGHT) { \
|
||||
u16 width = JORM_DEFAULT_COMBOBOX_WIDTH, \
|
||||
u16 height = JORM_DEFAULT_COMBOBOX_HEIGHT) { \
|
||||
startSelectorSub('CMBX', kind, label, (uintptr_t)pSrc, style, *pSrc, pListener, posX, \
|
||||
posY, width, height); \
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
static u32 fetchResource_subroutine(u8*, u32, u8*, u32, JKRCompression);
|
||||
SArcHeader* getArcHeader() { return mArcHeader; }
|
||||
|
||||
private:
|
||||
public:
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ // JKRArchive
|
||||
/* 0x64 */ SArcHeader* mArcHeader;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
JKRThread(OSThread* thread, int message_count);
|
||||
virtual ~JKRThread();
|
||||
|
||||
/* vt[03] */ virtual void* run();
|
||||
/* vt[03] */ virtual void* run() { return NULL; }
|
||||
|
||||
void setCommon_mesgQueue(JKRHeap* heap, int message_count);
|
||||
void setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param_3);
|
||||
@@ -134,6 +134,15 @@ public:
|
||||
// static u8 sThreadList[12];
|
||||
};
|
||||
|
||||
class JKRIdleThread : public JKRThread {
|
||||
public:
|
||||
virtual void destroy() {}
|
||||
virtual ~JKRIdleThread() { sThread = NULL; }
|
||||
virtual void* run() { while (true); }
|
||||
|
||||
static void* sThread;
|
||||
};
|
||||
|
||||
typedef void (*JKRThreadSwitch_PreCallback)(OSThread* current, OSThread* next);
|
||||
typedef void (*JKRThreadSwitch_PostCallback)(OSThread* current, OSThread* next);
|
||||
|
||||
@@ -145,8 +154,8 @@ class JKRThreadSwitch {
|
||||
public:
|
||||
JKRThreadSwitch(JKRHeap*);
|
||||
virtual void draw(JKRThreadName_* param_1, JUTConsole* param_2);
|
||||
virtual void draw(JKRThreadName_* param_1);
|
||||
virtual ~JKRThreadSwitch();
|
||||
virtual void draw(JKRThreadName_* thread_name_list) { draw(thread_name_list, NULL); }
|
||||
virtual ~JKRThreadSwitch() {}
|
||||
|
||||
static JKRThreadSwitch* createManager(JKRHeap* heap);
|
||||
|
||||
@@ -176,9 +185,19 @@ private:
|
||||
/* 0x24 */ u32 field_0x24;
|
||||
};
|
||||
|
||||
struct JKRTask {
|
||||
class JKRTask : public JKRThread {
|
||||
public:
|
||||
virtual ~JKRTask();
|
||||
virtual void* run();
|
||||
|
||||
int check();
|
||||
|
||||
static JSUList<JKRTask> sTaskList;
|
||||
static u8 sEndMesgQueue[32];
|
||||
|
||||
/* 0x7C */ JSULink<JKRTask> mTaskLink;
|
||||
/* 0x8C */ u8 field_0x8c[0x94 - 0x8C];
|
||||
/* 0x94 */ OSMessageQueue* field_0x94;
|
||||
};
|
||||
|
||||
#endif /* JKRTHREAD_H */
|
||||
|
||||
@@ -6,6 +6,20 @@
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include <cstdarg>
|
||||
|
||||
class JUTConsole;
|
||||
|
||||
extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list);
|
||||
extern "C" void JUTSetReportConsole(JUTConsole*);
|
||||
extern "C" JUTConsole* JUTGetReportConsole();
|
||||
extern "C" void JUTSetWarningConsole(JUTConsole*);
|
||||
extern "C" JUTConsole* JUTGetWarningConsole();
|
||||
extern "C" void JUTWarningConsole_f_va(const char*, va_list);
|
||||
extern "C" void JUTReportConsole_f_va(const char*, va_list);
|
||||
extern "C" void JUTReportConsole_f(const char*, ...);
|
||||
extern "C" void JUTWarningConsole(const char* message);
|
||||
extern "C" void JUTWarningConsole_f(const char* message, ...);
|
||||
extern "C" void JUTReportConsole(const char* message);
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
*
|
||||
@@ -95,6 +109,7 @@ public:
|
||||
|
||||
void scrollToLastLine() { scroll(mMaxLines); }
|
||||
void scrollToFirstLine() { scroll(-mMaxLines); }
|
||||
void print_f_va(const char* fmt, va_list args) { JUTConsole_print_f_va_(this, fmt, args); }
|
||||
|
||||
/* 0x18 */ JGadget::TLinkListNode mListNode;
|
||||
/* 0x20 */ unsigned int field_0x20;
|
||||
@@ -154,16 +169,4 @@ private:
|
||||
/* 0x10 */ JUTConsole* mDirectConsole;
|
||||
}; // Size: 0x14
|
||||
|
||||
extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list);
|
||||
extern "C" void JUTSetReportConsole(JUTConsole*);
|
||||
extern "C" JUTConsole* JUTGetReportConsole();
|
||||
extern "C" void JUTSetWarningConsole(JUTConsole*);
|
||||
extern "C" JUTConsole* JUTGetWarningConsole();
|
||||
extern "C" void JUTWarningConsole_f_va(const char*, va_list);
|
||||
extern "C" void JUTReportConsole_f_va(const char*, va_list);
|
||||
extern "C" void JUTReportConsole_f(const char*, ...);
|
||||
extern "C" void JUTWarningConsole(const char* message);
|
||||
extern "C" void JUTWarningConsole_f(const char* message, ...);
|
||||
extern "C" void JUTReportConsole(const char* message);
|
||||
|
||||
#endif /* JUTCONSOLE_H */
|
||||
|
||||
Reference in New Issue
Block a user