From 7d84c87939863d27550efc64ed9681d5300aa562 Mon Sep 17 00:00:00 2001 From: Ethan Date: Thu, 12 Sep 2024 22:16:57 +0900 Subject: [PATCH] fix sym types --- src/msg.c | 8 ++++---- src/msg_data.c | 52 +++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/msg.c b/src/msg.c index d87b73a7d9..1ce73c0953 100644 --- a/src/msg.c +++ b/src/msg.c @@ -632,8 +632,8 @@ void msg_play_speech_sound(MessagePrintState* printer, u8 character) { extern s32 gItemIconRasterOffsets[]; extern s32 gItemIconPaletteOffsets[]; -extern s32 MsgLetterRasterOffsets[]; -extern s32 MsgLetterPaletteOffsets[]; +extern u8* MsgLetterRasterOffsets[]; +extern u16* MsgLetterPaletteOffsets[]; extern MsgVoice MsgVoices[]; #if VERSION_PAL @@ -807,10 +807,10 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { romAddr = charset_ROM_START + (s32)charset_postcard_pal_OFFSET; dma_copy(romAddr, romAddr + 0x20, printer->letterBackgroundPal); printer->letterContentImg = heap_malloc(charset_letter_content_1_png_width * charset_letter_content_1_png_height); - romAddr = charset_ROM_START + MsgLetterRasterOffsets[arg]; + romAddr = charset_ROM_START + (s32) MsgLetterRasterOffsets[arg]; dma_copy(romAddr, romAddr + (charset_letter_content_1_png_width * charset_letter_content_1_png_height), printer->letterContentImg); printer->letterContentPal = heap_malloc(0x200); - romAddr = charset_ROM_START + MsgLetterPaletteOffsets[arg]; + romAddr = charset_ROM_START + (s32) MsgLetterPaletteOffsets[arg]; dma_copy(romAddr, romAddr + 0x200, printer->letterContentPal); break; case MSG_STYLE_POPUP: diff --git a/src/msg_data.c b/src/msg_data.c index 70c23ce784..01e39fde75 100644 --- a/src/msg_data.c +++ b/src/msg_data.c @@ -875,34 +875,34 @@ MessageCharset* MsgCharsets[] = { NULL }; -s32 MsgLetterRasterOffsets[] = { - (s32) charset_letter_content_1_OFFSET, - (s32) charset_letter_content_2_OFFSET, - (s32) charset_letter_content_3_OFFSET, - (s32) charset_letter_content_4_OFFSET, - (s32) charset_letter_content_5_OFFSET, - (s32) charset_letter_content_6_OFFSET, - (s32) charset_letter_content_7_OFFSET, - (s32) charset_letter_content_8_OFFSET, - (s32) charset_letter_content_9_OFFSET, - (s32) charset_letter_content_10_OFFSET, - (s32) charset_letter_content_11_OFFSET, - (s32) charset_letter_content_12_OFFSET, +u8* MsgLetterRasterOffsets[] = { + charset_letter_content_1_OFFSET, + charset_letter_content_2_OFFSET, + charset_letter_content_3_OFFSET, + charset_letter_content_4_OFFSET, + charset_letter_content_5_OFFSET, + charset_letter_content_6_OFFSET, + charset_letter_content_7_OFFSET, + charset_letter_content_8_OFFSET, + charset_letter_content_9_OFFSET, + charset_letter_content_10_OFFSET, + charset_letter_content_11_OFFSET, + charset_letter_content_12_OFFSET, }; -s32 MsgLetterPaletteOffsets[] = { - (s32) charset_letter_content_1_pal_OFFSET, - (s32) charset_letter_content_2_pal_OFFSET, - (s32) charset_letter_content_3_pal_OFFSET, - (s32) charset_letter_content_4_pal_OFFSET, - (s32) charset_letter_content_5_pal_OFFSET, - (s32) charset_letter_content_6_pal_OFFSET, - (s32) charset_letter_content_7_pal_OFFSET, - (s32) charset_letter_content_8_pal_OFFSET, - (s32) charset_letter_content_9_pal_OFFSET, - (s32) charset_letter_content_10_pal_OFFSET, - (s32) charset_letter_content_11_pal_OFFSET, - (s32) charset_letter_content_12_pal_OFFSET, +u16* MsgLetterPaletteOffsets[] = { + charset_letter_content_1_pal_OFFSET, + charset_letter_content_2_pal_OFFSET, + charset_letter_content_3_pal_OFFSET, + charset_letter_content_4_pal_OFFSET, + charset_letter_content_5_pal_OFFSET, + charset_letter_content_6_pal_OFFSET, + charset_letter_content_7_pal_OFFSET, + charset_letter_content_8_pal_OFFSET, + charset_letter_content_9_pal_OFFSET, + charset_letter_content_10_pal_OFFSET, + charset_letter_content_11_pal_OFFSET, + charset_letter_content_12_pal_OFFSET, }; MsgVoice MsgVoices[] = {