cleanup/doc JMessage / d_msg_class (#2484)

* jmessage cleanup pass

* more JMessage cleanup

* d_msg_class cleanup
This commit is contained in:
TakaRikka
2025-06-13 05:33:33 -07:00
committed by GitHub
parent 7f6be99616
commit bf8a906790
24 changed files with 3660 additions and 3302 deletions
+21 -13
View File
@@ -5,6 +5,9 @@
#include "__va_arg.h"
class JUTFont;
class J2DPrint;
extern "C" f32 J2DPrint_print_alpha_va(J2DPrint*, u8, const char*, va_list);
/**
* @ingroup jsystem-j2d
@@ -17,12 +20,15 @@ public:
/* 0x4 */ f32 field_0x4;
};
/* 802F4394 */ J2DPrint(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor,
JUtility::TColor, JUtility::TColor);
J2DPrint(JUTFont*, JUtility::TColor, JUtility::TColor);
void initiate();
/* 802F4394 */ J2DPrint(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, JUtility::TColor, JUtility::TColor);
/* 802F4658 */ static u8* setBuffer(size_t);
/* 802F46C4 */ void setFontSize();
/* 802F475C */ void locate(f32, f32);
/* 802F4778 */ void print(f32, f32, u8, char const*, ...);
/* 802F4778 */ f32 print(f32, f32, u8, char const*, ...);
/* 802F4828 */ void printReturn(char const*, f32, f32, J2DTextBoxHBinding, J2DTextBoxVBinding,
f32, f32, u8);
/* 802F4B4C */ f32 parse(u8 const*, int, int, u16*, J2DPrint::TSize&, u8, bool);
@@ -34,6 +40,10 @@ public:
/* 802F4420 */ virtual ~J2DPrint();
f32 print_va(u8 alpha, const char* fmt, va_list args) {
return J2DPrint_print_alpha_va(this, alpha, fmt, args);
}
void setFontSize(f32 sizeX, f32 sizeY) {
f32 x;
if (sizeX > 0.0f) {
@@ -52,7 +62,7 @@ public:
mFontSizeY = y;
}
static const u8* mStrBuff;
static char* mStrBuff;
static size_t mStrBuffSize;
private:
@@ -64,27 +74,25 @@ private:
/* 0x0C */ JUtility::TColor field_0xc;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ f32 field_0x1c;
/* 0x18 */ f32 mScaleX;
/* 0x1C */ f32 mScaleY;
/* 0x20 */ s16 field_0x20;
/* 0x22 */ bool field_0x22;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
/* 0x2C */ f32 mCursorH;
/* 0x30 */ f32 mCursorV;
/* 0x34 */ f32 field_0x34;
/* 0x38 */ JUtility::TColor field_0x38;
/* 0x3C */ JUtility::TColor field_0x3c;
/* 0x38 */ JUtility::TColor mBlackColor;
/* 0x3C */ JUtility::TColor mWhiteColor;
/* 0x40 */ JUtility::TColor mCharColor;
/* 0x44 */ JUtility::TColor mGradColor;
/* 0x48 */ f32 field_0x48;
/* 0x4C */ f32 field_0x4c;
/* 0x48 */ f32 mCharSpacing;
/* 0x4C */ f32 mLineSpacing;
/* 0x50 */ f32 mFontSizeX;
/* 0x54 */ f32 mFontSizeY;
/* 0x58 */ s16 field_0x58;
/* 0x5A */ bool field_0x5a;
}; // Size: 0x5C
f32 J2DPrint_print_alpha_va(J2DPrint*, u8, const char*, va_list);
#endif /* J2DPRINT_H */
+27 -3
View File
@@ -18,9 +18,9 @@ public:
JGadget_outMessage& operator<<(int param_1) { return *this << (s32)param_1; }
JGadget_outMessage& operator<<(u16);
JGadget_outMessage& operator<<(unsigned int);
JGadget_outMessage& operator<<(u8);
JGadget_outMessage& operator<<(u8 param_1) { return *this << (char)param_1; }
JGadget_outMessage& operator<<(const char* str);
JGadget_outMessage& operator<<(s8);
JGadget_outMessage& operator<<(char);
JGadget_outMessage& operator<<(s32);
JGadget_outMessage& operator<<(u32);
JGadget_outMessage& operator<<(const void*);
@@ -33,13 +33,37 @@ private:
int mLine;
};
#define JGADGET_ASSERTWARN(cond) ((cond) || (false))
#ifdef DEBUG
// these macros are probably wrong, needs work
#define JGADGET_ASSERTWARN(line, COND) \
if (!(COND)) { \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << #COND; \
}
#define JGADGET_WARNMSG(line, msg) \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << msg;
#define JGADGET_WARNMSG1(line, msg, arg) \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << msg << (arg);
#define JGADGET_WARNMSG4(line, msg, arg1, arg2, arg3, arg4) \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << msg << (arg1) << (arg2) << (arg3) << (arg4);
#define JGADGET_EXITWARN(cond) \
if (!(cond)) { \
false; \
return false; \
}
#else
#define JGADGET_ASSERTWARN(line, COND) (void)0
#define JGADGET_WARNMSG(line, msg) (void)0
#define JGADGET_WARNMSG1(line, msg, arg) (void)0
#define JGADGET_WARNMSG4(line, msg, arg1, arg2, arg3, arg4) (void)0
#endif
}
#endif
+6 -3
View File
@@ -2,6 +2,7 @@
#define LINKLIST_H
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JGadget/define.h"
#include <iterator.h>
namespace JGadget {
@@ -75,8 +76,8 @@ struct TNodeLinkList {
const_iterator begin() const { return const_iterator(ocObject_.getNext()); }
iterator end() { return iterator(&ocObject_); }
const_iterator end() const { return const_iterator((TLinkListNode*)(&ocObject_)); }
u32 size() { return count; }
bool empty() { return size() == 0; }
u32 size() const { return count; }
bool empty() const { return size() == 0; }
iterator pop_front() { return erase(begin()); }
iterator erase(JGadget::TNodeLinkList::iterator, JGadget::TNodeLinkList::iterator);
@@ -248,7 +249,9 @@ struct TLinkList_factory : public TLinkList<T, I> {
};
template <typename T, int I>
TLinkList_factory<T, I>::~TLinkList_factory() {}
TLinkList_factory<T, I>::~TLinkList_factory() {
JGADGET_ASSERTWARN(934, empty());
}
template <typename T>
struct TEnumerator {
+26 -28
View File
@@ -16,30 +16,36 @@ struct TControl {
/* 802A75D4 */ void reset();
/* 802A7634 */ int update();
/* 802A76BC */ void render();
/* 802A77E8 */ int setMessageCode(u16, u16);
/* 802A78F4 */ int setMessageID(u32, u32, bool*);
/* 802A7A20 */ bool setMessageCode_inSequence_(JMessage::TProcessor const*, u16, u16);
/* 802A77E8 */ int setMessageCode(u16 u16GroupID, u16 u16Index);
/* 802A78F4 */ int setMessageID(u32 uMsgID, u32 param_1, bool* pbValid);
/* 802A7A20 */ bool setMessageCode_inSequence_(const TProcessor* pProcessor, u16 u16GroupID, u16 u16Index);
bool isReady_update_() const { return pMessageText_begin_ != 0 && pSequenceProcessor_ != NULL; }
bool isReady_render_() const { return field_0x20 != 0 && pRenderingProcessor_ != NULL; }
bool isReady_render_() const { return pMessageText_current_ != 0 && pRenderingProcessor_ != NULL; }
TProcessor* getProcessor() const {
return pSequenceProcessor_ != NULL ? (TProcessor*)pSequenceProcessor_ :
(TProcessor*)pRenderingProcessor_;
if (pSequenceProcessor_ != NULL) {
return (TProcessor*)pSequenceProcessor_;
} else {
return (TProcessor*)pRenderingProcessor_;
}
}
int setMessageCode(u32 code) {
return setMessageCode(code >> 16, code);
int setMessageCode(u32 uCode) {
return setMessageCode(uCode >> 16, uCode);
}
int setMessageCode_inReset_(TProcessor* pProcessor, u16 param_1, u16 param_2) {
if (!setMessageCode_inSequence_(pProcessor, param_1, param_2)) {
int setMessageCode_inReset_(const TProcessor* pProcessor, u16 u16GroupID, u16 u16Index) {
JUT_ASSERT(138, pEntry_==0);
JUT_ASSERT(139, pszText_update_current_==0);
JUT_ASSERT(140, oStack_renderingProcessor_.empty());
if (!setMessageCode_inSequence_(pProcessor, u16GroupID, u16Index)) {
return 0;
}
if (isReady_update_()) {
pSequenceProcessor_->setBegin_messageEntryText(pResourceCache_, pEntry_,
pMessageText_begin_);
pSequenceProcessor_->setBegin_messageEntryText(pResourceCache_, pEntry_, pMessageText_begin_);
}
return 1;
@@ -47,8 +53,10 @@ struct TControl {
const char* getMessageText_begin() const { return pMessageText_begin_; }
void* getMessageEntry() const { return pEntry_; }
void setSequenceProcessor(TSequenceProcessor* processor) { pSequenceProcessor_ = processor; }
void setRenderingProcessor(TRenderingProcessor* processor) { pRenderingProcessor_ = processor; }
u32 getMessageCode() const { return (uMessageGroupID_ << 16) | uMessageID_; }
void setSequenceProcessor(TSequenceProcessor* pProcessor) { pSequenceProcessor_ = pProcessor; }
void setRenderingProcessor(TRenderingProcessor* pProcessor) { pRenderingProcessor_ = pProcessor; }
void resetResourceCache() {
if (pSequenceProcessor_ != NULL) {
pSequenceProcessor_->resetResourceCache();
@@ -63,32 +71,22 @@ struct TControl {
void render_synchronize() {
if (isReady_render_()) {
field_0x20 = pszText_update_current_;
pMessageText_current_ = pszText_update_current_;
oStack_renderingProcessor_ = pRenderingProcessor_->oStack_;
}
}
/* 0x04 */ TSequenceProcessor* pSequenceProcessor_;
/* 0x08 */ TRenderingProcessor* pRenderingProcessor_;
/* 0x0C */ u16 messageCode_;
/* 0x0E */ u16 field_0xe;
/* 0x0C */ u16 uMessageGroupID_;
/* 0x0E */ u16 uMessageID_;
/* 0x10 */ const TResource* pResourceCache_;
/* 0x14 */ void* pEntry_;
/* 0x18 */ const char* pMessageText_begin_;
/* 0x1C */ const char* pszText_update_current_;
/* 0x20 */ const char* field_0x20;
/* 0x20 */ const char* pMessageText_current_;
/* 0x24 */ TProcessor::TStack_ oStack_renderingProcessor_;
};
}; // namespace JMessage
/**
* @ingroup jsystem-jmessage
*
*/
struct jmessage_tControl : public JMessage::TControl {
/* 802299EC */ jmessage_tControl();
/* 80039B0C */ virtual ~jmessage_tControl();
};
#endif /* JMESSAGE_CONTROL_H */
+32 -14
View File
@@ -10,8 +10,9 @@ namespace JMessage {
*
*/
struct data {
// TParse_THeader handles parsing the BMG file header data
struct TParse_THeader : public JGadget::binary::TParseData_aligned<4> {
TParse_THeader(const void* data) : TParseData_aligned(data) {}
TParse_THeader(const void* pData) : TParseData_aligned(pData) {}
const void* getContent() const { return (char*)getRaw() + 0x20; }
char* get() const { return (char*)getRaw(); }
@@ -22,8 +23,9 @@ struct data {
u8 get_encoding() const { return *(u8*)(get() + 0x10); }
};
// TParse_TBlock handles parsing the generic section header data
struct TParse_TBlock : public JGadget::binary::TParseData_aligned<4> {
TParse_TBlock(const void* data) : TParseData_aligned(data) {}
TParse_TBlock(const void* pData) : TParseData_aligned(pData) {}
const char* get() const { return (char*)getRaw(); }
u32 get_size() const { return *(u32*)(get() + 0x4); }
@@ -31,53 +33,69 @@ struct data {
u32 get_type() const { return *(u32*)(get() + 0x0); }
};
// TParse_TBlock_info handles parsing INF1 section data
struct TParse_TBlock_info : public TParse_TBlock {
TParse_TBlock_info(const void* data) : TParse_TBlock(data) {}
TParse_TBlock_info(const void* pData) : TParse_TBlock(pData) {}
char* get() const { return (char*)getRaw(); }
char* getContent() const { return (char*)getRaw() + 0x10; }
u16 get_messageEntrySize() const { return *(u16*)(get() + 0xA); }
u32 get_messageEntrySize() const { return *(u16*)(get() + 0xA); }
u16 get_messageEntryNumber() const { return *(u16*)(get() + 0x8); }
u32 get_messageEntryNumber() const { return *(u16*)(get() + 0x8); }
u16 get_groupID() const { return *(u16*)(get() + 0xC); }
};
// TParse_TBlock_messageID handles parsing MID1 section data
struct TParse_TBlock_messageID : public TParse_TBlock {
TParse_TBlock_messageID(const void* data) : TParse_TBlock(data) {}
TParse_TBlock_messageID(const void* pData) : TParse_TBlock(pData) {}
char* get() const { return (char*)getRaw(); }
u8 get_formSupplement() const { return *(u8*)(get() + 0xB); }
int get_number() const { return *(u16*)(get() + 0x8); }
u32* getContent() const { return (u32*)((u32)getRaw() + 0x10); }
u8 get_form() const { return *(u8*)(get() + 0xA) & 0xF; }
u32 get_form() const { return *(u8*)(get() + 0xA) & 0xF; }
bool get_isOrdered() const { return *(u8*)(get() + 0xA) & 0xF0; }
};
struct TParse_TBlock_color : public TParse_TBlock {
TParse_TBlock_color(const void* data) : TParse_TBlock(data) {}
TParse_TBlock_color(const void* pData) : TParse_TBlock(pData) {}
};
// TParse_TBlock_messageText handles parsing DAT1 section data
struct TParse_TBlock_messageText : public TParse_TBlock {
TParse_TBlock_messageText(const void* data) : TParse_TBlock(data) {}
TParse_TBlock_messageText(const void* pData) : TParse_TBlock(pData) {}
char* getContent() const { return (char*)getRaw() + 0x8; }
};
// TParse_TBlock_stringAttribute handles parsing STR1 section data
struct TParse_TBlock_stringAttribute : public TParse_TBlock {
TParse_TBlock_stringAttribute(const void* data) : TParse_TBlock(data) {}
TParse_TBlock_stringAttribute(const void* pData) : TParse_TBlock(pData) {}
char* getContent() const { return (char*)getRaw() + 0x8; }
};
static u32 getTagCode(u32 tag) { return tag & 0xFFFF; }
static u32 getTagGroup(u32 tag) { return (tag >> 0x10) & 0xFF; }
static unsigned int getTagCode(u32 tag) { return tag & 0xFFFF; }
static u8 getTagGroup(u32 tag) { return tag >> 0x10; }
static u32 ga4cSignature;
static const u32 ga4cSignature;
static const u32 ga4cSignature_color;
static const int gcTagBegin = '\x1A';
static const int gcTagBegin = '\x1A'; // All text Control Tags will begin with this character
enum {
MESSAGEINDEX_USER_ENUM_MIN = 0x0000,
MESSAGEINDEX_USER_ENUM_MAX = 0xFEFF,
MESSAGEINDEX_RESERVED_ENUM_MIN = 0xFF00,
MESSAGEINDEX_RESERVED_ENUM_MAX = 0xFFFF,
MESSAGEGROUPID_USER_ENUM_MIN = 0x0000,
MESSAGEGROUPID_USER_ENUM_MAX = 0xFFFF,
};
};
}; // namespace JMessage
+5 -4
View File
@@ -1,6 +1,7 @@
#ifndef JMESSAGE_LOCALE_H
#define JMESSAGE_LOCALE_H
#include <dolphin.h>
namespace JMessage {
@@ -15,10 +16,10 @@ struct locale {
return c >= 0x81 && (c <= 0x9F || (c >= 0xE0 && c <= 0xFC));
}
/* 802A9490 */ static int parseCharacter_1Byte(char const**);
/* 802A94A8 */ static int parseCharacter_2Byte(char const**);
/* 802A9528 */ static int parseCharacter_ShiftJIS(char const**);
/* 802A958C */ static int parseCharacter_UTF8(char const**);
/* 802A9490 */ static int parseCharacter_1Byte(const char** ppszText);
/* 802A94A8 */ static int parseCharacter_2Byte(const char** ppszText);
/* 802A9528 */ static int parseCharacter_ShiftJIS(const char** ppszText);
/* 802A958C */ static int parseCharacter_UTF8(const char** ppszText);
};
}; // namespace JMessage
+129 -116
View File
@@ -2,7 +2,8 @@
#define JMESSAGE_PROCESSOR_H
#include "JSystem/JMessage/resource.h"
#include "algorithm.h"
#include <algorithm.h>
#include "global.h"
namespace JMessage {
struct TResource;
@@ -18,15 +19,15 @@ struct TReference {
/* 802A7AF8 */ virtual ~TReference();
/* 802A7B40 */ virtual const char* do_word(u32) const;
int on_parseCharacter(const char** string) const { return pcResource_->parseCharacter(string); }
int on_parseCharacter(const char** ppszText) const {
JUT_ASSERT(97, pcResource_!=0);
return pcResource_->parseCharacter(ppszText);
}
const char* on_word(u32 param_0) const { return do_word(param_0); }
TResource* getResource_groupID(u16 groupID) const {
if (pcResource_ == NULL) {
return NULL;
}
return pcResource_->getResource_groupID(groupID);
TResource* getResource_groupID(u16 u16GroupID) const {
return pcResource_ == NULL ? NULL : pcResource_->getResource_groupID(u16GroupID);
}
TResourceContainer* getResourceContainer() const { return pcResource_; }
@@ -40,8 +41,13 @@ struct TReference {
*
*/
struct TProcessor {
TProcessor(const TReference* reference)
: pReference_(reference), pResourceCache_(NULL), pszCurrent_(NULL) {}
TProcessor(const TReference* pReference)
: pReference_(pReference),
pResourceCache_(NULL),
pszCurrent_(NULL)
{
JUT_ASSERT(584, pReference_!=0);
}
typedef bool (*pfnProcess_func)(TProcessor*);
@@ -55,14 +61,25 @@ struct TProcessor {
u32 max_size() const { return 4; }
u32 size() const { return upsz_; }
const char* top() const { return stack[upsz_ - 1]; }
const char* top() const {
JUT_ASSERT(181, upsz_>0);
return stack[upsz_ - 1];
}
void push(const char* string) {
stack[upsz_] = string;
void push(const char* pszText) {
JUT_ASSERT(186, IsPushable());
stack[upsz_] = pszText;
upsz_++;
}
void pop() { upsz_--; }
void pop() {
JUT_ASSERT(192, upsz_>0);
upsz_--;
#if PLATFORM_SHIELD
stack[upsz_] = NULL;
#endif
}
TStack_& operator=(const TStack_& other) {
upsz_ = other.upsz_;
@@ -79,11 +96,11 @@ struct TProcessor {
struct TProcess_ {
TProcess_() { reset_normal(); }
void reset_normal() { pfnProcess_CharacterEnd = process_onCharacterEnd_normal_; }
void reset_select() { pfnProcess_CharacterEnd = process_onCharacterEnd_select_; }
void reset_normal() { pfnProcess_onCharacterEnd = process_onCharacterEnd_normal_; }
void reset_select() { pfnProcess_onCharacterEnd = process_onCharacterEnd_select_; }
/* 0x0 */ pfnProcess_func pfnProcess_CharacterEnd;
struct {
/* 0x0 */ pfnProcess_func pfnProcess_onCharacterEnd;
struct rdata {
/* 0x0 */ const char* (*pfn)(TProcessor*);
/* 0x4 */ const char* pcBase;
/* 0x8 */ const void* pOffset;
@@ -93,51 +110,50 @@ struct TProcessor {
}; // Size: 0x14
/* 802A7B90 */ void reset();
/* 802A7BF8 */ void stack_pushCurrent(char const*);
/* 802A7BF8 */ void stack_pushCurrent(char const* pszText);
/* 802A7C30 */ void stack_popCurrent();
/* 802A7C54 */ const TResource* getResource_groupID(u16) const;
/* 802A7CD4 */ u32 toMessageCode_messageID(u32, u32, bool*) const;
/* 802A7E38 */ void on_select_begin(char const* (*)(JMessage::TProcessor*), void const*,
char const*, u32);
/* 802A7C54 */ const TResource* getResource_groupID(u16 u16GroupID) const;
/* 802A7CD4 */ u32 toMessageCode_messageID(u32 uMsgID, u32, bool* pbValid) const;
/* 802A7E38 */ void on_select_begin(char const* (*pfn)(JMessage::TProcessor*), void const* pOffset,
char const* pcBase, u32 uNumber);
/* 802A7EDC */ void on_select_end();
/* 802A7F34 */ void on_select_separate();
/* 802A7FE4 */ void on_tag_();
/* 802A8090 */ // void do_tag_(u32, void const*, u32);
/* 802A81EC */ bool process_character_();
/* 802A828C */ static bool process_onCharacterEnd_normal_(JMessage::TProcessor*);
/* 802A82F4 */ static bool process_onCharacterEnd_select_(JMessage::TProcessor*);
/* 802A833C */ static const char* process_onSelect_limited_(JMessage::TProcessor*);
/* 802A8358 */ static const char* process_onSelect_(JMessage::TProcessor*);
/* 802A8C24 */ const char* on_message(u32 param_0) const { return getMessageText_messageCode(param_0); }
/* 802A8C44 */ const char* getMessageText_messageCode(u32 param_0) const {
return getMessageText_messageCode(param_0 >> 0x10, param_0 & 0xFFFF);
/* 802A828C */ static bool process_onCharacterEnd_normal_(JMessage::TProcessor* pThis);
/* 802A82F4 */ static bool process_onCharacterEnd_select_(JMessage::TProcessor* pThis);
/* 802A833C */ static const char* process_onSelect_limited_(JMessage::TProcessor* pThis);
/* 802A8358 */ static const char* process_onSelect_(JMessage::TProcessor* pThis);
/* 802A8C24 */ const char* on_message(u32 uCode) const { return getMessageText_messageCode(uCode); }
/* 802A8C44 */ const char* getMessageText_messageCode(u32 uCode) const {
return getMessageText_messageCode(uCode >> 16, uCode & 0xFFFF);
}
/* 802A7B48 */ virtual ~TProcessor();
/* 802A7FC0 */ virtual void do_reset();
/* 802A7FC4 */ virtual void do_begin(void const*, char const*);
/* 802A7FC4 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 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);
/* 802A7FCC */ virtual void do_character(int iCharacter);
/* 802A7FD0 */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
/* 802A7FD8 */ virtual void do_select_begin(u32 uNumber);
/* 802A7FDC */ virtual void do_select_end();
/* 802A7FE0 */ virtual void do_select_separate();
/* 802A8084 */ virtual void do_resetStatus_(char const*);
/* 802A8084 */ virtual void do_resetStatus_(char const* pszText);
/* 802A8088 */ virtual bool do_setBegin_isReady_() const;
virtual void do_begin_(void const*, char const*) = 0;
virtual void do_begin_(void const* pEntry, char const* pszText) = 0;
virtual void do_end_() = 0;
virtual void do_tag_(u32, void const*, u32) = 0;
virtual void do_tag_(u32 uTag, void const* pData, u32 uSize) = 0;
void on_resetStatus_(const char* param_0) {
pszCurrent_ = param_0;
void on_resetStatus_(const char* pszText) {
pszCurrent_ = pszText;
oStack_.clear();
oProcess_.reset_normal();
do_resetStatus_(param_0);
do_resetStatus_(pszText);
}
void on_begin(const void* entry, const char* param_1) {
do_begin_(entry, param_1);
do_begin(entry, param_1);
void on_begin(const void* pEntry, const char* pszText) {
do_begin_(pEntry, pszText);
do_begin(pEntry, pszText);
}
void on_end() {
@@ -145,49 +161,52 @@ struct TProcessor {
do_end();
}
void on_tag(u32 param_0, const void* param_1, u32 param_2) {
if (!do_tag(param_0, param_1, param_2)) {
do_tag_(param_0, param_1, param_2);
void on_tag(u32 uTag, const void* pData, u32 uSize) {
if (!do_tag(uTag, pData, uSize)) {
do_tag_(uTag, pData, uSize);
}
}
const char* on_word(u32 param_0) const { return pReference_->on_word(param_0); }
int on_parseCharacter(const char** string) const {
return pReference_->on_parseCharacter(string);
int on_parseCharacter(const char** ppszText) const {
return pReference_->on_parseCharacter(ppszText);
}
void on_character(int character) { do_character(character); }
void on_character(int iCharacter) { do_character(iCharacter); }
const char* on_message_limited(u16 messageIndex) const {
return pResourceCache_->getMessageText_messageIndex(messageIndex);
const char* on_message_limited(u16 u16Index) const {
JUT_ASSERT(482, pResourceCache_!=0);
return pResourceCache_->getMessageText_messageIndex(u16Index);
}
int setBegin_messageEntryText(const TResource* resource, const void* entry,
const char* param_2) {
pResourceCache_ = resource;
on_resetStatus_(param_2);
on_begin(entry, param_2);
bool on_setBegin_isReady_() const { return do_setBegin_isReady_(); }
int setBegin_messageEntryText(const TResource* pResource, const void* pEntry, const char* pszText) {
JUT_ASSERT(297, on_setBegin_isReady_());
pResourceCache_ = pResource;
on_resetStatus_(pszText);
on_begin(pEntry, pszText);
return 1;
}
int setBegin_messageEntryText(const TProcessor* processor, const void* entry,
const char* param_2) {
setBegin_messageEntryText(processor->getResourceCache(), entry, param_2);
int setBegin_messageEntryText(const TProcessor* pProcessor, const void* pEntry, const char* pszText) {
JUT_ASSERT(306, pProcessor!=0);
setBegin_messageEntryText(pProcessor->getResourceCache(), pEntry, pszText);
return 1;
}
void* getMessageEntry_messageCode(u16 messageCode, u16 messageIndex) const {
const TResource* pResource = getResource_groupID(messageCode);
void* getMessageEntry_messageCode(u16 u16Code, u16 u16Index) const {
const TResource* pResource = getResource_groupID(u16Code);
if (pResource == NULL) {
return NULL;
}
return pResource->getMessageEntry_messageIndex(messageIndex);
return pResource->getMessageEntry_messageIndex(u16Index);
}
const char* getMessageText_messageCode(u16 messageCode, u16 messageIndex) const {
void* pEntry = getMessageEntry_messageCode(messageCode, messageIndex);
const char* getMessageText_messageCode(u16 u16Code, u16 u16Index) const {
void* pEntry = getMessageEntry_messageCode(u16Code, u16Index);
if (pEntry == NULL) {
return NULL;
@@ -196,9 +215,9 @@ struct TProcessor {
return pResourceCache_->getMessageText_messageEntry(pEntry);
}
void stack_pushCurrent_(const char* string) {
void stack_pushCurrent_(const char* pszText) {
oStack_.push(getCurrent());
pszCurrent_ = string;
pszCurrent_ = pszText;
}
void stack_popCurrent_() {
@@ -212,27 +231,23 @@ struct TProcessor {
const char* getCurrent() const { return pszCurrent_; }
const TReference* getReference() const { return pReference_; }
const TResource* getResource_groupID_uncached(u16 groupID) const {
return pReference_->getResource_groupID(groupID);
const TResource* getResource_groupID_uncached(u16 u16GroupID) const {
return pReference_->getResource_groupID(u16GroupID);
}
bool isResourceCache_groupID(u16 groupID) const {
return pResourceCache_ != NULL && groupID == pResourceCache_->getGroupID();
bool isResourceCache_groupID(u16 u16GroupID) const {
return pResourceCache_ != NULL && u16GroupID == pResourceCache_->getGroupID();
}
TResourceContainer* getResourceContainer() const {
if (pReference_ == NULL) {
return NULL;
}
return pReference_->getResourceContainer();
return pReference_ == NULL ? NULL : pReference_->getResourceContainer();
}
void setResourceCache(TResource* cache) { pResourceCache_ = cache; }
void setResourceCache(TResource* pResource) { pResourceCache_ = pResource; }
void resetResourceCache() { setResourceCache(NULL); }
/* 0x04 */ const TReference* pReference_;
/* 0x08 */ const TResource* pResourceCache_;
/* 0x08 */ const mutable TResource* pResourceCache_;
/* 0x0C */ const char* pszCurrent_;
/* 0x10 */ TStack_ oStack_;
/* 0x24 */ TProcess_ oProcess_;
@@ -253,13 +268,13 @@ struct TSequenceProcessor : public TProcessor {
void reset() {}
union {
struct {
union processData {
struct branchData {
/* 0x0 */ branchPfn branchFn;
/* 0x4 */ const void* pTarget;
/* 0x8 */ u32 uTarget;
} branch_process;
struct {
struct jumpData {
/* 0x0 */ jumpPfn jumpFn;
/* 0x4 */ u32 u32Target;
} jump_process;
@@ -275,48 +290,45 @@ struct TSequenceProcessor : public TProcessor {
STATUS_BRANCH,
};
/* 802A8374 */ TSequenceProcessor(JMessage::TReference const*, JMessage::TControl*);
/* 802A8418 */ const char* process(char const*);
/* 802A8374 */ TSequenceProcessor(JMessage::TReference const* pReference, JMessage::TControl* pControl);
/* 802A8418 */ const char* process(char const* pszText);
/* 802A85A4 */ bool on_isReady();
/* 802A85D0 */ void on_jump_register(void const* (*)(JMessage::TSequenceProcessor const*), u32);
/* 802A85D0 */ void on_jump_register(jumpPfn pfn, u32 u32Target);
/* 802A85E4 */ bool on_jump_isReady();
/* 802A8610 */ void on_jump(void const*, char const*);
/* 802A8690 */ void
on_branch_register(void const* (*)(JMessage::TSequenceProcessor const*, u32), void const*, u32);
/* 802A86A0 */ void on_branch_query(u32);
/* 802A8610 */ void on_jump(void const* pEntry, char const* pszText);
/* 802A8690 */ void on_branch_register(branchPfn pfn, void const* pTarget, u32 uTarget);
/* 802A86A0 */ void on_branch_query(u32 uCode);
/* 802A86D4 */ u32 on_branch_queryResult();
/* 802A8700 */ void on_branch(void const*, char const*);
/* 802A892C */ static void process_setMessageIndex_reserved_(u16);
/* 802A8944 */ static void* process_setMessageCode_(JMessage::TSequenceProcessor const*, u16,
u16);
/* 802A89B8 */ static const void* process_onJump_limited_(JMessage::TSequenceProcessor const*);
/* 802A89EC */ static const void* process_onJump_(JMessage::TSequenceProcessor const*);
/* 802A8A18 */ static const void* process_onBranch_limited_(JMessage::TSequenceProcessor const*,
u32);
/* 802A8A50 */ static const void* process_onBranch_(JMessage::TSequenceProcessor const*, u32);
/* 802A8700 */ void on_branch(void const* pEntry, char const* pszText);
/* 802A892C */ static void process_setMessageIndex_reserved_(u16 u16Index);
/* 802A8944 */ static void* process_setMessageCode_(TSequenceProcessor const* pProcessor, u16 u16GroupID, u16 u16Index);
/* 802A89B8 */ static const void* process_onJump_limited_(TSequenceProcessor const* pProcessor);
/* 802A89EC */ static const void* process_onJump_(TSequenceProcessor const* pProcessor);
/* 802A8A18 */ static const void* process_onBranch_limited_(TSequenceProcessor const* pProcessor, u32 uTargetIndex);
/* 802A8A50 */ static const void* process_onBranch_(TSequenceProcessor const* pProcessor, u32 uTargetIndex);
/* 802A83B8 */ virtual ~TSequenceProcessor();
/* 802A87A4 */ virtual void do_resetStatus_(char const*);
/* 802A87A4 */ virtual void do_resetStatus_(char const* pszText);
/* 802A87C0 */ virtual bool do_setBegin_isReady_() const;
/* 802A87D0 */ virtual void do_begin_(void const*, char const*);
/* 802A87D0 */ virtual void do_begin_(void const* pEntry, char const* pszText);
/* 802A87D4 */ virtual void do_end_();
/* 802A87E0 */ virtual void do_tag_(u32, void const*, u32);
/* 802A87E0 */ virtual void do_tag_(u32 uTag, void const* pData, u32 uSize);
/* 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);
/* 802A8790 */ virtual void do_jump(void const* pEntry, char const* pszText);
/* 802A8794 */ virtual void do_branch_query(u32 uCode);
/* 802A8798 */ virtual s32 do_branch_queryResult();
/* 802A87A0 */ virtual void do_branch(void const*, char const*);
/* 802A87A0 */ virtual void do_branch(void const* pEntry, char const* pszText);
TControl* getControl() const { return pControl_; }
static const void* process_setMessageIndex_(const TSequenceProcessor* pProcessor, u16 param_1) {
static const void* process_setMessageIndex_(const TSequenceProcessor* pProcessor, u16 u16Index) {
return process_setMessageCode_(pProcessor, pProcessor->getResourceCache()->getGroupID(),
param_1);
u16Index);
}
static const void* process_setMessageCode_(const TSequenceProcessor* pProcessor, u32 param_1) {
return process_setMessageCode_(pProcessor, param_1 >> 0x10, param_1 & 0xFFFF);
static const void* process_setMessageCode_(const TSequenceProcessor* pProcessor, u32 uCode) {
return process_setMessageCode_(pProcessor, uCode >> 16, uCode & 0xFFFF);
}
/* 0x38 */ TControl* pControl_;
@@ -329,20 +341,21 @@ struct TSequenceProcessor : public TProcessor {
*
*/
struct TRenderingProcessor : public TProcessor {
/* 802A8A84 */ TRenderingProcessor(JMessage::TReference const*);
/* 802A8B20 */ int process(char const*);
/* 802A8A84 */ TRenderingProcessor(JMessage::TReference const* pReference);
/* 802A8B20 */ int process(char const* pszText);
/* 802A8AC0 */ virtual ~TRenderingProcessor();
/* 802A8BA4 */ virtual void do_begin_(void const*, char const*);
/* 802A8BA4 */ virtual void do_begin_(void const* pEntry, char const* pszText);
/* 802A8BA8 */ virtual void do_end_();
/* 802A8BAC */ virtual void do_tag_(u32, void const*, u32);
/* 802A8BAC */ virtual void do_tag_(u32 uTag, void const* pData, u32 uSize);
bool process_messageEntryText(TProcessor *param_0,void const*param_1,const char *param_2) {
int rv = TProcessor::setBegin_messageEntryText(param_0, param_1, param_2);
if (rv != 0) {
process(NULL);
bool process_messageEntryText(const TProcessor* pProcessor, void const* pEntry, const char* pszText) {
if (!TProcessor::setBegin_messageEntryText(pProcessor, pEntry, pszText)) {
return false;
}
return rv != 0;
process(NULL);
return true;
}
};
}; // namespace JMessage
+59 -42
View File
@@ -13,33 +13,40 @@ namespace JMessage {
*/
struct TResource {
TResource()
: field_0x8(NULL), field_0xc(NULL), field_0x10(NULL), field_0x14(NULL), mMessageID(NULL) {}
: oParse_THeader_(NULL),
oParse_TBlock_info_(NULL),
pMessageText_(NULL),
pStringAttribute_(NULL),
oParse_TBlock_messageID_(NULL)
{}
/* 802A8CDC */ u16 toMessageIndex_messageID(u32, u32, bool*) const;
/* 802A8CDC */ u16 toMessageIndex_messageID(u32 uMsgID, u32, bool* pbValid) const;
bool isContained_messageIndex(u16 messageIndex) const {
return messageIndex < getMessageEntryNumber();
bool isContained_messageIndex(u16 uMessageIndex) const {
return uMessageIndex < getMessageEntryNumber();
}
u16 getMessageEntrySize() const { return field_0xc.get_messageEntrySize(); }
u16 getMessageEntryNumber() const { return field_0xc.get_messageEntryNumber(); }
u32 getMessageEntrySize() const { return oParse_TBlock_info_.get_messageEntrySize(); }
u32 getMessageEntryNumber() const { return oParse_TBlock_info_.get_messageEntryNumber(); }
u16 getGroupID() const { return field_0xc.get_groupID(); }
u16 getGroupID() const { return oParse_TBlock_info_.get_groupID(); }
void* getMessageEntry_messageIndex(u16 messageIndex) const {
if (!isContained_messageIndex(messageIndex)) {
void* getMessageEntry_messageIndex(u16 uMessageIndex) const {
if (!isContained_messageIndex(uMessageIndex)) {
return NULL;
}
return field_0xc.getContent() + (messageIndex * getMessageEntrySize());
void* pEntry = oParse_TBlock_info_.getContent() + (uMessageIndex * getMessageEntrySize());
return pEntry;
}
char* getMessageText_messageEntry(const void* pEntry) const {
return field_0x10 + *(int*)pEntry;
JUT_ASSERT(141, pEntry!=0);
return pMessageText_ + *(int*)pEntry;
}
const char* getMessageText_messageIndex(u16 messageIndex) const {
void* pEntry = getMessageEntry_messageIndex(messageIndex);
const char* getMessageText_messageIndex(u16 uMessageIndex) const {
void* pEntry = getMessageEntry_messageIndex(uMessageIndex);
if (pEntry == NULL) {
return NULL;
}
@@ -48,31 +55,35 @@ struct TResource {
}
void setData_header(const void* pData) {
field_0x8.setRaw(pData);
oParse_THeader_.setRaw(pData);
}
void setData_block_info(const void* pData) {
field_0xc.setRaw(pData);
oParse_TBlock_info_.setRaw(pData);
JGADGET_ASSERTWARN(75, oParse_TBlock_info_.get_groupID()<= data::MESSAGEGROUPID_USER_ENUM_MAX);
JGADGET_ASSERTWARN(77, oParse_TBlock_info_.get_messageEntryNumber()<= data::MESSAGEINDEX_USER_ENUM_MAX);
}
void setData_block_messageText(const void* pData) {
field_0x10 = data::TParse_TBlock_messageText(pData).getContent();
pMessageText_ = data::TParse_TBlock_messageText(pData).getContent();
}
void setData_block_stringAttribute(const void* pData) {
field_0x14 = data::TParse_TBlock_stringAttribute(pData).getContent();
pStringAttribute_ = data::TParse_TBlock_stringAttribute(pData).getContent();
}
void setData_block_messageID(const void* pData) {
mMessageID.setRaw(pData);
oParse_TBlock_messageID_.setRaw(pData);
}
JGadget::TLinkListNode ocObject_;
/* 0x08 */ data::TParse_THeader field_0x8;
/* 0x0C */ data::TParse_TBlock_info field_0xc;
/* 0x10 */ char* field_0x10;
/* 0x14 */ char* field_0x14;
/* 0x18 */ data::TParse_TBlock_messageID mMessageID;
/* 0x08 */ data::TParse_THeader oParse_THeader_;
/* 0x0C */ data::TParse_TBlock_info oParse_TBlock_info_;
/* 0x10 */ char* pMessageText_;
/* 0x14 */ char* pStringAttribute_;
/* 0x18 */ data::TParse_TBlock_messageID oParse_TBlock_messageID_;
};
/**
@@ -80,14 +91,18 @@ struct TResource {
*
*/
struct TResource_color {
TResource_color() : field_0x0(NULL), field_0x4(NULL) {}
TResource_color()
: oParse_THeader_(NULL),
oParse_TBlock_color_(NULL)
{}
void reset() {
field_0x0.setRaw(NULL);
field_0x4.setRaw(NULL);
oParse_THeader_.setRaw(NULL);
oParse_TBlock_color_.setRaw(NULL);
}
/* 0x0 */ data::TParse_THeader field_0x0;
/* 0x4 */ data::TParse_TBlock_color field_0x4;
/* 0x0 */ data::TParse_THeader oParse_THeader_;
/* 0x4 */ data::TParse_TBlock_color oParse_TBlock_color_;
}; // Size: 0x8
/**
@@ -97,24 +112,26 @@ struct TResource_color {
struct TResourceContainer {
struct TCResource : public JGadget::TLinkList_factory<TResource, 0> {
/* 802A8EC0 */ TCResource();
/* 802A8F6C */ TResource* Get_groupID(u16);
/* 802A8F6C */ TResource* Get_groupID(u16 u16GroupID);
/* 802A8EF8 */ virtual ~TCResource();
/* 802A8FFC */ virtual JMessage::TResource* Do_create();
/* 802A9048 */ virtual void Do_destroy(JMessage::TResource*);
// u8 field_0x0[0x10];
/* 802A9048 */ virtual void Do_destroy(JMessage::TResource* pResource);
};
/* 802A906C */ TResourceContainer();
/* 802A90B8 */ void setEncoding(u8);
/* 802A90F0 */ void setEncoding_(u8);
/* 802A90B8 */ void setEncoding(u8 e);
/* 802A90F0 */ void setEncoding_(u8 e);
int parseCharacter(const char** string) const { return pfnParseCharacter_(string); }
TResource* getResource_groupID(u16 groupID) { return resContainer_.Get_groupID(groupID); }
TResource* getResource_groupID(u16 groupID) const { return getResource_groupID(groupID); }
int parseCharacter(const char** ppszText) const {
JUT_ASSERT(330, pfnParseCharacter_!=0);
return pfnParseCharacter_(ppszText);
}
bool isEncodingSettable(u8 e) const { return mEncodingType == e || mEncodingType == 0; }
TResource* getResource_groupID(u16 u16GroupID) { return resContainer_.Get_groupID(u16GroupID); }
TResource* getResource_groupID(u16 u16GroupID) const { return getResource_groupID(u16GroupID); }
bool isEncodingSettable(u8 e) const { return encodingType_ == e || encodingType_ == 0; }
const TCResource* getResourceContainer() const { return &resContainer_; }
void destroyResource() {
resContainer_.Clear_destroy();
@@ -129,7 +146,7 @@ struct TResourceContainer {
static JMessage::locale::parseCharacter_function sapfnParseCharacter_[5];
/* 0x00 */ u8 mEncodingType;
/* 0x00 */ u8 encodingType_;
/* 0x04 */ JMessage::locale::parseCharacter_function pfnParseCharacter_;
/* 0x08 */ TCResource resContainer_;
/* 0x18 */ TResource_color resColor_;
@@ -140,11 +157,11 @@ struct TResourceContainer {
*
*/
struct TParse : public JGadget::binary::TParse_header_block {
/* 802A9130 */ TParse(JMessage::TResourceContainer*);
/* 802A9130 */ TParse(JMessage::TResourceContainer* pContainer);
/* 802A9158 */ virtual ~TParse();
/* 802A91B8 */ virtual bool parseHeader_next(void const**, u32*, u32);
/* 802A92F4 */ virtual bool parseBlock_next(void const**, u32*, u32);
/* 802A91B8 */ virtual bool parseHeader_next(const void** ppData_inout, u32* puBlock_out, u32);
/* 802A92F4 */ virtual bool parseBlock_next(const void** ppData_inout, u32* puData_out, u32);
/* 0x4 */ TResourceContainer* pContainer_;
/* 0x8 */ TResource* pResource_;
+1 -1
View File
@@ -3061,7 +3061,7 @@ inline void dComIfGp_setMesgBgmOff() {
g_dComIfG_gameInfo.play.setMesgBgm(0);
}
inline bool dComIfGp_checkMesgBgm() {
inline u8 dComIfGp_checkMesgBgm() {
return g_dComIfG_gameInfo.play.checkMesgBgm();
}
+194 -45
View File
@@ -11,16 +11,18 @@ public:
// Attributes
/* 0x04 */ u16 message_id;
/* 0x06 */ u16 unk_0x6;
/* 0x08 */ u8 unk_0x8;
/* 0x09 */ u8 display_style;
/* 0x0A */ u8 print_style;
/* 0x0B */ u8 position;
/* 0x06 */ u16 event_label_id;
/* 0x08 */ u8 se_speaker;
/* 0x09 */ u8 fuki_kind;
/* 0x0A */ u8 output_type;
/* 0x0B */ u8 fuki_pos_type;
/* 0x0C */ u8 unk_0xc;
/* 0x0D */ u8 unk_0xd;
/* 0x0E */ u8 unk_0xe;
/* 0x0E */ u8 se_mood;
/* 0x0F */ u8 camera_id;
/* 0x10 */ u32 unk_0x10;
/* 0x10 */ u8 base_anm_id;
/* 0x11 */ u8 face_anm_id;
/* 0x12 */ u16 unk_0x12;
};
class JMSMesgInfo_c {
@@ -48,7 +50,7 @@ struct jmessage_tReference : public JMessage::TReference {
/* 80228F08 */ bool isSaveSeq();
/* 80228F3C */ bool isBook();
/* 80228F70 */ bool isStaffRoll();
/* 80228FA4 */ u8 isHowl();
/* 80228FA4 */ bool isHowl();
/* 80228FD8 */ bool isMidona();
/* 8022900C */ void resetReference();
/* 80229034 */ void pageSend();
@@ -70,7 +72,10 @@ struct jmessage_tReference : public JMessage::TReference {
/* 80238C78 */ void setActorPos(cXyz pos) { mActorPos = pos; }
bool isSelectSetCancelFlag() { return mSelectSetCancelFlag != 0; }
bool isSelectSetCancelFlag() {
return mSelectSetCancelFlag ? true : false;
}
BOOL isSelectRubyFlag(int i_flag) {
BOOL var_r31;
if (mSelectRubyFlag & (u8)(1 << i_flag)) {
@@ -80,8 +85,9 @@ struct jmessage_tReference : public JMessage::TReference {
}
return var_r31;
}
bool isBatchFlag() { return mBatchFlag; }
bool isLightBatchFlag() { return mLightBatchFlag; }
bool isBatchFlag() { return mBatchFlag ? true : false; }
bool isLightBatchFlag() { return mLightBatchFlag ? true : false; }
void setAddCharAllAlphaRate(f32 i_alphaRate) { mAddCharAllAlphaRate = i_alphaRate; }
void setCharAllAlphaRate(f32 i_alphaRate) { mCharAllAlphaRate = i_alphaRate; }
@@ -220,7 +226,7 @@ struct jmessage_tReference : public JMessage::TReference {
f32 getSelTBoxWidth() { return mSelTBoxWidth; }
u8 getSelectPos() { return mSelectPos; }
u16 getMsgID() { return mMsgID; }
bool isButtonTagStopFlag() { return mButtonTagStopFlag; }
bool isButtonTagStopFlag() { return mButtonTagStopFlag ? true : false; }
u8 getStopFlag() { return mStopFlag; }
u8 getSendFlag() { return mSendFlag; }
u8 getFukiPosType() { return mFukiPosType; }
@@ -230,7 +236,7 @@ struct jmessage_tReference : public JMessage::TReference {
f32 getSelFontSize() { return mSelFontSize; }
f32 getSelCharSpace() { return mSelCharSpace; }
u16 getLineScale(int i_no) { return mLineScale[i_no]; }
bool isBombNameUseFlag() { return mBombNameUseFlag; }
bool isBombNameUseFlag() { return mBombNameUseFlag ? true : false; }
f32 getSelLength(int idx) { return mSelLength[idx]; }
void setAddCharAlpha(f32 alpha) { mAddCharAlpha = alpha; }
s8 getNowPageLineMax() { return mPageLineMax[field_0x5d2]; }
@@ -344,7 +350,7 @@ struct jmessage_tReference : public JMessage::TReference {
}; // Size: 0x1278
struct jmessage_tMeasureProcessor : public JMessage::TRenderingProcessor {
/* 80229A28 */ jmessage_tMeasureProcessor(jmessage_tReference const*);
/* 80229A28 */ jmessage_tMeasureProcessor(jmessage_tReference const* pReference);
/* 8022B0B0 */ void do_scale(f32);
/* 8022B18C */ void do_space(u32);
/* 8022B3EC */ void do_pageType(int);
@@ -353,16 +359,16 @@ struct jmessage_tMeasureProcessor : public JMessage::TRenderingProcessor {
/* 8022B4E0 */ void push_word(char*);
/* 8022B5F4 */ virtual ~jmessage_tMeasureProcessor() {}
/* 80229AC4 */ virtual void do_begin(void const*, char const*);
/* 80229AC4 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 80229CB4 */ virtual void do_end();
/* 80229E3C */ virtual void do_character(int);
/* 8022A268 */ virtual bool do_tag(u32, void const*, u32);
/* 80229E3C */ virtual void do_character(int iCharacter);
/* 8022A268 */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
/* 0x38 */ f32 field_0x38;
/* 0x3C */ s16 mTotalLineCnt;
/* 0x3E */ s16 field_0x3e;
/* 0x40 */ s16 field_0x40;
/* 0x42 */ u16 field_0x42;
/* 0x42 */ u16 mSeMood;
/* 0x44 */ u8 field_0x44;
/* 0x45 */ u8 mSelectType;
/* 0x46 */ u8 field_0x46;
@@ -371,13 +377,18 @@ struct jmessage_tMeasureProcessor : public JMessage::TRenderingProcessor {
/* 0x49 */ s8 field_0x49;
/* 0x4A */ s8 mPageLineMax;
/* 0x4B */ s8 field_0x4b;
/* 0x4C */ u8 field_0x4c;
/* 0x4C */ u8 mSeSpeaker;
/* 0x4D */ u8 field_0x4d;
}; // Size: 0x50
struct jmessage_tControl;
struct jmessage_tControl : public JMessage::TControl {
/* 802299EC */ jmessage_tControl();
/* 80039B0C */ virtual ~jmessage_tControl();
};
struct jmessage_tSequenceProcessor : public JMessage::TSequenceProcessor {
/* 8022B558 */ jmessage_tSequenceProcessor(jmessage_tReference const*, jmessage_tControl*);
/* 8022B558 */ jmessage_tSequenceProcessor(jmessage_tReference const* pReference, jmessage_tControl* pControl);
/* 8022C904 */ void do_name1();
/* 8022C908 */ void do_space(u32);
/* 8022CA24 */ void do_rubyset(void const*, u32);
@@ -387,20 +398,20 @@ struct jmessage_tSequenceProcessor : public JMessage::TSequenceProcessor {
/* 8023299C */ virtual ~jmessage_tSequenceProcessor() {}
/* 8022B654 */ virtual void do_reset();
/* 8022B658 */ virtual void do_begin(void const*, char const*);
/* 8022B658 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 8022BA3C */ virtual void do_end();
/* 8022BFE0 */ virtual void do_character(int);
/* 8022C1A0 */ virtual bool do_tag(u32, void const*, u32);
/* 8022BFE0 */ virtual void do_character(int iCharacter);
/* 8022C1A0 */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
/* 8022BB7C */ virtual bool do_isReady();
/* 8022C8FC */ virtual bool do_jump_isReady();
/* 8022CBE4 */ virtual void do_jump(void const*, char const*);
/* 8022CBE4 */ virtual void do_jump(void const* pEntry, char const* pszText);
u8 getMouthCheck() { return mMouthCheck; }
void setForceForm(u8 forceForm) { mForceForm = forceForm; }
/* 0x4C */ jmessage_tMeasureProcessor mMeasureProcessor;
/* 0x9C */ const void* field_0x9c;
/* 0xA0 */ const char* field_0xa0;
/* 0x9C */ const void* mpEntry;
/* 0xA0 */ const char* mpText;
/* 0xA4 */ s16 field_0xa4;
/* 0xA6 */ s16 field_0xa6;
/* 0xA8 */ s16 field_0xa8;
@@ -429,7 +440,7 @@ struct CharInfo_c {
};
struct jmessage_tRenderingProcessor : public JMessage::TRenderingProcessor {
/* 8022CCB0 */ jmessage_tRenderingProcessor(jmessage_tReference const*);
/* 8022CCB0 */ jmessage_tRenderingProcessor(jmessage_tReference const* pReference);
/* 8022E12C */ void resetRendering();
/* 8022E17C */ void do_widthcenter();
/* 8022E260 */ void do_selwidthcenter(int);
@@ -451,10 +462,10 @@ struct jmessage_tRenderingProcessor : public JMessage::TRenderingProcessor {
/* 8023293C */ virtual ~jmessage_tRenderingProcessor() {}
/* 8022CDC8 */ virtual void do_reset();
/* 8022CDCC */ virtual void do_begin(void const*, char const*);
/* 8022CDCC */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 8022CFD8 */ virtual void do_end();
/* 8022D0A0 */ virtual void do_character(int);
/* 8022D74C */ virtual bool do_tag(u32, void const*, u32);
/* 8022D0A0 */ virtual void do_character(int iCharacter);
/* 8022D74C */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
void setTextInitPos(float x, float y) {
mTextInitPosX = x;
@@ -578,38 +589,38 @@ struct jmessage_string_tReference : public JMessage::TReference {
};
struct jmessage_string_tMeasureProcessor : public JMessage::TRenderingProcessor {
/* 8022FB98 */ jmessage_string_tMeasureProcessor(jmessage_string_tReference const*);
/* 8022FB98 */ jmessage_string_tMeasureProcessor(jmessage_string_tReference const* pReference);
/* 8023098C */ void do_rubyset(void const*, u32);
/* 80230A5C */ virtual ~jmessage_string_tMeasureProcessor() {}
/* 8022FBE4 */ virtual void do_begin(void const*, char const*);
/* 8022FBE4 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 8022FC14 */ virtual void do_end();
/* 8022FC28 */ virtual void do_character(int);
/* 8022FDF0 */ virtual bool do_tag(u32, void const*, u32);
/* 8022FC28 */ virtual void do_character(int iCharacter);
/* 8022FDF0 */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
/* 0x38 */ jmessage_string_tReference* mpReference;
};
struct jmessage_string_tSequenceProcessor : public JMessage::TSequenceProcessor {
/* 80230A08 */ jmessage_string_tSequenceProcessor(jmessage_string_tReference const*,
jmessage_string_tControl*);
/* 80230A08 */ jmessage_string_tSequenceProcessor(jmessage_string_tReference const* pReference,
jmessage_string_tControl* pControl);
/* 80232858 */ virtual ~jmessage_string_tSequenceProcessor() {}
/* 80230ABC */ virtual void do_reset();
/* 80230AC0 */ virtual void do_begin(void const*, char const*);
/* 80230AC0 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 80230B7C */ virtual void do_end();
/* 80230B88 */ virtual void do_character(int);
/* 80230B8C */ virtual bool do_tag(u32, void const*, u32);
/* 80230B88 */ virtual void do_character(int iCharacter);
/* 80230B8C */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
/* 80230B80 */ virtual bool do_isReady();
/* 80230BBC */ virtual bool do_jump_isReady();
/* 80230BC4 */ virtual void do_jump(void const*, char const*);
/* 80230BC4 */ virtual void do_jump(void const* pEntry, char const* pszText);
/* 0x4C */ jmessage_string_tMeasureProcessor mMeasureProcessor;
/* 0x88 */ jmessage_string_tReference* mpSeqReference;
};
struct jmessage_string_tRenderingProcessor : public JMessage::TRenderingProcessor {
/* 80230BC8 */ jmessage_string_tRenderingProcessor(jmessage_string_tReference const*);
/* 80230BC8 */ jmessage_string_tRenderingProcessor(jmessage_string_tReference const* pReference);
/* 80230C20 */ s16 getLineCountNowPage();
/* 80231D70 */ void do_widthcenter();
/* 80231EF0 */ void do_heightcenter();
@@ -625,10 +636,10 @@ struct jmessage_string_tRenderingProcessor : public JMessage::TRenderingProcesso
/* 802327F8 */ virtual ~jmessage_string_tRenderingProcessor() {}
/* 80230C5C */ virtual void do_reset();
/* 80230CA0 */ virtual void do_begin(void const*, char const*);
/* 80230CA0 */ virtual void do_begin(void const* pEntry, char const* pszText);
/* 80230CE8 */ virtual void do_end();
/* 80230D48 */ virtual void do_character(int);
/* 80231110 */ virtual bool do_tag(u32, void const*, u32);
/* 80230D48 */ virtual void do_character(int iCharacter);
/* 80231110 */ virtual bool do_tag(u32 uTag, void const* pData, u32 uSize);
char* getString() { return field_0x54; }
@@ -650,4 +661,142 @@ struct jmessage_string_tRenderingProcessor : public JMessage::TRenderingProcesso
/* 0x554 */ u8 field_0x554;
};
#define MSGTAG_GROUP(g) (g << 16)
// Group 0
#define MSGTAG_PLAYER_NAME 0
#define MSGTAG_INSTANT 1
#define MSGTAG_TYPE 2
#define MSGTAG_UNK_3 3 // appears the same as autobox
#define MSGTAG_AUTOBOX 4
#define MSGTAG_BOXATMOST 5
#define MSGTAG_UNK_6 6
#define MSGTAG_PAUSE 7
#define MSGTAG_SELECT_2WAY 8
#define MSGTAG_SELECT_3WAY 9
#define MSGTAG_ABTN 10
#define MSGTAG_BBTN 11
#define MSGTAG_CSTICK 12
#define MSGTAG_LBTN 13
#define MSGTAG_RBTN 14
#define MSGTAG_XBTN 15
#define MSGTAG_YBTN 16
#define MSGTAG_ZBTN 17
#define MSGTAG_DPAD 18
#define MSGTAG_STICK_CROSS 19
#define MSGTAG_LEFT_ARROW 20
#define MSGTAG_RIGHT_ARROW 21
#define MSGTAG_UP_ARROW 22
#define MSGTAG_DOWN_ARROW 23
#define MSGTAG_STICK_UP 24
#define MSGTAG_STICK_DOWN 25
#define MSGTAG_STICK_LEFT 26
#define MSGTAG_STICK_RIGHT 27
#define MSGTAG_STICK_VERTICAL 28
#define MSGTAG_STICK_HORIZONTAL 29
#define MSGTAG_INLINE_2_NEXT 30
#define MSGTAG_INLINE_2_FIRST 31
#define MSGTAG_AWAIT_CHOICE 32
#define MSGTAG_UNK_33 33 // calls "do_name1" but the function does nothing
#define MSGTAG_HORSE_NAME 34
#define MSGTAG_RED_TARGET 35
#define MSGTAG_YELLOW_TARGET 36
#define MSGTAG_INPUT_VALUE 37
#define MSGTAG_ACKNOWLEDGE 38
#define MSGTAG_ABTN_STAR 39
#define MSGTAG_DEMOBOX 40
#define MSGTAG_SCENT_NAME 41
#define MSGTAG_WHITE_TARGET 42
#define MSGTAG_PORTAL_NAME 43
#define MSGTAG_WARP_ICON 44
#define MSGTAG_BOMB_NAME 45
#define MSGTAG_XYBTN 46
#define MSGTAG_YXBTN 47
#define MSGTAG_BOMB_BAG_ICON 48
#define MSGTAG_BOMB_NUM 49
#define MSGTAG_BOMB_PRICE 50
#define MSGTAG_INLINE_3_NEXT 51
#define MSGTAG_INLINE_3_FIRST 52
#define MSGTAG_UNK_53 53
#define MSGTAG_BOXATLEAST 54
#define MSGTAG_BOMB_MAX 55
#define MSGTAG_ARROW_MAX 56
#define MSGTAG_HEART 57
#define MSGTAG_QUAVER 58
#define MSGTAG_INSECT_NAME 59
#define MSGTAG_LETTER_NAME 60
#define MSGTAG_LINE_DOWN 61
#define MSGTAG_CURRENT_LETTER_PAGE 62
#define MSGTAG_MAX_LETTER_PAGE 63
// Group 3
#define MSGTAG_WII_MSGID_OVERRIDE 0
#define MSGTAG_WII_ABTN 1
#define MSGTAG_WII_BBTN 2
#define MSGTAG_WII_HOMEBTN 3
#define MSGTAG_WII_MINUSBTN 4
#define MSGTAG_WII_PLUSBTN 5
#define MSGTAG_WII_1BTN 6
#define MSGTAG_WII_2BTN 7
#define MSGTAG_WII_DPAD_ITEM 8
#define MSGTAG_WII_DPAD_UP 9
#define MSGTAG_WII_DPAD_DOWN 10
#define MSGTAG_WII_DPAD_HORIZONTAL 11
#define MSGTAG_WII_DPAD_RIGHT 12
#define MSGTAG_WII_DPAD_LEFT 13
#define MSGTAG_WII_WIIMOTE 14
#define MSGTAG_WII_RETICULE 15
#define MSGTAG_WII_NUNCHUK 16
#define MSGTAG_WII_WIIMOTE2 17
#define MSGTAG_WII_FAIRY 18
#define MSGTAG_WII_CBTN 19
#define MSGTAG_WII_ZBTN 20
// Group 4
#define MSGTAG_GLYPH_DOLLARSIGN 0
#define MSGTAG_GLYPH_BACKSLASH 1
#define MSGTAG_GLYPH_ATMARK 2
#define MSGTAG_GLYPH_SHARP 3
#define MSGTAG_GLYPH_FLAT 4
#define MSGTAG_GLYPH_SQRT 5
#define MSGTAG_GLYPH_PERCENT 6
#define MSGTAG_GLYPH_HECTARE 7
#define MSGTAG_GLYPH_ARE 8
#define MSGTAG_GLYPH_LITRE 9
#define MSGTAG_GLYPH_WATT 10
#define MSGTAG_GLYPH_CALORIE 11
#define MSGTAG_GLYPH_DOLLAR 12
#define MSGTAG_GLYPH_CENT 13
// Group 5
#define MSGTAG_TIME_INFO 0
#define MSGTAG_INSECT_INFO 3
#define MSGTAG_RIVER_POINTS 7
#define MSGTAG_FISH_LENGTH 8
#define MSGTAG_FUNDRAISE_REMAIN 9
#define MSGTAG_NEW_LETTER_NUM 10
#define MSGTAG_POE_NUM 11
#define MSGTAG_BALLOON_SCORE 12
#define MSGTAG_FISH_COUNT 13
#define MSGTAG_ROLLGOAL_LV 14
// Group 6
#define MSGTAG_PLAYER_GENITIV 0
#define MSGTAG_HORSE_GENITIV 1
#define MSGTAG_MALE_ICON 2
#define MSGTAG_FEMALE_ICON 3
#define MSGTAG_STAR_ICON 4
#define MSGTAG_REFMARK 5
#define MSGTAG_THIN_LEFT_ARROW 6
#define MSGTAG_THIN_RIGHT_ARROW 7
#define MSGTAG_THIN_UP_ARROW 8
#define MSGTAG_THIN_DOWN_ARROW 9
#define MSGTAG_BULLET 10
#define MSGTAG_BULLET_SPACE 11
// Group 255
#define MSGTAG_COLOR (MSGTAG_GROUP(255) | 0)
#define MSGTAG_SCALE (MSGTAG_GROUP(255) | 1)
#define MSGTAG_RUBY (MSGTAG_GROUP(255) | 2)
#endif /* D_MSG_D_MSG_CLASS_H */
+2 -1
View File
@@ -13,6 +13,7 @@ class dMsgString_c;
struct jmessage_tReference;
struct jmessage_tRenderingProcessor;
struct jmessage_tSequenceProcessor;
struct jmessage_tControl;
class dMsgObject_c : public msg_class {
public:
@@ -55,7 +56,7 @@ public:
char*, char*, s16*);
/* 802370A8 */ u8 isGetItemMessage();
/* 802370BC */ bool isKanbanMessage();
/* 802370E8 */ u8 isHowlMessage();
/* 802370E8 */ bool isHowlMessage();
/* 802370FC */ bool isMidonaMessage();
/* 80237138 */ bool isMidonaNormalTalkWait();
/* 802371B0 */ bool isMidonaTalkWait();