work on daalink, fop actor, mDo machine, msg_scrn, + various (#201)

* work on fop actor / actor mng, daalink, d_a_obj_item

* d_a_title mostly decompiled

* daalink / d_event / JMessage / dmsg_out_font work

* msg_scrn_base / msg_scrn_boss

* some work on mDo machine, d_menu_save, d_tresure, and various

* remove asm

* progress
This commit is contained in:
TakaRikka
2022-06-29 13:19:09 -07:00
committed by GitHub
parent cd5b02450c
commit 046d178003
412 changed files with 12030 additions and 16833 deletions
+8 -1
View File
@@ -36,7 +36,7 @@ public:
/* 80300490 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding);
/* 803002E8 */ virtual void draw(f32, f32);
/* 80300278 */ virtual void setFont(JUTFont*);
/* 8021C7F4 */ virtual void getFont() const;
/* 8021C7F4 */ virtual JUTFont* getFont() const;
/* 80254408 */ virtual bool setBlack(JUtility::TColor);
/* 80186C84 */ virtual void setWhite(JUtility::TColor);
/* 8019230C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor);
@@ -75,8 +75,15 @@ public:
}
void setFontSize(TFontSize size) { setFontSize(size.mSizeX, size.mSizeY); }
void getFontSize(TFontSize& size) const {
size.mSizeX = field_0x11c;
size.mSizeY = field_0x120;
}
void setCharSpace(f32 space) { mCharSpacing = space; }
f32 getCharSpace() const { return mCharSpacing; }
void setLineSpace(f32 space) { mLineSpacing = space; }
f32 getLineSpace() const { return mLineSpacing; }
private:
/* 0x0100 */ JUTFont* mFont;
+1 -1
View File
@@ -37,7 +37,7 @@ public:
/* 803078AC */ virtual void draw(f32, f32);
/* 80307AF0 */ virtual void draw(f32, f32, f32, J2DTextBoxHBinding);
/* 80307D5C */ virtual void setFont(JUTFont*);
/* 80307DC0 */ virtual void getFont() const;
/* 80307DC0 */ virtual JUTFont* getFont() const;
/* 8030823C */ virtual void setBlack(JUtility::TColor);
/* 803082C4 */ virtual void setWhite(JUtility::TColor);
/* 8030834C */ virtual void setBlackWhite(JUtility::TColor, JUtility::TColor);
@@ -575,6 +575,7 @@ public:
f32 getRate() const { return mRate; }
f32 getFrame() const { return mFrame; }
s16 getEnd() const { return mEnd; }
u8 getAttribute() const { return mAttribute; }
void setAttribute(u8 attr) { mAttribute = attr; }
void setEnd(s16 end) { mEnd = end; }
@@ -585,10 +586,11 @@ public:
}
void setFrame(f32 frame) { mFrame = frame; }
void setLoop(s16 loop) { mLoop = loop; }
bool checkState(u8 state) const { return mState & state; }
private:
/* 0x04 */ u8 mAttribute;
/* 0x05 */ bool mState;
/* 0x05 */ u8 mState;
/* 0x06 */ s16 mStart;
/* 0x08 */ s16 mEnd;
/* 0x0A */ s16 mLoop;
@@ -60,6 +60,9 @@ public:
void setYounger(J3DJoint* pYounger) { mYounger = pYounger; }
void setCurrentMtxCalc(J3DMtxCalc* pMtxCalc) { mCurrentMtxCalc = pMtxCalc; }
J3DTransformInfo& getTransformInfo() { return mTransformInfo; }
Vec* getMax() { return &mMax; }
Vec* getMin() { return &mMin; }
void setCallBack(J3DJointCallBack callback) { mCallBack = callback; }
static J3DMtxCalc* mCurrentMtxCalc;
@@ -69,6 +69,7 @@ public:
Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); }
void setBaseScale(const Vec& scale) { mBaseScale = scale; }
void setUserArea(u32 area) { mUserArea = area; }
Vec* getBaseScale() { return &mBaseScale; }
// is there a better way to handle inlines with same name as non-inlines?
MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
@@ -43,6 +43,8 @@ public:
bool checkFlag(u32 flag) const { return !!(mFlags & flag); }
bool checkBumpFlag() const { return mbHasBumpArray; }
bool checkBBoardFlag() const { return mbHasBillboard == 1; }
void entryTexMtxAnimator(J3DAnmTextureSRTKey* anm) { mMaterialTable.entryTexMtxAnimator(anm); }
void entryTevRegAnimator(J3DAnmTevRegKey* anm) { mMaterialTable.entryTevRegAnimator(anm); }
int removeTexNoAnimator(J3DAnmTexPattern* anm) {
return mMaterialTable.removeTexNoAnimator(anm);
}
+8
View File
@@ -27,6 +27,14 @@ struct JFWSystem {
/* 80271D18 */ static void init();
static JUTConsole* getSystemConsole() { return systemConsole; }
static JKRExpHeap* getSystemHeap() { return systemHeap; }
static void setMaxStdHeap(s32 max) { CSetUpParam::maxStdHeaps = max; }
static void setSysHeapSize(u32 size) { CSetUpParam::sysHeapSize = size; }
static void setFifoBufSize(u32 size) { CSetUpParam::fifoBufSize = size; }
static void setAramAudioBufSize(u32 size) { CSetUpParam::aramAudioBufSize = size; }
static void setAramGraphBufSize(u32 size) { CSetUpParam::aramGraphBufSize = size; }
static void setRenderMode(GXRenderModeObj* p_modeObj) { CSetUpParam::renderMode = p_modeObj; }
static JKRExpHeap* rootHeap;
static JKRExpHeap* systemHeap;
@@ -42,6 +42,8 @@ public:
static JKRADCommand* callCommand_Async(JKRADCommand*);
static bool syncAram(JKRADCommand*, int);
static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; }
// TODO: fix type
static u8 sDvdAramAsyncList[12];
static u32 sSZSBufferSize;
+2
View File
@@ -29,6 +29,8 @@ public:
ALLOC_DIRECTION_BACKWARD = 2,
};
static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; }
static void* loadToMainRAM(char const*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection,
u32, JKRCompression*, u32*);
static void* loadToMainRAM(long, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32,
+3
View File
@@ -8,6 +8,8 @@
class JKRHeap;
typedef void (*JKRErrorHandler)(void*, u32, int);
extern bool data_804508B0;
class JKRHeap : public JKRDisposer {
public:
class TState {
@@ -134,6 +136,7 @@ public:
static JKRErrorHandler setErrorHandler(JKRErrorHandler errorHandler);
static void setDefaultDebugFill(bool status) { data_804508B0 = status; }
static void* getCodeStart(void) { return mCodeStart; }
static void* getCodeEnd(void) { return mCodeEnd; }
static void* getUserRamStart(void) { return mUserRamStart; }
+20 -4
View File
@@ -2,22 +2,38 @@
#define CONTROL_H
#include "dolphin/types.h"
#include "JSystem/JMessage/processor.h"
#include "JSystem/JMessage/resource.h"
namespace JMessage {
struct TProcessor;
struct TControl {
/* 802A7548 */ TControl();
/* 802A758C */ ~TControl();
/* 802A758C */ virtual ~TControl();
/* 802A75D4 */ void reset();
/* 802A7634 */ void update();
/* 802A76BC */ void render();
/* 802A77E8 */ void setMessageCode(u16, u16);
/* 802A78F4 */ void setMessageID(u32, u32, bool*);
/* 802A7A20 */ void setMessageCode_inSequence_(JMessage::TProcessor const*, u16, u16);
/* 0x04 */ TSequenceProcessor* pSequenceProcessor_;
/* 0x08 */ TRenderingProcessor* pRenderingProcessor_;
/* 0x0C */ u16 messageCode_;
/* 0x0E */ u16 field_0xe;
/* 0x10 */ TResource* pResourceCache_;
/* 0x14 */ void* pEntry_;
/* 0x18 */ u32 pMessageText_begin_;
/* 0x1C */ char* pszText_update_current_;
/* 0x20 */ u32 field_0x20;
/* 0x24 */ TProcessor::TStack_ oStack_renderingProcessor_;
};
}; // namespace JMessage
struct jmessage_tControl {};
struct jmessage_tControl : public JMessage::TControl {
/* 802299EC */ jmessage_tControl();
/* 80039B0C */ virtual ~jmessage_tControl();
};
#endif /* CONTROL_H */
+229 -38
View File
@@ -3,10 +3,36 @@
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
#include "JSystem/JUtility/JUTFont.h"
namespace JMessage {
struct TResource;
struct TResourceContainer;
struct TReference {
/* 802A7AF8 */ virtual ~TReference();
/* 802A7B40 */ virtual bool do_word(u32) const;
TResourceContainer* pcResource_;
};
struct TProcessor {
/* 802A7B48 */ ~TProcessor();
struct TStack_ {
/* 0x0 */ int upsz_; // size
/* 0x4 */ const char* stack[4];
}; // Size: 0x14
struct TProcess_ {
/* 0x0 */ void* pfnProcess_CharacterEnd;
struct {
/* 0x0 */ void* pfn;
/* 0x4 */ u32 pcBase;
/* 0x8 */ u32 pOffset;
/* 0xC */ u32 uRest;
}
/* 0x4 */ rData;
}; // Size: 0x14
/* 802A7B90 */ void reset();
/* 802A7BF8 */ void stack_pushCurrent(char const*);
/* 802A7C30 */ void stack_popCurrent();
@@ -16,17 +42,7 @@ struct TProcessor {
char const*, u32);
/* 802A7EDC */ void on_select_end();
/* 802A7F34 */ void on_select_separate();
/* 802A7FC0 */ void do_reset();
/* 802A7FC4 */ void do_begin(void const*, char const*);
/* 802A7FC8 */ void do_end();
/* 802A7FCC */ void do_character(int);
/* 802A7FD0 */ bool do_tag(u32, void const*, u32);
/* 802A7FD8 */ void do_select_begin(u32);
/* 802A7FDC */ void do_select_end();
/* 802A7FE0 */ void do_select_separate();
/* 802A7FE4 */ void on_tag_();
/* 802A8084 */ void do_resetStatus_(char const*);
/* 802A8088 */ bool do_setBegin_isReady_() const;
/* 802A8090 */ void do_tag_(u32, void const*, u32);
/* 802A81EC */ void process_character_();
/* 802A828C */ void process_onCharacterEnd_normal_(JMessage::TProcessor*);
@@ -35,18 +51,36 @@ struct TProcessor {
/* 802A8358 */ void process_onSelect_(JMessage::TProcessor*);
/* 802A8C24 */ void on_message(u32) const;
/* 802A8C44 */ void getMessageText_messageCode(u32) const;
};
struct TReference {
/* 802A7AF8 */ ~TReference();
/* 802A7B40 */ bool do_word(u32) const;
/* 802A7B48 */ virtual ~TProcessor();
/* 802A7FC0 */ virtual void do_reset();
/* 802A7FC4 */ virtual void do_begin(void const*, char const*);
/* 802A7FC8 */ virtual void do_end();
/* 802A7FCC */ virtual void do_character(int);
/* 802A7FD0 */ virtual bool do_tag(u32, void const*, u32);
/* 802A7FD8 */ virtual void do_select_begin(u32);
/* 802A7FDC */ virtual void do_select_end();
/* 802A7FE0 */ virtual void do_select_separate();
/* 802A8084 */ virtual void do_resetStatus_(char const*);
/* 802A8088 */ virtual bool do_setBegin_isReady_() const;
/* 0x04 */ TReference* pReference_;
/* 0x08 */ TResource* pResourceCache_;
/* 0x0C */ const char* pszCurrent_;
/* 0x10 */ TStack_ oStack_;
/* 0x24 */ TProcess_ oProcess_;
};
struct TControl;
struct TSequenceProcessor {
struct TSequenceProcessor : public TProcessor {
enum SeqStatus {
STATUS_NORMAL = 2,
STATUS_JUMP,
STATUS_BRANCH,
};
/* 802A8374 */ TSequenceProcessor(JMessage::TReference const*, JMessage::TControl*);
/* 802A83B8 */ ~TSequenceProcessor();
/* 802A8418 */ void process(char const*);
/* 802A85A4 */ void on_isReady();
/* 802A85D0 */ void on_jump_register(void const* (*)(JMessage::TSequenceProcessor const*), u32);
@@ -57,54 +91,211 @@ struct TSequenceProcessor {
/* 802A86A0 */ void on_branch_query(u32);
/* 802A86D4 */ void on_branch_queryResult();
/* 802A8700 */ void on_branch(void const*, char const*);
/* 802A8780 */ bool do_isReady();
/* 802A8788 */ bool do_jump_isReady();
/* 802A8790 */ void do_jump(void const*, char const*);
/* 802A8794 */ void do_branch_query(u32);
/* 802A8798 */ s32 do_branch_queryResult();
/* 802A87A0 */ void do_branch(void const*, char const*);
/* 802A87A4 */ void do_resetStatus_(char const*);
/* 802A87C0 */ void do_setBegin_isReady_() const;
/* 802A87D0 */ void do_begin_(void const*, char const*);
/* 802A87D4 */ void do_end_();
/* 802A87E0 */ void do_tag_(u32, void const*, u32);
/* 802A892C */ void process_setMessageIndex_reserved_(u16);
/* 802A8944 */ void process_setMessageCode_(JMessage::TSequenceProcessor const*, u16, u16);
/* 802A89B8 */ void process_onJump_limited_(JMessage::TSequenceProcessor const*);
/* 802A89EC */ void process_onJump_(JMessage::TSequenceProcessor const*);
/* 802A8A18 */ void process_onBranch_limited_(JMessage::TSequenceProcessor const*, u32);
/* 802A8A50 */ void process_onBranch_(JMessage::TSequenceProcessor const*, u32);
/* 802A83B8 */ virtual ~TSequenceProcessor();
/* 802A87A4 */ virtual void do_resetStatus_(char const*);
/* 802A87C0 */ virtual void do_setBegin_isReady_() const;
/* 802A87D0 */ virtual void do_begin_(void const*, char const*);
/* 802A87D4 */ virtual void do_end_();
/* 802A87E0 */ virtual void do_tag_(u32, void const*, u32);
/* 802A8780 */ virtual bool do_isReady();
/* 802A8788 */ virtual bool do_jump_isReady();
/* 802A8790 */ virtual void do_jump(void const*, char const*);
/* 802A8794 */ virtual void do_branch_query(u32);
/* 802A8798 */ virtual s32 do_branch_queryResult();
/* 802A87A0 */ virtual void do_branch(void const*, char const*);
/* 0x38 */ TControl* pControl_;
/* 0x3C */ SeqStatus eStatus_;
/* 0x40 */ TProcess_ oProcess2_;
};
struct TRenderingProcessor {
struct TRenderingProcessor : public TProcessor {
/* 802A8A84 */ TRenderingProcessor(JMessage::TReference const*);
/* 802A8AC0 */ ~TRenderingProcessor();
/* 802A8B20 */ void process(char const*);
/* 802A8BA4 */ void do_begin_(void const*, char const*);
/* 802A8BA8 */ void do_end_();
/* 802A8BAC */ void do_tag_(u32, void const*, u32);
/* 802A8AC0 */ virtual ~TRenderingProcessor();
/* 802A8BA4 */ virtual void do_begin_(void const*, char const*);
/* 802A8BA8 */ virtual void do_end_();
/* 802A8BAC */ virtual void do_tag_(u32, void const*, u32);
};
}; // namespace JMessage
struct jmessage_tReference {
struct STControl;
struct dMsgObject_c;
struct jmessage_tReference : public JMessage::TReference {
/* 80228B04 */ jmessage_tReference();
/* 80228D28 */ void calcDistance();
/* 80228DE0 */ void getLineMax();
/* 80228E6C */ void isKanban();
/* 80228EA0 */ void isPlaceName();
/* 80228ED4 */ void isBossName();
/* 80228F08 */ void isSaveSeq();
/* 80228F3C */ void isBook();
/* 80228F70 */ void isStaffRoll();
/* 80228FA4 */ void isHowl();
/* 80228FD8 */ void isMidona();
/* 8022900C */ void resetReference();
/* 80229034 */ void pageSend();
/* 80229168 */ void selectMessage();
/* 802294A8 */ void inputNumber();
/* 80229730 */ void getWord(int);
/* 80229744 */ void resetWord();
/* 80229768 */ void setCharactor(u16);
/* 80229788 */ void addCharactor(u16);
/* 802297B0 */ void resetCharactor();
/* 802297E4 */ void shiftCharCountBuffer();
/* 80229810 */ void resetCharCountBuffer();
/* 80229848 */ void allsetCharCountBuffer();
/* 8022986C */ void isCharSend();
/* 802298DC */ void isLightSend();
/* 8022994C */ void isLightEnd();
/* 80238C78 */ void setActorPos(cXyz);
};
/* 802299AC */ void decideOutFontRupeeColor(int);
/* 80232A20 */ void getActorPos();
/* 80238C78 */ void setActorPos(cXyz pos) {
mActorPos = pos;
}
/* 80228CB4 */ virtual ~jmessage_tReference();
private:
/* 0x0008 */ STControl* mpStick;
/* 0x000C */ u16 field_0xc[0x200];
/* 0x040C */ s16 field_0x40c;
/* 0x040E */ s16 field_0x40e;
/* 0x0410 */ s16 mCountBackUp;
/* 0x0414 */ cXyz mActorPos;
/* 0x0420 */ f32 mFontSizeX;
/* 0x0424 */ f32 mFontSizeY;
/* 0x0428 */ f32 mRubySize;
/* 0x042C */ f32 mTBoxWidth;
/* 0x0430 */ f32 mTBoxHeight;
/* 0x0434 */ f32 mLineSpace;
/* 0x0438 */ f32 mCharSpace;
/* 0x043C */ f32 mRubyCharSpace;
/* 0x0440 */ f32 mSelFontSize;
/* 0x0444 */ f32 mSelRubySize;
/* 0x0448 */ f32 mSelTBoxWidth;
/* 0x044C */ f32 mSelCharSpace;
/* 0x0450 */ f32 mSelRubyCharSpace;
/* 0x0454 */ f32 mDistanceScale;
/* 0x0458 */ f32 mAddCharAllAlphaRate;
/* 0x045C */ f32 mCharAllAlphaRate;
/* 0x0460 */ f32 mAddCharAlpha;
/* 0x0464 */ f32 mCharAlpha;
/* 0x0468 */ f32 mStrLength[40];
/* 0x0508 */ f32 mSpaceLength[40];
/* 0x05A8 */ f32 mSelLength[3];
/* 0x05B4 */ u32 mDemoFrame;
/* 0x05B8 */ u32 mRevoMessageID;
/* 0x05BC */ u16* mpStatus;
/* 0x05C0 */ dMsgObject_c* mpObjectPtr;
/* 0x05C4 */ char* mpSelMsgPtr;
/* 0x05C8 */ JUTFont* mpFont;
/* 0x05CC */ s16 mStartLineCount;
/* 0x05CE */ s16 mEndLineCount;
/* 0x05D0 */ u16 mLineCount;
/* 0x05D2 */ s16 field_0x5d2;
/* 0x05D4 */ s16 mPageEndCount;
/* 0x05D6 */ s16 mSendTimer;
/* 0x05D8 */ s16 mCharCnt;
/* 0x05DA */ s16 mPageNum;
/* 0x05DC */ u8 mNowLightCount;
/* 0x05DD */ u8 mDrawLightCount;
/* 0x05DE */ u16 mMsgID;
/* 0x05E0 */ u16 mLineScale[40];
/* 0x0630 */ u16 mTopTagScale;
/* 0x0632 */ u16 mNowTagScale;
/* 0x0634 */ char mWord[10][100];
/* 0x0A1C */ char mTextPtr[0x200];
/* 0x0C1C */ char mTextSPtr[0x200];
/* 0x0E1C */ char mRuby[0x200];
/* 0x101C */ u8 mSelText[3][50];
/* 0x10B2 */ u8 mSelRuby[3][80];
/* 0x11A2 */ s8 mPageLine[40];
/* 0x11CA */ s8 mPageLineMax[40];
/* 0x11F2 */ u8 mPageType[40];
/* 0x121A */ u8 mLineArrange[40];
/* 0x1242 */ u8 mSelectNum;
/* 0x1243 */ u8 mSelectType;
/* 0x1244 */ u8 mSelectPos;
/* 0x1245 */ u8 mFukiPosType;
/* 0x1246 */ u8 mFukiKind;
/* 0x1247 */ u8 mForm;
/* 0x1248 */ u8 field_0x1248;
/* 0x1249 */ u8 mNowColorType;
/* 0x124A */ u8 mTopColorType;
/* 0x124B */ bool mButtonTagStopFlag;
/* 0x124C */ u8 mSendFlag;
/* 0x124D */ u8 mStopFlag;
/* 0x124E */ u8 mSelectRubyFlag;
/* 0x124F */ u8 mInputFigure;
/* 0x1250 */ u8 mOutFontRupeeColor;
/* 0x1251 */ s8 mNowWordCount;
/* 0x1252 */ s8 mTopWordCount;
/* 0x1253 */ u8 mCharCountBuffer[31];
/* 0x1272 */ bool mLightBatchFlag;
/* 0x1273 */ bool mBatchFlag;
/* 0x1274 */ bool mSelectSetCancelFlag;
/* 0x1275 */ bool mBombNameUseFlag;
/* 0x1276 */ bool mBatchColorFlag;
}; // Size: 0x1278
struct jmessage_tControl;
struct jmessage_tSequenceProcessor {
struct jmessage_tSequenceProcessor : public JMessage::TSequenceProcessor {
/* 8022B558 */ jmessage_tSequenceProcessor(jmessage_tReference const*, jmessage_tControl*);
/* 8022C904 */ void do_name1();
/* 8022C908 */ void do_space(u32);
/* 8022CA24 */ void do_rubyset(void const*, u32);
/* 8022CAAC */ void push_word();
/* 8022CB10 */ void messageSePlay(u8, u8, cXyz*);
/* 8022CBE8 */ void calcStringLength();
/* 8023299C */ virtual ~jmessage_tSequenceProcessor();
/* 8022B654 */ virtual void do_reset();
/* 8022B658 */ virtual void do_begin(void const*, char const*);
/* 8022BA3C */ virtual void do_end();
/* 8022BFE0 */ virtual void do_character(int);
/* 8022C1A0 */ virtual void do_tag(u32, void const*, u32);
/* 8022BB7C */ virtual void do_isReady();
/* 8022C8FC */ virtual bool do_jump_isReady();
/* 8022CBE4 */ virtual void do_jump(void const*, char const*);
};
struct jmessage_tRenderingProcessor {
struct jmessage_tRenderingProcessor : public JMessage::TRenderingProcessor {
/* 8022CCB0 */ jmessage_tRenderingProcessor(jmessage_tReference const*);
/* 8022E12C */ void resetRendering();
/* 8022E17C */ void do_widthcenter();
/* 8022E260 */ void do_selwidthcenter(int);
/* 8022E318 */ void do_heightcenter();
/* 8022E7CC */ void do_color(u8);
/* 8022E860 */ void do_scale(f32);
/* 8022E960 */ void do_linedown(s16);
/* 8022E9C0 */ void do_transY(s16, bool);
/* 8022EAE4 */ void do_outfont(u8, u32);
/* 8022ED10 */ void do_arrow2();
/* 8022EECC */ void getLineLength(int);
/* 8022EF00 */ void do_strcat(char*, bool, bool, bool);
/* 8022F148 */ void do_rubyset(void const*, u32);
/* 8022F384 */ void do_rubystrcat(char*, char*, f32, f32);
/* 8022F53C */ void do_name1();
/* 8022F540 */ void do_numset(s16);
/* 8022F734 */ void push_word();
/* 8022F784 */ void getCharInfo(f32, f32, f32, f32, f32);
/* 8023293C */ virtual ~jmessage_tRenderingProcessor();
/* 8022CDC8 */ virtual void do_reset();
/* 8022CDCC */ virtual void do_begin(void const*, char const*);
/* 8022CFD8 */ virtual void do_end();
/* 8022D0A0 */ virtual void do_character(int);
/* 8022D74C */ virtual void do_tag(u32, void const*, u32);
};
#endif /* PROCESSOR_H */
+3 -1
View File
@@ -2,9 +2,11 @@
#define RESOURCE_H
#include "dolphin/types.h"
#include "JSystem/JGadget/linklist.h"
#include "JSystem/JStudio/JStudio/fvb-data.h"
namespace JMessage {
struct TResource {
struct TResource : public JGadget::TLinkListNode {
/* 802A8CDC */ void toMessageIndex_messageID(u32, u32, bool*) const;
};
+6 -4
View File
@@ -194,10 +194,11 @@ struct JPAEmitterWorkData {
class JPAEmitterCallBack {
public:
/* 80050368 */ void execute(JPABaseEmitter*);
/* 8005036C */ void draw(JPABaseEmitter*);
/* 80050370 */ void drawAfter(JPABaseEmitter*);
/* 80050374 */ void executeAfter(JPABaseEmitter*);
/* 80050368 */ virtual void execute(JPABaseEmitter*);
/* 80050374 */ virtual void executeAfter(JPABaseEmitter*);
/* 8005036C */ virtual void draw(JPABaseEmitter*);
/* 80050370 */ virtual void drawAfter(JPABaseEmitter*);
/* 8027E6A4 */ ~JPAEmitterCallBack();
};
@@ -230,6 +231,7 @@ public:
u8 getResourceManagerID() const { return mResMgrID; }
u8 getGroupID() const { return mGroupID; }
u8 getDrawTimes() const { return mDrawTimes; }
void setRate(f32 rate) { mRate = rate; }
f32 get_r_f() { return mRndm.get_rndm_f(); }
f32 get_r_zp() { return mRndm.get_rndm_zp(); }
+73
View File
@@ -2,5 +2,78 @@
#define JUTCACHEFONT_H
#include "dolphin/types.h"
#include "JSystem/JUtility/JUTResFont.h"
#include "JSystem/JKernel/JKRAram.h"
class JUTCacheFont : public JUTResFont {
public:
struct TGlyphCacheInfo {
/* 0x0 */ TGlyphCacheInfo* field_0x0;
/* 0x4 */ TGlyphCacheInfo** field_0x4;
};
struct TCachePage {
/* 0x00 */ u8 field_0x0[8];
/* 0x08 */ s16 field_0x8;
/* 0x0A */ u16 field_0xa;
/* 0x0C */ u8 field_0xc[4];
/* 0x10 */ u8* field_0x10;
/* 0x14 */ u16 field_0x14;
/* 0x16 */ u16 field_0x16;
/* 0x18 */ u16 field_0x18;
/* 0x1A */ u16 field_0x1a;
/* 0x1C */ u16 field_0x1c;
/* 0x1E */ u16 field_0x1e;
}; // Size: 0x20
enum EPagingType {
PAGE_TYPE_0,
PAGE_TYPE_1,
};
/* 802DD188 */ JUTCacheFont(ResFONT const*, u32, JKRHeap*);
/* 802DD29C */ void deleteMemBlocks_CacheFont();
/* 802DD320 */ void initialize_state();
/* 802DD35C */ int getMemorySize(ResFONT const*, u16*, u32*, u16*, u32*, u16*, u32*, u32*);
/* 802DD4EC */ int initiate(ResFONT const*, void*, u32, JKRHeap*);
/* 802DD54C */ bool internal_initiate(ResFONT const*, void*, u32, JKRHeap*);
/* 802DD650 */ bool allocArea(void*, u32, JKRHeap*);
/* 802DD804 */ bool allocArray(JKRHeap*);
/* 802DDB0C */ void determineBlankPage();
/* 802DDBBC */ void getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo*, JUTCacheFont::TCachePage*,
int*, int*);
/* 802DDD98 */ void loadCache_char_subroutine(int*, bool);
/* 802DDEE0 */ void invalidiateAllCache();
/* 802DDF68 */ void unlink(JUTCacheFont::TGlyphCacheInfo*);
/* 802DDFAC */ void prepend(JUTCacheFont::TGlyphCacheInfo*);
/* 802DD208 */ virtual ~JUTCacheFont();
/* 802DDCE4 */ virtual void loadImage(int, _GXTexMapID);
/* 802DD8EC */ virtual void setBlock();
void setPagingType(EPagingType type) { mPagingType = type; }
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; }
private:
/* 0x70 */ u32 mTotalWidSize;
/* 0x74 */ u32 mTotalGlySize;
/* 0x78 */ u32 mTotalMapSize;
/* 0x7C */ void* field_0x7c;
/* 0x80 */ void* field_0x80;
/* 0x84 */ void* field_0x84;
/* 0x88 */ u32 mMaxSheetSize;
/* 0x8C */ EPagingType mPagingType;
/* 0x90 */ void** mCacheBuffer;
/* 0x94 */ int field_0x94;
/* 0x98 */ u32 mCachePage;
/* 0x9C */ TGlyphCacheInfo* field_0x9c;
/* 0xA0 */ TGlyphCacheInfo* field_0xa0;
/* 0xA4 */ void* field_0xa4;
/* 0xA8 */ u32 field_0xa8;
/* 0xAC */ JKRAramBlock* field_0xac;
/* 0xB0 */ u8 field_0xb0;
/* 0xB4 */ int field_0xb4;
}; // Size: 0xB8
#endif /* JUTCACHEFONT_H */
+20 -7
View File
@@ -11,7 +11,9 @@
class JUTConsole : public JKRDisposer {
public:
enum EConsoleType {
UNK_TYPE2 = 2,
CONSOLE_TYPE_0 = 0,
CONSOLE_TYPE_1 = 1,
CONSOLE_TYPE_2 = 2,
};
enum OutputFlag {
@@ -47,8 +49,8 @@ public:
}
void setHeight(u32 height) {
mHeight = height;
if (mHeight > field_0x24) {
mHeight = field_0x24;
if (mHeight > mMaxLines) {
mHeight = mMaxLines;
}
}
@@ -72,18 +74,27 @@ public:
if (diff >= 0) {
return diff;
}
return diff += field_0x24;
return diff += mMaxLines;
}
void scrollToLastLine() { scroll(field_0x24); }
void scrollToFirstLine() { scroll(-field_0x24); }
int nextIndex(int param_0) const {
int index = param_0 + 1;
if (mMaxLines <= index) {
index = 0;
}
return index;
}
void scrollToLastLine() { scroll(mMaxLines); }
void scrollToFirstLine() { scroll(-mMaxLines); }
private:
/* 0x18 */ JGadget::TLinkListNode mListNode;
private:
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 field_0x24;
/* 0x24 */ u32 mMaxLines;
/* 0x28 */ u8* mBuf;
/* 0x2C */ bool field_0x2c;
/* 0x30 */ int field_0x30;
@@ -116,6 +127,8 @@ public:
/* 802E8450 */ void drawDirect(bool) const;
/* 802E84C4 */ void setDirectConsole(JUTConsole*);
JUTConsole* getDirectConsole() const { return mDirectConsole; }
static JUTConsoleManager* getManager() { return sManager; }
static JUTConsoleManager* sManager;
+1
View File
@@ -88,6 +88,7 @@ public:
/* 802E3980 */ static void waitTime(s32);
static JUTException* getManager() { return sErrorManager; }
static JUTConsole* getConsole() { return sConsole; }
JUTExternalFB* getFrameMemory() const { return mFrameMemory; }
+1 -1
View File
@@ -24,7 +24,7 @@ public:
s32 getStatus() const { return mStatus; }
void setColor(JUtility::TColor color) { mColor.set(color); }
private:
//private:
/* 0x04 */ s32 mStatus;
/* 0x08 */ u16 field_0x8;
/* 0x0A */ u16 field_0xa;
+20 -6
View File
@@ -74,7 +74,7 @@ public:
/* 0x24 */ virtual s32 getHeight() const = 0;
/* 0x28 */ virtual s32 getWidth() const = 0;
/* 0x2C */ virtual void getWidthEntry(int i_no, TWidth* width) const;
/* 0x30 */ virtual u16 getCellWidth() const;
/* 0x30 */ virtual int getCellWidth() const;
/* 0x34 */ virtual u16 getCellHeight() const;
/* 0x38 */ virtual u16 getFontType() const = 0;
/* 0x3C */ virtual ResFONT* getResFont() const = 0;
@@ -87,16 +87,30 @@ public:
void initialize_state();
void setCharColor(JUtility::TColor col1);
void setGradColor(JUtility::TColor col1, JUtility::TColor col2);
f32 drawString_size_scale(f32 a1, f32 a2, f32 a3, f32 a4, const char* a5, u32 usz, bool a7);
f32 drawString_size_scale(f32 posX, f32 posY, f32 width, f32 height, const char* str, u32 usz,
bool visible);
void drawString(int param_0, int param_1, const char* str, bool param_3) {
drawString_size(param_0, param_1, str, strlen(str), param_3);
void drawString(int posX, int posY, const char* str, bool visible) {
drawString_size(posX, posY, str, strlen(str), visible);
}
void drawString_size(int param_0, int param_1, const char* str, u32 len, bool param_4) {
drawString_size_scale(param_0, param_1, getWidth(), getHeight(), str, len, param_4);
void drawString_size(int posX, int posY, const char* str, u32 len, bool visible) {
drawString_size_scale(posX, posY, getWidth(), getHeight(), str, len, visible);
}
void drawString_scale(f32 posX, f32 posY, f32 width, f32 height, const char* str,
bool visible) {
drawString_size_scale(posX, posY, width, height, str, strlen(str), visible);
}
int getWidth(int i_no) const {
TWidth width;
getWidthEntry(i_no, &width);
return width.field_0x1;
}
bool isValid() const { return mValid; }
/* 0x04 */ bool mValid;
/* 0x05 */ bool mFixed;
/* 0x08 */ int mFixedWidth;
+1 -1
View File
@@ -17,7 +17,7 @@ public:
/* 802DE01C */ virtual s32 getHeight() const;
/* 802DDFF8 */ virtual s32 getWidth() const;
/* 802DFC64 */ virtual void getWidthEntry(int, JUTFont::TWidth*) const;
/* 802DFD0C */ virtual u16 getCellWidth() const;
/* 802DFD0C */ virtual int getCellWidth() const;
/* 802DFD58 */ virtual u16 getCellHeight() const;
/* 802DDFE0 */ virtual u16 getFontType() const;
/* 802DDFD8 */ virtual ResFONT* getResFont() const;
+1
View File
@@ -9,6 +9,7 @@ struct TColor : public GXColor {
TColor(u8 r, u8 g, u8 b, u8 a) { set(r, g, b, a); }
TColor() { set(0xffffffff); }
TColor(u32 u32Color) { set(u32Color); }
TColor(GXColor color) { set(color); }
// TColor(const TColor& other) { set(other.toUInt32()); }
TColor& operator=(const TColor& other) {