Skip to content

Commit

Permalink
rank <-> chapter switcheroo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alto1772 committed Nov 20, 2023
1 parent 5b8ec18 commit 034254f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -5596,8 +5596,8 @@ enum MsgChars {
MSG_CHAR_MULTIBYTE_FIRST = 0x5F,
MSG_CHAR_MULTIBYTE_LAST = 0x8F,
MSG_CHAR_ZH_START = 0xA6,
MSG_CHAR_ZH_CHAPTER = 0x33F, //
MSG_CHAR_ZH_RANK = 0x340, //
MSG_CHAR_ZH_RANK = 0x33F, //
MSG_CHAR_ZH_CHAPTER = 0x340, //
#endif

MSG_CHAR_UNK_C3 = 0xC3,
Expand Down
12 changes: 6 additions & 6 deletions src/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3714,9 +3714,9 @@ void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32
s32 dsdx, dtdy;

#if VERSION_IQUE
if (charIndex == MSG_CHAR_ZH_CHAPTER) {
if (charIndex == MSG_CHAR_ZH_RANK) {
load_font_data(charset_standard_OFFSET + 0x19F80, sizeof(D_801544A0[0]), D_801544A0[0]);
} else if (charIndex == MSG_CHAR_ZH_RANK) {
} else if (charIndex == MSG_CHAR_ZH_CHAPTER) {
load_font_data(charset_standard_OFFSET + 0x1A000, sizeof(D_801544A0[0]), D_801544A0[1]);
} else if (charIndex >= MSG_CHAR_ZH_START) {
load_font_data(charset_standard_OFFSET + charIndex, sizeof(D_801544A0[0]), D_801544A0[D_8014AD24]);
Expand Down Expand Up @@ -3781,8 +3781,8 @@ void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32

if (messageCharset->texSize.x >= 16 && messageCharset->texSize.x % 16 == 0) {
#if VERSION_IQUE
if (charIndex == MSG_CHAR_ZH_CHAPTER || charIndex == MSG_CHAR_ZH_RANK) {
gDPLoadTextureBlock_4b(gMainGfxPos++, D_801544A0[charIndex - MSG_CHAR_ZH_CHAPTER], G_IM_FMT_CI,
if (charIndex == MSG_CHAR_ZH_RANK || charIndex == MSG_CHAR_ZH_CHAPTER) {
gDPLoadTextureBlock_4b(gMainGfxPos++, D_801544A0[charIndex - MSG_CHAR_ZH_RANK], G_IM_FMT_CI,
messageCharset->texSize.x, messageCharset->texSize.y, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
} else if (charIndex >= MSG_CHAR_ZH_START) {
Expand All @@ -3799,8 +3799,8 @@ void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32
#endif
} else {
#if VERSION_IQUE
if (charIndex == MSG_CHAR_ZH_CHAPTER || charIndex == MSG_CHAR_ZH_RANK) {
gDPLoadTextureTile_4b(gMainGfxPos++, D_801544A0[charIndex - MSG_CHAR_ZH_CHAPTER], G_IM_FMT_CI,
if (charIndex == MSG_CHAR_ZH_RANK || charIndex == MSG_CHAR_ZH_CHAPTER) {
gDPLoadTextureTile_4b(gMainGfxPos++, D_801544A0[charIndex - MSG_CHAR_ZH_RANK], G_IM_FMT_CI,
messageCharset->texSize.x, messageCharset->texSize.y,
0, 0, messageCharset->texSize.x - 1, messageCharset->texSize.y - 1, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
Expand Down
3 changes: 2 additions & 1 deletion src/msg_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ MessageCharset* MsgCharsets[] = {
NULL
};

Addr MsgLetterRasterOffsets[] = {
u8 *MsgLetterRasterOffsets[] = {
charset_letter_content_1_OFFSET,
charset_letter_content_2_OFFSET,
charset_letter_content_3_OFFSET,
Expand All @@ -328,6 +328,7 @@ Addr MsgLetterRasterOffsets[] = {
charset_letter_content_12_OFFSET,
};

// TODO: palette offsets
s32 MsgLetterPaletteOffsets[] = {
#if VERSION_IQUE
0x00058890, 0x0005A490, 0x0005C090, 0x0005DC90,
Expand Down

0 comments on commit 034254f

Please sign in to comment.