diff options
| author | Caroline Madsen <69010899+randomsalience@users.noreply.github.com> | 2025-04-09 16:45:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-09 13:45:30 -0700 |
| commit | c6f76e7240dde8bbcf40a88d6d88cf87cab616b4 (patch) | |
| tree | bf9afbb1c32e66f45bdba30f61a9e4f0d92f804a /include/JSystem/JMessage | |
| parent | 6672817e41064e04951ec28d51070b66fc8377ac (diff) | |
Various JSystem work (#2383)
* JKernel and JStudio cleanup
* JMessage cleanup
* JAudio cleanup
* JASBNKParser work
* functionvalue work
* fvb work
* J2D and J3D cleanup
* steal from tww
* J2DPictureEx mostly done
* fix build
Diffstat (limited to 'include/JSystem/JMessage')
| -rw-r--r-- | include/JSystem/JMessage/data.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JMessage/processor.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JMessage/resource.h | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/JSystem/JMessage/data.h b/include/JSystem/JMessage/data.h index a89f6e1d70..6dcf003652 100644 --- a/include/JSystem/JMessage/data.h +++ b/include/JSystem/JMessage/data.h @@ -45,8 +45,8 @@ struct data { char* get() const { return (char*)getRaw(); } u8 get_formSupplement() const { return *(u8*)(get() + 0xB); } - u16 get_number() const { return *(u16*)(get() + 0x8); } - char* getContent() const { return (char*)get() + 0x10; } + 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; } bool get_isOrdered() const { return *(u8*)(get() + 0xA) & 0xF0; } }; diff --git a/include/JSystem/JMessage/processor.h b/include/JSystem/JMessage/processor.h index 0d55e8d00f..858aa27f93 100644 --- a/include/JSystem/JMessage/processor.h +++ b/include/JSystem/JMessage/processor.h @@ -108,8 +108,10 @@ struct 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) const; - /* 802A8C44 */ const char* getMessageText_messageCode(u32) const; + /* 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); + } /* 802A7B48 */ virtual ~TProcessor(); /* 802A7FC0 */ virtual void do_reset(); diff --git a/include/JSystem/JMessage/resource.h b/include/JSystem/JMessage/resource.h index 4a4b990dc3..9462b3b34d 100644 --- a/include/JSystem/JMessage/resource.h +++ b/include/JSystem/JMessage/resource.h @@ -4,7 +4,6 @@ #include "JSystem/JGadget/linklist.h" #include "JSystem/JMessage/data.h" #include "JSystem/JMessage/locale.h" -#include "JSystem/JStudio/JStudio/fvb-data.h" namespace JMessage { @@ -114,7 +113,7 @@ struct TResourceContainer { static JMessage::locale::parseCharacter_function sapfnParseCharacter_[5]; /* 0x00 */ u8 mEncodingType; - /* 0x04 */ int (*pfnParseCharacter_)(const char** string); + /* 0x04 */ JMessage::locale::parseCharacter_function pfnParseCharacter_; /* 0x08 */ TCResource resContainer_; /* 0x18 */ TResource_color resColor_; }; |
