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
+39 -41
View File
@@ -1,60 +1,58 @@
//
// Generated By: dol2asm
// Translation Unit: locale
//
#include "JSystem/JMessage/locale.h"
#include <dolphin.h>
/* 802A9528-802A958C 2A3E68 0064+00 0/0 1/0 0/0 .text
* parseCharacter_ShiftJIS__Q28JMessage6localeFPPCc */
int JMessage::locale::parseCharacter_ShiftJIS(char const** str) {
u8 c = **str;
int ret = c;
*str = *str + 1;
int JMessage::locale::parseCharacter_ShiftJIS(const char** ppszText) {
int c = *(u8*)*ppszText & 0xFF;
(*ppszText)++;
if (isLeadByte_ShiftJIS(c)) {
ret <<= 8;
ret |= *(u8*)*str;
*str = *str + 1;
c <<= 8;
c |= *(u8*)*ppszText & 0xFF;
(*ppszText)++;
}
return ret;
return c;
}
/* 802A958C-802A968C 2A3ECC 0100+00 0/0 1/0 0/0 .text parseCharacter_UTF8__Q28JMessage6localeFPPCc
*/
int JMessage::locale::parseCharacter_UTF8(char const** str) {
int c = *(u8*)*str;
int ret = c;
*str = *str + 1;
int JMessage::locale::parseCharacter_UTF8(const char** ppszText) {
int c = *(u8*)*ppszText & 0xFF;
(*ppszText)++;
if (c & 0x80) {
if ((c & 0xe0) == 0xc0) {
ret = (ret & 0x1f) << 6;
ret |= **str & 0x3f;
*str = *str + 1;
} else if ((c & 0xf0) == 0xe0) {
ret = (ret & 0xf) << 6;
ret |= **str & 0x3f;
*str = *str + 1;
ret <<= 6;
ret |= **str & 0x3f;
*str = *str + 1;
} else if ((c & 0xf8) == 0xf0) {
ret = (ret & 0x7) << 6;
ret |= **str & 0x3f;
*str = *str + 1;
ret <<= 6;
ret |= **str & 0x3f;
*str = *str + 1;
ret <<= 6;
ret |= **str & 0x3f;
*str = *str + 1;
if ((c & 0xE0) == 0xC0) {
c &= 0x1F;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
} else if ((c & 0xF0) == 0xE0) {
c &= 0xF;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
} else if ((c & 0xF8) == 0xF0) {
c &= 0x7;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
c <<= 6;
c |= (*(u8*)*ppszText & 0xFF) & 0x3F;
(*ppszText)++;
} else {
ret = -1;
c = -1;
}
}
return ret;
return c;
}