From bfe9a42b0665bb975499d884195115a5a77bb9f0 Mon Sep 17 00:00:00 2001 From: AltoXorg <56553686+Alto1772@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:13:54 +0800 Subject: [PATCH] some JP decomp (#1149) * main segment cleanup * engine1 * engine4 * evt * entity * engine2 msg split * engine2 draft * identify all gu functions * font_width + charset * update msg ids * os stuff * msg stuffs * msg_copy_to_print_buffer * popup_menu_draw_menu_contents * appendGfx_message * cleanup * building fixed * Change exceptasm symbols to not be global --------- Co-authored-by: Ethan --- include/common_structs.h | 12 +- include/enums.h | 368 +++ src/101b90_len_8f0.c | 2 + src/8a860_len_3f30.c | 428 ++- src/entity.c | 9 + src/entity/Block.c | 19 + src/entity/BlueWarpPipe.c | 5 + src/entity/Chest.c | 5 + src/entity/HeartBlock.c | 7 + src/entity/HiddenPanel.c | 5 + src/entity/ItemBlock.c | 19 + src/entity/SaveBlock.c | 5 + src/entity/ShatteringBlock.c | 11 + src/entity/Signpost.c | 5 + src/entity/SimpleSpring.c | 11 + src/entity/SuperBlock.c | 11 + src/entity/Switch.c | 9 + src/entity/WoodenCrate.c | 5 + src/evt/demo_api.c | 5 + src/imgfx.c | 5 + src/item_entity.c | 83 +- src/msg.c | 2155 +------------ src/msg_data.c | 611 +++- src/msg_draw.c | 2225 ++++++++++++++ src/msg_img.c | 12 + src/os/initialize.c | 6 - tools/splat_ext/msg_jp.yaml | 46 + tools/splat_ext/pm_charset.py | 29 +- tools/splat_ext/pm_charset_palettes.py | 21 +- .../{msg => msg_draw}/appendGfx_message.s | 0 ver/ique/asm/os/exceptasm.s | 8 +- ver/ique/splat.yaml | 2 + ver/jp/asm/bss3.s | 682 +++++ ver/jp/asm/data/os/exceptasm.rodata.s | 54 - ver/jp/asm/data/os/osSetIntMask.rodata.s | 71 - ver/jp/asm/os/__osGetSR.s | 2 +- ver/jp/asm/os/exceptasm.s | 84 +- ver/jp/asm/os/guMtxIdent.s | 2 +- ver/jp/asm/os/guScale.s | 2 +- ver/jp/asm/os/guTranslate.s | 2 +- ver/jp/asm/os/osSetIntMask.s | 68 + ver/jp/asm/os/parameters.s | 61 +- ver/jp/splat.yaml | 766 ++++- ver/jp/symbol_addrs.txt | 2679 +++++++++++++++++ ver/jp/undefined_syms.txt | 535 ++-- .../{msg => msg_draw}/appendGfx_message.s | 0 ver/pal/splat.yaml | 2 + ver/us/asm/os/exceptasm.s | 88 +- ver/us/splat.yaml | 3 + 49 files changed, 8477 insertions(+), 2768 deletions(-) create mode 100644 src/msg_draw.c rename ver/ique/asm/nonmatchings/{msg => msg_draw}/appendGfx_message.s (100%) create mode 100644 ver/jp/asm/bss3.s delete mode 100644 ver/jp/asm/data/os/exceptasm.rodata.s delete mode 100644 ver/jp/asm/data/os/osSetIntMask.rodata.s rename ver/pal/asm/nonmatchings/{msg => msg_draw}/appendGfx_message.s (100%) diff --git a/include/common_structs.h b/include/common_structs.h index e0d5a17610..3df65a10c3 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1168,6 +1168,12 @@ typedef struct ItemEntity { /* 0x58 */ s32 sparkleHeight; } ItemEntity; // size = 0x5C +#if VERSION_JP +#define PRINT_BUFFER_SIZE 1024 +#else +#define PRINT_BUFFER_SIZE 1088 // slightly larger than source buffer +#endif + typedef struct MessagePrintState { /* 0x000 */ u8* srcBuffer; /* 0x004 */ u16 printBufferPos; @@ -1175,7 +1181,7 @@ typedef struct MessagePrintState { /* 0x008 */ s32 msgID; /* 0x00C */ u16 srcBufferPos; /* 0x00E */ u16 curPrintDelay; - /* 0x010 */ u8 printBuffer[1088]; // slightly larger than source buffer + /* 0x010 */ u8 printBuffer[PRINT_BUFFER_SIZE]; /* 0x450 */ s16 printBufferSize; /* 0x452 */ u16 effectFrameCounter; /* 0x454 */ u8 font; @@ -1258,8 +1264,10 @@ typedef struct MessagePrintState { /* 0x548 */ PAL_PTR letterBackgroundPal; /* 0x54C */ IMG_PTR letterContentImg; /* 0x550 */ PAL_PTR letterContentPal; +#if !VERSION_JP /* 0x554 */ char unk_554[0x4]; -} MessagePrintState; // size = 0x558 +#endif +} MessagePrintState; // size = 0x558, JP size = 0x514 typedef struct MessageDrawState { /* 0x00 */ s32 clipX[2]; // characters beyond this pos get skipped diff --git a/include/enums.h b/include/enums.h index aef7209701..cb271c0dc7 100644 --- a/include/enums.h +++ b/include/enums.h @@ -5444,6 +5444,373 @@ enum MsgPalettes { }; enum MsgChars { +#if VERSION_JP + // Variant 0 - Hiragana, Katakana, Numeric, Fullwidth Symbols + MSG_CHAR_HIRAGANA_A = 0x00, + MSG_CHAR_HIRAGANA_I = 0x01, + MSG_CHAR_HIRAGANA_U = 0x02, + MSG_CHAR_HIRAGANA_E = 0x03, + MSG_CHAR_HIRAGANA_O = 0x04, + MSG_CHAR_HIRAGANA_KA = 0x05, + MSG_CHAR_HIRAGANA_KI = 0x06, + MSG_CHAR_HIRAGANA_KU = 0x07, + MSG_CHAR_HIRAGANA_KE = 0x08, + MSG_CHAR_HIRAGANA_KO = 0x09, + MSG_CHAR_HIRAGANA_SA = 0x0A, + MSG_CHAR_HIRAGANA_SI = 0x0B, + MSG_CHAR_HIRAGANA_SU = 0x0C, + MSG_CHAR_HIRAGANA_SE = 0x0D, + MSG_CHAR_HIRAGANA_SO = 0x0E, + MSG_CHAR_HIRAGANA_TA = 0x0F, + MSG_CHAR_HIRAGANA_TI = 0x10, + MSG_CHAR_HIRAGANA_TU = 0x11, + MSG_CHAR_HIRAGANA_TE = 0x12, + MSG_CHAR_HIRAGANA_TO = 0x13, + MSG_CHAR_HIRAGANA_NA = 0x14, + MSG_CHAR_HIRAGANA_NI = 0x15, + MSG_CHAR_HIRAGANA_NU = 0x16, + MSG_CHAR_HIRAGANA_NE = 0x17, + MSG_CHAR_HIRAGANA_NO = 0x18, + MSG_CHAR_HIRAGANA_HA = 0x19, + MSG_CHAR_HIRAGANA_HI = 0x1A, + MSG_CHAR_HIRAGANA_HU = 0x1B, + MSG_CHAR_HIRAGANA_HE = 0x1C, + MSG_CHAR_HIRAGANA_HO = 0x1D, + MSG_CHAR_HIRAGANA_MA = 0x1E, + MSG_CHAR_HIRAGANA_MI = 0x1F, + MSG_CHAR_HIRAGANA_MU = 0x20, + MSG_CHAR_HIRAGANA_ME = 0x21, + MSG_CHAR_HIRAGANA_MO = 0x22, + MSG_CHAR_HIRAGANA_YA = 0x23, + MSG_CHAR_HIRAGANA_YU = 0x24, + MSG_CHAR_HIRAGANA_YO = 0x25, + MSG_CHAR_HIRAGANA_RA = 0x26, + MSG_CHAR_HIRAGANA_RI = 0x27, + MSG_CHAR_HIRAGANA_RU = 0x28, + MSG_CHAR_HIRAGANA_RE = 0x29, + MSG_CHAR_HIRAGANA_RO = 0x2A, + MSG_CHAR_HIRAGANA_WA = 0x2B, + MSG_CHAR_HIRAGANA_WO = 0x2C, + MSG_CHAR_HIRAGANA_N = 0x2D, + MSG_CHAR_HIRAGANA_VU = 0x2E, + MSG_CHAR_HIRAGANA_GA = 0x2F, + MSG_CHAR_HIRAGANA_GI = 0x30, + MSG_CHAR_HIRAGANA_GU = 0x31, + MSG_CHAR_HIRAGANA_GE = 0x32, + MSG_CHAR_HIRAGANA_GO = 0x33, + MSG_CHAR_HIRAGANA_ZA = 0x34, + MSG_CHAR_HIRAGANA_ZI = 0x35, + MSG_CHAR_HIRAGANA_ZU = 0x36, + MSG_CHAR_HIRAGANA_ZE = 0x37, + MSG_CHAR_HIRAGANA_ZO = 0x38, + MSG_CHAR_HIRAGANA_DA = 0x39, + MSG_CHAR_HIRAGANA_DI = 0x3A, + MSG_CHAR_HIRAGANA_DU = 0x3B, + MSG_CHAR_HIRAGANA_DE = 0x3C, + MSG_CHAR_HIRAGANA_DO = 0x3D, + MSG_CHAR_HIRAGANA_BA = 0x3E, + MSG_CHAR_HIRAGANA_BI = 0x3F, + MSG_CHAR_HIRAGANA_BU = 0x40, + MSG_CHAR_HIRAGANA_BE = 0x41, + MSG_CHAR_HIRAGANA_BO = 0x42, + MSG_CHAR_HIRAGANA_PA = 0x43, + MSG_CHAR_HIRAGANA_PI = 0x44, + MSG_CHAR_HIRAGANA_PU = 0x45, + MSG_CHAR_HIRAGANA_PE = 0x46, + MSG_CHAR_HIRAGANA_PO = 0x47, + MSG_CHAR_HIRAGANA_SMALL_A = 0x48, + MSG_CHAR_HIRAGANA_SMALL_I = 0x49, + MSG_CHAR_HIRAGANA_SMALL_U = 0x4A, + MSG_CHAR_HIRAGANA_SMALL_E = 0x4B, + MSG_CHAR_HIRAGANA_SMALL_O = 0x4C, + MSG_CHAR_HIRAGANA_SMALL_TU = 0x4D, + MSG_CHAR_HIRAGANA_SMALL_YA = 0x4E, + MSG_CHAR_HIRAGANA_SMALL_YU = 0x4F, + MSG_CHAR_HIRAGANA_SMALL_YO = 0x50, + MSG_CHAR_KATAKANA_A = 0x51, + MSG_CHAR_KATAKANA_I = 0x52, + MSG_CHAR_KATAKANA_U = 0x53, + MSG_CHAR_KATAKANA_E = 0x54, + MSG_CHAR_KATAKANA_O = 0x55, + MSG_CHAR_KATAKANA_KA = 0x56, + MSG_CHAR_KATAKANA_KI = 0x57, + MSG_CHAR_KATAKANA_KU = 0x58, + MSG_CHAR_KATAKANA_KE = 0x59, + MSG_CHAR_KATAKANA_KO = 0x5A, + MSG_CHAR_KATAKANA_SA = 0x5B, + MSG_CHAR_KATAKANA_SI = 0x5C, + MSG_CHAR_KATAKANA_SU = 0x5D, + MSG_CHAR_KATAKANA_SE = 0x5E, + MSG_CHAR_KATAKANA_SO = 0x5F, + MSG_CHAR_KATAKANA_TA = 0x60, + MSG_CHAR_KATAKANA_TI = 0x61, + MSG_CHAR_KATAKANA_TU = 0x62, + MSG_CHAR_KATAKANA_TE = 0x63, + MSG_CHAR_KATAKANA_TO = 0x64, + MSG_CHAR_KATAKANA_NA = 0x65, + MSG_CHAR_KATAKANA_NI = 0x66, + MSG_CHAR_KATAKANA_NU = 0x67, + MSG_CHAR_KATAKANA_NE = 0x68, + MSG_CHAR_KATAKANA_NO = 0x69, + MSG_CHAR_KATAKANA_HA = 0x6A, + MSG_CHAR_KATAKANA_HI = 0x6B, + MSG_CHAR_KATAKANA_HU = 0x6C, + MSG_CHAR_KATAKANA_HE = 0x6D, + MSG_CHAR_KATAKANA_HO = 0x6E, + MSG_CHAR_KATAKANA_MA = 0x6F, + MSG_CHAR_KATAKANA_MI = 0x70, + MSG_CHAR_KATAKANA_MU = 0x71, + MSG_CHAR_KATAKANA_ME = 0x72, + MSG_CHAR_KATAKANA_MO = 0x73, + MSG_CHAR_KATAKANA_YA = 0x74, + MSG_CHAR_KATAKANA_YU = 0x75, + MSG_CHAR_KATAKANA_YO = 0x76, + MSG_CHAR_KATAKANA_RA = 0x77, + MSG_CHAR_KATAKANA_RI = 0x78, + MSG_CHAR_KATAKANA_RU = 0x79, + MSG_CHAR_KATAKANA_RE = 0x7A, + MSG_CHAR_KATAKANA_RO = 0x7B, + MSG_CHAR_KATAKANA_WA = 0x7C, + MSG_CHAR_KATAKANA_WO = 0x7D, + MSG_CHAR_KATAKANA_N = 0x7E, + MSG_CHAR_KATAKANA_VU = 0x7F, + MSG_CHAR_KATAKANA_GA = 0x80, + MSG_CHAR_KATAKANA_GI = 0x81, + MSG_CHAR_KATAKANA_GU = 0x82, + MSG_CHAR_KATAKANA_GE = 0x83, + MSG_CHAR_KATAKANA_GO = 0x84, + MSG_CHAR_KATAKANA_ZA = 0x85, + MSG_CHAR_KATAKANA_ZI = 0x86, + MSG_CHAR_KATAKANA_ZU = 0x87, + MSG_CHAR_KATAKANA_ZE = 0x88, + MSG_CHAR_KATAKANA_ZO = 0x89, + MSG_CHAR_KATAKANA_DA = 0x8A, + MSG_CHAR_KATAKANA_DI = 0x8B, + MSG_CHAR_KATAKANA_DU = 0x8C, + MSG_CHAR_KATAKANA_DE = 0x8D, + MSG_CHAR_KATAKANA_DO = 0x8E, + MSG_CHAR_KATAKANA_BA = 0x8F, + MSG_CHAR_KATAKANA_BI = 0x90, + MSG_CHAR_KATAKANA_BU = 0x91, + MSG_CHAR_KATAKANA_BE = 0x92, + MSG_CHAR_KATAKANA_BO = 0x93, + MSG_CHAR_KATAKANA_PA = 0x94, + MSG_CHAR_KATAKANA_PI = 0x95, + MSG_CHAR_KATAKANA_PU = 0x96, + MSG_CHAR_KATAKANA_PE = 0x97, + MSG_CHAR_KATAKANA_PO = 0x98, + MSG_CHAR_KATAKANA_SMALL_A = 0x99, + MSG_CHAR_KATAKANA_SMALL_I = 0x9A, + MSG_CHAR_KATAKANA_SMALL_U = 0x9B, + MSG_CHAR_KATAKANA_SMALL_E = 0x9C, + MSG_CHAR_KATAKANA_SMALL_O = 0x9D, + MSG_CHAR_KATAKANA_SMALL_TU = 0x9E, + MSG_CHAR_KATAKANA_SMALL_YA = 0x9F, + MSG_CHAR_KATAKANA_SMALL_YU = 0xA0, + MSG_CHAR_KATAKANA_SMALL_YO = 0xA1, + MSG_CHAR_PROLONGED_SOUND = 0xA2, + MSG_CHAR_TILDE = 0xA3, + MSG_CHAR_LONGDASH_0 = 0xA4, + MSG_CHAR_LONGDASH_1 = 0xA5, + MSG_CHAR_LONGDASH_2 = 0xA6, + MSG_CHAR_DIGIT_0 = 0xA7, + MSG_CHAR_DIGIT_1 = 0xA8, + MSG_CHAR_DIGIT_2 = 0xA9, + MSG_CHAR_DIGIT_3 = 0xAA, + MSG_CHAR_DIGIT_4 = 0xAB, + MSG_CHAR_DIGIT_5 = 0xAC, + MSG_CHAR_DIGIT_6 = 0xAD, + MSG_CHAR_DIGIT_7 = 0xAE, + MSG_CHAR_DIGIT_8 = 0xAF, + MSG_CHAR_DIGIT_9 = 0xB0, + MSG_CHAR_UP = 0xB1, + MSG_CHAR_DOWN = 0xB2, + MSG_CHAR_LEFT = 0xB3, + MSG_CHAR_RIGHT = 0xB4, + MSG_CHAR_EXCLAMATION = 0xB5, + MSG_CHAR_QUESTION = 0xB6, + MSG_CHAR_PLUS = 0xB7, + MSG_CHAR_MINUS = 0xB8, + MSG_CHAR_FORWARDSLASH = 0xB9, + MSG_CHAR_PERIOD = 0xBA, + MSG_CHAR_AND = 0xBB, + MSG_CHAR_HASH = 0xBC, + MSG_CHAR_HEART = 0xBD, + MSG_CHAR_STAR = 0xBE, + MSG_CHAR_LPAREN = 0xBF, + MSG_CHAR_RPAREN = 0xC0, + MSG_CHAR_TLBRACKET = 0xC1, + MSG_CHAR_BRBRACKET = 0xC2, + MSG_CHAR_MIDDLE_DOT = 0xC3, + MSG_CHAR_HIRAGANA_SMALL_N = 0xC4, + MSG_CHAR_KATAKANA_SMALL_N = 0xC5, + MSG_CHAR_KANJI_C6 = 0xC6, + MSG_CHAR_KANJI_C7 = 0xC7, + + // Variant 1 - Latin Alphabet + MSG_CHAR_UPPER_A = 0x00, + MSG_CHAR_UPPER_B = 0x01, + MSG_CHAR_UPPER_C = 0x02, + MSG_CHAR_UPPER_D = 0x03, + MSG_CHAR_UPPER_E = 0x04, + MSG_CHAR_UPPER_F = 0x05, + MSG_CHAR_UPPER_G = 0x06, + MSG_CHAR_UPPER_H = 0x07, + MSG_CHAR_UPPER_I = 0x08, + MSG_CHAR_UPPER_J = 0x09, + MSG_CHAR_UPPER_K = 0x0A, + MSG_CHAR_UPPER_L = 0x0B, + MSG_CHAR_UPPER_M = 0x0C, + MSG_CHAR_UPPER_N = 0x0D, + MSG_CHAR_UPPER_O = 0x0E, + MSG_CHAR_UPPER_P = 0x0F, + MSG_CHAR_UPPER_Q = 0x10, + MSG_CHAR_UPPER_R = 0x11, + MSG_CHAR_UPPER_S = 0x12, + MSG_CHAR_UPPER_T = 0x13, + MSG_CHAR_UPPER_U = 0x14, + MSG_CHAR_UPPER_V = 0x15, + MSG_CHAR_UPPER_W = 0x16, + MSG_CHAR_UPPER_X = 0x17, + MSG_CHAR_UPPER_Y = 0x18, + MSG_CHAR_UPPER_Z = 0x19, + MSG_CHAR_LOWER_Z = 0x1A, + + // Variant 2 - Kanji (Chinese) characters + MSG_CHAR_KANJI_00 = 0x00, + MSG_CHAR_KANJI_01 = 0x01, + MSG_CHAR_KANJI_02 = 0x02, + MSG_CHAR_KANJI_03 = 0x03, + MSG_CHAR_KANJI_04 = 0x04, + MSG_CHAR_KANJI_05 = 0x05, + MSG_CHAR_KANJI_06 = 0x06, + MSG_CHAR_KANJI_07 = 0x07, + MSG_CHAR_KANJI_08 = 0x08, + MSG_CHAR_KANJI_09 = 0x09, + MSG_CHAR_KANJI_0A = 0x0A, + MSG_CHAR_KANJI_0B = 0x0B, + MSG_CHAR_KANJI_0C = 0x0C, + MSG_CHAR_KANJI_0D = 0x0D, + MSG_CHAR_KANJI_0E = 0x0E, + MSG_CHAR_KANJI_0F = 0x0F, + MSG_CHAR_KANJI_10 = 0x10, + MSG_CHAR_KANJI_11 = 0x11, + MSG_CHAR_KANJI_12 = 0x12, + MSG_CHAR_KANJI_13 = 0x13, + MSG_CHAR_KANJI_14 = 0x14, + MSG_CHAR_KANJI_15 = 0x15, + MSG_CHAR_KANJI_16 = 0x16, + MSG_CHAR_KANJI_17 = 0x17, + MSG_CHAR_KANJI_18 = 0x18, + MSG_CHAR_KANJI_19 = 0x19, + MSG_CHAR_KANJI_1A = 0x1A, + MSG_CHAR_KANJI_1B = 0x1B, + MSG_CHAR_KANJI_1C = 0x1C, + MSG_CHAR_KANJI_1D = 0x1D, + MSG_CHAR_KANJI_1E = 0x1E, + MSG_CHAR_KANJI_1F = 0x1F, + MSG_CHAR_KANJI_20 = 0x20, + MSG_CHAR_KANJI_21 = 0x21, + MSG_CHAR_KANJI_22 = 0x22, + MSG_CHAR_KANJI_23 = 0x23, + MSG_CHAR_KANJI_24 = 0x24, + MSG_CHAR_KANJI_25 = 0x25, + MSG_CHAR_KANJI_26 = 0x26, + MSG_CHAR_KANJI_27 = 0x27, + MSG_CHAR_KANJI_28 = 0x28, + MSG_CHAR_KANJI_29 = 0x29, + MSG_CHAR_KANJI_2A = 0x2A, + MSG_CHAR_KANJI_2B = 0x2B, + MSG_CHAR_KANJI_2C = 0x2C, + MSG_CHAR_KANJI_2D = 0x2D, + MSG_CHAR_KANJI_2E = 0x2E, + MSG_CHAR_KANJI_2F = 0x2F, + MSG_CHAR_KANJI_30 = 0x30, + MSG_CHAR_KANJI_31 = 0x31, + MSG_CHAR_KANJI_32 = 0x32, + MSG_CHAR_KANJI_33 = 0x33, + MSG_CHAR_KANJI_34 = 0x34, + MSG_CHAR_KANJI_35 = 0x35, + MSG_CHAR_KANJI_36 = 0x36, + MSG_CHAR_KANJI_37 = 0x37, + MSG_CHAR_KANJI_38 = 0x38, + MSG_CHAR_KANJI_39 = 0x39, + MSG_CHAR_KANJI_3A = 0x3A, + MSG_CHAR_KANJI_3B = 0x3B, + MSG_CHAR_KANJI_3C = 0x3C, + MSG_CHAR_KANJI_3D = 0x3D, + MSG_CHAR_KANJI_3E = 0x3E, + MSG_CHAR_KANJI_3F = 0x3F, + MSG_CHAR_KANJI_40 = 0x40, + MSG_CHAR_KANJI_41 = 0x41, + MSG_CHAR_KANJI_42 = 0x42, + MSG_CHAR_KANJI_43 = 0x43, + MSG_CHAR_KANJI_44 = 0x44, + MSG_CHAR_KANJI_45 = 0x45, + MSG_CHAR_KANJI_46 = 0x46, + MSG_CHAR_KANJI_47 = 0x47, + MSG_CHAR_KANJI_48 = 0x48, + MSG_CHAR_KANJI_49 = 0x49, + MSG_CHAR_KANJI_4A = 0x4A, + MSG_CHAR_KANJI_4B = 0x4B, + MSG_CHAR_KANJI_4C = 0x4C, + MSG_CHAR_KANJI_4D = 0x4D, + MSG_CHAR_KANJI_4E = 0x4E, + MSG_CHAR_KANJI_4F = 0x4F, + MSG_CHAR_KANJI_50 = 0x50, + MSG_CHAR_KANJI_51 = 0x51, + MSG_CHAR_KANJI_52 = 0x52, + MSG_CHAR_KANJI_53 = 0x53, + MSG_CHAR_KANJI_54 = 0x54, + MSG_CHAR_KANJI_55 = 0x55, + MSG_CHAR_KANJI_56 = 0x56, + MSG_CHAR_KANJI_57 = 0x57, + MSG_CHAR_KANJI_58 = 0x58, + MSG_CHAR_KANJI_59 = 0x59, + MSG_CHAR_KANJI_5A = 0x5A, + MSG_CHAR_KANJI_5B = 0x5B, + MSG_CHAR_KANJI_5C = 0x5C, + MSG_CHAR_KANJI_5D = 0x5D, + MSG_CHAR_KANJI_5E = 0x5E, + MSG_CHAR_KANJI_5F = 0x5F, + MSG_CHAR_KANJI_60 = 0x60, + MSG_CHAR_CIRCLE = 0x61, + MSG_CHAR_CROSS = 0x62, + MSG_CHAR_KANJI_63 = 0x63, + MSG_CHAR_KANJI_64 = 0x64, + MSG_CHAR_KANJI_65 = 0x65, + MSG_CHAR_KANJI_66 = 0x66, + MSG_CHAR_KANJI_67 = 0x67, + MSG_CHAR_KANJI_68 = 0x68, + MSG_CHAR_KANJI_69 = 0x69, + MSG_CHAR_NOTE = 0x6A, + MSG_CHAR_KANJI_6B = 0x6B, + MSG_CHAR_KANJI_6C = 0x6C, + MSG_CHAR_KANJI_6D = 0x6D, + MSG_CHAR_KANJI_6E = 0x6E, + MSG_CHAR_KANJI_6F = 0x6F, + MSG_CHAR_KANJI_70 = 0x70, + MSG_CHAR_KANJI_71 = 0x71, + MSG_CHAR_KANJI_72 = 0x72, + MSG_CHAR_KANJI_73 = 0x73, + MSG_CHAR_KANJI_74 = 0x74, + MSG_CHAR_KANJI_75 = 0x75, + MSG_CHAR_KANJI_76 = 0x76, + MSG_CHAR_KANJI_77 = 0x77, + MSG_CHAR_LOWER_X = 0x78, + + // Variant 3 - N64 Button Icons + MSG_CHAR_BUTTON_A = 0x00, + MSG_CHAR_BUTTON_B = 0x01, + MSG_CHAR_BUTTON_START = 0x02, + MSG_CHAR_BUTTON_C_UP = 0x03, + MSG_CHAR_BUTTON_C_DOWN = 0x04, + MSG_CHAR_BUTTON_C_LEFT = 0x05, + MSG_CHAR_BUTTON_C_RIGHT = 0x06, + MSG_CHAR_BUTTON_Z = 0x07, + MSG_CHAR_BUTTON_L = 0x08, + MSG_CHAR_BUTTON_R = 0x09, +#else MSG_CHAR_NOTE = 0x00, MSG_CHAR_EXCLAMTION = 0x01, MSG_CHAR_BACKSLASH = 0x02, @@ -5611,6 +5978,7 @@ enum MsgChars { MSG_CHAR_SINGLE_QUOTE_OPEN = 0xA4, MSG_CHAR_SINGLE_QUOTE_CLOSE = 0xA5, // 0xA6 to 0xEF are unused +#endif #if VERSION_IQUE // All US characters are in the rom, but their range is used for multibyte characters diff --git a/src/101b90_len_8f0.c b/src/101b90_len_8f0.c index 6472d5260d..f6176e133c 100644 --- a/src/101b90_len_8f0.c +++ b/src/101b90_len_8f0.c @@ -10,6 +10,8 @@ #define SPRITE_ROM_START 0x1943000 + 0x10 #elif VERSION_PAL #define SPRITE_ROM_START 0x1DF0000 + 0x10 +#elif VERSION_JP +#define SPRITE_ROM_START 0x1A40000 + 0x10 #endif extern s32 spr_allocateBtlComponentsOnWorldHeap; diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index 96c14ec35d..b6d3ae99ae 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -17,6 +17,33 @@ extern HudScript HES_PartnerRank2B; HudScript* D_80109890[] = { &HES_PartnerRank1A, &HES_PartnerRank2A }; HudScript* D_80109898[] = { &HES_PartnerRank1B, &HES_PartnerRank2B }; +#if VERSION_JP +#define WINDOW_KEY_WIDTH 242 +#define ALREADY_PARTNER_HEIGHT 32 +#define EMPTY_BAR_X 67 +#define DIARY_PAGE_X 0 +#define PARTNER_LIST_X1 50 +#define PARTNER_LIST_X2 66 +#define BADGE_PRICE_X 108 +#define ITEM_PRICE_X 106 +#define MENU_OFFSET_Y1 9 +#define MENU_OFFSET_Y2 7 +#define POPUP_PARTNER_WIDTH 80 +#else +#define WINDOW_KEY_WIDTH 280 +#define ALREADY_PARTNER_HEIGHT 40 +#define EMPTY_BAR_X 73 +#define DIARY_PAGE_X 8 +#define PARTNER_LIST_X1 85 +#define PARTNER_LIST_X2 91 +#define BADGE_PRICE_X 115 +#define ITEM_PRICE_X 121 +#define MENU_OFFSET_Y1 8 +#define MENU_OFFSET_Y2 6 +#define POPUP_PARTNER_WIDTH 100 +#endif + +#if !VERSION_JP s16 PopupWorldStartX[] = { [POPUP_MENU_USE_ITEM] 140, [POPUP_MENU_SWITCH_PARTNER] 140, @@ -50,6 +77,7 @@ s16 PopupContentScissorWidths[] = { [POPUP_MENU_USEKEY] 137, [POPUP_MENU_POST_OFFICE] 137, }; +#endif SHIFT_BSS s32 gPopupState; SHIFT_BSS s32 D_8010D644; @@ -339,19 +367,62 @@ s32 popup_menu_update(void) { switch (gPopupState) { case POPUP_STATE_INIT: +#if VERSION_JP + D_8010D67C = 32; + D_8010D67E = 72; + D_8010D680 = 32; + PopupMenu_StarPieceCounterPosX = 32; +#else D_8010D67C = 20; D_8010D67E = 72; D_8010D680 = 20; +#endif D_8010D682 = 186; D_8010D684 = 16; D_8010D686 = 88; +#if !VERSION_JP PopupMenu_StarPieceCounterPosX = 32; +#endif PopupMenu_StarPieceCounterPosY = 164; if (PopupNotBattle) { +#if VERSION_JP + + switch (gPopupMenu->popupType) { + case POPUP_MENU_USE_ITEM: + case POPUP_MENU_THROW_AWAY_ITEM: + case POPUP_MENU_CHECK_ITEM: + case POPUP_MENU_CLAIM_ITEM: + case POPUP_MENU_READ_LETTER: + case POPUP_MENU_TAKE_FROM_CHEST: + case POPUP_MENU_USEKEY: + D_8010D67C += 144; + break; + case POPUP_MENU_TRADE_FOR_BADGE: + D_8010D67C += 122; + break; + case POPUP_MENU_UPGRADE_PARTNER: + D_8010D67C += 134; + break; + case POPUP_MENU_SELL_ITEM: + D_8010D67C += 122; + break; + case POPUP_MENU_SWITCH_PARTNER: + case POPUP_MENU_READ_DIARY_PAGE: + case POPUP_MENU_READ_POSTCARD: + case POPUP_MENU_POST_OFFICE: + D_8010D67C += 160; + break; + } +#else D_8010D67C = PopupWorldStartX[gPopupMenu->popupType] + 20; +#endif } if (PopupMenu_MaxDisplayableEntryCount >= 7) { +#if VERSION_JP + D_8010D67E -= 10; +#else D_8010D67E = 62; +#endif } D_8010D68C = 0; elementID = hud_element_create(&HES_EmptyBar); @@ -540,6 +611,68 @@ s32 popup_menu_update(void) { set_window_update(WINDOW_ID_15, 2); set_window_update(WINDOW_ID_17, 1); } +#elif VERSION_JP + switch (gPopupMenu->popupType) { + case POPUP_MENU_USE_ITEM: + case POPUP_MENU_THROW_AWAY_ITEM: + case POPUP_MENU_CHECK_ITEM: + case POPUP_MENU_CLAIM_ITEM: + case POPUP_MENU_TAKE_FROM_CHEST: + case POPUP_MENU_USEKEY: + set_window_properties(WINDOW_ID_14, posX, posY, 130, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_SWITCH_PARTNER: + set_window_properties(WINDOW_ID_14, posX, posY, 104, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_17, 14, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + break; + case POPUP_MENU_TRADE_FOR_BADGE: + set_window_properties(WINDOW_ID_14, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_UPGRADE_PARTNER: + set_window_properties(WINDOW_ID_14, posX, posY, 126, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_17, 12, -6, 66, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + break; + case POPUP_MENU_SELL_ITEM: + set_window_properties(WINDOW_ID_14, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_READ_LETTER: + set_window_properties(WINDOW_ID_14, posX, posY, 120, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 24, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_READ_DIARY_PAGE: + set_window_properties(WINDOW_ID_14, posX, posY, 108, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 12, -6, 84, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_READ_POSTCARD: + set_window_properties(WINDOW_ID_14, posX, posY, 124, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_15, 12, -6, 100, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + break; + case POPUP_MENU_POST_OFFICE: + set_window_properties(WINDOW_ID_14, posX, posY, 96, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_17, 10, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); + set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + break; + } #else switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: @@ -613,6 +746,19 @@ s32 popup_menu_update(void) { } #endif +#if VERSION_JP + switch (gPopupMenu->popupType) { + case POPUP_MENU_UPGRADE_PARTNER: + set_window_properties(WINDOW_ID_18, 84, -6, 40, 16, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + break; + case POPUP_MENU_TRADE_FOR_BADGE: + set_window_properties(WINDOW_ID_16, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + break; + case POPUP_MENU_SELL_ITEM: + set_window_properties(WINDOW_ID_16, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + break; + } +#else switch (gPopupMenu->popupType) { case POPUP_MENU_TRADE_FOR_BADGE: set_window_properties(WINDOW_ID_16, 126, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); @@ -621,6 +767,7 @@ s32 popup_menu_update(void) { set_window_properties(WINDOW_ID_16, 131, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); break; } +#endif if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { posX = PopupMenu_StarPieceCounterPosX; @@ -650,7 +797,7 @@ s32 popup_menu_update(void) { { posX = D_8010D680; posY = D_8010D682; - set_window_properties(WINDOW_ID_19, posX, posY, 280, 32, WINDOW_PRIORITY_20, func_800F48F4, NULL, -1); + set_window_properties(WINDOW_ID_19, posX, posY, WINDOW_KEY_WIDTH, 32, WINDOW_PRIORITY_20, func_800F48F4, NULL, -1); } posX = D_8010D684; @@ -664,6 +811,40 @@ s32 popup_menu_update(void) { set_window_properties(WINDOW_ID_21, posX, posY, gPopupMenu->unk_340 + 144, height, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); #else switch (gPopupMenu->popupType) { +#if VERSION_JP + case POPUP_MENU_USE_ITEM: + case POPUP_MENU_SWITCH_PARTNER: + case POPUP_MENU_THROW_AWAY_ITEM: + case POPUP_MENU_CHECK_ITEM: + case POPUP_MENU_CLAIM_ITEM: + case POPUP_MENU_READ_LETTER: + case POPUP_MENU_TAKE_FROM_CHEST: + case POPUP_MENU_READ_DIARY_PAGE: + case POPUP_MENU_READ_POSTCARD: + case POPUP_MENU_USEKEY: + case POPUP_MENU_POST_OFFICE: + switch (gPopupMenu->dipMode) { + case 0: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; + case 1: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; + case 2: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; + } + break; + case POPUP_MENU_TRADE_FOR_BADGE: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 136, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; + case POPUP_MENU_UPGRADE_PARTNER: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 136, 48, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; + case POPUP_MENU_SELL_ITEM: + set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + break; +#else case POPUP_MENU_USE_ITEM: case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: @@ -690,6 +871,7 @@ s32 popup_menu_update(void) { case POPUP_MENU_SELL_ITEM: set_window_properties(WINDOW_ID_21, posX, posY, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; +#endif } #endif @@ -1041,7 +1223,7 @@ s32 popup_menu_update(void) { set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), posY, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); #else width = get_msg_width(MSG_Menus_006B, 0) + 23; - set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), 80, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); + set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), 80, width, ALREADY_PARTNER_HEIGHT, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); #endif set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); D_8010D644 = 60; @@ -1267,6 +1449,9 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt y1 = y + PopupMenu_DisplayedEntryCount * LINE_HEIGHT + 4; switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: +#if VERSION_JP + case POPUP_MENU_THROW_AWAY_ITEM: +#endif case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_SELL_ITEM: case POPUP_MENU_CHECK_ITEM: @@ -1283,9 +1468,11 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt case POPUP_MENU_UPGRADE_PARTNER: gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 90, y1); break; +#if !VERSION_JP case POPUP_MENU_THROW_AWAY_ITEM: gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 160, y1); break; +#endif } y = baseY + D_8010D658 + 8; @@ -1293,7 +1480,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt y = baseY + D_8010D658 + 21; } id = PopupMenu_EmptybarHEID; - hud_element_set_render_pos(id, baseX + 73, y - 3); + hud_element_set_render_pos(id, baseX + EMPTY_BAR_X, y - 3); hud_element_set_alpha(id, PopupMenu_Alpha); if (PopupMenu_MaxDisplayableEntryCount < gPopupMenu->numEntries) { hud_element_draw_without_clipping(id); @@ -1305,10 +1492,41 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt y = baseY; y1++; } + +#if VERSION_JP + switch (gPopupMenu->popupType) { + case POPUP_MENU_USE_ITEM: + case POPUP_MENU_THROW_AWAY_ITEM: + case POPUP_MENU_CHECK_ITEM: + case POPUP_MENU_CLAIM_ITEM: + case POPUP_MENU_READ_LETTER: + case POPUP_MENU_TAKE_FROM_CHEST: + case POPUP_MENU_READ_DIARY_PAGE: + case POPUP_MENU_READ_POSTCARD: + case POPUP_MENU_USEKEY: + case POPUP_MENU_POST_OFFICE: + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1); + break; + case POPUP_MENU_SWITCH_PARTNER: + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 98, y1); + break; + case POPUP_MENU_TRADE_FOR_BADGE: + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 144, y1); + break; + case POPUP_MENU_UPGRADE_PARTNER: + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 144, y1); + break; + case POPUP_MENU_SELL_ITEM: + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 140, y1); + break; + } +#else gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + PopupContentScissorWidths[gPopupMenu->popupType], y1); - offset = 0; +#endif + x = baseX + 32; y = baseY + D_8010D658 + 2; + offset = 0; if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) { y = baseY + D_8010D658; offset = 2; @@ -1316,7 +1534,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt t = 0; for (i = 0; i < gPopupMenu->numEntries; i++, t++) { - if (i < sp28 - 1 || i > sp28 + PopupMenu_DisplayedEntryCount) { + if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) { y += LINE_HEIGHT; if (i == 0) { y += offset; @@ -1358,7 +1576,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt msgPal = MSG_PAL_STANDARD; } set_message_int_var(gPopupMenu->userIndex[t] + 1, 0); - draw_msg(MSG_Menus_00CD, x + 8, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00CD, x + DIARY_PAGE_X, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_POSTCARD: if (gPopupMenu->value[t] != 0) { @@ -1382,9 +1600,9 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt hud_element_set_script(id, D_80109898[j]); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER) { - hud_element_set_render_pos(id, x + 85 + j * 13, y + 10); + hud_element_set_render_pos(id, x + PARTNER_LIST_X1 + j * 13, y + 10); } else { - hud_element_set_render_pos(id, x + 91 + j * 13, y + 10); + hud_element_set_render_pos(id, x + PARTNER_LIST_X2 + j * 13, y + 10); } if (j < gPopupMenu->value[i]) { hud_element_draw_next(id); @@ -1392,10 +1610,10 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt } break; case POPUP_MENU_TRADE_FOR_BADGE: - draw_number(gPopupMenu->value[t], x + 115, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); + draw_number(gPopupMenu->value[t], x + BADGE_PRICE_X, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); break; case POPUP_MENU_SELL_ITEM: - draw_number(gPopupMenu->value[t], x + 121, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); + draw_number(gPopupMenu->value[t], x + ITEM_PRICE_X, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); break; } y += LINE_HEIGHT; @@ -1406,10 +1624,10 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt } x = baseX + 24; - y = baseY + D_8010D658 + 8; + y = baseY + D_8010D658 + MENU_OFFSET_Y1; offset = 0; if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) { - y = baseY + D_8010D658 + 6; + y = baseY + D_8010D658 + MENU_OFFSET_Y2; offset = 2; } @@ -1522,11 +1740,43 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 100, y1); + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + POPUP_PARTNER_WIDTH, y1); break; } switch (gPopupMenu->popupType) { +#if VERSION_JP + case POPUP_MENU_TRADE_FOR_BADGE: + offset = 31; + break; + case POPUP_MENU_UPGRADE_PARTNER: + offset = 32; + break; + case POPUP_MENU_SELL_ITEM: + offset = 31; + break; + default: + offset = 31; + break; + case POPUP_MENU_CLAIM_ITEM: + case POPUP_MENU_READ_LETTER: + case POPUP_MENU_TAKE_FROM_CHEST: + offset = 31; + break; + case POPUP_MENU_USEKEY: + offset = 31; + break; + case POPUP_MENU_READ_DIARY_PAGE: + offset = 13; + break; + case POPUP_MENU_READ_POSTCARD: + offset = 21; + break; + case POPUP_MENU_SWITCH_PARTNER: + case POPUP_MENU_POST_OFFICE: + offset = 14; + break; +#else case POPUP_MENU_SWITCH_PARTNER: offset = 35; break; @@ -1558,6 +1808,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt case POPUP_MENU_POST_OFFICE: offset = 30; break; +#endif } if (PopupMenu_FirstDisplayIndex > 0) { @@ -1572,7 +1823,8 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt if (PopupMenu_LastDisplayIndex < gPopupMenu->numEntries) { id = PopupMenu_DownArrowHEID; x = baseX + offset; - y = baseY + PopupMenu_MaxDisplayableEntryCount * LINE_HEIGHT; + y = baseY; + y += PopupMenu_MaxDisplayableEntryCount * LINE_HEIGHT; hud_element_set_render_pos(id, x + 35, y + 5); hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_draw_without_clipping(id); @@ -1609,6 +1861,29 @@ void popup_menu_draw_title_contents(s32* userData, s32 baseX, s32 baseY, s32 wid } } #else + +#if VERSION_JP +#define POPUP_ITEM_X 35 +#define POPUP_ITEMDIP_NUMBER_X 82 +#define POPUP_ITEMDIP_X 102 +#define POPUP_TRIPLE_DIP_X 4 +#define POPUP_BADGE_X 38 +#define POPUP_CHEST_X 31 +#define POPUP_POSTCARD_X 16 +#define POPUP_ITEM_KEY_X 35 +#define POPUP_POSTOFFICE_X 23 +#else +#define POPUP_ITEM_X 26 +#define POPUP_ITEMDIP_NUMBER_X 94 +#define POPUP_ITEMDIP_X 114 +#define POPUP_TRIPLE_DIP_X 6 +#define POPUP_BADGE_X 27 +#define POPUP_CHEST_X 4 +#define POPUP_POSTCARD_X 6 +#define POPUP_ITEM_KEY_X 27 +#define POPUP_POSTOFFICE_X 8 +#endif + void popup_menu_draw_title_contents( s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { @@ -1620,45 +1895,60 @@ void popup_menu_draw_title_contents( case POPUP_MENU_CLAIM_ITEM: switch (gPopupMenu->dipMode) { case 0: - draw_msg(MSG_Menus_Items, baseX + 26, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#if VERSION_JP + draw_msg(MSG_Menus_JP_004F, baseX + POPUP_ITEM_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#else + draw_msg(MSG_Menus_Items, baseX + POPUP_ITEM_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#endif break; case 1: draw_msg(MSG_Menus_DoubleDip, baseX + 4, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); - draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, + draw_number(gPopupMenu->titleNumber, baseX + POPUP_ITEMDIP_NUMBER_X, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_number(2, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_number(2, baseX + POPUP_ITEMDIP_X, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); break; case 2: - draw_msg(MSG_Menus_TripleDip, baseX + 6, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); - draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, + draw_msg(MSG_Menus_TripleDip, baseX + POPUP_TRIPLE_DIP_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_number(gPopupMenu->titleNumber, baseX + POPUP_ITEMDIP_NUMBER_X, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_number(3, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, + draw_number(3, baseX + POPUP_ITEMDIP_X, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); break; } break; case POPUP_MENU_TRADE_FOR_BADGE: - draw_msg(MSG_MenuTip_0032, baseX + 27, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_MenuTip_0032, baseX + POPUP_BADGE_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; +#if VERSION_JP + case POPUP_MENU_UPGRADE_PARTNER: + draw_msg(MSG_Menus_PartyMember, baseX + 20, baseY + 2, PopupMenu_Alpha, MSG_PAL_34, DRAW_MSG_STYLE_MENU); + break; +#endif case POPUP_MENU_READ_LETTER: draw_msg(MSG_MenuTip_0033, baseX + 23, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_TAKE_FROM_CHEST: - draw_msg(MSG_Menus_00D7, baseX + 4, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00D7, baseX + POPUP_CHEST_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_DIARY_PAGE: draw_msg(MSG_Menus_00CE, baseX + 8, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_POSTCARD: - draw_msg(MSG_Menus_00D0, baseX + 6, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00D0, baseX + POPUP_POSTCARD_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_USEKEY: - draw_msg(MSG_Menus_Items, baseX + 27, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#if VERSION_JP + draw_msg(MSG_Menus_KeyItems, baseX + POPUP_ITEM_KEY_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#else + draw_msg(MSG_Menus_Items, baseX + POPUP_ITEM_KEY_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); +#endif break; case POPUP_MENU_SWITCH_PARTNER: +#if !VERSION_JP case POPUP_MENU_UPGRADE_PARTNER: +#endif case POPUP_MENU_POST_OFFICE: - draw_msg(MSG_Menus_PartyMember, baseX + 8, baseY + 2, PopupMenu_Alpha, MSG_PAL_34, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_PartyMember, baseX + POPUP_POSTOFFICE_X, baseY + 2, PopupMenu_Alpha, MSG_PAL_34, DRAW_MSG_STYLE_MENU); break; } } @@ -1686,6 +1976,84 @@ void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { s32 msgWidth; +#if VERSION_JP + baseY += 6; + + if (PopupNotBattle) { + switch (gPopupMenu->popupType) { + case POPUP_MENU_USE_ITEM: + msgWidth = get_msg_width(MSG_Menus_0061, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0061, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_SWITCH_PARTNER: + msgWidth = get_msg_width(MSG_Menus_0063, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0063, baseX + 8, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_THROW_AWAY_ITEM: + msgWidth = get_msg_width(MSG_Menus_0064, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0064, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_TRADE_FOR_BADGE: + msgWidth = get_msg_width(MSG_Menus_0070, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0070, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_UPGRADE_PARTNER: + msgWidth = get_msg_width(MSG_Menus_006A, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_006A, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_SELL_ITEM: + msgWidth = get_msg_width(MSG_Menus_0065, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0065, baseX - 4, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_CHECK_ITEM: + msgWidth = get_msg_width(MSG_Menus_0066, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0066, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_CLAIM_ITEM: + msgWidth = get_msg_width(MSG_Menus_0067, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0067, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_READ_LETTER: + msgWidth = get_msg_width(MSG_Menus_JP_0081, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_JP_0081, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_TAKE_FROM_CHEST: + msgWidth = get_msg_width(MSG_Menus_00D6, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_00D6, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_READ_DIARY_PAGE: + msgWidth = get_msg_width(MSG_Menus_006C, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_006C, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_READ_POSTCARD: + msgWidth = get_msg_width(MSG_Menus_006D, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_006D, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_USEKEY: + msgWidth = get_msg_width(MSG_Menus_0062, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_0062, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + case POPUP_MENU_POST_OFFICE: + msgWidth = get_msg_width(MSG_Menus_006F, 0) + 18; + baseX += 76 - (msgWidth / 2); + draw_msg(MSG_Menus_006F, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0); + break; + } + } +#else baseY += 7; if (PopupNotBattle) { @@ -1762,6 +2130,7 @@ void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s break; } } +#endif } #endif @@ -1801,6 +2170,11 @@ void popup_draw_cost_icon(s32* userData, s32 x, s32 y) { hudElement = PopupMenu_TitleIconHEID; yPos = y + 16; break; +#if VERSION_JP + case POPUP_TYPE_UPGRADE_PARTNER: + draw_msg(MSG_Menus_006E, x + 7, y + 2, PopupMenu_Alpha, MSG_PAL_34, 1); + return; +#endif case POPUP_TYPE_SELL_ITEM: xPos = x + 17; hudElement = PopupMenu_TitleIconHEID; @@ -1816,7 +2190,11 @@ void popup_draw_cost_icon(s32* userData, s32 x, s32 y) { } void popup_draw_already_have_partner(s32* userData, s32 x, s32 y) { +#if VERSION_JP + draw_msg(MSG_Menus_006B, x + 11, y + 8, 255, MSG_PAL_0F, 0); +#else draw_msg(MSG_Menus_006B, x + 16, y + 2, 255, MSG_PAL_0F, 0); +#endif } void func_800F4D28(s32* userData, s32 x, s32 y) { diff --git a/src/entity.c b/src/entity.c index 8e69973c87..9ab7ee5867 100644 --- a/src/entity.c +++ b/src/entity.c @@ -20,6 +20,15 @@ extern Addr WorldEntityHeapBase; #define entity_default_VRAM (void*) 0x802BAE00 #endif +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_default_ROM_END; +extern Addr entity_default_ROM_START; +extern Addr entity_jan_iwa_ROM_END; +extern Addr entity_jan_iwa_ROM_START; +extern Addr entity_sbk_omo_ROM_END; +extern Addr entity_sbk_omo_ROM_START; +#endif + s32 D_8014AFB0 = 255; SHIFT_BSS s32 CreateEntityVarArgBuffer[4]; diff --git a/src/entity/Block.c b/src/entity/Block.c index e6c51dfe42..ac44dcaed4 100644 --- a/src/entity/Block.c +++ b/src/entity/Block.c @@ -3,6 +3,25 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_BrickBlock_ROM_END; +extern Addr entity_model_BrickBlock_ROM_START; +extern Addr entity_model_Hammer1Block_ROM_END; +extern Addr entity_model_Hammer1Block_ROM_START; +extern Addr entity_model_Hammer2Block_ROM_END; +extern Addr entity_model_Hammer2Block_ROM_START; +extern Addr entity_model_Hammer3Block_ROM_END; +extern Addr entity_model_Hammer3Block_ROM_START; +extern Addr entity_model_InertRedBlock_ROM_END; +extern Addr entity_model_InertRedBlock_ROM_START; +extern Addr entity_model_InertYellowBlock_ROM_END; +extern Addr entity_model_InertYellowBlock_ROM_START; +extern Addr entity_model_PowBlock_ROM_END; +extern Addr entity_model_PowBlock_ROM_START; +extern Addr entity_model_PushBlock_ROM_END; +extern Addr entity_model_PushBlock_ROM_START; +#endif + extern Gfx Entity_InertYellowBlock_Render[]; extern Gfx Entity_InertRedBlock_Render[]; extern Gfx Entity_BrickBlock_Render[]; diff --git a/src/entity/BlueWarpPipe.c b/src/entity/BlueWarpPipe.c index c5c8b310a3..becd7cbf64 100644 --- a/src/entity/BlueWarpPipe.c +++ b/src/entity/BlueWarpPipe.c @@ -5,6 +5,11 @@ #include "entity.h" #include "sprite/player.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_BlueWarpPipe_ROM_END; +extern Addr entity_model_BlueWarpPipe_ROM_START; +#endif + extern Gfx Entity_BlueWarpPipe_RenderPipe[]; extern Gfx Entity_BlueWarpPipe_RenderBase[]; diff --git a/src/entity/Chest.c b/src/entity/Chest.c index e001060365..bd839b895b 100644 --- a/src/entity/Chest.c +++ b/src/entity/Chest.c @@ -4,6 +4,11 @@ #include "entity.h" #include "sprite/player.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_Chest_ROM_END; +extern Addr entity_model_Chest_ROM_START; +#endif + extern EntityScript Entity_Chest_ScriptOpened; extern Gfx Entity_Chest_RenderBox[]; diff --git a/src/entity/HeartBlock.c b/src/entity/HeartBlock.c index ef7c83db1c..42d6effded 100644 --- a/src/entity/HeartBlock.c +++ b/src/entity/HeartBlock.c @@ -4,6 +4,13 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_HeartBlockContent_ROM_END; +extern Addr entity_model_HeartBlockContent_ROM_START; +extern Addr entity_model_HeartBlock_ROM_END; +extern Addr entity_model_HeartBlock_ROM_START; +#endif + extern EntityModelScript Entity_HeartBlockContent_RenderScriptIdle; extern EntityModelScript Entity_HeartBlockContent_RenderScriptAfterHit; extern EntityModelScript Entity_HeartBlockContent_RenderScriptHit; diff --git a/src/entity/HiddenPanel.c b/src/entity/HiddenPanel.c index 846f3ec4cd..1f234451fd 100644 --- a/src/entity/HiddenPanel.c +++ b/src/entity/HiddenPanel.c @@ -2,6 +2,11 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_HiddenPanel_ROM_END; +extern Addr entity_model_HiddenPanel_ROM_START; +#endif + s32 entity_HiddenPanel_is_item_on_top(Entity*); void entity_HiddenPanel_flip_over(Entity*); diff --git a/src/entity/ItemBlock.c b/src/entity/ItemBlock.c index aee5b2f7fc..f68c45cd72 100644 --- a/src/entity/ItemBlock.c +++ b/src/entity/ItemBlock.c @@ -5,6 +5,25 @@ #include "entity.h" #include "model.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_HitFloatingYellowBlock_anim_ROM_END; +extern Addr entity_model_HitFloatingYellowBlock_anim_ROM_START; +extern Addr entity_model_HitFloatingYellowBlock_gfx_ROM_END; +extern Addr entity_model_HitFloatingYellowBlock_gfx_ROM_START; +extern Addr entity_model_HitRedBlock_anim_ROM_END; +extern Addr entity_model_HitRedBlock_anim_ROM_START; +extern Addr entity_model_HitRedBlock_gfx_ROM_END; +extern Addr entity_model_HitRedBlock_gfx_ROM_START; +extern Addr entity_model_HitYellowBlock_anim_ROM_END; +extern Addr entity_model_HitYellowBlock_anim_ROM_START; +extern Addr entity_model_HitYellowBlock_gfx_ROM_END; +extern Addr entity_model_HitYellowBlock_gfx_ROM_START; +extern Addr entity_model_RedBlock_ROM_END; +extern Addr entity_model_RedBlock_ROM_START; +extern Addr entity_model_YellowBlock_ROM_END; +extern Addr entity_model_YellowBlock_ROM_START; +#endif + extern Gfx Entity_YellowBlock_Render[]; extern Gfx Entity_RedBlock_Render[]; extern AnimScript Entity_HitYellowBlock_AnimationHit; diff --git a/src/entity/SaveBlock.c b/src/entity/SaveBlock.c index c878e59001..364ca3e831 100644 --- a/src/entity/SaveBlock.c +++ b/src/entity/SaveBlock.c @@ -4,6 +4,11 @@ #include "entity.h" #include "message_ids.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_SaveBlock_ROM_END; +extern Addr entity_model_SaveBlock_ROM_START; +#endif + extern Mtx Entity_SaveBlock_Mtx; extern Gfx Entity_SaveBlock_RenderContent[]; extern Gfx Entity_SaveBlock_RenderBlock[]; diff --git a/src/entity/ShatteringBlock.c b/src/entity/ShatteringBlock.c index 3fe188dd89..8d0cb9120f 100644 --- a/src/entity/ShatteringBlock.c +++ b/src/entity/ShatteringBlock.c @@ -2,6 +2,17 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_ShatteringBrickBlock_ROM_END; +extern Addr entity_model_ShatteringBrickBlock_ROM_START; +extern Addr entity_model_ShatteringHammer1Block_ROM_END; +extern Addr entity_model_ShatteringHammer1Block_ROM_START; +extern Addr entity_model_ShatteringHammer2Block_ROM_END; +extern Addr entity_model_ShatteringHammer2Block_ROM_START; +extern Addr entity_model_ShatteringHammer3Block_ROM_END; +extern Addr entity_model_ShatteringHammer3Block_ROM_START; +#endif + extern Mtx Entity_ShatteringHammer1Block_FragmentsMatrices[]; extern Gfx* Entity_ShatteringHammer1Block_FragmentsRender[]; extern Mtx Entity_ShatteringHammer2Block_FragmentsMatrices[]; diff --git a/src/entity/Signpost.c b/src/entity/Signpost.c index 4a64e25e88..2e570c258d 100644 --- a/src/entity/Signpost.c +++ b/src/entity/Signpost.c @@ -2,6 +2,11 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_Signpost_ROM_END; +extern Addr entity_model_Signpost_ROM_START; +#endif + extern Gfx Entity_Signpost_Render[]; void entity_Signpost_idle(Entity* entity) { diff --git a/src/entity/SimpleSpring.c b/src/entity/SimpleSpring.c index 4bbcee1c46..883e792f98 100644 --- a/src/entity/SimpleSpring.c +++ b/src/entity/SimpleSpring.c @@ -3,6 +3,17 @@ #include "animation_script.h" #include "ld_addrs.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_ScriptSpring_anim_ROM_END; +extern Addr entity_model_ScriptSpring_anim_ROM_START; +extern Addr entity_model_ScriptSpring_gfx_ROM_END; +extern Addr entity_model_ScriptSpring_gfx_ROM_START; +extern Addr entity_model_SimpleSpring_anim_ROM_END; +extern Addr entity_model_SimpleSpring_anim_ROM_START; +extern Addr entity_model_SimpleSpring_gfx_ROM_END; +extern Addr entity_model_SimpleSpring_gfx_ROM_START; +#endif + extern StaticAnimatorNode* Entity_ScriptSpring_Mesh[]; extern AnimScript Entity_ScriptSpring_AnimLaunch; extern AnimScript Entity_ScriptSpring_AnimIdle; diff --git a/src/entity/SuperBlock.c b/src/entity/SuperBlock.c index 4a53ee1822..8e6c968b72 100644 --- a/src/entity/SuperBlock.c +++ b/src/entity/SuperBlock.c @@ -3,6 +3,17 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_SuperBlockContent_ROM_END; +extern Addr entity_model_SuperBlockContent_ROM_START; +extern Addr entity_model_SuperBlock_ROM_END; +extern Addr entity_model_SuperBlock_ROM_START; +extern Addr entity_model_UltraBlockContent_ROM_END; +extern Addr entity_model_UltraBlockContent_ROM_START; +extern Addr entity_model_UltraBlock_ROM_END; +extern Addr entity_model_UltraBlock_ROM_START; +#endif + extern EntityBlueprint Entity_SuperBlockContent; extern Gfx Entity_SuperBlock_Render[]; diff --git a/src/entity/Switch.c b/src/entity/Switch.c index da52e411b5..1883764d98 100644 --- a/src/entity/Switch.c +++ b/src/entity/Switch.c @@ -3,6 +3,15 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_BlueSwitch_ROM_END; +extern Addr entity_model_BlueSwitch_ROM_START; +extern Addr entity_model_GreenStompSwitch_ROM_END; +extern Addr entity_model_GreenStompSwitch_ROM_START; +extern Addr entity_model_RedSwitch_ROM_END; +extern Addr entity_model_RedSwitch_ROM_START; +#endif + #define REFLECTED_SWITCH_HIDDEN 1 #define REFLECTED_SWITCH_LINKED 2 diff --git a/src/entity/WoodenCrate.c b/src/entity/WoodenCrate.c index eec2d87e8d..b695241b91 100644 --- a/src/entity/WoodenCrate.c +++ b/src/entity/WoodenCrate.c @@ -3,6 +3,11 @@ #include "ld_addrs.h" #include "entity.h" +#if VERSION_JP // TODO remove once segments are split +extern Addr entity_model_WoodenCrate_ROM_END; +extern Addr entity_model_WoodenCrate_ROM_START; +#endif + extern Gfx Entity_RenderNone[]; extern Gfx Entity_WoodenCrate_Render[]; extern Gfx* Entity_WoodenCrate_FragmentsRender[]; diff --git a/src/evt/demo_api.c b/src/evt/demo_api.c index 891d94ad83..2f1f61267c 100644 --- a/src/evt/demo_api.c +++ b/src/evt/demo_api.c @@ -1,6 +1,11 @@ #include "common.h" #include "ld_addrs.h" +#if VERSION_JP // TODO remove once this part is split +#define SHADING_NONE 0xFFFFFFFF +extern Addr sprite_shading_profiles_ROM_START; +#endif + // TODO: not sure where these go u8 D_802D9D70 = 254; u8 D_802D9D71 = 254; diff --git a/src/imgfx.c b/src/imgfx.c index 869c8442d3..cd5f7b045e 100644 --- a/src/imgfx.c +++ b/src/imgfx.c @@ -3,6 +3,11 @@ #include "sprite.h" #include "imgfx.h" + +#if VERSION_JP // TODO remove once segments are split +extern Addr imgfx_data_ROM_START; +#endif + typedef union ImgFXIntVars { s32 raw[2][4]; struct { diff --git a/src/item_entity.c b/src/item_entity.c index 0d560514ff..e69371135f 100644 --- a/src/item_entity.c +++ b/src/item_entity.c @@ -37,7 +37,9 @@ SHIFT_BSS ItemEntity* BattleItemEntities[MAX_ITEM_ENTITIES]; SHIFT_BSS ItemEntity** gCurrentItemEntities; SHIFT_BSS s16 isPickingUpItem; SHIFT_BSS s16 ItemSpawnWithinPlayerPickupDelay; +#if !VERSION_JP SHIFT_BSS s16 D_801565A8; +#endif SHIFT_BSS PopupMenu ItemPickupMenu; SHIFT_BSS s32 ItemPickupIconID; SHIFT_BSS s32 ItemPickupStateDelay; @@ -110,8 +112,10 @@ Gfx D_8014C6A0[] = { Lights1 ItemEntityLights = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0); +#if !VERSION_JP s16 PickupHeaderWindowHeight[] = { 32, 40 }; s16 PickupMessageWindowYOffsets[] = { 8, 4 }; +#endif void sparkle_script_init(ItemEntity* item, SparkleScript* script) { item->sparkleReadPos = (s32*)script; @@ -258,7 +262,9 @@ void clear_item_entity_data(void) { create_worker_world(NULL, draw_item_entities); create_worker_frontUI(NULL, draw_ui_item_entities); isPickingUpItem = FALSE; +#if !VERSION_JP D_801565A8 = FALSE; +#endif } void init_item_entity_list(void) { @@ -269,7 +275,9 @@ void init_item_entity_list(void) { } isPickingUpItem = FALSE; +#if !VERSION_JP D_801565A8 = FALSE; +#endif ItemEntitiesCreated = 0; ItemEntityAlternatingSpawn = 0; } @@ -1526,9 +1534,11 @@ void set_item_entity_flags(s32 index, s32 flags) { ItemEntity* item = gCurrentItemEntities[index]; item->flags |= flags; +#if !VERSION_JP if (item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT) { D_801565A8 = TRUE; } +#endif } void clear_item_entity_flags(s32 index, s32 flags) { @@ -1545,12 +1555,16 @@ void auto_collect_item_entity(s32 index) { /// @returns TRUE when "you got X" popup is on-screen b32 is_picking_up_item(void) { +#if VERSION_JP + return isPickingUpItem; +#else b32 ret = D_801565A8 != FALSE; if (isPickingUpItem) { ret = TRUE; } return ret; +#endif } void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z) { @@ -2003,7 +2017,9 @@ void update_item_entity_collectable(ItemEntity* item) { sfx_play_sound_at_position(SOUND_HEART_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z); break; } +#if !VERSION_JP D_801565A8 = FALSE; +#endif gOverrideFlags &= ~GLOBAL_OVERRIDES_40; remove_item_entity_by_reference(item); } @@ -2013,7 +2029,9 @@ void update_item_entity_collectable(ItemEntity* item) { // when the script is done executing, destroy these items if (item->state == ITEM_PHYSICS_STATE_04) { if (!does_script_exist(UnusedItemPhysicsScriptID)) { +#if !VERSION_JP D_801565A8 = FALSE; +#endif remove_item_entity_by_reference(item); resume_all_group(EVT_GROUP_02); } @@ -2023,7 +2041,9 @@ void update_item_entity_collectable(ItemEntity* item) { isPickingUpItem = TRUE; item->spawnType = ITEM_SPAWN_AT_PLAYER; item->state = ITEM_PICKUP_STATE_INIT; +#if !VERSION_JP D_801565A8 = FALSE; +#endif gOverrideFlags |= GLOBAL_OVERRIDES_40; } } @@ -2059,7 +2079,9 @@ void update_item_entity_stationary(ItemEntity* item) { isPickingUpItem = TRUE; item->spawnType = ITEM_SPAWN_AT_PLAYER; item->state = ITEM_PICKUP_STATE_INIT; +#if !VERSION_JP D_801565A8 = FALSE; +#endif gOverrideFlags |= GLOBAL_OVERRIDES_40; } } @@ -2458,6 +2480,22 @@ block_47: // TODO required to match } } +#if VERSION_JP +#define WD_VAR1 44 +#define WD_VAR2 25 +#define WD_VAR3 20 +#define X_VAR1 32 +#define HT_VAR1 40 +#define WD_VAR4 242 +#else +#define WD_VAR1 54 +#define WD_VAR2 30 +#define WD_VAR3 30 +#define X_VAR1 20 +#define HT_VAR1 height +#define WD_VAR4 280 +#endif + void func_801363A0(ItemEntity* item) { ItemData* itemData = &gItemTable[item->itemID]; s32 itemMsg; @@ -2494,9 +2532,9 @@ void func_801363A0(ItemEntity* item) { item->itemID != ITEM_STAR_PIECE && !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) && !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES))) { - width = get_msg_width(itemMsg, 0) + 54; + width = get_msg_width(itemMsg, 0) + WD_VAR1; } else { - width = get_msg_width(itemMsg, 0) + 30; + width = get_msg_width(itemMsg, 0) + WD_VAR2; } posX = 160 - width / 2; posY = 76; @@ -2518,11 +2556,13 @@ void func_801363A0(ItemEntity* item) { } set_message_text_var(itemData->nameMsg, 0); - width = get_msg_width(itemMsg, 0) + 30; + width = get_msg_width(itemMsg, 0) + WD_VAR3; posX = 160 - width / 2; posY = 76; } +#if !VERSION_JP height = PickupHeaderWindowHeight[get_msg_lines(itemMsg) - 1]; +#endif if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) { offsetY = 28; } else { @@ -2534,16 +2574,17 @@ void func_801363A0(ItemEntity* item) { && item->itemID != ITEM_STAR_PIECE) ) { set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, - height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); + HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_WORLD_USABLE){ set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, - height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); + HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else { set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, - height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); + HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) { - set_window_properties(WINDOW_ID_19, 20, 186, 280, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1); + posX = X_VAR1; + set_window_properties(WINDOW_ID_19, posX, 186, WD_VAR4, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1); } if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) { width = get_msg_width(MSG_Menus_0060, 0) + 24; @@ -2553,13 +2594,33 @@ void func_801363A0(ItemEntity* item) { break; case ITEM_PICKUP_STATE_AWAIT_THROW_AWAY: set_message_text_var(itemData->nameMsg, 0); +#if VERSION_JP + width = get_msg_width(gItemTable[ThrowAwayItemID].nameMsg, 0) + 104; +#else width = get_msg_width(MSG_Menus_005F, 0) + 54; +#endif posX = 160 - width / 2; set_window_properties(WINDOW_ID_12, 160 - width / 2, 76, width, 40, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); break; } } +#if VERSION_JP +#define X_PICKUP_ITEM_1 12 +#define X_PICKUP_ITEM_2 36 +#define X_PICKUP_THREW 36 +#define Y_PICKUP_ITEM_1 12 +#define Y_PICKUP_ITEM_2 12 +#define Y_PICKUP_THREW 12 +#else +#define X_PICKUP_ITEM_1 15 +#define X_PICKUP_ITEM_2 40 +#define X_PICKUP_THREW 40 +#define Y_PICKUP_ITEM_1 offsetY +#define Y_PICKUP_ITEM_2 offsetY +#define Y_PICKUP_THREW 4 +#endif + void draw_content_pickup_item_header(ItemEntity* item, s32 posX, s32 posY) { ItemData* itemData = &gItemTable[item->itemID]; s32 itemMsg; @@ -2607,7 +2668,9 @@ void draw_content_pickup_item_header(ItemEntity* item, s32 posX, s32 posY) { set_message_text_var(itemData->nameMsg, 0); } +#if !VERSION_JP offsetY = PickupMessageWindowYOffsets[get_msg_lines(itemMsg) - 1]; +#endif if ((gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE) || (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) @@ -2615,9 +2678,9 @@ void draw_content_pickup_item_header(ItemEntity* item, s32 posX, s32 posY) { || (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) || (item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES)) ) { - draw_msg(itemMsg, posX + 15, posY + offsetY, 255, MSG_PAL_2F, 0); + draw_msg(itemMsg, posX + X_PICKUP_ITEM_1, posY + Y_PICKUP_ITEM_1, 255, MSG_PAL_2F, 0); } else { - draw_msg(itemMsg, posX + 40, posY + offsetY, 255, MSG_PAL_2F, 0); + draw_msg(itemMsg, posX + X_PICKUP_ITEM_2, posY + Y_PICKUP_ITEM_2, 255, MSG_PAL_2F, 0); if (!(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES))) { hud_element_set_render_pos(ItemPickupIconID, posX + 20, posY + 20); hud_element_draw_next(ItemPickupIconID); @@ -2627,7 +2690,7 @@ void draw_content_pickup_item_header(ItemEntity* item, s32 posX, s32 posY) { case ITEM_PICKUP_STATE_SHOW_THREW_AWAY: case ITEM_PICKUP_STATE_HIDE_THREW_AWAY: set_message_text_var(gItemTable[ThrowAwayItemID].nameMsg, 0); - draw_msg(MSG_Menus_005F, posX + 40, posY + 4, 255, MSG_PAL_2F, 0); + draw_msg(MSG_Menus_005F, posX + X_PICKUP_THREW, posY + Y_PICKUP_THREW, 255, MSG_PAL_2F, 0); hud_element_set_render_pos(ItemPickupIconID, posX + 20, posY + 20); hud_element_draw_next(ItemPickupIconID); break; diff --git a/src/msg.c b/src/msg.c index df7e93ebc0..6d3d4ae394 100644 --- a/src/msg.c +++ b/src/msg.c @@ -16,6 +16,8 @@ enum RewindArrowStates { #ifdef SHIFT #define MSG_ROM_START (s32)msg_ROM_START +#elif VERSION_JP +#define MSG_ROM_START 0x1D40000 #else #define MSG_ROM_START 0x1B83000 #endif @@ -30,6 +32,7 @@ typedef MessageImageData* MessageImageDataList[1]; s32 D_8014C280[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x01FF0000 }; +#if !VERSION_JP u8 MessagePlural[] = { MSG_CHAR_LOWER_S, MSG_CHAR_READ_END }; #if VERSION_PAL @@ -37,6 +40,7 @@ u8 MessagePlural_de[] = { MSG_CHAR_LOWER_N, MSG_CHAR_READ_END }; #endif u8 MessageSingular[] = { MSG_CHAR_READ_ENDL, MSG_CHAR_READ_END }; +#endif #if VERSION_PAL s32 gCurrentLanguage = 0; @@ -128,12 +132,36 @@ extern MessageCharset* MsgCharsets[5]; extern IMG_BIN MsgCharImgSubtitle[]; extern PAL_BIN D_802F4560[80][8]; +#if VERSION_JP +extern IMG_BIN MsgCharImgKana[]; +extern IMG_BIN MsgCharImgLatin[]; +extern IMG_BIN MsgCharImgMenuKana[]; +extern IMG_BIN MsgCharImgMenuLatin[]; +#endif + extern s32 gMessageBoxFrameParts[2][16]; extern IMG_BIN ui_point_right_png[]; extern PAL_BIN ui_point_right_pal[]; MessageNumber gMsgNumbers[] = { +#if VERSION_JP + { + .rasters = &MsgCharImgKana[0x4910], + .texSize = 112, + .texWidth = 16, + .texHeight = 14, + .digitWidth = {11, 8, 11, 11, 11, 11, 11, 11, 11, 11}, + .fixedWidth = 11 + }, { + .rasters = &MsgCharImgMenuKana[0x2EF8], + .texSize = 72, + .texWidth = 12, + .texHeight = 12, + .digitWidth = {9, 8, 9, 9, 9, 9, 9, 9, 9, 9}, + .fixedWidth = 9 + } +#else { .rasters = &MsgCharImgNormal[0x800], .texSize = 128, @@ -149,6 +177,7 @@ MessageNumber gMsgNumbers[] = { .digitWidth = {9, 8, 9, 9, 9, 9, 9, 9, 9, 9}, .fixedWidth = 9 } +#endif }; Gfx gMsgDlistInitDrawNumber[] = { @@ -165,68 +194,6 @@ Gfx gMsgDlistInitDrawNumber[] = { gsSPEndDisplayList(), }; -Vtx gMsgSpeechBoxLQuad[4] = { - { .v = { .ob = {1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0x20, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0x1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } }, -}; - -Vtx gMsgSpeechBoxMQuad[] = { - { .v = { .ob = {0x20, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0xE1, 0, 0}, .tc = {0x100, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0x100, 0x800}, .cn = {191, 184, 176, 255} } }, -}; - -Vtx gMsgSpeechBoxRQuad[] = { - { .v = { .ob = {0xE1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0x100, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } }, - { .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0x100, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } }, -}; - -Vtx gMsgArrowQuad1[] = { - { .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } }, -}; - -Vtx gMsgArrowQuad2[] = { - { .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } }, - { .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } }, -}; - -Gfx D_8014C500[] = { - gsDPSetCycleType(G_CYC_1CYCLE), - gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsDPSetTextureFilter(G_TF_AVERAGE), - gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON), - gsDPSetTexturePersp(G_TP_NONE), - gsDPSetColorDither(G_CD_DISABLE), - gsDPSetAlphaDither(G_AD_DISABLE), - gsDPSetTextureLOD(G_TL_TILE), - gsDPSetTextureLUT(G_TT_RGBA16), - gsDPSetTextureDetail(G_TD_CLAMP), - gsDPSetTextureConvert(G_TC_FILT), - gsDPSetCombineKey(G_CK_NONE), - gsDPSetAlphaCompare(G_AC_NONE), - gsDPNoOp(), - gsSPEndDisplayList(), -}; - -u8 D_8014C580[] = { 50, 80, 100, 105, 100, 0, 0, 0 }; -u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0}; -#if VERSION_IQUE -u32 D_8014AD24 = 2; -#else -u8 D_8014C594[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -#endif - s32 draw_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s16 posX, s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy); @@ -285,7 +252,16 @@ void load_font_data(Addr offset, u16 size, void* dest) { void load_font(s32 font) { if (font != D_80155C98) { if (font == 0) { +#if VERSION_JP + load_font_data(charset_kana_OFFSET, 0x5710, MsgCharImgKana); + load_font_data(charset_latin_OFFSET, 0xBD0, MsgCharImgLatin); + load_font_data(charset_kanji_OFFSET, 0x34F0, MsgCharImgTitle); // huh + load_font_data(charset_buttons_OFFSET, 0x460, MsgCharImgSubtitle); // what + load_font_data(charset_menu_kana_OFFSET, 0x37F8, MsgCharImgMenuKana); + load_font_data(charset_menu_latin_OFFSET, 0x798, MsgCharImgMenuLatin); +#else load_font_data(charset_standard_OFFSET, 0x5100, MsgCharImgNormal); +#endif load_font_data(charset_standard_pal_OFFSET, 0x500, D_802F4560); } else if (font == 1) { load_font_data(charset_title_OFFSET, 0xF60, MsgCharImgTitle); @@ -757,7 +733,11 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { printer->lineEndPos[printer->curLine] = printer->curLinePos; printer->curLine++; *printBuf++ = MSG_CHAR_PRINT_NEXT; - printer->nextLinePos = printer->curLinePos + (MsgCharsets[printer->font]->newLineY + MsgStyleVerticalLineOffsets[printer->style]) * printer->lineCount; + printer->nextLinePos = printer->curLinePos + (MsgCharsets[printer->font]->newLineY +#if !VERSION_JP + + MsgStyleVerticalLineOffsets[printer->style] +#endif + ) * printer->lineCount; printer->windowState = MSG_WINDOW_STATE_SCROLLING; printer->delayFlags |= MSG_DELAY_FLAG_1; } @@ -800,10 +780,18 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { case MSG_STYLE_NARRATE: case MSG_STYLE_F: if (!s8) { +#if VERSION_JP + printer->windowBasePos.x = 40; +#else printer->windowBasePos.x = 20; +#endif printer->windowBasePos.y = 28; printer->windowSize.y = 58; +#if VERSION_JP + printer->windowSize.x = 240; +#else printer->windowSize.x = 280; +#endif printer->windowState = MSG_WINDOW_STATE_OPENING; printer->stateFlags |= MSG_STATE_FLAG_800; printer->delayFlags |= MSG_DELAY_FLAG_1; @@ -855,7 +843,11 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { case MSG_STYLE_POPUP: case MSG_STYLE_B: printer->windowSize.x = printer->msgWidth + 32; +#if VERSION_JP + printer->windowSize.y = 32; +#else printer->windowSize.y = 40; +#endif printer->stateFlags |= MSG_STATE_FLAG_8000; do { if (!s8) { @@ -937,7 +929,11 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { printer->curLine++; *printBuf++ = MSG_CHAR_PRINT_NEXT; arg = *srcBuf++; - printer->nextLinePos = printer->curLinePos + (MsgCharsets[printer->font]->newLineY + MsgStyleVerticalLineOffsets[printer->style]) * arg; + printer->nextLinePos = printer->curLinePos + (MsgCharsets[printer->font]->newLineY +#if !VERSION_JP + + MsgStyleVerticalLineOffsets[printer->style] +#endif + ) * arg; printer->windowState = MSG_WINDOW_STATE_SCROLLING; printer->delayFlags |= MSG_DELAY_FLAG_1; printer->lineCount = 0; @@ -1202,12 +1198,13 @@ void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) { case MSG_CHAR_READ_VARIANT2: case MSG_CHAR_READ_VARIANT3: sp10[0] = (argQ - MSG_CHAR_READ_VARIANT0) + MSG_CHAR_PRINT_VARIANT0; - temp = argQ - MSG_CHAR_READ_VARIANT0 + 0x200; - printer->fontVariant = temp; + printer->fontVariant = sp10[0] + 0x10F; break; +#if !VERSION_JP case MSG_CHAR_READ_SPACE: sp10[0] = MSG_CHAR_PRINT_SPACE; break; +#endif case MSG_CHAR_READ_FUNCTION: sp10[0] = MSG_CHAR_PRINT_FUNCTION; switch (gMessageMsgVars[arg][printer->varBufferReadPos++]) { @@ -1591,6 +1588,12 @@ void close_message(MessagePrintState* msgPrintState) { msgPrintState->stateFlags &= ~MSG_STATE_FLAG_40; } +#if VERSION_JP +#define CHAR_SPACE_MULTIPLIER 0.7 +#else +#define CHAR_SPACE_MULTIPLIER 0.6 +#endif + s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags) { f32 charWidth; @@ -1626,7 +1629,7 @@ s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgS } if (character == MSG_CHAR_READ_SPACE) { - return charWidth * msgScale * 0.6; + return charWidth * msgScale * CHAR_SPACE_MULTIPLIER; } if (character == MSG_CHAR_READ_FULL_SPACE) { f64 retWidth = charWidth * msgScale; @@ -1669,7 +1672,7 @@ s32 msg_get_draw_char_width(s32 character, s32 charset, s32 variation, f32 msgSc } if (character == MSG_CHAR_PRINT_SPACE) { - return baseWidth * msgScale * 0.6; + return baseWidth * msgScale * CHAR_SPACE_MULTIPLIER; } if (character == MSG_CHAR_PRINT_FULL_SPACE) { f64 charWidth = baseWidth * msgScale; @@ -1984,7 +1987,9 @@ void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s } } +#if !VERSION_JP static const f32 padding = 0.0f; +#endif s32 get_msg_width(s32 msgID, u16 charset) { s32 width; @@ -1993,12 +1998,14 @@ s32 get_msg_width(s32 msgID, u16 charset) { return width; } +#if !VERSION_JP s32 get_msg_lines(s32 msgID) { s32 numLines; get_msg_properties(msgID, NULL, NULL, NULL, &numLines, NULL, NULL, 0); return numLines; } +#endif void draw_msg(s32 msgID, s32 posX, s32 posY, s32 opacity, s32 palette, u8 style) { MessagePrintState stackPrinter; @@ -2246,7 +2253,9 @@ void draw_number(s32 value, s32 x, s32 y, s32 charset, s32 palette, s32 opacity, IMG_PTR raster = gMsgNumbers[charset].rasters; s32 texSize = gMsgNumbers[charset].texSize; +#if !VERSION_JP y -= 2; +#endif if (y < 0 || y > 240) { return; } @@ -2318,2013 +2327,3 @@ void draw_number(s32 value, s32 x, s32 y, s32 charset, s32 palette, s32 opacity, } gDPPipeSync(gMainGfxPos++); } - -void drawbox_message_delegate(s32 data, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { - MessagePrintState* printer = (MessagePrintState*)data; - - appendGfx_message(printer, 0, 0, 0, 0, 4, 0); -} - -void draw_message_window(MessagePrintState* printer) { - f32 scale = 1.0f; - s32 rotZ = 0; - - switch (printer->windowState) { - case MSG_WINDOW_STATE_D: - scale = (f32)D_8014C580[printer->fadeInCounter] / 100.0; - rotZ = (4 - printer->fadeInCounter) * 3; - printer->fadeInCounter++; - if (D_8014C580[printer->fadeInCounter] == 0) { - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - break; - case MSG_WINDOW_STATE_E: - scale = (f32)D_8014C588[printer->fadeOutCounter] / 100.0; - rotZ = -printer->fadeOutCounter; - printer->fadeOutCounter++; - if (D_8014C588[printer->fadeOutCounter] == 0) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - break; - } - - switch (printer->windowState) { - case MSG_WINDOW_STATE_D: - case MSG_WINDOW_STATE_E: - printer->windowBasePos.x = 160 - (printer->windowSize.x / 2); - printer->windowBasePos.y = 56; - draw_box(DRAW_FLAG_ROTSCALE, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0, - scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, SCREEN_WIDTH, - SCREEN_HEIGHT, NULL); - break; - default: - appendGfx_message(printer, printer->windowOffsetPos.x, printer->windowOffsetPos.y, printer->unk_46C, - printer->curLinePos, 4, 0); - break; - } -} - -#if VERSION_IQUE || VERSION_PAL -INCLUDE_ASM(s32, "msg", appendGfx_message); -#else -void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 additionalOffsetX, u16 additionalOffsetY, - u16 flag, u8 alpha) { - SpriteRasterInfo sprRasterInfo; - u16 sp80bool; - s16 sp8E; - s16 sp96; - s16 sp9E; - s16 palette; - s16 spAE; - u16 spB6; - u8 spB8; - f32 windowScaleX; - MessageCharset* msgCharset; - f32 temp_f10; - f32 temp_f20; - f32 temp_f20_3; - f32 temp_f22_2; - f32 temp_f24; - f32 bubbleX; - f32 bubbleY; - f32 temp_f28; - f32 windowScaleY; - f32 temp_f8; - f32 temp_f8_5; - f64 temp_f0; - f32 temp_f0_2; - f32 temp_f2_2; - f64 temp_f20_2; - f64 temp_f22; - f32 temp_f2; - f64 temp_f2_3; - s32 temp_s0_7; - s32 temp_s0_8; - s32 temp_a2; - s32 temp_s1_5; - s32 i; - s16 temp_s3; - s16 temp_s4; - s32 windowSizeX; - s32 windowSizeY; - s16 temp_s5; - s16 temp_s6; - u32 temp_a0_49; - s32 animIdx; - u8 packedScaleX; - u8 packedScaleY; - MessageImageData* msgVarImage; - MessageImageData* msgImageData; - s32 phi_a0; - s32 straightWidth; - s32 curveWidth; - s32 height; - s32 frameX; - s32 frameY; - s32 frameSizeX; - s32 frameSizeY; - s32 frameFading; - u8 frameAlpha; - u16 fading; - u8 phi_s0_5; - IMG_PTR signRaster; - PAL_PTR signPalette; - s8 phi_s2_4; - u8 phi_s3_2; - s32 phi_v0_3; - s32 phi_a0_4; - s16 phi_t5; - s16 phi_s0_6; - s16 phi_t3; - s32 dbPos; - s16 charPosX; - s16 charPosY; - s16 phi_s2_5; - s32 phi_s0_7; - s32 phi_s1_8; - s8 varImgHasBorder; - s16 imgDrawPosX; - s16 imgDrawPosY; - f32 z1; - f32 z2; - f32 temp1; - f32 temp2; - - msg_drawState = &D_80155D20; - msg_drawState->printBuffer = printer->printBuffer; - msg_drawState->printModeFlags = 0; - if (gMainGfxPos != D_80151338) { - msg_reset_gfx_state(); - } - msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_1 | MSG_PRINT_FLAG_100); - sp8E = 255; - if (flag & 1) { - sp8E = alpha; - } - msg_drawState->textStartPos[0] = 0; - msg_drawState->textStartPos[1] = 0; - msg_drawState->clipX[0] = 0; - msg_drawState->clipY[0] = 0; - msg_drawState->clipX[1] = SCREEN_WIDTH - 1; - msg_drawState->clipY[1] = SCREEN_HEIGHT - 1; - msg_drawState->msgScale.x = 1.0f; - msg_drawState->msgScale.y = 1.0f; - msg_drawState->unk_29 = 0; - msg_drawState->framePalette = 0; - msg_drawState->unk_2C = 0; - msg_drawState->visiblePrintedCount = 0; - msg_drawState->centerPos = 0; - msg_drawState->fontVariant = 0; - msg_drawState->curPosX = 0; - msg_drawState->nextPos[0] = 0; - msg_drawState->nextPos[1] = 0; - msg_drawState->font = 0; - msg_drawState->effectFlags = 0; - msg_drawState->nextCounter = 0; - msg_drawState->textColor = MSG_PAL_WHITE; - sp96 = 0xFF; - spAE = 0xFF; - spB6 = 0; - spB8 = 0; - sp9E = -1; - - if (flag & 2) { - msg_drawState->font = 1; - } - - if (flag & 4) { - gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); - } - - sp80bool = FALSE; - msg_drawState->drawBufferPos = 0; - - while (!sp80bool) { - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { - case MSG_CHAR_PRINT_ENDL: - msg_drawState->nextPos[0] = 0; - msg_drawState->nextPos[1] += (s32)((msg_drawState->msgScale.y * MsgCharsets[msg_drawState->font]->newLineY) + - MsgStyleVerticalLineOffsets[printer->style]); - if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_40) { - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_80; - } - msg_drawState->drawBufferPos++; - break; - case MSG_CHAR_PRINT_UNK_CHAR_FA: - msg_drawState->drawBufferPos++; - break; - case MSG_CHAR_PRINT_VARIANT0: - case MSG_CHAR_PRINT_VARIANT1: - case MSG_CHAR_PRINT_VARIANT2: - case MSG_CHAR_PRINT_VARIANT3: - msg_drawState->fontVariant = msg_drawState->printBuffer[msg_drawState->drawBufferPos] - MSG_CHAR_PRINT_VARIANT0; - msg_drawState->drawBufferPos++; - break; - case MSG_CHAR_PRINT_SPACE: - case MSG_CHAR_PRINT_FULL_SPACE: - case MSG_CHAR_PRINT_HALF_SPACE: - msg_drawState->nextPos[0] += msg_get_draw_char_width(msg_drawState->printBuffer[msg_drawState->drawBufferPos], - msg_drawState->font, msg_drawState->fontVariant, msg_drawState->msgScale.x, msg_drawState->curPosX, - msg_drawState->printModeFlags); - msg_drawState->drawBufferPos++; - break; - case MSG_CHAR_PRINT_STYLE: - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { - case MSG_STYLE_RIGHT: - case MSG_STYLE_LEFT: - case MSG_STYLE_CENTER: - case MSG_STYLE_TATTLE: - if (printer->windowState == MSG_WINDOW_STATE_OPENING && printer->fadeInCounter == 0) { - printer->openStartPos.x = printer->initOpenPos.x; - printer->openStartPos.y = printer->initOpenPos.y; - } - temp_s6 = printer->openStartPos.x; - temp_s5 = printer->openStartPos.y; - temp_s4 = printer->windowBasePos.x + (f32) printer->windowSize.x * 0.5; - temp_s3 = printer->windowBasePos.y + (f32) printer->windowSize.y * 0.5; - msg_drawState->textColor = MSG_PAL_STANDARD; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - - if (printer->style == MSG_STYLE_RIGHT || printer->style == MSG_STYLE_LEFT || printer->style == MSG_STYLE_CENTER) { - straightWidth = 218; - printer->windowBasePos.x = 22; - printer->windowBasePos.y = 13; - printer->windowSize.x = 296; - printer->windowSize.y = 68; - msg_drawState->textStartPos[0] = 26; - msg_drawState->textStartPos[1] = 6; - printer->rewindArrowPos.x = 276; - printer->rewindArrowPos.y = 57; - curveWidth = 32; - height = 68; - } else { - straightWidth = 218; - - switch (printer->maxLinesPerPage) { - case 1: - msg_drawState->textStartPos[0] = 18; - msg_drawState->textStartPos[1] = 10; - curveWidth = 24; - break; - case 2: - msg_drawState->textStartPos[0] = 22; - msg_drawState->textStartPos[1] = 6; - curveWidth = 28; - break; - case 3: - msg_drawState->textStartPos[0] = 26; - msg_drawState->textStartPos[1] = 8; - curveWidth = 32; - break; - default: - msg_drawState->textStartPos[0] = 26; - msg_drawState->textStartPos[1] = 6; - curveWidth = 32; - break; - } - - straightWidth = printer->msgWidth; - if (straightWidth > 256) { - straightWidth = 256; - } - if (straightWidth < 70) { - straightWidth = 70; - } - straightWidth -= 12; - - printer->windowSize.x = straightWidth + (curveWidth * 2); - - height = (printer->maxLinesPerPage * 14) + 16; - if (height > 68) { - height = 68; - } - if (height < 36) { - height = 36; - } - printer->windowSize.y = height; - - temp_a2 = printer->openStartPos.x - printer->windowSize.x / 2; - if (temp_a2 < 18) { - temp_a2 = 18; - } - if (temp_a2 + printer->windowSize.x > SCREEN_WIDTH - 18) { - temp_a2 = SCREEN_WIDTH - 18 - printer->windowSize.x; - } - phi_a0 = printer->openStartPos.y - 38 - printer->windowSize.y; - if (phi_a0 < 20) { - phi_a0 = 20; - } - if (phi_a0 + printer->windowSize.y > 170) { - phi_a0 = 170 - printer->windowSize.y; - } - printer->windowBasePos.x = temp_a2; - printer->windowBasePos.y = phi_a0; - printer->rewindArrowPos.x = (printer->windowSize.x + temp_a2) - 30; - printer->rewindArrowPos.y = (printer->windowSize.y + phi_a0) - 18; - } - - if (printer->windowState == MSG_WINDOW_STATE_B || printer->windowState == MSG_WINDOW_STATE_C) { - msg_drawState->framePalette = 1; - } - - if (printer->windowState == MSG_WINDOW_STATE_OPENING) { - windowScaleX = update_lerp(EASING_LINEAR, 0.07f, 1.0f, printer->fadeInCounter, 7); - windowScaleY = update_lerp(EASING_LINEAR, 0.3f, 1.0f, printer->fadeInCounter, 7); - temp_f28 = update_lerp(EASING_LINEAR, 96.0f, 200.0f, printer->fadeInCounter, 7); - temp_f20 = update_lerp(EASING_SIN_OUT, temp_s5, temp_s3, printer->fadeInCounter, 7); - temp_f24 = update_lerp(EASING_SIN_OUT, temp_s6, temp_s4, printer->fadeInCounter, 7); - temp_f2_2 = printer->windowSize.x * windowScaleX; - temp_f0_2 = printer->windowSize.y * windowScaleY; - bubbleX = (temp_f24 - temp_f2_2 * 0.5) + 0.5; - bubbleY = (temp_f20 - temp_f0_2 * 0.5) + 0.5; - msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, windowScaleX, windowScaleY, temp_f28, 1); - printer->fadeInCounter++; - if (printer->fadeInCounter == 7) { - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { - printer->fadeOutCounter++; - windowScaleX = update_lerp(EASING_LINEAR, 1.0f, 0.6f, printer->fadeOutCounter, 5); - windowScaleY = update_lerp(EASING_LINEAR, 1.0f, 0.8f, printer->fadeOutCounter, 5); - temp_f2 = (printer->windowSize.x * windowScaleX); - temp_f0 = (printer->windowSize.y * windowScaleY); - temp_f24 = temp_s4; - temp_f20 = temp_s3; - bubbleX = (temp_f24 - temp_f2 * 0.5) + 0.5; - bubbleY = (temp_f20 - temp_f0 * 0.5) + 0.5; - temp_f22_2 = (temp_f24 + temp_f2 * 0.5) - 0.5; - temp_f20_3 = (temp_f20 + temp_f0 * 0.5) - 0.5; - temp_f28 = update_lerp(EASING_LINEAR, 255.0f, 64.0f, printer->fadeOutCounter, 5); - sp8E = temp_f28 * 0.35; - spAE = temp_f28; - msg_drawState->clipX[0] = bubbleX + msg_drawState->textStartPos[0]; - msg_drawState->clipY[0] = bubbleY + msg_drawState->textStartPos[1]; - msg_drawState->clipX[1] = temp_f22_2 - msg_drawState->textStartPos[0]; - msg_drawState->clipY[1] = temp_f20_3 - msg_drawState->textStartPos[1]; - msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, windowScaleX, windowScaleY, temp_f28, 1); - if (printer->fadeOutCounter >= 5) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - } else { - bubbleX = posX + printer->windowBasePos.x; - bubbleY = posY + printer->windowBasePos.y; - - msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, 1.0f, 1.0f, 255, 1); - if (((u32)(printer->openStartPos.x - 20) <= 280) && (printer->openStartPos.y <= 220)) { - msg_draw_speech_arrow(printer); - } - } - - if (printer->windowState != MSG_WINDOW_STATE_CLOSING) { - msg_drawState->clipX[0] = 20; - msg_drawState->clipY[0] = printer->windowOffsetPos.y + printer->windowBasePos.y + - msg_drawState->textStartPos[1]; - msg_drawState->clipX[1] = SCREEN_WIDTH - 20; - msg_drawState->clipY[1] = msg_drawState->clipY[0] + printer->windowSize.y - 16; - } - msg_reset_gfx_state(); - msg_drawState->drawBufferPos += 2; - break; - case MSG_STYLE_CHOICE: - frameFading = 0; - windowSizeX = printer->windowSize.x; - windowSizeY = printer->windowSize.y; - frameSizeX = windowSizeX; - frameSizeY = windowSizeY; - msg_drawState->framePalette = 0; - msg_drawState->textStartPos[0] = 12; - msg_drawState->textStartPos[1] = 6; - frameAlpha = 255; - if (printer->windowState == MSG_WINDOW_STATE_OPENING) { - - printer->fadeInCounter++; - if (printer->fadeInCounter == 6) { - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - - temp_f10 = ((f32) printer->fadeInCounter * (2.0 / 15.0)) + 0.2; - - z1 = printer->windowBasePos.x + (windowSizeX / 2); - z2 = printer->windowBasePos.y + (windowSizeY / 2); - temp1 = z1 - (windowSizeX * temp_f10 * 0.5); - temp2 = z2 - (windowSizeY * temp_f10 * 0.5); - frameX = temp1 + 0.5; - frameY = temp2 + 0.5; - frameSizeX = windowSizeX * temp_f10 + 0.5; - frameSizeY = windowSizeY * temp_f10 + 0.5; - - if (frameSizeX < 24) { - frameSizeX = 24; - } - if (frameSizeY < 24) { - frameSizeY = 24; - } - - sp8E = (u8)(temp_f10 * 255.0) * 0.6; - } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { - printer->fadeOutCounter++; - if (printer->fadeOutCounter >= 5) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - frameAlpha = ~(printer->fadeOutCounter * 0x2E); - sp8E = ((u8)frameAlpha) * 0.6; - frameFading = 1; - if (sp8E >= 32) { - sp8E -= 32; - } - frameX = printer->windowBasePos.x; - frameY = printer->windowBasePos.y; - } else { - frameX = printer->windowBasePos.x; - frameY = printer->windowBasePos.y; - msg_draw_prim_rect(255, 32, 32, 0, frameX - 1, frameY - 1, windowSizeX + 2, windowSizeY + 2); - } - msg_drawState->clipX[0] = frameX + 2; - msg_drawState->clipY[0] = frameY + 2; - msg_drawState->clipX[1] = frameX + frameSizeX - 2; - msg_drawState->clipY[1] = frameY + frameSizeY - 2; - msg_draw_frame(frameX, frameY, frameSizeX, frameSizeY, MSG_STYLE_CHOICE, msg_drawState->framePalette, frameFading, frameAlpha, - frameAlpha); - msg_reset_gfx_state(); - spAE = frameAlpha & 0xFF; - msg_drawState->textColor = MSG_PAL_STANDARD; - msg_drawState->drawBufferPos += 2; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - break; - case MSG_STYLE_INSPECT: - case MSG_STYLE_UPGRADE: - case MSG_STYLE_NARRATE: - case MSG_STYLE_F: - fading = 0; - msg_drawState->textStartPos[0] = 16; - msg_drawState->textStartPos[1] = 3; - msg_drawState->clipX[0] = printer->windowBasePos.x + 5; - msg_drawState->clipY[0] = printer->windowBasePos.y + 4; - msg_drawState->clipX[1] = printer->windowBasePos.x + printer->windowSize.x - 8; - msg_drawState->clipY[1] = printer->windowBasePos.y + printer->windowSize.y - 5; - printer->rewindArrowPos.x = msg_drawState->clipX[1] - 17; - printer->rewindArrowPos.y = msg_drawState->clipY[1] - 17; - msg_drawState->textColor = MSG_PAL_WHITE; - phi_s0_5 = 0xFF; - msg_draw_prim_rect(255, 32, 32, 0, printer->windowBasePos.x + 3, printer->windowBasePos.y - 1, - printer->windowSize.x - 6, 1); - msg_draw_prim_rect(32, 255, 32, 0, printer->windowBasePos.x + 3, - printer->windowBasePos.y + printer->windowSize.y, printer->windowSize.x - 6, - 1); - - if (printer->windowState == MSG_WINDOW_STATE_OPENING) { - phi_s0_5 = (printer->fadeInCounter * 0x30) + 0x50; - sp8E = (phi_s0_5 & 0xFF) - 0x30; - printer->fadeInCounter++; - fading = 1; - if ((s16)printer->fadeInCounter == 4) { // TODO why is this cast needed - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { - phi_s0_5 = -0x30 - (printer->fadeOutCounter * 40); - sp8E = (phi_s0_5 & 0xFF) - 0x30; - printer->fadeOutCounter++; - fading = 1; - if (printer->fadeOutCounter == 4) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - } - - msg_draw_frame(printer->windowBasePos.x, printer->windowBasePos.y, printer->windowSize.x, printer->windowSize.y, MSG_STYLE_INSPECT, - msg_drawState->framePalette, fading, phi_s0_5, phi_s0_5); - msg_reset_gfx_state(); - spAE = phi_s0_5 & 0xFF; - msg_drawState->drawBufferPos += 2; - break; - case MSG_STYLE_SIGN: - case MSG_STYLE_LAMPPOST: - msg_drawState->textStartPos[0] = 18; - msg_drawState->textStartPos[1] = 11; - printer->windowBasePos.x = 20; - printer->windowBasePos.y = 28; - printer->windowSize.x = 280; - msg_drawState->framePalette = 15; - temp_s1_5 = 0xFF; - if (printer->style == MSG_STYLE_SIGN) { - signRaster = ui_msg_sign_corner_bottomright_png; - printer->windowSize.y = 72; - msg_drawState->textColor = MSG_PAL_18; - signPalette = ui_msg_sign_pal; - } else { - signRaster = ui_msg_lamppost_corner_bottomright_png; - msg_drawState->textColor = MSG_PAL_1C; - signPalette = ui_msg_lamppost_pal; - } - msg_drawState->clipX[0] = 34; - msg_drawState->clipY[0] = 40; - msg_drawState->clipX[1] = 283; - msg_drawState->clipY[1] = printer->windowSize.y + 17; - printer->rewindArrowPos.x = msg_drawState->clipX[1] - 16; - printer->rewindArrowPos.y = msg_drawState->clipY[1] - 9; - - if (printer->windowState == MSG_WINDOW_STATE_OPENING) { - temp_s1_5 = (printer->fadeInCounter << 6) + 0x50; - sp8E = (temp_s1_5 & 0xFF) - 0x30; - printer->fadeInCounter++; - if (printer->fadeInCounter == 3) { - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - } else { - if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { - temp_s1_5 = -0x30 - (printer->fadeOutCounter * 0x30); - sp8E = (temp_s1_5 & 0xFF) - 0x30; - printer->fadeOutCounter++; - if (printer->fadeOutCounter == 3) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - } - } - spAE = (u8)temp_s1_5; - draw_ci_image_with_clipping(ui_msg_sign_corner_topleft_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20, 28, 10, 10, 310, 230, temp_s1_5); - draw_ci_image_with_clipping(ui_msg_sign_corner_topright_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284, 28, 10, 10, 310, 230, temp_s1_5); - draw_ci_image_with_clipping(ui_msg_sign_corner_bottomleft_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20, printer->windowSize.y + 12, 10, 10, 310, 230, - temp_s1_5); - draw_ci_image_with_clipping(signRaster, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284, printer->windowSize.y + 12, 10, 10, 310, 230, temp_s1_5); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_top_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMainGfxPos++, 0x0090, 0x0070, 0x0470, 0x00B0, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_left_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 31, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMainGfxPos++, 0x0050, 0x00B0, 0x0090, (printer->windowSize.y + 12) * 4, G_TX_RENDERTILE, 0, 0, - 0x0400, 0x0400); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_right_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 31, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMainGfxPos++, 0x0470, 0x00B0, 0x04B0, (printer->windowSize.y + 12) * 4, G_TX_RENDERTILE, 0, 0, - 0x0400, 0x0400); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_bottom_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMainGfxPos++, 0x0090, (printer->windowSize.y + 12) * 4, 0x0470, (printer->windowSize.y + 28) * 4, - G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_fill_png, G_IM_FMT_CI, 8, 0, 0, 0, 7, 7, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 3, 3, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMainGfxPos++, 0x0090, 0x00B0, 0x0470, (printer->windowSize.y + 12) * 4, G_TX_RENDERTILE, 0, 0, - 0x0400, 0x0400); - msg_reset_gfx_state(); - msg_drawState->drawBufferPos += 2; - break; - case MSG_STYLE_POSTCARD: - phi_s2_4 = 0; - msg_drawState->textStartPos[0] = 12; - msg_drawState->textStartPos[1] = 5; - printer->windowBasePos.x = 40; - printer->windowBasePos.y = 28; - msg_drawState->clipX[0] = 45; - msg_drawState->clipY[0] = 32; - msg_drawState->clipX[1] = 272; - msg_drawState->clipY[1] = 81; - printer->rewindArrowPos.x = msg_drawState->clipX[1] - 21; - printer->rewindArrowPos.y = msg_drawState->clipY[1] - 20; - msg_drawState->framePalette = 0; - msg_drawState->textColor = MSG_PAL_WHITE; - msg_draw_prim_rect(255, 32, 32, 0, 43, 27, 234, 1); - msg_draw_prim_rect(32, 255, 32, 0, 43, 86, 234, 1); - phi_s3_2 = 0xFF; - if (printer->windowState == MSG_WINDOW_STATE_OPENING) { - phi_s3_2 = (printer->fadeInCounter * 64) + 80; - sp8E = (phi_s3_2 & 0xFF) - 0x30; - printer->fadeInCounter++; - if (printer->fadeInCounter == 3) { - printer->windowState = MSG_WINDOW_STATE_PRINTING; - } - phi_s2_4 = 1; - } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { - phi_s3_2 = -0x30 - (printer->fadeOutCounter * 0x30); - sp8E = (phi_s3_2 & 0xFF) - 0x30; - printer->fadeOutCounter++; - if (printer->fadeOutCounter == 3) { - printer->stateFlags |= MSG_STATE_FLAG_1; - } - phi_s2_4 = 1; - } - msg_draw_frame(40, 28, 240, 58, MSG_STYLE_INSPECT, msg_drawState->framePalette, phi_s2_4, phi_s3_2, phi_s3_2); - draw_ci_image_with_clipping(printer->letterBackgroundImg, 150, 105, G_IM_FMT_CI, G_IM_SIZ_4b, - printer->letterBackgroundPal, 85, 97, 10, 10, 300, 220, phi_s3_2); - draw_ci_image_with_clipping(printer->letterContentImg, 70, 95, G_IM_FMT_CI, G_IM_SIZ_8b, - printer->letterContentPal, 160, 102, 10, 10, 300, 220, phi_s3_2); - msg_reset_gfx_state(); - spAE = phi_s3_2 & 0xFF; - msg_drawState->drawBufferPos += 2; - break; - case MSG_STYLE_POPUP: - case MSG_STYLE_B: - msg_drawState->textStartPos[0] = 16; - msg_drawState->textStartPos[1] = 4; - msg_drawState->clipX[0] = 0; - msg_drawState->clipX[1] = SCREEN_WIDTH - 1; - msg_drawState->clipY[0] = 0; - msg_drawState->clipY[1] = SCREEN_HEIGHT - 1; - msg_drawState->textColor = MSG_PAL_WHITE; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - if (printer->windowState == MSG_WINDOW_STATE_D || printer->windowState == MSG_WINDOW_STATE_E) { - printer->windowBasePos.x = 0; - printer->windowBasePos.y = 0; - } else { - printer->windowBasePos.x = 160 - printer->windowSize.x / 2; - printer->windowBasePos.y = 56; - draw_box(0, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, - printer->windowSize.y, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL, - SCREEN_WIDTH, SCREEN_HEIGHT, NULL); - } - msg_reset_gfx_state(); - msg_drawState->drawBufferPos += 2; - break; - case MSG_STYLE_EPILOGUE: - printer->windowBasePos.x = 60; - printer->windowBasePos.y = 110; - printer->windowSize.x = 200; - printer->windowSize.y = 50; - msg_drawState->textStartPos[0] = 0; - msg_drawState->textStartPos[1] = -2; - msg_drawState->clipX[0] = printer->windowBasePos.x; - msg_drawState->clipY[0] = printer->windowBasePos.y; - msg_drawState->clipX[1] = printer->windowBasePos.x + printer->windowSize.x; - msg_drawState->clipY[1] = printer->windowBasePos.y + printer->windowSize.y; - printer->rewindArrowPos.x = printer->windowBasePos.x + printer->windowSize.x - 10; - printer->rewindArrowPos.y = printer->windowBasePos.y + printer->windowSize.y - 10; - msg_reset_gfx_state(); - msg_drawState->drawBufferPos += 2; - break; - } - break; - case MSG_CHAR_PRINT_NEXT: - if (printer->windowState == MSG_WINDOW_STATE_C) { - if (msg_drawState->nextCounter >= printer->unkArraySize) { - sp80bool = TRUE; - } - } else if (printer->windowState == MSG_WINDOW_STATE_B) { - if (printer->curLinePos < printer->lineEndPos[printer->unkArraySize]) { - if (msg_drawState->nextCounter >= printer->unkArraySize) { - sp80bool = TRUE; - } - } else { - if (printer->unkArraySize < msg_drawState->nextCounter) { - sp80bool = TRUE; - } else if (msg_drawState->nextCounter >= printer->unkArraySize) { - phi_a0_4 = 36; - if (printer->maxLinesPerPage >= 2) { - phi_v0_3 = 48; - if (printer->maxLinesPerPage == 2) { - phi_v0_3 = 32; - } - if (printer->unk_4C8 < phi_v0_3) { - if (printer->unk_4C8 <= 0x10) { - phi_a0_4 = 56; - } - sp8E = 0xFF - (phi_a0_4 * printer->unk_4CC); - if (sp8E < 0) { - sp8E = 0; - } - } - } - } - } - } - msg_drawState->nextCounter++; - msg_drawState->drawBufferPos++; - break; - case MSG_CHAR_PRINT_END: - sp80bool = TRUE; - break; - case MSG_CHAR_PRINT_FUNCTION: - msg_drawState->drawBufferPos++; - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { - case MSG_PRINT_FUNC_FONT: - msg_drawState->font = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - break; - case MSG_PRINT_FUNC_VARIANT: - msg_drawState->fontVariant = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_COLOR: - msg_drawState->textColor = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_SPACING: - msg_drawState->curPosX = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_SIZE: - packedScaleX = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->msgScale.x = (f32)(packedScaleX >> 4) + ((packedScaleX & 0xF) * 0.0625f); - packedScaleY = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; - msg_drawState->msgScale.y = (f32)(packedScaleY >> 4) + ((packedScaleY & 0xF) * 0.0625f); - msg_drawState->drawBufferPos += 3; - if (msg_drawState->msgScale.x > 1.0 || msg_drawState->msgScale.y > 1.0) { - gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); - } else if (msg_drawState->msgScale.x < 1.0 || msg_drawState->msgScale.y < 1.0) { - gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); - } - break; - case MSG_PRINT_FUNC_SIZE_RESET: - msg_drawState->msgScale.x = 1.0f; - msg_drawState->msgScale.y = 1.0f; - msg_drawState->drawBufferPos++; - gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); - break; - case MSG_PRINT_FUNC_SET_X: - msg_drawState->nextPos[0] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] * 256 + - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]); - msg_drawState->drawBufferPos += 3; - break; - case MSG_PRINT_FUNC_SET_Y: - msg_drawState->nextPos[1] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_RIGHT: - msg_drawState->nextPos[0] += msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_DOWN: - msg_drawState->nextPos[1] += msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_UP: - msg_drawState->nextPos[1] -= msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_INLINE_IMAGE: - msgImageData = &(*gMsgVarImages)[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]]; - phi_t5 = sp8E; - if (sp8E < 0xFF) { - phi_t5 = (s32)(sp8E * 0.7); - } - imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - - additionalOffsetX); - imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - - additionalOffsetY); - - draw_ci_image_with_clipping(msgImageData->raster, msgImageData->width, msgImageData->height, msgImageData->format, msgImageData->bitDepth, - msgImageData->palette, imgDrawPosX, imgDrawPosY, (s32) msg_drawState->clipX[0], (s32) msg_drawState->clipY[0], - msg_drawState->clipX[1] - msg_drawState->clipX[0], msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t5); - msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_2 | MSG_PRINT_FLAG_10); - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_ANIM_SPRITE: - phi_s0_6 = sp8E; - if (sp8E < 0xFF) { - phi_s0_6 = (s32)(sp8E * 0.7); - } - - if (spr_get_npc_raster_info(&sprRasterInfo, (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] << 8) | - msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], - msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]) != 0) { - imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - - additionalOffsetX); - imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - - additionalOffsetY); - - draw_ci_image_with_clipping(sprRasterInfo.raster, sprRasterInfo.width, sprRasterInfo.height, G_IM_FMT_CI, G_IM_SIZ_4b, sprRasterInfo.defaultPal, imgDrawPosX, imgDrawPosY, - msg_drawState->clipX[0], msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0], - msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_s0_6); - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - } - msg_drawState->drawBufferPos += 4; - break; - case MSG_PRINT_FUNC_ITEM_ICON: - if (D_8015131C != 0) { - phi_t3 = sp8E; - if (sp8E < 0xFF) { - phi_t3 = (s32)(sp8E * 0.7); - } - imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - - additionalOffsetX); - imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - - additionalOffsetY); - - draw_ci_image_with_clipping(D_80159B50, 32, 32, G_IM_FMT_CI, G_IM_SIZ_4b, D_8015C7E0, imgDrawPosX, imgDrawPosY, msg_drawState->clipX[0], - msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0], - msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t3); - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - } - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_ANIM_DELAY: - animIdx = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - if (printer->animTimers[animIdx] == -1) { - printer->animTimers[animIdx] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]; - } - if (printer->animTimers[animIdx] == 0) { - printer->curAnimFrame[animIdx]++; - } - - dbPos = msg_drawState->drawBufferPos; - while (TRUE) { - if ((msg_drawState->printBuffer[dbPos - 1] == MSG_CHAR_PRINT_FUNCTION) && - (msg_drawState->printBuffer[dbPos] == MSG_PRINT_FUNC_ANIM_DELAY) && - (msg_drawState->printBuffer[dbPos + 1] == animIdx)) { - if (msg_drawState->printBuffer[dbPos + 2] != printer->curAnimFrame[animIdx]) { - dbPos += 4; - } else { - break; - } - } else { - if ((msg_drawState->printBuffer[dbPos] == MSG_CHAR_PRINT_FUNCTION) && - (msg_drawState->printBuffer[dbPos + 1] == MSG_PRINT_FUNC_ANIM_LOOP) && - (msg_drawState->printBuffer[dbPos + 2] == animIdx)) { - - if (printer->animTimers[animIdx] == 0) { - printer->curAnimFrame[animIdx] = msg_drawState->printBuffer[dbPos + 3]; - dbPos = msg_drawState->drawBufferPos; - continue; - } else { - dbPos++; - break; - } - } else { - if (msg_drawState->printBuffer[dbPos] == MSG_CHAR_PRINT_FUNCTION && - msg_drawState->printBuffer[dbPos + 1] == MSG_PRINT_FUNC_ANIM_DONE) { - if (msg_drawState->printBuffer[dbPos + 2] == animIdx) { - dbPos++; - break; - } - } - } - } - dbPos++; - } - msg_drawState->drawBufferPos = dbPos; - - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { - case MSG_PRINT_FUNC_ANIM_DELAY: - if (printer->animTimers[animIdx] == 0) { - if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == 0) { - printer->animTimers[animIdx] = -2; - } else { - printer->animTimers[animIdx] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]; - } - } - msg_drawState->drawBufferPos += 4; - break; - case MSG_PRINT_FUNC_ANIM_LOOP: - msg_drawState->drawBufferPos += 3; - break; - case MSG_PRINT_FUNC_ANIM_DONE: - msg_drawState->drawBufferPos += 2; - break; - } - break; - case MSG_PRINT_FUNC_ANIM_LOOP: - msg_drawState->drawBufferPos += 3; - break; - case MSG_PRINT_FUNC_ANIM_DONE: - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_CURSOR: - printer->cursorPosX[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]] = msg_drawState->textStartPos[0] + - msg_drawState->nextPos[0] - additionalOffsetX - 6; - printer->cursorPosY[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]] = msg_drawState->textStartPos[1] + - msg_drawState->nextPos[1] - additionalOffsetY - 1; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_OPTION: - if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == 0xFF) { - msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_20; - } else { - msg_drawState->unk_2D = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_20; - msg_drawState->nextPos[0] += 14; - } - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_SET_FRAME_PALETTE: - msg_drawState->framePalette = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_RESET_GFX: - msg_reset_gfx_state(); - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_SAVE_POS: - msg_drawState->savedPos[0] = msg_drawState->nextPos[0]; - msg_drawState->savedPos[1] = msg_drawState->nextPos[1]; - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_RESTORE_POS: - msg_drawState->nextPos[0] = msg_drawState->savedPos[0]; - msg_drawState->nextPos[1] = msg_drawState->savedPos[1]; - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_SAVE_COLOR: - msg_drawState->savedColor = msg_drawState->textColor; - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_RESTORE_COLOR: - msg_drawState->textColor = msg_drawState->savedColor; - msg_drawState->drawBufferPos++; - break; - case MSG_PRINT_FUNC_START_FX: - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { - case MSG_FX_SHAKE: - msg_drawState->effectFlags |= MSG_FX_FLAG_SHAKE; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_WAVE: - msg_drawState->effectFlags |= MSG_FX_FLAG_WAVE; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_NOISE_OUTLINE: - msg_drawState->effectFlags |= MSG_FX_FLAG_NOISE_OUTLINE; - gDPSetCombineMode(gMainGfxPos++, PM_CC_MSG_NOISE_OUTLINE, PM_CC_MSG_NOISE_OUTLINE); - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_STATIC: - msg_drawState->effectFlags |= MSG_FX_FLAG_STATIC; - gDPSetEnvColor(gMainGfxPos++, - msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], - msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], - msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], - 0); - gDPSetCombineMode(gMainGfxPos++, PM_CC_MSG_STATIC, PM_CC_MSG_STATIC); - msg_drawState->drawBufferPos += 3; - break; - case MSG_FX_BLUR: - msg_drawState->effectFlags |= MSG_FX_FLAG_BLUR; - spB8 = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; - msg_drawState->drawBufferPos += 3; - break; - case MSG_FX_RAINBOW: - msg_drawState->effectFlags |= MSG_FX_FLAG_RAINBOW; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_DITHER_FADE: - msg_drawState->effectFlags |= MSG_FX_FLAG_DITHER_FADE; - spB6 = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; - msg_drawState->drawBufferPos += 3; - break; - case MSG_FX_GLOBAL_WAVE: - msg_drawState->effectFlags |= MSG_FX_FLAG_GLOBAL_WAVE; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_GLOBAL_RAINBOW: - msg_drawState->effectFlags |= MSG_FX_FLAG_GLOBAL_RAINBOW; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_RISE_PRINT: - msg_drawState->effectFlags |= MSG_FX_FLAG_RISE_PRINT; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_GROW_PRINT: - msg_drawState->effectFlags |= MSG_FX_FLAG_GROW_PRINT; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_SIZE_JITTER: - msg_drawState->effectFlags |= MSG_FX_FLAG_SIZE_JITTER; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_SIZE_WAVE: - msg_drawState->effectFlags |= MSG_FX_FLAG_SIZE_WAVE; - msg_drawState->drawBufferPos += 2; - break; - case MSG_FX_DROP_SHADOW: - msg_drawState->effectFlags |= MSG_FX_FLAG_DROP_SHADOW; - msg_drawState->drawBufferPos += 2; - break; - } - break; - case MSG_PRINT_FUNC_END_FX: - switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { - case MSG_FX_SHAKE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_SHAKE; - break; - case MSG_FX_WAVE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_WAVE; - break; - case MSG_FX_NOISE_OUTLINE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_NOISE_OUTLINE; - break; - case MSG_FX_STATIC: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_STATIC; - break; - case MSG_FX_BLUR: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_BLUR; - break; - case MSG_FX_RAINBOW: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_RAINBOW; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - break; - case MSG_FX_DITHER_FADE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_DITHER_FADE; - break; - case MSG_FX_GLOBAL_WAVE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_WAVE; - break; - case MSG_FX_GLOBAL_RAINBOW: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_RAINBOW; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - break; - case MSG_FX_RISE_PRINT: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_RISE_PRINT; - break; - case MSG_FX_GROW_PRINT: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_GROW_PRINT; - break; - case MSG_FX_SIZE_JITTER: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_SIZE_JITTER; - break; - case MSG_FX_SIZE_WAVE: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_SIZE_WAVE; - break; - case MSG_FX_DROP_SHADOW: - msg_drawState->effectFlags &= ~MSG_FX_FLAG_DROP_SHADOW; - break; - } - msg_drawState->drawBufferPos += 2; - break; - case MSG_PRINT_FUNC_CENTER_X: - if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != 0) { - msg_drawState->centerPos = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; - if (msg_drawState->centerPos == 0xFF) { - msg_drawState->centerPos = printer->windowSize.x / 2; - } - msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_40 | MSG_PRINT_FLAG_80); - } else { - msg_drawState->nextPos[0] = 0; - msg_drawState->printModeFlags &= ~(MSG_PRINT_FLAG_40 | MSG_PRINT_FLAG_80); - } - msg_drawState->drawBufferPos += 2; - break; - } - break; - default: - if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) { - sp96 = 0xFF; - gDPPipeSync(gMainGfxPos++); - gSPDisplayList(gMainGfxPos++, D_8014C500); - } - msg_drawState->charScale.x = msg_drawState->msgScale.x; - msg_drawState->charScale.y = msg_drawState->msgScale.y; - if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_80) { - msg_drawState->nextPos[0] += msg_drawState->centerPos - printer->msgWidth / 2; - msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_80; - } - if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_40) { - charPosX = (u16) msg_drawState->nextPos[0] + ((u16) printer->windowBasePos.x + (u16) posX); - } else { - charPosX = (u16) msg_drawState->nextPos[0] + ((u16) msg_drawState->textStartPos[0] + ((u16) printer->windowBasePos.x + - (u16) posX)); - } - - msgCharset = MsgCharsets[msg_drawState->font]; - charPosY = (s8) msgCharset->rasters[msg_drawState->fontVariant].baseHeightOffset + (msg_drawState->nextPos[1] + - (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY)) - additionalOffsetY); - - if ((sp8E != 0) && - (charPosX < msg_drawState->clipX[1]) && - (charPosY < msg_drawState->clipY[1]) && - (msg_drawState->clipX[0] < charPosX + (s32)(msg_drawState->msgScale.x * - msgCharset->rasters[msg_drawState->fontVariant].monospaceWidth)) && - (msg_drawState->clipY[0] < charPosY + (s32)(msg_drawState->msgScale.y * msgCharset->newLineY + - MsgStyleVerticalLineOffsets[printer->style]))) { - palette = msg_drawState->textColor; - phi_s2_5 = sp8E; - if (msg_drawState->effectFlags & MSG_FX_FLAG_BLUR) { - phi_s2_5 = (f32) phi_s2_5 * 0.35; - } - if ((printer->windowState == MSG_WINDOW_STATE_WAITING_FOR_CHOICE) && (msg_drawState->printModeFlags & MSG_PRINT_FLAG_20)) { - if (msg_drawState->unk_2D == printer->curOption) { - msg_drawState->effectFlags |= MSG_FX_FLAG_DROP_SHADOW | MSG_FX_FLAG_GLOBAL_RAINBOW | MSG_FX_FLAG_GLOBAL_WAVE; - } else { - msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_RAINBOW; - msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_WAVE; - msg_drawState->effectFlags &= ~MSG_FX_FLAG_DROP_SHADOW; - palette = msg_drawState->textColor; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - } - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_SHAKE) { - charPosX += rand_int(10000) % 2; - charPosY += rand_int(10000) % 2; - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_WAVE) { - temp_f2_3 = msg_drawState->msgScale.x - 1.0; - temp_s0_7 = (printer->effectFrameCounter * (s32)(20.0 - (temp_f2_3 * 5.0))) - (msg_drawState->visiblePrintedCount * - (s32)(45.0 - (temp_f2_3 * 15.0))); - charPosX += cosine(temp_s0_7) * ((msg_drawState->msgScale.x - 1.0) + 1.6); - charPosY += cosine((temp_s0_7 + 180.0 + 90.0)) * (msg_drawState->msgScale.y - 1.0 + 1.6); - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_GLOBAL_WAVE) { - temp_s0_8 = (gMsgGlobalWaveCounter * (s32)(20.0 - ((msg_drawState->msgScale.x - 1.0) * 5.0))) - - (msg_drawState->visiblePrintedCount * 45); - charPosX += cosine(temp_s0_8) * ((msg_drawState->msgScale.x - 1.0) + 1.6); - charPosY += cosine((temp_s0_8 + 180.0 + 90.0)) * ((msg_drawState->msgScale.y - 1.0) + 1.6); - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_RAINBOW) { - palette = abs(msg_drawState->visiblePrintedCount - (u16)(printer->effectFrameCounter / 3)) % 10; - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_GLOBAL_RAINBOW) { - palette = abs(msg_drawState->visiblePrintedCount - (u16)(gGameStatusPtr->frameCounter / 3)) % 10; - } - if (msg_drawState->effectFlags & MSG_FX_FLAG_DITHER_FADE) { - gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE); - gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER); - phi_s2_5 = spB6 * (phi_s2_5 / 255.0); - } - if ((msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) || (phi_s2_5 != sp96)) { - if ((sp96 < 0xFF) && (phi_s2_5 < 0xFF)) { - gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, phi_s2_5); - } else if ((sp96 == 0xFF) && (phi_s2_5 < 0xFF)) { - gDPPipeSync(gMainGfxPos++); - if (printer->stateFlags & MSG_STATE_FLAG_4000) { - gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_CLAMP | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, - G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_CLAMP | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, - G_BL_1MA)); - - } else { - gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, - G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, - G_BL_1MA)); - - } - gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); - gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, phi_s2_5); - } else if ((sp96 < 0xFF) && (phi_s2_5 == 0xFF)) { - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); - gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); - } - sp96 = phi_s2_5; - } - if (phi_s2_5 > 0) { - if (msg_drawState->effectFlags & MSG_FX_FLAG_RISE_PRINT) { - if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 4] != MSG_CHAR_PRINT_ENDL)) { - if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.7; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.7; - temp_f8 = (msg_drawState->charScale.y / 1.7) * 6.0; - charPosX -= temp_f8; - charPosY -= temp_f8; - } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.4; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.4; - temp_f8 = (msg_drawState->charScale.y / 1.4) * 3.0; - charPosX -= temp_f8; - charPosY -= temp_f8; - } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.2; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.2; - temp_f8 = (msg_drawState->charScale.y / 1.2) * 2.0; - charPosX -= temp_f8; - charPosY -= temp_f8; - } - } - } else if (msg_drawState->effectFlags & MSG_FX_FLAG_GROW_PRINT) { - if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] != MSG_CHAR_PRINT_ENDL) && - (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 4] != MSG_CHAR_PRINT_ENDL)) { - if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.3; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.3; - charPosX += 5; - charPosY += 5; - } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.5; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.5; - charPosX += 3; - charPosY += 3; - } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == MSG_CHAR_PRINT_END) && - (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.75; - msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.75; - charPosX += 2; - charPosY += 2; - } - } - } else if (msg_drawState->effectFlags & MSG_FX_FLAG_SIZE_JITTER) { - temp_f8_5 = rand_int(10000) % 101; - temp_f8_5 /= 100.0; - temp_f8_5 = ((temp_f8_5 * 0.5) + 1.0) - 0.25; - - if (temp_f8_5 > 1.0) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; - msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; - charPosX -= (temp_f8_5 * 8.0) - 8.5; - charPosY -= (temp_f8_5 * 8.0) - 8.5; - } else if (temp_f8_5 < 1.0) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; - msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; - charPosX += 8.0 - (temp_f8_5 * 16.0) * 0.5; - charPosY += 8.0 - (temp_f8_5 * 16.0) * 0.5; - } - } else if (msg_drawState->effectFlags & MSG_FX_FLAG_SIZE_WAVE) { - s32 mod360; - - temp_a0_49 = printer->effectFrameCounter * 15; - temp_a0_49 -= msg_drawState->visiblePrintedCount * 15; - mod360 = temp_a0_49 % 360; - temp_f8_5 = (cosine(mod360) * 0.25) + 1.0; - - if (temp_f8_5 > 1.0) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; - msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; - charPosX -= (temp_f8_5 * 8.0) - 8.5; - charPosY -= (temp_f8_5 * 8.0) - 8.5; - } else if (temp_f8_5 < 1.0) { - msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; - msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; - charPosX += 8.0 - (temp_f8_5 * 16.0) * 0.5; - charPosY += 8.0 - (temp_f8_5 * 16.0) * 0.5; - } - } - - if ((printer->windowState == MSG_WINDOW_STATE_B || printer->windowState == MSG_WINDOW_STATE_C) && - (printer->style == MSG_STYLE_RIGHT || - printer->style == MSG_STYLE_LEFT || - printer->style == MSG_STYLE_CENTER || - printer->style == MSG_STYLE_TATTLE)) - { - switch (palette) { - case MSG_PAL_WHITE: - case MSG_PAL_RED: - case MSG_PAL_10: - case MSG_PAL_11: - case MSG_PAL_12: - case MSG_PAL_13: - case MSG_PAL_14: - break; - case MSG_PAL_STANDARD: - palette = MSG_PAL_40; - break; - case MSG_PAL_20: - palette = MSG_PAL_41; - break; - case MSG_PAL_22: - palette = MSG_PAL_42; - break; - case MSG_PAL_23: - palette = MSG_PAL_43; - break; - case MSG_PAL_25: - palette = MSG_PAL_44; - break; - default: - palette = MSG_PAL_40; - break; - } - } - if (palette != sp9E) { - sp9E = palette; - msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; - } - if ((msg_drawState->effectFlags & MSG_FX_FLAG_DROP_SHADOW) && (phi_s2_5 == 0xFF)) { - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); - gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, 72); - msg_draw_char(printer, msg_drawState, - msg_drawState->printBuffer[msg_drawState->drawBufferPos], - palette, charPosX + 2, charPosY + 2); - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); - gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); - } - - if (msg_drawState->effectFlags & MSG_FX_FLAG_BLUR) { - for (i = 0; i < 5; i++) { - phi_s0_7 = charPosX; - phi_s1_8 = charPosY; - if (spB8 != 2) { - phi_s0_7 += (rand_int(10000) % 3) - 1; - } - if (spB8 != 1) { - phi_s1_8 += (rand_int(10000) % 3) - 1; - } - msg_draw_char(printer, msg_drawState, - msg_drawState->printBuffer[msg_drawState->drawBufferPos], palette, - phi_s0_7, phi_s1_8); - } - } else { - msg_draw_char(printer, msg_drawState, - msg_drawState->printBuffer[msg_drawState->drawBufferPos], palette, charPosX, - charPosY); - } - } - } - if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) { - msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_2; - } - msg_drawState->visiblePrintedCount += 1; - msg_drawState->nextPos[0] += - msg_get_draw_char_width(msg_drawState->printBuffer[msg_drawState->drawBufferPos], - msg_drawState->font, msg_drawState->fontVariant, msg_drawState->msgScale.x, - msg_drawState->curPosX, msg_drawState->printModeFlags); - msg_drawState->drawBufferPos++; - break; - } - } - - varImgHasBorder = FALSE; - if (printer->varImageScreenPos.x != 0) { - s16 varImgFinalAlpha; - - varImgFinalAlpha = printer->varImgFinalAlpha; - msgVarImage = &(*gMsgVarImages)[printer->curImageIndex]; - - switch (printer->varImgHasBorder) { - case 0: - case 1: - if (printer->varImgHasBorder) { - varImgHasBorder = TRUE; - } - switch (printer->varImageDisplayState) { - case 0: - printer->varImageFadeTimer++; - varImgFinalAlpha = printer->varImageFadeTimer * printer->varImgAlphaFadeStep; - if (printer->varImgFinalAlpha <= varImgFinalAlpha) { - varImgFinalAlpha = printer->varImgFinalAlpha; - printer->varImageFadeTimer = 0; - printer->varImageDisplayState = 1; - } - break; - case 1: - varImgFinalAlpha = (u8)(((f32) spAE / 255.0) * (f32) printer->varImgFinalAlpha); - break; - case 2: - printer->varImageFadeTimer++; - varImgFinalAlpha = printer->varImgFinalAlpha - printer->varImgAlphaFadeStep * printer->varImageFadeTimer; - if (varImgFinalAlpha < 1) { - printer->varImageScreenPos.x = 0; - } - break; - } - break; - case 2: - varImgFinalAlpha = (u8)(((f32) spAE / 255.0) * (f32) printer->varImgFinalAlpha); - break; - } - - if (varImgFinalAlpha > 0) { - if (varImgHasBorder) { - draw_box(0, WINDOW_STYLE_15, printer->varImageScreenPos.x - 7, printer->varImageScreenPos.y - 7, 0, - msgVarImage->width + 15, msgVarImage->height + 14, varImgFinalAlpha, 0, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); - } - draw_ci_image_with_clipping(msgVarImage->raster, msgVarImage->width, msgVarImage->height, - msgVarImage->format, msgVarImage->bitDepth, msgVarImage->palette, - printer->varImageScreenPos.x, printer->varImageScreenPos.y, 0, 0, - SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, varImgFinalAlpha); - } - - } - gDPPipeSync(gMainGfxPos++); - D_80151338 = gMainGfxPos; -} -#endif - -void msg_reset_gfx_state(void) { - gDPPipeSync(gMainGfxPos++); - gSPDisplayList(gMainGfxPos++, D_8014C500); -} - -void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX, s32 posY) { - MessageCharset* messageCharset; - s32 fontVariant; - - s32 clipUly; - s32 clipLry; - s32 clipUlx; - s32 clipLrx; - - s32 rightPosX; - s32 rightPosY; - - f32 clipOffset; - s32 ulx, texOffsetX; - s32 uly, texOffsetY; - s32 lrx, lry; - s32 dsdx, dtdy; - s32 posX2, posY2; - -#if VERSION_IQUE - if (charIndex == MSG_CHAR_ZH_RANK) { - load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[0]); - } else if (charIndex == MSG_CHAR_ZH_CHAPTER) { - load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[1]); - } else if (charIndex >= MSG_CHAR_ZH_START) { - load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[D_8014AD24]); - } -#endif - - messageCharset = MsgCharsets[drawState->font]; - fontVariant = drawState->fontVariant; - - clipUly = drawState->clipY[0]; - clipLry = drawState->clipY[1]; - clipUlx = drawState->clipX[0]; - clipLrx = drawState->clipX[1]; - - posX2 = posX; - posY2 = posY; - - rightPosX = posX2 + (s32)(drawState->charScale.x * messageCharset->texSize.x); - rightPosY = posY2 + (s32)(drawState->charScale.y * messageCharset->texSize.y); - - if (posX2 >= clipLrx || posY2 >= clipLry || rightPosX <= clipUlx || rightPosY <= clipUly) { - return; - } - - if (posX2 < clipUlx) { - clipOffset = abs(posX2 - clipUlx) / drawState->charScale.x; - texOffsetX = (f32)((clipOffset + 0.5) * 32.0); - ulx = clipUlx; - } else { - texOffsetX = 0; - ulx = posX2; - } - - if (posY2 < clipUly) { - if (!(printer->stateFlags & MSG_STATE_FLAG_400) || posY2 < 0) { - clipOffset = abs(posY2 - clipUly) / drawState->charScale.y; - texOffsetY = clipOffset * 32.0f; - uly = clipUly; - } else { - texOffsetY = 0; - uly = posY2; - } - } else { - texOffsetY = 0; - uly = posY2; - } - - lrx = rightPosX; - if (lrx >= clipLrx) { - lrx = clipLrx; - } - - lry = rightPosY; - if (lry >= clipLry) { - lry = clipLry; - } - - dsdx = 1.0f / drawState->charScale.x * 1024.0f; - dtdy = 1.0f / drawState->charScale.y * 1024.0f; - - if (drawState->printModeFlags & (MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1)) { - drawState->printModeFlags &= ~(MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1); - gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[palette]); - } - - if (messageCharset->texSize.x >= 16 && messageCharset->texSize.x % 16 == 0) { -#if VERSION_IQUE - 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) { - gDPLoadTextureBlock_4b(gMainGfxPos++, D_801544A0[D_8014AD24], 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 { -#endif - gDPLoadTextureBlock_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, 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); -#if VERSION_IQUE - } -#endif - } else { -#if VERSION_IQUE - 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); - } else if (charIndex >= MSG_CHAR_ZH_START) { - gDPLoadTextureTile_4b(gMainGfxPos++, D_801544A0[D_8014AD24], 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); - } else { -#endif - gDPLoadTextureTile_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, 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); -#if VERSION_IQUE - } -#endif - } - gSPTextureRectangle(gMainGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, G_TX_RENDERTILE, texOffsetX, texOffsetY, - dsdx, dtdy); - -#if VERSION_IQUE - if (charIndex >= MSG_CHAR_ZH_START) { - D_8014AD24 = (D_8014AD24 + 1) % 120; - if (D_8014AD24 == 0) { - D_8014AD24 = 2; - } - } -#endif -} - -void msg_draw_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 posX, u16 posY, u16 sizeX, u16 sizeY) { - u16 lrX = posX + sizeX; - u16 lrY = posY + sizeY; - - appendGfx_msg_prim_rect(r, g, b, a, posX, posY, lrX, lrY); -} - -void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY) { - gDPPipeSync(gMainGfxPos++); - - if (a == 255) { - gDPSetCombineMode(gMainGfxPos++, PM_CC_PRIM_FULL_ALPHA, PM_CC_PRIM_FULL_ALPHA); - } else { - gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - } - - gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a); - gDPFillRectangle(gMainGfxPos++, ulX, ulY, lrX, lrY); - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); - - switch (msg_drawState->unk_29) { - case 0: - gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); - break; - case 1: - gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM); - break; - default: - gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); - break; - } -} - -void msg_draw_speech_bubble( - MessagePrintState* printer, - s16 posX, s16 posY, s16 straightWidth, s16 curveWidth, s16 height, f32 scaleX, f32 scaleY, u8 opacity, s32 arg9) -{ - Matrix4f sp20, sp60; - s16 temp_v0; - s16 temp_v0_2; - s32 negHeight; - - if (opacity == 255 && scaleX == 1.0 && scaleY == 1.0) { - msg_draw_prim_rect(32, 128, 240, 0, posX - 1, posY + 1, curveWidth + (straightWidth + curveWidth) + 2, height - 2); - } - - negHeight = -height; - - gMsgSpeechBoxLQuad[0].v.ob[0] = 1; - gMsgSpeechBoxLQuad[2].v.ob[0] = 1; - gMsgSpeechBoxLQuad[1].v.ob[0] = curveWidth; - gMsgSpeechBoxLQuad[3].v.ob[0] = curveWidth; - gMsgSpeechBoxLQuad[2].v.ob[1] = negHeight; - gMsgSpeechBoxLQuad[3].v.ob[1] = negHeight; - - temp_v0 = curveWidth + straightWidth; - - gMsgSpeechBoxMQuad[0].v.ob[0] = curveWidth; - gMsgSpeechBoxMQuad[2].v.ob[0] = curveWidth; - gMsgSpeechBoxMQuad[1].v.ob[0] = temp_v0; - gMsgSpeechBoxMQuad[3].v.ob[0] = temp_v0; - gMsgSpeechBoxMQuad[2].v.ob[1] = negHeight; - gMsgSpeechBoxMQuad[3].v.ob[1] = negHeight; - - temp_v0_2 = curveWidth + temp_v0; - - gMsgSpeechBoxRQuad[0].v.ob[0] = temp_v0; - gMsgSpeechBoxRQuad[2].v.ob[0] = temp_v0; - gMsgSpeechBoxRQuad[1].v.ob[0] = temp_v0_2; - gMsgSpeechBoxRQuad[3].v.ob[0] = temp_v0_2; - gMsgSpeechBoxRQuad[2].v.ob[1] = negHeight; - gMsgSpeechBoxRQuad[3].v.ob[1] = negHeight; - - guTranslateF(sp20, posX, -posY, 0.0f); - - if (scaleX != 1.0 || scaleY != 1.0) { - guScaleF(sp60, scaleX, scaleY, 1.0f); - guMtxCatF(sp60, sp20, sp20); - } - - guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); - - gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), - G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - - gDPPipeSync(gMainGfxPos++); - gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); - gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING); - gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH); - gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); - gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); - gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP); - - if (printer->maxLinesPerPage == 3) { - gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); - } else { - gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); - } - - if (opacity >= 255) { - gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | - GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), - AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | - GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); - gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); - } else { - gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | - GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), - IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | - GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); - gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); - gDPSetPrimColor(gMainGfxPos++, 0, 0, 32, 32, 32, opacity); - } - - gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); - gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, - ui_msg_palettes[msg_drawState->framePalette]); - gDPTileSync(gMainGfxPos++); - gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0, - G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gMainGfxPos++); - gDPLoadTLUTCmd(gMainGfxPos++, G_TX_LOADTILE, 15); - gDPPipeSync(gMainGfxPos++); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_left_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0, - G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMainGfxPos++, gMsgSpeechBoxLQuad, 4, 0); - gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_mid_png, G_IM_FMT_CI, 8, 0, 0, 0, 7, 63, 0, - G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, 6, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMainGfxPos++, gMsgSpeechBoxMQuad, 4, 0); - gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_right_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0, - G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMainGfxPos++, gMsgSpeechBoxRQuad, 4, 0); - gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); - gDPPipeSync(gMainGfxPos++); -} - -void msg_draw_speech_arrow(MessagePrintState* printer) { - s16 targetX, targetY; - f32 windowXpart; - s32 arrowLength; - Vtx* quad; - s32 angle; - f32 cosAngle, sinAngle; - Matrix4f sp10; - s16 x1, x2, x3, x4; - s32 y1, y2; - u8 pointRightSide = FALSE; - s16 windowX = printer->windowOffsetPos.x + printer->windowBasePos.x; - s16 windowY = printer->windowOffsetPos.y + printer->windowBasePos.y; - - if (printer->openStartPos.x == 0) { - return; - } - - if (printer->style == MSG_STYLE_RIGHT || - printer->style == MSG_STYLE_LEFT || - printer->style == MSG_STYLE_CENTER || - printer->maxLinesPerPage == 3) { - targetY = windowY + printer->windowSize.y - 4; - } else { - targetY = windowY + printer->windowSize.y - 3; - } - - if (printer->style == MSG_STYLE_LEFT) { - pointRightSide = FALSE; - } else if (printer->style == MSG_STYLE_CENTER || printer->openStartPos.x >= 160) { - pointRightSide = TRUE; - } - - if (pointRightSide) { - targetX = windowX + (f32)printer->windowSize.x * 0.7; - if (printer->openStartPos.x < targetX) { - for (windowXpart = 0.7f; windowXpart >= 0.67; windowXpart -= 0.005) { - targetX = windowX + printer->windowSize.x * windowXpart; - angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); - if (abs(angle) < 45) { - break; - } - } - } - } else { - targetX = windowX + (f32)printer->windowSize.x * 0.3; - if (printer->openStartPos.x > targetX) { - for (windowXpart = 0.3f; windowXpart <= 0.38; windowXpart += 0.005) { - targetX = windowX + printer->windowSize.x * windowXpart; - angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); - if (abs(angle) < 45) { - break; - } - } - } - } - - x1 = targetX - 9; - x2 = targetX + 9; - x3 = targetX; - - arrowLength = dist2D(printer->initOpenPos.x, printer->initOpenPos.y, targetX, targetY); - if (arrowLength < 10) { - return; - } - - if (arrowLength > 25) { - arrowLength = 25; - } - - // alternate quads between frames - if (gCurrentDisplayContextIndex != 0) { - quad = gMsgArrowQuad1; - } else { - quad = gMsgArrowQuad2; - } - - angle = atan2(targetX, targetY, printer->initOpenPos.x, printer->initOpenPos.y); - angle -= 180; - if (abs(angle) >= 75) { - return; - } - - cosAngle = cosine(angle); - sinAngle = cosine(angle + 90); - - x3 = x3 - arrowLength * cosAngle; - x4 = x3 + 1; - - y1 = -targetY; - y2 = -(s16)(targetY + arrowLength * sinAngle); - - quad[0].v.ob[0] = x1; - quad[0].v.ob[1] = y1; - quad[1].v.ob[0] = x2; - quad[1].v.ob[1] = y1; - - quad[2].v.ob[0] = x3; - quad[2].v.ob[1] = y2; - quad[3].v.ob[0] = x4; - quad[3].v.ob[1] = y2; - - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPSetCombineMode(gMainGfxPos++, PM_CC_0F, PM_CC_0F); - gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); - gDPSetPrimColor(gMainGfxPos++, 0, 0, 32, 32, 32, 255); - gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_arrow_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); - guTranslateF(sp10, 0.0f, 0.0f, 0.0f); - guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); - gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(gMainGfxPos++, quad, 4, 0); - gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); -} - -void msg_draw_frame(s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha) { - s32 i; - s32 frameType; - s32 textures[16]; - u8 r, g, b; - Rect quads[16]; - - if (sizeX < 16 || sizeY < 16) { - return; - } - - if (fading != 0 && bgAlpha == 0 && frameAlpha == 0) { - return; - } - - gDPPipeSync(gMainGfxPos++); - gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); - gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); - gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); - gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); - gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); - gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); - gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); - - if (fading == 0 || bgAlpha != 0) { - do {} while (0); - switch (style) { - case MSG_STYLE_CHOICE: - r = UNPACK_PAL_R(((u16*)ui_msg_palettes)[4]) * 8; - g = UNPACK_PAL_G(((u16*)ui_msg_palettes)[4]) * 8; - b = UNPACK_PAL_B(((u16*)ui_msg_palettes)[4]) * 8; - gDPPipeSync(gMainGfxPos++); - if (fading != 0 && bgAlpha < 255) { - gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); - } else { - gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - } - gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, bgAlpha); - if (posX + sizeX - 8 > 0) { - gDPScisFillRectangle(gMainGfxPos++, posX + 8, posY + 8, posX + sizeX - 8, posY + sizeY - 8); - } - break; - case MSG_STYLE_INSPECT: - gDPPipeSync(gMainGfxPos++); - gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); - gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetCombineMode(gMainGfxPos++, PM_CC_10, PM_CC_10); - if (fading == 0 || bgAlpha == 255) { - gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 216); - } else { - if (bgAlpha > 216) { - bgAlpha = 216; - } - gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, bgAlpha); - } - - gDPLoadTextureBlock_4b(gMainGfxPos++, ui_msg_background_png, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); - if (style == MSG_STYLE_INSPECT) { - gSPScisTextureRectangle(gMainGfxPos++, (posX + 3) * 4, (posY + 3) * 4, (posX + sizeX - 3) * 4, (posY + sizeY - 3) * 4, - G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400); - } else { - gSPScisTextureRectangle(gMainGfxPos++, (posX + 5) * 4, (posY + 5) * 4, (posX + sizeX - 5) * 4, (posY + sizeY - 5) * 4, - G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400); - } - break; - } - } - - if (sizeX >= 32) { - quads[2].ulx = (posX + 16) * 4; - quads[2].uly = posY * 4; - quads[2].lrx = (posX + sizeX - 16) * 4; - quads[2].lry = (posY + 8) * 4; - - quads[13].ulx = (posX + 16) * 4; - quads[13].uly = (posY + sizeY - 8) * 4; - quads[13].lrx = (posX + sizeX - 16) * 4; - quads[13].lry = (posY + sizeY) * 4; - } else if (sizeX > 16 && sizeX < 24) { - quads[2].ulx = (posX + 8) * 4; - quads[2].uly = posY * 4; - quads[2].lrx = (posX + sizeX - 8) * 4; - quads[2].lry = (posY + 8) * 4; - - quads[13].ulx = (posX + 8) * 4; - quads[13].uly = (posY + sizeY - 8) * 4; - quads[13].lrx = (posX + sizeX - 8) * 4; - quads[13].lry = (posY + sizeY) * 4; - } else { - quads[2].ulx = 10000; - quads[13].ulx = 10000; - } - - if (sizeY >= 32) { - quads[7].ulx = posX * 4; - quads[7].uly = (posY + 16) * 4; - quads[7].lrx = (posX + 8) * 4; - quads[7].lry = (posY + sizeY - 16) * 4; - - quads[8].ulx = (posX + sizeX - 8) * 4; - quads[8].uly = (posY + 16) * 4; - quads[8].lrx = (posX + sizeX) * 4; - quads[8].lry = (posY + sizeY - 16) * 4; - } else if (sizeY > 16 && sizeY < 24) { - quads[7].ulx = posX * 4; - quads[7].uly = (posY + 8) * 4; - quads[7].lrx = (posX + 8) * 4; - quads[7].lry = (posY + sizeY - 8) * 4; - - quads[8].ulx = (posX + sizeX - 8) * 4; - quads[8].uly = (posY + 8) * 4; - quads[8].lrx = (posX + sizeX) * 4; - quads[8].lry = (posY + sizeY - 8) * 4; - } else { - quads[7].ulx = 10000; - quads[8].ulx = 10000; - } - - if (sizeX >= 24) { - quads[1].ulx = (posX + 8) * 4; - quads[1].uly = posY * 4; - quads[1].lrx = (posX + 16) * 4; - quads[1].lry = (posY + 8) * 4; - - quads[3].ulx = (posX + sizeX - 16) * 4; - quads[3].uly = posY * 4; - quads[3].lrx = (posX + sizeX - 8) * 4; - quads[3].lry = (posY + 8) * 4; - - quads[12].ulx = (posX + 8) * 4; - quads[12].uly = (posY + sizeY - 8) * 4; - quads[12].lrx = (posX + 16) * 4; - quads[12].lry = (posY + sizeY) * 4; - - quads[14].ulx = (posX + sizeX - 16) * 4; - quads[14].uly = (posY + sizeY - 8) * 4; - quads[14].lrx = (posX + sizeX - 8) * 4; - quads[14].lry = (posY + sizeY) * 4; - } else { - quads[1].ulx = 10000; - quads[3].ulx = 10000; - quads[12].ulx = 10000; - quads[14].ulx = 10000; - } - - if (sizeY >= 24) { - quads[5].ulx = posX * 4; - quads[5].uly = (posY + 8) * 4; - quads[5].lrx = (posX + 8) * 4; - quads[5].lry = (posY + 16) * 4; - - quads[6].ulx = (posX + sizeX - 8) * 4; - quads[6].uly = (posY + 8) * 4; - quads[6].lrx = (posX + sizeX) * 4; - quads[6].lry = (posY + 16) * 4; - - quads[9].ulx = posX * 4; - quads[9].uly = (posY + sizeY - 16) * 4; - quads[9].lrx = (posX + 8) * 4; - quads[9].lry = (posY + sizeY - 8) * 4; - - quads[10].ulx = (posX + sizeX - 8) * 4; - quads[10].uly = (posY + sizeY - 16) * 4; - quads[10].lrx = (posX + sizeX) * 4; - quads[10].lry = (posY + sizeY - 8) * 4; - } else { - quads[5].ulx = 10000; - quads[6].ulx = 10000; - quads[9].ulx = 10000; - quads[10].ulx = 10000; - } - - quads[0].ulx = posX * 4; - quads[0].uly = posY * 4; - quads[0].lrx = (posX + 8) * 4; - quads[0].lry = (posY + 8) * 4; - - quads[4].ulx = (posX + sizeX - 8) * 4; - quads[4].uly = posY * 4; - quads[4].lrx = (posX + sizeX) * 4; - quads[4].lry = (posY + 8) * 4; - - quads[11].ulx = posX * 4; - quads[11].uly = (posY + sizeY - 8) * 4; - quads[11].lrx = (posX + 8) * 4; - quads[11].lry = (posY + sizeY) * 4; - - quads[15].ulx = (posX + sizeX - 8) * 4; - quads[15].uly = (posY + sizeY - 8) * 4; - quads[15].lrx = (posX + sizeX) * 4; - quads[15].lry = (posY + sizeY) * 4; - - switch (style) { - case MSG_STYLE_CHOICE: - frameType = 0; - break; - case MSG_STYLE_INSPECT: - frameType = 1; - break; - default: - frameType = 0; - break; - } - - for (i = 0; i < ARRAY_COUNT(textures); i++) { - textures[i] = gMessageBoxFrameParts[frameType][i]; - } - - if (fading == 0) { - frameAlpha = 255; - } - - gDPPipeSync(gMainGfxPos++); - gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); - gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, frameAlpha); - gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); - gDPLoadTLUT_pal16(gMainGfxPos++, 0, ui_msg_palettes[palette]); - - for (i = 0; i < ARRAY_COUNT(textures); i++) { - if (textures[i] != NULL && quads[i].ulx < 10000) { - gDPLoadTextureTile_4b(gMainGfxPos++, textures[i], G_IM_FMT_CI, 8, 8, 0, 0, 7, 7, 0, G_TX_WRAP, G_TX_WRAP, 3, 3, G_TX_NOLOD, G_TX_NOLOD); - gSPScisTextureRectangle(gMainGfxPos++, quads[i].ulx, quads[i].uly, quads[i].lrx, quads[i].lry, - G_TX_RENDERTILE, 0, 0, 0x400, 0x400); - } - } - - gDPPipeSync(gMainGfxPos++); - gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); -} - -void msg_get_glyph(s32 font, s32 variation, s32 charIndex, s32 palette, MesasgeFontGlyphData* out) { - out->raster = &MsgCharsets[font]->rasters[variation].raster[(u16)MsgCharsets[font]->charRasterSize * charIndex]; - out->palette = D_802F4560[palette]; - out->texSize.x = MsgCharsets[font]->texSize.x; - out->texSize.y = MsgCharsets[font]->texSize.y; - out->charWidth = msg_get_draw_char_width(charIndex, font, variation, 1.0f, 0, 0); - out->charHeight = out->texSize.y; -} diff --git a/src/msg_data.c b/src/msg_data.c index e9f4d9b580..500784e2fb 100644 --- a/src/msg_data.c +++ b/src/msg_data.c @@ -4,7 +4,563 @@ extern IMG_BIN MsgCharImgTitle[]; extern IMG_BIN MsgCharImgSubtitle[]; extern IMG_BIN MsgCharImgNormal[]; +extern IMG_BIN MsgCharImgMenuLatin[]; +extern IMG_BIN MsgCharImgMenuKana[]; +extern IMG_BIN MsgCharImgKana[]; +extern IMG_BIN MsgCharImgLatin[]; +#if VERSION_JP +u8 MsgCharWidthKana[] = { + [MSG_CHAR_HIRAGANA_A] 11, + [MSG_CHAR_HIRAGANA_I] 11, + [MSG_CHAR_HIRAGANA_U] 10, + [MSG_CHAR_HIRAGANA_E] 10, + [MSG_CHAR_HIRAGANA_O] 11, + [MSG_CHAR_HIRAGANA_KA] 11, + [MSG_CHAR_HIRAGANA_KI] 9, + [MSG_CHAR_HIRAGANA_KU] 9, + [MSG_CHAR_HIRAGANA_KE] 11, + [MSG_CHAR_HIRAGANA_KO] 10, + [MSG_CHAR_HIRAGANA_SA] 10, + [MSG_CHAR_HIRAGANA_SI] 9, + [MSG_CHAR_HIRAGANA_SU] 11, + [MSG_CHAR_HIRAGANA_SE] 11, + [MSG_CHAR_HIRAGANA_SO] 10, + [MSG_CHAR_HIRAGANA_TA] 11, + [MSG_CHAR_HIRAGANA_TI] 11, + [MSG_CHAR_HIRAGANA_TU] 11, + [MSG_CHAR_HIRAGANA_TE] 11, + [MSG_CHAR_HIRAGANA_TO] 10, + [MSG_CHAR_HIRAGANA_NA] 11, + [MSG_CHAR_HIRAGANA_NI] 11, + [MSG_CHAR_HIRAGANA_NU] 11, + [MSG_CHAR_HIRAGANA_NE] 11, + [MSG_CHAR_HIRAGANA_NO] 11, + [MSG_CHAR_HIRAGANA_HA] 11, + [MSG_CHAR_HIRAGANA_HI] 11, + [MSG_CHAR_HIRAGANA_HU] 11, + [MSG_CHAR_HIRAGANA_HE] 11, + [MSG_CHAR_HIRAGANA_HO] 11, + [MSG_CHAR_HIRAGANA_MA] 9, + [MSG_CHAR_HIRAGANA_MI] 11, + [MSG_CHAR_HIRAGANA_MU] 11, + [MSG_CHAR_HIRAGANA_ME] 11, + [MSG_CHAR_HIRAGANA_MO] 11, + [MSG_CHAR_HIRAGANA_YA] 11, + [MSG_CHAR_HIRAGANA_YU] 11, + [MSG_CHAR_HIRAGANA_YO] 11, + [MSG_CHAR_HIRAGANA_RA] 11, + [MSG_CHAR_HIRAGANA_RI] 11, + [MSG_CHAR_HIRAGANA_RU] 11, + [MSG_CHAR_HIRAGANA_RE] 11, + [MSG_CHAR_HIRAGANA_RO] 11, + [MSG_CHAR_HIRAGANA_WA] 11, + [MSG_CHAR_HIRAGANA_WO] 11, + [MSG_CHAR_HIRAGANA_N] 11, + [MSG_CHAR_HIRAGANA_VU] 11, + [MSG_CHAR_HIRAGANA_GA] 11, + [MSG_CHAR_HIRAGANA_GI] 11, + [MSG_CHAR_HIRAGANA_GU] 11, + [MSG_CHAR_HIRAGANA_GE] 11, + [MSG_CHAR_HIRAGANA_GO] 12, + [MSG_CHAR_HIRAGANA_ZA] 11, + [MSG_CHAR_HIRAGANA_ZI] 10, + [MSG_CHAR_HIRAGANA_ZU] 11, + [MSG_CHAR_HIRAGANA_ZE] 11, + [MSG_CHAR_HIRAGANA_ZO] 11, + [MSG_CHAR_HIRAGANA_DA] 11, + [MSG_CHAR_HIRAGANA_DI] 11, + [MSG_CHAR_HIRAGANA_DU] 11, + [MSG_CHAR_HIRAGANA_DE] 11, + [MSG_CHAR_HIRAGANA_DO] 11, + [MSG_CHAR_HIRAGANA_BA] 12, + [MSG_CHAR_HIRAGANA_BI] 11, + [MSG_CHAR_HIRAGANA_BU] 11, + [MSG_CHAR_HIRAGANA_BE] 11, + [MSG_CHAR_HIRAGANA_BO] 11, + [MSG_CHAR_HIRAGANA_PA] 12, + [MSG_CHAR_HIRAGANA_PI] 11, + [MSG_CHAR_HIRAGANA_PU] 11, + [MSG_CHAR_HIRAGANA_PE] 11, + [MSG_CHAR_HIRAGANA_PO] 11, + [MSG_CHAR_HIRAGANA_SMALL_A] 9, + [MSG_CHAR_HIRAGANA_SMALL_I] 8, + [MSG_CHAR_HIRAGANA_SMALL_U] 8, + [MSG_CHAR_HIRAGANA_SMALL_E] 8, + [MSG_CHAR_HIRAGANA_SMALL_O] 9, + [MSG_CHAR_HIRAGANA_SMALL_TU] 9, + [MSG_CHAR_HIRAGANA_SMALL_YA] 9, + [MSG_CHAR_HIRAGANA_SMALL_YU] 9, + [MSG_CHAR_HIRAGANA_SMALL_YO] 8, + [MSG_CHAR_KATAKANA_A] 11, + [MSG_CHAR_KATAKANA_I] 10, + [MSG_CHAR_KATAKANA_U] 10, + [MSG_CHAR_KATAKANA_E] 11, + [MSG_CHAR_KATAKANA_O] 11, + [MSG_CHAR_KATAKANA_KA] 11, + [MSG_CHAR_KATAKANA_KI] 11, + [MSG_CHAR_KATAKANA_KU] 10, + [MSG_CHAR_KATAKANA_KE] 11, + [MSG_CHAR_KATAKANA_KO] 11, + [MSG_CHAR_KATAKANA_SA] 11, + [MSG_CHAR_KATAKANA_SI] 11, + [MSG_CHAR_KATAKANA_SU] 11, + [MSG_CHAR_KATAKANA_SE] 11, + [MSG_CHAR_KATAKANA_SO] 11, + [MSG_CHAR_KATAKANA_TA] 11, + [MSG_CHAR_KATAKANA_TI] 11, + [MSG_CHAR_KATAKANA_TU] 11, + [MSG_CHAR_KATAKANA_TE] 11, + [MSG_CHAR_KATAKANA_TO] 8, + [MSG_CHAR_KATAKANA_NA] 11, + [MSG_CHAR_KATAKANA_NI] 9, + [MSG_CHAR_KATAKANA_NU] 11, + [MSG_CHAR_KATAKANA_NE] 10, + [MSG_CHAR_KATAKANA_NO] 11, + [MSG_CHAR_KATAKANA_HA] 11, + [MSG_CHAR_KATAKANA_HI] 11, + [MSG_CHAR_KATAKANA_HU] 11, + [MSG_CHAR_KATAKANA_HE] 11, + [MSG_CHAR_KATAKANA_HO] 11, + [MSG_CHAR_KATAKANA_MA] 11, + [MSG_CHAR_KATAKANA_MI] 10, + [MSG_CHAR_KATAKANA_MU] 11, + [MSG_CHAR_KATAKANA_ME] 10, + [MSG_CHAR_KATAKANA_MO] 11, + [MSG_CHAR_KATAKANA_YA] 11, + [MSG_CHAR_KATAKANA_YU] 11, + [MSG_CHAR_KATAKANA_YO] 10, + [MSG_CHAR_KATAKANA_RA] 11, + [MSG_CHAR_KATAKANA_RI] 10, + [MSG_CHAR_KATAKANA_RU] 11, + [MSG_CHAR_KATAKANA_RE] 10, + [MSG_CHAR_KATAKANA_RO] 10, + [MSG_CHAR_KATAKANA_WA] 10, + [MSG_CHAR_KATAKANA_WO] 10, + [MSG_CHAR_KATAKANA_N] 11, + [MSG_CHAR_KATAKANA_VU] 11, + [MSG_CHAR_KATAKANA_GA] 11, + [MSG_CHAR_KATAKANA_GI] 11, + [MSG_CHAR_KATAKANA_GU] 11, + [MSG_CHAR_KATAKANA_GE] 11, + [MSG_CHAR_KATAKANA_GO] 11, + [MSG_CHAR_KATAKANA_ZA] 11, + [MSG_CHAR_KATAKANA_ZI] 11, + [MSG_CHAR_KATAKANA_ZU] 11, + [MSG_CHAR_KATAKANA_ZE] 11, + [MSG_CHAR_KATAKANA_ZO] 11, + [MSG_CHAR_KATAKANA_DA] 11, + [MSG_CHAR_KATAKANA_DI] 11, + [MSG_CHAR_KATAKANA_DU] 9, + [MSG_CHAR_KATAKANA_DE] 11, + [MSG_CHAR_KATAKANA_DO] 11, + [MSG_CHAR_KATAKANA_BA] 11, + [MSG_CHAR_KATAKANA_BI] 11, + [MSG_CHAR_KATAKANA_BU] 11, + [MSG_CHAR_KATAKANA_BE] 11, + [MSG_CHAR_KATAKANA_BO] 11, + [MSG_CHAR_KATAKANA_PA] 11, + [MSG_CHAR_KATAKANA_PI] 11, + [MSG_CHAR_KATAKANA_PU] 11, + [MSG_CHAR_KATAKANA_PE] 11, + [MSG_CHAR_KATAKANA_PO] 11, + [MSG_CHAR_KATAKANA_SMALL_A] 9, + [MSG_CHAR_KATAKANA_SMALL_I] 8, + [MSG_CHAR_KATAKANA_SMALL_U] 8, + [MSG_CHAR_KATAKANA_SMALL_E] 9, + [MSG_CHAR_KATAKANA_SMALL_O] 9, + [MSG_CHAR_KATAKANA_SMALL_TU] 9, + [MSG_CHAR_KATAKANA_SMALL_YA] 9, + [MSG_CHAR_KATAKANA_SMALL_YU] 9, + [MSG_CHAR_KATAKANA_SMALL_YO] 8, + [MSG_CHAR_PROLONGED_SOUND] 11, + [MSG_CHAR_TILDE] 11, + [MSG_CHAR_LONGDASH_0] 12, + [MSG_CHAR_LONGDASH_1] 12, + [MSG_CHAR_LONGDASH_2] 11, + [MSG_CHAR_DIGIT_0] 11, + [MSG_CHAR_DIGIT_1] 8, + [MSG_CHAR_DIGIT_2] 10, + [MSG_CHAR_DIGIT_3] 11, + [MSG_CHAR_DIGIT_4] 11, + [MSG_CHAR_DIGIT_5] 10, + [MSG_CHAR_DIGIT_6] 11, + [MSG_CHAR_DIGIT_7] 11, + [MSG_CHAR_DIGIT_8] 11, + [MSG_CHAR_DIGIT_9] 11, + [MSG_CHAR_UP] 11, + [MSG_CHAR_DOWN] 11, + [MSG_CHAR_LEFT] 12, + [MSG_CHAR_RIGHT] 12, + [MSG_CHAR_EXCLAMATION] 11, + [MSG_CHAR_QUESTION] 10, + [MSG_CHAR_PLUS] 9, + [MSG_CHAR_MINUS] 9, + [MSG_CHAR_FORWARDSLASH] 11, + [MSG_CHAR_PERIOD] 8, + [MSG_CHAR_AND] 10, + [MSG_CHAR_HASH] 11, + [MSG_CHAR_HEART] 11, + [MSG_CHAR_STAR] 11, + [MSG_CHAR_LPAREN] 9, + [MSG_CHAR_RPAREN] 9, + [MSG_CHAR_TLBRACKET] 11, + [MSG_CHAR_BRBRACKET] 11, + [MSG_CHAR_MIDDLE_DOT] 8, + [MSG_CHAR_HIRAGANA_SMALL_N] 9, + [MSG_CHAR_KATAKANA_SMALL_N] 9, + [MSG_CHAR_KANJI_C6] 11, +}; + +u8 MsgCharWidthLatin[] = { + [MSG_CHAR_UPPER_A] 11, + [MSG_CHAR_UPPER_B] 10, + [MSG_CHAR_UPPER_C] 10, + [MSG_CHAR_UPPER_D] 10, + [MSG_CHAR_UPPER_E] 11, + [MSG_CHAR_UPPER_F] 10, + [MSG_CHAR_UPPER_G] 11, + [MSG_CHAR_UPPER_H] 10, + [MSG_CHAR_UPPER_I] 8, + [MSG_CHAR_UPPER_J] 9, + [MSG_CHAR_UPPER_K] 10, + [MSG_CHAR_UPPER_L] 11, + [MSG_CHAR_UPPER_M] 11, + [MSG_CHAR_UPPER_N] 11, + [MSG_CHAR_UPPER_O] 11, + [MSG_CHAR_UPPER_P] 11, + [MSG_CHAR_UPPER_Q] 11, + [MSG_CHAR_UPPER_R] 10, + [MSG_CHAR_UPPER_S] 11, + [MSG_CHAR_UPPER_T] 11, + [MSG_CHAR_UPPER_U] 11, + [MSG_CHAR_UPPER_V] 11, + [MSG_CHAR_UPPER_W] 11, + [MSG_CHAR_UPPER_X] 11, + [MSG_CHAR_UPPER_Y] 11, + [MSG_CHAR_UPPER_Z] 10, + [MSG_CHAR_LOWER_Z] 9, +}; + +u8 MsgCharWidthKanji[] = { + [MSG_CHAR_KANJI_00 ... MSG_CHAR_KANJI_77] = 11, + [MSG_CHAR_LOWER_X] 7, +}; + +u8 MsgCharWidthButtons[] = { + [MSG_CHAR_BUTTON_A] 13, + [MSG_CHAR_BUTTON_B] 13, + [MSG_CHAR_BUTTON_START] 16, + [MSG_CHAR_BUTTON_C_UP] 13, + [MSG_CHAR_BUTTON_C_DOWN] 13, + [MSG_CHAR_BUTTON_C_LEFT] 13, + [MSG_CHAR_BUTTON_C_RIGHT] 13, + [MSG_CHAR_BUTTON_Z] 12, + [MSG_CHAR_BUTTON_L] 14, + [MSG_CHAR_BUTTON_R] 14, +}; + +u8 MsgCharWidthMenuKana[] = { + [MSG_CHAR_HIRAGANA_A] 9, + [MSG_CHAR_HIRAGANA_I] 9, + [MSG_CHAR_HIRAGANA_U] 9, + [MSG_CHAR_HIRAGANA_E] 9, + [MSG_CHAR_HIRAGANA_O] 9, + [MSG_CHAR_HIRAGANA_KA] 9, + [MSG_CHAR_HIRAGANA_KI] 9, + [MSG_CHAR_HIRAGANA_KU] 9, + [MSG_CHAR_HIRAGANA_KE] 9, + [MSG_CHAR_HIRAGANA_KO] 9, + [MSG_CHAR_HIRAGANA_SA] 9, + [MSG_CHAR_HIRAGANA_SI] 9, + [MSG_CHAR_HIRAGANA_SU] 9, + [MSG_CHAR_HIRAGANA_SE] 9, + [MSG_CHAR_HIRAGANA_SO] 9, + [MSG_CHAR_HIRAGANA_TA] 9, + [MSG_CHAR_HIRAGANA_TI] 9, + [MSG_CHAR_HIRAGANA_TU] 9, + [MSG_CHAR_HIRAGANA_TE] 9, + [MSG_CHAR_HIRAGANA_TO] 9, + [MSG_CHAR_HIRAGANA_NA] 9, + [MSG_CHAR_HIRAGANA_NI] 9, + [MSG_CHAR_HIRAGANA_NU] 9, + [MSG_CHAR_HIRAGANA_NE] 9, + [MSG_CHAR_HIRAGANA_NO] 9, + [MSG_CHAR_HIRAGANA_HA] 9, + [MSG_CHAR_HIRAGANA_HI] 9, + [MSG_CHAR_HIRAGANA_HU] 9, + [MSG_CHAR_HIRAGANA_HE] 9, + [MSG_CHAR_HIRAGANA_HO] 9, + [MSG_CHAR_HIRAGANA_MA] 9, + [MSG_CHAR_HIRAGANA_MI] 9, + [MSG_CHAR_HIRAGANA_MU] 9, + [MSG_CHAR_HIRAGANA_ME] 9, + [MSG_CHAR_HIRAGANA_MO] 9, + [MSG_CHAR_HIRAGANA_YA] 9, + [MSG_CHAR_HIRAGANA_YU] 9, + [MSG_CHAR_HIRAGANA_YO] 9, + [MSG_CHAR_HIRAGANA_RA] 9, + [MSG_CHAR_HIRAGANA_RI] 9, + [MSG_CHAR_HIRAGANA_RU] 9, + [MSG_CHAR_HIRAGANA_RE] 9, + [MSG_CHAR_HIRAGANA_RO] 9, + [MSG_CHAR_HIRAGANA_WA] 9, + [MSG_CHAR_HIRAGANA_WO] 9, + [MSG_CHAR_HIRAGANA_N] 9, + [MSG_CHAR_HIRAGANA_VU] 9, + [MSG_CHAR_HIRAGANA_GA] 9, + [MSG_CHAR_HIRAGANA_GI] 9, + [MSG_CHAR_HIRAGANA_GU] 9, + [MSG_CHAR_HIRAGANA_GE] 9, + [MSG_CHAR_HIRAGANA_GO] 9, + [MSG_CHAR_HIRAGANA_ZA] 9, + [MSG_CHAR_HIRAGANA_ZI] 9, + [MSG_CHAR_HIRAGANA_ZU] 9, + [MSG_CHAR_HIRAGANA_ZE] 9, + [MSG_CHAR_HIRAGANA_ZO] 9, + [MSG_CHAR_HIRAGANA_DA] 9, + [MSG_CHAR_HIRAGANA_DI] 9, + [MSG_CHAR_HIRAGANA_DU] 9, + [MSG_CHAR_HIRAGANA_DE] 9, + [MSG_CHAR_HIRAGANA_DO] 9, + [MSG_CHAR_HIRAGANA_BA] 9, + [MSG_CHAR_HIRAGANA_BI] 9, + [MSG_CHAR_HIRAGANA_BU] 9, + [MSG_CHAR_HIRAGANA_BE] 9, + [MSG_CHAR_HIRAGANA_BO] 9, + [MSG_CHAR_HIRAGANA_PA] 9, + [MSG_CHAR_HIRAGANA_PI] 9, + [MSG_CHAR_HIRAGANA_PU] 9, + [MSG_CHAR_HIRAGANA_PE] 9, + [MSG_CHAR_HIRAGANA_PO] 9, + [MSG_CHAR_HIRAGANA_SMALL_A] 9, + [MSG_CHAR_HIRAGANA_SMALL_I] 8, + [MSG_CHAR_HIRAGANA_SMALL_U] 8, + [MSG_CHAR_HIRAGANA_SMALL_E] 8, + [MSG_CHAR_HIRAGANA_SMALL_O] 8, + [MSG_CHAR_HIRAGANA_SMALL_TU] 8, + [MSG_CHAR_HIRAGANA_SMALL_YA] 8, + [MSG_CHAR_HIRAGANA_SMALL_YU] 8, + [MSG_CHAR_HIRAGANA_SMALL_YO] 8, + [MSG_CHAR_KATAKANA_A] 9, + [MSG_CHAR_KATAKANA_I] 8, + [MSG_CHAR_KATAKANA_U] 9, + [MSG_CHAR_KATAKANA_E] 9, + [MSG_CHAR_KATAKANA_O] 9, + [MSG_CHAR_KATAKANA_KA] 9, + [MSG_CHAR_KATAKANA_KI] 9, + [MSG_CHAR_KATAKANA_KU] 9, + [MSG_CHAR_KATAKANA_KE] 9, + [MSG_CHAR_KATAKANA_KO] 9, + [MSG_CHAR_KATAKANA_SA] 9, + [MSG_CHAR_KATAKANA_SI] 9, + [MSG_CHAR_KATAKANA_SU] 9, + [MSG_CHAR_KATAKANA_SE] 9, + [MSG_CHAR_KATAKANA_SO] 9, + [MSG_CHAR_KATAKANA_TA] 9, + [MSG_CHAR_KATAKANA_TI] 9, + [MSG_CHAR_KATAKANA_TU] 9, + [MSG_CHAR_KATAKANA_TE] 9, + [MSG_CHAR_KATAKANA_TO] 9, + [MSG_CHAR_KATAKANA_NA] 9, + [MSG_CHAR_KATAKANA_NI] 9, + [MSG_CHAR_KATAKANA_NU] 9, + [MSG_CHAR_KATAKANA_NE] 9, + [MSG_CHAR_KATAKANA_NO] 9, + [MSG_CHAR_KATAKANA_HA] 9, + [MSG_CHAR_KATAKANA_HI] 9, + [MSG_CHAR_KATAKANA_HU] 9, + [MSG_CHAR_KATAKANA_HE] 9, + [MSG_CHAR_KATAKANA_HO] 9, + [MSG_CHAR_KATAKANA_MA] 9, + [MSG_CHAR_KATAKANA_MI] 9, + [MSG_CHAR_KATAKANA_MU] 9, + [MSG_CHAR_KATAKANA_ME] 9, + [MSG_CHAR_KATAKANA_MO] 9, + [MSG_CHAR_KATAKANA_YA] 9, + [MSG_CHAR_KATAKANA_YU] 9, + [MSG_CHAR_KATAKANA_YO] 9, + [MSG_CHAR_KATAKANA_RA] 9, + [MSG_CHAR_KATAKANA_RI] 9, + [MSG_CHAR_KATAKANA_RU] 9, + [MSG_CHAR_KATAKANA_RE] 9, + [MSG_CHAR_KATAKANA_RO] 9, + [MSG_CHAR_KATAKANA_WA] 9, + [MSG_CHAR_KATAKANA_WO] 9, + [MSG_CHAR_KATAKANA_N] 9, + [MSG_CHAR_KATAKANA_VU] 9, + [MSG_CHAR_KATAKANA_GA] 9, + [MSG_CHAR_KATAKANA_GI] 9, + [MSG_CHAR_KATAKANA_GU] 9, + [MSG_CHAR_KATAKANA_GE] 9, + [MSG_CHAR_KATAKANA_GO] 9, + [MSG_CHAR_KATAKANA_ZA] 9, + [MSG_CHAR_KATAKANA_ZI] 9, + [MSG_CHAR_KATAKANA_ZU] 9, + [MSG_CHAR_KATAKANA_ZE] 9, + [MSG_CHAR_KATAKANA_ZO] 9, + [MSG_CHAR_KATAKANA_DA] 9, + [MSG_CHAR_KATAKANA_DI] 9, + [MSG_CHAR_KATAKANA_DU] 9, + [MSG_CHAR_KATAKANA_DE] 9, + [MSG_CHAR_KATAKANA_DO] 9, + [MSG_CHAR_KATAKANA_BA] 9, + [MSG_CHAR_KATAKANA_BI] 9, + [MSG_CHAR_KATAKANA_BU] 9, + [MSG_CHAR_KATAKANA_BE] 9, + [MSG_CHAR_KATAKANA_BO] 9, + [MSG_CHAR_KATAKANA_PA] 9, + [MSG_CHAR_KATAKANA_PI] 9, + [MSG_CHAR_KATAKANA_PU] 9, + [MSG_CHAR_KATAKANA_PE] 9, + [MSG_CHAR_KATAKANA_PO] 9, + [MSG_CHAR_KATAKANA_SMALL_A] 8, + [MSG_CHAR_KATAKANA_SMALL_I] 8, + [MSG_CHAR_KATAKANA_SMALL_U] 8, + [MSG_CHAR_KATAKANA_SMALL_E] 8, + [MSG_CHAR_KATAKANA_SMALL_O] 8, + [MSG_CHAR_KATAKANA_SMALL_TU] 8, + [MSG_CHAR_KATAKANA_SMALL_YA] 8, + [MSG_CHAR_KATAKANA_SMALL_YU] 8, + [MSG_CHAR_KATAKANA_SMALL_YO] 8, + [MSG_CHAR_PROLONGED_SOUND] 9, + [MSG_CHAR_TILDE] 9, + [MSG_CHAR_LONGDASH_0] 9, + [MSG_CHAR_LONGDASH_1] 9, + [MSG_CHAR_LONGDASH_2] 11, + [MSG_CHAR_DIGIT_0] 9, + [MSG_CHAR_DIGIT_1] 8, + [MSG_CHAR_DIGIT_2] 9, + [MSG_CHAR_DIGIT_3] 9, + [MSG_CHAR_DIGIT_4] 9, + [MSG_CHAR_DIGIT_5] 9, + [MSG_CHAR_DIGIT_6] 9, + [MSG_CHAR_DIGIT_7] 9, + [MSG_CHAR_DIGIT_8] 9, + [MSG_CHAR_DIGIT_9] 9, + [MSG_CHAR_UP] 9, + [MSG_CHAR_DOWN] 9, + [MSG_CHAR_LEFT] 9, + [MSG_CHAR_RIGHT] 9, + [MSG_CHAR_EXCLAMATION] 9, + [MSG_CHAR_QUESTION] 9, + [MSG_CHAR_PLUS] 9, + [MSG_CHAR_MINUS] 9, + [MSG_CHAR_FORWARDSLASH] 10, + [MSG_CHAR_PERIOD] 7, + [MSG_CHAR_AND] 9, + [MSG_CHAR_HASH] 9, + [MSG_CHAR_HEART] 9, + [MSG_CHAR_STAR] 9, + [MSG_CHAR_LPAREN] 9, + [MSG_CHAR_RPAREN] 9, + [MSG_CHAR_TLBRACKET] 9, + [MSG_CHAR_BRBRACKET] 9, + [MSG_CHAR_MIDDLE_DOT] 7, + [MSG_CHAR_HIRAGANA_SMALL_N] 8, + [MSG_CHAR_KATAKANA_SMALL_N] 8, + [MSG_CHAR_KANJI_C6] 11, + [MSG_CHAR_KANJI_C7] 11, +}; + +u8 MsgCharWidthMenuLatin[] = { + [MSG_CHAR_UPPER_A] 9, + [MSG_CHAR_UPPER_B] 9, + [MSG_CHAR_UPPER_C] 9, + [MSG_CHAR_UPPER_D] 9, + [MSG_CHAR_UPPER_E] 9, + [MSG_CHAR_UPPER_F] 9, + [MSG_CHAR_UPPER_G] 9, + [MSG_CHAR_UPPER_H] 9, + [MSG_CHAR_UPPER_I] 8, + [MSG_CHAR_UPPER_J] 9, + [MSG_CHAR_UPPER_K] 9, + [MSG_CHAR_UPPER_L] 9, + [MSG_CHAR_UPPER_M] 9, + [MSG_CHAR_UPPER_N] 9, + [MSG_CHAR_UPPER_O] 9, + [MSG_CHAR_UPPER_P] 9, + [MSG_CHAR_UPPER_Q] 9, + [MSG_CHAR_UPPER_R] 9, + [MSG_CHAR_UPPER_S] 9, + [MSG_CHAR_UPPER_T] 9, + [MSG_CHAR_UPPER_U] 9, + [MSG_CHAR_UPPER_V] 9, + [MSG_CHAR_UPPER_W] 9, + [MSG_CHAR_UPPER_X] 9, + [MSG_CHAR_UPPER_Y] 9, + [MSG_CHAR_UPPER_Z] 9, + [MSG_CHAR_LOWER_Z] 9, +}; + +MessageCharData MsgCharDataNormal[] = { + { + .raster = MsgCharImgKana, + .charWidthTable = MsgCharWidthKana, + .monospaceWidth = 11, + .baseHeightOffset = 0, + }, + { + .raster = MsgCharImgLatin, + .charWidthTable = MsgCharWidthLatin, + .monospaceWidth = 11, + .baseHeightOffset = 2, + }, + { + .raster = MsgCharImgTitle, + .charWidthTable = MsgCharWidthKanji, + .monospaceWidth = 12, + .baseHeightOffset = 0, + }, + { + .raster = MsgCharImgSubtitle, + .charWidthTable = MsgCharWidthButtons, + .monospaceWidth = 14, + .baseHeightOffset = 0, + }, + {} +}; + +MessageCharset MsgCharsetNormal = { + .texSize = { 16, 14 }, + .unk_02 = 14, + .newLineY = 16, + .charRasterSize = 112, + .rasters = MsgCharDataNormal +}; + +MessageCharData MsgCharDataMenu[] = { + { + .raster = MsgCharImgMenuKana, + .charWidthTable = MsgCharWidthMenuKana, + .monospaceWidth = 9, + .baseHeightOffset = 0, + }, + { + .raster = MsgCharImgMenuLatin, + .charWidthTable = MsgCharWidthMenuLatin, + .monospaceWidth = 9, + .baseHeightOffset = 0, + }, + {} +}; + +MessageCharset MsgCharsetMenu = { + .texSize = { 12, 12 }, + .unk_02 = 10, + .newLineY = 12, + .charRasterSize = 72, + .rasters = MsgCharDataMenu +}; + +MessageCharset MsgCharsetMenu2 = { + .texSize = { 12, 12 }, + .unk_02 = 10, + .newLineY = 16, + .charRasterSize = 72, + .rasters = MsgCharDataMenu +}; +#else u8 MsgCharWidthNormal[] = { [MSG_CHAR_NOTE] 11, [MSG_CHAR_EXCLAMTION] 8, @@ -249,6 +805,7 @@ MessageCharset MsgCharsetMenu = { .charRasterSize = 128, .rasters = MsgCharDataMenu }; +#endif u8 MsgCharWidthTitle[] = { 8, 8, 8, 9, 8, 8, 8, 8, @@ -307,38 +864,44 @@ MessageCharset MsgCharsetSubtitle = { MessageCharset* MsgCharsets[] = { [MSG_FONT_NORMAL] &MsgCharsetNormal, [MSG_FONT_MENU] &MsgCharsetMenu, +#if VERSION_JP + [MSG_FONT_2] &MsgCharsetMenu2, +#else [MSG_FONT_2] &MsgCharsetMenu, +#endif [MSG_FONT_TITLE] &MsgCharsetTitle, [MSG_FONT_SUBTITLE] &MsgCharsetSubtitle, NULL }; -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 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, }; -// TODO: palette offsets s32 MsgLetterPaletteOffsets[] = { -#if VERSION_IQUE - 0x00058890, 0x0005A490, 0x0005C090, 0x0005DC90, - 0x0005F890, 0x00061490, 0x00063090, 0x00064C90, - 0x00066890, 0x00068490, 0x0006A090, 0x0006BC90, -#else - 0x0000EB78, 0x00010778, 0x00012378, 0x00013F78, - 0x00015B78, 0x00017778, 0x00019378, 0x0001AF78, - 0x0001CB78, 0x0001E778, 0x00020378, 0x00021F78, -#endif + (s32) charset_letter_content_1_pal_OFFSET + 6, + (s32) charset_letter_content_2_pal_OFFSET + 6, + (s32) charset_letter_content_3_pal_OFFSET + 6, + (s32) charset_letter_content_4_pal_OFFSET + 6, + (s32) charset_letter_content_5_pal_OFFSET + 6, + (s32) charset_letter_content_6_pal_OFFSET + 6, + (s32) charset_letter_content_7_pal_OFFSET + 6, + (s32) charset_letter_content_8_pal_OFFSET + 6, + (s32) charset_letter_content_9_pal_OFFSET + 6, + (s32) charset_letter_content_10_pal_OFFSET + 6, + (s32) charset_letter_content_11_pal_OFFSET + 6, + (s32) charset_letter_content_12_pal_OFFSET + 6, }; MsgVoice MsgVoices[] = { @@ -359,6 +922,7 @@ MsgVoice MsgVoices[] = { }, }; +#if !VERSION_JP s16 MsgStyleVerticalLineOffsets[] = { [MSG_STYLE_NONE] 0, [MSG_STYLE_RIGHT] -4, @@ -377,3 +941,4 @@ s16 MsgStyleVerticalLineOffsets[] = { [MSG_STYLE_EPILOGUE] -4, [MSG_STYLE_F] 0, }; +#endif diff --git a/src/msg_draw.c b/src/msg_draw.c new file mode 100644 index 0000000000..054fe8e34f --- /dev/null +++ b/src/msg_draw.c @@ -0,0 +1,2225 @@ +#include "common.h" +#include "ld_addrs.h" +#include "message_ids.h" +#include "sprite.h" + +#include "charset/postcard.png.h" +#include "charset/letter_content_1.png.h" + +extern IMG_BIN ui_msg_bubble_left_png[]; +extern IMG_BIN ui_msg_bubble_mid_png[]; +extern IMG_BIN ui_msg_bubble_right_png[]; +extern IMG_BIN ui_msg_arrow_png[]; +extern unsigned char ui_msg_palettes[16][32]; +extern IMG_BIN ui_msg_sign_corner_topleft_png[]; +extern IMG_BIN ui_msg_sign_corner_topright_png[]; +extern IMG_BIN ui_msg_sign_corner_bottomleft_png[]; +extern IMG_BIN ui_msg_sign_corner_bottomright_png[]; +extern IMG_BIN ui_msg_lamppost_corner_bottomright_png[]; +extern IMG_BIN ui_msg_sign_side_top_png[]; +extern IMG_BIN ui_msg_sign_side_left_png[]; +extern IMG_BIN ui_msg_sign_side_right_png[]; +extern IMG_BIN ui_msg_sign_side_bottom_png[]; +extern IMG_BIN ui_msg_sign_fill_png[]; +extern PAL_BIN ui_msg_sign_pal[]; +extern PAL_BIN ui_msg_lamppost_pal[]; +extern IMG_BIN ui_msg_background_png[]; +extern IMG_BIN ui_msg_rewind_arrow_png[]; +extern PAL_BIN ui_msg_rewind_arrow_pal[]; +extern IMG_BIN ui_msg_star_png[]; +extern IMG_BIN ui_msg_star_silhouette_png[]; + +// .bss +typedef MessageImageData* MessageImageDataList[1]; + +extern s32 gMsgBGScrollAmtX; +extern u16 gMsgGlobalWaveCounter; +extern MessageImageDataList gMsgVarImages; +extern s32 gMsgBGScrollAmtY; +extern u8* D_8015131C; +extern Gfx* D_80151338; +extern char gMessageBuffers[2][1024]; +extern u8 gMessageMsgVars[3][32]; +extern s16 D_80155C98; +extern Mtx gMessageWindowProjMatrix[2]; +extern MessageDrawState D_80155D20; +extern MessageDrawState* msg_drawState; +extern IMG_BIN D_80159B50[0x200]; +extern PAL_BIN D_8015C7E0[0x10]; +extern MessagePrintState gMessagePrinters[3]; +#if VERSION_IQUE +extern IMG_BIN D_801544A0[120][128]; +#endif + +extern s16 MsgStyleVerticalLineOffsets[]; + +extern IMG_BIN D_802ED550[]; +extern PAL_BIN D_802ED670[]; +extern IMG_BIN MsgCharImgTitle[]; +extern IMG_BIN MsgCharImgNormal[]; +extern MessageCharset* MsgCharsets[5]; +extern IMG_BIN MsgCharImgSubtitle[]; +extern PAL_BIN D_802F4560[80][8]; +extern s32 gMessageBoxFrameParts[2][16]; + +Vtx gMsgSpeechBoxLQuad[4] = { + { .v = { .ob = {1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0x20, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0x1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } }, +}; + +Vtx gMsgSpeechBoxMQuad[] = { + { .v = { .ob = {0x20, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0xE1, 0, 0}, .tc = {0x100, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0x100, 0x800}, .cn = {191, 184, 176, 255} } }, +}; + +Vtx gMsgSpeechBoxRQuad[] = { + { .v = { .ob = {0xE1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0x100, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } }, + { .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0x100, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } }, +}; + +Vtx gMsgArrowQuad1[] = { + { .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } }, +}; + +Vtx gMsgArrowQuad2[] = { + { .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } }, + { .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } }, +}; + +Gfx D_8014C500[] = { + gsDPSetCycleType(G_CYC_1CYCLE), + gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2), + gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), + gsDPSetTextureFilter(G_TF_AVERAGE), + gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON), + gsDPSetTexturePersp(G_TP_NONE), + gsDPSetColorDither(G_CD_DISABLE), + gsDPSetAlphaDither(G_AD_DISABLE), + gsDPSetTextureLOD(G_TL_TILE), + gsDPSetTextureLUT(G_TT_RGBA16), + gsDPSetTextureDetail(G_TD_CLAMP), + gsDPSetTextureConvert(G_TC_FILT), + gsDPSetCombineKey(G_CK_NONE), + gsDPSetAlphaCompare(G_AC_NONE), + gsDPNoOp(), + gsSPEndDisplayList(), +}; + +u8 D_8014C580[] = { 50, 80, 100, 105, 100, 0, 0, 0 }; +u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0}; +#if VERSION_IQUE +u32 D_8014AD24 = 2; +#else +u8 D_8014C594[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +#endif + +s32 draw_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s16 posX, s16 posY, u16 clipULx, + u16 clipULy, u16 clipLRx, u16 clipRLy); + +s32 _update_message(MessagePrintState* printer); +void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2); +void initialize_printer(MessagePrintState* printer, s32 arg1, s32 arg2); +MessagePrintState* _msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback, s32 arg2); +void msg_update_rewind_arrow(s32); +void msg_draw_rewind_arrow(s32); +void msg_draw_choice_pointer(MessagePrintState* printer); +void draw_message_window(MessagePrintState* printer); +void appendGfx_message(MessagePrintState*, s16, s16, u16, u16, u16, u8); +void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY); +void msg_reset_gfx_state(void); +void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX, + s32 posY); +void msg_draw_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 posX, u16 posY, u16 sizeX, u16 sizeY); +void msg_draw_speech_arrow(MessagePrintState* printer); +void msg_draw_frame(s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha); +void msg_draw_speech_bubble(MessagePrintState* printer, s16 posX, s16 posY, s16 straightWidth, s16 curveWidth, + s16 height, f32 scaleX, f32 scaleY, u8 opacity, s32 arg9); +s32 msg_get_draw_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u16 flags); + +void drawbox_message_delegate(s32 data, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { + MessagePrintState* printer = (MessagePrintState*)data; + + appendGfx_message(printer, 0, 0, 0, 0, 4, 0); +} + +void draw_message_window(MessagePrintState* printer) { + f32 scale = 1.0f; + s32 rotZ = 0; + + switch (printer->windowState) { + case MSG_WINDOW_STATE_D: + scale = (f32)D_8014C580[printer->fadeInCounter] / 100.0; + rotZ = (4 - printer->fadeInCounter) * 3; + printer->fadeInCounter++; + if (D_8014C580[printer->fadeInCounter] == 0) { + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + break; + case MSG_WINDOW_STATE_E: + scale = (f32)D_8014C588[printer->fadeOutCounter] / 100.0; + rotZ = -printer->fadeOutCounter; + printer->fadeOutCounter++; + if (D_8014C588[printer->fadeOutCounter] == 0) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + break; + } + + switch (printer->windowState) { + case MSG_WINDOW_STATE_D: + case MSG_WINDOW_STATE_E: + printer->windowBasePos.x = 160 - (printer->windowSize.x / 2); + printer->windowBasePos.y = 56; + draw_box(DRAW_FLAG_ROTSCALE, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0, + scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, SCREEN_WIDTH, + SCREEN_HEIGHT, NULL); + break; + default: + appendGfx_message(printer, printer->windowOffsetPos.x, printer->windowOffsetPos.y, printer->unk_46C, + printer->curLinePos, 4, 0); + break; + } +} + +#if VERSION_JP +#define MSG_NORMAL_WIDTH 192 +#define MSG_NORMAL_X 32 +#define MSG_NORMAL_WIN_WIDTH 256 +#define MSG_NORMAL_WIN_HEIGHT 64 +#define MSG_NORMAL_TEXT_Y 8 +#define MSG_NORMAL_ARROW_X 253 +#define MSG_NORMAL_ARROW_Y 56 +#define MSG_NORMAL_HEIGHT_CAP 64 +#define MSG_NORMAL_PAGE_HT 16 +#define MSG_INSPECT_TEXT_Y 5 +#define MSG_SIGN_TEXT_Y 13 +#define MSG_SIGN_WIDTH 240 +#define MSG_SIGN_OFFSET_X 20 +#define MSG_POPUP_TEXT_Y 8 +#define MSG_EPILOGUE_TEXT_Y 0 +#else +#define MSG_NORMAL_WIDTH 218 +#define MSG_NORMAL_X 22 +#define MSG_NORMAL_WIN_WIDTH 296 +#define MSG_NORMAL_WIN_HEIGHT 68 +#define MSG_NORMAL_TEXT_Y 6 +#define MSG_NORMAL_ARROW_X 276 +#define MSG_NORMAL_ARROW_Y 57 +#define MSG_NORMAL_HEIGHT_CAP 68 +#define MSG_NORMAL_PAGE_HT 14 +#define MSG_INSPECT_TEXT_Y 3 +#define MSG_SIGN_TEXT_Y 11 +#define MSG_SIGN_WIDTH 280 +#define MSG_SIGN_OFFSET_X 0 +#define MSG_POPUP_TEXT_Y 4 +#define MSG_EPILOGUE_TEXT_Y -2 +#endif + +#if VERSION_IQUE || VERSION_PAL +INCLUDE_ASM(s32, "msg_draw", appendGfx_message); +#else +void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 additionalOffsetX, u16 additionalOffsetY, + u16 flag, u8 alpha) { + SpriteRasterInfo sprRasterInfo; + u16 sp80bool; + s16 sp8E; + s16 sp96; + s16 sp9E; + s16 palette; + s16 spAE; + u16 spB6; + u8 spB8; + f32 windowScaleX; + MessageCharset* msgCharset; + f32 temp_f10; + f32 temp_f20; + f32 temp_f20_3; + f32 temp_f22_2; + f32 temp_f24; + f32 bubbleX; + f32 bubbleY; + f32 temp_f28; + f32 windowScaleY; + f32 temp_f8; + f32 temp_f8_5; + f64 temp_f0; + f32 temp_f0_2; + f32 temp_f2_2; + f64 temp_f20_2; + f64 temp_f22; + f32 temp_f2; + f64 temp_f2_3; + s32 temp_s0_7; + s32 temp_s0_8; + s32 temp_a2; + s32 temp_s1_5; + s32 i; + s16 temp_s3; + s16 temp_s4; + s32 windowSizeX; + s32 windowSizeY; + s16 temp_s5; + s16 temp_s6; + u32 temp_a0_49; + s32 animIdx; + u8 packedScaleX; + u8 packedScaleY; + MessageImageData* msgVarImage; + MessageImageData* msgImageData; + s32 phi_a0; + s32 straightWidth; + s32 curveWidth; + s32 height; + s32 frameX; + s32 frameY; + s32 frameSizeX; + s32 frameSizeY; + s32 frameFading; + u8 frameAlpha; + u16 fading; + u8 phi_s0_5; + IMG_PTR signRaster; + PAL_PTR signPalette; + s8 phi_s2_4; + u8 phi_s3_2; + s32 phi_v0_3; + s32 phi_a0_4; + s16 phi_t5; + s16 phi_s0_6; + s16 phi_t3; + s32 dbPos; + s16 charPosX; + s16 charPosY; + s16 phi_s2_5; + s32 phi_s0_7; + s32 phi_s1_8; + s8 varImgHasBorder; + s16 imgDrawPosX; + s16 imgDrawPosY; + f32 z1; + f32 z2; + f32 temp1; + f32 temp2; +#if VERSION_JP + u8 rasterOffsetY; +#else + s8 rasterOffsetY; +#endif + s16 baseOffsetY; + + msg_drawState = &D_80155D20; + msg_drawState->printBuffer = printer->printBuffer; + msg_drawState->printModeFlags = 0; + if (gMainGfxPos != D_80151338) { + msg_reset_gfx_state(); + } + msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_1 | MSG_PRINT_FLAG_100); + sp8E = 255; + if (flag & 1) { + sp8E = alpha; + } + msg_drawState->textStartPos[0] = 0; + msg_drawState->textStartPos[1] = 0; + msg_drawState->clipX[0] = 0; + msg_drawState->clipY[0] = 0; + msg_drawState->clipX[1] = SCREEN_WIDTH - 1; + msg_drawState->clipY[1] = SCREEN_HEIGHT - 1; + msg_drawState->msgScale.x = 1.0f; + msg_drawState->msgScale.y = 1.0f; + msg_drawState->unk_29 = 0; + msg_drawState->framePalette = 0; + msg_drawState->unk_2C = 0; + msg_drawState->visiblePrintedCount = 0; + msg_drawState->centerPos = 0; + msg_drawState->fontVariant = 0; + msg_drawState->curPosX = 0; + msg_drawState->nextPos[0] = 0; + msg_drawState->nextPos[1] = 0; + msg_drawState->font = 0; + msg_drawState->effectFlags = 0; + msg_drawState->nextCounter = 0; + msg_drawState->textColor = MSG_PAL_WHITE; + sp96 = 0xFF; + spAE = 0xFF; + spB6 = 0; + spB8 = 0; + sp9E = -1; + + if (flag & 2) { + msg_drawState->font = 1; + } + + if (flag & 4) { + gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + } + + sp80bool = FALSE; + msg_drawState->drawBufferPos = 0; + + while (!sp80bool) { + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { + case MSG_CHAR_PRINT_ENDL: + msg_drawState->nextPos[0] = 0; + msg_drawState->nextPos[1] += (s32)((msg_drawState->msgScale.y * MsgCharsets[msg_drawState->font]->newLineY) +#if !VERSION_JP + + MsgStyleVerticalLineOffsets[printer->style] +#endif + ); + if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_40) { + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_80; + } + msg_drawState->drawBufferPos++; + break; + case MSG_CHAR_PRINT_UNK_CHAR_FA: + msg_drawState->drawBufferPos++; + break; + case MSG_CHAR_PRINT_VARIANT0: + case MSG_CHAR_PRINT_VARIANT1: + case MSG_CHAR_PRINT_VARIANT2: + case MSG_CHAR_PRINT_VARIANT3: + msg_drawState->fontVariant = msg_drawState->printBuffer[msg_drawState->drawBufferPos] - MSG_CHAR_PRINT_VARIANT0; + msg_drawState->drawBufferPos++; + break; + case MSG_CHAR_PRINT_SPACE: + case MSG_CHAR_PRINT_FULL_SPACE: + case MSG_CHAR_PRINT_HALF_SPACE: + msg_drawState->nextPos[0] += msg_get_draw_char_width(msg_drawState->printBuffer[msg_drawState->drawBufferPos], + msg_drawState->font, msg_drawState->fontVariant, msg_drawState->msgScale.x, msg_drawState->curPosX, + msg_drawState->printModeFlags); + msg_drawState->drawBufferPos++; + break; + case MSG_CHAR_PRINT_STYLE: + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { + case MSG_STYLE_RIGHT: + case MSG_STYLE_LEFT: + case MSG_STYLE_CENTER: + case MSG_STYLE_TATTLE: + if (printer->windowState == MSG_WINDOW_STATE_OPENING && printer->fadeInCounter == 0) { + printer->openStartPos.x = printer->initOpenPos.x; + printer->openStartPos.y = printer->initOpenPos.y; + } + temp_s6 = printer->openStartPos.x; + temp_s5 = printer->openStartPos.y; + temp_s4 = printer->windowBasePos.x + (f32) printer->windowSize.x * 0.5; + temp_s3 = printer->windowBasePos.y + (f32) printer->windowSize.y * 0.5; + msg_drawState->textColor = MSG_PAL_STANDARD; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + + if (printer->style == MSG_STYLE_RIGHT || printer->style == MSG_STYLE_LEFT || printer->style == MSG_STYLE_CENTER) { + straightWidth = MSG_NORMAL_WIDTH; + printer->windowBasePos.x = MSG_NORMAL_X; + printer->windowBasePos.y = 13; + printer->windowSize.x = MSG_NORMAL_WIN_WIDTH; + printer->windowSize.y = MSG_NORMAL_WIN_HEIGHT; + msg_drawState->textStartPos[0] = 26; + msg_drawState->textStartPos[1] = MSG_NORMAL_TEXT_Y; + printer->rewindArrowPos.x = MSG_NORMAL_ARROW_X; + printer->rewindArrowPos.y = MSG_NORMAL_ARROW_Y; + curveWidth = 32; + height = MSG_NORMAL_HEIGHT_CAP; + } else { + straightWidth = 218; + +#if VERSION_JP + if (printer->maxLinesPerPage == 1) { + msg_drawState->textStartPos[0] = 18; + msg_drawState->textStartPos[1] = 10; + curveWidth = 24; + } else if (printer->maxLinesPerPage == 2) { + msg_drawState->textStartPos[0] = 22; + msg_drawState->textStartPos[1] = 8; + curveWidth = 28; + } else { + msg_drawState->textStartPos[0] = 26; + msg_drawState->textStartPos[1] = 8; + curveWidth = 32; + } +#else + switch (printer->maxLinesPerPage) { + case 1: + msg_drawState->textStartPos[0] = 18; + msg_drawState->textStartPos[1] = 10; + curveWidth = 24; + break; + case 2: + msg_drawState->textStartPos[0] = 22; + msg_drawState->textStartPos[1] = 6; + curveWidth = 28; + break; + case 3: + msg_drawState->textStartPos[0] = 26; + msg_drawState->textStartPos[1] = 8; + curveWidth = 32; + break; + default: + msg_drawState->textStartPos[0] = 26; + msg_drawState->textStartPos[1] = 6; + curveWidth = 32; + break; + } +#endif + + straightWidth = printer->msgWidth; + if (straightWidth > 256) { + straightWidth = 256; + } + if (straightWidth < 70) { + straightWidth = 70; + } + straightWidth -= 12; + + printer->windowSize.x = straightWidth + (curveWidth * 2); + + height = (printer->maxLinesPerPage * MSG_NORMAL_PAGE_HT) + 16; + if (height > MSG_NORMAL_HEIGHT_CAP) { + height = MSG_NORMAL_HEIGHT_CAP; + } + if (height < 36) { + height = 36; + } + printer->windowSize.y = height; + + temp_a2 = printer->openStartPos.x - printer->windowSize.x / 2; + if (temp_a2 < 18) { + temp_a2 = 18; + } + if (temp_a2 + printer->windowSize.x > SCREEN_WIDTH - 18) { + temp_a2 = SCREEN_WIDTH - 18 - printer->windowSize.x; + } + phi_a0 = printer->openStartPos.y - 38 - printer->windowSize.y; + if (phi_a0 < 20) { + phi_a0 = 20; + } + if (phi_a0 + printer->windowSize.y > 170) { + phi_a0 = 170 - printer->windowSize.y; + } + printer->windowBasePos.x = temp_a2; + printer->windowBasePos.y = phi_a0; + printer->rewindArrowPos.x = (printer->windowSize.x + temp_a2) - 30; + printer->rewindArrowPos.y = (printer->windowSize.y + phi_a0) - 18; + } + + if (printer->windowState == MSG_WINDOW_STATE_B || printer->windowState == MSG_WINDOW_STATE_C) { + msg_drawState->framePalette = 1; + } + + if (printer->windowState == MSG_WINDOW_STATE_OPENING) { + windowScaleX = update_lerp(EASING_LINEAR, 0.07f, 1.0f, printer->fadeInCounter, 7); + windowScaleY = update_lerp(EASING_LINEAR, 0.3f, 1.0f, printer->fadeInCounter, 7); + temp_f28 = update_lerp(EASING_LINEAR, 96.0f, 200.0f, printer->fadeInCounter, 7); + temp_f20 = update_lerp(EASING_SIN_OUT, temp_s5, temp_s3, printer->fadeInCounter, 7); + temp_f24 = update_lerp(EASING_SIN_OUT, temp_s6, temp_s4, printer->fadeInCounter, 7); + temp_f2_2 = printer->windowSize.x * windowScaleX; + temp_f0_2 = printer->windowSize.y * windowScaleY; + bubbleX = (temp_f24 - temp_f2_2 * 0.5) + 0.5; + bubbleY = (temp_f20 - temp_f0_2 * 0.5) + 0.5; + msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, windowScaleX, windowScaleY, temp_f28, 1); + printer->fadeInCounter++; + if (printer->fadeInCounter == 7) { + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { + printer->fadeOutCounter++; + windowScaleX = update_lerp(EASING_LINEAR, 1.0f, 0.6f, printer->fadeOutCounter, 5); + windowScaleY = update_lerp(EASING_LINEAR, 1.0f, 0.8f, printer->fadeOutCounter, 5); + temp_f2 = (printer->windowSize.x * windowScaleX); + temp_f0 = (printer->windowSize.y * windowScaleY); + temp_f24 = temp_s4; + temp_f20 = temp_s3; + bubbleX = (temp_f24 - temp_f2 * 0.5) + 0.5; + bubbleY = (temp_f20 - temp_f0 * 0.5) + 0.5; + temp_f22_2 = (temp_f24 + temp_f2 * 0.5) - 0.5; + temp_f20_3 = (temp_f20 + temp_f0 * 0.5) - 0.5; + temp_f28 = update_lerp(EASING_LINEAR, 255.0f, 64.0f, printer->fadeOutCounter, 5); + sp8E = temp_f28 * 0.35; + spAE = temp_f28; + msg_drawState->clipX[0] = bubbleX + msg_drawState->textStartPos[0]; + msg_drawState->clipY[0] = bubbleY + msg_drawState->textStartPos[1]; + msg_drawState->clipX[1] = temp_f22_2 - msg_drawState->textStartPos[0]; + msg_drawState->clipY[1] = temp_f20_3 - msg_drawState->textStartPos[1]; + msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, windowScaleX, windowScaleY, temp_f28, 1); + if (printer->fadeOutCounter >= 5) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + } else { + bubbleX = posX + printer->windowBasePos.x; + bubbleY = posY + printer->windowBasePos.y; + + msg_draw_speech_bubble(printer, bubbleX, bubbleY, straightWidth, curveWidth, height, 1.0f, 1.0f, 255, 1); + if (((u32)(printer->openStartPos.x - 20) <= 280) && (printer->openStartPos.y <= 220)) { + msg_draw_speech_arrow(printer); + } + } + + if (printer->windowState != MSG_WINDOW_STATE_CLOSING) { + msg_drawState->clipX[0] = 20; + msg_drawState->clipY[0] = printer->windowOffsetPos.y + printer->windowBasePos.y + + msg_drawState->textStartPos[1]; + msg_drawState->clipX[1] = SCREEN_WIDTH - 20; + msg_drawState->clipY[1] = msg_drawState->clipY[0] + printer->windowSize.y - 16; + } + msg_reset_gfx_state(); + msg_drawState->drawBufferPos += 2; + break; + case MSG_STYLE_CHOICE: + frameFading = 0; + windowSizeX = printer->windowSize.x; + windowSizeY = printer->windowSize.y; + frameSizeX = windowSizeX; + frameSizeY = windowSizeY; + msg_drawState->framePalette = 0; + msg_drawState->textStartPos[0] = 12; + msg_drawState->textStartPos[1] = 6; + frameAlpha = 255; + if (printer->windowState == MSG_WINDOW_STATE_OPENING) { + + printer->fadeInCounter++; + if (printer->fadeInCounter == 6) { + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + + temp_f10 = ((f32) printer->fadeInCounter * (2.0 / 15.0)) + 0.2; + + z1 = printer->windowBasePos.x + (windowSizeX / 2); + z2 = printer->windowBasePos.y + (windowSizeY / 2); + temp1 = z1 - (windowSizeX * temp_f10 * 0.5); + temp2 = z2 - (windowSizeY * temp_f10 * 0.5); + frameX = temp1 + 0.5; + frameY = temp2 + 0.5; + frameSizeX = windowSizeX * temp_f10 + 0.5; + frameSizeY = windowSizeY * temp_f10 + 0.5; + + if (frameSizeX < 24) { + frameSizeX = 24; + } + if (frameSizeY < 24) { + frameSizeY = 24; + } + + sp8E = (u8)(temp_f10 * 255.0) * 0.6; + } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { + printer->fadeOutCounter++; + if (printer->fadeOutCounter >= 5) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + frameAlpha = ~(printer->fadeOutCounter * 0x2E); + sp8E = ((u8)frameAlpha) * 0.6; + frameFading = 1; + if (sp8E >= 32) { + sp8E -= 32; + } + frameX = printer->windowBasePos.x; + frameY = printer->windowBasePos.y; + } else { + frameX = printer->windowBasePos.x; + frameY = printer->windowBasePos.y; + msg_draw_prim_rect(255, 32, 32, 0, frameX - 1, frameY - 1, windowSizeX + 2, windowSizeY + 2); + } + msg_drawState->clipX[0] = frameX + 2; + msg_drawState->clipY[0] = frameY + 2; + msg_drawState->clipX[1] = frameX + frameSizeX - 2; + msg_drawState->clipY[1] = frameY + frameSizeY - 2; + msg_draw_frame(frameX, frameY, frameSizeX, frameSizeY, MSG_STYLE_CHOICE, msg_drawState->framePalette, frameFading, frameAlpha, + frameAlpha); + msg_reset_gfx_state(); + spAE = frameAlpha & 0xFF; + msg_drawState->textColor = MSG_PAL_STANDARD; + msg_drawState->drawBufferPos += 2; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + break; + case MSG_STYLE_INSPECT: + case MSG_STYLE_UPGRADE: + case MSG_STYLE_NARRATE: + case MSG_STYLE_F: + fading = 0; + msg_drawState->textStartPos[0] = 16; + msg_drawState->textStartPos[1] = MSG_INSPECT_TEXT_Y; + msg_drawState->clipX[0] = printer->windowBasePos.x + 5; + msg_drawState->clipY[0] = printer->windowBasePos.y + 4; + msg_drawState->clipX[1] = printer->windowBasePos.x + printer->windowSize.x - 8; + msg_drawState->clipY[1] = printer->windowBasePos.y + printer->windowSize.y - 5; + printer->rewindArrowPos.x = msg_drawState->clipX[1] - 17; + printer->rewindArrowPos.y = msg_drawState->clipY[1] - 17; + msg_drawState->textColor = MSG_PAL_WHITE; + phi_s0_5 = 0xFF; + msg_draw_prim_rect(255, 32, 32, 0, printer->windowBasePos.x + 3, printer->windowBasePos.y - 1, + printer->windowSize.x - 6, 1); + msg_draw_prim_rect(32, 255, 32, 0, printer->windowBasePos.x + 3, + printer->windowBasePos.y + printer->windowSize.y, printer->windowSize.x - 6, + 1); + + if (printer->windowState == MSG_WINDOW_STATE_OPENING) { + phi_s0_5 = (printer->fadeInCounter * 0x30) + 0x50; + sp8E = (phi_s0_5 & 0xFF) - 0x30; + printer->fadeInCounter++; + fading = 1; + if ((s16)printer->fadeInCounter == 4) { // TODO why is this cast needed + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { + phi_s0_5 = -0x30 - (printer->fadeOutCounter * 40); + sp8E = (phi_s0_5 & 0xFF) - 0x30; + printer->fadeOutCounter++; + fading = 1; + if (printer->fadeOutCounter == 4) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + } + + msg_draw_frame(printer->windowBasePos.x, printer->windowBasePos.y, printer->windowSize.x, printer->windowSize.y, MSG_STYLE_INSPECT, + msg_drawState->framePalette, fading, phi_s0_5, phi_s0_5); + msg_reset_gfx_state(); + spAE = phi_s0_5 & 0xFF; + msg_drawState->drawBufferPos += 2; + break; + case MSG_STYLE_SIGN: + case MSG_STYLE_LAMPPOST: + msg_drawState->textStartPos[0] = 18; + msg_drawState->textStartPos[1] = MSG_SIGN_TEXT_Y; + printer->windowBasePos.x = 20 + MSG_SIGN_OFFSET_X; + printer->windowBasePos.y = 28; + printer->windowSize.x = MSG_SIGN_WIDTH; + msg_drawState->framePalette = 15; + temp_s1_5 = 0xFF; + if (printer->style == MSG_STYLE_SIGN) { + signRaster = ui_msg_sign_corner_bottomright_png; + printer->windowSize.y = 72; + msg_drawState->textColor = MSG_PAL_18; + signPalette = ui_msg_sign_pal; + } else { + signRaster = ui_msg_lamppost_corner_bottomright_png; + msg_drawState->textColor = MSG_PAL_1C; + signPalette = ui_msg_lamppost_pal; + } + msg_drawState->clipX[0] = 20 + MSG_SIGN_OFFSET_X + 14; + msg_drawState->clipY[0] = 40; + msg_drawState->clipX[1] = 283 - MSG_SIGN_OFFSET_X; + msg_drawState->clipY[1] = printer->windowSize.y + 17; + printer->rewindArrowPos.x = msg_drawState->clipX[1] - 16; + printer->rewindArrowPos.y = msg_drawState->clipY[1] - 9; + + if (printer->windowState == MSG_WINDOW_STATE_OPENING) { + temp_s1_5 = (printer->fadeInCounter << 6) + 0x50; + sp8E = (temp_s1_5 & 0xFF) - 0x30; + printer->fadeInCounter++; + if (printer->fadeInCounter == 3) { + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + } else { + if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { + temp_s1_5 = -0x30 - (printer->fadeOutCounter * 0x30); + sp8E = (temp_s1_5 & 0xFF) - 0x30; + printer->fadeOutCounter++; + if (printer->fadeOutCounter == 3) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + } + } + spAE = (u8)temp_s1_5; + draw_ci_image_with_clipping(ui_msg_sign_corner_topleft_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20 + MSG_SIGN_OFFSET_X, + 28, 10, 10, 310, 230, temp_s1_5); + draw_ci_image_with_clipping(ui_msg_sign_corner_topright_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284 - MSG_SIGN_OFFSET_X, + 28, 10, 10, 310, 230, temp_s1_5); + draw_ci_image_with_clipping(ui_msg_sign_corner_bottomleft_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20 + MSG_SIGN_OFFSET_X, + printer->windowSize.y + 12, 10, 10, 310, 230, temp_s1_5); + draw_ci_image_with_clipping(signRaster, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284 - MSG_SIGN_OFFSET_X, printer->windowSize.y + 12, + 10, 10, 310, 230, temp_s1_5); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_top_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMainGfxPos++, (36 + MSG_SIGN_OFFSET_X) * 4, 28 * 4, (284 - MSG_SIGN_OFFSET_X) * 4, 44 * 4, G_TX_RENDERTILE, 0, 0, + 0x0400, 0x0400); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_left_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 31, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMainGfxPos++, (20 + MSG_SIGN_OFFSET_X) * 4, 44 * 4, (36 + MSG_SIGN_OFFSET_X) * 4, (printer->windowSize.y + 12) * 4, + G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_right_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 31, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMainGfxPos++, (284 - MSG_SIGN_OFFSET_X) * 4, 44 * 4, (300 - MSG_SIGN_OFFSET_X) * 4, (printer->windowSize.y + 12) * 4, + G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_side_bottom_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMainGfxPos++, (36 + MSG_SIGN_OFFSET_X) * 4, (printer->windowSize.y + 12) * 4, (284 - MSG_SIGN_OFFSET_X) * 4, + (printer->windowSize.y + 28) * 4, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_sign_fill_png, G_IM_FMT_CI, 8, 0, 0, 0, 7, 7, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 3, 3, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMainGfxPos++, (36 + MSG_SIGN_OFFSET_X) * 4, 44 * 4, (283 - MSG_SIGN_OFFSET_X + 1) * 4, (printer->windowSize.y + 12) * 4, + G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + msg_reset_gfx_state(); + msg_drawState->drawBufferPos += 2; + break; + case MSG_STYLE_POSTCARD: + phi_s2_4 = 0; + msg_drawState->textStartPos[0] = 12; + msg_drawState->textStartPos[1] = 5; + printer->windowBasePos.x = 40; + printer->windowBasePos.y = 28; + msg_drawState->clipX[0] = 45; + msg_drawState->clipY[0] = 32; + msg_drawState->clipX[1] = 272; + msg_drawState->clipY[1] = 81; + printer->rewindArrowPos.x = msg_drawState->clipX[1] - 21; + printer->rewindArrowPos.y = msg_drawState->clipY[1] - 20; + msg_drawState->framePalette = 0; + msg_drawState->textColor = MSG_PAL_WHITE; + msg_draw_prim_rect(255, 32, 32, 0, 43, 27, 234, 1); + msg_draw_prim_rect(32, 255, 32, 0, 43, 86, 234, 1); + phi_s3_2 = 0xFF; + if (printer->windowState == MSG_WINDOW_STATE_OPENING) { + phi_s3_2 = (printer->fadeInCounter * 64) + 80; + sp8E = (phi_s3_2 & 0xFF) - 0x30; + printer->fadeInCounter++; + if (printer->fadeInCounter == 3) { + printer->windowState = MSG_WINDOW_STATE_PRINTING; + } + phi_s2_4 = 1; + } else if (printer->windowState == MSG_WINDOW_STATE_CLOSING) { + phi_s3_2 = -0x30 - (printer->fadeOutCounter * 0x30); + sp8E = (phi_s3_2 & 0xFF) - 0x30; + printer->fadeOutCounter++; + if (printer->fadeOutCounter == 3) { + printer->stateFlags |= MSG_STATE_FLAG_1; + } + phi_s2_4 = 1; + } + msg_draw_frame(40, 28, 240, 58, MSG_STYLE_INSPECT, msg_drawState->framePalette, phi_s2_4, phi_s3_2, phi_s3_2); + draw_ci_image_with_clipping(printer->letterBackgroundImg, 150, 105, G_IM_FMT_CI, G_IM_SIZ_4b, + printer->letterBackgroundPal, 85, 97, 10, 10, 300, 220, phi_s3_2); + draw_ci_image_with_clipping(printer->letterContentImg, 70, 95, G_IM_FMT_CI, G_IM_SIZ_8b, + printer->letterContentPal, 160, 102, 10, 10, 300, 220, phi_s3_2); + msg_reset_gfx_state(); + spAE = phi_s3_2 & 0xFF; + msg_drawState->drawBufferPos += 2; + break; + case MSG_STYLE_POPUP: + case MSG_STYLE_B: + msg_drawState->textStartPos[0] = 16; + msg_drawState->textStartPos[1] = MSG_POPUP_TEXT_Y; + msg_drawState->clipX[0] = 0; + msg_drawState->clipX[1] = SCREEN_WIDTH - 1; + msg_drawState->clipY[0] = 0; + msg_drawState->clipY[1] = SCREEN_HEIGHT - 1; + msg_drawState->textColor = MSG_PAL_WHITE; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + if (printer->windowState == MSG_WINDOW_STATE_D || printer->windowState == MSG_WINDOW_STATE_E) { + printer->windowBasePos.x = 0; + printer->windowBasePos.y = 0; + } else { + printer->windowBasePos.x = 160 - printer->windowSize.x / 2; + printer->windowBasePos.y = 56; + draw_box(0, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, + printer->windowSize.y, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL, + SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + } + msg_reset_gfx_state(); + msg_drawState->drawBufferPos += 2; + break; + case MSG_STYLE_EPILOGUE: + printer->windowBasePos.x = 60; + printer->windowBasePos.y = 110; + printer->windowSize.x = 200; + printer->windowSize.y = 50; + msg_drawState->textStartPos[0] = 0; + msg_drawState->textStartPos[1] = MSG_EPILOGUE_TEXT_Y; + msg_drawState->clipX[0] = printer->windowBasePos.x; + msg_drawState->clipY[0] = printer->windowBasePos.y; + msg_drawState->clipX[1] = printer->windowBasePos.x + printer->windowSize.x; + msg_drawState->clipY[1] = printer->windowBasePos.y + printer->windowSize.y; + printer->rewindArrowPos.x = printer->windowBasePos.x + printer->windowSize.x - 10; + printer->rewindArrowPos.y = printer->windowBasePos.y + printer->windowSize.y - 10; + msg_reset_gfx_state(); + msg_drawState->drawBufferPos += 2; + break; + } + break; + case MSG_CHAR_PRINT_NEXT: + if (printer->windowState == MSG_WINDOW_STATE_C) { + if (msg_drawState->nextCounter >= printer->unkArraySize) { + sp80bool = TRUE; + } + } else if (printer->windowState == MSG_WINDOW_STATE_B) { + if (printer->curLinePos < printer->lineEndPos[printer->unkArraySize]) { + if (msg_drawState->nextCounter >= printer->unkArraySize) { + sp80bool = TRUE; + } + } else { + if (printer->unkArraySize < msg_drawState->nextCounter) { + sp80bool = TRUE; + } else if (msg_drawState->nextCounter >= printer->unkArraySize) { + phi_a0_4 = 36; + if (printer->maxLinesPerPage >= 2) { + phi_v0_3 = 48; + if (printer->maxLinesPerPage == 2) { + phi_v0_3 = 32; + } + if (printer->unk_4C8 < phi_v0_3) { + if (printer->unk_4C8 <= 0x10) { + phi_a0_4 = 56; + } + sp8E = 0xFF - (phi_a0_4 * printer->unk_4CC); + if (sp8E < 0) { + sp8E = 0; + } + } + } + } + } + } + msg_drawState->nextCounter++; + msg_drawState->drawBufferPos++; + break; + case MSG_CHAR_PRINT_END: + sp80bool = TRUE; + break; + case MSG_CHAR_PRINT_FUNCTION: + msg_drawState->drawBufferPos++; + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { + case MSG_PRINT_FUNC_FONT: + msg_drawState->font = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + break; + case MSG_PRINT_FUNC_VARIANT: + msg_drawState->fontVariant = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_COLOR: + msg_drawState->textColor = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_SPACING: + msg_drawState->curPosX = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_SIZE: + packedScaleX = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->msgScale.x = (f32)(packedScaleX >> 4) + ((packedScaleX & 0xF) * 0.0625f); + packedScaleY = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; + msg_drawState->msgScale.y = (f32)(packedScaleY >> 4) + ((packedScaleY & 0xF) * 0.0625f); + msg_drawState->drawBufferPos += 3; + if (msg_drawState->msgScale.x > 1.0 || msg_drawState->msgScale.y > 1.0) { + gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); + } else if (msg_drawState->msgScale.x < 1.0 || msg_drawState->msgScale.y < 1.0) { + gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); + } + break; + case MSG_PRINT_FUNC_SIZE_RESET: + msg_drawState->msgScale.x = 1.0f; + msg_drawState->msgScale.y = 1.0f; + msg_drawState->drawBufferPos++; + gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); + break; + case MSG_PRINT_FUNC_SET_X: + msg_drawState->nextPos[0] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] * 256 + + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]); + msg_drawState->drawBufferPos += 3; + break; + case MSG_PRINT_FUNC_SET_Y: + msg_drawState->nextPos[1] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_RIGHT: + msg_drawState->nextPos[0] += msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_DOWN: + msg_drawState->nextPos[1] += msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_UP: + msg_drawState->nextPos[1] -= msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_INLINE_IMAGE: + msgImageData = &(*gMsgVarImages)[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]]; + phi_t5 = sp8E; + if (sp8E < 0xFF) { + phi_t5 = (s32)(sp8E * 0.7); + } + imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - + additionalOffsetX); + imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - + additionalOffsetY); + + draw_ci_image_with_clipping(msgImageData->raster, msgImageData->width, msgImageData->height, msgImageData->format, msgImageData->bitDepth, + msgImageData->palette, imgDrawPosX, imgDrawPosY, (s32) msg_drawState->clipX[0], (s32) msg_drawState->clipY[0], + msg_drawState->clipX[1] - msg_drawState->clipX[0], msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t5); + msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_2 | MSG_PRINT_FLAG_10); + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_ANIM_SPRITE: + phi_s0_6 = sp8E; + if (sp8E < 0xFF) { + phi_s0_6 = (s32)(sp8E * 0.7); + } + + if (spr_get_npc_raster_info(&sprRasterInfo, (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] << 8) | + msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], + msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]) != 0) { + imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - + additionalOffsetX); + imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - + additionalOffsetY); + + draw_ci_image_with_clipping(sprRasterInfo.raster, sprRasterInfo.width, sprRasterInfo.height, G_IM_FMT_CI, G_IM_SIZ_4b, sprRasterInfo.defaultPal, imgDrawPosX, imgDrawPosY, + msg_drawState->clipX[0], msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0], + msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_s0_6); + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + } + msg_drawState->drawBufferPos += 4; + break; + case MSG_PRINT_FUNC_ITEM_ICON: + if (D_8015131C != 0) { + phi_t3 = sp8E; + if (sp8E < 0xFF) { + phi_t3 = (s32)(sp8E * 0.7); + } + imgDrawPosX = (s16)((msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + posX))) - + additionalOffsetX); + imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) - + additionalOffsetY); + + draw_ci_image_with_clipping(D_80159B50, 32, 32, G_IM_FMT_CI, G_IM_SIZ_4b, D_8015C7E0, imgDrawPosX, imgDrawPosY, msg_drawState->clipX[0], + msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0], + msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t3); + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + } + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_ANIM_DELAY: + animIdx = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + if (printer->animTimers[animIdx] == -1) { + printer->animTimers[animIdx] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]; + } + if (printer->animTimers[animIdx] == 0) { + printer->curAnimFrame[animIdx]++; + } + + dbPos = msg_drawState->drawBufferPos; + while (TRUE) { + if ((msg_drawState->printBuffer[dbPos - 1] == MSG_CHAR_PRINT_FUNCTION) && + (msg_drawState->printBuffer[dbPos] == MSG_PRINT_FUNC_ANIM_DELAY) && + (msg_drawState->printBuffer[dbPos + 1] == animIdx)) { + if (msg_drawState->printBuffer[dbPos + 2] != printer->curAnimFrame[animIdx]) { + dbPos += 4; + } else { + break; + } + } else { + if ((msg_drawState->printBuffer[dbPos] == MSG_CHAR_PRINT_FUNCTION) && + (msg_drawState->printBuffer[dbPos + 1] == MSG_PRINT_FUNC_ANIM_LOOP) && + (msg_drawState->printBuffer[dbPos + 2] == animIdx)) { + + if (printer->animTimers[animIdx] == 0) { + printer->curAnimFrame[animIdx] = msg_drawState->printBuffer[dbPos + 3]; + dbPos = msg_drawState->drawBufferPos; + continue; + } else { + dbPos++; + break; + } + } else { + if (msg_drawState->printBuffer[dbPos] == MSG_CHAR_PRINT_FUNCTION && + msg_drawState->printBuffer[dbPos + 1] == MSG_PRINT_FUNC_ANIM_DONE) { + if (msg_drawState->printBuffer[dbPos + 2] == animIdx) { + dbPos++; + break; + } + } + } + } + dbPos++; + } + msg_drawState->drawBufferPos = dbPos; + + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos]) { + case MSG_PRINT_FUNC_ANIM_DELAY: + if (printer->animTimers[animIdx] == 0) { + if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == 0) { + printer->animTimers[animIdx] = -2; + } else { + printer->animTimers[animIdx] = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3]; + } + } + msg_drawState->drawBufferPos += 4; + break; + case MSG_PRINT_FUNC_ANIM_LOOP: + msg_drawState->drawBufferPos += 3; + break; + case MSG_PRINT_FUNC_ANIM_DONE: + msg_drawState->drawBufferPos += 2; + break; + } + break; + case MSG_PRINT_FUNC_ANIM_LOOP: + msg_drawState->drawBufferPos += 3; + break; + case MSG_PRINT_FUNC_ANIM_DONE: + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_CURSOR: + printer->cursorPosX[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]] = msg_drawState->textStartPos[0] + + msg_drawState->nextPos[0] - additionalOffsetX - 6; + printer->cursorPosY[msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]] = msg_drawState->textStartPos[1] + + msg_drawState->nextPos[1] - additionalOffsetY - 1; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_OPTION: + if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == 0xFF) { + msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_20; + } else { + msg_drawState->unk_2D = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_20; + msg_drawState->nextPos[0] += 14; + } + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_SET_FRAME_PALETTE: + msg_drawState->framePalette = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_RESET_GFX: + msg_reset_gfx_state(); + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_SAVE_POS: + msg_drawState->savedPos[0] = msg_drawState->nextPos[0]; + msg_drawState->savedPos[1] = msg_drawState->nextPos[1]; + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_RESTORE_POS: + msg_drawState->nextPos[0] = msg_drawState->savedPos[0]; + msg_drawState->nextPos[1] = msg_drawState->savedPos[1]; + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_SAVE_COLOR: + msg_drawState->savedColor = msg_drawState->textColor; + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_RESTORE_COLOR: + msg_drawState->textColor = msg_drawState->savedColor; + msg_drawState->drawBufferPos++; + break; + case MSG_PRINT_FUNC_START_FX: + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { + case MSG_FX_SHAKE: + msg_drawState->effectFlags |= MSG_FX_FLAG_SHAKE; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_WAVE: + msg_drawState->effectFlags |= MSG_FX_FLAG_WAVE; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_NOISE_OUTLINE: + msg_drawState->effectFlags |= MSG_FX_FLAG_NOISE_OUTLINE; + gDPSetCombineMode(gMainGfxPos++, PM_CC_MSG_NOISE_OUTLINE, PM_CC_MSG_NOISE_OUTLINE); + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_STATIC: + msg_drawState->effectFlags |= MSG_FX_FLAG_STATIC; + gDPSetEnvColor(gMainGfxPos++, + msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], + msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], + msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2], + 0); + gDPSetCombineMode(gMainGfxPos++, PM_CC_MSG_STATIC, PM_CC_MSG_STATIC); + msg_drawState->drawBufferPos += 3; + break; + case MSG_FX_BLUR: + msg_drawState->effectFlags |= MSG_FX_FLAG_BLUR; + spB8 = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; + msg_drawState->drawBufferPos += 3; + break; + case MSG_FX_RAINBOW: + msg_drawState->effectFlags |= MSG_FX_FLAG_RAINBOW; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_DITHER_FADE: + msg_drawState->effectFlags |= MSG_FX_FLAG_DITHER_FADE; + spB6 = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2]; + msg_drawState->drawBufferPos += 3; + break; + case MSG_FX_GLOBAL_WAVE: + msg_drawState->effectFlags |= MSG_FX_FLAG_GLOBAL_WAVE; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_GLOBAL_RAINBOW: + msg_drawState->effectFlags |= MSG_FX_FLAG_GLOBAL_RAINBOW; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_RISE_PRINT: + msg_drawState->effectFlags |= MSG_FX_FLAG_RISE_PRINT; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_GROW_PRINT: + msg_drawState->effectFlags |= MSG_FX_FLAG_GROW_PRINT; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_SIZE_JITTER: + msg_drawState->effectFlags |= MSG_FX_FLAG_SIZE_JITTER; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_SIZE_WAVE: + msg_drawState->effectFlags |= MSG_FX_FLAG_SIZE_WAVE; + msg_drawState->drawBufferPos += 2; + break; + case MSG_FX_DROP_SHADOW: + msg_drawState->effectFlags |= MSG_FX_FLAG_DROP_SHADOW; + msg_drawState->drawBufferPos += 2; + break; + } + break; + case MSG_PRINT_FUNC_END_FX: + switch (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]) { + case MSG_FX_SHAKE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_SHAKE; + break; + case MSG_FX_WAVE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_WAVE; + break; + case MSG_FX_NOISE_OUTLINE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_NOISE_OUTLINE; + break; + case MSG_FX_STATIC: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_STATIC; + break; + case MSG_FX_BLUR: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_BLUR; + break; + case MSG_FX_RAINBOW: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_RAINBOW; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + break; + case MSG_FX_DITHER_FADE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_DITHER_FADE; + break; + case MSG_FX_GLOBAL_WAVE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_WAVE; + break; + case MSG_FX_GLOBAL_RAINBOW: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_RAINBOW; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + break; + case MSG_FX_RISE_PRINT: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_RISE_PRINT; + break; + case MSG_FX_GROW_PRINT: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_GROW_PRINT; + break; + case MSG_FX_SIZE_JITTER: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_SIZE_JITTER; + break; + case MSG_FX_SIZE_WAVE: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_SIZE_WAVE; + break; + case MSG_FX_DROP_SHADOW: + msg_drawState->effectFlags &= ~MSG_FX_FLAG_DROP_SHADOW; + break; + } + msg_drawState->drawBufferPos += 2; + break; + case MSG_PRINT_FUNC_CENTER_X: + if (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != 0) { + msg_drawState->centerPos = msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1]; + if (msg_drawState->centerPos == 0xFF) { + msg_drawState->centerPos = printer->windowSize.x / 2; + } + msg_drawState->printModeFlags |= (MSG_PRINT_FLAG_40 | MSG_PRINT_FLAG_80); + } else { + msg_drawState->nextPos[0] = 0; + msg_drawState->printModeFlags &= ~(MSG_PRINT_FLAG_40 | MSG_PRINT_FLAG_80); + } + msg_drawState->drawBufferPos += 2; + break; + } + break; + default: + if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) { + sp96 = 0xFF; + gDPPipeSync(gMainGfxPos++); + gSPDisplayList(gMainGfxPos++, D_8014C500); + } + msg_drawState->charScale.x = msg_drawState->msgScale.x; + msg_drawState->charScale.y = msg_drawState->msgScale.y; + if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_80) { + msg_drawState->nextPos[0] += msg_drawState->centerPos - printer->msgWidth / 2; + msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_80; + } + if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_40) { + charPosX = msg_drawState->nextPos[0] + (printer->windowBasePos.x + posX); + } else { + charPosX = msg_drawState->nextPos[0] + (msg_drawState->textStartPos[0] + (printer->windowBasePos.x + + posX)); + } + + baseOffsetY = msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY)); + msgCharset = MsgCharsets[msg_drawState->font]; + rasterOffsetY = msgCharset->rasters[msg_drawState->fontVariant].baseHeightOffset; + charPosY = rasterOffsetY + (baseOffsetY - additionalOffsetY); + + if ((sp8E != 0) && + (charPosX < msg_drawState->clipX[1]) && + (charPosY < msg_drawState->clipY[1]) && + (msg_drawState->clipX[0] < charPosX + (s32)(msg_drawState->msgScale.x * + msgCharset->rasters[msg_drawState->fontVariant].monospaceWidth)) && + (msg_drawState->clipY[0] < charPosY + (s32)(msg_drawState->msgScale.y * msgCharset->newLineY +#if !VERSION_JP + + MsgStyleVerticalLineOffsets[printer->style] +#endif + ))) { + palette = msg_drawState->textColor; + phi_s2_5 = sp8E; + if (msg_drawState->effectFlags & MSG_FX_FLAG_BLUR) { + phi_s2_5 = (f32) phi_s2_5 * 0.35; + } + if ((printer->windowState == MSG_WINDOW_STATE_WAITING_FOR_CHOICE) && (msg_drawState->printModeFlags & MSG_PRINT_FLAG_20)) { + if (msg_drawState->unk_2D == printer->curOption) { + msg_drawState->effectFlags |= MSG_FX_FLAG_DROP_SHADOW | MSG_FX_FLAG_GLOBAL_RAINBOW | MSG_FX_FLAG_GLOBAL_WAVE; + } else { + msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_RAINBOW; + msg_drawState->effectFlags &= ~MSG_FX_FLAG_GLOBAL_WAVE; + msg_drawState->effectFlags &= ~MSG_FX_FLAG_DROP_SHADOW; + palette = msg_drawState->textColor; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + } + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_SHAKE) { + charPosX += rand_int(10000) % 2; + charPosY += rand_int(10000) % 2; + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_WAVE) { + temp_f2_3 = msg_drawState->msgScale.x - 1.0; + temp_s0_7 = (printer->effectFrameCounter * (s32)(20.0 - (temp_f2_3 * 5.0))) - (msg_drawState->visiblePrintedCount * + (s32)(45.0 - (temp_f2_3 * 15.0))); + charPosX += cosine(temp_s0_7) * ((msg_drawState->msgScale.x - 1.0) + 1.6); + charPosY += cosine((temp_s0_7 + 180.0 + 90.0)) * (msg_drawState->msgScale.y - 1.0 + 1.6); + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_GLOBAL_WAVE) { + temp_s0_8 = (gMsgGlobalWaveCounter * (s32)(20.0 - ((msg_drawState->msgScale.x - 1.0) * 5.0))) - + (msg_drawState->visiblePrintedCount * 45); + charPosX += cosine(temp_s0_8) * ((msg_drawState->msgScale.x - 1.0) + 1.6); + charPosY += cosine((temp_s0_8 + 180.0 + 90.0)) * ((msg_drawState->msgScale.y - 1.0) + 1.6); + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_RAINBOW) { + palette = abs(msg_drawState->visiblePrintedCount - (u16)(printer->effectFrameCounter / 3)) % 10; + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_GLOBAL_RAINBOW) { + palette = abs(msg_drawState->visiblePrintedCount - (u16)(gGameStatusPtr->frameCounter / 3)) % 10; + } + if (msg_drawState->effectFlags & MSG_FX_FLAG_DITHER_FADE) { + gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE); + gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER); + phi_s2_5 = spB6 * (phi_s2_5 / 255.0); + } + if ((msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) || (phi_s2_5 != sp96)) { + if ((sp96 < 0xFF) && (phi_s2_5 < 0xFF)) { + gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, phi_s2_5); + } else if ((sp96 == 0xFF) && (phi_s2_5 < 0xFF)) { + gDPPipeSync(gMainGfxPos++); + if (printer->stateFlags & MSG_STATE_FLAG_4000) { + gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_CLAMP | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, + G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_CLAMP | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, + G_BL_1MA)); + + } else { + gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, + G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, + G_BL_1MA)); + + } + gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); + gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, phi_s2_5); + } else if ((sp96 < 0xFF) && (phi_s2_5 == 0xFF)) { + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + } + sp96 = phi_s2_5; + } + if (phi_s2_5 > 0) { + if (msg_drawState->effectFlags & MSG_FX_FLAG_RISE_PRINT) { + if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 4] != MSG_CHAR_PRINT_ENDL)) { + if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.7; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.7; + temp_f8 = (msg_drawState->charScale.y / 1.7) * 6.0; + charPosX -= temp_f8; + charPosY -= temp_f8; + } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.4; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.4; + temp_f8 = (msg_drawState->charScale.y / 1.4) * 3.0; + charPosX -= temp_f8; + charPosY -= temp_f8; + } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 1.2; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 1.2; + temp_f8 = (msg_drawState->charScale.y / 1.2) * 2.0; + charPosX -= temp_f8; + charPosY -= temp_f8; + } + } + } else if (msg_drawState->effectFlags & MSG_FX_FLAG_GROW_PRINT) { + if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] != MSG_CHAR_PRINT_ENDL) && + (msg_drawState->printBuffer[msg_drawState->drawBufferPos + 4] != MSG_CHAR_PRINT_ENDL)) { + if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 1] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.3; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.3; + charPosX += 5; + charPosY += 5; + } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 2] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.5; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.5; + charPosX += 3; + charPosY += 3; + } else if ((msg_drawState->printBuffer[msg_drawState->drawBufferPos + 3] == MSG_CHAR_PRINT_END) && + (printer->windowState == MSG_WINDOW_STATE_PRINTING)) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * 0.75; + msg_drawState->charScale.y = msg_drawState->msgScale.y * 0.75; + charPosX += 2; + charPosY += 2; + } + } + } else if (msg_drawState->effectFlags & MSG_FX_FLAG_SIZE_JITTER) { + temp_f8_5 = rand_int(10000) % 101; + temp_f8_5 /= 100.0; + temp_f8_5 = ((temp_f8_5 * 0.5) + 1.0) - 0.25; + + if (temp_f8_5 > 1.0) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; + msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; + charPosX -= (temp_f8_5 * 8.0) - 8.5; + charPosY -= (temp_f8_5 * 8.0) - 8.5; + } else if (temp_f8_5 < 1.0) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; + msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; + charPosX += 8.0 - (temp_f8_5 * 16.0) * 0.5; + charPosY += 8.0 - (temp_f8_5 * 16.0) * 0.5; + } + } else if (msg_drawState->effectFlags & MSG_FX_FLAG_SIZE_WAVE) { + s32 mod360; + + temp_a0_49 = printer->effectFrameCounter * 15; + temp_a0_49 -= msg_drawState->visiblePrintedCount * 15; + mod360 = temp_a0_49 % 360; + temp_f8_5 = (cosine(mod360) * 0.25) + 1.0; + + if (temp_f8_5 > 1.0) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; + msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; + charPosX -= (temp_f8_5 * 8.0) - 8.5; + charPosY -= (temp_f8_5 * 8.0) - 8.5; + } else if (temp_f8_5 < 1.0) { + msg_drawState->charScale.x = msg_drawState->msgScale.x * temp_f8_5; + msg_drawState->charScale.y = msg_drawState->msgScale.y * temp_f8_5; + charPosX += 8.0 - (temp_f8_5 * 16.0) * 0.5; + charPosY += 8.0 - (temp_f8_5 * 16.0) * 0.5; + } + } + + if ((printer->windowState == MSG_WINDOW_STATE_B || printer->windowState == MSG_WINDOW_STATE_C) && + (printer->style == MSG_STYLE_RIGHT || + printer->style == MSG_STYLE_LEFT || + printer->style == MSG_STYLE_CENTER || + printer->style == MSG_STYLE_TATTLE)) + { + switch (palette) { + case MSG_PAL_WHITE: + case MSG_PAL_RED: + case MSG_PAL_10: + case MSG_PAL_11: + case MSG_PAL_12: + case MSG_PAL_13: + case MSG_PAL_14: + break; + case MSG_PAL_STANDARD: + palette = MSG_PAL_40; + break; + case MSG_PAL_20: + palette = MSG_PAL_41; + break; + case MSG_PAL_22: + palette = MSG_PAL_42; + break; + case MSG_PAL_23: + palette = MSG_PAL_43; + break; + case MSG_PAL_25: + palette = MSG_PAL_44; + break; + default: + palette = MSG_PAL_40; + break; + } + } + if (palette != sp9E) { + sp9E = palette; + msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10; + } + if ((msg_drawState->effectFlags & MSG_FX_FLAG_DROP_SHADOW) && (phi_s2_5 == 0xFF)) { + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); + gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, 72); + msg_draw_char(printer, msg_drawState, + msg_drawState->printBuffer[msg_drawState->drawBufferPos], + palette, charPosX + 2, charPosY + 2); + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + } + + if (msg_drawState->effectFlags & MSG_FX_FLAG_BLUR) { + for (i = 0; i < 5; i++) { + phi_s0_7 = charPosX; + phi_s1_8 = charPosY; + if (spB8 != 2) { + phi_s0_7 += (rand_int(10000) % 3) - 1; + } + if (spB8 != 1) { + phi_s1_8 += (rand_int(10000) % 3) - 1; + } + msg_draw_char(printer, msg_drawState, + msg_drawState->printBuffer[msg_drawState->drawBufferPos], palette, + phi_s0_7, phi_s1_8); + } + } else { + msg_draw_char(printer, msg_drawState, + msg_drawState->printBuffer[msg_drawState->drawBufferPos], palette, charPosX, + charPosY); + } + } + } + if (msg_drawState->printModeFlags & MSG_PRINT_FLAG_2) { + msg_drawState->printModeFlags &= ~MSG_PRINT_FLAG_2; + } + msg_drawState->visiblePrintedCount += 1; + msg_drawState->nextPos[0] += + msg_get_draw_char_width(msg_drawState->printBuffer[msg_drawState->drawBufferPos], + msg_drawState->font, msg_drawState->fontVariant, msg_drawState->msgScale.x, + msg_drawState->curPosX, msg_drawState->printModeFlags); + msg_drawState->drawBufferPos++; + break; + } + } + + varImgHasBorder = FALSE; + if (printer->varImageScreenPos.x != 0) { + s16 varImgFinalAlpha; + + varImgFinalAlpha = printer->varImgFinalAlpha; + msgVarImage = &(*gMsgVarImages)[printer->curImageIndex]; + + switch (printer->varImgHasBorder) { + case 0: + case 1: + if (printer->varImgHasBorder) { + varImgHasBorder = TRUE; + } + switch (printer->varImageDisplayState) { + case 0: + printer->varImageFadeTimer++; + varImgFinalAlpha = printer->varImageFadeTimer * printer->varImgAlphaFadeStep; + if (printer->varImgFinalAlpha <= varImgFinalAlpha) { + varImgFinalAlpha = printer->varImgFinalAlpha; + printer->varImageFadeTimer = 0; + printer->varImageDisplayState = 1; + } + break; + case 1: + varImgFinalAlpha = (u8)(((f32) spAE / 255.0) * (f32) printer->varImgFinalAlpha); + break; + case 2: + printer->varImageFadeTimer++; + varImgFinalAlpha = printer->varImgFinalAlpha - printer->varImgAlphaFadeStep * printer->varImageFadeTimer; + if (varImgFinalAlpha < 1) { + printer->varImageScreenPos.x = 0; + } + break; + } + break; + case 2: + varImgFinalAlpha = (u8)(((f32) spAE / 255.0) * (f32) printer->varImgFinalAlpha); + break; + } + + if (varImgFinalAlpha > 0) { + if (varImgHasBorder) { + draw_box(0, WINDOW_STYLE_15, printer->varImageScreenPos.x - 7, printer->varImageScreenPos.y - 7, 0, + msgVarImage->width + 15, msgVarImage->height + 14, varImgFinalAlpha, 0, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + } + draw_ci_image_with_clipping(msgVarImage->raster, msgVarImage->width, msgVarImage->height, + msgVarImage->format, msgVarImage->bitDepth, msgVarImage->palette, + printer->varImageScreenPos.x, printer->varImageScreenPos.y, 0, 0, + SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, varImgFinalAlpha); + } + + } + gDPPipeSync(gMainGfxPos++); + D_80151338 = gMainGfxPos; +} +#endif + +void msg_reset_gfx_state(void) { + gDPPipeSync(gMainGfxPos++); + gSPDisplayList(gMainGfxPos++, D_8014C500); +} + +void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX, s32 posY) { + MessageCharset* messageCharset; + s32 fontVariant; + + s32 clipUly; + s32 clipLry; + s32 clipUlx; + s32 clipLrx; + + s32 rightPosX; + s32 rightPosY; + + f32 clipOffset; + s32 ulx, texOffsetX; + s32 uly, texOffsetY; + s32 lrx, lry; + s32 dsdx, dtdy; + s32 posX2, posY2; + +#if VERSION_IQUE + if (charIndex == MSG_CHAR_ZH_RANK) { + load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[0]); + } else if (charIndex == MSG_CHAR_ZH_CHAPTER) { + load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[1]); + } else if (charIndex >= MSG_CHAR_ZH_START) { + load_font_data(((u8 (*)[128])charset_standard_OFFSET)[charIndex], sizeof(D_801544A0[0]), D_801544A0[D_8014AD24]); + } +#endif + + messageCharset = MsgCharsets[drawState->font]; + fontVariant = drawState->fontVariant; + + clipUly = drawState->clipY[0]; + clipLry = drawState->clipY[1]; + clipUlx = drawState->clipX[0]; + clipLrx = drawState->clipX[1]; + + posX2 = posX; + posY2 = posY; + + rightPosX = posX2 + (s32)(drawState->charScale.x * messageCharset->texSize.x); + rightPosY = posY2 + (s32)(drawState->charScale.y * messageCharset->texSize.y); + + if (posX2 >= clipLrx || posY2 >= clipLry || rightPosX <= clipUlx || rightPosY <= clipUly) { + return; + } + + if (posX2 < clipUlx) { + clipOffset = abs(posX2 - clipUlx) / drawState->charScale.x; + texOffsetX = (f32)((clipOffset + 0.5) * 32.0); + ulx = clipUlx; + } else { + texOffsetX = 0; + ulx = posX2; + } + + if (posY2 < clipUly) { + if (!(printer->stateFlags & MSG_STATE_FLAG_400) || posY2 < 0) { + clipOffset = abs(posY2 - clipUly) / drawState->charScale.y; + texOffsetY = clipOffset * 32.0f; + uly = clipUly; + } else { + texOffsetY = 0; + uly = posY2; + } + } else { + texOffsetY = 0; + uly = posY2; + } + + lrx = rightPosX; + if (lrx >= clipLrx) { + lrx = clipLrx; + } + + lry = rightPosY; + if (lry >= clipLry) { + lry = clipLry; + } + + dsdx = 1.0f / drawState->charScale.x * 1024.0f; + dtdy = 1.0f / drawState->charScale.y * 1024.0f; + + if (drawState->printModeFlags & (MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1)) { + drawState->printModeFlags &= ~(MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1); + gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[palette]); + } + + if (messageCharset->texSize.x >= 16 && messageCharset->texSize.x % 16 == 0) { +#if VERSION_IQUE + 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) { + gDPLoadTextureBlock_4b(gMainGfxPos++, D_801544A0[D_8014AD24], 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 { +#endif + gDPLoadTextureBlock_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, 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); +#if VERSION_IQUE + } +#endif + } else { +#if VERSION_IQUE + 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); + } else if (charIndex >= MSG_CHAR_ZH_START) { + gDPLoadTextureTile_4b(gMainGfxPos++, D_801544A0[D_8014AD24], 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); + } else { +#endif + gDPLoadTextureTile_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, 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); +#if VERSION_IQUE + } +#endif + } + gSPTextureRectangle(gMainGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, G_TX_RENDERTILE, texOffsetX, texOffsetY, + dsdx, dtdy); + +#if VERSION_IQUE + if (charIndex >= MSG_CHAR_ZH_START) { + D_8014AD24 = (D_8014AD24 + 1) % 120; + if (D_8014AD24 == 0) { + D_8014AD24 = 2; + } + } +#endif +} + +void msg_draw_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 posX, u16 posY, u16 sizeX, u16 sizeY) { + u16 lrX = posX + sizeX; + u16 lrY = posY + sizeY; + + appendGfx_msg_prim_rect(r, g, b, a, posX, posY, lrX, lrY); +} + +void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY) { + gDPPipeSync(gMainGfxPos++); + + if (a == 255) { + gDPSetCombineMode(gMainGfxPos++, PM_CC_PRIM_FULL_ALPHA, PM_CC_PRIM_FULL_ALPHA); + } else { + gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + } + + gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a); + gDPFillRectangle(gMainGfxPos++, ulX, ulY, lrX, lrY); + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + + switch (msg_drawState->unk_29) { + case 0: + gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + break; + case 1: + gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM); + break; + default: + gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + break; + } +} + +void msg_draw_speech_bubble( + MessagePrintState* printer, + s16 posX, s16 posY, s16 straightWidth, s16 curveWidth, s16 height, f32 scaleX, f32 scaleY, u8 opacity, s32 arg9) +{ + Matrix4f sp20, sp60; + s16 temp_v0; + s16 temp_v0_2; + s32 negHeight; + + if (opacity == 255 && scaleX == 1.0 && scaleY == 1.0) { + msg_draw_prim_rect(32, 128, 240, 0, posX - 1, posY + 1, curveWidth + (straightWidth + curveWidth) + 2, height - 2); + } + + negHeight = -height; + + gMsgSpeechBoxLQuad[0].v.ob[0] = 1; + gMsgSpeechBoxLQuad[2].v.ob[0] = 1; + gMsgSpeechBoxLQuad[1].v.ob[0] = curveWidth; + gMsgSpeechBoxLQuad[3].v.ob[0] = curveWidth; + gMsgSpeechBoxLQuad[2].v.ob[1] = negHeight; + gMsgSpeechBoxLQuad[3].v.ob[1] = negHeight; + + temp_v0 = curveWidth + straightWidth; + + gMsgSpeechBoxMQuad[0].v.ob[0] = curveWidth; + gMsgSpeechBoxMQuad[2].v.ob[0] = curveWidth; + gMsgSpeechBoxMQuad[1].v.ob[0] = temp_v0; + gMsgSpeechBoxMQuad[3].v.ob[0] = temp_v0; + gMsgSpeechBoxMQuad[2].v.ob[1] = negHeight; + gMsgSpeechBoxMQuad[3].v.ob[1] = negHeight; + + temp_v0_2 = curveWidth + temp_v0; + + gMsgSpeechBoxRQuad[0].v.ob[0] = temp_v0; + gMsgSpeechBoxRQuad[2].v.ob[0] = temp_v0; + gMsgSpeechBoxRQuad[1].v.ob[0] = temp_v0_2; + gMsgSpeechBoxRQuad[3].v.ob[0] = temp_v0_2; + gMsgSpeechBoxRQuad[2].v.ob[1] = negHeight; + gMsgSpeechBoxRQuad[3].v.ob[1] = negHeight; + + guTranslateF(sp20, posX, -posY, 0.0f); + + if (scaleX != 1.0 || scaleY != 1.0) { + guScaleF(sp60, scaleX, scaleY, 1.0f); + guMtxCatF(sp60, sp20, sp20); + } + + guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); + + gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), + G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + gDPPipeSync(gMainGfxPos++); + gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); + gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING); + gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH); + gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); + gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP); + + if (printer->maxLinesPerPage == 3) { + gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); + } else { + gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); + } + + if (opacity >= 255) { + gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), + AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | + GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); + gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + } else { + gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), + IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | + GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); + gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); + gDPSetPrimColor(gMainGfxPos++, 0, 0, 32, 32, 32, opacity); + } + + gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); + gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, + ui_msg_palettes[msg_drawState->framePalette]); + gDPTileSync(gMainGfxPos++); + gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gMainGfxPos++); + gDPLoadTLUTCmd(gMainGfxPos++, G_TX_LOADTILE, 15); + gDPPipeSync(gMainGfxPos++); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_left_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD); + gSPVertex(gMainGfxPos++, gMsgSpeechBoxLQuad, 4, 0); + gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_mid_png, G_IM_FMT_CI, 8, 0, 0, 0, 7, 63, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, 6, G_TX_NOLOD, G_TX_NOLOD); + gSPVertex(gMainGfxPos++, gMsgSpeechBoxMQuad, 4, 0); + gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_bubble_right_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD); + gSPVertex(gMainGfxPos++, gMsgSpeechBoxRQuad, 4, 0); + gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); + gDPPipeSync(gMainGfxPos++); +} + +void msg_draw_speech_arrow(MessagePrintState* printer) { + s16 targetX, targetY; + f32 windowXpart; + s32 arrowLength; + Vtx* quad; + s32 angle; + f32 cosAngle, sinAngle; + Matrix4f sp10; + s16 x1, x2, x3, x4; + s32 y1, y2; + u8 pointRightSide = FALSE; + s16 windowX = printer->windowOffsetPos.x + printer->windowBasePos.x; + s16 windowY = printer->windowOffsetPos.y + printer->windowBasePos.y; + + if (printer->openStartPos.x == 0) { + return; + } + + if (printer->style == MSG_STYLE_RIGHT || + printer->style == MSG_STYLE_LEFT || + printer->style == MSG_STYLE_CENTER || + printer->maxLinesPerPage == 3) { + targetY = windowY + printer->windowSize.y - 4; + } else { + targetY = windowY + printer->windowSize.y - 3; + } + + if (printer->style == MSG_STYLE_LEFT) { + pointRightSide = FALSE; + } else if (printer->style == MSG_STYLE_CENTER || printer->openStartPos.x >= 160) { + pointRightSide = TRUE; + } + + if (pointRightSide) { + targetX = windowX + (f32)printer->windowSize.x * 0.7; + if (printer->openStartPos.x < targetX) { + for (windowXpart = 0.7f; windowXpart >= 0.67; windowXpart -= 0.005) { + targetX = windowX + printer->windowSize.x * windowXpart; + angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); + if (abs(angle) < 45) { + break; + } + } + } + } else { + targetX = windowX + (f32)printer->windowSize.x * 0.3; + if (printer->openStartPos.x > targetX) { + for (windowXpart = 0.3f; windowXpart <= 0.38; windowXpart += 0.005) { + targetX = windowX + printer->windowSize.x * windowXpart; + angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); + if (abs(angle) < 45) { + break; + } + } + } + } + + x1 = targetX - 9; + x2 = targetX + 9; + x3 = targetX; + + arrowLength = dist2D(printer->initOpenPos.x, printer->initOpenPos.y, targetX, targetY); + if (arrowLength < 10) { + return; + } + + if (arrowLength > 25) { + arrowLength = 25; + } + + // alternate quads between frames + if (gCurrentDisplayContextIndex != 0) { + quad = gMsgArrowQuad1; + } else { + quad = gMsgArrowQuad2; + } + + angle = atan2(targetX, targetY, printer->initOpenPos.x, printer->initOpenPos.y); + angle -= 180; + if (abs(angle) >= 75) { + return; + } + + cosAngle = cosine(angle); + sinAngle = cosine(angle + 90); + + x3 = x3 - arrowLength * cosAngle; + x4 = x3 + 1; + + y1 = -targetY; + y2 = -(s16)(targetY + arrowLength * sinAngle); + + quad[0].v.ob[0] = x1; + quad[0].v.ob[1] = y1; + quad[1].v.ob[0] = x2; + quad[1].v.ob[1] = y1; + + quad[2].v.ob[0] = x3; + quad[2].v.ob[1] = y2; + quad[3].v.ob[0] = x4; + quad[3].v.ob[1] = y2; + + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetCombineMode(gMainGfxPos++, PM_CC_0F, PM_CC_0F); + gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); + gDPSetPrimColor(gMainGfxPos++, 0, 0, 32, 32, 32, 255); + gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_arrow_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); + guTranslateF(sp10, 0.0f, 0.0f, 0.0f); + guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); + gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(gMainGfxPos++, quad, 4, 0); + gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); +} + +void msg_draw_frame(s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha) { + s32 i; + s32 frameType; + s32 textures[16]; + u8 r, g, b; + Rect quads[16]; + + if (sizeX < 16 || sizeY < 16) { + return; + } + + if (fading != 0 && bgAlpha == 0 && frameAlpha == 0) { + return; + } + + gDPPipeSync(gMainGfxPos++); + gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); + gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); + gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); + gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); + gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); + gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); + gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); + + if (fading == 0 || bgAlpha != 0) { + do {} while (0); + switch (style) { + case MSG_STYLE_CHOICE: + r = UNPACK_PAL_R(((u16*)ui_msg_palettes)[4]) * 8; + g = UNPACK_PAL_G(((u16*)ui_msg_palettes)[4]) * 8; + b = UNPACK_PAL_B(((u16*)ui_msg_palettes)[4]) * 8; + gDPPipeSync(gMainGfxPos++); + if (fading != 0 && bgAlpha < 255) { + gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); + } else { + gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + } + gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, bgAlpha); + if (posX + sizeX - 8 > 0) { + gDPScisFillRectangle(gMainGfxPos++, posX + 8, posY + 8, posX + sizeX - 8, posY + sizeY - 8); + } + break; + case MSG_STYLE_INSPECT: + gDPPipeSync(gMainGfxPos++); + gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); + gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetCombineMode(gMainGfxPos++, PM_CC_10, PM_CC_10); + if (fading == 0 || bgAlpha == 255) { + gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 216); + } else { + if (bgAlpha > 216) { + bgAlpha = 216; + } + gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, bgAlpha); + } + + gDPLoadTextureBlock_4b(gMainGfxPos++, ui_msg_background_png, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); + if (style == MSG_STYLE_INSPECT) { + gSPScisTextureRectangle(gMainGfxPos++, (posX + 3) * 4, (posY + 3) * 4, (posX + sizeX - 3) * 4, (posY + sizeY - 3) * 4, + G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400); + } else { + gSPScisTextureRectangle(gMainGfxPos++, (posX + 5) * 4, (posY + 5) * 4, (posX + sizeX - 5) * 4, (posY + sizeY - 5) * 4, + G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400); + } + break; + } + } + + if (sizeX >= 32) { + quads[2].ulx = (posX + 16) * 4; + quads[2].uly = posY * 4; + quads[2].lrx = (posX + sizeX - 16) * 4; + quads[2].lry = (posY + 8) * 4; + + quads[13].ulx = (posX + 16) * 4; + quads[13].uly = (posY + sizeY - 8) * 4; + quads[13].lrx = (posX + sizeX - 16) * 4; + quads[13].lry = (posY + sizeY) * 4; + } else if (sizeX > 16 && sizeX < 24) { + quads[2].ulx = (posX + 8) * 4; + quads[2].uly = posY * 4; + quads[2].lrx = (posX + sizeX - 8) * 4; + quads[2].lry = (posY + 8) * 4; + + quads[13].ulx = (posX + 8) * 4; + quads[13].uly = (posY + sizeY - 8) * 4; + quads[13].lrx = (posX + sizeX - 8) * 4; + quads[13].lry = (posY + sizeY) * 4; + } else { + quads[2].ulx = 10000; + quads[13].ulx = 10000; + } + + if (sizeY >= 32) { + quads[7].ulx = posX * 4; + quads[7].uly = (posY + 16) * 4; + quads[7].lrx = (posX + 8) * 4; + quads[7].lry = (posY + sizeY - 16) * 4; + + quads[8].ulx = (posX + sizeX - 8) * 4; + quads[8].uly = (posY + 16) * 4; + quads[8].lrx = (posX + sizeX) * 4; + quads[8].lry = (posY + sizeY - 16) * 4; + } else if (sizeY > 16 && sizeY < 24) { + quads[7].ulx = posX * 4; + quads[7].uly = (posY + 8) * 4; + quads[7].lrx = (posX + 8) * 4; + quads[7].lry = (posY + sizeY - 8) * 4; + + quads[8].ulx = (posX + sizeX - 8) * 4; + quads[8].uly = (posY + 8) * 4; + quads[8].lrx = (posX + sizeX) * 4; + quads[8].lry = (posY + sizeY - 8) * 4; + } else { + quads[7].ulx = 10000; + quads[8].ulx = 10000; + } + + if (sizeX >= 24) { + quads[1].ulx = (posX + 8) * 4; + quads[1].uly = posY * 4; + quads[1].lrx = (posX + 16) * 4; + quads[1].lry = (posY + 8) * 4; + + quads[3].ulx = (posX + sizeX - 16) * 4; + quads[3].uly = posY * 4; + quads[3].lrx = (posX + sizeX - 8) * 4; + quads[3].lry = (posY + 8) * 4; + + quads[12].ulx = (posX + 8) * 4; + quads[12].uly = (posY + sizeY - 8) * 4; + quads[12].lrx = (posX + 16) * 4; + quads[12].lry = (posY + sizeY) * 4; + + quads[14].ulx = (posX + sizeX - 16) * 4; + quads[14].uly = (posY + sizeY - 8) * 4; + quads[14].lrx = (posX + sizeX - 8) * 4; + quads[14].lry = (posY + sizeY) * 4; + } else { + quads[1].ulx = 10000; + quads[3].ulx = 10000; + quads[12].ulx = 10000; + quads[14].ulx = 10000; + } + + if (sizeY >= 24) { + quads[5].ulx = posX * 4; + quads[5].uly = (posY + 8) * 4; + quads[5].lrx = (posX + 8) * 4; + quads[5].lry = (posY + 16) * 4; + + quads[6].ulx = (posX + sizeX - 8) * 4; + quads[6].uly = (posY + 8) * 4; + quads[6].lrx = (posX + sizeX) * 4; + quads[6].lry = (posY + 16) * 4; + + quads[9].ulx = posX * 4; + quads[9].uly = (posY + sizeY - 16) * 4; + quads[9].lrx = (posX + 8) * 4; + quads[9].lry = (posY + sizeY - 8) * 4; + + quads[10].ulx = (posX + sizeX - 8) * 4; + quads[10].uly = (posY + sizeY - 16) * 4; + quads[10].lrx = (posX + sizeX) * 4; + quads[10].lry = (posY + sizeY - 8) * 4; + } else { + quads[5].ulx = 10000; + quads[6].ulx = 10000; + quads[9].ulx = 10000; + quads[10].ulx = 10000; + } + + quads[0].ulx = posX * 4; + quads[0].uly = posY * 4; + quads[0].lrx = (posX + 8) * 4; + quads[0].lry = (posY + 8) * 4; + + quads[4].ulx = (posX + sizeX - 8) * 4; + quads[4].uly = posY * 4; + quads[4].lrx = (posX + sizeX) * 4; + quads[4].lry = (posY + 8) * 4; + + quads[11].ulx = posX * 4; + quads[11].uly = (posY + sizeY - 8) * 4; + quads[11].lrx = (posX + 8) * 4; + quads[11].lry = (posY + sizeY) * 4; + + quads[15].ulx = (posX + sizeX - 8) * 4; + quads[15].uly = (posY + sizeY - 8) * 4; + quads[15].lrx = (posX + sizeX) * 4; + quads[15].lry = (posY + sizeY) * 4; + + switch (style) { + case MSG_STYLE_CHOICE: + frameType = 0; + break; + case MSG_STYLE_INSPECT: + frameType = 1; + break; + default: + frameType = 0; + break; + } + + for (i = 0; i < ARRAY_COUNT(textures); i++) { + textures[i] = gMessageBoxFrameParts[frameType][i]; + } + + if (fading == 0) { + frameAlpha = 255; + } + + gDPPipeSync(gMainGfxPos++); + gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02); + gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, frameAlpha); + gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); + gDPLoadTLUT_pal16(gMainGfxPos++, 0, ui_msg_palettes[palette]); + + for (i = 0; i < ARRAY_COUNT(textures); i++) { + if (textures[i] != NULL && quads[i].ulx < 10000) { + gDPLoadTextureTile_4b(gMainGfxPos++, textures[i], G_IM_FMT_CI, 8, 8, 0, 0, 7, 7, 0, G_TX_WRAP, G_TX_WRAP, 3, 3, G_TX_NOLOD, G_TX_NOLOD); + gSPScisTextureRectangle(gMainGfxPos++, quads[i].ulx, quads[i].uly, quads[i].lrx, quads[i].lry, + G_TX_RENDERTILE, 0, 0, 0x400, 0x400); + } + } + + gDPPipeSync(gMainGfxPos++); + gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); +} + +void msg_get_glyph(s32 font, s32 variation, s32 charIndex, s32 palette, MesasgeFontGlyphData* out) { + out->raster = &MsgCharsets[font]->rasters[variation].raster[(u16)MsgCharsets[font]->charRasterSize * charIndex]; + out->palette = D_802F4560[palette]; + out->texSize.x = MsgCharsets[font]->texSize.x; + out->texSize.y = MsgCharsets[font]->texSize.y; + out->charWidth = msg_get_draw_char_width(charIndex, font, variation, 1.0f, 0, 0); + out->charHeight = out->texSize.y; +} diff --git a/src/msg_img.c b/src/msg_img.c index 308e29dcfd..e78ba314ed 100644 --- a/src/msg_img.c +++ b/src/msg_img.c @@ -76,6 +76,17 @@ INCLUDE_PAL("ui/msg/rewind_arrow.pal", ui_msg_rewind_arrow_pal); INCLUDE_IMG("ui/msg/star.png", ui_msg_star_png); INCLUDE_IMG("ui/msg/star_silhouette.png", ui_msg_star_silhouette_png); +#if VERSION_JP +BSS IMG_BIN MsgCharImgMenuLatin[0x798] ALIGNED(16); +BSS IMG_BIN MsgCharImgMenuKana[0x37F8] ALIGNED(16); +// in JP button icons uses this, which has smaller size to store the credits subtitle character set. What's going on here? +BSS IMG_BIN MsgCharImgSubtitle[0x460] ALIGNED(16); +BSS IMG_BIN MsgCharImgKana[0x5710] ALIGNED(16); +BSS PAL_BIN D_802F4560[80][8]; +BSS IMG_BIN MsgCharImgLatin[0xBD0] ALIGNED(16); +// in JP kanji chars also uses this +BSS IMG_BIN MsgCharImgTitle[0x34F0] ALIGNED(16); +#else BSS IMG_BIN MsgCharImgTitle[0xF60]; BSS IMG_BIN MsgCharImgNormal[0x5100]; BSS IMG_BIN MsgCharImgSubtitle[0xB88]; @@ -84,5 +95,6 @@ BSS PAL_BIN D_802F4560[80][8] ALIGNED(16) #endif ; +#endif MATCHING_BSS(0x6DA0); diff --git a/src/os/initialize.c b/src/os/initialize.c index 1716ce26af..b00bcd4568 100644 --- a/src/os/initialize.c +++ b/src/os/initialize.c @@ -41,12 +41,6 @@ u32 __kmc_pt_mode; void* __printfunc = NULL; #endif -#if !VERSION_IQUE -s32 D_80095904[3] = { 0 }; // padding? -s32 D_80095910[10] = { 0 }; -s32 D_80095938[2] = { 0 }; -#endif - void __createSpeedParam(void) { __Dom1SpeedParam.type = DEVICE_TYPE_INIT; __Dom1SpeedParam.latency = IO_READ(PI_BSD_DOM1_LAT_REG); diff --git a/tools/splat_ext/msg_jp.yaml b/tools/splat_ext/msg_jp.yaml index 76755779f2..70f7e30493 100644 --- a/tools/splat_ext/msg_jp.yaml +++ b/tools/splat_ext/msg_jp.yaml @@ -1,6 +1,12 @@ # This file describes what to name messages when splitting. - [0x00, 0x0000, NONE] +- [0x20, 0x0000, Menus_Tutorial_SaveBlock] +- [0x20, 0x0001, Menus_Tutorial_HeartBlock] +- [0x20, 0x0002, Menus_Tutorial_GotItem] +- [0x20, 0x0003, Menus_Tutorial_GotStarPiece] +- [0x20, 0x0004, Menus_SavePrompt] +- [0x20, 0x0005, Menus_SaveComplete] - [0x20, 0x000E, Menus_Party_Goombario] - [0x20, 0x000F, Menus_Party_Kooper] - [0x20, 0x0010, Menus_Party_Bombette] @@ -34,15 +40,55 @@ - [0x20, 0x002E, Menus_StarPowerDesc_UpAndAway] - [0x20, 0x002F, Menus_StarPowerDesc_StarBeam] - [0x20, 0x0030, Menus_StarPowerDesc_PeachBeam] +- [0x20, 0x004D, Menus_PartyMember] +- [0x20, 0x004F, Menus_JP_004F] # duplicate of Menus_Items +- [0x20, 0x0050, Menus_KeyItems] +- [0x20, 0x0051, Menus_DoubleDip] +- [0x20, 0x0052, Menus_TripleDip] - [0x20, 0x0069, Menus_Jump] - [0x20, 0x006A, Menus_Hammer] - [0x20, 0x006B, Menus_Items] +- [0x20, 0x006C, Menus_0058] +- [0x20, 0x006D, Menus_0059] +- [0x20, 0x006E, Menus_005A] +- [0x20, 0x006F, Menus_005B] +- [0x20, 0x0070, Menus_005C] +- [0x20, 0x0071, Menus_005D] +- [0x20, 0x0072, Menus_005E] +- [0x20, 0x0073, Menus_005F] +- [0x20, 0x0074, Menus_0060] +- [0x20, 0x0075, Menus_0061] +- [0x20, 0x0076, Menus_0062] +- [0x20, 0x0077, Menus_0063] +- [0x20, 0x0078, Menus_0064] +- [0x20, 0x0079, Menus_0065] +- [0x20, 0x007A, Menus_0066] +- [0x20, 0x007B, Menus_0067] +- [0x20, 0x007C, Menus_0068] +- [0x20, 0x007D, Menus_0069] +- [0x20, 0x007E, Menus_0070] +- [0x20, 0x007F, Menus_006A] +- [0x20, 0x0080, Menus_006B] +- [0x20, 0x0081, Menus_JP_0081] # duplicate of Menus_006D +- [0x20, 0x0082, Menus_006C] +- [0x20, 0x0083, Menus_006D] +- [0x20, 0x0084, Menus_006E] +- [0x20, 0x0085, Menus_006F] - [0x20, 0x0089, Menus_Merlee_IncreaseCoins] - [0x20, 0x008A, Menus_Merlee_Exhausted] - [0x20, 0x00BB, Menus_Action_UseItem] - [0x20, 0x00C4, Menus_PlayerFirstStrike] - [0x20, 0x00C5, Menus_PartnerFirstStrike] - [0x20, 0x00C6, Menus_EnemyFirstStrike] +- [0x20, 0x00E7, Menus_00CD] +- [0x20, 0x00E8, Menus_00CE] +- [0x20, 0x00EA, Menus_00D0] +- [0x20, 0x00F0, Menus_00D6] +- [0x20, 0x00F1, Menus_00D7] +- [0x21, 0x000A, Choice_000A] +- [0x21, 0x001D, Choice_001D] +- [0x22, 0x0001, MenuTip_0032] +- [0x22, 0x0014, MenuTip_0033] - [0x28, 0x0000, ItemShortDesc_FireFlower] - [0x28, 0x0001, ItemShortDesc_SnowmanDoll] - [0x28, 0x0002, ItemShortDesc_ThunderRage] diff --git a/tools/splat_ext/pm_charset.py b/tools/splat_ext/pm_charset.py index ae6fff39ee..60de269c5f 100644 --- a/tools/splat_ext/pm_charset.py +++ b/tools/splat_ext/pm_charset.py @@ -36,6 +36,27 @@ def get_palette_idx(charset_name, char_id): pal_id = 0x13 elif char_id == 0xA1: pal_id = 0x12 + elif charset_name == "buttons": + if char_id == 0x00: + pal_id = 0x10 + elif char_id == 0x01: + pal_id = 0x11 + elif char_id == 0x02: + pal_id = 0x12 + elif char_id == 0x03: + pal_id = 0x13 + elif char_id == 0x04: + pal_id = 0x13 + elif char_id == 0x05: + pal_id = 0x13 + elif char_id == 0x06: + pal_id = 0x13 + elif char_id == 0x07: + pal_id = 0x14 + elif char_id == 0x08: + pal_id = 0x14 + elif char_id == 0x09: + pal_id = 0x14 return pal_id @@ -43,14 +64,18 @@ class N64SegPm_charset(N64Segment): def scan(self, rom_bytes): data = rom_bytes[self.rom_start : self.rom_end] - # start, type, name, WIDTH, HEIGHT, NUM_RASTERS + # start, type, name, WIDTH, HEIGHT, NUM_RASTERS, palette self.width = self.yaml[3] self.height = self.yaml[4] + if len(self.yaml) > 6: + self.palette = self.yaml[6] + else: + self.palette = self.name # pm_charset_palettes sibling self.sibling = next( filter( - lambda s: s.type == "pm_charset_palettes" and s.name == self.name, + lambda s: s.type == "pm_charset_palettes" and s.name == self.palette, self.parent.subsegments, ) ) diff --git a/tools/splat_ext/pm_charset_palettes.py b/tools/splat_ext/pm_charset_palettes.py index 208b801479..aa4847b439 100644 --- a/tools/splat_ext/pm_charset_palettes.py +++ b/tools/splat_ext/pm_charset_palettes.py @@ -20,13 +20,16 @@ class N64SegPm_charset_palettes(N64Segment): def scan(self, rom_bytes): data = rom_bytes[self.rom_start : self.rom_end] - # pm_charset sibling - self.sibling = next( - filter( - lambda s: s.type == "pm_charset" and s.name == self.name, - self.parent.subsegments, - ) - ) + # pm_charset siblings + self.siblings = [] + for s in self.parent.subsegments: + if s.type == "pm_charset": + if len(s.yaml) > 6: + charset_pal = s.yaml[6] + else: + charset_pal = s.name + if self.name == charset_pal: + self.siblings.append(s) self.palettes = [] @@ -39,9 +42,9 @@ class N64SegPm_charset_palettes(N64Segment): fs_dir.mkdir(parents=True, exist_ok=True) for i, palette in enumerate(self.palettes): - raster = self.sibling.rasters[0] + raster = self.siblings[0].rasters[0] - w = png.Writer(self.sibling.width, self.sibling.height, palette=palette) + w = png.Writer(self.siblings[0].width, self.siblings[0].height, palette=palette) with open(fs_dir / f"{i:02X}.png", "wb") as f: w.write_array(f, raster) diff --git a/ver/ique/asm/nonmatchings/msg/appendGfx_message.s b/ver/ique/asm/nonmatchings/msg_draw/appendGfx_message.s similarity index 100% rename from ver/ique/asm/nonmatchings/msg/appendGfx_message.s rename to ver/ique/asm/nonmatchings/msg_draw/appendGfx_message.s diff --git a/ver/ique/asm/os/exceptasm.s b/ver/ique/asm/os/exceptasm.s index 92c06a6b85..2eec30a6db 100644 --- a/ver/ique/asm/os/exceptasm.s +++ b/ver/ique/asm/os/exceptasm.s @@ -7,7 +7,7 @@ .section .rodata -glabel __osIntOffTable +__osIntOffTable: /* 73CB0 800988B0 */ .byte 0x00 /* 73CB1 800988B1 */ .byte 0x14 /* 73CB2 800988B2 */ .byte 0x18 @@ -42,7 +42,7 @@ glabel __osIntOffTable /* 73CCF 800988CF */ .byte 0x10 .size __osIntOffTable, . - __osIntOffTable -glabel __osIntTable +__osIntTable: /* 73CD0 800988D0 80066894 */ .word .LIQUE_80066894 /* 73CD4 800988D4 80066858 */ .word .LIQUE_80066858 /* 73CD8 800988D8 80066834 */ .word .LIQUE_80066834 @@ -59,7 +59,7 @@ glabel __osIntTable .section .data -glabel __osHwIntTable +__osHwIntTable: /* 6F8F0 800944F0 */ .word 0x00000000 /* 6F8F4 800944F4 */ .word 0x00000000 /* 6F8F8 800944F8 */ .word 0x00000000 @@ -72,7 +72,7 @@ glabel __osHwIntTable /* 6F914 80094514 */ .word 0x00000000 .size __osHwIntTable, . - __osHwIntTable -glabel __osPiIntTable +__osPiIntTable: /* 6F918 80094518 */ .word 0x00000000 /* 6F91C 8009451C */ .word 0x00000000 .size __osPiIntTable, . - __osPiIntTable diff --git a/ver/ique/splat.yaml b/ver/ique/splat.yaml index 2a84fe628a..94b223d2a8 100644 --- a/ver/ique/splat.yaml +++ b/ver/ique/splat.yaml @@ -843,6 +843,7 @@ segments: - [auto, c, entity_model] - [auto, c, worker] - [auto, c, msg] + - [auto, c, msg_draw] - [auto, c, draw_img_util] - [auto, c, item_entity] - [auto, c, screen_overlays] @@ -863,6 +864,7 @@ segments: - [auto, .data, animator] - [auto, .data, entity_model] - [auto, .data, msg] + - [auto, .data, msg_draw] - [auto, .data, draw_img_util] - [auto, .data, item_entity] - start: 0xE1D60 diff --git a/ver/jp/asm/bss3.s b/ver/jp/asm/bss3.s new file mode 100644 index 0000000000..88b0988287 --- /dev/null +++ b/ver/jp/asm/bss3.s @@ -0,0 +1,682 @@ +.include "macro.inc" + +# assembler directives +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches +.set gp=64 # allow use of 64-bit general purpose registers + +#ifndef SHIFT + +.section .bss + +dlabel gAuxSpriteShadingProfile +.space 4 + +dlabel gHudElementsNumber +.space 4 + +dlabel gCurrentCustomModelGfxBuildersPtr +.space 4 + +dlabel D_801512BC +.space 4 + +dlabel entity_numEntities +.space 4 + +dlabel gEntityHeapBase +.space 4 + +dlabel gHudElementCacheTableRaster +.space 4 + +dlabel gCurrentModels +.space 4 + +dlabel gHudElementCacheTablePalette +.space 4 + +dlabel gAnimCount +.space 4 + +dlabel gMsgBGScrollAmtX +.space 4 + +dlabel D_801512DC +.space 4 + +dlabel gCurrentTransformGroups +.space 4 + +dlabel gMsgGlobalWaveCounter +.space 4 + +dlabel gCurrentCustomModelGfxPtr +.space 4 + +dlabel gLastCreatedEntityIndex +.space 4 + +dlabel gBackgroundTintModePtr +.space 4 + +dlabel gMsgVarImages +.space 4 + +dlabel ItemEntitiesCreated +.space 4 + +dlabel gCurrentModelTreeRoot +.space 4 + +dlabel gEntityHeapBottom +.space 4 + +dlabel D_80151304 +.space 4 + +dlabel gCurrentRoomDoorSounds +.space 4 + +dlabel gMsgBGScrollAmtY +.space 2 + +dlabel D_8015130E +.space 2 + +dlabel gEntityHideMode +.space 4 + +dlabel gHudElementCacheBuffer +.space 4 + +dlabel gEntityModelCount +.space 4 + +dlabel D_8015131C +.space 4 + +dlabel D_80151320 +.space 4 + +dlabel entity_numShadows +.space 4 + +dlabel gSpriteShadingProfile +.space 4 + +dlabel isAreaSpecificEntityDataLoaded +.space 4 + +dlabel entity_updateCounter +.space 4 + +dlabel gTriggerCount +.space 4 + +dlabel D_80151338 +.space 4 + +dlabel gHudElementCacheSize +.space 4 + +dlabel gCurrentDoorSounds +.space 4 + +dlabel D_80151344 +.space 4 + +dlabel D_80151348 +.space 0x00000018 + +dlabel gWorldEntityList +.space 0x00000078 + +dlabel gBattleEntityList +.space 0x00000078 + +dlabel gCurrentEntityListPtr +.space 4 + +dlabel D_80151474 +.space 4 + +dlabel gWorldShadowList +.space 0x000000f0 + +dlabel gBattleShadowList +.space 0x000000f0 + +dlabel gCurrentShadowListPtr +.space 4 + +dlabel wEntityDataLoadedSize +.space 4 + +dlabel bEntityDataLoadedSize +.space 4 + +dlabel D_80151664 +.space 4 + +dlabel wEntityBlueprint +.space 0x00000078 + +.space 8 + +dlabel bEntityBlueprint +.space 0x00000014 + +dlabel D_801516FC +.space 4 + +dlabel gMainGameMode +.space 0x00000040 + +dlabel gCurrentTextureHeader +.space 0x00000030 + +dlabel wModelList +.space 0x00000400 + +dlabel bModelList +.space 0x00000400 + +dlabel wTransformGroups +.space 0x00000010 + +dlabel bTransformGroups +.space 0x00000010 + +dlabel wCustomModelGfx +.space 0x00000080 + +dlabel bCustomModelGfx +.space 0x00000080 + +dlabel wCustomModelGfxBuilders +.space 0x00000080 + +dlabel bCustomModelGfxBuilders +.space 0x00000080 + +dlabel wModelLocalVtxBuffers +.space 0x00000040 + +dlabel bModelLocalVtxBuffers +.space 0x00000040 + +dlabel gCurrentModelLocalVtxBuffers +.space 4 + +dlabel wModelTreeRoot +.space 4 + +dlabel bModelTreeRoot +.space 4 + +dlabel D_8015221C +.space 4 + +dlabel wModelTreeNodeInfo +.space 0x00000800 + +dlabel bModelTreeNodeInfo +.space 0x00000800 + +dlabel wBackgroundTintMode +.space 1 + +dlabel bBackgroundTintMode +.space 1 + +dlabel D_80153222 +.space 1 + +dlabel D_80153223 +.space 1 + +dlabel TreeIterPos +.space 4 + +dlabel wFogSettings +.space 0x00000020 + +dlabel bFogSettings +.space 0x0000001c + +dlabel gFogSettings +.space 4 + +dlabel texPannerMainU +.space 0x00000040 + +dlabel texPannerMainV +.space 0x00000040 + +dlabel texPannerAuxU +.space 0x00000040 + +dlabel texPannerAuxV +.space 0x00000040 + +dlabel TextureHeapPos +.space 4 + +dlabel mtg_IterIdx +.space 2 + +dlabel mtg_SearchModelID +.space 2 + +dlabel mtg_FoundModelNode +.space 4 + +dlabel mtg_MinChild +.space 2 + +dlabel mtg_MaxChild +.space 2 + +dlabel D_80153378 +.space 8 + +dlabel DepthCopyBuffer +.space 0x00000020 + +dlabel RenderTaskLists +.space 0x0000000c + +dlabel RenderTaskListIdx +.space 4 + +dlabel RenderTaskCount +.space 0x00000010 + +dlabel D_801533C0 +.space 0x00000300 + +dlabel D_801536C0 +.space 0x00000300 + +dlabel D_801539C0 +.space 0x00000040 + +dlabel D_80153A00 +.space 0x00000040 + +dlabel gCurrentAnimMeshListPtr +.space 4 + +dlabel gAnimModelFogEnabled +.space 4 + +dlabel gAnimModelFogR +.space 4 + +dlabel gAnimModelFogG +.space 4 + +dlabel gAnimModelFogB +.space 4 + +dlabel gAnimModelFogA +.space 4 + +dlabel gAnimModelFogStart +.space 4 + +dlabel gAnimModelFogEnd +.space 4 + +dlabel gAnimVtxSegment +.space 4 + +dlabel D_80153A64 +.space 4 + +dlabel gAnimRotMtx +.space 0x00000040 + +dlabel gAnimScaleMtx +.space 0x00000040 + +dlabel gAnimTranslateMtx +.space 0x00000040 + +dlabel gAnimRotScaleMtx +.space 0x00000040 + +dlabel gAnimTreeRoot +.space 8 + +dlabel gWorldEntityModelList +.space 0x00000400 + +dlabel gBattleEntityModelList +.space 0x00000400 + +dlabel gCurrentEntityModelList +.space 4 + +dlabel D_80154374 +.space 4 + +dlabel entity_fog_enabled +.space 4 + +dlabel entity_fog_red +.space 4 + +dlabel entity_fog_green +.space 4 + +dlabel entity_fog_blue +.space 4 + +dlabel entity_fog_alpha +.space 4 + +dlabel entity_fog_dist_min +.space 4 + +dlabel entity_fog_dist_max +.space 4 + +dlabel D_80154394 +.space 0x0000000c + +dlabel gWorldWorkerList +.space 0x00000040 + +dlabel gBattleWorkerList +.space 0x00000040 + +dlabel gCurrentWorkerListPtr +.space 4 + +dlabel D_80154424 +.space 0x0000000c + +dlabel gMessageBuffers +.space 0x00000800 + +dlabel gMessagePrinters +.space 0x00000F40 + +dlabel gMessageMsgVars +.space 0x00000060 + +dlabel D_80155C98 +.space 8 + +dlabel gMessageWindowProjMatrix +.space 0x00000080 + +dlabel D_JP_8015AC98_pad +.space 8 + +dlabel D_80155D20 +.space 4 + +dlabel D_8015DD24 +.space 0x00000050 + +dlabel msg_drawState +.space 4 + +dlabel D_8015DD78 +.space 8 + +dlabel UnusedItemPhysicsScriptID +.space 4 + +dlabel ItemEntityAlternatingSpawn +.space 4 + +dlabel ItemEntityRenderGroup +.space 4 + +dlabel CoinSparkleCenterX +.space 2 + +dlabel CoinSparkleCenterY +.space 2 + +dlabel CoinSparkleCenterZ +.space 2 + +dlabel pad_ItemEntity +.space 0x000000E + +dlabel WorldItemEntities +.space 0x00000400 + +dlabel BattleItemEntities +.space 0x00000400 + +dlabel gCurrentItemEntities +.space 4 + +dlabel isPickingUpItem +.space 2 + +dlabel ItemSpawnWithinPlayerPickupDelay +.space 2 + +dlabel ItemPickupMenu +.space 0x00000330 + +dlabel ItemPickupIconID +.space 4 + +dlabel ItemPickupStateDelay +.space 4 + +dlabel ThrowAwayMenuIdx +.space 4 + +dlabel ThrowAwayItemID +.space 4 + +dlabel ItemPickupGotOutline +.space 4 + +dlabel GotItemTutorialPrinter +.space 4 + +dlabel GotItemTutorialClosed +.space 4 + +dlabel D_801568FC +.space 0xC + +dlabel screen_overlay_frontType +.space 4 + +dlabel screen_overlay_frontZoom +.space 4 + +dlabel screen_overlay_backType +.space 4 + +dlabel screen_overlay_backZoom +.space 4 + +dlabel D_80156910 +.space 0x00000010 + +dlabel ImgFXCurrentTexture +.space 0x00000028 + +dlabel ImgFXVtxBuffers +.space 8 + +dlabel imgfx_vtxBuf +.space 4 + +dlabel ImgFXInstances +.space 4 + +dlabel D_80156958 +.space 8 + +dlabel D_80156960 +.space 8 + +dlabel D_80156968 +.space 8 + +dlabel D_80156970 +.space 0x00000010 + +dlabel ImgFXAnimHeaders +.space 0x000005a0 + +dlabel ImgFXDataCache +.space 0x00000040 + +dlabel gHudElementsWorld +.space 0x00000500 + +dlabel gHudElementsBattle +.space 0x00000500 + +dlabel gHudElements +.space 4 + +dlabel gHudElementCacheBufferWorld +.space 4 + +dlabel gHudElementCacheSizeWorld +.space 4 + +dlabel D_8015796C +.space 4 + +dlabel gHudElementCacheTableRasterWorld +.space 0x00000600 + +dlabel gHudElementCacheTablePaletteWorld +.space 0x00000600 + +dlabel gHudElementCacheBufferBattle +.space 4 + +dlabel gHudElementCacheSizeBattle +.space 4 + +dlabel D_80158578 +.space 8 + +dlabel gHudElementCacheTableRasterBattle +.space 0x00000600 + +dlabel gHudElementCacheTablePaletteBattle +.space 0x00000600 + +dlabel D_80159180 +.space 0x00000010 + +dlabel wTriggerList +.space 0x00000100 + +dlabel bTriggerList +.space 0x00000100 + +dlabel gCurrentTriggerListPtr +.space 4 + +dlabel D_80159394 +.space 0x0000000c + +dlabel gBackgroundPalette +.space 0x00000200 + +dlabel gBackroundLastScrollValue +.space 0x00000020 + +dlabel wSpriteShadingProfile +.space 0x000000b0 + +dlabel bSpriteShadingProfile +.space 0x000000b0 + +dlabel wSpriteShadingProfileAux +.space 0x000000b0 + +dlabel bSpriteShadingProfileAux +.space 0x000000b0 + +dlabel SpriteShadingPalette +.space 0x00000020 + +dlabel wEnvSounds +.space 0x00000118 + +dlabel bEnvSounds +.space 0x00000118 + +dlabel gCurrentEnvSounds +.space 4 + +dlabel SfxReverbMode +.space 4 + +dlabel D_80159AD8 +.space 8 + +dlabel MusicDefaultVolume +.space 2 + +dlabel MusicTargetVolume +.space 2 + +dlabel MusicMaxVolume +.space 2 + +dlabel MusicCurrentVolume +.space 2 + +dlabel D_80159AE8 +.space 8 + +dlabel gMusicSettings +.space 0x00000060 + +dlabel D_80159B50 +.space 0x00000200 + +dlabel gWindows +.space 0x00000800 + +dlabel gCollisionStatus +.space 0x00000028 + +dlabel gCurrentHiddenPanels +.space 0x10 + +.space 8 + +dlabel TextureHandles +.space 0x00002200 + +dlabel ScreenOverlays +.space 0x00000030 + +dlabel AmbientSoundData +.space 0x00000010 + +dlabel CreateEntityVarArgBuffer +.space 0x00000010 + +dlabel D_8015C7E0 +.space 0x20 + +dlabel D_8015C800 +.space 0x2880 + +dlabel D_80164000 +.space 0x32C60 + +#endif diff --git a/ver/jp/asm/data/os/exceptasm.rodata.s b/ver/jp/asm/data/os/exceptasm.rodata.s deleted file mode 100644 index 54e3f97342..0000000000 --- a/ver/jp/asm/data/os/exceptasm.rodata.s +++ /dev/null @@ -1,54 +0,0 @@ -.include "macro.inc" - -.section .rodata - -/* Generated by spimdisasm 1.11.1 */ - -glabel D_JP_80099D60 -/* 75160 80099D60 */ .byte 0x00 -/* 75161 80099D61 */ .byte 0x14 -/* 75162 80099D62 */ .byte 0x18 -/* 75163 80099D63 */ .byte 0x18 -/* 75164 80099D64 */ .byte 0x1C -/* 75165 80099D65 */ .byte 0x1C -/* 75166 80099D66 */ .byte 0x1C -/* 75167 80099D67 */ .byte 0x1C -/* 75168 80099D68 */ .byte 0x20 -/* 75169 80099D69 */ .byte 0x20 -/* 7516A 80099D6A */ .byte 0x20 -/* 7516B 80099D6B */ .byte 0x20 -/* 7516C 80099D6C */ .byte 0x20 -/* 7516D 80099D6D */ .byte 0x20 -/* 7516E 80099D6E */ .byte 0x20 -/* 7516F 80099D6F */ .byte 0x20 -/* 75170 80099D70 */ .byte 0x00 -/* 75171 80099D71 */ .byte 0x04 -/* 75172 80099D72 */ .byte 0x08 -/* 75173 80099D73 */ .byte 0x08 -/* 75174 80099D74 */ .byte 0x0C -/* 75175 80099D75 */ .byte 0x0C -/* 75176 80099D76 */ .byte 0x0C -/* 75177 80099D77 */ .byte 0x0C -/* 75178 80099D78 */ .byte 0x10 -/* 75179 80099D79 */ .byte 0x10 -/* 7517A 80099D7A */ .byte 0x10 -/* 7517B 80099D7B */ .byte 0x10 -/* 7517C 80099D7C */ .byte 0x10 -/* 7517D 80099D7D */ .byte 0x10 -/* 7517E 80099D7E */ .byte 0x10 -/* 7517F 80099D7F */ .byte 0x10 - -.align 3 -glabel jtbl_JP_80099D80 -/* 75180 80099D80 8006AEE0 */ .word .LJP_8006AEE0 -/* 75184 80099D84 8006AEA4 */ .word .LJP_8006AEA4 -/* 75188 80099D88 8006AE80 */ .word .LJP_8006AE80 -/* 7518C 80099D8C 8006ACA8 */ .word .LJP_8006ACA8 -/* 75190 80099D90 8006AC60 */ .word .LJP_8006AC60 -/* 75194 80099D94 8006AE1C */ .word .LJP_8006AE1C -/* 75198 80099D98 8006AC24 */ .word .LJP_8006AC24 -/* 7519C 80099D9C 8006AC30 */ .word .LJP_8006AC30 -/* 751A0 80099DA0 8006AC3C */ .word .LJP_8006AC3C -/* 751A4 80099DA4 00000000 */ .word 0x00000000 -/* 751A8 80099DA8 00000000 */ .word 0x00000000 -/* 751AC 80099DAC 00000000 */ .word 0x00000000 diff --git a/ver/jp/asm/data/os/osSetIntMask.rodata.s b/ver/jp/asm/data/os/osSetIntMask.rodata.s deleted file mode 100644 index 292f8cc9b8..0000000000 --- a/ver/jp/asm/data/os/osSetIntMask.rodata.s +++ /dev/null @@ -1,71 +0,0 @@ -.include "macro.inc" - -.section .rodata - -/* Generated by spimdisasm 1.11.1 */ - -glabel D_80099AA0 -/* 74E80 80099A80 */ .short 0x0555 -/* 74E82 80099A82 */ .short 0x0556 -/* 74E84 80099A84 */ .short 0x0559 -/* 74E86 80099A86 */ .short 0x055A -/* 74E88 80099A88 */ .short 0x0565 -/* 74E8A 80099A8A */ .short 0x0566 -/* 74E8C 80099A8C */ .short 0x0569 -/* 74E8E 80099A8E */ .short 0x056A -/* 74E90 80099A90 */ .short 0x0595 -/* 74E92 80099A92 */ .short 0x0596 -/* 74E94 80099A94 */ .short 0x0599 -/* 74E96 80099A96 */ .short 0x059A -/* 74E98 80099A98 */ .short 0x05A5 -/* 74E9A 80099A9A */ .short 0x05A6 -/* 74E9C 80099A9C */ .short 0x05A9 -/* 74E9E 80099A9E */ .short 0x05AA -/* 74EA0 80099AA0 */ .short 0x0655 -/* 74EA2 80099AA2 */ .short 0x0656 -/* 74EA4 80099AA4 */ .short 0x0659 -/* 74EA6 80099AA6 */ .short 0x065A -/* 74EA8 80099AA8 */ .short 0x0665 -/* 74EAA 80099AAA */ .short 0x0666 -/* 74EAC 80099AAC */ .short 0x0669 -/* 74EAE 80099AAE */ .short 0x066A -/* 74EB0 80099AB0 */ .short 0x0695 -/* 74EB2 80099AB2 */ .short 0x0696 -/* 74EB4 80099AB4 */ .short 0x0699 -/* 74EB6 80099AB6 */ .short 0x069A -/* 74EB8 80099AB8 */ .short 0x06A5 -/* 74EBA 80099ABA */ .short 0x06A6 -/* 74EBC 80099ABC */ .short 0x06A9 -/* 74EBE 80099ABE */ .short 0x06AA -/* 74EC0 80099AC0 */ .short 0x0955 -/* 74EC2 80099AC2 */ .short 0x0956 -/* 74EC4 80099AC4 */ .short 0x0959 -/* 74EC6 80099AC6 */ .short 0x095A -/* 74EC8 80099AC8 */ .short 0x0965 -/* 74ECA 80099ACA */ .short 0x0966 -/* 74ECC 80099ACC */ .short 0x0969 -/* 74ECE 80099ACE */ .short 0x096A -/* 74ED0 80099AD0 */ .short 0x0995 -/* 74ED2 80099AD2 */ .short 0x0996 -/* 74ED4 80099AD4 */ .short 0x0999 -/* 74ED6 80099AD6 */ .short 0x099A -/* 74ED8 80099AD8 */ .short 0x09A5 -/* 74EDA 80099ADA */ .short 0x09A6 -/* 74EDC 80099ADC */ .short 0x09A9 -/* 74EDE 80099ADE */ .short 0x09AA -/* 74EE0 80099AE0 */ .short 0x0A55 -/* 74EE2 80099AE2 */ .short 0x0A56 -/* 74EE4 80099AE4 */ .short 0x0A59 -/* 74EE6 80099AE6 */ .short 0x0A5A -/* 74EE8 80099AE8 */ .short 0x0A65 -/* 74EEA 80099AEA */ .short 0x0A66 -/* 74EEC 80099AEC */ .short 0x0A69 -/* 74EEE 80099AEE */ .short 0x0A6A -/* 74EF0 80099AF0 */ .short 0x0A95 -/* 74EF2 80099AF2 */ .short 0x0A96 -/* 74EF4 80099AF4 */ .short 0x0A99 -/* 74EF6 80099AF6 */ .short 0x0A9A -/* 74EF8 80099AF8 */ .short 0x0AA5 -/* 74EFA 80099AFA */ .short 0x0AA6 -/* 74EFC 80099AFC */ .short 0x0AA9 -/* 74EFE 80099AFE */ .short 0x0AAA diff --git a/ver/jp/asm/os/__osGetSR.s b/ver/jp/asm/os/__osGetSR.s index c7cc499a14..1dde530b9f 100644 --- a/ver/jp/asm/os/__osGetSR.s +++ b/ver/jp/asm/os/__osGetSR.s @@ -10,7 +10,7 @@ /* Generated by spimdisasm 1.11.1 */ # Handwritten function -glabel func_JP_8006C650 +glabel __osGetSR /* 47A50 8006C650 40026000 */ mfc0 $v0, $12 # handwritten instruction /* 47A54 8006C654 03E00008 */ jr $ra /* 47A58 8006C658 00000000 */ nop diff --git a/ver/jp/asm/os/exceptasm.s b/ver/jp/asm/os/exceptasm.s index 52fc1c52c7..9db4092f03 100644 --- a/ver/jp/asm/os/exceptasm.s +++ b/ver/jp/asm/os/exceptasm.s @@ -5,6 +5,78 @@ .set noreorder /* don't insert nops after branches */ .set gp=64 /* allow use of 64-bit general purpose registers */ +.section .rodata + +__osIntOffTable: +/* 75160 80099D60 */ .byte 0x00 +/* 75161 80099D61 */ .byte 0x14 +/* 75162 80099D62 */ .byte 0x18 +/* 75163 80099D63 */ .byte 0x18 +/* 75164 80099D64 */ .byte 0x1C +/* 75165 80099D65 */ .byte 0x1C +/* 75166 80099D66 */ .byte 0x1C +/* 75167 80099D67 */ .byte 0x1C +/* 75168 80099D68 */ .byte 0x20 +/* 75169 80099D69 */ .byte 0x20 +/* 7516A 80099D6A */ .byte 0x20 +/* 7516B 80099D6B */ .byte 0x20 +/* 7516C 80099D6C */ .byte 0x20 +/* 7516D 80099D6D */ .byte 0x20 +/* 7516E 80099D6E */ .byte 0x20 +/* 7516F 80099D6F */ .byte 0x20 +/* 75170 80099D70 */ .byte 0x00 +/* 75171 80099D71 */ .byte 0x04 +/* 75172 80099D72 */ .byte 0x08 +/* 75173 80099D73 */ .byte 0x08 +/* 75174 80099D74 */ .byte 0x0C +/* 75175 80099D75 */ .byte 0x0C +/* 75176 80099D76 */ .byte 0x0C +/* 75177 80099D77 */ .byte 0x0C +/* 75178 80099D78 */ .byte 0x10 +/* 75179 80099D79 */ .byte 0x10 +/* 7517A 80099D7A */ .byte 0x10 +/* 7517B 80099D7B */ .byte 0x10 +/* 7517C 80099D7C */ .byte 0x10 +/* 7517D 80099D7D */ .byte 0x10 +/* 7517E 80099D7E */ .byte 0x10 +/* 7517F 80099D7F */ .byte 0x10 + +.align 3 +__osIntTable: +/* 75180 80099D80 8006AEE0 */ .word .LJP_8006AEE0 +/* 75184 80099D84 8006AEA4 */ .word .LJP_8006AEA4 +/* 75188 80099D88 8006AE80 */ .word .LJP_8006AE80 +/* 7518C 80099D8C 8006ACA8 */ .word .LJP_8006ACA8 +/* 75190 80099D90 8006AC60 */ .word .LJP_8006AC60 +/* 75194 80099D94 8006AE1C */ .word .LJP_8006AE1C +/* 75198 80099D98 8006AC24 */ .word .LJP_8006AC24 +/* 7519C 80099D9C 8006AC30 */ .word .LJP_8006AC30 +/* 751A0 80099DA0 8006AC3C */ .word .LJP_8006AC3C +/* 751A4 80099DA4 00000000 */ .word 0x00000000 +/* 751A8 80099DA8 00000000 */ .word 0x00000000 +/* 751AC 80099DAC 00000000 */ .word 0x00000000 +.size __osIntTable, . - __osIntTable + +.section .data + +__osHwIntTable: + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 +.size __osHwIntTable, . - __osHwIntTable + +__osPiIntTable: + .word 0x00000000 + .word 0x00000000 +.size __osPiIntTable, . - __osPiIntTable + .section .text, "ax" /* Generated by spimdisasm 1.11.1 */ @@ -160,12 +232,12 @@ glabel osExceptionPreamble /* 45FFC 8006ABFC 00095202 */ srl $t2, $t1, 8 /* 46000 8006AC00 214A0010 */ addi $t2, $t2, 0x10 # handwritten instruction .LJP_8006AC04: -/* 46004 8006AC04 3C01800A */ lui $at, %hi(D_JP_80099D60) +/* 46004 8006AC04 3C01800A */ lui $at, %hi(__osIntOffTable) /* 46008 8006AC08 002A0821 */ addu $at, $at, $t2 -/* 4600C 8006AC0C 902A9D60 */ lbu $t2, %lo(D_JP_80099D60)($at) -/* 46010 8006AC10 3C01800A */ lui $at, %hi(jtbl_JP_80099D80) +/* 4600C 8006AC0C 902A9D60 */ lbu $t2, %lo(__osIntOffTable)($at) +/* 46010 8006AC10 3C01800A */ lui $at, %hi(__osIntTable) /* 46014 8006AC14 002A0821 */ addu $at, $at, $t2 -/* 46018 8006AC18 8C2A9D80 */ lw $t2, %lo(jtbl_JP_80099D80)($at) +/* 46018 8006AC18 8C2A9D80 */ lw $t2, %lo(__osIntTable)($at) /* 4601C 8006AC1C 01400008 */ jr $t2 /* 46020 8006AC20 00000000 */ nop glabel .LJP_8006AC24 @@ -279,8 +351,8 @@ glabel .LJP_8006ACA8 /* 461A8 8006ADA8 24090002 */ addiu $t1, $zero, 0x2 /* 461AC 8006ADAC 3C01A460 */ lui $at, %hi(D_A4600010) /* 461B0 8006ADB0 AC290010 */ sw $t1, %lo(D_A4600010)($at) -/* 461B4 8006ADB4 3C098009 */ lui $t1, %hi(D_80095938) -/* 461B8 8006ADB8 252958C8 */ addiu $t1, $t1, %lo(D_80095938) +/* 461B4 8006ADB4 3C098009 */ lui $t1, %hi(__osPiIntTable) +/* 461B8 8006ADB8 252958C8 */ addiu $t1, $t1, %lo(__osPiIntTable) /* 461BC 8006ADBC 8D2A0000 */ lw $t2, 0x0($t1) /* 461C0 8006ADC0 11400006 */ beqz $t2, .LJP_8006ADDC /* 461C4 8006ADC4 00000000 */ nop diff --git a/ver/jp/asm/os/guMtxIdent.s b/ver/jp/asm/os/guMtxIdent.s index da056d30a5..67d7dd7690 100644 --- a/ver/jp/asm/os/guMtxIdent.s +++ b/ver/jp/asm/os/guMtxIdent.s @@ -10,7 +10,7 @@ /* Generated by spimdisasm 1.11.1 */ # Handwritten function -glabel func_JP_80067420 +glabel guMtxIdent /* 42820 80067420 20080001 */ addi $t0, $zero, 0x1 # handwritten instruction /* 42824 80067424 00084C00 */ sll $t1, $t0, 16 /* 42828 80067428 AC890000 */ sw $t1, 0x0($a0) diff --git a/ver/jp/asm/os/guScale.s b/ver/jp/asm/os/guScale.s index 684153f963..f369fc0a6c 100644 --- a/ver/jp/asm/os/guScale.s +++ b/ver/jp/asm/os/guScale.s @@ -9,7 +9,7 @@ /* Generated by spimdisasm 1.11.1 */ -glabel func_JP_800676E0 +glabel guScale /* 42AE0 800676E0 3C014780 */ lui $at, (0x47800000 >> 16) /* 42AE4 800676E4 44812000 */ mtc1 $at, $f4 /* 42AE8 800676E8 44853000 */ mtc1 $a1, $f6 diff --git a/ver/jp/asm/os/guTranslate.s b/ver/jp/asm/os/guTranslate.s index be11a5b2fb..7cd5009d44 100644 --- a/ver/jp/asm/os/guTranslate.s +++ b/ver/jp/asm/os/guTranslate.s @@ -9,7 +9,7 @@ /* Generated by spimdisasm 1.11.1 */ -glabel func_JP_80067800 +glabel guTranslate /* 42C00 80067800 3C014780 */ lui $at, (0x47800000 >> 16) /* 42C04 80067804 44812000 */ mtc1 $at, $f4 /* 42C08 80067808 44853000 */ mtc1 $a1, $f6 diff --git a/ver/jp/asm/os/osSetIntMask.s b/ver/jp/asm/os/osSetIntMask.s index dc3b28e10c..55900940eb 100644 --- a/ver/jp/asm/os/osSetIntMask.s +++ b/ver/jp/asm/os/osSetIntMask.s @@ -5,6 +5,74 @@ .set noreorder /* don't insert nops after branches */ .set gp=64 /* allow use of 64-bit general purpose registers */ +.section .rodata + +glabel D_80099AA0 +/* 74E80 80099A80 */ .short 0x0555 +/* 74E82 80099A82 */ .short 0x0556 +/* 74E84 80099A84 */ .short 0x0559 +/* 74E86 80099A86 */ .short 0x055A +/* 74E88 80099A88 */ .short 0x0565 +/* 74E8A 80099A8A */ .short 0x0566 +/* 74E8C 80099A8C */ .short 0x0569 +/* 74E8E 80099A8E */ .short 0x056A +/* 74E90 80099A90 */ .short 0x0595 +/* 74E92 80099A92 */ .short 0x0596 +/* 74E94 80099A94 */ .short 0x0599 +/* 74E96 80099A96 */ .short 0x059A +/* 74E98 80099A98 */ .short 0x05A5 +/* 74E9A 80099A9A */ .short 0x05A6 +/* 74E9C 80099A9C */ .short 0x05A9 +/* 74E9E 80099A9E */ .short 0x05AA +/* 74EA0 80099AA0 */ .short 0x0655 +/* 74EA2 80099AA2 */ .short 0x0656 +/* 74EA4 80099AA4 */ .short 0x0659 +/* 74EA6 80099AA6 */ .short 0x065A +/* 74EA8 80099AA8 */ .short 0x0665 +/* 74EAA 80099AAA */ .short 0x0666 +/* 74EAC 80099AAC */ .short 0x0669 +/* 74EAE 80099AAE */ .short 0x066A +/* 74EB0 80099AB0 */ .short 0x0695 +/* 74EB2 80099AB2 */ .short 0x0696 +/* 74EB4 80099AB4 */ .short 0x0699 +/* 74EB6 80099AB6 */ .short 0x069A +/* 74EB8 80099AB8 */ .short 0x06A5 +/* 74EBA 80099ABA */ .short 0x06A6 +/* 74EBC 80099ABC */ .short 0x06A9 +/* 74EBE 80099ABE */ .short 0x06AA +/* 74EC0 80099AC0 */ .short 0x0955 +/* 74EC2 80099AC2 */ .short 0x0956 +/* 74EC4 80099AC4 */ .short 0x0959 +/* 74EC6 80099AC6 */ .short 0x095A +/* 74EC8 80099AC8 */ .short 0x0965 +/* 74ECA 80099ACA */ .short 0x0966 +/* 74ECC 80099ACC */ .short 0x0969 +/* 74ECE 80099ACE */ .short 0x096A +/* 74ED0 80099AD0 */ .short 0x0995 +/* 74ED2 80099AD2 */ .short 0x0996 +/* 74ED4 80099AD4 */ .short 0x0999 +/* 74ED6 80099AD6 */ .short 0x099A +/* 74ED8 80099AD8 */ .short 0x09A5 +/* 74EDA 80099ADA */ .short 0x09A6 +/* 74EDC 80099ADC */ .short 0x09A9 +/* 74EDE 80099ADE */ .short 0x09AA +/* 74EE0 80099AE0 */ .short 0x0A55 +/* 74EE2 80099AE2 */ .short 0x0A56 +/* 74EE4 80099AE4 */ .short 0x0A59 +/* 74EE6 80099AE6 */ .short 0x0A5A +/* 74EE8 80099AE8 */ .short 0x0A65 +/* 74EEA 80099AEA */ .short 0x0A66 +/* 74EEC 80099AEC */ .short 0x0A69 +/* 74EEE 80099AEE */ .short 0x0A6A +/* 74EF0 80099AF0 */ .short 0x0A95 +/* 74EF2 80099AF2 */ .short 0x0A96 +/* 74EF4 80099AF4 */ .short 0x0A99 +/* 74EF6 80099AF6 */ .short 0x0A9A +/* 74EF8 80099AF8 */ .short 0x0AA5 +/* 74EFA 80099AFA */ .short 0x0AA6 +/* 74EFC 80099AFC */ .short 0x0AA9 +/* 74EFE 80099AFE */ .short 0x0AAA + .section .text, "ax" /* Generated by spimdisasm 1.11.1 */ diff --git a/ver/jp/asm/os/parameters.s b/ver/jp/asm/os/parameters.s index 76bc4e703e..73d6bcc454 100644 --- a/ver/jp/asm/os/parameters.s +++ b/ver/jp/asm/os/parameters.s @@ -1,36 +1,37 @@ .include "macro.inc" -/* assembler directives */ -.set noat /* allow manual use of $at */ -.set noreorder /* don't insert nops after branches */ -.set gp=64 /* allow use of 64-bit general purpose registers */ +# assembler directives +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches +.set gp=64 # allow use of 64-bit general purpose registers .section .text, "ax" -/* Generated by spimdisasm 1.11.1 */ +.globl leoBootID +leoBootID = 0x800001a0 -glabel func_JP_8006A5B0 -/* 459B0 8006A5B0 00000000 */ nop -/* 459B4 8006A5B4 00000000 */ nop -/* 459B8 8006A5B8 00000000 */ nop -/* 459BC 8006A5BC 00000000 */ nop -/* 459C0 8006A5C0 00000000 */ nop -/* 459C4 8006A5C4 00000000 */ nop -/* 459C8 8006A5C8 00000000 */ nop -/* 459CC 8006A5CC 00000000 */ nop -/* 459D0 8006A5D0 00000000 */ nop -/* 459D4 8006A5D4 00000000 */ nop -/* 459D8 8006A5D8 00000000 */ nop -/* 459DC 8006A5DC 00000000 */ nop -/* 459E0 8006A5E0 00000000 */ nop -/* 459E4 8006A5E4 00000000 */ nop -/* 459E8 8006A5E8 00000000 */ nop -/* 459EC 8006A5EC 00000000 */ nop -/* 459F0 8006A5F0 00000000 */ nop -/* 459F4 8006A5F4 00000000 */ nop -/* 459F8 8006A5F8 00000000 */ nop -/* 459FC 8006A5FC 00000000 */ nop -/* 45A00 8006A600 00000000 */ nop -/* 45A04 8006A604 00000000 */ nop -/* 45A08 8006A608 00000000 */ nop -/* 45A0C 8006A60C 00000000 */ nop +.globl osTvType +osTvType = 0x80000300 + +.globl osRomType +osRomType = 0x80000304 + +.globl osRomBase +osRomBase = 0x80000308 + +.globl osResetType +osResetType = 0x8000030C + +.globl osCicId +osCicId = 0x80000310 + +.globl osVersion +osVersion = 0x80000314 + +.globl osMemSize +osMemSize = 0x80000318 + +.globl osAppNMIBuffer +osAppNMIBuffer = 0x8000031C + +.fill 0x60 diff --git a/ver/jp/splat.yaml b/ver/jp/splat.yaml index 251e4cf339..44827476f0 100644 --- a/ver/jp/splat.yaml +++ b/ver/jp/splat.yaml @@ -383,6 +383,7 @@ segments: - [auto, .data, os/contpfs] - [auto, .data, os/contramread] - [auto, .data, os/initialize] + - [auto, .data, os/exceptasm] - [auto, .data, os/xlitob] - [auto, .data, os/vi] - [auto, .data, os/vimodepallan1] @@ -392,54 +393,6 @@ segments: - [0x72A40, bin, gspF3DEX2kawase_fifo_data] - [0x72E60, bin, n_aspMain_data] - [0x73110] - - [auto, .rodata, is_debug] - - [auto, .rodata, main_loop] - - [auto, .rodata, 43F0] - - [auto, .rodata, curtains] - - [auto, .rodata, crash_screen] - - [auto, .rodata, cam_main] - - [auto, .rodata, cam_mode_5] - - [auto, .rodata, cam_mode_zone_interp] - - [auto, .rodata, cam_math] - - [auto, .rodata, state_logos] - - [auto, .rodata, state_file_select] - - [auto, .rodata, 111f0_len_860] - - [auto, .rodata, state_intro] - - [auto, .rodata, state_title_screen] - - [auto, .rodata, state_demo] - - [auto, .rodata, npc] - - [auto, .rodata, encounter] - - [auto, .rodata, status_icons] - - [auto, .rodata, 23680] - - [auto, .rodata, audio/28910_len_5090] - - [auto, .rodata, audio/2e230_len_2190] - - [auto, .rodata, audio/30450] - - [auto, .rodata, audio/33450] - - [auto, .rodata, audio/reverb] - - - [auto, .rodata, 5B320] - - [auto, .rodata, world/world] - - [0x74E80, rodata, os/osSetIntMask] - - [0x74F00] - - [auto, .rodata, os/devmgr] - - [auto, .rodata, os/aisetfrequency] - - [auto, .rodata, os/guLookAt] - - [auto, .rodata, os/lookathil] - - [auto, .rodata, os/lookatref] - - [auto, .rodata, os/perspective] - - [auto, .rodata, os/xprintf] - - [auto, .rodata, os/viswapcontext] - - - [0x75160, rodata, os/exceptasm] - - [0x751B0] - - [auto, .rodata, os/xlitob] - - [auto, .rodata, os/xldtob] - - [auto, .rodata, gcc/divdi3] - - [auto, .rodata, gcc/moddi3] - - [auto, .rodata, gcc/udivdi3] - - [auto, .rodata, gcc/umoddi3] - - [auto, .rodata, battle/battle] - - [0x75990] - name: engine1 type: code @@ -458,41 +411,493 @@ segments: - [auto, c, world/partners] - [auto, hasm, bss2_2] - [auto, c, 891b0_len_fb0] - - [0x8A0F0, bin] - - [0x91170, .data, npc_collision] + - [auto, c, 8a160_len_700] + - [auto, c, 8a860_len_3f30] + - [auto, c, draw_box] + - [auto, .data, npc_collision] - [auto, .data, world/actions] - [auto, .data, world/partners] - - [0x91B40, bin] - - [0xA2AC0, .data, 891b0_len_fb0] - - [0xA2AF0, bin] - - [0xA5250, .rodata, 77480] - - [auto, .rodata, 7B440] - - [auto, .rodata, 7BB60] - - [auto, .rodata, 7E9D0] - - [auto, .rodata, world/menus] - - [auto, .rodata, inventory] - - [auto, .rodata, world/partners] - - [auto, .rodata, 891b0_len_fb0] - - [0xA5910, bin, A5910] - - [0xA5F90] + - start: 0x91B40 + type: .data + name: global_hud_scripts + subsegments: + - [auto, ci4, ui/input/a_button_unpressed, 48, 40] + - [auto, palette, ui/input/a_button_unpressed] + - [auto, ci4, ui/input/a_button_pressed, 48, 40] + - [auto, palette, ui/input/a_button_pressed] + - [auto, ci4, ui/input/analog_stick, 32, 32] + - [auto, palette, ui/input/analog_stick] + - [auto, ci4, ui/input/analog_stick_left, 40, 32] + - [auto, palette, ui/input/analog_stick_left] + - [auto, ci4, ui/input/analog_stick2, 32, 32] + - [auto, palette, ui/input/analog_stick2] + - [auto, ci4, ui/input/analog_stick_right, 40, 32] + - [auto, palette, ui/input/analog_stick_right] + - [auto, ci4, ui/input/analog_stick3, 32, 32] + - [auto, palette, ui/input/analog_stick3] + - [auto, ci4, ui/input/analog_stick_down, 32, 32] + - [auto, palette, ui/input/analog_stick_down] + - [auto, ci4, ui/input/analog_stick_up, 32, 32] + - [auto, palette, ui/input/analog_stick_up] + - [auto, ci4, ui/unk_bar, 72, 16] + - [auto, palette, ui/unk_bar] + - [auto, ci4, ui/ok, 24, 16] + - [auto, palette, ui/ok] + - [auto, ci4, ui/input/start_button, 48, 40] + - [auto, palette, ui/input/start_button] + - [auto, ci4, ui/input/start_button2, 48, 40] + - [auto, palette, ui/input/start_button2] + - [auto, ci4, ui/input/start_text, 24, 8] + - [auto, palette, ui/input/start_text] + - [auto, ci4, ui/hammer, 32, 32] + - [auto, palette, ui/hammer] + - [auto, palette, ui/hammer.disabled] + - [auto, ci4, ui/super_hammer, 32, 32] + - [auto, palette, ui/super_hammer] + - [auto, palette, ui/super_hammer.disabled] + - [auto, ci4, ui/ultra_hammer, 32, 32] + - [auto, palette, ui/ultra_hammer] + - [auto, palette, ui/ultra_hammer.disabled] + - [auto, ci4, ui/boots, 32, 32] + - [auto, palette, ui/boots] + - [auto, palette, ui/boots.disabled] + - [auto, ci4, ui/super_boots, 32, 32] + - [auto, palette, ui/super_boots] + - [auto, palette, ui/super_boots.disabled] + - [auto, ci4, ui/ultra_boots, 32, 32] + - [auto, palette, ui/ultra_boots] + - [auto, palette, ui/ultra_boots.disabled] + - [auto, ci4, ui/item, 32, 32] + - [auto, palette, ui/item] + - [auto, palette, ui/item.disabled] + - [auto, ci4, ui/star_spirit, 32, 32] + - [auto, palette, ui/star_spirit] + - [auto, palette, ui/star_spirit.disabled] + - [auto, ci4, ui/arrow_left, 16, 16] + - [auto, palette, ui/arrow_left] + - [auto, ci4, ui/arrow_right, 16, 16] + - [auto, palette, ui/arrow_right] + - [auto, ci4, ui/point_right, 16, 16] + - [auto, palette, ui/point_right] + - [auto, ci4, ui/pip, 8, 8] + - [auto, palette, ui/pip] + - [auto, ci4, ui/pip2, 8, 8] + - [auto, palette, ui/pip2] + - [auto, ci4, ui/coin_sparkle_0, 8, 8] + - [auto, palette, ui/coin_sparkle_0] + - [auto, ci4, ui/coin_sparkle_1, 8, 8] + - [auto, palette, ui/coin_sparkle_1] + - [auto, ci4, ui/coin_sparkle_2, 8, 8] + - [auto, palette, ui/coin_sparkle_2] + - [auto, ci4, ui/coin_sparkle_3, 8, 8] + - [auto, palette, ui/coin_sparkle_3] + - [auto, ci4, ui/coin_sparkle_4, 8, 8] + - [auto, palette, ui/coin_sparkle_4] + - [auto, ci4, ui/coin_sparkle_5, 8, 8] + - [auto, palette, ui/coin_sparkle_5] + - [auto, ci4, ui/coin_sparkle_none, 8, 8] + - [auto, palette, ui/coin_sparkle_none] + - [auto, ia8, ui/status/star_point_shine, 24, 24] + - [auto, ci4, ui/status/star_piece_0, 16, 16] + - [auto, palette, ui/status/star_piece_0] + - [auto, ci4, ui/status/star_piece_1, 16, 16] + - [auto, palette, ui/status/star_piece_1] + - [auto, ci4, ui/status/star_piece_2, 16, 16] + - [auto, palette, ui/status/star_piece_2] + - [auto, ci4, ui/menu_times, 8, 8] + - [auto, palette, ui/menu_times] + - [auto, ci4, ui/fp_cost, 16, 8] + - [auto, palette, ui/fp_cost] + - [auto, palette, ui/fp_cost.reduced] + - [auto, palette, ui/fp_cost.reduced_twice] + - [auto, palette, ui/fp_cost.notenough] + - [auto, ci4, ui/pow_cost, 16, 8] + - [auto, palette, ui/pow_cost] + - [auto, palette, ui/pow_cost.reduced] + - [auto, palette, ui/pow_cost.reduced_twice] + - [auto, palette, ui/pow_cost.notenough] + - [auto, ci4, ui/green_arrow_down, 16, 8] + - [auto, palette, ui/green_arrow_down] + - [auto, ci4, ui/green_arrow_up, 16, 8] + - [auto, palette, ui/green_arrow_up] + - [auto, ci4, ui/kaime, 56, 24] + - [auto, palette, ui/kaime] + - [auto, ci4, ui/unused_1, 16, 16] + - [auto, palette, ui/unused_1] + - [auto, ci4, ui/unused_2, 16, 16] + - [auto, palette, ui/unused_2] + - [auto, ci4, ui/unused_3, 16, 16] + - [auto, palette, ui/unused_3] + - [auto, ci4, ui/red_bar1, 112, 8] + - [auto, palette, ui/red_bar1] + - [auto, ci4, ui/empty_bar, 112, 8] + - [auto, palette, ui/empty_bar] + - [auto, ci4, ui/red_bar2, 104, 8] + - [auto, palette, ui/red_bar2] + - [auto, ci4, ui/eldstar, 32, 32] + - [auto, palette, ui/eldstar] + - [auto, palette, ui/eldstar.disabled] + - [auto, ci4, ui/mamar, 32, 32] + - [auto, palette, ui/mamar] + - [auto, palette, ui/mamar.disabled] + - [auto, ci4, ui/skolar, 32, 32] + - [auto, palette, ui/skolar] + - [auto, palette, ui/skolar.disabled] + - [auto, ci4, ui/muskular, 32, 32] + - [auto, palette, ui/muskular] + - [auto, palette, ui/muskular.disabled] + - [auto, ci4, ui/misstar, 32, 32] + - [auto, palette, ui/misstar] + - [auto, palette, ui/misstar.disabled] + - [auto, ci4, ui/klevar, 32, 32] + - [auto, palette, ui/klevar] + - [auto, palette, ui/klevar.disabled] + - [auto, ci4, ui/kalmar, 32, 32] + - [auto, palette, ui/kalmar] + - [auto, palette, ui/kalmar.disabled] + - [auto, ci4, ui/star_beam, 32, 32] + - [auto, palette, ui/star_beam] + - [auto, palette, ui/star_beam.disabled] + - [auto, ci4, ui/peach_beam, 32, 32] + - [auto, palette, ui/peach_beam] + - [auto, palette, ui/peach_beam.disabled] + - [auto, ci4, ui/mario_head, 16, 16] + - [auto, palette, ui/mario_head] + - [auto, ci4, ui/partner0, 32, 32] + - [auto, palette, ui/partner0] + - [auto, palette, ui/partner0.disabled] + - [auto, ci4, ui/goombario, 32, 32] + - [auto, palette, ui/goombario] + - [auto, palette, ui/goombario.disabled] + - [auto, ci4, ui/kooper, 32, 32] + - [auto, palette, ui/kooper] + - [auto, palette, ui/kooper.disabled] + - [auto, ci4, ui/bombette, 32, 32] + - [auto, palette, ui/bombette] + - [auto, palette, ui/bombette.disabled] + - [auto, ci4, ui/parakarry, 32, 32] + - [auto, palette, ui/parakarry] + - [auto, palette, ui/parakarry.disabled] + - [auto, ci4, ui/bow, 32, 32] + - [auto, palette, ui/bow] + - [auto, palette, ui/bow.disabled] + - [auto, ci4, ui/watt, 32, 32] + - [auto, palette, ui/watt] + - [auto, palette, ui/watt.disabled] + - [auto, ci4, ui/sushie, 32, 32] + - [auto, palette, ui/sushie] + - [auto, palette, ui/sushie.disabled] + - [auto, ci4, ui/lakilester, 32, 32] + - [auto, palette, ui/lakilester] + - [auto, palette, ui/lakilester.disabled] + - [auto, ci4, ui/partner9, 32, 32] + - [auto, palette, ui/partner9] + - [auto, palette, ui/partner9.disabled] + - [auto, ci4, ui/partner10, 32, 32] + - [auto, palette, ui/partner10] + - [auto, palette, ui/partner10.disabled] + - [auto, ci4, ui/partner11, 32, 32] + - [auto, palette, ui/partner11] + - [auto, palette, ui/partner11.disabled] + - [auto, ci4, ui/status/text_times, 8, 8] + - [auto, palette, ui/status/text_times] + - [auto, ci4, ui/status/text_slash, 8, 16] + - [auto, palette, ui/status/text_slash] + - [auto, ci4, ui/status/text_0, 16, 16] + - [auto, palette, ui/status/text_0] + - [auto, ci4, ui/status/text_1, 16, 16] + - [auto, palette, ui/status/text_1] + - [auto, ci4, ui/status/text_2, 16, 16] + - [auto, palette, ui/status/text_2] + - [auto, ci4, ui/status/text_3, 16, 16] + - [auto, palette, ui/status/text_3] + - [auto, ci4, ui/status/text_4, 16, 16] + - [auto, palette, ui/status/text_4] + - [auto, ci4, ui/status/text_5, 16, 16] + - [auto, palette, ui/status/text_5] + - [auto, ci4, ui/status/text_6, 16, 16] + - [auto, palette, ui/status/text_6] + - [auto, ci4, ui/status/text_7, 16, 16] + - [auto, palette, ui/status/text_7] + - [auto, ci4, ui/status/text_8, 16, 16] + - [auto, palette, ui/status/text_8] + - [auto, ci4, ui/status/text_9, 16, 16] + - [auto, palette, ui/status/text_9] + - [auto, ci4, ui/status/text_hp, 16, 16] + - [auto, palette, ui/status/text_hp] + - [auto, ci4, ui/status/text_fp, 16, 16] + - [auto, palette, ui/status/text_fp] + - [auto, ci4, ui/status/pow_unit_1, 8, 8] + - [auto, palette, ui/status/pow_unit_1] + - [auto, ci4, ui/status/pow_unit_2, 8, 8] + - [auto, palette, ui/status/pow_unit_2] + - [auto, ci4, ui/status/pow_unit_3, 8, 8] + - [auto, palette, ui/status/pow_unit_3] + - [auto, ci4, ui/status/pow_unit_4, 8, 8] + - [auto, palette, ui/status/pow_unit_4] + - [auto, ci4, ui/status/pow_unit_5, 8, 8] + - [auto, palette, ui/status/pow_unit_5] + - [auto, ci4, ui/status/pow_unit_6, 8, 8] + - [auto, palette, ui/status/pow_unit_6] + - [auto, ci4, ui/status/pow_unit_7, 8, 8] + - [auto, palette, ui/status/pow_unit_7] + - [auto, ci4, ui/status/pow_unit_empty, 8, 8] + - [auto, palette, ui/status/pow_unit_empty] + - [auto, ci4, ui/status/pow_star_1, 8, 8] + - [auto, palette, ui/status/pow_star_1] + - [auto, ci4, ui/status/pow_star_2, 8, 8] + - [auto, palette, ui/status/pow_star_2] + - [auto, ci4, ui/status/pow_star_3, 8, 8] + - [auto, palette, ui/status/pow_star_3] + - [auto, ci4, ui/status/pow_star_4, 8, 8] + - [auto, palette, ui/status/pow_star_4] + - [auto, ci4, ui/status/pow_star_5, 8, 8] + - [auto, palette, ui/status/pow_star_5] + - [auto, ci4, ui/status/pow_star_6, 8, 8] + - [auto, palette, ui/status/pow_star_6] + - [auto, ci4, ui/status/pow_star_7, 8, 8] + - [auto, palette, ui/status/pow_star_7] + - [auto, ci4, ui/status/pow_star_empty, 8, 8] + - [auto, palette, ui/status/pow_star_empty] + - [auto, ci4, ui/status/coin_0, 16, 16] + - [auto, palette, ui/status/coin_0] + - [auto, ci4, ui/status/coin_1, 16, 16] + - [auto, palette, ui/status/coin_1] + - [auto, ci4, ui/status/coin_2, 16, 16] + - [auto, palette, ui/status/coin_2] + - [auto, ci4, ui/status/coin_3, 16, 16] + - [auto, palette, ui/status/coin_3] + - [auto, ci4, ui/status/coin_4, 16, 16] + - [auto, palette, ui/status/coin_4] + - [auto, ci4, ui/status/coin_5, 16, 16] + - [auto, palette, ui/status/coin_5] + - [auto, ci4, ui/status/coin_6, 16, 16] + - [auto, palette, ui/status/coin_6] + - [auto, ci4, ui/status/coin_7, 16, 16] + - [auto, palette, ui/status/coin_7] + - [auto, ci4, ui/status/coin_8, 16, 16] + - [auto, palette, ui/status/coin_8] + - [auto, ci4, ui/status/coin_9, 16, 16] + - [auto, palette, ui/status/coin_9] + - [auto, ci4, ui/status/star_point_0, 16, 16] + - [auto, palette, ui/status/star_point_0] + - [auto, ci4, ui/status/star_point_1, 16, 16] + - [auto, palette, ui/status/star_point_1] + - [auto, ci4, ui/status/star_point_2, 16, 16] + - [auto, palette, ui/status/star_point_2] + - [auto, ci4, ui/status/star_point_3, 16, 16] + - [auto, palette, ui/status/star_point_3] + - [auto, ci4, ui/status/star_point_4, 16, 16] + - [auto, palette, ui/status/star_point_4] + - [auto, ci4, ui/status/star_point_5, 16, 16] + - [auto, palette, ui/status/star_point_5] + - [auto, ci4, ui/status/star_point_6, 16, 16] + - [auto, palette, ui/status/star_point_6] + - [auto, ci4, ui/status/star_point_7, 16, 16] + - [auto, palette, ui/status/star_point_7] + - [auto, ci4, ui/bluepip, 16, 16] + - [auto, palette, ui/bluepip] + - [auto, ci4, ui/bluepip2, 16, 16] + - [auto, palette, ui/bluepip2] + - [auto, ci4, ui/battle/status/charge_jump, 24, 24] + - [auto, palette, ui/battle/status/charge_jump] + - [auto, ci4, ui/battle/status/charge_hammer, 24, 24] + - [auto, palette, ui/battle/status/charge_hammer] + - [auto, ci4, ui/battle/status/charge_goombario, 24, 24] + - [auto, palette, ui/battle/status/charge_goombario] + - [auto, ci4, ui/battle/status/exclamation, 24, 24] + - [auto, palette, ui/battle/status/exclamation] + - [auto, ci4, ui/battle/status/sleep_0, 16, 16] + - [auto, palette, ui/battle/status/sleep_0] + - [auto, ci4, ui/battle/status/sleep_1, 16, 16] + - [auto, palette, ui/battle/status/sleep_1] + - [auto, ci4, ui/battle/status/sleep_2, 16, 16] + - [auto, palette, ui/battle/status/sleep_2] + - [auto, ci4, ui/battle/status/static_0, 16, 16] + - [auto, palette, ui/battle/status/static_0] + - [auto, ci4, ui/battle/status/static_1, 16, 16] + - [auto, palette, ui/battle/status/static_1] + - [auto, ci4, ui/battle/status/paralyze_0, 16, 16] + - [auto, palette, ui/battle/status/paralyze_0] + - [auto, ci4, ui/battle/status/paralyze_1, 16, 16] + - [auto, palette, ui/battle/status/paralyze_1] + - [auto, ci4, ui/battle/status/dizzy_0, 16, 16] + - [auto, palette, ui/battle/status/dizzy_0] + - [auto, ci4, ui/battle/status/dizzy_1, 16, 16] + - [auto, palette, ui/battle/status/dizzy_1] + - [auto, ci4, ui/battle/status/dizzy_2, 16, 16] + - [auto, palette, ui/battle/status/dizzy_2] + - [auto, ci4, ui/battle/status/dizzy_3, 16, 16] + - [auto, palette, ui/battle/status/dizzy_3] + - [auto, ci4, ui/battle/status/poison_0, 16, 16] + - [auto, palette, ui/battle/status/poison_0] + - [auto, ci4, ui/battle/status/poison_1, 16, 16] + - [auto, palette, ui/battle/status/poison_1] + - [auto, ci4, ui/battle/status/frozen_0, 16, 16] + - [auto, palette, ui/battle/status/frozen_0] + - [auto, ci4, ui/battle/status/frozen_1, 16, 16] + - [auto, palette, ui/battle/status/frozen_1] + - [auto, ci4, ui/battle/status/frozen_2, 16, 16] + - [auto, palette, ui/battle/status/frozen_2] + - [auto, ci4, ui/battle/status/frozen_3, 16, 16] + - [auto, palette, ui/battle/status/frozen_3] + - [auto, ci4, ui/battle/status/stop_0, 16, 16] + - [auto, palette, ui/battle/status/stop_0] + - [auto, ci4, ui/battle/status/stop_1, 16, 16] + - [auto, palette, ui/battle/status/stop_1] + - [auto, ci4, ui/battle/status/stop_2, 16, 16] + - [auto, palette, ui/battle/status/stop_2] + - [auto, ci4, ui/battle/status/stop_3, 16, 16] + - [auto, palette, ui/battle/status/stop_3] + - [auto, ci4, ui/battle/status/pdown_0, 16, 16] + - [auto, palette, ui/battle/status/pdown_0] + - [auto, ci4, ui/battle/status/pdown_1, 16, 16] + - [auto, palette, ui/battle/status/pdown_1] + - [auto, ci4, ui/battle/status/shrink_0, 16, 16] + - [auto, palette, ui/battle/status/shrink_0] + - [auto, ci4, ui/battle/status/shrink_1, 16, 16] + - [auto, palette, ui/battle/status/shrink_1] + - [auto, ci4, ui/battle/status/shrink_2, 16, 16] + - [auto, palette, ui/battle/status/shrink_2] + - [auto, ci4, ui/battle/status/shrink_3, 16, 16] + - [auto, palette, ui/battle/status/shrink_3] + - [auto, ci4, ui/battle/status/transparent_0, 16, 16] + - [auto, palette, ui/battle/status/transparent_0] + - [auto, ci4, ui/battle/status/transparent_1, 16, 16] + - [auto, palette, ui/battle/status/transparent_1] + - [auto, ci4, ui/battle/status/transparent_2, 16, 16] + - [auto, palette, ui/battle/status/transparent_2] + - [auto, ci4, ui/battle/status/transparent_3, 16, 16] + - [auto, palette, ui/battle/status/transparent_3] + - [auto, ci4, ui/battle/status/transparent_4, 16, 16] + - [auto, palette, ui/battle/status/transparent_4] + - [auto, ci4, ui/battle/status/transparent_5, 16, 16] + - [auto, palette, ui/battle/status/transparent_5] + - [auto, ci4, ui/battle/status/peril, 40, 16] + - [auto, palette, ui/battle/status/peril] + - [auto, ci4, ui/battle/status/danger, 40, 16] + - [auto, palette, ui/battle/status/danger] + - [auto, ci4, ui/battle/status/refund, 40, 24] + - [auto, palette, ui/battle/status/refund] + - [auto, ci4, ui/battle/status/happy, 40, 16] + - [auto, palette, ui/battle/status/happy] + - [auto, ci4, ui/battle/status/hp_drain, 40, 16] + - [auto, palette, ui/battle/status/hp_drain] + - [auto, ci4, ui/move_basic, 32, 32] + - [auto, palette, ui/move_basic] + - [auto, palette, ui/move_basic.disabled] + - [auto, ci4, ui/move_partner_1, 32, 32] + - [auto, palette, ui/move_partner_1] + - [auto, palette, ui/move_partner_1.disabled] + - [auto, ci4, ui/move_partner_2, 32, 32] + - [auto, palette, ui/move_partner_2] + - [auto, palette, ui/move_partner_2.disabled] + - [auto, ci4, ui/move_partner_3, 32, 32] + - [auto, palette, ui/move_partner_3] + - [auto, palette, ui/move_partner_3.disabled] + - [0x9D7E0] + - [0x9D7E8, rgba32, ui/stat_heart, 16, 16] + - [0x9DBE8] + - [0x9DBF0, rgba32, ui/stat_flower, 16, 16] + - [0x9DFF0] + - [auto, .data, 891b0_len_fb0] + - [auto, .data, 8a160_len_700] + - start: 0xA2AF0 + type: .data + name: 8a160_len_700 + subsegments: + - [0xA2AF0, ia8, A2960, 32, 16] + - [0xA2CF0] # Vp + - [0xA2D00, vtx, A2B70] + - [0xA2D50, gfx, A2BC0] + - [0xA2E18, gfx, A2C88] + - [0xA2E40] + - [auto, .data, 8a860_len_3f30] + - start: 0xA2EE0 + type: .data + name: draw_box + subsegments: + - [0xA2EE0] + - [0xA2FE0, ia8, ui/box/corners9, 16, 64] + - [auto, ia8, ui/box/corners8, 24, 96] + - [auto, ia8, ui/box/corners6, 16, 40] + - [auto, ia8, ui/box/corners7, 16, 32] + - [auto, ia8, ui/box/corners3, 16, 96] + - [auto, ia8, ui/box/corners5, 16, 32] + - [auto, ia8, ui/box/corners4, 8, 32] + - [auto, i4, ui/box/bg_tile, 16, 16] + - [auto, ia8, ui/box/corners1, 16, 64] + - [auto, i4, ui/box/corners2, 16, 64] + - [auto, i4, ui/box/bg_flat, 16, 1] + - [0xA50E8] + - [0xA51C8, vtx, vtx/drawbox1] + - [0xA5208] + - [0xA5250] - name: engine4 - dir: engine4 type: code start: 0xA5F90 vram: 0x8010f890 subsegments: - - [0xA5F90, bin] - - [0xa9770] + - [auto, c, sprite] + - [auto, c, 101b90_len_8f0] - name: engine2 - dir: engine2 type: code start: 0xa9770 vram: 0x801148e0 subsegments: - - [0xa9770, bin] - - [0xeb1a0] + - [auto, hasm, bss3] + - [auto, c, entity] + - [auto, c, game_states] + - [auto, c, model] + - [auto, c, animator] + - [auto, c, entity_model] + - [auto, c, worker] + - [auto, c, msg] + - [auto, c, msg_draw] + - [auto, c, draw_img_util] + - [auto, c, item_entity] + - [auto, c, screen_overlays] + - [auto, c, screen_render_util] + - [auto, c, imgfx] + - [auto, c, hud_element] + - [auto, c, vars_access] + - [auto, c, trigger] + - [auto, c, background] + - [auto, c, audio/ambience] + - [auto, c, windows] + - [auto, c, sprite_shading] + - [auto, c, audio/sfx] + - [auto, c, audio/e0b30_len_b80] + - [auto, .data, entity] + - [auto, .data, model] + - [auto, .data, animator] + - [auto, .data, entity_model] + - [auto, .data, msg] + - [auto, .data, msg_draw] + - [auto, .data, item_entity] + - start: 0xE6620 + type: .data + name: screen_overlays + subsegments: + - [0xE6620] + - [0xE6630, i4, ui/stencil/star, 32, 64] + - [0xE6A30, i4, ui/stencil/mario, 64, 64] + - [0xE7230, i4, ui/stencil/sharp_circle, 32, 32] + - [0xE7430, i8, ui/stencil/blurry_circle, 64, 64] + - [0xE8430, vtx, vtx/stencil1] + - [0xE84D0] + - [0xE86A0, vtx, vtx/stencil2] + - [0xE8820] + - [auto, .data, screen_render_util] + - [auto, .data, imgfx] + - [auto, .data, hud_element] + - [auto, .data, background] + - [auto, .data, audio/ambience] + - [auto, .data, windows] + - [auto, .data, audio/sfx] + - [auto, .data, audio/e0b30_len_b80] - name: evt dir: evt @@ -500,26 +905,233 @@ segments: start: 0xeb1a0 vram: 0x802c3000 subsegments: - - [0xeb1a0, bin] - - [0x102620] + - [auto, c, script_list] + - [auto, c, evt] + - [auto, c, map_api] + - [auto, c, cam_api] + - [auto, c, model_api] + - [auto, c, npc_api] + - [auto, c, msg_api] + - [auto, c, player_api] + - [auto, c, virtual_entity] + - [auto, c, f8f60_len_1560] + - [auto, c, audio_api] + - [auto, c, item_api] + - [auto, c, fx_api] + - [auto, c, demo_api] - name: entity type: code start: 0x102620 vram: 0x802dbd40 subsegments: - - [0x102620, bin] - - [0x10cc20] + - [auto, c, entity/Shadow] + - [auto, c, entity/SaveBlock] + - [auto, c, entity/Switch] + - [auto, c, entity/ShatteringBlock_common] + - [auto, c, entity/ShatteringBlock] + - [auto, c, entity/Block] + - [auto, c, entity/ItemBlock] + - [auto, c, entity/HeartBlock] + - [auto, c, entity/SuperBlock] + - [auto, c, entity/SimpleSpring] + - [auto, c, entity/HiddenPanel] + - [auto, c, entity/Chest] + - [auto, c, entity/WoodenCrate] + - [auto, c, entity/BlueWarpPipe] + - [auto, c, entity/Signpost] + - start: 0x10AA00 + type: .data + name: entity/Shadow + subsegments: + - [0x10AA00, i4, entity/shadow/square, 16, 16] + - [0x10AA80, i4, entity/shadow/circle, 16, 16] + - [0x10AB00, vtx, entity/vtx/shadow1] + - [0x10AB40, vtx, entity/vtx/shadow2] + - [0x10AB80, i4, entity/shadow/square_big, 32, 32] + - [0x10AD80, i4, entity/shadow/circle_big, 32, 32] + - [0x10AF80] + - [auto, .data, entity/SaveBlock] + - [auto, .data, entity/Switch] + - [auto, .data, entity/ShatteringBlock_common] + - [auto, .data, entity/ShatteringBlock] + - [auto, .data, entity/Block] + - [auto, .data, entity/ItemBlock] + - [auto, .data, entity/HeartBlock] + - [auto, .data, entity/SuperBlock] + - [auto, .data, entity/SimpleSpring] + - [auto, .data, entity/HiddenPanel] + - [auto, .data, entity/Chest] + - [auto, .data, entity/WoodenCrate] + - [auto, .data, entity/BlueWarpPipe] + - [auto, .data, entity/Signpost] - name: font_width type: code start: 0x10cc20 vram: 0x802e6380 subsegments: - - [0x10cc20, bin] - - [0x10f330] - - - [0x10f330, bin] + - [auto, c, msg_data] + - [auto, c, msg_img] + - [auto, .data, msg_data] + - start: 0x10D030 + type: .data + name: msg_img + subsegments: + - [auto, ci4, ui/msg/bubble_left, 32, 64, ui/msg/bubble_left] + - [auto, ci4, ui/msg/bubble_mid, 8, 64, ui/msg/bubble_left] + - [auto, ci4, ui/msg/bubble_right, 32, 64, ui/msg/bubble_left] + - [auto, ci4, ui/msg/arrow, 16, 16, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_1_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_1_2, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_1_3, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_1_4, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_1_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_2_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_2_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_3_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_3_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_4_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_4_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_5_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_5_2, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_5_3, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_5_4, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_a_5_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_1_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_1_2, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_1_3, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_1_4, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_1_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_2_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_2_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_3_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_3_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_4_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_4_5, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_5_1, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_5_2, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_5_3, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_5_4, 8, 8, ui/msg/bubble_left] + - [auto, ci4, ui/msg/frame_b_5_5, 8, 8, ui/msg/bubble_left] + # all 16 following palettes can be applied to all images above + - {start: auto, type: palette, name: ui/msg/bubble_left, size: 0x200} + #- [auto, palette, ui/msg/palette_0] + #- [auto, palette, ui/msg/palette_1] + #- [auto, palette, ui/msg/palette_2] + #- [auto, palette, ui/msg/palette_3] + #- [auto, palette, ui/msg/palette_4] + #- [auto, palette, ui/msg/palette_5] + #- [auto, palette, ui/msg/palette_6] + #- [auto, palette, ui/msg/palette_7] + #- [auto, palette, ui/msg/palette_8] + #- [auto, palette, ui/msg/palette_9] + #- [auto, palette, ui/msg/palette_A] + #- [auto, palette, ui/msg/palette_B] + #- [auto, palette, ui/msg/palette_C] + #- [auto, palette, ui/msg/palette_D] + #- [auto, palette, ui/msg/palette_E] + #- [auto, palette, ui/msg/palette_F] + - [auto, ci4, ui/msg/sign_corner_topleft, 16, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_corner_topright, 16, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_corner_bottomleft, 16, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_corner_bottomright, 16, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/lamppost_corner_bottomright, 16, 16, ui/msg/lamppost_corner_bottomright] + - [auto, ci4, ui/msg/sign_side_top, 32, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_side_left, 16, 40, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_side_right, 16, 40, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_side_bottom, 32, 16, ui/msg/sign_corner_topleft] + - [auto, ci4, ui/msg/sign_fill, 8, 8, ui/msg/sign_corner_topleft] + # these two palettes can be applied to all sign and lamppost frame images + - [auto, palette, ui/msg/sign_corner_topleft] + - [auto, palette, ui/msg/lamppost_corner_bottomright] + - [auto, i4, ui/msg/background, 64, 64] + - [auto, ci4, ui/msg/rewind_arrow, 24, 24] + - [auto, palette, ui/msg/rewind_arrow] + - [auto, rgba16, ui/msg/star, 16, 18] + - [auto, i4, ui/msg/star_silhouette, 16, 20] + - type: group + dir: charset + vram: 0 + start: 0x10F330 + subsegments: + - [0x10F330, linker_offset, kana] + - [0x10F330, pm_charset, kana, 16, 14, 0xC7, standard] + - [0x114A40, linker_offset, latin] + - [0x114A40, pm_charset, latin, 16, 14, 0x1B, standard] + - [0x115610, linker_offset, kanji] + - [0x115610, pm_charset, kanji, 16, 14, 0x79, standard] + - [0x118B00, linker_offset, buttons] + - [0x118B00, pm_charset, buttons, 16, 14, 0xA, standard] + - [0x118F60, linker_offset, menu_kana] + - [0x118F60, pm_charset, menu_kana, 12, 12, 0xC8, standard] + - [0x11C7A0, linker_offset, menu_latin] + - [0x11C7A0, pm_charset, menu_latin, 12, 12, 0x1B, standard] + - [0x11CF38, linker_offset, standard_pal] + - [0x11CF38, pm_charset_palettes, standard, 0x50] + - [0x11D438, linker_offset, title] + - [0x11D438, pm_charset, title, 12, 15, 0x29] + - [0x11E398, linker_offset, subtitle] + - [0x11E398, pm_charset, subtitle, 12, 12, 0x29] + - [0x11EF20, linker_offset, credits_pal] + - [0x11EF20, pm_charset_palettes, subtitle, 1] + - [0x11EF30, pm_charset_palettes, title, 1] + - [0x11EF40, ci8, peach_letter, 150, 105] + - [0x122CC8, palette, peach_letter] + - [0x122EC8, linker_offset, postcard] + - [0x122EC8, ci4, postcard, 150, 105] + - [0x124D90, linker_offset, postcard_pal] + - [0x124D90, palette, postcard] + - [0x124DB0, linker_offset, letter_content_1] + - [0x124DB0, ci8, letter_content_1, 70, 95] + - [0x1267B0, linker_offset, letter_content_1_pal] + - [0x1267B0, palette, letter_content_1] + - [0x1269B0, linker_offset, letter_content_2] + - [0x1269B0, ci8, letter_content_2, 70, 95] + - [0x1283B0, linker_offset, letter_content_2_pal] + - [0x1283B0, palette, letter_content_2] + - [0x1285B0, linker_offset, letter_content_3] + - [0x1285B0, ci8, letter_content_3, 70, 95] + - [0x129FB0, linker_offset, letter_content_3_pal] + - [0x129FB0, palette, letter_content_3] + - [0x12A1B0, linker_offset, letter_content_4] + - [0x12A1B0, ci8, letter_content_4, 70, 95] + - [0x12BBB0, linker_offset, letter_content_4_pal] + - [0x12BBB0, palette, letter_content_4] + - [0x12BDB0, linker_offset, letter_content_5] + - [0x12BDB0, ci8, letter_content_5, 70, 95] + - [0x12D7B0, linker_offset, letter_content_5_pal] + - [0x12D7B0, palette, letter_content_5] + - [0x12D9B0, linker_offset, letter_content_6] + - [0x12D9B0, ci8, letter_content_6, 70, 95] + - [0x12F3B0, linker_offset, letter_content_6_pal] + - [0x12F3B0, palette, letter_content_6] + - [0x12F5B0, linker_offset, letter_content_7] + - [0x12F5B0, ci8, letter_content_7, 70, 95] + - [0x130FB0, linker_offset, letter_content_7_pal] + - [0x130FB0, palette, letter_content_7] + - [0x1311B0, linker_offset, letter_content_8] + - [0x1311B0, ci8, letter_content_8, 70, 95] + - [0x132BB0, linker_offset, letter_content_8_pal] + - [0x132BB0, palette, letter_content_8] + - [0x132DB0, linker_offset, letter_content_9] + - [0x132DB0, ci8, letter_content_9, 70, 95] + - [0x1347B0, linker_offset, letter_content_9_pal] + - [0x1347B0, palette, letter_content_9] + - [0x1349B0, linker_offset, letter_content_10] + - [0x1349B0, ci8, letter_content_10, 70, 95] + - [0x1363B0, linker_offset, letter_content_10_pal] + - [0x1363B0, palette, letter_content_10] + - [0x1365B0, linker_offset, letter_content_11] + - [0x1365B0, ci8, letter_content_11, 70, 95] + - [0x137FB0, linker_offset, letter_content_11_pal] + - [0x137FB0, palette, letter_content_11] + - [0x1381B0, linker_offset, letter_content_12] + - [0x1381B0, ci8, letter_content_12, 70, 95] + - [0x139BB0, linker_offset, letter_content_12_pal] + - [0x139BB0, palette, letter_content_12] + - [0x139DB0] + - [0x139DB0, bin] - name: battle_code type: bin diff --git a/ver/jp/symbol_addrs.txt b/ver/jp/symbol_addrs.txt index 5b84a61625..26ec259f6e 100644 --- a/ver/jp/symbol_addrs.txt +++ b/ver/jp/symbol_addrs.txt @@ -323,3 +323,2682 @@ evt_get_variable = 0x802C7ABC; heap_generalHead = 0x802FB800; heap_battleHead = 0x803DA800; obfuscated_obfuscation_shims_ROM_START = 0xF79E611F; + +ui_input_a_button_unpressed_png = 0x800F8690; // rom:0x91B40 +ui_input_a_button_unpressed_pal = 0x800F8A50; // rom:0x91F00 +ui_input_a_button_pressed_png = 0x800F8A70; // rom:0x91F20 +ui_input_a_button_pressed_pal = 0x800F8E30; // rom:0x922E0 +ui_input_analog_stick_png = 0x800F8E50; // rom:0x92300 +ui_input_analog_stick_pal = 0x800F9050; // rom:0x92500 +ui_input_analog_stick_left_png = 0x800F9070; // rom:0x92520 +ui_input_analog_stick_left_pal = 0x800F92F0; // rom:0x927A0 +ui_input_analog_stick2_png = 0x800F9310; // rom:0x927C0 +ui_input_analog_stick2_pal = 0x800F9510; // rom:0x929C0 +ui_input_analog_stick_right_png = 0x800F9530; // rom:0x929E0 +ui_input_analog_stick_right_pal = 0x800F97B0; // rom:0x92C60 +ui_input_analog_stick3_png = 0x800F97D0; // rom:0x92C80 +ui_input_analog_stick3_pal = 0x800F99D0; // rom:0x92E80 +ui_input_analog_stick_down_png = 0x800F99F0; // rom:0x92EA0 +ui_input_analog_stick_down_pal = 0x800F9BF0; // rom:0x930A0 +ui_input_analog_stick_up_png = 0x800F9C10; // rom:0x930C0 +ui_input_analog_stick_up_pal = 0x800F9E10; // rom:0x932C0 +ui_unk_bar_png = 0x800F9E30; // rom:0x932E0 +ui_unk_bar_pal = 0x800FA070; // rom:0x93520 +ui_ok_png = 0x800FA090; // rom:0x93540 +ui_ok_pal = 0x800FA150; // rom:0x93600 +ui_input_start_button_png = 0x800FA170; // rom:0x93620 +ui_input_start_button_pal = 0x800FA530; // rom:0x939E0 +ui_input_start_button2_png = 0x800FA550; // rom:0x93A00 +ui_input_start_button2_pal = 0x800FA910; // rom:0x93DC0 +ui_input_start_text_png = 0x800FA930; // rom:0x93DE0 +ui_input_start_text_pal = 0x800FA990; // rom:0x93E40 +ui_hammer_png = 0x800FA9B0; // rom:0x93E60 +ui_hammer_pal = 0x800FABB0; // rom:0x94060 +ui_hammer_disabled_pal = 0x800FABD0; // rom:0x94080 +ui_super_hammer_png = 0x800FABF0; // rom:0x940A0 +ui_super_hammer_pal = 0x800FADF0; // rom:0x942A0 +ui_super_hammer_disabled_pal = 0x800FAE10; // rom:0x942C0 +ui_ultra_hammer_png = 0x800FAE30; // rom:0x942E0 +ui_ultra_hammer_pal = 0x800FB030; // rom:0x944E0 +ui_ultra_hammer_disabled_pal = 0x800FB050; // rom:0x94500 +ui_boots_png = 0x800FB070; // rom:0x94520 +ui_boots_pal = 0x800FB270; // rom:0x94720 +ui_boots_disabled_pal = 0x800FB290; // rom:0x94740 +ui_super_boots_png = 0x800FB2B0; // rom:0x94760 +ui_super_boots_pal = 0x800FB4B0; // rom:0x94960 +ui_super_boots_disabled_pal = 0x800FB4D0; // rom:0x94980 +ui_ultra_boots_png = 0x800FB4F0; // rom:0x949A0 +ui_ultra_boots_pal = 0x800FB6F0; // rom:0x94BA0 +ui_ultra_boots_disabled_pal = 0x800FB710; // rom:0x94BC0 +ui_item_png = 0x800FB730; // rom:0x94BE0 +ui_item_pal = 0x800FB930; // rom:0x94DE0 +ui_item_disabled_pal = 0x800FB950; // rom:0x94E00 +ui_star_spirit_png = 0x800FB970; // rom:0x94E20 +ui_star_spirit_pal = 0x800FBB70; // rom:0x95020 +ui_star_spirit_disabled_pal = 0x800FBB90; // rom:0x95040 +ui_arrow_left_png = 0x800FBBB0; // rom:0x95060 +ui_arrow_left_pal = 0x800FBC30; // rom:0x950E0 +ui_arrow_right_png = 0x800FBC50; // rom:0x95100 +ui_arrow_right_pal = 0x800FBCD0; // rom:0x95180 +ui_point_right_png = 0x800FBCF0; // rom:0x951A0 +ui_point_right_pal = 0x800FBD70; // rom:0x95220 +ui_pip_png = 0x800FBD90; // rom:0x95240 +ui_pip_pal = 0x800FBDB0; // rom:0x95260 +ui_pip2_png = 0x800FBDD0; // rom:0x95280 +ui_pip2_pal = 0x800FBDF0; // rom:0x952A0 +ui_coin_sparkle_0_png = 0x800FBE10; // rom:0x952C0 +ui_coin_sparkle_0_pal = 0x800FBE30; // rom:0x952E0 +ui_coin_sparkle_1_png = 0x800FBE50; // rom:0x95300 +ui_coin_sparkle_1_pal = 0x800FBE70; // rom:0x95320 +ui_coin_sparkle_2_png = 0x800FBE90; // rom:0x95340 +ui_coin_sparkle_2_pal = 0x800FBEB0; // rom:0x95360 +ui_coin_sparkle_3_png = 0x800FBED0; // rom:0x95380 +ui_coin_sparkle_3_pal = 0x800FBEF0; // rom:0x953A0 +ui_coin_sparkle_4_png = 0x800FBF10; // rom:0x953C0 +ui_coin_sparkle_4_pal = 0x800FBF30; // rom:0x953E0 +ui_coin_sparkle_5_png = 0x800FBF50; // rom:0x95400 +ui_coin_sparkle_5_pal = 0x800FBF70; // rom:0x95420 +ui_coin_sparkle_none_png = 0x800FBF90; // rom:0x95440 +ui_coin_sparkle_none_pal = 0x800FBFB0; // rom:0x95460 +ui_status_star_point_shine_png = 0x800FBFD0; // rom:0x95480 +ui_status_star_piece_0_png = 0x800FC210; // rom:0x956C0 +ui_status_star_piece_0_pal = 0x800FC290; // rom:0x95740 +ui_status_star_piece_1_png = 0x800FC2B0; // rom:0x95760 +ui_status_star_piece_1_pal = 0x800FC330; // rom:0x957E0 +ui_status_star_piece_2_png = 0x800FC350; // rom:0x95800 +ui_status_star_piece_2_pal = 0x800FC3D0; // rom:0x95880 +ui_menu_times_png = 0x800FC3F0; // rom:0x958A0 +ui_menu_times_pal = 0x800FC410; // rom:0x958C0 +ui_fp_cost_png = 0x800FC430; // rom:0x958E0 +ui_fp_cost_pal = 0x800FC470; // rom:0x95920 +ui_fp_cost_reduced_pal = 0x800FC490; // rom:0x95940 +ui_fp_cost_reduced_twice_pal = 0x800FC4B0; // rom:0x95960 +ui_fp_cost_notenough_pal = 0x800FC4D0; // rom:0x95980 +ui_pow_cost_png = 0x800FC4F0; // rom:0x959A0 +ui_pow_cost_pal = 0x800FC530; // rom:0x959E0 +ui_pow_cost_reduced_pal = 0x800FC550; // rom:0x95A00 +ui_pow_cost_reduced_twice_pal = 0x800FC570; // rom:0x95A20 +ui_pow_cost_notenough_pal = 0x800FC590; // rom:0x95A40 +ui_green_arrow_down_png = 0x800FC5B0; // rom:0x95A60 +ui_green_arrow_down_pal = 0x800FC5F0; // rom:0x95AA0 +ui_green_arrow_up_png = 0x800FC610; // rom:0x95AC0 +ui_green_arrow_up_pal = 0x800FC650; // rom:0x95B00 +ui_kaime_png = 0x800FC670; // rom:0x95B20 +ui_kaime_pal = 0x800FC910; // rom:0x95DC0 +ui_unused_1_png = 0x800FC930; // rom:0x95DE0 +ui_unused_1_pal = 0x800FC9B0; // rom:0x95E60 +ui_unused_2_png = 0x800FC9D0; // rom:0x95E80 +ui_unused_2_pal = 0x800FCA50; // rom:0x95F00 +ui_unused_3_png = 0x800FCA70; // rom:0x95F20 +ui_unused_3_pal = 0x800FCAF0; // rom:0x95FA0 +ui_red_bar1_png = 0x800FCB10; // rom:0x95FC0 +ui_red_bar1_pal = 0x800FCCD0; // rom:0x96180 +ui_empty_bar_png = 0x800FCCF0; // rom:0x961A0 +ui_empty_bar_pal = 0x800FCEB0; // rom:0x96360 +ui_red_bar2_png = 0x800FCED0; // rom:0x96380 +ui_red_bar2_pal = 0x800FD070; // rom:0x96520 +ui_eldstar_png = 0x800FD090; // rom:0x96540 +ui_eldstar_pal = 0x800FD290; // rom:0x96740 +ui_eldstar_disabled_pal = 0x800FD2B0; // rom:0x96760 +ui_mamar_png = 0x800FD2D0; // rom:0x96780 +ui_mamar_pal = 0x800FD4D0; // rom:0x96980 +ui_mamar_disabled_pal = 0x800FD4F0; // rom:0x969A0 +ui_skolar_png = 0x800FD510; // rom:0x969C0 +ui_skolar_pal = 0x800FD710; // rom:0x96BC0 +ui_skolar_disabled_pal = 0x800FD730; // rom:0x96BE0 +ui_muskular_png = 0x800FD750; // rom:0x96C00 +ui_muskular_pal = 0x800FD950; // rom:0x96E00 +ui_muskular_disabled_pal = 0x800FD970; // rom:0x96E20 +ui_misstar_png = 0x800FD990; // rom:0x96E40 +ui_misstar_pal = 0x800FDB90; // rom:0x97040 +ui_misstar_disabled_pal = 0x800FDBB0; // rom:0x97060 +ui_klevar_png = 0x800FDBD0; // rom:0x97080 +ui_klevar_pal = 0x800FDDD0; // rom:0x97280 +ui_klevar_disabled_pal = 0x800FDDF0; // rom:0x972A0 +ui_kalmar_png = 0x800FDE10; // rom:0x972C0 +ui_kalmar_pal = 0x800FE010; // rom:0x974C0 +ui_kalmar_disabled_pal = 0x800FE030; // rom:0x974E0 +ui_star_beam_png = 0x800FE050; // rom:0x97500 +ui_star_beam_pal = 0x800FE250; // rom:0x97700 +ui_star_beam_disabled_pal = 0x800FE270; // rom:0x97720 +ui_peach_beam_png = 0x800FE290; // rom:0x97740 +ui_peach_beam_pal = 0x800FE490; // rom:0x97940 +ui_peach_beam_disabled_pal = 0x800FE4B0; // rom:0x97960 +ui_mario_head_png = 0x800FE4D0; // rom:0x97980 +ui_mario_head_pal = 0x800FE550; // rom:0x97A00 +ui_partner0_png = 0x800FE570; // rom:0x97A20 +ui_partner0_pal = 0x800FE770; // rom:0x97C20 +ui_partner0_disabled_pal = 0x800FE790; // rom:0x97C40 +ui_goombario_png = 0x800FE7B0; // rom:0x97C60 +ui_goombario_pal = 0x800FE9B0; // rom:0x97E60 +ui_goombario_disabled_pal = 0x800FE9D0; // rom:0x97E80 +ui_kooper_png = 0x800FE9F0; // rom:0x97EA0 +ui_kooper_pal = 0x800FEBF0; // rom:0x980A0 +ui_kooper_disabled_pal = 0x800FEC10; // rom:0x980C0 +ui_bombette_png = 0x800FEC30; // rom:0x980E0 +ui_bombette_pal = 0x800FEE30; // rom:0x982E0 +ui_bombette_disabled_pal = 0x800FEE50; // rom:0x98300 +ui_parakarry_png = 0x800FEE70; // rom:0x98320 +ui_parakarry_pal = 0x800FF070; // rom:0x98520 +ui_parakarry_disabled_pal = 0x800FF090; // rom:0x98540 +ui_bow_png = 0x800FF0B0; // rom:0x98560 +ui_bow_pal = 0x800FF2B0; // rom:0x98760 +ui_bow_disabled_pal = 0x800FF2D0; // rom:0x98780 +ui_watt_png = 0x800FF2F0; // rom:0x987A0 +ui_watt_pal = 0x800FF4F0; // rom:0x989A0 +ui_watt_disabled_pal = 0x800FF510; // rom:0x989C0 +ui_sushie_png = 0x800FF530; // rom:0x989E0 +ui_sushie_pal = 0x800FF730; // rom:0x98BE0 +ui_sushie_disabled_pal = 0x800FF750; // rom:0x98C00 +ui_lakilester_png = 0x800FF770; // rom:0x98C20 +ui_lakilester_pal = 0x800FF970; // rom:0x98E20 +ui_lakilester_disabled_pal = 0x800FF990; // rom:0x98E40 +ui_partner9_png = 0x800FF9B0; // rom:0x98E60 +ui_partner9_pal = 0x800FFBB0; // rom:0x99060 +ui_partner9_disabled_pal = 0x800FFBD0; // rom:0x99080 +ui_partner10_png = 0x800FFBF0; // rom:0x990A0 +ui_partner10_pal = 0x800FFDF0; // rom:0x992A0 +ui_partner10_disabled_pal = 0x800FFE10; // rom:0x992C0 +ui_partner11_png = 0x800FFE30; // rom:0x992E0 +ui_partner11_pal = 0x80100030; // rom:0x994E0 +ui_partner11_disabled_pal = 0x80100050; // rom:0x99500 +ui_status_text_times_png = 0x80100070; // rom:0x99520 +ui_status_text_times_pal = 0x80100090; // rom:0x99540 +ui_status_text_slash_png = 0x801000B0; // rom:0x99560 +ui_status_text_slash_pal = 0x801000F0; // rom:0x995A0 +ui_status_text_0_png = 0x80100110; // rom:0x995C0 +ui_status_text_0_pal = 0x80100190; // rom:0x99640 +ui_status_text_1_png = 0x801001B0; // rom:0x99660 +ui_status_text_1_pal = 0x80100230; // rom:0x996E0 +ui_status_text_2_png = 0x80100250; // rom:0x99700 +ui_status_text_2_pal = 0x801002D0; // rom:0x99780 +ui_status_text_3_png = 0x801002F0; // rom:0x997A0 +ui_status_text_3_pal = 0x80100370; // rom:0x99820 +ui_status_text_4_png = 0x80100390; // rom:0x99840 +ui_status_text_4_pal = 0x80100410; // rom:0x998C0 +ui_status_text_5_png = 0x80100430; // rom:0x998E0 +ui_status_text_5_pal = 0x801004B0; // rom:0x99960 +ui_status_text_6_png = 0x801004D0; // rom:0x99980 +ui_status_text_6_pal = 0x80100550; // rom:0x99A00 +ui_status_text_7_png = 0x80100570; // rom:0x99A20 +ui_status_text_7_pal = 0x801005F0; // rom:0x99AA0 +ui_status_text_8_png = 0x80100610; // rom:0x99AC0 +ui_status_text_8_pal = 0x80100690; // rom:0x99B40 +ui_status_text_9_png = 0x801006B0; // rom:0x99B60 +ui_status_text_9_pal = 0x80100730; // rom:0x99BE0 +ui_status_text_hp_png = 0x80100750; // rom:0x99C00 +ui_status_text_hp_pal = 0x801007D0; // rom:0x99C80 +ui_status_text_fp_png = 0x801007F0; // rom:0x99CA0 +ui_status_text_fp_pal = 0x80100870; // rom:0x99D20 +ui_status_pow_unit_1_png = 0x80100890; // rom:0x99D40 +ui_status_pow_unit_1_pal = 0x801008B0; // rom:0x99D60 +ui_status_pow_unit_2_png = 0x801008D0; // rom:0x99D80 +ui_status_pow_unit_2_pal = 0x801008F0; // rom:0x99DA0 +ui_status_pow_unit_3_png = 0x80100910; // rom:0x99DC0 +ui_status_pow_unit_3_pal = 0x80100930; // rom:0x99DE0 +ui_status_pow_unit_4_png = 0x80100950; // rom:0x99E00 +ui_status_pow_unit_4_pal = 0x80100970; // rom:0x99E20 +ui_status_pow_unit_5_png = 0x80100990; // rom:0x99E40 +ui_status_pow_unit_5_pal = 0x801009B0; // rom:0x99E60 +ui_status_pow_unit_6_png = 0x801009D0; // rom:0x99E80 +ui_status_pow_unit_6_pal = 0x801009F0; // rom:0x99EA0 +ui_status_pow_unit_7_png = 0x80100A10; // rom:0x99EC0 +ui_status_pow_unit_7_pal = 0x80100A30; // rom:0x99EE0 +ui_status_pow_unit_empty_png = 0x80100A50; // rom:0x99F00 +ui_status_pow_unit_empty_pal = 0x80100A70; // rom:0x99F20 +ui_status_pow_star_1_png = 0x80100A90; // rom:0x99F40 +ui_status_pow_star_1_pal = 0x80100AB0; // rom:0x99F60 +ui_status_pow_star_2_png = 0x80100AD0; // rom:0x99F80 +ui_status_pow_star_2_pal = 0x80100AF0; // rom:0x99FA0 +ui_status_pow_star_3_png = 0x80100B10; // rom:0x99FC0 +ui_status_pow_star_3_pal = 0x80100B30; // rom:0x99FE0 +ui_status_pow_star_4_png = 0x80100B50; // rom:0x9A000 +ui_status_pow_star_4_pal = 0x80100B70; // rom:0x9A020 +ui_status_pow_star_5_png = 0x80100B90; // rom:0x9A040 +ui_status_pow_star_5_pal = 0x80100BB0; // rom:0x9A060 +ui_status_pow_star_6_png = 0x80100BD0; // rom:0x9A080 +ui_status_pow_star_6_pal = 0x80100BF0; // rom:0x9A0A0 +ui_status_pow_star_7_png = 0x80100C10; // rom:0x9A0C0 +ui_status_pow_star_7_pal = 0x80100C30; // rom:0x9A0E0 +ui_status_pow_star_empty_png = 0x80100C50; // rom:0x9A100 +ui_status_pow_star_empty_pal = 0x80100C70; // rom:0x9A120 +ui_status_coin_0_png = 0x80100C90; // rom:0x9A140 +ui_status_coin_0_pal = 0x80100D10; // rom:0x9A1C0 +ui_status_coin_1_png = 0x80100D30; // rom:0x9A1E0 +ui_status_coin_1_pal = 0x80100DB0; // rom:0x9A260 +ui_status_coin_2_png = 0x80100DD0; // rom:0x9A280 +ui_status_coin_2_pal = 0x80100E50; // rom:0x9A300 +ui_status_coin_3_png = 0x80100E70; // rom:0x9A320 +ui_status_coin_3_pal = 0x80100EF0; // rom:0x9A3A0 +ui_status_coin_4_png = 0x80100F10; // rom:0x9A3C0 +ui_status_coin_4_pal = 0x80100F90; // rom:0x9A440 +ui_status_coin_5_png = 0x80100FB0; // rom:0x9A460 +ui_status_coin_5_pal = 0x80101030; // rom:0x9A4E0 +ui_status_coin_6_png = 0x80101050; // rom:0x9A500 +ui_status_coin_6_pal = 0x801010D0; // rom:0x9A580 +ui_status_coin_7_png = 0x801010F0; // rom:0x9A5A0 +ui_status_coin_7_pal = 0x80101170; // rom:0x9A620 +ui_status_coin_8_png = 0x80101190; // rom:0x9A640 +ui_status_coin_8_pal = 0x80101210; // rom:0x9A6C0 +ui_status_coin_9_png = 0x80101230; // rom:0x9A6E0 +ui_status_coin_9_pal = 0x801012B0; // rom:0x9A760 +ui_status_star_point_0_png = 0x801012D0; // rom:0x9A780 +ui_status_star_point_0_pal = 0x80101350; // rom:0x9A800 +ui_status_star_point_1_png = 0x80101370; // rom:0x9A820 +ui_status_star_point_1_pal = 0x801013F0; // rom:0x9A8A0 +ui_status_star_point_2_png = 0x80101410; // rom:0x9A8C0 +ui_status_star_point_2_pal = 0x80101490; // rom:0x9A940 +ui_status_star_point_3_png = 0x801014B0; // rom:0x9A960 +ui_status_star_point_3_pal = 0x80101530; // rom:0x9A9E0 +ui_status_star_point_4_png = 0x80101550; // rom:0x9AA00 +ui_status_star_point_4_pal = 0x801015D0; // rom:0x9AA80 +ui_status_star_point_5_png = 0x801015F0; // rom:0x9AAA0 +ui_status_star_point_5_pal = 0x80101670; // rom:0x9AB20 +ui_status_star_point_6_png = 0x80101690; // rom:0x9AB40 +ui_status_star_point_6_pal = 0x80101710; // rom:0x9ABC0 +ui_status_star_point_7_png = 0x80101730; // rom:0x9ABE0 +ui_status_star_point_7_pal = 0x801017B0; // rom:0x9AC60 +ui_bluepip_png = 0x801017D0; // rom:0x9AC80 +ui_bluepip_pal = 0x80101850; // rom:0x9AD00 +ui_bluepip2_png = 0x80101870; // rom:0x9AD20 +ui_bluepip2_pal = 0x801018F0; // rom:0x9ADA0 +ui_battle_status_charge_jump_png = 0x80101910; // rom:0x9ADC0 +ui_battle_status_charge_jump_pal = 0x80101A30; // rom:0x9AEE0 +ui_battle_status_charge_hammer_png = 0x80101A50; // rom:0x9AF00 +ui_battle_status_charge_hammer_pal = 0x80101B70; // rom:0x9B020 +ui_battle_status_charge_goombario_png = 0x80101B90; // rom:0x9B040 +ui_battle_status_charge_goombario_pal = 0x80101CB0; // rom:0x9B160 +ui_battle_status_exclamation_png = 0x80101CD0; // rom:0x9B180 +ui_battle_status_exclamation_pal = 0x80101DF0; // rom:0x9B2A0 +ui_battle_status_sleep_0_png = 0x80101E10; // rom:0x9B2C0 +ui_battle_status_sleep_0_pal = 0x80101E90; // rom:0x9B340 +ui_battle_status_sleep_1_png = 0x80101EB0; // rom:0x9B360 +ui_battle_status_sleep_1_pal = 0x80101F30; // rom:0x9B3E0 +ui_battle_status_sleep_2_png = 0x80101F50; // rom:0x9B400 +ui_battle_status_sleep_2_pal = 0x80101FD0; // rom:0x9B480 +ui_battle_status_static_0_png = 0x80101FF0; // rom:0x9B4A0 +ui_battle_status_static_0_pal = 0x80102070; // rom:0x9B520 +ui_battle_status_static_1_png = 0x80102090; // rom:0x9B540 +ui_battle_status_static_1_pal = 0x80102110; // rom:0x9B5C0 +ui_battle_status_paralyze_0_png = 0x80102130; // rom:0x9B5E0 +ui_battle_status_paralyze_0_pal = 0x801021B0; // rom:0x9B660 +ui_battle_status_paralyze_1_png = 0x801021D0; // rom:0x9B680 +ui_battle_status_paralyze_1_pal = 0x80102250; // rom:0x9B700 +ui_battle_status_dizzy_0_png = 0x80102270; // rom:0x9B720 +ui_battle_status_dizzy_0_pal = 0x801022F0; // rom:0x9B7A0 +ui_battle_status_dizzy_1_png = 0x80102310; // rom:0x9B7C0 +ui_battle_status_dizzy_1_pal = 0x80102390; // rom:0x9B840 +ui_battle_status_dizzy_2_png = 0x801023B0; // rom:0x9B860 +ui_battle_status_dizzy_2_pal = 0x80102430; // rom:0x9B8E0 +ui_battle_status_dizzy_3_png = 0x80102450; // rom:0x9B900 +ui_battle_status_dizzy_3_pal = 0x801024D0; // rom:0x9B980 +ui_battle_status_poison_0_png = 0x801024F0; // rom:0x9B9A0 +ui_battle_status_poison_0_pal = 0x80102570; // rom:0x9BA20 +ui_battle_status_poison_1_png = 0x80102590; // rom:0x9BA40 +ui_battle_status_poison_1_pal = 0x80102610; // rom:0x9BAC0 +ui_battle_status_frozen_0_png = 0x80102630; // rom:0x9BAE0 +ui_battle_status_frozen_0_pal = 0x801026B0; // rom:0x9BB60 +ui_battle_status_frozen_1_png = 0x801026D0; // rom:0x9BB80 +ui_battle_status_frozen_1_pal = 0x80102750; // rom:0x9BC00 +ui_battle_status_frozen_2_png = 0x80102770; // rom:0x9BC20 +ui_battle_status_frozen_2_pal = 0x801027F0; // rom:0x9BCA0 +ui_battle_status_frozen_3_png = 0x80102810; // rom:0x9BCC0 +ui_battle_status_frozen_3_pal = 0x80102890; // rom:0x9BD40 +ui_battle_status_stop_0_png = 0x801028B0; // rom:0x9BD60 +ui_battle_status_stop_0_pal = 0x80102930; // rom:0x9BDE0 +ui_battle_status_stop_1_png = 0x80102950; // rom:0x9BE00 +ui_battle_status_stop_1_pal = 0x801029D0; // rom:0x9BE80 +ui_battle_status_stop_2_png = 0x801029F0; // rom:0x9BEA0 +ui_battle_status_stop_2_pal = 0x80102A70; // rom:0x9BF20 +ui_battle_status_stop_3_png = 0x80102A90; // rom:0x9BF40 +ui_battle_status_stop_3_pal = 0x80102B10; // rom:0x9BFC0 +ui_battle_status_pdown_0_png = 0x80102B30; // rom:0x9BFE0 +ui_battle_status_pdown_0_pal = 0x80102BB0; // rom:0x9C060 +ui_battle_status_pdown_1_png = 0x80102BD0; // rom:0x9C080 +ui_battle_status_pdown_1_pal = 0x80102C50; // rom:0x9C100 +ui_battle_status_shrink_0_png = 0x80102C70; // rom:0x9C120 +ui_battle_status_shrink_0_pal = 0x80102CF0; // rom:0x9C1A0 +ui_battle_status_shrink_1_png = 0x80102D10; // rom:0x9C1C0 +ui_battle_status_shrink_1_pal = 0x80102D90; // rom:0x9C240 +ui_battle_status_shrink_2_png = 0x80102DB0; // rom:0x9C260 +ui_battle_status_shrink_2_pal = 0x80102E30; // rom:0x9C2E0 +ui_battle_status_shrink_3_png = 0x80102E50; // rom:0x9C300 +ui_battle_status_shrink_3_pal = 0x80102ED0; // rom:0x9C380 +ui_battle_status_transparent_0_png = 0x80102EF0; // rom:0x9C3A0 +ui_battle_status_transparent_0_pal = 0x80102F70; // rom:0x9C420 +ui_battle_status_transparent_1_png = 0x80102F90; // rom:0x9C440 +ui_battle_status_transparent_1_pal = 0x80103010; // rom:0x9C4C0 +ui_battle_status_transparent_2_png = 0x80103030; // rom:0x9C4E0 +ui_battle_status_transparent_2_pal = 0x801030B0; // rom:0x9C560 +ui_battle_status_transparent_3_png = 0x801030D0; // rom:0x9C580 +ui_battle_status_transparent_3_pal = 0x80103150; // rom:0x9C600 +ui_battle_status_transparent_4_png = 0x80103170; // rom:0x9C620 +ui_battle_status_transparent_4_pal = 0x801031F0; // rom:0x9C6A0 +ui_battle_status_transparent_5_png = 0x80103210; // rom:0x9C6C0 +ui_battle_status_transparent_5_pal = 0x80103290; // rom:0x9C740 +ui_battle_status_peril_png = 0x801032B0; // rom:0x9C760 +ui_battle_status_peril_pal = 0x801033F0; // rom:0x9C8A0 +ui_battle_status_danger_png = 0x80103410; // rom:0x9C8C0 +ui_battle_status_danger_pal = 0x80103550; // rom:0x9CA00 +ui_battle_status_refund_png = 0x80103570; // rom:0x9CA20 +ui_battle_status_refund_pal = 0x80103750; // rom:0x9CC00 +ui_battle_status_happy_png = 0x80103770; // rom:0x9CC20 +ui_battle_status_happy_pal = 0x801038B0; // rom:0x9CD60 +ui_battle_status_hp_drain_png = 0x801038D0; // rom:0x9CD80 +ui_battle_status_hp_drain_pal = 0x80103A10; // rom:0x9CEC0 +ui_move_basic_png = 0x80103A30; // rom:0x9CEE0 +ui_move_basic_pal = 0x80103C30; // rom:0x9D0E0 +ui_move_basic_disabled_pal = 0x80103C50; // rom:0x9D100 +ui_move_partner_1_png = 0x80103C70; // rom:0x9D120 +ui_move_partner_1_pal = 0x80103E70; // rom:0x9D320 +ui_move_partner_1_disabled_pal = 0x80103E90; // rom:0x9D340 +ui_move_partner_2_png = 0x80103EB0; // rom:0x9D360 +ui_move_partner_2_pal = 0x801040B0; // rom:0x9D560 +ui_move_partner_2_disabled_pal = 0x801040D0; // rom:0x9D580 +ui_move_partner_3_png = 0x801040F0; // rom:0x9D5A0 +ui_move_partner_3_pal = 0x801042F0; // rom:0x9D7A0 +ui_move_partner_3_disabled_pal = 0x80104310; // rom:0x9D7C0 +ui_stat_heart_png = 0x80104338; // rom:0x9D7E8 +ui_stat_flower_png = 0x80104740; // rom:0x9DBF0 +D_801094B0 = 0x80109640; // rom:0xA2AF0 +D_801096C0 = 0x80109850; // rom:0xA2D00 +D_80109710 = 0x801098A0; // rom:0xA2D50 +D_801097D8 = 0x80109968; // rom:0xA2E18 +ui_box_corners9_png = 0x80109B30; // rom:0xA2FE0 +ui_box_corners8_png = 0x80109F30; // rom:0xA33E0 +ui_box_corners6_png = 0x8010A830; // rom:0xA3CE0 +ui_box_corners7_png = 0x8010AAB0; // rom:0xA3F60 +ui_box_corners3_png = 0x8010ACB0; // rom:0xA4160 +ui_box_corners5_png = 0x8010B2B0; // rom:0xA4760 +ui_box_corners4_png = 0x8010B4B0; // rom:0xA4960 +ui_box_bg_tile_png = 0x8010B5B0; // rom:0xA4A60 +ui_box_corners1_png = 0x8010B630; // rom:0xA4AE0 +ui_box_corners2_png = 0x8010BA30; // rom:0xA4EE0 +ui_box_bg_flat_png = 0x8010BC30; // rom:0xA50E0 +vtx_drawbox1 = 0x8010BD18; // rom:0xA51C8 +PopupMenu_WasStatusBarIgnoringChanges = 0x8010D85A; +draw_number = 0x8012C8B0; // type:func rom:0xC1740 +PopupNotDipping = 0x8010D858; +create_worker_frontUI = 0x8012844C; // type:func rom:0xBD2DC +PopupMenu_TimesHEID = 0x8010D824; +get_msg_width = 0x8012B6D4; // type:func rom:0xC0564 +hud_element_create = 0x80146554; // type:func rom:0xDB3E4 +HES_GreenArrowDown = 0x80107928; // rom:0xA0DD8 +PopupMenu_DownArrowHEID = 0x8010D834; +PopupMenu_Alpha = 0x8010D810; +PopupMenu_CursorHEID = 0x8010D82C; +PopupNotBattle = 0x8010D84E; +D_8010D684 = 0x8010D844; +PopupMenu_LastDisplayIndex = 0x8010D815; +PopupMenu_PartnerLevelHEID = 0x8010D828; +PopupMenu_FirstDisplayIndex = 0x8010D814; +D_8010D6A0 = 0x8010D860; +D_80109898 = 0x80109A28; // rom:0xA2ED8 +PopupMenu_EmptybarHEID = 0x8010D81C; +D_8010D682 = 0x8010D842; +HES_MenuTimes = 0x80109400; // rom:0xA28B0 +set_window_properties = 0x8014CD78; // type:func rom:0xE1C08 +HES_GreenArrowUp = 0x80107974; // rom:0xA0E24 +hud_element_set_tint = 0x80149FAC; // type:func rom:0xDEE3C +D_8010D644 = 0x8010D804; +hud_element_free = 0x801499A4; // type:func rom:0xDE834 +PopupMenu_TitleIconHEID = 0x8010D820; +HES_StatusStarPiece = 0x80104DA0; // rom:0x9E250 +D_8010D692 = 0x8010D852; +sfx_play_sound = 0x8014ED64; // type:func rom:0xE3BF4 +gPopupState = 0x8010D800; +D_80109890 = 0x80109A20; // rom:0xA2ED0 +D_8010D686 = 0x8010D846; +hud_element_set_script = 0x801498AC; // type:func rom:0xDE73C +draw_msg = 0x8012B710; // type:func rom:0xC05A0 +PopupMenu_UpArrowHEID = 0x8010D830; +PopupMenu_StarPieceCounterPosX = 0x8010D848; +PopupMenu_SelectedIndex = 0x8010D808; +PopupDipMode = 0x8010D859; +D_8010D67C = 0x8010D83C; +PopupMenu_MaxDisplayableEntryCount = 0x8010D84F; +D_8010D690 = 0x8010D850; +PopupMenu_DisplayedEntryCount = 0x8010D816; +PopupMenu_EntryIconHEID = 0x8010D838; +open_status_bar_quickly = 0x800E972C; // type:func rom:0x82BDC +HES_StatusCoin = 0x801086E8; // rom:0xA1B98 +hud_element_draw_clipped = 0x80149858; // type:func rom:0xDE6E8 +D_8010D691 = 0x8010D851; +HES_EmptyBar = 0x80107A9C; // rom:0xA0F4C +D_8010D68C = 0x8010D84C; +basic_window_update = 0x8014C524; // rom:0xE13B4 +D_8010D6A4 = 0x8010D864; +D_8010D680 = 0x8010D840; +D_8010D658 = 0x8010D818; +D_8010D693 = 0x8010D853; +hud_element_set_render_pos = 0x80149A34; // type:func rom:0xDE8C4 +basic_hidden_window_update = 0x8014C624; // rom:0xE14B4 +HES_AnimatedHandPointer = 0x80104BB8; // rom:0x9E068 +gPopupWorker = 0x8010D854; +hud_element_set_flags = 0x80149AB0; // type:func rom:0xDE940 +D_8010D65A = 0x8010D81A; +hud_element_draw_next = 0x80149874; // type:func rom:0xDE704 +set_window_update = 0x8014CF2C; // type:func rom:0xE1DBC +gPopupMenu = 0x8010D85C; +close_status_bar = 0x800E9758; // type:func rom:0x82C08 +PopupMenu_StarPieceCounterPosY = 0x8010D84A; +PopupMenu_PrevSelectedIndex = 0x8010D80C; +status_bar_ignore_changes = 0x800E9834; // type:func rom:0x82CE4 +status_bar_is_ignoring_changes = 0x800E9874; // type:func rom:0x82D24 +HES_HandPointer = 0x80104B90; // rom:0x9E040 +status_bar_respond_to_changes = 0x800E9864; // type:func rom:0x82D14 +func_800F52BC = 0x800F5450; // type:func rom:0x8E900 +popup_menu_update = 0x800F19A0; // type:func rom:0x8AE50 +gCollisionStatus = 0x8015F4D0; +disable_npc_blur = 0x8003AA6C; // type:func rom:0x15E6C +fx_floating_flower = 0x8006FD50; // type:func rom:0x4B150 +func_800E01DC = 0x800E01BC; // type:func rom:0x7966C +sin_deg = 0x8002A2AC; // type:func rom:0x56AC +add_coins = 0x800EA060; // type:func rom:0x83510 +fx_star = 0x8006FE10; // type:func rom:0x4B210 +fx_sleep_bubble = 0x800707D0; // type:func rom:0x4BBD0 +fx_flashing_box_shockwave = 0x80071430; // type:func rom:0x4C830 +fx_effect_65 = 0x80071E50; // type:func rom:0x4D250 +fx_breaking_junk = 0x800727B0; // type:func rom:0x4DBB0 +get_npc_unsafe = 0x8003A7AC; // type:func rom:0x15BAC +fx_flower_trail = 0x8006FBD0; // type:func rom:0x4AFD0 +bgm_push_battle_song = 0x8014FFA8; // type:func rom:0xE4E38 +fx_merlin_house_stars = 0x80071790; // type:func rom:0x4CB90 +set_player_imgfx_all = 0x80111B48; // type:func rom:0xA8248 +fx_snowfall = 0x80071250; // type:func rom:0x4C650 +get_collider_center = 0x8005BAC0; // type:func rom:0x36EC0 +fx_steam_burst = 0x800709B0; // type:func rom:0x4BDB0 +fx_attack_result_text = 0x80071370; // type:func rom:0x4C770 +msg_printer_set_origin_pos = 0x8012AD18; // type:func rom:0xBFBA8 +fx_cold_breath = 0x80072210; // type:func rom:0x4D610 +fx_shockwave = 0x80070650; // type:func rom:0x4BA50 +fx_waterfall = 0x80071A90; // type:func rom:0x4CE90 +partner_is_flying = 0x800EA544; // type:func rom:0x839F4 +fx_red_impact = 0x80071F70; // type:func rom:0x4D370 +fx_rising_bubble = 0x80070590; // type:func rom:0x4B990 +fx_squirt = 0x800719D0; // type:func rom:0x4CDD0 +fx_stars_burst = 0x800704D0; // type:func rom:0x4B8D0 +remove_effect = 0x8005A100; // type:func rom:0x35500 +fx_flower_splash = 0x8006FB70; // type:func rom:0x4AF70 +fx_stars_shimmer = 0x80070530; // type:func rom:0x4B930 +heap_malloc = 0x8002ACA4; // type:func rom:0x60A4 +fx_static_status = 0x80072390; // type:func rom:0x4D790 +fx_snowman_doll = 0x80071C70; // type:func rom:0x4D070 +get_screen_coords = 0x8002E1C8; // type:func rom:0x95C8 +fx_energy_shockwave = 0x80070DD0; // type:func rom:0x4C1D0 +npc_set_decoration = 0x8003C098; // type:func rom:0x17498 +sfx_play_sound_at_player = 0x8014ED88; // type:func rom:0xE3C18 +func_800EF314 = 0x800EF2A8; // type:func rom:0x88758 +fx_shape_spell = 0x8006FF30; // type:func rom:0x4B330 +fx_ring_blast = 0x800705F0; // type:func rom:0x4B9F0 +set_message_int_var = 0x8012AE48; // type:func rom:0xBFCD8 +disable_status_bar_input = 0x800E97EC; // type:func rom:0x82C9C +enable_partner_ai = 0x800EF2BC; // type:func rom:0x8876C +partner_enable_input = 0x800EF594; // type:func rom:0x88A44 +fx_cloud_puff = 0x8006FC30; // type:func rom:0x4B030 +disable_player_shadow = 0x800E00C4; // type:func rom:0x79574 +get_entity_model = 0x80127FEC; // type:func rom:0xBCE7C +fx_star_outline = 0x80072A50; // type:func rom:0x4DE50 +free_npc = 0x8003868C; // type:func rom:0x13A8C +fx_quizmo_assistant = 0x80072870; // type:func rom:0x4DC70 +func_800EF300 = 0x800EF294; // type:func rom:0x88744 +fx_flame = 0x80070470; // type:func rom:0x4B870 +guMtxIdent = 0x80067420; // type:func rom:0x42820 +suggest_player_anim_allow_backward = 0x800DFEDC; // type:func rom:0x7938C +gCollisionData = 0x800B42C0; +fx_tattle_window = 0x800720F0; // type:func rom:0x4D4F0 +fx_lens_flare = 0x80070230; // type:func rom:0x4B630 +add_vec2D_polar = 0x80029F5C; // type:func rom:0x535C +fx_butterflies = 0x80071850; // type:func rom:0x4CC50 +fx_cloud_trail = 0x8006FC90; // type:func rom:0x4B090 +fx_ice_pillar = 0x800728D0; // type:func rom:0x4DCD0 +fx_peach_star_beam = 0x80072570; // type:func rom:0x4D970 +fx_lightning = 0x80070CB0; // type:func rom:0x4C0B0 +fx_energy_orb_wave = 0x80071730; // type:func rom:0x4CB30 +fx_shimmer_burst = 0x80070D70; // type:func rom:0x4C170 +npc_set_palswap_2 = 0x8003B124; // type:func rom:0x16524 +fx_drop_leaves = 0x8006FFF0; // type:func rom:0x4B3F0 +msg_get_printer_for_msg = 0x8012AB60; // type:func rom:0xBF9F0 +fx_purple_ring = 0x80070410; // type:func rom:0x4B810 +fx_confetti = 0x800711F0; // type:func rom:0x4C5F0 +fx_radial_shimmer = 0x80070B90; // type:func rom:0x4BF90 +fx_hieroglyphs = 0x800722D0; // type:func rom:0x4D6D0 +fx_emote = 0x8006FE70; // type:func rom:0x4B270 +fx_spiky_white_aura = 0x800702F0; // type:func rom:0x4B6F0 +enable_player_static_collisions = 0x800E0120; // type:func rom:0x795D0 +fx_walking_dust = 0x8006FB10; // type:func rom:0x4AF10 +fx_thunderbolt_ring = 0x80071970; // type:func rom:0x4CD70 +fx_snowflake = 0x8006FDB0; // type:func rom:0x4B1B0 +fx_stop_watch = 0x80071D30; // type:func rom:0x4D130 +get_global_flag = 0x8014A56C; // type:func rom:0xDF3FC +guRotateF = 0x80067B00; // type:func rom:0x42F00 +fx_big_smoke_puff = 0x8006F8D0; // type:func rom:0x4ACD0 +update_collider_transform = 0x8005B6D4; // type:func rom:0x36AD4 +free_npc_by_index = 0x80038560; // type:func rom:0x13960 +fx_huff_puff_breath = 0x800721B0; // type:func rom:0x4D5B0 +enable_npc_blur = 0x8003A9E4; // type:func rom:0x15DE4 +fx_damage_indicator = 0x800703B0; // type:func rom:0x4B7B0 +subtract_fortress_keys = 0x800EA358; // type:func rom:0x83808 +fx_firework = 0x80071190; // type:func rom:0x4C590 +fx_spirit_card = 0x80072690; // type:func rom:0x4DA90 +fx_snaking_static = 0x80071910; // type:func rom:0x4CD10 +fx_water_block = 0x80071A30; // type:func rom:0x4CE30 +npc_set_palswap_1 = 0x8003B10C; // type:func rom:0x1650C +set_screen_overlay_center = 0x8013CEFC; // type:func rom:0xD1D8C +fx_chomp_drop = 0x80071550; // type:func rom:0x4C950 +player_check_collision_below = 0x800E34F4; // type:func rom:0x7C9A4 +fx_explosion = 0x800701D0; // type:func rom:0x4B5D0 +func_800EF3E4 = 0x800EF378; // type:func rom:0x88828 +fx_disable_x = 0x800710D0; // type:func rom:0x4C4D0 +fx_light_rays = 0x80070C50; // type:func rom:0x4C050 +fx_falling_leaves = 0x800708F0; // type:func rom:0x4BCF0 +fx_lil_oink = 0x800726F0; // type:func rom:0x4DAF0 +fx_aura = 0x80070E90; // type:func rom:0x4C290 +fx_green_impact = 0x80070B30; // type:func rom:0x4BF30 +fx_windy_leaves = 0x80070890; // type:func rom:0x4BC90 +set_map_transition_effect = 0x8013D350; // type:func rom:0xD21E0 +fx_fire_breath = 0x80070D10; // type:func rom:0x4C110 +gSpriteShadingProfile = 0x80156388; +func_800EF43C = 0x800EF3D0; // type:func rom:0x88880 +create_basic_npc = 0x80038504; // type:func rom:0x13904 +sfx_stop_sound = 0x8014ED1C; // type:func rom:0xE3BAC +get_enemy = 0x8003E9A8; // type:func rom:0x19DA8 +partner_can_use_ability = 0x800EB3C0; // type:func rom:0x84870 +add_star_points = 0x800EA0C8; // type:func rom:0x83578 +bgm_set_song = 0x8014F9C8; // type:func rom:0xE4858 +enable_player_input = 0x800E0184; // type:func rom:0x79634 +disable_npc_shadow = 0x8003A8BC; // type:func rom:0x15CBC +parent_collider_to_model = 0x8005B430; // type:func rom:0x36830 +fx_dust = 0x80070050; // type:func rom:0x4B450 +fx_misc_particles = 0x80072330; // type:func rom:0x4D730 +fx_pink_sparkles = 0x800729F0; // type:func rom:0x4DDF0 +fx_stars_spread = 0x80070950; // type:func rom:0x4BD50 +sprintf = 0x800654C0; // type:func rom:0x408C0 +set_screen_overlay_params_front = 0x8013CE38; // type:func rom:0xD1CC8 +fx_debuff = 0x80070AD0; // type:func rom:0x4BED0 +start_rumble = 0x80028ED8; // type:func rom:0x42D8 +fx_sweat = 0x80070770; // type:func rom:0x4BB70 +get_map_IDs_by_name = 0x8005A8B0; // type:func rom:0x35CB0 +fx_fright_jar = 0x80071CD0; // type:func rom:0x4D0D0 +test_ray_zones = 0x8005CDD4; // type:func rom:0x381D4 +decrement_status_bar_disabled = 0x800E9AD0; // type:func rom:0x82F80 +fx_lightning_bolt = 0x80071BB0; // type:func rom:0x4CFB0 +disable_player_static_collisions = 0x800E00F4; // type:func rom:0x795A4 +func_800EF3D4 = 0x800EF368; // type:func rom:0x88818 +fx_damage_stars = 0x80070170; // type:func rom:0x4B570 +enable_status_bar_input = 0x800E97DC; // type:func rom:0x82C8C +fx_shiny_flare = 0x80072150; // type:func rom:0x4D550 +bgm_flush_music_events = 0x80055D58; // type:func rom:0x31158 +set_npc_yaw = 0x8003B000; // type:func rom:0x16400 +fx_effect_46 = 0x800712B0; // type:func rom:0x4C6B0 +fx_music_note = 0x800706B0; // type:func rom:0x4BAB0 +fx_fire_flower = 0x80071010; // type:func rom:0x4C410 +fx_something_rotating = 0x80072750; // type:func rom:0x4DB50 +fx_motion_blur_flame = 0x800716D0; // type:func rom:0x4CAD0 +sort_items = 0x800E766C; // type:func rom:0x80B1C +cos_deg = 0x8002A310; // type:func rom:0x5710 +fx_footprint = 0x8006FCF0; // type:func rom:0x4B0F0 +fx_water_splash = 0x80071C10; // type:func rom:0x4D010 +add_item = 0x800E7514; // type:func rom:0x809C4 +heap_free = 0x8002ACEC; // type:func rom:0x60EC +fx_landing_dust = 0x8006FAB0; // type:func rom:0x4AEB0 +fx_small_gold_sparkle = 0x800713D0; // type:func rom:0x4C7D0 +fx_got_item_outline = 0x80070290; // type:func rom:0x4B690 +fx_whirlwind = 0x80071F10; // type:func rom:0x4D310 +partner_disable_input = 0x800EF5BC; // type:func rom:0x88A6C +fx_big_snowflakes = 0x80070A70; // type:func rom:0x4BE70 +set_npc_sprite = 0x8003A91C; // type:func rom:0x15D1C +set_action_state = 0x800E5D84; // type:func rom:0x7F234 +gItemHudScripts = 0x8008A650; // rom:0x65A50 +fx_floating_cloud_puff = 0x80071FD0; // type:func rom:0x4D3D0 +fx_underwater = 0x80071B50; // type:func rom:0x4CF50 +bgm_set_battle_song = 0x8015003C; // type:func rom:0xE4ECC +get_npc_safe = 0x8003A808; // type:func rom:0x15C08 +set_global_flag = 0x8014A500; // type:func rom:0xDF390 +spawn_surface_effects = 0x8003D320; // type:func rom:0x18720 +fx_effect_63 = 0x80071D90; // type:func rom:0x4D190 +add_star_pieces = 0x800EA110; // type:func rom:0x835C0 +npc_set_imgfx_params = 0x8003D2E4; // type:func rom:0x186E4 +fx_moving_cloud = 0x800723F0; // type:func rom:0x4D7F0 +create_worker_world = 0x80128368; // type:func rom:0xBD1F8 +fx_bulb_glow = 0x80070EF0; // type:func rom:0x4C2F0 +fx_blast = 0x80070FB0; // type:func rom:0x4C3B0 +bgm_poll_music_events = 0x80055D3C; // type:func rom:0x3113C +fx_recover = 0x80071070; // type:func rom:0x4C470 +fx_smoke_ring = 0x80070110; // type:func rom:0x4B510 +move_player = 0x800E2758; // type:func rom:0x7BC08 +gPartnerAnimations = 0x800F84D8; // rom:0x91988 +set_screen_overlay_params_back = 0x8013CE54; // type:func rom:0xD1CE4 +destroy_popup_menu = 0x800F14C8; // type:func rom:0x8A978 +can_trigger_loading_zone = 0x800E26A4; // type:func rom:0x7BB54 +npc_set_palswap_mode_A = 0x8003B090; // type:func rom:0x16490 +fx_bombette_breaking = 0x80071130; // type:func rom:0x4C530 +fx_sparkles = 0x8006FED0; // type:func rom:0x4B2D0 +fx_quizmo_stage = 0x800715B0; // type:func rom:0x4C9B0 +fx_ending_decals = 0x80070BF0; // type:func rom:0x4BFF0 +fx_chapter_change = 0x800725D0; // type:func rom:0x4D9D0 +round = 0x80029A84; // type:func rom:0x4E84 +fx_shimmer_wave = 0x80070E30; // type:func rom:0x4C230 +fx_sun = 0x80072930; // type:func rom:0x4DD30 +guMtxXFML = 0x800679C0; // type:func rom:0x42DC0 +enable_npc_shadow = 0x8003A860; // type:func rom:0x15C60 +set_time_freeze_mode = 0x80027054; // type:func rom:0x2454 +player_handle_floor_collider_type = 0x800E313C; // type:func rom:0x7C5EC +get_current_map_settings = 0x8005A8A0; // type:func rom:0x35CA0 +fx_ice_shard = 0x80072630; // type:func rom:0x4DA30 +set_cam_viewport = 0x8002DFA4; // type:func rom:0x93A4 +fx_floating_rock = 0x800714F0; // type:func rom:0x4C8F0 +update_lerp = 0x8002A374; // type:func rom:0x5774 +sfx_play_sound_at_position = 0x8014EE0C; // type:func rom:0xE3C9C +fx_throw_spiny = 0x80071DF0; // type:func rom:0x4D1F0 +get_fortress_key_count = 0x800EA384; // type:func rom:0x83834 +get_model_from_list_index = 0x8011FF40; // type:func rom:0xB4DD0 +fx_gather_magic = 0x80071310; // type:func rom:0x4C710 +enable_player_shadow = 0x800E0090; // type:func rom:0x79540 +fx_effect_75 = 0x80072450; // type:func rom:0x4D850 +bgm_pop_battle_song = 0x8014FF1C; // type:func rom:0xE4DAC +sin_cos_deg = 0x8002A1F4; // type:func rom:0x55F4 +fx_effect_3D = 0x80070F50; // type:func rom:0x4C350 +partner_clear_player_tracking = 0x800EF3F0; // type:func rom:0x888A0 +fx_radiating_energy_orb = 0x80071610; // type:func rom:0x4CA10 +fx_shattering_stones = 0x800700B0; // type:func rom:0x4B4B0 +fx_stars_orbiting = 0x80070A10; // type:func rom:0x4BE10 +handle_floor_behavior = 0x800EFC98; // type:func rom:0x89148 +gItemTable = 0x800878B0; // rom:0x62CB0 +add_badge = 0x800E76DC; // type:func rom:0x80B8C +fx_partner_buff = 0x80072810; // type:func rom:0x4DC10 +fx_star_spirits_energy = 0x80072990; // type:func rom:0x4DD90 +npc_move_heading = 0x8003A714; // type:func rom:0x15B14 +fx_balloon = 0x80071490; // type:func rom:0x4C890 +fx_effect_86 = 0x80072AB0; // type:func rom:0x4DEB0 +increment_status_bar_disabled = 0x800E9AF4; // type:func rom:0x82FA4 +fx_tubba_heart_attack = 0x80071EB0; // type:func rom:0x4D2B0 +fx_embers = 0x80072270; // type:func rom:0x4D670 +hide_popup_menu = 0x800F1340; // type:func rom:0x8A7F0 +fx_stat_change = 0x800718B0; // type:func rom:0x4CCB0 +fx_smoke_burst = 0x80070710; // type:func rom:0x4BB10 +create_standard_popup_menu = 0x800F4FD4; // type:func rom:0x8E484 +fx_energy_in_out = 0x80072090; // type:func rom:0x4D490 +fx_water_fountain = 0x80071AF0; // type:func rom:0x4CEF0 +fx_gather_energy_pink = 0x8006FF90; // type:func rom:0x4B390 +fx_firework_rocket = 0x80072510; // type:func rom:0x4D910 +fx_smoke_impact = 0x80070350; // type:func rom:0x4B750 +gStaticScriptCounter = 0x802D9CA0; // rom:0x101E40 +gIsUpdatingScripts = 0x802D9CA4; // rom:0x101E44 +gGlobalTimeSpace = 0x802D9CA8; // rom:0x101E48 +sort_scripts = 0x802C3000; // type:func rom:0xEB1A0 +gScriptIdList = 0x802DAA98; +gCurrentScriptListPtr = 0x802DA890; +gScriptIndexList = 0x802DA898; +gScriptListCount = 0x802DAC98; +find_script_labels = 0x802C3148; // type:func rom:0xEB2E8 +gWorldScriptList = 0x802DA490; +gWorldMapVars = 0x802DBCA8; +gMapVars = 0x802DA484; +gWorldMapFlags = 0x802DBC70; +gBattleScriptList = 0x802DA690; +gBattleMapVars = 0x802DBCE8; +gBattleMapFlags = 0x802DBD34; +gMapFlags = 0x802DA480; +gNumScripts = 0x802DA488; +init_script_list = 0x802C32EC; // type:func rom:0xEB48C +suspend_frozen_scripts = 0x802C3390; // type:func rom:0xEB530 +start_script = 0x802C33E0; // type:func rom:0xEB580 +start_script_in_group = 0x802C35D0; // type:func rom:0xEB770 +start_child_script = 0x802C37C8; // type:func rom:0xEB968 +func_802C39F8 = 0x802C39F8; // type:func rom:0xEBB98 +func_802C3C10 = 0x802C3C10; // type:func rom:0xEBDB0 +kill_script = 0x802C3F3C; // type:func rom:0xEC0DC +restart_script = 0x802C3D04; // type:func rom:0xEBEA4 +kill_script_by_ID = 0x802C40AC; // type:func rom:0xEC24C +kill_all_scripts = 0x802C4114; // type:func rom:0xEC2B4 +does_script_exist = 0x802C4164; // type:func rom:0xEC304 +does_script_exist_by_ref = 0x802C41A4; // type:func rom:0xEC344 +set_script_priority = 0x802C41D8; // type:func rom:0xEC378 +set_script_timescale = 0x802C41E0; // type:func rom:0xEC380 +set_global_timespace = 0x802C4200; // type:func rom:0xEC3A0 +get_global_timespace = 0x802C420C; // type:func rom:0xEC3AC +set_script_group = 0x802C4218; // type:func rom:0xEC3B8 +bind_trigger = 0x802C4220; // type:func rom:0xEC3C0 +bind_trigger_1 = 0x802C42A8; // type:func rom:0xEC448 +suspend_group_script = 0x802C42D8; // type:func rom:0xEC478 +resume_group_script = 0x802C437C; // type:func rom:0xEC51C +suspend_all_script = 0x802C4420; // type:func rom:0xEC5C0 +resume_all_script = 0x802C448C; // type:func rom:0xEC62C +suspend_group_script_index = 0x802C44F8; // type:func rom:0xEC698 +resume_group_script_index = 0x802C4570; // type:func rom:0xEC710 +suspend_group_others = 0x802C46A8; // type:func rom:0xEC848 +resume_group_others = 0x802C471C; // type:func rom:0xEC8BC +get_script_by_index = 0x802C4790; // type:func rom:0xEC930 +get_script_by_id = 0x802C47A8; // type:func rom:0xEC948 +set_script_flags = 0x802C47E8; // type:func rom:0xEC988 +clear_script_flags = 0x802C4880; // type:func rom:0xECA20 +D_802DA48C = 0x802DA48C; +D_802DA894 = 0x802DA894; +D_802DAC9C = 0x802DAC9C; +evtDebugPrintBuffer = 0x802DACA0; +gLavaResetList = 0x802DADA0; +LastSafeFloor = 0x802DADA4; +D_802DADA8 = 0x802DADA8; +gBattleMeshAnimationList = 0x802DADB0; +gWorldMeshAnimationList = 0x802DADF0; +gCurrentMeshAnimationListPtr = 0x802DAE30; +D_802DAE34 = 0x802DAE34; +wExtraPartnerID = 0x802DAE40; +wExtraPartnerNpcID = 0x802DAE44; +D_802DAE4C = 0x802DAE48; +ShowMessageScreenOffsetX = 0x802DAE50; +ShowMessageScreenOffsetY = 0x802DAE54; +D_802DAE58 = 0x802DAE58; +D_802DAE60 = 0x802DAE60; +gCurrentPrintContext = 0x802DB260; +D_802DB264 = 0x802DB264; +D_802DB268 = 0x802DB268; +D_802DB26C = 0x802DB26C; +playerNpcData = 0x802DB270; +PlayerImgFXFlags = 0x802DB5B0; +D_802DB5B4 = 0x802DB5B4; +bBattleVirtualEntityList = 0x802DB5C0; +wWorldVirtualEntityList = 0x802DB6C0; +gCurrentVirtualEntityListPtr = 0x802DB7C0; +D_802DB7C4 = 0x802DB7C4; +MusicEventList = 0x802DB7D0; +D_802DB7D4 = 0x802DB7D4; +RunningMusicEvents = 0x802DB7D8; +RunningMusicEventIDs = 0x802DB800; +D_802DB828 = 0x802DB828; +D_802DB830 = 0x802DB830; +gSpriteShadingHeader = 0x802DBB60; +D_802DBB64 = 0x802DBB64; +gSpriteShadingData = 0x802DBB68; +D_802DB8B6C = 0x802DBB6C; +D_802DBB70 = 0x802DBB70; +DoorModelsSwingCW = 0x802DBC7C; +wPushBlockGrids = 0x802DBC88; +DoorModelsSwingCCW = 0x802DBD28; +evt_fixed_var_to_float = 0x802C4920; // type:func rom:0xECAC0 +evt_float_to_fixed_var = 0x802C496C; // type:func rom:0xECB0C +evt_handle_return = 0x802C4998; // type:func rom:0xECB38 +evt_handle_label = 0x802C49B8; // type:func rom:0xECB58 +evt_handle_goto = 0x802C49C0; // type:func rom:0xECB60 +evt_find_label = 0x802C8890; // type:func rom:0xF0A30 +evt_handle_loop = 0x802C4A00; // type:func rom:0xECBA0 +evt_handle_end_loop = 0x802C4A48; // type:func rom:0xECBE8 +evt_set_variable = 0x802C8098; // type:func rom:0xF0238 +evt_handle_break_loop = 0x802C4B0C; // type:func rom:0xECCAC +evt_goto_end_loop = 0x802C8AE4; // type:func rom:0xF0C84 +evt_handle_wait = 0x802C4B5C; // type:func rom:0xECCFC +evt_handle_wait_seconds = 0x802C4BB8; // type:func rom:0xECD58 +evt_get_float_variable = 0x802C842C; // type:func rom:0xF05CC +evt_handle_if_equal = 0x802C4C40; // type:func rom:0xECDE0 +evt_skip_if = 0x802C88FC; // type:func rom:0xF0A9C +evt_handle_if_not_equal = 0x802C4CA0; // type:func rom:0xECE40 +evt_handle_if_less = 0x802C4D00; // type:func rom:0xECEA0 +evt_handle_if_greater = 0x802C4D64; // type:func rom:0xECF04 +evt_handle_if_less_equal = 0x802C4DC8; // type:func rom:0xECF68 +evt_handle_if_greater_equal = 0x802C4E2C; // type:func rom:0xECFCC +evt_handle_if_AND = 0x802C4E90; // type:func rom:0xED030 +evt_handle_if_not_AND = 0x802C4EE8; // type:func rom:0xED088 +evt_handle_else = 0x802C4F40; // type:func rom:0xED0E0 +evt_skip_else = 0x802C8978; // type:func rom:0xF0B18 +evt_handle_end_if = 0x802C4F6C; // type:func rom:0xED10C +evt_handle_switch = 0x802C4F74; // type:func rom:0xED114 +evt_handle_switch_const = 0x802C4FE4; // type:func rom:0xED184 +evt_handle_case_equal = 0x802C5030; // type:func rom:0xED1D0 +evt_goto_end_case = 0x802C89E4; // type:func rom:0xF0B84 +evt_goto_next_case = 0x802C8A60; // type:func rom:0xF0C00 +evt_handle_case_not_equal = 0x802C50BC; // type:func rom:0xED25C +evt_handle_case_less = 0x802C5148; // type:func rom:0xED2E8 +evt_handle_case_less_equal = 0x802C51D8; // type:func rom:0xED378 +evt_handle_case_greater = 0x802C5268; // type:func rom:0xED408 +evt_handle_case_greater_equal = 0x802C52F8; // type:func rom:0xED498 +evt_handle_case_range = 0x802C5388; // type:func rom:0xED528 +evt_handle_case_default = 0x802C5444; // type:func rom:0xED5E4 +evt_handle_case_AND = 0x802C549C; // type:func rom:0xED63C +evt_handle_case_equal_OR = 0x802C5518; // type:func rom:0xED6B8 +evt_handle_case_equal_AND = 0x802C55B8; // type:func rom:0xED758 +evt_handle_end_case_group = 0x802C565C; // type:func rom:0xED7FC +evt_handle_break_case = 0x802C56D4; // type:func rom:0xED874 +evt_handle_end_switch = 0x802C5718; // type:func rom:0xED8B8 +evt_handle_set_var = 0x802C5744; // type:func rom:0xED8E4 +evt_handle_set_const = 0x802C5790; // type:func rom:0xED930 +evt_handle_set_float = 0x802C57B8; // type:func rom:0xED958 +evt_set_float_variable = 0x802C8640; // type:func rom:0xF07E0 +evt_handle_add = 0x802C5804; // type:func rom:0xED9A4 +evt_handle_subtract = 0x802C5868; // type:func rom:0xEDA08 +evt_handle_multiply = 0x802C58CC; // type:func rom:0xEDA6C +evt_handle_divide = 0x802C5934; // type:func rom:0xEDAD4 +evt_handle_mod = 0x802C59BC; // type:func rom:0xEDB5C +evt_handle_addF = 0x802C5A84; // type:func rom:0xEDC24 +evt_handle_subtractF = 0x802C5AEC; // type:func rom:0xEDC8C +evt_handle_multiplyF = 0x802C5B54; // type:func rom:0xEDCF4 +evt_handle_divideF = 0x802C5BC0; // type:func rom:0xEDD60 +evt_handle_set_int_buffer_ptr = 0x802C5C28; // type:func rom:0xEDDC8 +evt_handle_set_float_buffer_ptr = 0x802C5C5C; // type:func rom:0xEDDFC +evt_handle_get_1_word = 0x802C5C90; // type:func rom:0xEDE30 +evt_handle_get_2_word = 0x802C5CC4; // type:func rom:0xEDE64 +evt_handle_get_3_word = 0x802C5D2C; // type:func rom:0xEDECC +evt_handle_get_4_word = 0x802C5DB4; // type:func rom:0xEDF54 +evt_handle_get_Nth_word = 0x802C5E5C; // type:func rom:0xEDFFC +evt_handle_get_1_float = 0x802C5EB4; // type:func rom:0xEE054 +evt_handle_get_2_float = 0x802C5F0C; // type:func rom:0xEE0AC +evt_handle_get_3_float = 0x802C5F9C; // type:func rom:0xEE13C +evt_handle_get_4_float = 0x802C605C; // type:func rom:0xEE1FC +evt_handle_get_Nth_float = 0x802C614C; // type:func rom:0xEE2EC +evt_handle_set_array = 0x802C61AC; // type:func rom:0xEE34C +evt_handle_set_flag_array = 0x802C61E0; // type:func rom:0xEE380 +evt_handle_allocate_array = 0x802C6214; // type:func rom:0xEE3B4 +evt_handle_AND = 0x802C6270; // type:func rom:0xEE410 +evt_handle_AND_const = 0x802C62D4; // type:func rom:0xEE474 +evt_handle_OR = 0x802C632C; // type:func rom:0xEE4CC +evt_handle_OR_const = 0x802C6390; // type:func rom:0xEE530 +evt_handle_call = 0x802C63E8; // type:func rom:0xEE588 +evt_handle_exec1 = 0x802C646C; // type:func rom:0xEE60C +evt_handle_exec1_get_id = 0x802C6524; // type:func rom:0xEE6C4 +evt_handle_exec_wait = 0x802C65FC; // type:func rom:0xEE79C +evt_handle_jump = 0x802C6640; // type:func rom:0xEE7E0 +evt_trigger_on_activate_exec_script = 0x802C667C; // type:func rom:0xEE81C +evt_handle_bind = 0x802C6714; // type:func rom:0xEE8B4 +evt_get_variable_index = 0x802C7DA8; // type:func rom:0xEFF48 +DeleteTrigger = 0x802C6824; // type:func rom:0xEE9C4 +evt_handle_unbind = 0x802C6850; // type:func rom:0xEE9F0 +evt_handle_kill = 0x802C6870; // type:func rom:0xEEA10 +evt_handle_set_priority = 0x802C689C; // type:func rom:0xEEA3C +evt_handle_set_timescale = 0x802C68D8; // type:func rom:0xEEA78 +evt_handle_set_group = 0x802C6914; // type:func rom:0xEEAB4 +evt_handle_suspend_all = 0x802C6950; // type:func rom:0xEEAF0 +evt_handle_resume_all = 0x802C697C; // type:func rom:0xEEB1C +evt_handle_suspend_others = 0x802C69A8; // type:func rom:0xEEB48 +evt_handle_resume_others = 0x802C69E4; // type:func rom:0xEEB84 +evt_handle_suspend = 0x802C6A20; // type:func rom:0xEEBC0 +evt_handle_resume = 0x802C6A4C; // type:func rom:0xEEBEC +evt_handle_does_script_exist = 0x802C6A78; // type:func rom:0xEEC18 +evt_trigger_on_activate_lock = 0x802C6AD0; // type:func rom:0xEEC70 +evt_handle_bind_lock = 0x802C6B54; // type:func rom:0xEECF4 +evt_handle_thread = 0x802C6C78; // type:func rom:0xEEE18 +evt_handle_end_thread = 0x802C6D4C; // type:func rom:0xEEEEC +evt_handle_child_thread = 0x802C6D6C; // type:func rom:0xEEF0C +evt_handle_end_child_thread = 0x802C6DF4; // type:func rom:0xEEF94 +evt_handle_debug_log = 0x802C6E14; // type:func rom:0xEEFB4 +evt_handle_print_debug_var = 0x802C6E1C; // type:func rom:0xEEFBC +func_802C739C = 0x802C739C; // type:func rom:0xEF53C +func_802C73B0 = 0x802C73B0; // type:func rom:0xEF550 +func_802C73B8 = 0x802C73B8; // type:func rom:0xEF558 +evt_execute_next_command = 0x802C7404; // type:func rom:0xEF5A4 +evt_get_variable_index_alt = 0x802C7F20; // type:func rom:0xF00C0 +TranslateModel = 0x802C8B60; // type:func rom:0xF0D00 +RotateModel = 0x802C8C64; // type:func rom:0xF0E04 +ScaleModel = 0x802C8D88; // type:func rom:0xF0F28 +GetModelIndex = 0x802C8E8C; // type:func rom:0xF102C +InvalidateModelTransform = 0x802C8EE4; // type:func rom:0xF1084 +CloneModel = 0x802C8F28; // type:func rom:0xF10C8 +GetModelCenter = 0x802C8F80; // type:func rom:0xF1120 +SetTexPanner = 0x802C9000; // type:func rom:0xF11A0 +SetCustomGfxEnabled = 0x802C907C; // type:func rom:0xF121C +SetModelCustomGfx = 0x802C90FC; // type:func rom:0xF129C +SetModelTexVariant = 0x802C91A4; // type:func rom:0xF1344 +EnableTexPanning = 0x802C9208; // type:func rom:0xF13A8 +EnableModel = 0x802C9288; // type:func rom:0xF1428 +SetGroupVisibility = 0x802C9308; // type:func rom:0xF14A8 +SetTexPanOffset = 0x802C9364; // type:func rom:0xF1504 +SetCustomGfx = 0x802C9428; // type:func rom:0xF15C8 +SetCustomGfxBuilders = 0x802C94A0; // type:func rom:0xF1640 +SetModelFlags = 0x802C9518; // type:func rom:0xF16B8 +apply_transform_to_children = 0x802C95A0; // type:func rom:0xF1740 +MakeTransformGroup = 0x802C971C; // type:func rom:0xF18BC +SetTransformGroupEnabled = 0x802C9748; // type:func rom:0xF18E8 +TranslateGroup = 0x802C97B4; // type:func rom:0xF1954 +RotateGroup = 0x802C98D8; // type:func rom:0xF1A78 +ScaleGroup = 0x802C9A1C; // type:func rom:0xF1BBC +GetTransformGroup = 0x802C9B40; // type:func rom:0xF1CE0 +EnableGroup = 0x802C9B98; // type:func rom:0xF1D38 +MakeLocalVertexCopy = 0x802C9C70; // type:func rom:0xF1E10 +modify_collider_family_flags = 0x802C9CE8; // type:func rom:0xF1E88 +ModifyColliderFlags = 0x802C9DCC; // type:func rom:0xF1F6C +ResetFromLava = 0x802C9ED8; // type:func rom:0xF2078 +get_lava_reset_pos = 0x802C9FD4; // type:func rom:0xF2174 +GetColliderCenter = 0x802CA0AC; // type:func rom:0xF224C +ParentColliderToModel = 0x802CA114; // type:func rom:0xF22B4 +UpdateColliderTransform = 0x802CA188; // type:func rom:0xF2328 +set_zone_enabled = 0x802CA1B8; // type:func rom:0xF2358 +SetZoneEnabled = 0x802CA254; // type:func rom:0xF23F4 +goto_map = 0x802CA304; // type:func rom:0xF24A4 +GotoMap = 0x802CA400; // type:func rom:0xF25A0 +GotoMapSpecial = 0x802CA420; // type:func rom:0xF25C0 +GotoMapByID = 0x802CA440; // type:func rom:0xF25E0 +GetEntryID = 0x802CA460; // type:func rom:0xF2600 +GetMapID = 0x802CA490; // type:func rom:0xF2630 +GetLoadType = 0x802CA4C0; // type:func rom:0xF2660 +SetRenderMode = 0x802CA4F4; // type:func rom:0xF2694 +PlaySoundAtModel = 0x802CA558; // type:func rom:0xF26F8 +PlaySoundAtCollider = 0x802CA614; // type:func rom:0xF27B4 +ShakeCam1 = 0x802D9CB0; // rom:0x101E50 +ShakeCam = 0x802CB2A8; // type:func rom:0xF3448 +ShakeCamX = 0x802D9CE8; // rom:0x101E88 +SetCamEnabled = 0x802CA6C0; // type:func rom:0xF2860 +SetCamNoDraw = 0x802CA774; // type:func rom:0xF2914 +SetCamPerspective = 0x802CA828; // type:func rom:0xF29C8 +func_802CA90C = 0x802CA90C; // type:func rom:0xF2AAC +func_802CA988 = 0x802CA988; // type:func rom:0xF2B28 +SetCamViewport = 0x802CAB18; // type:func rom:0xF2CB8 +func_802CABE8 = 0x802CABE8; // type:func rom:0xF2D88 +func_802CACC0 = 0x802CACC0; // type:func rom:0xF2E60 +SetCamBGColor = 0x802CAD98; // type:func rom:0xF2F38 +func_802CAE50 = 0x802CAE50; // type:func rom:0xF2FF0 +SetCamTarget = 0x802CAF2C; // type:func rom:0xF30CC +InterpCamTargetPos = 0x802CB008; // type:func rom:0xF31A8 +exec_ShakeCam1 = 0x802CB56C; // type:func rom:0xF370C +exec_ShakeCamX = 0x802CB5C8; // type:func rom:0xF3768 +SetCamLeadPlayer = 0x802CB680; // type:func rom:0xF3820 +func_802CB710 = 0x802CB710; // type:func rom:0xF38B0 +PanToTarget = 0x802CB79C; // type:func rom:0xF393C +UseSettingsFrom = 0x802CB860; // type:func rom:0xF3A00 +LoadSettings = 0x802CB9F8; // type:func rom:0xF3B98 +SetCamType = 0x802CBAB4; // type:func rom:0xF3C54 +SetCamPitch = 0x802CBB48; // type:func rom:0xF3CE8 +SetCamDistance = 0x802CBBE4; // type:func rom:0xF3D84 +SetCamPosA = 0x802CBC58; // type:func rom:0xF3DF8 +SetCamPosB = 0x802CBCF4; // type:func rom:0xF3E94 +SetCamPosC = 0x802CBD90; // type:func rom:0xF3F30 +SetPanTarget = 0x802CBE2C; // type:func rom:0xF3FCC +SetCamSpeed = 0x802CBEF0; // type:func rom:0xF4090 +GetCamType = 0x802CBF64; // type:func rom:0xF4104 +GetCamPitch = 0x802CBFF4; // type:func rom:0xF4194 +GetCamDistance = 0x802CC084; // type:func rom:0xF4224 +GetCamPosA = 0x802CC0F4; // type:func rom:0xF4294 +GetCamPosB = 0x802CC184; // type:func rom:0xF4324 +GetCamPosC = 0x802CC214; // type:func rom:0xF43B4 +GetCamPosition = 0x802CC2A4; // type:func rom:0xF4444 +WaitForCam = 0x802CC354; // type:func rom:0xF44F4 +SetCamProperties = 0x802CC3EC; // type:func rom:0xF458C +AdjustCam = 0x802CC660; // type:func rom:0xF4800 +ResetCam = 0x802CC8C8; // type:func rom:0xF4A68 +update_animated_models = 0x802CCAC0; // type:func rom:0xF4C60 +render_animated_models = 0x802CCB18; // type:func rom:0xF4CB8 +InitAnimatedModels = 0x802CCCB0; // type:func rom:0xF4E50 +LoadAnimatedModel = 0x802CCCEC; // type:func rom:0xF4E8C +LoadAnimatedMesh = 0x802CCDAC; // type:func rom:0xF4F4C +PlayModelAnimation = 0x802CCE6C; // type:func rom:0xF500C +PlayModelAnimationStartingFrom = 0x802CCEDC; // type:func rom:0xF507C +ChangeModelAnimation = 0x802CCF6C; // type:func rom:0xF510C +SetAnimatedModelRootPosition = 0x802CCFE4; // type:func rom:0xF5184 +GetAnimatedModelRootPosition = 0x802CD090; // type:func rom:0xF5230 +AddAnimatedModelRootPosition = 0x802CD12C; // type:func rom:0xF52CC +SetAnimatedModelRootRotation = 0x802CD1F0; // type:func rom:0xF5390 +SetAnimatedModelRootScale = 0x802CD29C; // type:func rom:0xF543C +SetAnimatedModelRenderMode = 0x802CD348; // type:func rom:0xF54E8 +DeleteAnimatedModel = 0x802CD3C0; // type:func rom:0xF5560 +SetAnimatorFlags = 0x802CD418; // type:func rom:0xF55B8 +reset_model_animators = 0x802CD4B4; // type:func rom:0xF5654 +init_model_animators = 0x802CD57C; // type:func rom:0xF571C +GetAnimatedNodePosition = 0x802CD5C0; // type:func rom:0xF5760 +GetAnimatedNodeRotation = 0x802CD6E0; // type:func rom:0xF5880 +GetAnimatedPositionByTreeIndex = 0x802CD7D8; // type:func rom:0xF5978 +GetAnimatedRotationByTreeIndex = 0x802CD8F8; // type:func rom:0xF5A98 +SetAnimatedNodeFlags = 0x802CD9F0; // type:func rom:0xF5B90 +resolve_npc = 0x802CDAC0; // type:func rom:0xF5C60 +set_npc_animation = 0x802CDB0C; // type:func rom:0xF5CAC +CreateNpc = 0x802CDBA4; // type:func rom:0xF5D44 +DeleteNpc = 0x802CDC1C; // type:func rom:0xF5DBC +GetNpcPointer = 0x802CDC58; // type:func rom:0xF5DF8 +SetNpcPos = 0x802CDCB0; // type:func rom:0xF5E50 +SetNpcRotation = 0x802CDDB0; // type:func rom:0xF5F50 +SetNpcRotationPivot = 0x802CDE68; // type:func rom:0xF6008 +SetNpcScale = 0x802CDED4; // type:func rom:0xF6074 +SetNpcCollisionSize = 0x802CDF8C; // type:func rom:0xF612C +SetNpcSpeed = 0x802CE01C; // type:func rom:0xF61BC +SetNpcJumpscale = 0x802CE088; // type:func rom:0xF6228 +SetNpcAnimation = 0x802CE0F4; // type:func rom:0xF6294 +GetNpcAnimation = 0x802CE160; // type:func rom:0xF6300 +SetNpcAnimationSpeed = 0x802CE1C0; // type:func rom:0xF6360 +NpcMoveTo = 0x802CE22C; // type:func rom:0xF63CC +_npc_jump_to = 0x802CE434; // type:func rom:0xF65D4 +NpcJump0 = 0x802CE6C4; // type:func rom:0xF6864 +NpcJump1 = 0x802CE6E0; // type:func rom:0xF6880 +NpcFlyTo = 0x802CE6FC; // type:func rom:0xF689C +GetNpcYaw = 0x802CEA10; // type:func rom:0xF6BB0 +SetNpcYaw = 0x802CEA84; // type:func rom:0xF6C24 +InterpNpcYaw = 0x802CEB04; // type:func rom:0xF6CA4 +NpcFacePlayer = 0x802CECC8; // type:func rom:0xF6E68 +NpcFaceNpc = 0x802CEE80; // type:func rom:0xF7020 +SetNpcFlagBits = 0x802CF060; // type:func rom:0xF7200 +GetNpcPos = 0x802CF0F4; // type:func rom:0xF7294 +SetNpcCollisionChannel = 0x802CF1B4; // type:func rom:0xF7354 +SetNpcSprite = 0x802CF208; // type:func rom:0xF73A8 +EnableNpcShadow = 0x802CF268; // type:func rom:0xF7408 +EnableNpcBlur = 0x802CF2EC; // type:func rom:0xF748C +ClearPartnerMoveHistory = 0x802CF370; // type:func rom:0xF7510 +NpcSetHomePosToCurrent = 0x802CF3BC; // type:func rom:0xF755C +GetPartnerPos = 0x802CF438; // type:func rom:0xF75D8 +DisablePartnerAI = 0x802CF4E8; // type:func rom:0xF7688 +EnablePartnerAI = 0x802CF52C; // type:func rom:0xF76CC +func_802CF54C = 0x802CF54C; // type:func rom:0xF76EC +func_802CF56C = 0x802CF56C; // type:func rom:0xF770C +BringPartnerOut = 0x802CF5B8; // type:func rom:0xF7758 +PutPartnerAway = 0x802CF988; // type:func rom:0xF7B28 +GetCurrentPartnerID = 0x802CFC74; // type:func rom:0xF7E14 +PartnerCanUseAbility = 0x802CFCA0; // type:func rom:0xF7E40 +PartnerIsFlying = 0x802CFCE8; // type:func rom:0xF7E88 +SetNpcImgFXParams = 0x802CFD30; // type:func rom:0xF7ED0 +SetNpcImgFXFlags = 0x802CFE2C; // type:func rom:0xF7FCC +SetNpcPaletteSwapMode = 0x802CFE80; // type:func rom:0xF8020 +SetNpcPaletteSwapLower = 0x802CFEEC; // type:func rom:0xF808C +SetNpcPaletteSwapping = 0x802CFFC0; // type:func rom:0xF8160 +SetNpcDecoration = 0x802D0118; // type:func rom:0xF82B8 +PlaySoundAtNpc = 0x802D01AC; // type:func rom:0xF834C +SetNpcRenderMode = 0x802D0244; // type:func rom:0xF83E4 +SpeakToPlayer = 0x802D02B0; // type:func rom:0xF8450 +_show_message = 0x802D0320; // type:func rom:0xF84C0 +EndSpeech = 0x802D02CC; // type:func rom:0xF846C +ContinueSpeech = 0x802D02E8; // type:func rom:0xF8488 +SpeakToNpc = 0x802D0304; // type:func rom:0xF84A4 +ShowMessageAtScreenPos = 0x802D0894; // type:func rom:0xF8A34 +ShowMessageAtWorldPos = 0x802D095C; // type:func rom:0xF8AFC +CloseMessage = 0x802D0A98; // type:func rom:0xF8C38 +SwitchMessage = 0x802D0AFC; // type:func rom:0xF8C9C +ShowChoice = 0x802D0B6C; // type:func rom:0xF8D0C +CloseChoice = 0x802D0BF8; // type:func rom:0xF8D98 +CancelMessage = 0x802D0C20; // type:func rom:0xF8DC0 +cancel_current_message = 0x802D0C48; // type:func rom:0xF8DE8 +SetMessageImages = 0x802D0C70; // type:func rom:0xF8E10 +func_802D0C94 = 0x802D0C94; // type:func rom:0xF8E34 +SetMessageText = 0x802D0CEC; // type:func rom:0xF8E8C +SetMessageValue = 0x802D0D44; // type:func rom:0xF8EE4 +playerNpc = 0x802D9D20; // rom:0x101EC0 +HidePlayerShadow = 0x802D0DA0; // type:func rom:0xF8F40 +DisablePlayerPhysics = 0x802D0DE4; // type:func rom:0xF8F84 +DisablePlayerInput = 0x802D0E28; // type:func rom:0xF8FC8 +SetPlayerPos = 0x802D0EF0; // type:func rom:0xF9090 +SetPlayerCollisionSize = 0x802D0FB0; // type:func rom:0xF9150 +SetPlayerSpeed = 0x802D1024; // type:func rom:0xF91C4 +SetPlayerJumpscale = 0x802D1054; // type:func rom:0xF91F4 +SetPlayerAnimation = 0x802D1084; // type:func rom:0xF9224 +SetPlayerActionState = 0x802D10D8; // type:func rom:0xF9278 +SetPlayerAnimationSpeed = 0x802D1104; // type:func rom:0xF92A4 +PlayerMoveTo = 0x802D1134; // type:func rom:0xF92D4 +func_802D1270 = 0x802D1270; // type:func rom:0xF9410 +func_802D1380 = 0x802D1380; // type:func rom:0xF9520 +player_jump = 0x802D14E0; // type:func rom:0xF9680 +PlayerJump = 0x802D18E8; // type:func rom:0xF9A88 +PlayerJump1 = 0x802D1904; // type:func rom:0xF9AA4 +PlayerJump2 = 0x802D1920; // type:func rom:0xF9AC0 +InterpPlayerYaw = 0x802D193C; // type:func rom:0xF9ADC +PlayerFaceNpc = 0x802D1B04; // type:func rom:0xF9CA4 +GetPlayerTargetYaw = 0x802D1D28; // type:func rom:0xF9EC8 +SetPlayerFlagBits = 0x802D1D60; // type:func rom:0xF9F00 +GetPlayerActionState = 0x802D1DD0; // type:func rom:0xF9F70 +GetPlayerPos = 0x802D1DFC; // type:func rom:0xF9F9C +GetPlayerAnimation = 0x802D1E94; // type:func rom:0xFA034 +FullyRestoreHPandFP = 0x802D1EC0; // type:func rom:0xFA060 +FullyRestoreSP = 0x802D1EE0; // type:func rom:0xFA080 +EnablePartner = 0x802D1EFC; // type:func rom:0xFA09C +DisablePartner = 0x802D1F38; // type:func rom:0xFA0D8 +UseEntryHeading = 0x802D1F70; // type:func rom:0xFA110 +func_802D2148 = 0x802D2148; // type:func rom:0xFA2E8 +UseExitHeading = 0x802D216C; // type:func rom:0xFA30C +func_802D23F8 = 0x802D23F8; // type:func rom:0xFA598 +WaitForPlayerTouchingFloor = 0x802D244C; // type:func rom:0xFA5EC +func_802D2484 = 0x802D2484; // type:func rom:0xFA624 +IsPlayerOnValidFloor = 0x802D249C; // type:func rom:0xFA63C +WaitForPlayerMoveToComplete = 0x802D24F4; // type:func rom:0xFA694 +WaitForPlayerInputEnabled = 0x802D2508; // type:func rom:0xFA6A8 +UpdatePlayerImgFX = 0x802D2520; // type:func rom:0xFA6C0 +SetPlayerImgFXFlags = 0x802D286C; // type:func rom:0xFAA0C +FacePlayerTowardPoint = 0x802D2884; // type:func rom:0xFAA24 +DisablePulseStone = 0x802D2AA8; // type:func rom:0xFAC48 +GetPartnerInUse = 0x802D2B0C; // type:func rom:0xFACAC +ForceUsePartner = 0x802D2B50; // type:func rom:0xFACF0 +InterruptUsePartner = 0x802D2B6C; // type:func rom:0xFAD0C +Disable8bitMario = 0x802D2B88; // type:func rom:0xFAD28 +func_802D2C14 = 0x802D2C14; // type:func rom:0xFADB4 +SetPlayerPushVelocity = 0x802D2C40; // type:func rom:0xFADE0 +PlaySoundAtPlayer = 0x802D2CD8; // type:func rom:0xFAE78 +virtual_entity_appendGfx_quad = 0x802D2D30; // type:func rom:0xFAED0 +virtual_entity_render_quad = 0x802D2ED4; // type:func rom:0xFB074 +virtual_entity_move_polar = 0x802D2F34; // type:func rom:0xFB0D4 +virtual_entity_list_update = 0x802D2FCC; // type:func rom:0xFB16C +virtual_entity_list_render_world = 0x802D3028; // type:func rom:0xFB1C8 +virtual_entity_list_render_UI = 0x802D31E0; // type:func rom:0xFB380 +InitVirtualEntityList = 0x802D3398; // type:func rom:0xFB538 +CreateVirtualEntityAt = 0x802D33D4; // type:func rom:0xFB574 +CreateVirtualEntity = 0x802D3474; // type:func rom:0xFB614 +CreateVirtualEntity_ALT = 0x802D354C; // type:func rom:0xFB6EC +DeleteVirtualEntity = 0x802D3624; // type:func rom:0xFB7C4 +SetVirtualEntityRenderCommands = 0x802D3674; // type:func rom:0xFB814 +SetVirtualEntityPosition = 0x802D36E0; // type:func rom:0xFB880 +GetVirtualEntityPosition = 0x802D378C; // type:func rom:0xFB92C +SetVirtualEntityRotation = 0x802D3840; // type:func rom:0xFB9E0 +SetVirtualEntityScale = 0x802D38EC; // type:func rom:0xFBA8C +SetVirtualEntityMoveSpeed = 0x802D3998; // type:func rom:0xFBB38 +SetVirtualEntityJumpGravity = 0x802D39FC; // type:func rom:0xFBB9C +VirtualEntityMoveTo = 0x802D3A60; // type:func rom:0xFBC00 +VirtualEntityJumpTo = 0x802D3C58; // type:func rom:0xFBDF8 +VirtualEntityLandJump = 0x802D3EB8; // type:func rom:0xFC058 +SetVirtualEntityFlags = 0x802D3F74; // type:func rom:0xFC114 +SetVirtualEntityFlagBits = 0x802D3FC8; // type:func rom:0xFC168 +SetVirtualEntityRenderMode = 0x802D4050; // type:func rom:0xFC1F0 +virtual_entity_get_by_index = 0x802D4164; // type:func rom:0xFC304 +virtual_entity_create_at_index = 0x802D417C; // type:func rom:0xFC31C +virtual_entity_create = 0x802D420C; // type:func rom:0xFC3AC +ALT_virtual_entity_create = 0x802D42AC; // type:func rom:0xFC44C +virtual_entity_set_pos = 0x802D4364; // type:func rom:0xFC504 +virtual_entity_set_scale = 0x802D43AC; // type:func rom:0xFC54C +virtual_entity_set_rotation = 0x802D43D0; // type:func rom:0xFC570 +virtual_entity_delete_by_index = 0x802D43F4; // type:func rom:0xFC594 +virtual_entity_delete_by_ref = 0x802D4434; // type:func rom:0xFC5D4 +clear_virtual_entity_list = 0x802D4488; // type:func rom:0xFC628 +init_virtual_entity_list = 0x802D4560; // type:func rom:0xFC700 +MakeLerp = 0x802D45B0; // type:func rom:0xFC750 +UpdateLerp = 0x802D462C; // type:func rom:0xFC7CC +RandInt = 0x802D46B0; // type:func rom:0xFC850 +GetAngleBetweenNPCs = 0x802D4708; // type:func rom:0xFC8A8 +GetAngleToNPC = 0x802D47B4; // type:func rom:0xFC954 +GetAngleToPlayer = 0x802D4830; // type:func rom:0xFC9D0 +AwaitPlayerApproach = 0x802D48AC; // type:func rom:0xFCA4C +IsPlayerWithin = 0x802D4964; // type:func rom:0xFCB04 +AwaitPlayerLeave = 0x802D4A5C; // type:func rom:0xFCBFC +AddVectorPolar = 0x802D4B14; // type:func rom:0xFCCB4 +func_802D4BDC = 0x802D4BDC; // type:func rom:0xFCD7C +func_802D4C4C = 0x802D4C4C; // type:func rom:0xFCDEC +func_802D4CC4 = 0x802D4CC4; // type:func rom:0xFCE64 +func_802D4D14 = 0x802D4D14; // type:func rom:0xFCEB4 +func_802D4D88 = 0x802D4D88; // type:func rom:0xFCF28 +load_path_data = 0x802D4DAC; // type:func rom:0xFCF4C +get_path_position = 0x802D5270; // type:func rom:0xFD410 +LoadPath = 0x802D5430; // type:func rom:0xFD5D0 +GetNextPathPos = 0x802D5524; // type:func rom:0xFD6C4 +GetDist2D = 0x802D5770; // type:func rom:0xFD910 +SetTimeFreezeMode = 0x802D5830; // type:func rom:0xFD9D0 +ModifyGlobalOverrideFlags = 0x802D585C; // type:func rom:0xFD9FC +SetValueByRef = 0x802D58E0; // type:func rom:0xFDA80 +GetValueByRef = 0x802D593C; // type:func rom:0xFDADC +EnableWorldStatusBar = 0x802D5998; // type:func rom:0xFDB38 +ShowWorldStatusBar = 0x802D59DC; // type:func rom:0xFDB7C +SetGameMode = 0x802D5A28; // type:func rom:0xFDBC8 +ClampAngleInt = 0x802D5A58; // type:func rom:0xFDBF8 +ClampAngleFloat = 0x802D5AB4; // type:func rom:0xFDC54 +EVS_MusicEventMonitor = 0x802D9D34; // rom:0x101ED4 +MusicEventPollCount = 0x802D9D30; // rom:0x101ED0 +PollMusicEvents = 0x802D5B10; // type:func rom:0xFDCB0 +RegisterMusicEvents = 0x802D5C70; // type:func rom:0xFDE10 +FadeOutMusic = 0x802D5CE0; // type:func rom:0xFDE80 +SetMusicTrack = 0x802D5D4C; // type:func rom:0xFDEEC +FadeInMusic = 0x802D5DF4; // type:func rom:0xFDF94 +EnableMusicProximityMix = 0x802D5EE0; // type:func rom:0xFE080 +AdjustMusicProximityMix = 0x802D5F28; // type:func rom:0xFE0C8 +SetMusicTrackVolumes = 0x802D5FA4; // type:func rom:0xFE144 +PopSong = 0x802D5FD8; // type:func rom:0xFE178 +PushSong = 0x802D5FF8; // type:func rom:0xFE198 +PopBattleSong = 0x802D6050; // type:func rom:0xFE1F0 +PushBattleSong = 0x802D6070; // type:func rom:0xFE210 +SetBattleSong = 0x802D6090; // type:func rom:0xFE230 +ClearAmbientSounds = 0x802D60E8; // type:func rom:0xFE288 +PlayAmbientSounds = 0x802D611C; // type:func rom:0xFE2BC +PlaySound = 0x802D6150; // type:func rom:0xFE2F0 +PlaySoundWithVolume = 0x802D617C; // type:func rom:0xFE31C +PlaySoundAt = 0x802D61DC; // type:func rom:0xFE37C +StopSound = 0x802D62B8; // type:func rom:0xFE458 +StopTrackingSoundPos = 0x802D62E4; // type:func rom:0xFE484 +UseDoorSounds = 0x802D6314; // type:func rom:0xFE4B4 +UseRoomDoorSounds = 0x802D6340; // type:func rom:0xFE4E0 +PlaySoundAtF = 0x802D636C; // type:func rom:0xFE50C +ShowKeyChoicePopup = 0x802D6420; // type:func rom:0xFE5C0 +ShowConsumableChoicePopup = 0x802D663C; // type:func rom:0xFE7DC +RemoveKeyItemAt = 0x802D6858; // type:func rom:0xFE9F8 +RemoveItemAt = 0x802D688C; // type:func rom:0xFEA2C +AddKeyItem = 0x802D68C8; // type:func rom:0xFEA68 +CloseChoicePopup = 0x802D6954; // type:func rom:0xFEAF4 +HasKeyItem = 0x802D699C; // type:func rom:0xFEB3C +FindKeyItem = 0x802D6A14; // type:func rom:0xFEBB4 +AddItem = 0x802D6A98; // type:func rom:0xFEC38 +ClearVariable = 0x802D6AF0; // type:func rom:0xFEC90 +FindItem = 0x802D6B18; // type:func rom:0xFECB8 +RemoveItem = 0x802D6B9C; // type:func rom:0xFED3C +CountFortessKeys = 0x802D6C4C; // type:func rom:0xFEDEC +RemoveFortressKeys = 0x802D6C94; // type:func rom:0xFEE34 +MakeItemEntity = 0x802D6CC0; // type:func rom:0xFEE60 +DropItemEntity = 0x802D6DC0; // type:func rom:0xFEF60 +DropResizableItemEntity = 0x802D6EC0; // type:func rom:0xFF060 +RemoveItemEntity = 0x802D6FCC; // type:func rom:0xFF16C +AddBadge = 0x802D6FF8; // type:func rom:0xFF198 +RemoveBadge = 0x802D7050; // type:func rom:0xFF1F0 +SetItemPos = 0x802D70D0; // type:func rom:0xFF270 +SetItemFlags = 0x802D7194; // type:func rom:0xFF334 +SetItemAlpha = 0x802D721C; // type:func rom:0xFF3BC +AddCoin = 0x802D7278; // type:func rom:0xFF418 +AddStarPoints = 0x802D72B4; // type:func rom:0xFF454 +AddStarPieces = 0x802D72F0; // type:func rom:0xFF490 +GetItemPower = 0x802D732C; // type:func rom:0xFF4CC +ShowGotItem = 0x802D73A4; // type:func rom:0xFF544 +show_start_recovery_shimmer = 0x802D7460; // type:func rom:0xFF600 +show_recovery_shimmer = 0x802D74C0; // type:func rom:0xFF660 +ShowStartRecoveryShimmer = 0x802D7520; // type:func rom:0xFF6C0 +ShowRecoveryShimmer = 0x802D75D8; // type:func rom:0xFF778 +func_802D7690 = 0x802D7690; // type:func rom:0xFF830 +ShowEmote = 0x802D78A0; // type:func rom:0xFFA40 +RemoveEffect = 0x802D7AE4; // type:func rom:0xFFC84 +DismissEffect = 0x802D7B10; // type:func rom:0xFFCB0 +DismissItemOutline = 0x802D7B44; // type:func rom:0xFFCE4 +func_802D7B74 = 0x802D7B74; // type:func rom:0xFFD14 +InterpMotionBlurParams = 0x802D7BA4; // type:func rom:0xFFD44 +EVS_UpdateMotionBlurParams = 0x802D9D50; // rom:0x101EF0 +SetMotionBlurParams = 0x802D7CF8; // type:func rom:0xFFE98 +ShowSweat = 0x802D7E08; // type:func rom:0xFFFA8 +ShowSleepBubble = 0x802D8028; // type:func rom:0x1001C8 +SetSleepBubbleTimeLeft = 0x802D8248; // type:func rom:0x1003E8 +PlayEffect = 0x802D829C; // type:func rom:0x10043C +D_802D9D70 = 0x802D9D70; // rom:0x101F10 +D_802D9D71 = 0x802D9D71; // rom:0x101F11 +StarShrineLightBeamAlpha = 0x802D9D72; // rom:0x101F12 +SetSpriteShading = 0x802D9700; // type:func rom:0x1018A0 +EnableSpriteShading = 0x802D9A3C; // type:func rom:0x101BDC +GetDemoState = 0x802D9A90; // type:func rom:0x101C30 +DemoPressButton = 0x802D9AC0; // type:func rom:0x101C60 +DemoReleaseButton = 0x802D9AF8; // type:func rom:0x101C98 +DemoSetButtons = 0x802D9B34; // type:func rom:0x101CD4 +DemoJoystickRadial = 0x802D9B64; // type:func rom:0x101D04 +DemoJoystickXY = 0x802D9C10; // type:func rom:0x101DB0 +spr_defaultQuad = 0x80112EE0; // rom:0xA95E0 +SprPauseVp = 0x80112F20; // rom:0xA9620 +SprPauseVpAlt = 0x80112F30; // rom:0xA9630 +D_802DF3F0 = 0x80112F40; // rom:0xA9640 +D_802DF428 = 0x80112F78; // rom:0xA9678 +D_802DF460 = 0x80112FB0; // rom:0xA96B0 +D_802DF490 = 0x80112FE0; // rom:0xA96E0 +spr_animUpdateTimeScale = 0x80113010; // rom:0xA9710 +spr_playerSpriteSets = 0x80113014; // rom:0xA9714 +spr_init_quad_cache = 0x8010F890; // type:func rom:0xA5F90 +D_802DFE44 = 0x80113994; +D_802DFE48 = 0x80113998; +spr_get_cached_quad = 0x8010F8DC; // type:func rom:0xA5FDC +spr_make_quad_for_size = 0x8010F90C; // type:func rom:0xA600C +spr_get_quad_for_size = 0x8010F9C8; // type:func rom:0xA60C8 +spr_clear_quad_cache = 0x8010FB10; // type:func rom:0xA6210 +spr_appendGfx_component_flat = 0x8010FB58; // type:func rom:0xA6258 +spr_appendGfx_component = 0x80110444; // type:func rom:0xA6B44 +D_802DF540 = 0x80113090; +spr_transform_point = 0x80110850; // type:func rom:0xA6F50 +spr_draw_component = 0x80110A2C; // type:func rom:0xA712C +D_802DFEA0 = 0x801139F0; +D_802DF57C = 0x801130CC; +spr_unpack_signed_12bit = 0x80110C2C; // type:func rom:0xA732C +spr_unpack_signed_16bit = 0x80110C4C; // type:func rom:0xA734C +spr_component_update_commands = 0x80110C6C; // type:func rom:0xA736C +SpriteUpdateNotifyValue = 0x801139FC; +spr_component_update_finish = 0x80111184; // type:func rom:0xA7884 +spr_component_update = 0x8011122C; // type:func rom:0xA792C +spr_init_component_anim_state = 0x80111300; // type:func rom:0xA7A00 +spr_init_anim_state = 0x80111370; // type:func rom:0xA7A70 +spr_set_anim_timescale = 0x801113DC; // type:func rom:0xA7ADC +spr_load_player_sprite = 0x801113EC; // type:func rom:0xA7AEC +spr_playerMaxComponents = 0x801130D0; +spr_playerSprites = 0x80113098; +spr_allocateBtlComponentsOnWorldHeap = 0x80113074; +spr_playerCurrentAnimInfo = 0x801130D8; +NpcSpriteInstanceCount = 0x801134A8; +NpcSpriteData = 0x80113100; +SpriteInstances = 0x80113598; +func_802DDA84 = 0x801115D4; // type:func rom:0xA7CD4 +spr_update_player_sprite = 0x801115DC; // type:func rom:0xA7CDC +spr_draw_player_sprite = 0x80111790; // type:func rom:0xA7E90 +func_802DDEC4 = 0x80111A14; // type:func rom:0xA8114 +set_player_imgfx_comp = 0x80111A34; // type:func rom:0xA8134 +spr_get_player_raster_info = 0x80111B94; // type:func rom:0xA8294 +spr_get_player_palettes = 0x80111C10; // type:func rom:0xA8310 +spr_load_npc_sprite = 0x80111C3C; // type:func rom:0xA833C +MaxLoadedSpriteInstanceID = 0x80113080; +spr_update_sprite = 0x80111DFC; // type:func rom:0xA84FC +spr_draw_npc_sprite = 0x80111F28; // type:func rom:0xA8628 +spr_get_notify_value = 0x80112118; // type:func rom:0xA8818 +spr_free_sprite = 0x80112138; // type:func rom:0xA8838 +get_npc_comp_imgfx_idx = 0x80112298; // type:func rom:0xA8998 +set_npc_imgfx_comp = 0x801122D0; // type:func rom:0xA89D0 +set_npc_imgfx_all = 0x801123E4; // type:func rom:0xA8AE4 +spr_get_comp_position = 0x8011242C; // type:func rom:0xA8B2C +spr_get_npc_raster_info = 0x80112528; // type:func rom:0xA8C28 +spr_get_npc_palettes = 0x80112590; // type:func rom:0xA8C90 +spr_get_npc_color_variations = 0x801125BC; // type:func rom:0xA8CBC +D_802DF520 = 0x80113070; +D_802DF528 = 0x80113078; +D_802DF534 = 0x80113084; +D_802DF544 = 0x80113094; +D_802DF584 = 0x801130D4; +D_802DF5AC = 0x801130FC; +D_802DFA44 = 0x80113594; +spr_swizzle_anim_offsets = 0x801125F0; // type:func rom:0xA8CF0 +spr_load_sprite = 0x8011265C; // type:func rom:0xA8D5C +SpriteDataHeader = 0x801147B0; +spr_asset_entry = 0x80113A00; +PlayerRasterLoadDescBuffer = 0x80113A08; +PlayerRasterLoadDescNumLoaded = 0x80113B9C; +PlayerSpriteRasterSets = 0x80114770; +PlayerRasterLoadDescBeginSpriteIndex = 0x80113BA0; +PlayerRasterHeader = 0x80114760; +PlayerRasterLoadDesc = 0x80113BE0; +spr_init_player_raster_cache = 0x801128B0; // type:func rom:0xA8FB0 +PlayerRasterCacheSize = 0x801147A8; +PlayerRasterMaxSize = 0x801147AC; +PlayerRasterCache = 0x801147C0; +spr_get_player_raster = 0x801129F0; // type:func rom:0xA90F0 +spr_update_player_raster_cache = 0x80112B04; // type:func rom:0xA9204 +spr_load_npc_extra_anims = 0x80112B5C; // type:func rom:0xA925C +spr_allocate_components = 0x80112E28; // type:func rom:0xA9528 +D_802D0084 = 0x80113BD4; +D_802E0C1C = 0x8011476C; +D_802E0C6C = 0x801147BC; +entity_Shadow_init = 0x802DBD40; // type:func rom:0x102620 +entity_can_collide_with_jumping_player = 0x802DBD60; // type:func rom:0x102640 +D_802E9170 = 0x802E4120; // rom:0x10AA00 +D_802E91F0 = 0x802E41A0; // rom:0x10AA80 +D_802E9270 = 0x802E4220; // rom:0x10AB00 size:0x40 +D_802E92B0 = 0x802E4260; // rom:0x10AB40 size:0x40 +D_802E92F0 = 0x802E42A0; // rom:0x10AB80 +D_802E94F0 = 0x802E44A0; // rom:0x10AD80 +Entity_Shadow_GfxCommon = 0x802E46A0; // rom:0x10AF80 +Entity_Shadow_LoadTexSquare = 0x802E46E8; // rom:0x10AFC8 +Entity_Shadow_LoadTexCircle = 0x802E4738; // rom:0x10B018 +Entity_RenderSquareShadow = 0x802E4788; // rom:0x10B068 +Entity_RenderCircularShadow = 0x802E47B0; // rom:0x10B090 +Entity_RenderNone = 0x802E47D8; // rom:0x10B0B8 +Entity_RenderNone_Script = 0x802E47E0; // rom:0x10B0C0 +Entity_CircularShadowA_Render = 0x802E4800; // rom:0x10B0E0 +Entity_CircularShadowB_Render = 0x802E4824; // rom:0x10B104 +Entity_SquareShadow_Render = 0x802E4848; // rom:0x10B128 +CircularShadowA = 0x802E486C; // rom:0x10B14C +CircularShadowB = 0x802E4890; // rom:0x10B170 +SquareShadow = 0x802E48B4; // rom:0x10B194 +entity_SaveBlock_setupGfx = 0x802DBD90; // type:func rom:0x102670 +entity_SaveBlock_idle = 0x802DC0A4; // type:func rom:0x102984 +entity_SaveBlock_pause_game = 0x802DC0FC; // type:func rom:0x1029DC +entity_SaveBlock_resume_game = 0x802DC12C; // type:func rom:0x102A0C +entity_SaveBlock_save_data = 0x802DC150; // type:func rom:0x102A30 +entity_SaveBlock_show_tutorial_message = 0x802DC1B4; // type:func rom:0x102A94 +SaveBlockTutorialPrinterClosed = 0x802E6340; +entity_SaveBlock_wait_for_close_tutorial = 0x802DC220; // type:func rom:0x102B00 +entity_SaveBlock_show_choice_message = 0x802DC248; // type:func rom:0x102B28 +SaveBlockResultPrinterClosed = 0x802E6344; +SaveBlockResultPrinter = 0x802E634C; +SaveBlockTutorialPrinter = 0x802E6348; +entity_SaveBlock_show_result_message = 0x802DC2A8; // type:func rom:0x102B88 +entity_SaveBlock_wait_for_close_result = 0x802DC2D8; // type:func rom:0x102BB8 +entity_SaveBlock_wait_for_close_choice = 0x802DC300; // type:func rom:0x102BE0 +Entity_SaveBlock_ScriptResume = 0x802E498C; // rom:0x10B26C +entity_SaveBlock_init = 0x802DC368; // type:func rom:0x102C48 +Entity_SaveBlock_Script = 0x802E48E0; // rom:0x10B1C0 +Entity_SaveBlock_RenderScript = 0x802E49AC; // rom:0x10B28C +Entity_SavePoint = 0x802E49C8; // rom:0x10B2A8 +entity_GreenStompSwitch_idle = 0x802DC3B0; // type:func rom:0x102C90 +entity_GreenStompSwitch_retract = 0x802DC410; // type:func rom:0x102CF0 +entity_GreenStompSwitch_extend = 0x802DC488; // type:func rom:0x102D68 +entity_switch_fall_down = 0x802DC4EC; // type:func rom:0x102DCC +entity_HugeBlueSwitch_idle = 0x802DC5C4; // type:func rom:0x102EA4 +entity_small_switch_idle = 0x802DC610; // type:func rom:0x102EF0 +entity_RedSwitch_wait_and_reset = 0x802DC6F0; // type:func rom:0x102FD0 +entity_base_switch_anim_init = 0x802DC71C; // type:func rom:0x102FFC +entity_RedSwitch_animate_scale = 0x802DC758; // type:func rom:0x103038 +entity_base_switch_start_bound_script = 0x802DCE58; // type:func rom:0x103738 +entity_base_switch_animate_scale = 0x802DCE8C; // type:func rom:0x10376C +entity_base_switch_init = 0x802DD2FC; // type:func rom:0x103BDC +entity_BlueSwitch_init = 0x802DD330; // type:func rom:0x103C10 +SwitchToLink = 0x802E6350; +entity_HugeBlueSwitch_init = 0x802DD3B8; // type:func rom:0x103C98 +Entity_RedSwitch_Script = 0x802E49F0; // rom:0x10B2D0 +Entity_HugeBlueSwitch_Script = 0x802E4A38; // rom:0x10B318 +Entity_BlueSwitch_Script = 0x802E4A74; // rom:0x10B354 +Entity_GreenStompSwitch_Script = 0x802E4AB0; // rom:0x10B390 +Entity_BlueSwitch_RenderScript = 0x802E4AF0; // rom:0x10B3D0 +Entity_HugeBlueSwitch_RenderScript = 0x802E4B0C; // rom:0x10B3EC +Entity_RedSwitch_RenderScript = 0x802E4B28; // rom:0x10B408 +Entity_GreenStompSwitch_RenderScript = 0x802E4B44; // rom:0x10B424 +Entity_RedSwitch = 0x802E4B60; // rom:0x10B440 +Entity_BlueSwitch = 0x802E4B84; // rom:0x10B464 +Entity_HugeBlueSwitch = 0x802E4BA8; // rom:0x10B488 +Entity_GreenStompSwitch = 0x802E4BCC; // rom:0x10B4AC +entity_BrickBlock_idle = 0x802DD400; // type:func rom:0x103CE0 +entity_shattering_init_pieces = 0x802DD41C; // type:func rom:0x103CFC +entity_shattering_setupGfx = 0x802DDB54; // type:func rom:0x104434 +entity_shattering_idle = 0x802DD5EC; // type:func rom:0x103ECC +Entity_ShatteringBlock_Script = 0x802E4BF0; // rom:0x10B4D0 +Entity_ShatteringBlock_RenderScript = 0x802E4C20; // rom:0x10B500 +Entity_ShatteringHammer1Block = 0x802E4C3C; // rom:0x10B51C +entity_shattering_block_init = 0x802DDE60; // type:func rom:0x104740 +Entity_ShatteringHammer2Block = 0x802E4C60; // rom:0x10B540 +Entity_ShatteringHammer3Block = 0x802E4C84; // rom:0x10B564 +Entity_ShatteringHammer1BlockTiny = 0x802E4CA8; // rom:0x10B588 +Entity_ShatteringHammer2BlockTiny = 0x802E4CCC; // rom:0x10B5AC +Entity_ShatteringHammer3BlockTiny = 0x802E4CF0; // rom:0x10B5D0 +Entity_ShatteringBrickBlock = 0x802E4D14; // rom:0x10B5F4 +entity_breakable_block_create_shattering_entity = 0x802DDF80; // type:func rom:0x104860 +entity_base_block_setupGfx = 0x802DE070; // type:func rom:0x104950 +entity_base_block_play_vanish_effect = 0x802DE160; // type:func rom:0x104A40 +entity_block_hit_init_scale = 0x802DE19C; // type:func rom:0x104A7C +entity_block_hit_animate_scale = 0x802DE23C; // type:func rom:0x104B1C +entity_base_block_idle = 0x802DE600; // type:func rom:0x104EE0 +entity_base_block_update_slow_sinking = 0x802DE320; // type:func rom:0x104C00 +entity_base_block_init = 0x802DE694; // type:func rom:0x104F74 +entity_inactive_block_hit_init = 0x802DE6C4; // type:func rom:0x104FA4 +entity_inactive_block_hit_anim = 0x802DE6D8; // type:func rom:0x104FB8 +entity_MulticoinBlock_update_timer = 0x802DE9B0; // type:func rom:0x105290 +entity_inactive_block_recoil_anim = 0x802DE794; // type:func rom:0x105074 +entity_MulticoinBlock_init = 0x802DE848; // type:func rom:0x105128 +entity_MulticoinBlock_spawn_coin = 0x802DE888; // type:func rom:0x105168 +Entity_InertYellowBlock = 0x802E502C; // rom:0x10B90C +Entity_CreatedInertBlock_Script = 0x802E4E04; // rom:0x10B6E4 +entity_MulticoinBlock_idle = 0x802DE9F8; // type:func rom:0x1052D8 +entity_MulticoinBlock_check_if_inactive = 0x802DEAB8; // type:func rom:0x105398 +entity_block_handle_collision = 0x802DEB54; // type:func rom:0x105434 +Entity_BreakingBlock_Script = 0x802E4E30; // rom:0x10B710 +entity_init_Hammer1Block_normal = 0x802DEDB0; // type:func rom:0x105690 +entity_init_HammerBlock_small = 0x802DEDE0; // type:func rom:0x1056C0 +Entity_PowBlock_Script = 0x802E4D40; // rom:0x10B620 +Entity_BaseBlock_Script = 0x802E4D7C; // rom:0x10B65C +D_802E9DEC = 0x802E4D9C; // rom:0x10B67C +Entity_InertBlock_Script = 0x802E4DBC; // rom:0x10B69C +Entity_BrickBlock_Script = 0x802E4E64; // rom:0x10B744 +Entity_Hammer1Block_Script = 0x802E4EB0; // rom:0x10B790 +Entity_MulticoinBlock_Script = 0x802E4ED8; // rom:0x10B7B8 +Entity_InertYellowBlock_RenderScript = 0x802E4F30; // rom:0x10B810 +Entity_InertRedBlock_RenderScript = 0x802E4F4C; // rom:0x10B82C +Entity_MulticoinBrick_RenderScript = 0x802E4F68; // rom:0x10B848 +Entity_Hammer1Block_RenderScript = 0x802E4F84; // rom:0x10B864 +Entity_Hammer2Block_RenderScript = 0x802E4FA0; // rom:0x10B880 +Entity_Hammer3Block_RenderScript = 0x802E4FBC; // rom:0x10B89C +Entity_PushBlock_RenderScript = 0x802E4FD8; // rom:0x10B8B8 +Entity_BrickBlock_RenderScript = 0x802E4FF4; // rom:0x10B8D4 +Entity_PowBlock_RenderScript = 0x802E5010; // rom:0x10B8F0 +Entity_InertRedBlock = 0x802E5050; // rom:0x10B930 +Entity_BrickBlock = 0x802E5074; // rom:0x10B954 +Entity_MulticoinBlock = 0x802E5098; // rom:0x10B978 +Entity_Hammer1Block = 0x802E50BC; // rom:0x10B99C +Entity_Hammer1Block_WideX = 0x802E50E0; // rom:0x10B9C0 +Entity_Hammer1Block_WideZ = 0x802E5104; // rom:0x10B9E4 +Entity_Hammer1BlockTiny = 0x802E5128; // rom:0x10BA08 +Entity_Hammer2Block = 0x802E514C; // rom:0x10BA2C +Entity_Hammer2Block_WideX = 0x802E5170; // rom:0x10BA50 +Entity_Hammer2Block_WideZ = 0x802E5194; // rom:0x10BA74 +Entity_Hammer2BlockTiny = 0x802E51B8; // rom:0x10BA98 +Entity_Hammer3Block = 0x802E51DC; // rom:0x10BABC +Entity_Hammer3Block_WideX = 0x802E5200; // rom:0x10BAE0 +Entity_Hammer3Block_WideZ = 0x802E5224; // rom:0x10BB04 +Entity_Hammer3BlockTiny = 0x802E5248; // rom:0x10BB28 +Entity_PushBlock = 0x802E526C; // rom:0x10BB4C +Entity_PowBlock = 0x802E5290; // rom:0x10BB70 +entity_ItemBlock_idle = 0x802DEE30; // type:func rom:0x105710 +entity_HiddenItemBlock_idle = 0x802DEE4C; // type:func rom:0x10572C +entity_HitItemBlock_appear = 0x802DEE90; // type:func rom:0x105770 +entity_ItemBlock_spawn_item = 0x802DEEBC; // type:func rom:0x10579C +entity_TriggerBlock_start_bound_script_2 = 0x802DEFF0; // type:func rom:0x1058D0 +entity_TriggerBlock_play_vanish_effect = 0x802DF00C; // type:func rom:0x1058EC +TriggerBlockVanishEffect = 0x802E6360; +entity_HitItemBlock_play_anim = 0x802DF050; // type:func rom:0x105930 +entity_HitItemBlock_show_inactive = 0x802DF0B8; // type:func rom:0x105998 +entity_ItemBlock_check_if_inactive = 0x802DF104; // type:func rom:0x1059E4 +D_802EA310 = 0x802E52C0; // rom:0x10BBA0 +entity_ItemBlock_replace_with_inactive = 0x802DF1CC; // type:func rom:0x105AAC +Entity_HitRedBlock = 0x802E5610; // rom:0x10BEF0 +Entity_HitFloatingYellowBlock = 0x802E55EC; // rom:0x10BECC +Entity_HitGroundedYellowBlock = 0x802E55C8; // rom:0x10BEA8 +entity_HitItemBlock_hide = 0x802DF434; // type:func rom:0x105D14 +entity_TriggerBlock_start_bound_script = 0x802DF47C; // type:func rom:0x105D5C +entity_TriggerBlock_disable_player_input = 0x802DF4A8; // type:func rom:0x105D88 +entity_TriggerBlock_enable_player_input = 0x802DF4F0; // type:func rom:0x105DD0 +entity_ItemBlock_setupGfx = 0x802DF50C; // type:func rom:0x105DEC +entity_ItemBlock_init = 0x802DF5FC; // type:func rom:0x105EDC +entity_HiddenItemBlock_init = 0x802DF644; // type:func rom:0x105F24 +entity_ItemlessBlock_init = 0x802DF66C; // type:func rom:0x105F4C +Entity_ItemBlock_Script = 0x802E52D8; // rom:0x10BBB8 +Entity_HiddenItemBlock_Script = 0x802E533C; // rom:0x10BC1C +Entity_HitBlock_Script = 0x802E53A0; // rom:0x10BC80 +Entity_TriggerBlock_Script = 0x802E53F0; // rom:0x10BCD0 +Entity_HitYellowBlock_dma = 0x802E5474; // rom:0x10BD54 +Entity_HitFloatinYellowBlock_dma = 0x802E5484; // rom:0x10BD64 +Entity_HitRedBlock_dma = 0x802E5494; // rom:0x10BD74 +Entity_YellowBlock_RenderScript = 0x802E54A4; // rom:0x10BD84 +Entity_HiddenYellowBlock_RenderScript = 0x802E54C0; // rom:0x10BDA0 +Entity_RedBlock_RenderScript = 0x802E54DC; // rom:0x10BDBC +Entity_HiddenRedBlock_RenderScript = 0x802E54F8; // rom:0x10BDD8 +Entity_YellowBlock = 0x802E5514; // rom:0x10BDF4 +Entity_HiddenYellowBlock = 0x802E5538; // rom:0x10BE18 +Entity_RedBlock = 0x802E555C; // rom:0x10BE3C +Entity_HiddenRedBlock = 0x802E5580; // rom:0x10BE60 +Entity_TriggerBlock = 0x802E55A4; // rom:0x10BE84 +entity_HeartBlockContent_get_previous_yaw = 0x802DF6C0; // type:func rom:0x105FA0 +entity_HeartBlockContent__setupGfx = 0x802DF6E0; // type:func rom:0x105FC0 +entity_HeartBlockContent_setupGfx = 0x802DFA9C; // type:func rom:0x10637C +entity_HeartBlockContent_set_initial_pos = 0x802DFAC0; // type:func rom:0x1063A0 +entity_HeartBlockContent__reset = 0x802DFB10; // type:func rom:0x1063F0 +entity_HeartBlockContent_anim_idle = 0x802DFBC0; // type:func rom:0x1064A0 +entity_HeartBlockContent_reset_data = 0x802DFD90; // type:func rom:0x106670 +entity_HeartBlockContent__anim_heal = 0x802DFDB4; // type:func rom:0x106694 +Entity_HeartBlockContent_RenderScriptHit = 0x802E56F4; // rom:0x10BFD4 +entity_HeartBlock_idle = 0x802E02B8; // type:func rom:0x106B98 +entity_HeartBlockContent_anim_beating = 0x802E02D4; // type:func rom:0x106BB4 +entity_HeartBlockContent_init = 0x802E03BC; // type:func rom:0x106C9C +entity_HeartBlockContent_reset = 0x802E03D8; // type:func rom:0x106CB8 +Entity_HeartBlockContent_RenderScriptIdle = 0x802E56D8; // rom:0x10BFB8 +entity_HeartBlockContent_idle = 0x802E040C; // type:func rom:0x106CEC +entity_HeartBlockContent_anim_heal = 0x802E043C; // type:func rom:0x106D1C +entity_HeartBlock_change_render_script = 0x802E0458; // type:func rom:0x106D38 +Entity_HeartBlockContent_RenderScriptAfterHit = 0x802E5710; // rom:0x10BFF0 +entity_HeartBlock_show_tutorial_message = 0x802E047C; // type:func rom:0x106D5C +HeartBlockPrinterClosed = 0x802E6370; +entity_HeartBlock_wait_for_close_tutorial = 0x802E050C; // type:func rom:0x106DEC +entity_HeartBlock_create_child_entity = 0x802E0558; // type:func rom:0x106E38 +entity_HeartBlock_init = 0x802E05F8; // type:func rom:0x106ED8 +Entity_HeartBlockContent = 0x802E576C; // rom:0x10C04C +Entity_HeartBlockContent_Script = 0x802E5640; // rom:0x10BF20 +Entity_HeartBlock_Script = 0x802E569C; // rom:0x10BF7C +Entity_HeartBlock_RenderScript = 0x802E572C; // rom:0x10C00C +Entity_HeartBlockFrame = 0x802E5748; // rom:0x10C028 +Entity_HeartBlock = 0x802E5790; // rom:0x10C070 +entity_SuperBlockContent_get_previous_yaw = 0x802E0620; // type:func rom:0x106F00 +entity_upgrade_block_hide_content = 0x802E0640; // type:func rom:0x106F20 +entity_upgrade_block_idle = 0x802E0680; // type:func rom:0x106F60 +entity_upgrade_block_check_if_inactive = 0x802E069C; // type:func rom:0x106F7C +Entity_SuperBlockContent = 0x802E58E4; // rom:0x10C1C4 +entity_upgrade_block_init = 0x802E073C; // type:func rom:0x10701C +entity_SuperBlock_init = 0x802E0794; // type:func rom:0x107074 +entity_UltraBlock_init = 0x802E07B0; // type:func rom:0x107090 +entity_SuperBlockContent_attach_to_parent = 0x802E07CC; // type:func rom:0x1070AC +Entity_SuperBlock_Script = 0x802E57C0; // rom:0x10C0A0 +Entity_SuperBlock_Palettes = 0x802E5810; // rom:0x10C0F0 +Entity_SuperBlock_PalData = 0x802E5820; // rom:0x10C100 +entity_SuperBlockContent_setupGfx = 0x802E081C; // type:func rom:0x1070FC +entity_SuperBlockContent_idle = 0x802E0E00; // type:func rom:0x1076E0 +entity_init_SuperBlockContent = 0x802E0F00; // type:func rom:0x1077E0 +entity_init_UltraBlockContent = 0x802E0F2C; // type:func rom:0x10780C +Entity_SuperBlockContent_Script = 0x802E5830; // rom:0x10C110 +Entity_UltraBlockContent_Script = 0x802E5840; // rom:0x10C120 +Entity_SuperBlock_RenderScript = 0x802E5850; // rom:0x10C130 +Entity_SuperBlockContent_RenderScript = 0x802E586C; // rom:0x10C14C +Entity_UltraBlock_RenderScript = 0x802E5888; // rom:0x10C168 +Entity_UltraBlockContent_RenderScript = 0x802E58A4; // rom:0x10C184 +Entity_SuperBlock = 0x802E58C0; // rom:0x10C1A0 +Entity_UltraBlock = 0x802E5908; // rom:0x10C1E8 +Entity_UltraBlockContent = 0x802E592C; // rom:0x10C20C +entity_ScriptSpring_idle = 0x802E0F60; // type:func rom:0x107840 +entity_SimpleSpring_idle = 0x802E1014; // type:func rom:0x1078F4 +entity_SimpleSpring_set_jump_params = 0x802E10C8; // type:func rom:0x1079A8 +entity_SimpleSpring_enable_player_input = 0x802E1128; // type:func rom:0x107A08 +entity_ScriptSpring_init = 0x802E1144; // type:func rom:0x107A24 +entity_SimpleSpring_init = 0x802E114C; // type:func rom:0x107A2C +Entity_ScriptSpring_Script = 0x802E5950; // rom:0x10C230 +Entity_SimpleSpring_Script = 0x802E5974; // rom:0x10C254 +Entity_ScriptSpring_dma = 0x802E59C0; // rom:0x10C2A0 +Entity_SimpleSpring_dma = 0x802E59D0; // rom:0x10C2B0 +Entity_ScriptSpring = 0x802E59E0; // rom:0x10C2C0 +Entity_SimpleSpring = 0x802E5A04; // rom:0x10C2E4 +entity_HiddenPanel_setupGfx = 0x802E1160; // type:func rom:0x107A40 +entity_HiddenPanel_set_ispy_notification = 0x802E12E8; // type:func rom:0x107BC8 +entity_HiddenPanel_hide = 0x802E1340; // type:func rom:0x107C20 +entity_HiddenPanel_idle = 0x802E1358; // type:func rom:0x107C38 +entity_HiddenPanel_is_item_on_top = 0x802E1B1C; // type:func rom:0x1083FC +entity_HiddenPanel_flip_over = 0x802E1524; // type:func rom:0x107E04 +entity_HiddenPanel_init = 0x802E1BD4; // type:func rom:0x1084B4 +ERS_AltHiddenPanel = 0x802E5A90; // rom:0x10C370 +Entity_HiddenPanel_Script = 0x802E5A30; // rom:0x10C310 +ERS_HiddenPanel = 0x802E5A6C; // rom:0x10C34C +Entity_HiddenPanel = 0x802E5AB4; // rom:0x10C394 +Entity_Chest_AdjustCam_ISK = 0x802E5AE0; // rom:0x10C3C0 +Entity_Chest_ResetCam_ISK = 0x802E5BBC; // rom:0x10C49C +Entity_Chest_AdjustCam_TIK = 0x802E5BF0; // rom:0x10C4D0 +Entity_Chest_AdjustCam_KZN = 0x802E5C34; // rom:0x10C514 +Entity_Chest_ResetCam_Default = 0x802E5C78; // rom:0x10C558 +entity_Chest_adjust_camera = 0x802E1DD0; // type:func rom:0x1086B0 +entity_Chest_reset_camera = 0x802E1E40; // type:func rom:0x108720 +entity_Chest_setupGfx = 0x802E1E88; // type:func rom:0x108768 +entity_Chest_check_opened = 0x802E1FE4; // type:func rom:0x1088C4 +Entity_Chest_ScriptOpened = 0x802E5D2C; // rom:0x10C60C +entity_Chest_idle = 0x802E2060; // type:func rom:0x108940 +entity_Chest_begin_opening = 0x802E21A8; // type:func rom:0x108A88 +entity_Chest_open = 0x802E21E0; // type:func rom:0x108AC0 +entity_Chest_close = 0x802E23DC; // type:func rom:0x108CBC +entity_GiantChest_hide_effect = 0x802E2570; // type:func rom:0x108E50 +entity_GiantChest_open = 0x802E2594; // type:func rom:0x108E74 +entity_GiantChest_give_equipment = 0x802E2A94; // type:func rom:0x109374 +entity_Chest_start_bound_script = 0x802E2C20; // type:func rom:0x109500 +entity_Chest_enable_player_input = 0x802E2C3C; // type:func rom:0x10951C +entity_GiantChest_await_got_item = 0x802E2C68; // type:func rom:0x109548 +entity_Chest_clear_item_id = 0x802E2CD8; // type:func rom:0x1095B8 +entity_Chest_readargs = 0x802E2CE8; // type:func rom:0x1095C8 +entity_GiantChest_init = 0x802E2D04; // type:func rom:0x1095E4 +entity_Chest_init = 0x802E2D34; // type:func rom:0x109614 +Entity_GiantChest_Script = 0x802E5CAC; // rom:0x10C58C +Entity_Chest_Script = 0x802E5D3C; // rom:0x10C61C +Entity_Chest_RenderScript = 0x802E5DA0; // rom:0x10C680 +Entity_GiantChest = 0x802E5DBC; // rom:0x10C69C +Entity_Chest = 0x802E5DE0; // rom:0x10C6C0 +entity_WoodenCrate_init_fragments = 0x802E2D90; // type:func rom:0x109670 +entity_WoodenCrate_setupGfx = 0x802E34FC; // type:func rom:0x109DDC +entity_WoodenCrate_init = 0x802E2EF0; // type:func rom:0x1097D0 +entity_WoodenCrate_reset_fragments = 0x802E2F1C; // type:func rom:0x1097FC +entity_WoodenCrate_update_fragments = 0x802E2F50; // type:func rom:0x109830 +entity_WoodenCrate_idle = 0x802E3808; // type:func rom:0x10A0E8 +Entity_WoodenCrate_RenderShatteredScript = 0x802E5E2C; // rom:0x10C70C +entity_WoodenCrate_shatter = 0x802E389C; // type:func rom:0x10A17C +Entity_WoodenCrate_RenderScript = 0x802E5E10; // rom:0x10C6F0 +Entity_WoodenCrate_Script = 0x802E5E48; // rom:0x10C728 +Entity_WoodenCrate = 0x802E5E84; // rom:0x10C764 +entity_BlueWarpPipe_check_if_active = 0x802E3960; // type:func rom:0x10A240 +entity_BlueWarpPipe_rise_up = 0x802E39A8; // type:func rom:0x10A288 +entity_BlueWarpPipe_wait_for_player_to_get_off = 0x802E3A08; // type:func rom:0x10A2E8 +entity_BlueWarpPipe_idle = 0x802E3A8C; // type:func rom:0x10A36C +entity_BlueWarpPipe_set_player_move_to_center = 0x802E3B70; // type:func rom:0x10A450 +entity_BlueWarpPipe_wait_player_move_to_center = 0x802E3C44; // type:func rom:0x10A524 +entity_BlueWarpPipe_enter_pipe_init = 0x802E3C7C; // type:func rom:0x10A55C +entity_BlueWarpPipe_enter_pipe_update = 0x802E3D24; // type:func rom:0x10A604 +entity_BlueWarpPipe_start_bound_script = 0x802E3DC0; // type:func rom:0x10A6A0 +entity_BlueWarpPipe_setupGfx = 0x802E3DFC; // type:func rom:0x10A6DC +entity_init_BlueWarpPipe = 0x802E3F44; // type:func rom:0x10A824 +Entity_BlueWarpPipe_Script = 0x802E5EB0; // rom:0x10C790 +Entity_BlueWarpPipe_RenderScript = 0x802E5F14; // rom:0x10C7F4 +Entity_BlueWarpPipe = 0x802E5F30; // rom:0x10C810 +entity_Signpost_idle = 0x802E4000; // type:func rom:0x10A8E0 +Entity_Signpost_Script = 0x802E5F60; // rom:0x10C840 +Entity_Signpost_RenderScript = 0x802E5F70; // rom:0x10C850 +Entity_Signpost = 0x802E5F8C; // rom:0x10C86C +au_song_stop = 0x80055674; // type:func rom:0x30A74 +au_song_load = 0x80055584; // type:func rom:0x30984 +snd_set_song_variation_fade_time = 0x8005576C; // type:func rom:0x30B6C +func_80055B80 = 0x80055830; // type:func rom:0x30C30 +snd_ambient_stop_slow = 0x80055198; // type:func rom:0x30598 +world_action_sneaky_parasol_ROM_END = 0x00E343B0; +bgm_set_proximity_mix_full = 0x80055D18; // type:func rom:0x31118 +load_asset_by_name = 0x8005A9A0; // type:func rom:0x35DA0 +guRotateRPYF = 0x800642A0; // type:func rom:0x3F6A0 +gCurrentDisplayContextIndex = 0x800741D4; // rom:0x4F5D4 +func_800E06C0 = 0x800E06A0; // type:func rom:0x79B50 +snd_set_song_variation_fade = 0x800556C8; // type:func rom:0x30AC8 +gItemIconPaletteOffsets = 0x8008E91C; // rom:0x69D1C +bgm_set_proximity_mix_near = 0x80055CF4; // type:func rom:0x310F4 +gItemEntityScripts = 0x8008DDA4; // rom:0x691A4 +npc_raycast_down_sides = 0x800DCB5C; // type:func rom:0x7600C +test_ray_entities = 0x8005D0F8; // type:func rom:0x384F8 +snd_set_song_variation = 0x80055974; // type:func rom:0x30D74 +mem_clear = 0x800295C0; // type:func rom:0x49C0 +nuGfxCfbNum = 0x800773D0; // rom:0x527D0 +int_to_string = 0x80029484; // type:func rom:0x4884 +au_song_is_playing = 0x800556AC; // type:func rom:0x30AAC +SparkleScript_Coin = 0x80104C50; // rom:0x9E100 +gAreas = 0x800934C0; // rom:0x6E8C0 +npc_test_move_complex_with_slipping = 0x800DDD74; // type:func rom:0x77224 +snd_ambient_resume = 0x80055240; // type:func rom:0x30640 +phys_can_player_interact = 0x800E52CC; // type:func rom:0x7E77C +npc_raycast_up = 0x800DCE50; // type:func rom:0x76300 +get_time_freeze_mode = 0x8002715C; // type:func rom:0x255C +snd_ambient_play = 0x80055114; // type:func rom:0x30514 +func_800561A4 = 0x80055E54; // type:func rom:0x31254 +snd_load_ambient = 0x800550F8; // type:func rom:0x304F8 +guTranslate = 0x80067800; // type:func rom:0x42C00 +gEncounterState = 0x8009A5E0; +test_ray_colliders = 0x8005C980; // type:func rom:0x37D80 +gCurrentDoorSounds = 0x801563A0; +gCurrentRoomDoorSounds = 0x80156368; +snd_ambient_stop_quick = 0x80055154; // type:func rom:0x30554 +snd_ambient_pause = 0x800551EC; // type:func rom:0x305EC +general_heap_free = 0x8002AC38; // type:func rom:0x6038 +CreateEntityVarArgBuffer = 0x80161750; +gCurrentModels = 0x8015632C; +au_song_start_variation = 0x80055620; // type:func rom:0x30A20 +snd_song_set_track_volumes = 0x80055A8C; // type:func rom:0x30E8C +gWindows = 0x8015ECD0; +gPlayerStatusPtr = 0x800F7CC0; // rom:0x91170 +guOrtho = 0x80063A10; // type:func rom:0x3EE10 +guScale = 0x800676E0; // type:func rom:0x42AE0 +bgm_set_proximity_mix_far = 0x80055CD8; // type:func rom:0x310D8 +func_80055BB8 = 0x80055868; // type:func rom:0x30C68 +_heap_malloc = 0x8002902C; // type:func rom:0x442C +gItemIconRasterOffsets = 0x8008E3A8; // rom:0x697A8 +func_80055B28 = 0x800557D8; // type:func rom:0x30BD8 +snd_song_clear_track_volumes = 0x80055AF8; // type:func rom:0x30EF8 +npc_raycast_down_around = 0x800DC758; // type:func rom:0x75C08 +npc_test_move_simple_with_slipping = 0x800DDC24; // type:func rom:0x770D4 +is_player_dismounted = 0x800DFCD4; // type:func rom:0x79184 +heap_spriteHead = 0x8034F800; +general_heap_malloc = 0x8002ABE8; // type:func rom:0x5FE8 +gMusicSettings = 0x8015EA70; +transform_point = 0x800295E0; // type:func rom:0x49E0 +gCurrentModelTreeNodeInfo = 0x8009A5D4; +cosine = 0x80029394; // type:func rom:0x4794 +snd_stop_sound = 0x80055070; // type:func rom:0x30470 +snd_ambient_is_stopped = 0x80055294; // type:func rom:0x30694 +gMessageBoxFrameParts = 0x8008FEB0; // rom:0x6B2B0 +copy_matrix = 0x800296E0; // type:func rom:0x4AE0 +snd_start_sound_with_shift = 0x80054EF0; // type:func rom:0x302F0 +suggest_player_anim_always_forward = 0x800DFF58; // type:func rom:0x79408 +func_80055AF0 = 0x800557A0; // type:func rom:0x30BA0 +get_current_partner_id = 0x800E505C; // type:func rom:0x7E50C +func_800561E4 = 0x80055E94; // type:func rom:0x31294 +dist3D = 0x80029EEC; // type:func rom:0x52EC +gCurrentHiddenPanels = 0x8015F4F8; +entity_model_Hammer1Block_ROM_START = 0x00E3A3B0; +gBackgroundTintModePtr = 0x80156350; +snd_adjust_sound_with_shift = 0x80054FE0; // type:func rom:0x303E0 +draw_box = 0x800F5470; // type:func rom:0x8E920 +is_starting_conversation = 0x80043E08; // type:func rom:0x1F208 +Gfx_RM1_ALPHATEST = 0x80150920; // rom:0xE57B0 +get_shadow_by_index = 0x80115814; // type:func rom:0xAA6A4 +func_801491E4 = 0x8014E294; // type:func rom:0xE3124 +queue_render_task = 0x80122B20; // type:func rom:0xB79B0 +delete_shadow = 0x80117538; // type:func rom:0xAC3C8 +Gfx_RM2_ALPHATEST = 0x80150C88; // rom:0xE5B18 +mdl_get_shroud_tint_params = 0x80121090; // type:func rom:0xB5F20 +set_standard_shadow_scale = 0x80117A6C; // type:func rom:0xAC8FC +create_shadow_type = 0x80117470; // type:func rom:0xAC300 +sfx_play_sound_with_params = 0x8014EB68; // type:func rom:0xE39F8 +create_shading_palette = 0x8014D274; // type:func rom:0xE2104 +D_8014AFB0 = 0x80150060; // rom:0xE4EF0 +get_entity_by_index = 0x801157F8; // type:func rom:0xAA688 +update_entity_transform_matrix = 0x8011543C; // type:func rom:0xAA2CC +entity_get_collision_flags = 0x80115AC8; // type:func rom:0xAA958 +step_entity_commandlist = 0x80114DE8; // type:func rom:0xA9C78 +update_entity_inverse_rotation_matrix = 0x801156B4; // type:func rom:0xAA544 +update_entity_shadow_position = 0x80117554; // type:func rom:0xAC3E4 +delete_entity = 0x801158E0; // type:func rom:0xAA770 +delete_entity_and_unload_data = 0x801159A0; // type:func rom:0xAA830 +update_shadows = 0x80114CA8; // type:func rom:0xA9B38 +update_shadow_transform_matrix = 0x80115584; // type:func rom:0xAA414 +_delete_shadow = 0x80115A6C; // type:func rom:0xAA8FC +set_entity_commandlist = 0x80114DD0; // type:func rom:0xA9C60 +exec_entity_commandlist = 0x80114F78; // type:func rom:0xA9E08 +func_8010FD98 = 0x80114FA8; // type:func rom:0xA9E38 +func_8010FE44 = 0x80115054; // type:func rom:0xA9EE4 +entity_model_set_shadow_color = 0x80115078; // type:func rom:0xA9F08 +render_shadows = 0x801152DC; // type:func rom:0xAA16C +get_entity_list = 0x80115830; // type:func rom:0xAA6C0 +get_shadow_list = 0x8011585C; // type:func rom:0xAA6EC +entity_start_script = 0x80115888; // type:func rom:0xAA718 +get_entity_type = 0x801158B4; // type:func rom:0xAA744 +entity_free_static_data = 0x801169EC; // type:func rom:0xAB87C +entity_try_partner_interaction_trigger = 0x80115BEC; // type:func rom:0xAAA7C +test_player_entity_aabb = 0x80115CBC; // type:func rom:0xAAB4C +is_player_action_state = 0x80115DC0; // type:func rom:0xAAC50 +entity_set_render_script = 0x80115DDC; // type:func rom:0xAAC6C +entity_reset_collision = 0x80115E08; // type:func rom:0xAAC98 +load_area_specific_entity_data = 0x80115E24; // type:func rom:0xAACB4 +init_entity_data = 0x80116068; // type:func rom:0xAAEF8 +reload_world_entity_data = 0x80116120; // type:func rom:0xAAFB0 +entity_swizzle_anim_pointers = 0x801162C4; // type:func rom:0xAB154 +is_entity_data_loaded = 0x8011636C; // type:func rom:0xAB1FC +load_simple_entity_data = 0x801164B4; // type:func rom:0xAB344 +load_split_entity_data = 0x80116618; // type:func rom:0xAB4A8 +func_80111790 = 0x801169A0; // type:func rom:0xAB830 +create_entity = 0x80116AD4; // type:func rom:0xAB964 +create_entity_shadow = 0x801173DC; // type:func rom:0xAC26C +create_shadow_from_data = 0x80116DE8; // type:func rom:0xABC78 +MakeEntity = 0x80116F48; // type:func rom:0xABDD8 +SetEntityCullMode = 0x801170AC; // type:func rom:0xABF3C +UseDynamicShadow = 0x8011713C; // type:func rom:0xABFCC +AssignScript = 0x801171C0; // type:func rom:0xAC050 +AssignSwitchFlag = 0x80117208; // type:func rom:0xAC098 +AssignBlockFlag = 0x8011727C; // type:func rom:0xAC10C +AssignChestFlag = 0x801172C8; // type:func rom:0xAC158 +AssignPanelFlag = 0x80117324; // type:func rom:0xAC1B4 +AssignCrateFlag = 0x80117380; // type:func rom:0xAC210 +entity_raycast_down = 0x801177F8; // type:func rom:0xAC688 +set_npc_shadow_scale = 0x80117B10; // type:func rom:0xAC9A0 +set_peach_shadow_scale = 0x80117BE4; // type:func rom:0xACA74 +is_block_on_ground = 0x80117D30; // type:func rom:0xACBC0 +mode_default_nop = 0x80117DA0; // type:func rom:0xACC30 +set_next_game_mode = 0x80117DCC; // type:func rom:0xACC5C +set_game_mode_slot = 0x80117EB8; // type:func rom:0xACD48 +game_mode_set_fpDrawAuxUI = 0x80117F94; // type:func rom:0xACE24 +set_game_mode_flag_4 = 0x80117FE4; // type:func rom:0xACE74 +set_game_mode_flag_8 = 0x8011800C; // type:func rom:0xACE9C +clear_game_mode_unk_flags = 0x80118034; // type:func rom:0xACEC4 +set_game_mode_flag_10 = 0x8011805C; // type:func rom:0xACEEC +state_do_unk = 0x801180FC; // type:func rom:0xACF8C +ModelRenderModes = 0x80150070; // rom:0xE4F00 +Gfx_RM1_SURFACE_OPA = 0x801508A8; // rom:0xE5738 +Gfx_RM1_SURFACE_OPA_NO_AA = 0x801509C0; // rom:0xE5850 +Gfx_RM1_DECAL_OPA = 0x801508D0; // rom:0xE5760 +Gfx_RM1_DECAL_OPA_NO_AA = 0x801509E8; // rom:0xE5878 +Gfx_RM1_INTERSECTING_OPA = 0x801508F8; // rom:0xE5788 +Gfx_RM1_INTERSECTING_OPA_NO_AA = 0x80150A10; // rom:0xE58A0 +Gfx_RM1_ALPHATEST_ONESIDED = 0x80150A38; // rom:0xE58C8 +Gfx_RM1_SURFACE_XLU = 0x80150948; // rom:0xE57D8 +Gfx_RM1_SURFACE_XLU_AA_ZB_ZUPD = 0x80150AD0; // rom:0xE5960 +Gfx_RM1_SURFACE_XLU_NO_AA = 0x80150A60; // rom:0xE58F0 +Gfx_RM1_SURFACE_XLU_ZB_ZUPD = 0x80150B70; // rom:0xE5A00 +Gfx_RM1_DECAL_XLU = 0x80150970; // rom:0xE5800 +Gfx_RM1_DECAL_XLU_NO_AA = 0x80150A88; // rom:0xE5918 +Gfx_RM1_INTERSECTING_XLU = 0x80150998; // rom:0xE5828 +Gfx_RM1_PASS_THROUGH = 0x80150AB0; // rom:0xE5940 +Gfx_RM2_SURFACE_OPA = 0x80150C10; // rom:0xE5AA0 +Gfx_RM2_SURFACE_OPA_NO_AA = 0x80150D28; // rom:0xE5BB8 +Gfx_RM2_DECAL_OPA = 0x80150C38; // rom:0xE5AC8 +Gfx_RM2_DECAL_OPA_NO_AA = 0x80150D50; // rom:0xE5BE0 +Gfx_RM2_INTERSECTING_OPA = 0x80150C60; // rom:0xE5AF0 +Gfx_RM2_INTERSECTING_OPA_NO_AA = 0x80150D78; // rom:0xE5C08 +Gfx_RM2_ALPHATEST_ONESIDED = 0x80150DA8; // rom:0xE5C38 +Gfx_RM2_SURFACE_XLU = 0x80150CB0; // rom:0xE5B40 +Gfx_RM2_SURFACE_XLU_AA_ZB_ZUPD = 0x80150E38; // rom:0xE5CC8 +Gfx_RM2_SURFACE_XLU_NO_AA = 0x80150DC8; // rom:0xE5C58 +Gfx_RM2_DECAL_XLU = 0x80150CD8; // rom:0xE5B68 +Gfx_RM2_DECAL_XLU_NO_AA = 0x80150DF0; // rom:0xE5C80 +Gfx_RM2_INTERSECTING_XLU = 0x80150D00; // rom:0xE5B90 +Gfx_RM2_PASS_THROUGH = 0x80150E18; // rom:0xE5CA8 +Gfx_RM3_SURFACE_OPA = 0x80150F28; // rom:0xE5DB8 +Gfx_RM3_SURFACE_OPA_NO_AA = 0x80151040; // rom:0xE5ED0 +Gfx_RM3_DECAL_OPA = 0x80150F50; // rom:0xE5DE0 +Gfx_RM3_DECAL_OPA_NO_AA = 0x80151068; // rom:0xE5EF8 +Gfx_RM3_INTERSECTING_OPA = 0x80150F78; // rom:0xE5E08 +Gfx_RM3_INTERSECTING_OPA_NO_AA = 0x80151090; // rom:0xE5F20 +Gfx_RM3_ALPHATEST = 0x80150FA0; // rom:0xE5E30 +Gfx_RM3_ALPHATEST_ONESIDED = 0x801510B8; // rom:0xE5F48 +Gfx_RM3_SURFACE_XLU = 0x80150FC8; // rom:0xE5E58 +Gfx_RM3_SURFACE_XLU_AA_ZB_ZUPD = 0x80151148; // rom:0xE5FD8 +Gfx_RM3_SURFACE_XLU_NO_AA = 0x801510D8; // rom:0xE5F68 +Gfx_RM3_DECAL_XLU = 0x80150FF0; // rom:0xE5E80 +Gfx_RM3_DECAL_XLU_NO_AA = 0x80151100; // rom:0xE5F90 +Gfx_RM3_INTERSECTING_XLU = 0x80151018; // rom:0xE5EA8 +Gfx_RM3_PASS_THROUGH = 0x80151128; // rom:0xE5FB8 +Gfx_RM1_SURFACE_OPA_NO_ZB = 0x80150AF8; // rom:0xE5988 +Gfx_RM1_ALPHATEST_NO_ZB = 0x80150B20; // rom:0xE59B0 +Gfx_RM1_SURFACE_XLU_NO_ZB = 0x80150B48; // rom:0xE59D8 +Gfx_RM2_SURFACE_OPA_NO_ZB = 0x80150E60; // rom:0xE5CF0 +Gfx_RM2_ALPHATEST_NO_ZB = 0x80150E88; // rom:0xE5D18 +Gfx_RM2_SURFACE_XLU_NO_ZB = 0x80150EB0; // rom:0xE5D40 +Gfx_RM3_SURFACE_OPA_NO_ZB = 0x80151170; // rom:0xE6000 +Gfx_RM3_ALPHATEST_NO_ZB = 0x80151198; // rom:0xE6028 +Gfx_RM3_SURFACE_XLU_NO_ZB = 0x801511C0; // rom:0xE6050 +Gfx_RM1_CLOUD = 0x80150BC0; // rom:0xE5A50 +Gfx_RM1_CLOUD_NO_ZB = 0x80150BE8; // rom:0xE5A78 +Gfx_RM2_CLOUD = 0x80150ED8; // rom:0xE5D68 +Gfx_RM2_CLOUD_NO_ZB = 0x80150F00; // rom:0xE5D90 +Gfx_RM3_CLOUD = 0x801511E8; // rom:0xE6078 +Gfx_RM3_CLOUD_NO_ZB = 0x80151210; // rom:0xE60A0 +SolidCombineModes = 0x80150168; // rom:0xE4FF8 +AlphaTestCombineModes = 0x801504B0; // rom:0xE5340 +TextureHeapBase = 0x801507F8; // rom:0xE5688 +ShroudTintAmt = 0x801507FC; // rom:0xE568C +ShroudTintR = 0x801507FD; // rom:0xE568D +ShroudTintG = 0x801507FE; // rom:0xE568E +ShroudTintB = 0x801507FF; // rom:0xE568F +DepthTintBaseR = 0x80150800; // rom:0xE5690 +DepthTintBaseG = 0x80150801; // rom:0xE5691 +DepthTintBaseB = 0x80150802; // rom:0xE5692 +DepthTintBaseA = 0x80150803; // rom:0xE5693 +DepthTintColR = 0x80150804; // rom:0xE5694 +DepthTintColG = 0x80150805; // rom:0xE5695 +DepthTintColB = 0x80150806; // rom:0xE5696 +DepthTintColA = 0x80150807; // rom:0xE5697 +DepthTintStart = 0x80150808; // rom:0xE5698 +DepthTintEnd = 0x8015080C; // rom:0xE569C +RemapTintMaxR = 0x80150810; // rom:0xE56A0 +RemapTintMaxG = 0x80150811; // rom:0xE56A1 +RemapTintMaxB = 0x80150812; // rom:0xE56A2 +RemapTintMinR = 0x80150813; // rom:0xE56A3 +RemapTintMinG = 0x80150814; // rom:0xE56A4 +RemapTintMinB = 0x80150815; // rom:0xE56A5 +ReferenceIdentityMtx = 0x80150818; // rom:0xE56A8 +DepthFloatLookupTable = 0x80150858; // rom:0xE56E8 +gLastRenderTaskCount = 0x801508A0; // rom:0xE5730 +Gfx_RM1_CLOUD_NO_ZCMP = 0x80150B98; // rom:0xE5A28 +RenderTaskBasePriorities = 0x80151238; // rom:0xE60C8 +D_8014C248 = 0x801512F8; // rom:0xE6188 +appendGfx_model = 0x801182A0; // type:func rom:0xAD130 +get_model_property = 0x8011AD1C; // type:func rom:0xAFBAC +make_texture_gfx = 0x8011D2F8; // type:func rom:0xB2188 +load_texture_impl = 0x80119D68; // type:func rom:0xAEBF8 +load_texture_by_name = 0x80119F7C; // type:func rom:0xAEE0C +load_texture_variants = 0x8011A6A8; // type:func rom:0xAF538 +load_next_model_textures = 0x8011AD54; // type:func rom:0xAFBE4 +mdl_load_all_textures = 0x8011AE34; // type:func rom:0xAFCC4 +mdl_get_child_count = 0x8011AEB8; // type:func rom:0xAFD48 +init_model_data = 0x8011B1F8; // type:func rom:0xB0088 +mdl_calculate_model_sizes = 0x8011B33C; // type:func rom:0xB01CC +mdl_create_model = 0x8011B41C; // type:func rom:0xB02AC +is_identity_fixed_mtx = 0x80121024; // type:func rom:0xB5EB4 +iterate_models = 0x8011B884; // type:func rom:0xB0714 +build_custom_gfx = 0x80120EFC; // type:func rom:0xB5D8C +appendGfx_model_group = 0x8011CEA4; // type:func rom:0xB1D34 +render_transform_group = 0x8011D21C; // type:func rom:0xB20AC +func_80117D00 = 0x8011CF10; // type:func rom:0xB1DA0 +render_transform_group_node = 0x8011D084; // type:func rom:0xB1F14 +load_data_for_models = 0x8011FF58; // type:func rom:0xB4DE8 +load_model_transforms = 0x8011FFD8; // type:func rom:0xB4E68 +get_model_list_index_from_tree_index = 0x80120220; // type:func rom:0xB50B0 +get_transform_group_index = 0x801202A0; // type:func rom:0xB5130 +get_transform_group = 0x801203D0; // type:func rom:0xB5260 +get_model_center_and_size = 0x801202FC; // type:func rom:0xB518C +func_8011B1D8 = 0x801203E8; // type:func rom:0xB5278 +mdl_make_transform_group = 0x8012058C; // type:func rom:0xB541C +enable_transform_group = 0x801207E0; // type:func rom:0xB5670 +disable_transform_group = 0x80120870; // type:func rom:0xB5700 +clone_model = 0x80120900; // type:func rom:0xB5790 +mdl_group_set_visibility = 0x801209D0; // type:func rom:0xB5860 +mdl_group_set_custom_gfx = 0x80120B60; // type:func rom:0xB59F0 +enable_world_fog = 0x80120D60; // type:func rom:0xB5BF0 +disable_world_fog = 0x80120D74; // type:func rom:0xB5C04 +set_world_fog_dist = 0x80120D84; // type:func rom:0xB5C14 +set_world_fog_color = 0x80120D98; // type:func rom:0xB5C28 +is_world_fog_enabled = 0x80120DB4; // type:func rom:0xB5C44 +get_world_fog_distance = 0x80120DC4; // type:func rom:0xB5C54 +get_world_fog_color = 0x80120DE8; // type:func rom:0xB5C78 +set_tex_panner = 0x80120E24; // type:func rom:0xB5CB4 +set_main_pan_u = 0x80120E2C; // type:func rom:0xB5CBC +set_main_pan_v = 0x80120E44; // type:func rom:0xB5CD4 +set_aux_pan_u = 0x80120E5C; // type:func rom:0xB5CEC +set_aux_pan_v = 0x80120E74; // type:func rom:0xB5D04 +set_mdl_custom_gfx_set = 0x80120E8C; // type:func rom:0xB5D1C +set_custom_gfx = 0x80120EC4; // type:func rom:0xB5D54 +set_custom_gfx_builders = 0x80120EE0; // type:func rom:0xB5D70 +mdl_set_shroud_tint_params = 0x8012106C; // type:func rom:0xB5EFC +mdl_set_depth_tint_params = 0x801210C4; // type:func rom:0xB5F54 +mdl_get_depth_tint_params = 0x80121124; // type:func rom:0xB5FB4 +mdl_set_remap_tint_params = 0x801211A8; // type:func rom:0xB6038 +mdl_get_remap_tint_params = 0x801211E4; // type:func rom:0xB6074 +mdl_get_vertex_count = 0x80121238; // type:func rom:0xB60C8 +mdl_local_gfx_update_vtx_pointers = 0x801212EC; // type:func rom:0xB617C +mdl_local_gfx_copy_vertices = 0x80121340; // type:func rom:0xB61D0 +mdl_make_local_vertex_copy = 0x80121374; // type:func rom:0xB6204 +mdl_get_copied_vertices = 0x801214C0; // type:func rom:0xB6350 +mdl_get_copied_gfx = 0x801214FC; // type:func rom:0xB638C +mdl_project_tex_coords = 0x8012153C; // type:func rom:0xB63CC +is_model_center_visible = 0x80121A1C; // type:func rom:0xB68AC +is_point_visible = 0x801221CC; // type:func rom:0xB705C +mdl_draw_hidden_panel_surface = 0x8012293C; // type:func rom:0xB77CC +mdl_get_next_texture_address = 0x801229F4; // type:func rom:0xB7884 +mdl_set_all_tint_type = 0x80122A3C; // type:func rom:0xB78CC +clear_render_tasks_alt = 0x80122AE0; // type:func rom:0xB7970 +gAnimScriptDefault = 0x80151300; // rom:0xE6190 +animator_copy_vertices_to_buffer = 0x80123090; // type:func rom:0xB7F20 +animator_make_mirrorZ = 0x801231E0; // type:func rom:0xB8070 +animator_make_mirrorY = 0x80123224; // type:func rom:0xB80B4 +animator_make_mirrorX = 0x80123268; // type:func rom:0xB80F8 +animator_make_identity = 0x801232AC; // type:func rom:0xB813C +get_animator_child_with_id = 0x801232EC; // type:func rom:0xB817C +get_animator_child_for_model = 0x80123360; // type:func rom:0xB81F0 +free_animator_nodes = 0x801233D4; // type:func rom:0xB8264 +reset_animator_list = 0x80123520; // type:func rom:0xB83B0 +delete_model_animator_node = 0x801235A8; // type:func rom:0xB8438 +delete_model_animator_nodes = 0x80123610; // type:func rom:0xB84A0 +delete_model_animator = 0x80123648; // type:func rom:0xB84D8 +create_model_animator = 0x801236C8; // type:func rom:0xB8558 +create_mesh_animator = 0x801237F0; // type:func rom:0xB8680 +add_anim_node = 0x80123928; // type:func rom:0xB87B8 +update_model_animator = 0x80123ACC; // type:func rom:0xB895C +step_model_animator = 0x80123E00; // type:func rom:0xB8C90 +reload_mesh_animator_tree = 0x80125888; // type:func rom:0xBA718 +step_mesh_animator = 0x80125908; // type:func rom:0xBA798 +animator_update_model_transforms = 0x80124268; // type:func rom:0xB90F8 +update_model_animator_with_transform = 0x80123C64; // type:func rom:0xB8AF4 +animator_node_update_model_transform = 0x80124328; // type:func rom:0xB91B8 +render_animated_model = 0x80124514; // type:func rom:0xB93A4 +appendGfx_animator = 0x801246E4; // type:func rom:0xB9574 +render_animated_model_with_vertices = 0x801245F8; // type:func rom:0xB9488 +appendGfx_animator_node = 0x80124C64; // type:func rom:0xB9AF4 +get_animator_node_for_tree_index = 0x80125184; // type:func rom:0xBA014 +get_animator_node_with_id = 0x801251A8; // type:func rom:0xBA038 +set_animator_tree_to_node_map = 0x801251C4; // type:func rom:0xBA054 +get_animator_by_index = 0x801251F0; // type:func rom:0xBA080 +set_animator_render_callback = 0x80125210; // type:func rom:0xBA0A0 +enable_anim_model_fog = 0x80125238; // type:func rom:0xBA0C8 +disable_anim_model_fog = 0x8012524C; // type:func rom:0xBA0DC +set_anim_model_fog_dist = 0x8012525C; // type:func rom:0xBA0EC +set_anim_model_fog_color = 0x80125274; // type:func rom:0xBA104 +is_anim_model_fog_enabled = 0x8012529C; // type:func rom:0xBA12C +get_anim_model_fog_distance = 0x801252AC; // type:func rom:0xBA13C +get_anim_model_fog_color = 0x801252C8; // type:func rom:0xBA158 +set_animator_flags = 0x801252FC; // type:func rom:0xBA18C +clear_animator_flags = 0x80125328; // type:func rom:0xBA1B8 +play_model_animation = 0x80125358; // type:func rom:0xBA1E8 +play_model_animation_starting_from = 0x801253A8; // type:func rom:0xBA238 +load_model_animator_node = 0x80125444; // type:func rom:0xBA2D4 +load_model_animator_tree = 0x801255BC; // type:func rom:0xBA44C +load_mesh_animator_node = 0x80125630; // type:func rom:0xBA4C0 +load_mesh_animator_tree = 0x80125684; // type:func rom:0xBA514 +reload_mesh_animator_node = 0x80125740; // type:func rom:0xBA5D0 +D_8014C260 = 0x80151310; // rom:0xE61A0 +D_8014C268 = 0x80151318; // rom:0xE61A8 +init_entity_models = 0x80125E68; // type:func rom:0xBACF8 +load_entity_model = 0x80125EF0; // type:func rom:0xBAD80 +ALT_load_entity_model = 0x80125FF4; // type:func rom:0xBAE84 +exec_entity_model_commandlist = 0x80126114; // type:func rom:0xBAFA4 +step_entity_model_commandlist = 0x801261C8; // type:func rom:0xBB058 +free_entity_model_by_ref = 0x801280A4; // type:func rom:0xBCF34 +make_entity_model_mtx_flipZ = 0x80126350; // type:func rom:0xBB1E0 +appendGfx_entity_model = 0x80126394; // type:func rom:0xBB224 +draw_entity_model_A = 0x80126EF8; // type:func rom:0xBBD88 +draw_entity_model_B = 0x801270C8; // type:func rom:0xBBF58 +draw_entity_model_C = 0x80127298; // type:func rom:0xBC128 +draw_entity_model_D = 0x80127398; // type:func rom:0xBC228 +draw_entity_model_E = 0x80127498; // type:func rom:0xBC328 +set_entity_model_render_command_list = 0x80127F8C; // type:func rom:0xBCE1C +free_entity_model_by_index = 0x8012800C; // type:func rom:0xBCE9C +set_entity_model_flags = 0x801280F8; // type:func rom:0xBCF88 +clear_entity_model_flags = 0x80128134; // type:func rom:0xBCFC4 +bind_entity_model_setupGfx = 0x80128174; // type:func rom:0xBD004 +func_80122F8C = 0x8012819C; // type:func rom:0xBD02C +func_80122FB8 = 0x801281C8; // type:func rom:0xBD058 +enable_entity_fog = 0x801281FC; // type:func rom:0xBD08C +disable_entity_fog = 0x80128210; // type:func rom:0xBD0A0 +set_entity_fog_dist = 0x80128220; // type:func rom:0xBD0B0 +set_entity_fog_color = 0x80128238; // type:func rom:0xBD0C8 +is_entity_fog_enabled = 0x80128260; // type:func rom:0xBD0F0 +get_entity_fog_distance = 0x80128270; // type:func rom:0xBD100 +get_entity_fog_color = 0x8012828C; // type:func rom:0xBD11C +worker_delegate_do_nothing = 0x801282C0; // type:func rom:0xBD150 +init_worker_list = 0x80128324; // type:func rom:0xBD1B4 +create_worker_backUI = 0x80128530; // type:func rom:0xBD3C0 +free_worker = 0x801287D0; // type:func rom:0xBD660 +get_worker = 0x8012884C; // type:func rom:0xBD6DC +clear_area_flags = 0x8014A440; // type:func rom:0xDF2D0 +clear_global_flag = 0x8014A490; // type:func rom:0xDF320 +set_global_byte = 0x8014A5D0; // type:func rom:0xDF460 +get_global_byte = 0x8014A5E8; // type:func rom:0xDF478 +clear_area_flag = 0x8014A5FC; // type:func rom:0xDF48C +set_area_flag = 0x8014A650; // type:func rom:0xDF4E0 +get_area_flag = 0x8014A6A0; // type:func rom:0xDF530 +set_area_byte = 0x8014A6E8; // type:func rom:0xDF578 +get_area_byte = 0x8014A700; // type:func rom:0xDF590 +default_trigger_on_activate = 0x8014A720; // type:func rom:0xDF5B0 +init_trigger_list = 0x8014A7D8; // type:func rom:0xDF668 +create_trigger = 0x8014A81C; // type:func rom:0xDF6AC +delete_trigger = 0x8014ACA4; // type:func rom:0xDFB34 +is_another_trigger_bound = 0x8014AD1C; // type:func rom:0xDFBAC +get_trigger_by_id = 0x8014AD80; // type:func rom:0xDFC10 +should_collider_allow_interact = 0x8014AD98; // type:func rom:0xDFC28 +gCloudyFlowerFieldsBg = 0x801541C0; // rom:0xE9050 +gSunnyFlowerFieldsBg = 0x801541C8; // rom:0xE9058 +gBackroundWaveEnabled = 0x801541CF; // rom:0xE905F +gBackroundTextureYOffset = 0x801541D0; // rom:0xE9060 +gBackroundWavePhase = 0x801541D4; // rom:0xE9064 +load_map_bg = 0x8014AE20; // type:func rom:0xDFCB0 +set_background = 0x8014AED8; // type:func rom:0xDFD68 +set_background_size = 0x8014AF20; // type:func rom:0xDFDB0 +blend_background_channel = 0x8014AF48; // type:func rom:0xDFDD8 +enable_background_wave = 0x8014C2BC; // type:func rom:0xE114C +disable_background_wave = 0x8014C2CC; // type:func rom:0xE115C +DefaultAmbientSoundData = 0x801541E0; // rom:0xE9070 +play_ambient_sounds = 0x8014C418; // type:func rom:0xE12A8 +gWindowStyles = 0x801541F0; // rom:0xE9080 +gSimpleWindowUpdates = 0x801542F0; // rom:0xE9180 +gWindowAppearScales = 0x80154338; // rom:0xE91C8 +gWindowAppearFlags = 0x80154340; // rom:0xE91D0 +gWindowDisappearScales = 0x80154348; // rom:0xE91D8 +gWindowDisappearFlags = 0x80154354; // rom:0xE91E4 +gWindowGroups = 0x80154360; // rom:0xE91F0 +main_menu_window_update = 0x8014C700; // type:func rom:0xE1590 +render_windows = 0x8014C748; // type:func rom:0xE15D8 +update_window_hierarchy = 0x8014CE20; // type:func rom:0xE1CB0 +replace_window_update = 0x8014CEF8; // type:func rom:0xE1D88 +set_windows_visible = 0x8014CF74; // type:func rom:0xE1E04 +setup_pause_menu_tab = 0x8014CFE0; // type:func rom:0xE1E70 +init_sprite_shading_data = 0x8014D1A0; // type:func rom:0xE2030 +sprite_shading_set_light_source = 0x8014D204; // type:func rom:0xE2094 +appendGfx_shading_palette = 0x8014DA68; // type:func rom:0xE28F8 +LoopingSounds = 0x80154370; // rom:0xE9200 +FireBar0Sounds = 0x8015452C; // rom:0xE93BC +FireBar1Sounds = 0x80154534; // rom:0xE93C4 +FireBar2Sounds = 0x8015453C; // rom:0xE93CC +FireBar3Sounds = 0x80154544; // rom:0xE93D4 +FireBar4Sounds = 0x8015454C; // rom:0xE93DC +FireBar5Sounds = 0x80154554; // rom:0xE93E4 +FireBar6Sounds = 0x8015455C; // rom:0xE93EC +FireBar7Sounds = 0x80154564; // rom:0xE93F4 +FireBar8Sounds = 0x8015456C; // rom:0xE93FC +FireBar9Sounds = 0x80154574; // rom:0xE9404 +FireBarDeadSounds = 0x8015457C; // rom:0xE940C +AlertSounds = 0x80154584; // rom:0xE9414 +SnoreInhaleSounds = 0x8015458C; // rom:0xE941C +SnoreExhaleSounds = 0x80154594; // rom:0xE9424 +SnapAwakeSounds = 0x8015459C; // rom:0xE942C +BooVanishSounds = 0x801545A4; // rom:0xE9434 +BooAppearSounds = 0x801545AC; // rom:0xE943C +WindowOpenSounds = 0x801545B4; // rom:0xE9444 +WindowCloseSounds = 0x801545BC; // rom:0xE944C +RavenLeapSounds = 0x801545C4; // rom:0xE9454 +RavenFallSounds = 0x801545CC; // rom:0xE945C +ShootingStarFallSounds = 0x801545D8; // rom:0xE9468 +ShootingStarBounceSounds = 0x801545E0; // rom:0xE9470 +FuzzyHopSounds = 0x801545E8; // rom:0xE9478 +BulletBillExplodeSounds = 0x801545F4; // rom:0xE9484 +LuigiStepSounds = 0x801545FC; // rom:0xE948C +TrainChugSounds = 0x80154604; // rom:0xE9494 +FinaleBridgeCollapseSounds = 0x8015460C; // rom:0xE949C +FinaleExplosionSounds = 0x80154614; // rom:0xE94A4 +CardShuffleSounds = 0x8015461C; // rom:0xE94AC +StarSpiritAppearSounds = 0x80154624; // rom:0xE94B4 +StarSpiritCastSounds = 0x8015462C; // rom:0xE94BC +UnusedExplodeSounds = 0x80154634; // rom:0xE94C4 +ShyGuyStepSounds = 0x8015463C; // rom:0xE94CC +AlternatingSounds = 0x80154644; // rom:0xE94D4 +OpenCloseSounds = 0x80154754; // rom:0xE95E4 +sfx_compute_spatialized_sound_params_full = 0x8014E300; // type:func rom:0xE3190 +sfx_reset_door_sounds = 0x8014E6B0; // type:func rom:0xE3540 +sfx_set_reverb_mode = 0x8014E8AC; // type:func rom:0xE373C +sfx_clear_env_sounds = 0x8014E720; // type:func rom:0xE35B0 +sfx_get_spatialized_sound_params = 0x8014EEB4; // type:func rom:0xE3D44 +sfx_get_reverb_mode = 0x8014E8D8; // type:func rom:0xE3768 +sfx_get_env_sound_instance = 0x8014E974; // type:func rom:0xE3804 +sfx_play_sound_looping = 0x8014E9B8; // type:func rom:0xE3848 +sfx_register_looping_sound_at_position = 0x8014EA24; // type:func rom:0xE38B4 +sfx_adjust_env_sound_pos = 0x8014EA9C; // type:func rom:0xE392C +snd_stop_tracking_env_sound_pos = 0x8014EB1C; // type:func rom:0xE39AC +sfx_adjust_env_sound_params = 0x8014EC94; // type:func rom:0xE3B24 +sfx_play_sound_at_npc = 0x8014EDB8; // type:func rom:0xE3C48 +sfx_compute_spatialized_sound_params_ignore_depth = 0x8014F008; // type:func rom:0xE3E98 +sfx_compute_spatialized_sound_params_with_depth = 0x8014F264; // type:func rom:0xE40F4 +BlankMusicSettings = 0x80154790; // rom:0xE9620 +SongsUsingVariationFlag = 0x801547C0; // rom:0xE9650 +NextVolumeUpdateTimer = 0x801547D8; // rom:0xE9668 +bgm_get_map_default_variation = 0x8014F4E0; // type:func rom:0xE4370 +bgm_reset_volume = 0x8014F5DC; // type:func rom:0xE446C +bgm_set_target_volume = 0x8014FD34; // type:func rom:0xE4BC4 +bgm_update_volume = 0x8014FD44; // type:func rom:0xE4BD4 +_bgm_set_song = 0x8014F890; // type:func rom:0xE4720 +func_8014A964 = 0x8014FA14; // type:func rom:0xE48A4 +bgm_adjust_proximity = 0x8014FB04; // type:func rom:0xE4994 +bgm_set_track_volumes = 0x8014FBBC; // type:func rom:0xE4A4C +bgm_clear_track_volumes = 0x8014FC10; // type:func rom:0xE4AA0 +bgm_set_variation = 0x8014FC64; // type:func rom:0xE4AF4 +bgm_init_music_players = 0x8014FCB8; // type:func rom:0xE4B48 +bgm_quiet_max_volume = 0x8014FD0C; // type:func rom:0xE4B9C +bgm_reset_max_volume = 0x8014FD20; // type:func rom:0xE4BB0 +func_8014AD40 = 0x8014FDF0; // type:func rom:0xE4C80 +bgm_pop_song = 0x8014FE54; // type:func rom:0xE4CE4 +bgm_push_song = 0x8014FEA8; // type:func rom:0xE4D38 +func_8014AFA0 = 0x80150050; // type:func rom:0xE4EE0 +ui_stencil_star_png = 0x801517A0; // rom:0xE6630 +ui_stencil_mario_png = 0x80151BA0; // rom:0xE6A30 +ui_stencil_sharp_circle_png = 0x801523A0; // rom:0xE7230 +ui_stencil_blurry_circle_png = 0x801525A0; // rom:0xE7430 +vtx_stencil1 = 0x801535A0; // rom:0xE8430 size:0xA0 +vtx_stencil2 = 0x80153810; // rom:0xE86A0 size:0x180 +imgfx_appendGfx_component = 0x80140020; // type:func rom:0xD4EB0 +CurrentScreenTransition = 0x80151790; // rom:0xE6620 +D_8014C6F4 = 0x80151794; // rom:0xE6624 +Gfx_LoadStencilTex_CommonParams = 0x80153640; // rom:0xE84D0 +Gfx_LoadStencilTex_SharpCircle = 0x801536B8; // rom:0xE8548 +Gfx_LoadStencilTex_Mario = 0x80153710; // rom:0xE85A0 +Gfx_LoadStencilTex_Star = 0x80153760; // rom:0xE85F0 +Gfx_LoadStencilTex_BlurryCircle = 0x801537B8; // rom:0xE8648 +D_8014E8F0 = 0x80153990; // rom:0xE8820 +D_8014E9A8 = 0x80153A48; // rom:0xE88D8 +D_8014EA48 = 0x80153AE8; // rom:0xE8978 +get_screen_overlay_params = 0x8013CE70; // type:func rom:0xD1D00 +set_screen_overlay_color = 0x8013CEC0; // type:func rom:0xD1D50 +set_screen_overlay_center_worldpos = 0x8013CF70; // type:func rom:0xD1E00 +set_screen_overlay_alpha = 0x8013D184; // type:func rom:0xD2014 +func_80138188 = 0x8013D238; // type:func rom:0xD20C8 +update_exit_map_screen_overlay = 0x8013D35C; // type:func rom:0xD21EC +update_enter_map_screen_overlay = 0x8013D684; // type:func rom:0xD2514 +D_8014ED90 = 0x80153E30; // rom:0xE8CC0 +DarknessStencilViewport = 0x80153E38; // rom:0xE8CC8 +Vtx_DarknessStencil = 0x80153E48; // rom:0xE8CD8 +Gfx_DarknessStencilQuad = 0x80153E88; // rom:0xE8D18 +appendGfx_draw_prev_frame_buffer = 0x8013D7F0; // type:func rom:0xD2680 +draw_prev_frame_buffer_at_screen_pos = 0x8013DE38; // type:func rom:0xD2CC8 +appendGfx_darkness_stencil = 0x8013DF04; // type:func rom:0xD2D94 +appendGfx_screen_transition_stencil = 0x8013EFC0; // type:func rom:0xD3E50 +ImgFXCurrentTexturePtr = 0x80153EB0; // rom:0xE8D40 +imgfx_vtxCount = 0x80153EB4; // rom:0xE8D44 +ImgFXLights = 0x80153EB8; // rom:0xE8D48 +D_8014EE40 = 0x80153EE0; // rom:0xE8D70 +D_8014EE50 = 0x80153EF0; // rom:0xE8D80 +ImgFXVtxBufferCapacity = 0x80153F00; // rom:0xE8D90 +DefaultImgFXSetupGfx = 0x80153F08; // rom:0xE8D98 +ImgFXRenderModes = 0x80153F38; // rom:0xE8DC8 +ImgFXAnimOffsets = 0x80154004; // rom:0xE8E94 +imgfx_set_vtx_buf_capacity = 0x8013F420; // type:func rom:0xD42B0 +imgfx_init = 0x8013F42C; // type:func rom:0xD42BC +imgfx_init_instance = 0x8013FA98; // type:func rom:0xD4928 +imgfx_clear_instance_data = 0x8013FA78; // type:func rom:0xD4908 +func_8013A4D0 = 0x8013F580; // type:func rom:0xD4410 +imgfx_cache_instance_data = 0x8013F9EC; // type:func rom:0xD487C +imgfx_add_to_cache = 0x8013F6C0; // type:func rom:0xD4550 +imgfx_update_cache_impl = 0x8013F700; // type:func rom:0xD4590 +imgfx_update_cache = 0x8013F798; // type:func rom:0xD4628 +imgfx_get_free_instances = 0x8013F7B4; // type:func rom:0xD4644 +imgfx_release_instance = 0x8013F904; // type:func rom:0xD4794 +imgfx_release_instance_chain = 0x8013F938; // type:func rom:0xD47C8 +imgfx_get_next_instance = 0x8013F990; // type:func rom:0xD4820 +imgfx_get_instance = 0x8013F9D0; // type:func rom:0xD4860 +imgfx_update = 0x8013FB4C; // type:func rom:0xD49DC +imgfx_wavy_init = 0x80143EF8; // type:func rom:0xD8D88 +imgfx_set_state_flags = 0x8013FFD0; // type:func rom:0xD4E60 +imgfx_make_mesh = 0x8014019C; // type:func rom:0xD502C +imgfx_appendGfx_mesh = 0x80140260; // type:func rom:0xD50F0 +imgfx_mesh_make_grid = 0x801410F8; // type:func rom:0xD5F88 +imgfx_mesh_anim_update = 0x801414A0; // type:func rom:0xD6330 +imgfx_mesh_make_strip = 0x80140D38; // type:func rom:0xD5BC8 +imgfx_mesh_make_wavy = 0x80143F18; // type:func rom:0xD8DA8 +imgfx_mesh_load_colors = 0x801442A8; // type:func rom:0xD9138 +imgfx_appendGfx_mesh_basic = 0x80142058; // type:func rom:0xD6EE8 +imgfx_appendGfx_mesh_grid = 0x80142B64; // type:func rom:0xD79F4 +imgfx_appendGfx_mesh_anim = 0x801433A0; // type:func rom:0xD8230 +imgfx_appendGfx_mesh_strip = 0x801439B4; // type:func rom:0xD8844 +imgfx_load_anim = 0x801412D0; // type:func rom:0xD6160 +gHudElementAuxCache = 0x80154060; // rom:0xE8EF0 +gHudElementCacheCapacity = 0x80154064; // rom:0xE8EF4 +HES_Empty = 0x80154068; // rom:0xE8EF8 +gHudElementSizes = 0x8015406C; // rom:0xE8EFC +D_8014F068 = 0x80154108; // rom:0xE8F98 +gHudElementsDLBackUI = 0x80154118; // rom:0xE8FA8 +gHudElementsDLFrontUI = 0x80154140; // rom:0xE8FD0 +D_8014F0C8 = 0x80154168; // rom:0xE8FF8 +HudElementLights = 0x801541A8; // rom:0xE9038 +hud_element_load_script = 0x80144400; // type:func rom:0xD9290 +hud_element_draw_rect = 0x801447B4; // type:func rom:0xD9644 +func_801413F8 = 0x801464A8; // type:func rom:0xDB338 +init_hud_element_list = 0x801463B0; // type:func rom:0xDB240 +hud_element_update = 0x801467B4; // type:func rom:0xDB644 +render_hud_element = 0x80147CAC; // type:func rom:0xDCB3C +func_80143C48 = 0x80148CF8; // type:func rom:0xDDB88 +func_80144218 = 0x801492C8; // type:func rom:0xDE158 +func_80144238 = 0x801492E8; // type:func rom:0xDE178 +func_80144258 = 0x80149308; // type:func rom:0xDE198 +func_80144278 = 0x80149328; // type:func rom:0xDE1B8 +draw_hud_element_internal = 0x80149348; // type:func rom:0xDE1D8 +hud_element_draw_without_clipping = 0x80149890; // type:func rom:0xDE720 +hud_element_get_script = 0x80149960; // type:func rom:0xDE7F0 +get_hud_element = 0x80149984; // type:func rom:0xDE814 +hud_element_free_transform = 0x8014A1B8; // type:func rom:0xDF048 +hud_element_get_render_pos = 0x80149A5C; // type:func rom:0xDE8EC +hud_element_set_render_depth = 0x80149A8C; // type:func rom:0xDE91C +hud_element_clear_flags = 0x80149ADC; // type:func rom:0xDE96C +ALT_clear_hud_element_cache = 0x80149B0C; // type:func rom:0xDE99C +hud_element_set_scale = 0x80149CD0; // type:func rom:0xDEB60 +hud_element_use_preset_size = 0x80149EA4; // type:func rom:0xDED34 +func_80144E4C = 0x80149EFC; // type:func rom:0xDED8C +func_80144E74 = 0x80149F24; // type:func rom:0xDEDB4 +hud_element_set_alpha = 0x80149F60; // type:func rom:0xDEDF0 +hud_element_create_transform_A = 0x80149FD8; // type:func rom:0xDEE68 +hud_element_create_transform_B = 0x8014A088; // type:func rom:0xDEF18 +hud_element_create_transform_C = 0x8014A120; // type:func rom:0xDEFB0 +hud_element_set_transform_pos = 0x8014A234; // type:func rom:0xDF0C4 +hud_element_set_transform_scale = 0x8014A284; // type:func rom:0xDF114 +hud_element_set_transform_rotation = 0x8014A2D4; // type:func rom:0xDF164 +hud_element_set_transform_rotation_pivot = 0x8014A324; // type:func rom:0xDF1B4 +copy_world_hud_element_ref_to_battle = 0x8014A364; // type:func rom:0xDF1F4 +hud_element_set_aux_cache = 0x8014A398; // type:func rom:0xDF228 +rodata_padding = 0x80156294; // rom:0xEB124 +D_8014C620 = 0x801516D0; // rom:0xE6560 +D_8014C6A0 = 0x80151750; // rom:0xE65E0 +D_8014C678 = 0x80151728; // rom:0xE65B8 +draw_ci_image_with_clipping = 0x80133B20; // type:func rom:0xC89B0 +draw_image_with_clipping = 0x80133E14; // type:func rom:0xC8CA4 +draw_tiled_image = 0x80134680; // type:func rom:0xC9510 +integer_log = 0x80134F90; // type:func rom:0xC9E20 +draw_adjustable_tiled_image = 0x80134FF8; // type:func rom:0xC9E88 +D_8014C2D8 = 0x80151388; // rom:0xE6218 +D_8014C588 = 0x80151638; // rom:0xE64C8 +gRewindArrowQuad = 0x80151348; // rom:0xE61D8 +gMsgNumbers = 0x801513F0; // rom:0xE6280 +gMsgDlistInitDrawNumber = 0x80151418; // rom:0xE62A8 +D_8014C580 = 0x80151630; // rom:0xE64C0 +D_8014C500 = 0x801515B0; // rom:0xE6440 +gMsgSpeechBoxMQuad = 0x801514B0; // rom:0xE6340 +gMsgArrowQuad2 = 0x80151570; // rom:0xE6400 +gNextMessageBuffer = 0x80151340; // rom:0xE61D0 +gMsgArrowQuad1 = 0x80151530; // rom:0xE63C0 +gMsgSpeechBoxLQuad = 0x80151470; // rom:0xE6300 +gMsgSpeechBoxRQuad = 0x801514F0; // rom:0xE6380 +reveal_item_entity = 0x8013612C; // type:func rom:0xCAFBC +draw_coin_sparkles = 0x80135C8C; // type:func rom:0xCAB1C +sparkle_script_init = 0x80135B70; // type:func rom:0xCAA00 +get_item_entity = 0x801360D8; // type:func rom:0xCAF68 +hide_item_entity = 0x801360F0; // type:func rom:0xCAF80 +sparkle_script_update = 0x80135C4C; // type:func rom:0xCAADC +gBattleShadowList = 0x801565A8; +item_entity_load = 0x80136298; // type:func rom:0xCB128 +make_item_entity_delayed = 0x80136C38; // type:func rom:0xCBAC8 +test_item_player_collision = 0x80138C7C; // type:func rom:0xCDB0C +remove_item_entity_by_reference = 0x80138AA0; // type:func rom:0xCD930 +draw_content_pickup_item_desc = 0x8013BAC4; // type:func rom:0xD0954 +draw_content_cant_carry_more = 0x8013BA8C; // type:func rom:0xD091C +D_8014C5A0 = 0x80151650; // rom:0xE64E0 +D_8014C5E0 = 0x80151690; // rom:0xE6520 +ItemEntityLights = 0x80151778; // rom:0xE6608 +sparkle_script_step = 0x80135B84; // type:func rom:0xCAA14 +draw_item_entities = 0x80137DF0; // type:func rom:0xCCC80 +draw_ui_item_entities = 0x80137F04; // type:func rom:0xCCD94 +init_item_entity_list = 0x80136244; // type:func rom:0xCB0D4 +item_entity_update = 0x80136F44; // type:func rom:0xCBDD4 +make_item_entity = 0x80136564; // type:func rom:0xCB3F4 +make_item_entity_nodelay = 0x80136C04; // type:func rom:0xCBA94 +make_item_entity_at_player = 0x80136C70; // type:func rom:0xCBB00 +update_item_entities = 0x8013705C; // type:func rom:0xCBEEC +update_item_entity_stationary = 0x8013A780; // type:func rom:0xCF610 +update_item_entity_no_pickup = 0x8013A7EC; // type:func rom:0xCF67C +update_item_entity_collectable = 0x80139390; // type:func rom:0xCE220 +update_item_entity_pickup = 0x8013A7FC; // type:func rom:0xCF68C +appendGfx_item_entity = 0x80137314; // type:func rom:0xCC1A4 +draw_ui_item_entity_stationary = 0x8013A7E4; // type:func rom:0xCF674 +draw_ui_item_entity_no_pickup = 0x8013A7F4; // type:func rom:0xCF684 +draw_ui_item_entity_collectable = 0x8013A6C4; // type:func rom:0xCF554 +remove_item_entity_by_index = 0x80138B6C; // type:func rom:0xCD9FC +func_80133A94 = 0x80138C04; // type:func rom:0xCDA94 +test_item_entity_position = 0x80139138; // type:func rom:0xCDFC8 +set_item_entity_flags = 0x801392B8; // type:func rom:0xCE148 +clear_item_entity_flags = 0x801392DC; // type:func rom:0xCE16C +auto_collect_item_entity = 0x80139304; // type:func rom:0xCE194 +is_picking_up_item = 0x8013933C; // type:func rom:0xCE1CC +set_item_entity_position = 0x8013934C; // type:func rom:0xCE1DC +set_current_item_entity_render_group = 0x80139370; // type:func rom:0xCE200 +get_current_item_entity_render_group = 0x80139380; // type:func rom:0xCE210 +func_801363A0 = 0x8013B4C0; // type:func rom:0xD0350 +draw_content_pickup_item_header = 0x8013B814; // type:func rom:0xD06A4 +charset_ROM_START = 0x10F330; +load_font_data = 0x80128918; // type:func rom:0xBD7A8 +msg_play_speech_sound = 0x801296D4; // type:func rom:0xBE564 +initialize_printer = 0x8012A908; // type:func rom:0xBF798 +msg_copy_to_print_buffer = 0x80129810; // type:func rom:0xBE6A0 +load_message_to_buffer = 0x8012AAEC; // type:func rom:0xBF97C +dma_load_msg = 0x8012AA68; // type:func rom:0xBF8F8 +msg_get_print_char_width = 0x8012AEE4; // type:func rom:0xBFD74 +msg_get_draw_char_width = 0x8012B054; // type:func rom:0xBFEE4 +msg_draw_frame = 0x80132CD0; // type:func rom:0xC7B60 +msg_draw_speech_arrow = 0x80132554; // type:func rom:0xC73E4 +msg_draw_speech_bubble = 0x80131D80; // type:func rom:0xC6C10 +msg_draw_prim_rect = 0x80131B20; // type:func rom:0xC69B0 +msg_draw_char = 0x8013149C; // type:func rom:0xC632C +msg_reset_gfx_state = 0x80131458; // type:func rom:0xC62E8 +appendGfx_message = 0x8012CFB0; // type:func rom:0xC1E40 +draw_message_window = 0x8012CDC4; // type:func rom:0xC1C54 +draw_digit = 0x8012C6D4; // type:func rom:0xC1564 +msg_draw_choice_pointer = 0x8012C18C; // type:func rom:0xC101C +msg_draw_rewind_arrow = 0x8012C0C8; // type:func rom:0xC0F58 +get_msg_properties = 0x8012B1C8; // type:func rom:0xC0058 +msg_update_rewind_arrow = 0x8012B9B4; // type:func rom:0xC0844 +D_8014C280 = 0x80151330; // rom:0xE61C0 +D_8014C594 = 0x80151644; // rom:0xE64D4 +load_font = 0x80128944; // type:func rom:0xBD7D4 +_update_message = 0x80128B20; // type:func rom:0xBD9B0 +_msg_get_printer_for_msg = 0x8012AB7C; // type:func rom:0xBFA0C +msg_printer_load_msg = 0x8012ACC8; // type:func rom:0xBFB58 +cancel_message = 0x8012AD68; // type:func rom:0xBFBF8 +set_message_images = 0x8012AD8C; // type:func rom:0xBFC1C +set_message_text_var = 0x8012AD9C; // type:func rom:0xBFC2C +close_message = 0x8012AED0; // type:func rom:0xBFD60 +drawbox_message_delegate = 0x8012CD90; // type:func rom:0xC1C20 +appendGfx_msg_prim_rect = 0x80131B80; // type:func rom:0xC6A10 +msg_get_glyph = 0x80133A58; // type:func rom:0xC88E8 +gAuxSpriteShadingProfile = 0x80156310; +gHudElementsNumber = 0x80156314; +gCurrentCustomModelGfxBuildersPtr = 0x80156318; +D_801512BC = 0x8015631C; +entity_numEntities = 0x80156320; +gEntityHeapBase = 0x80156324; +gHudElementCacheTableRaster = 0x80156328; +gHudElementCacheTablePalette = 0x80156330; +gAnimCount = 0x80156334; +gMsgBGScrollAmtX = 0x80156338; +D_801512DC = 0x8015633C; +gCurrentTransformGroups = 0x80156340; +gMsgGlobalWaveCounter = 0x80156344; +gCurrentCustomModelGfxPtr = 0x80156348; +gLastCreatedEntityIndex = 0x8015634C; +gMsgVarImages = 0x80156354; +ItemEntitiesCreated = 0x80156358; +gCurrentModelTreeRoot = 0x8015635C; +gEntityHeapBottom = 0x80156360; +D_80151304 = 0x80156364; +gMsgBGScrollAmtY = 0x8015636C; +D_8015130E = 0x8015636E; +gEntityHideMode = 0x80156370; +gHudElementCacheBuffer = 0x80156374; +gEntityModelCount = 0x80156378; +D_8015131C = 0x8015637C; +D_80151320 = 0x80156380; +entity_numShadows = 0x80156384; +isAreaSpecificEntityDataLoaded = 0x8015638C; +entity_updateCounter = 0x80156390; +gTriggerCount = 0x80156394; +D_80151338 = 0x80156398; +gHudElementCacheSize = 0x8015639C; +D_80151344 = 0x801563A4; +D_80151348 = 0x801563A8; +gWorldEntityList = 0x801563C0; +gBattleEntityList = 0x80156438; +gCurrentEntityListPtr = 0x801564B0; +D_80151474 = 0x801564B4; +gWorldShadowList = 0x801564B8; +gCurrentShadowListPtr = 0x80156698; +wEntityDataLoadedSize = 0x8015669C; +bEntityDataLoadedSize = 0x801566A0; +D_80151664 = 0x801566A4; +wEntityBlueprint = 0x801566A8; +bEntityBlueprint = 0x80156728; +D_801516FC = 0x8015673C; +gMainGameMode = 0x80156740; +gCurrentTextureHeader = 0x80156780; +wModelList = 0x801567B0; +bModelList = 0x80156BB0; +wTransformGroups = 0x80156FB0; +bTransformGroups = 0x80156FC0; +wCustomModelGfx = 0x80156FD0; +bCustomModelGfx = 0x80157050; +wCustomModelGfxBuilders = 0x801570D0; +bCustomModelGfxBuilders = 0x80157150; +wModelLocalVtxBuffers = 0x801571D0; +bModelLocalVtxBuffers = 0x80157210; +gCurrentModelLocalVtxBuffers = 0x80157250; +wModelTreeRoot = 0x80157254; +bModelTreeRoot = 0x80157258; +D_8015221C = 0x8015725C; +wModelTreeNodeInfo = 0x80157260; +bModelTreeNodeInfo = 0x80157A60; +wBackgroundTintMode = 0x80158260; +bBackgroundTintMode = 0x80158261; +D_80153222 = 0x80158262; +D_80153223 = 0x80158263; +TreeIterPos = 0x80158264; +wFogSettings = 0x80158268; +bFogSettings = 0x80158288; +gFogSettings = 0x801582A4; +texPannerMainU = 0x801582A8; +texPannerMainV = 0x801582E8; +texPannerAuxU = 0x80158328; +texPannerAuxV = 0x80158368; +TextureHeapPos = 0x801583A8; +mtg_IterIdx = 0x801583AC; +mtg_SearchModelID = 0x801583AE; +mtg_FoundModelNode = 0x801583B0; +mtg_MinChild = 0x801583B4; +mtg_MaxChild = 0x801583B6; +D_80153378 = 0x801583B8; +DepthCopyBuffer = 0x801583C0; +RenderTaskLists = 0x801583E0; +RenderTaskListIdx = 0x801583EC; +RenderTaskCount = 0x801583F0; +D_801533C0 = 0x80158400; +D_801536C0 = 0x80158700; +D_801539C0 = 0x80158A00; +D_80153A00 = 0x80158A40; +gCurrentAnimMeshListPtr = 0x80158A80; +gAnimModelFogEnabled = 0x80158A84; +gAnimModelFogR = 0x80158A88; +gAnimModelFogG = 0x80158A8C; +gAnimModelFogB = 0x80158A90; +gAnimModelFogA = 0x80158A94; +gAnimModelFogStart = 0x80158A98; +gAnimModelFogEnd = 0x80158A9C; +gAnimVtxSegment = 0x80158AA0; +D_80153A64 = 0x80158AA4; +gAnimRotMtx = 0x80158AA8; +gAnimScaleMtx = 0x80158AE8; +gAnimTranslateMtx = 0x80158B28; +gAnimRotScaleMtx = 0x80158B68; +gAnimTreeRoot = 0x80158BA8; +gWorldEntityModelList = 0x80158BB0; +gBattleEntityModelList = 0x80158FB0; +gCurrentEntityModelList = 0x801593B0; +D_80154374 = 0x801593B4; +entity_fog_enabled = 0x801593B8; +entity_fog_red = 0x801593BC; +entity_fog_green = 0x801593C0; +entity_fog_blue = 0x801593C4; +entity_fog_alpha = 0x801593C8; +entity_fog_dist_min = 0x801593CC; +entity_fog_dist_max = 0x801593D0; +D_80154394 = 0x801593D4; +gWorldWorkerList = 0x801593E0; +gBattleWorkerList = 0x80159420; +gCurrentWorkerListPtr = 0x80159460; +D_80154424 = 0x80159464; +gMessageBuffers = 0x80159470; +gMessagePrinters = 0x80159C70; +gMessageMsgVars = 0x8015ABB0; +D_80155C98 = 0x8015AC10; +gMessageWindowProjMatrix = 0x8015AC18; +D_80155D20 = 0x8015AC98; +D_8015DD24 = 0x8015AC9C; +msg_drawState = 0x8015ACF4; +D_8015DD78 = 0x8015ACF8; +UnusedItemPhysicsScriptID = 0x8015AD00; +ItemEntityAlternatingSpawn = 0x8015AD04; +ItemEntityRenderGroup = 0x8015AD08; +CoinSparkleCenterX = 0x8015AD0C; +CoinSparkleCenterY = 0x8015AD0E; +CoinSparkleCenterZ = 0x8015AD10; +pad_ItemEntity = 0x8015AD12; +WorldItemEntities = 0x8015AD20; +BattleItemEntities = 0x8015B120; +gCurrentItemEntities = 0x8015B520; +isPickingUpItem = 0x8015B524; +ItemSpawnWithinPlayerPickupDelay = 0x8015B526; +ItemPickupMenu = 0x8015B528; +ItemPickupIconID = 0x8015B858; +ItemPickupStateDelay = 0x8015B85C; +ThrowAwayMenuIdx = 0x8015B860; +ThrowAwayItemID = 0x8015B864; +ItemPickupGotOutline = 0x8015B868; +GotItemTutorialPrinter = 0x8015B86C; +GotItemTutorialClosed = 0x8015B870; +D_801568FC = 0x8015B874; +screen_overlay_frontType = 0x8015B880; +screen_overlay_frontZoom = 0x8015B884; +screen_overlay_backType = 0x8015B888; +screen_overlay_backZoom = 0x8015B88C; +D_80156910 = 0x8015B890; +ImgFXCurrentTexture = 0x8015B8A0; +ImgFXVtxBuffers = 0x8015B8C8; +imgfx_vtxBuf = 0x8015B8D0; +ImgFXInstances = 0x8015B8D4; +D_80156958 = 0x8015B8D8; +D_80156960 = 0x8015B8E0; +D_80156968 = 0x8015B8E8; +D_80156970 = 0x8015B8F0; +ImgFXAnimHeaders = 0x8015B900; +ImgFXDataCache = 0x8015BEA0; +gHudElementsWorld = 0x8015BEE0; +gHudElementsBattle = 0x8015C3E0; +gHudElements = 0x8015C8E0; +gHudElementCacheBufferWorld = 0x8015C8E4; +gHudElementCacheSizeWorld = 0x8015C8E8; +D_8015796C = 0x8015C8EC; +gHudElementCacheTableRasterWorld = 0x8015C8F0; +gHudElementCacheTablePaletteWorld = 0x8015CEF0; +gHudElementCacheBufferBattle = 0x8015D4F0; +gHudElementCacheSizeBattle = 0x8015D4F4; +D_80158578 = 0x8015D4F8; +gHudElementCacheTableRasterBattle = 0x8015D500; +gHudElementCacheTablePaletteBattle = 0x8015DB00; +D_80159180 = 0x8015E100; +wTriggerList = 0x8015E110; +bTriggerList = 0x8015E210; +gCurrentTriggerListPtr = 0x8015E310; +D_80159394 = 0x8015E314; +gBackgroundPalette = 0x8015E320; +gBackroundLastScrollValue = 0x8015E520; +wSpriteShadingProfile = 0x8015E540; +bSpriteShadingProfile = 0x8015E5F0; +wSpriteShadingProfileAux = 0x8015E6A0; +bSpriteShadingProfileAux = 0x8015E750; +SpriteShadingPalette = 0x8015E800; +wEnvSounds = 0x8015E820; +bEnvSounds = 0x8015E938; +gCurrentEnvSounds = 0x8015EA50; +SfxReverbMode = 0x8015EA54; +D_80159AD8 = 0x8015EA58; +MusicDefaultVolume = 0x8015EA60; +MusicTargetVolume = 0x8015EA62; +MusicMaxVolume = 0x8015EA64; +MusicCurrentVolume = 0x8015EA66; +D_80159AE8 = 0x8015EA68; +D_80159B50 = 0x8015EAD0; +TextureHandles = 0x8015F510; +ScreenOverlays = 0x80161710; +AmbientSoundData = 0x80161740; +D_8015C7E0 = 0x80161760; +D_8015C800 = 0x80161780; +ui_msg_bubble_left_png = 0x802E6790; // rom:0x10D030 +ui_msg_bubble_mid_png = 0x802E6B90; // rom:0x10D430 +ui_msg_bubble_right_png = 0x802E6C90; // rom:0x10D530 +ui_msg_arrow_png = 0x802E7090; // rom:0x10D930 +ui_msg_frame_a_1_1_png = 0x802E7110; // rom:0x10D9B0 +ui_msg_frame_a_1_2_png = 0x802E7130; // rom:0x10D9D0 +ui_msg_frame_a_1_3_png = 0x802E7150; // rom:0x10D9F0 +ui_msg_frame_a_1_4_png = 0x802E7170; // rom:0x10DA10 +ui_msg_frame_a_1_5_png = 0x802E7190; // rom:0x10DA30 +ui_msg_frame_a_2_1_png = 0x802E71B0; // rom:0x10DA50 +ui_msg_frame_a_2_5_png = 0x802E71D0; // rom:0x10DA70 +ui_msg_frame_a_3_1_png = 0x802E71F0; // rom:0x10DA90 +ui_msg_frame_a_3_5_png = 0x802E7210; // rom:0x10DAB0 +ui_msg_frame_a_4_1_png = 0x802E7230; // rom:0x10DAD0 +ui_msg_frame_a_4_5_png = 0x802E7250; // rom:0x10DAF0 +ui_msg_frame_a_5_1_png = 0x802E7270; // rom:0x10DB10 +ui_msg_frame_a_5_2_png = 0x802E7290; // rom:0x10DB30 +ui_msg_frame_a_5_3_png = 0x802E72B0; // rom:0x10DB50 +ui_msg_frame_a_5_4_png = 0x802E72D0; // rom:0x10DB70 +ui_msg_frame_a_5_5_png = 0x802E72F0; // rom:0x10DB90 +ui_msg_frame_b_1_1_png = 0x802E7310; // rom:0x10DBB0 +ui_msg_frame_b_1_2_png = 0x802E7330; // rom:0x10DBD0 +ui_msg_frame_b_1_3_png = 0x802E7350; // rom:0x10DBF0 +ui_msg_frame_b_1_4_png = 0x802E7370; // rom:0x10DC10 +ui_msg_frame_b_1_5_png = 0x802E7390; // rom:0x10DC30 +ui_msg_frame_b_2_1_png = 0x802E73B0; // rom:0x10DC50 +ui_msg_frame_b_2_5_png = 0x802E73D0; // rom:0x10DC70 +ui_msg_frame_b_3_1_png = 0x802E73F0; // rom:0x10DC90 +ui_msg_frame_b_3_5_png = 0x802E7410; // rom:0x10DCB0 +ui_msg_frame_b_4_1_png = 0x802E7430; // rom:0x10DCD0 +ui_msg_frame_b_4_5_png = 0x802E7450; // rom:0x10DCF0 +ui_msg_frame_b_5_1_png = 0x802E7470; // rom:0x10DD10 +ui_msg_frame_b_5_2_png = 0x802E7490; // rom:0x10DD30 +ui_msg_frame_b_5_3_png = 0x802E74B0; // rom:0x10DD50 +ui_msg_frame_b_5_4_png = 0x802E74D0; // rom:0x10DD70 +ui_msg_frame_b_5_5_png = 0x802E74F0; // rom:0x10DD90 +ui_msg_palettes = 0x802E7510; // rom:0x10DDB0 +ui_msg_sign_corner_topleft_png = 0x802E7710; // rom:0x10DFB0 +ui_msg_sign_corner_topright_png = 0x802E7790; // rom:0x10E030 +ui_msg_sign_corner_bottomleft_png = 0x802E7810; // rom:0x10E0B0 +ui_msg_sign_corner_bottomright_png = 0x802E7890; // rom:0x10E130 +ui_msg_lamppost_corner_bottomright_png = 0x802E7910; // rom:0x10E1B0 +ui_msg_sign_side_top_png = 0x802E7990; // rom:0x10E230 +ui_msg_sign_side_left_png = 0x802E7A90; // rom:0x10E330 +ui_msg_sign_side_right_png = 0x802E7BD0; // rom:0x10E470 +ui_msg_sign_side_bottom_png = 0x802E7D10; // rom:0x10E5B0 +ui_msg_sign_fill_png = 0x802E7E10; // rom:0x10E6B0 +ui_msg_sign_pal = 0x802E7E30; // rom:0x10E6D0 +ui_msg_lamppost_pal = 0x802E7E50; // rom:0x10E6F0 +ui_msg_background_png = 0x802E7E70; // rom:0x10E710 +ui_msg_rewind_arrow_png = 0x802E8670; // rom:0x10EF10 +ui_msg_rewind_arrow_pal = 0x802E8790; // rom:0x10F030 +ui_msg_star_png = 0x802E87B0; // rom:0x10F050 +ui_msg_star_silhouette_png = 0x802E89F0; // rom:0x10F290 +MsgVoices = 0x802E676C; // rom:0x10D00C +MsgLetterRasterOffsets = 0x802E670C; // rom:0x10CFAC +MsgLetterPaletteOffsets = 0x802E673C; // rom:0x10CFDC +MsgCharsets = 0x802E66F4; // rom:0x10CF94 +MsgCharImgTitle = 0x802F3670; +MsgCharImgSubtitle = 0x802ECA30; +MsgCharWidthTitle = 0x802E6654; // rom:0x10CEF4 +MsgCharWidthSubtitle = 0x802E6680; // rom:0x10CF20 +MsgCharDataTitle = 0x802E66AC; // rom:0x10CF4C +MsgCharDataSubtitle = 0x802E66C4; // rom:0x10CF64 +MsgCharsetTitle = 0x802E66DC; // rom:0x10CF7C +MsgCharsetSubtitle = 0x802E66E8; // rom:0x10CF88 +MsgCharsetNormal = 0x802E660C; // rom:0x10CEAC +MsgCharsetMenu = 0x802E663C; // rom:0x10CEDC +MsgCharsetMenu2 = 0x802E6648; // rom:0x10CEE8 +MsgCharDataMenu = 0x802E6618; // rom:0x10CEB8 +MsgCharDataNormal = 0x802E65D0; // rom:0x10CE70 +MsgCharWidthMenuKana = 0x802E64EC; // rom:0x10CD8C +MsgCharWidthMenuLatin = 0x802E65B4; // rom:0x10CE54 +MsgCharWidthKana = 0x802E6380; // rom:0x10CC20 +MsgCharWidthLatin = 0x802E6448; // rom:0x10CCE8 +MsgCharWidthKanji = 0x802E6464; // rom:0x10CD04 +MsgCharWidthButtons = 0x802E64E0; // rom:0x10CD80 diff --git a/ver/jp/undefined_syms.txt b/ver/jp/undefined_syms.txt index 99b3901cd9..13aab97e48 100644 --- a/ver/jp/undefined_syms.txt +++ b/ver/jp/undefined_syms.txt @@ -7,8 +7,6 @@ D_A450000C = 0xA450000C; D_A4600010 = 0xA4600010; D_A4800018 = 0xA4800018; -obfuscated_obfuscation_shims_ROM_START = 0xF79E611F; - filemenu_ROM_START = 0x0016B550; filemenu_ROM_END = 0x01749F0; filemenu_VRAM = 0x80242370; @@ -29,233 +27,15 @@ pause_RODATA_END = 0x8026F790; pause_BSS_START = 0x8026F790; pause_BSS_END = 0x80277D00; +sprite_shading_profiles_data_ROM_START = sprite_shading_profiles_ROM_START + 0x1D0; battle_heap_create_obfuscated_ROM_START = 0x31F1A0; obfuscation_shims_ROM_START = 0x31F340; battle_heap_create_obfuscated_ROM_END = 0x31F340; obfuscation_shims_ROM_END = 0x31F430; obfuscated_obfuscation_shims_VRAM = 0x7599F6D8; - -osViModeNtscLan1 = 0x80095800; - -osMemSize = 0x80000318; -osTvType = 0x80000300; -osMemSize = 0x80000318; -osRomBase = 0x80000308; -osResetType = 0x8000030C; -osAppNMIBuffer = 0x8000031C; - -// main.data - -__osGetSR = 0x8006C650; -__osHwIntTable = 0x800958A0; -D_80074010 = 0x80073FF0; - -// main.bss +obfuscated_obfuscation_shims_ROM_START = 0xF79E611F; // subsequent segments -draw_box = 0x800F5470; -HES_AsleepBegin = 0x80104E54; -HES_AsleepEnd = 0x80104FF4; -HES_ElectrifiedBegin = 0x80105238; -HES_ElectrifiedEnd = 0x80105468; -HES_ParalyzedBegin = 0x801056AC; -HES_ParalyzedEnd = 0x801058DC; -HES_DizzyBegin = 0x80105A90; -HES_DizzyEnd = 0x80105C30; -HES_PoisonedBegin = 0x80105DE4; -HES_PoisonedEnd = 0x80105F84; -HES_FrozenBegin = 0x80106138; -HES_FrozenEnd = 0x801062D8; -HES_WeakenedLoop = 0x80106430; -HES_WeakenedBegin = 0x8010646C; -HES_WeakenedEnd = 0x801065EC; -HES_StoppedBegin = 0x801067A0; -HES_StoppedEnd = 0x80106940; -HES_ShrunkBegin = 0x80106AF4; -HES_ShrunkEnd = 0x80106C94; -HES_TransparentBegin = 0x80106E68; -HES_TransparentEnd = 0x80107028; -HES_BoostJumpBegin = 0x801071AC; -HES_BoostJumpEnd = 0x8010730C; -HES_BoostHammerBegin = 0x801074A4; -HES_BoostHammerEnd = 0x80107604; -HES_BoostPartner = 0x80107770; -HES_Surprise = 0x8010779C; -HES_Partner0 = 0x80107E38; -HES_Partner0Disabled = 0x80107E60; -HES_Goombario = 0x80107E88; -HES_GoombarioDisabled = 0x80107EB0; -HES_Kooper = 0x80107ED8; -HES_KooperDisabled = 0x80107F00; -HES_Bombette = 0x80107F28; -HES_BombetteDisabled = 0x80107F50; -HES_Parakarry = 0x80107F78; -HES_ParakarryDisabled = 0x80107FA0; -HES_Bow = 0x80107FC8; -HES_BowDisabled = 0x80107FF0; -HES_Watt = 0x80108018; -HES_WattDisabled = 0x80108040; -HES_Sushie = 0x80108068; -HES_SushieDisabled = 0x80108090; -HES_Lakilester = 0x801080B8; -HES_LakilesterDisabled = 0x801080E0; -HES_Partner9 = 0x80108108; -HES_Partner9Disabled = 0x80108130; -HES_PartnerA = 0x80108158; -HES_PartnerADisabled = 0x80108180; -HES_PartnerB = 0x801081A8; -HES_PartnerBDisabled = 0x801081D0; -HES_Peril = 0x80108B54; -HES_Danger = 0x80108BA4; -HES_MoveDiamond = 0x801094C8; -HES_MoveDiamond_disabled = 0x80109568; -spr_init_sprites = 0x80111448; -spr_render_init = 0x801115B0; -spr_update_player_sprite = 0x801115DC; -spr_draw_player_sprite = 0x80111790; -func_802DDEC4 = 0x80111A14; -spr_load_npc_sprite = 0x80111C3C; -spr_update_sprite = 0x80111DFC; -spr_draw_npc_sprite = 0x80111F28; -spr_get_notify_value = 0x80112118; -spr_free_sprite = 0x80112138; -set_npc_imgfx_all = 0x801123E4; -spr_get_npc_palettes = 0x80112590; -spr_get_npc_color_variations = 0x801125BC; -update_entities = 0x801148E0; -render_entities = 0x801150C4; -get_entity_by_index = 0x801157F8; -get_shadow_by_index = 0x80115814; -clear_entity_data = 0x80115EC8; -init_entity_data = 0x80116068; -create_shadow_type = 0x80117470; -delete_shadow = 0x80117538; -entity_raycast_down = 0x801177F8; -set_npc_shadow_scale = 0x80117B10; -clear_game_modes = 0x80117DA8; -set_game_mode_slot = 0x080117EB8; -game_mode_set_fpDrawAuxUI = 0x80117F94; -step_current_game_mode = 0x80118088; -state_render_backUI = 0x80118168; -state_render_frontUI = 0x801181D4; -mdl_load_all_textures = 0x8011AE34; -clear_model_data = 0x8011AF54; -init_model_data = 0x8011B1F8; -mdl_calculate_model_sizes = 0x8011B33C; -iterate_models = 0x8011B884; -mdl_update_transform_matrices = 0x8011B8A8; -render_models = 0x8011BDA0; -get_model_from_list_index = 0x8011FF40; -load_data_for_models = 0x8011FF58; -mdl_reset_transform_flags = 0x80120CF8; -mdl_set_shroud_tint_params = 0x8012106C; -mdl_get_shroud_tint_params = 0x80121090; -mdl_set_all_tint_type = 0x80122A3C; -clear_render_tasks = 0x80122AA0; -queue_render_task = 0x80122B20; -execute_render_tasks = 0x80122BC8; -clear_animator_list = 0x80123434; -reset_animator_list = 0x80123520; -clear_entity_models = 0x80125DC0; -init_entity_models = 0x80125E68; -get_entity_model = 0x80127FEC; -clear_worker_list = 0x801282C8; -init_worker_list = 0x80128324; -create_worker_world = 0x80128368; -update_workers = 0x80128614; -render_workers_world = 0x80128680; -render_workers_frontUI = 0x801286F0; -render_workers_backUI = 0x80128760; -clear_character_set = 0x80128870; -clear_printers = 0x80128884; -update_messages = 0x80128A60; -render_messages = 0x8012948C; -get_msg_width = 0x8012B6D4; -draw_msg = 0x8012B710; -clear_item_entity_data = 0x80136170; -init_item_entity_list = 0x80136244; -make_item_entity = 0x80136564; -make_item_entity_delayed = 0x80136C38; -update_item_entities = 0x8013705C; -render_item_entities = 0x80137FC4; -is_picking_up_item = 0x8013933C; -_render_transition_stencil = 0x8013BB30; -set_screen_overlay_params_front = 0x8013CE38; -set_screen_overlay_params_back = 0x8013CE54; -set_screen_overlay_color = 0x8013CEC0; -set_screen_overlay_center = 0x8013CEFC; -set_screen_overlay_alpha = 0x8013D184; -clear_screen_overlays = 0x8013D1B8; -func_80138188 = 0x8013D238; -func_80138198 = 0x8013D248; -render_screen_overlay_frontUI = 0x8013D250; -render_screen_overlay_backUI = 0x8013D2D0; -set_map_transition_effect = 0x8013D350; -update_exit_map_screen_overlay = 0x8013D35C; -update_enter_map_screen_overlay = 0x8013D684; -imgfx_update_cache = 0x8013F798; -hud_element_clear_cache = 0x801461B0; -init_hud_element_list = 0x801463B0; -hud_element_create = 0x80146554; -update_hud_elements = 0x801466C0; -render_hud_elements_backUI = 0x801472C0; -render_hud_elements_frontUI = 0x801477CC; -render_transformed_hud_elements = 0x80148764; -hud_element_draw_next = 0x80149874; -hud_element_set_script = 0x801498AC; -get_hud_element = 0x80149984; -hud_element_free = 0x801499A4; -hud_element_set_render_pos = 0x80149A34; -hud_element_set_flags = 0x80149AB0; -hud_element_clear_flags = 0x80149ADC; -hud_element_set_aux_cache = 0x8014A398; -clear_saved_variables = 0x8014A3D0; -clear_area_flags = 0x8014A440; -set_global_flag = 0x8014A500; -get_global_flag = 0x8014A56C; -clear_trigger_data = 0x8014A730; -init_trigger_list = 0x8014A7D8; -update_triggers = 0x8014A910; -load_map_bg = 0x8014AE20; -reset_background_settings = 0x8014AEA8; -set_background = 0x8014AED8; -set_background_size = 0x8014AF20; -appendGfx_background_texture = 0x8014AF70; -reset_ambient_sounds = 0x8014C2E0; -update_ambient_sounds = 0x8014C314; -clear_windows = 0x8014C4A0; -update_windows = 0x8014C4C4; -render_window_root = 0x8014CB74; -set_window_properties = 0x8014CD78; -set_window_update = 0x8014CF2C; -set_windows_visible = 0x8014CF74; -clear_sprite_shading_data = 0x8014D0F0; -init_sprite_shading_data = 0x8014D1A0; -sfx_reset_door_sounds = 0x8014E6B0; -sfx_clear_sounds = 0x8014E6C8; -sfx_clear_env_sounds = 0x8014E720; -sfx_update_env_sound_params = 0x8014E7E4; -sfx_set_reverb_mode = 0x8014E8AC; -sfx_get_reverb_mode = 0x8014E8D8; -sfx_stop_env_sounds = 0x8014E8E8; -sfx_stop_sound = 0x8014ED1C; -sfx_play_sound = 0x8014ED64; -sfx_play_sound_at_position = 0x8014EE0C; -bgm_reset_sequence_players = 0x8014F548; -bgm_reset_volume = 0x8014F5DC; -bgm_update_music_settings = 0x8014F5F8; -bgm_set_song = 0x8014F9C8; -bgm_init_music_players = 0x8014FCB8; -bgm_quiet_max_volume = 0x8014FD0C; -bgm_reset_max_volume = 0x8014FD20; -bgm_pop_battle_song = 0x8014FF1C; -bgm_push_battle_song = 0x8014FFA8; -bgm_set_battle_song = 0x8015003C; -gLastRenderTaskCount = 0x801508A0; -D_8014C248 = 0x801512F8; -gBackgroundTintModePtr = 0x80156350; -gWindows = 0x8015ECD0; -D_80164000 = 0x80164000; D_80197000 = 0x80197000; D_801A6000 = 0x801A6000; AuHeapBase = 0x801AA000; @@ -280,71 +60,6 @@ shim_create_audio_system_obfuscated = 0x802B2000; shim_load_engine_data_obfuscated = 0x802B203C; shim_general_heap_create_obfuscated = 0x802B2078; shim_battle_heap_create_obfuscated = 0x802B20B4; -clear_script_list = 0x802C31DC; -init_script_list = 0x802C32EC; -start_script = 0x802C33E0; -start_script_in_group = 0x802C35D0; -update_scripts = 0x802C3D74; -func_802C3EE4 = 0x802C3EE4; -kill_script = 0x802C3F3C; -kill_script_by_ID = 0x802C40AC; -does_script_exist = 0x802C4164; -suspend_all_script = 0x802C4420; -resume_all_script = 0x802C448C; -suspend_all_group = 0x802C45E8; -resume_all_group = 0x802C4648; -get_script_by_id = 0x802C47A8; -set_script_flags = 0x802C47E8; -clear_script_flags = 0x802C4880; -evt_get_variable = 0x802C7ABC; -evt_set_variable = 0x802C8098; -evt_get_float_variable = 0x802C842C; -resolve_npc = 0x802CDAC0; -CreateNpc = 0x802CDBA4; -DeleteNpc = 0x802CDC1C ; -SetNpcPos = 0x802CDCB0; -SetNpcRotation = 0x802CDDB0; -SetNpcAnimation = 0x802CE0F4; -SetNpcYaw = 0x802CEA84; -SetNpcFlagBits = 0x802CF060; -GetNpcPos = 0x802CF0F4; -SetNpcImgFXParams = 0x802CFD30; -GetPlayerPos = 0x802D1DFC; -PlaySound = 0x802D6150; -D_802D9D70 = 0x802D9D70; -D_802D9D71 = 0x802D9D71; -ui_msg_frame_a_1_1_png = 0x802E7110; -ui_msg_frame_a_1_2_png = 0x802E7130; -ui_msg_frame_a_1_3_png = 0x802E7150; -ui_msg_frame_a_1_4_png = 0x802E7170; -ui_msg_frame_a_1_5_png = 0x802E7190; -ui_msg_frame_a_2_1_png = 0x802E71B0; -ui_msg_frame_a_2_5_png = 0x802E71D0; -ui_msg_frame_a_3_1_png = 0x802E71F0; -ui_msg_frame_a_3_5_png = 0x802E7210; -ui_msg_frame_a_4_1_png = 0x802E7230; -ui_msg_frame_a_4_5_png = 0x802E7250; -ui_msg_frame_a_5_1_png = 0x802E7270; -ui_msg_frame_a_5_2_png = 0x802E7290; -ui_msg_frame_a_5_3_png = 0x802E72B0; -ui_msg_frame_a_5_4_png = 0x802E72D0; -ui_msg_frame_a_5_5_png = 0x802E72F0; -ui_msg_frame_b_1_1_png = 0x802E7310; -ui_msg_frame_b_1_2_png = 0x802E7330; -ui_msg_frame_b_1_3_png = 0x802E7350; -ui_msg_frame_b_1_4_png = 0x802E7370; -ui_msg_frame_b_1_5_png = 0x802E7390; -ui_msg_frame_b_2_1_png = 0x802E73B0; -ui_msg_frame_b_2_5_png = 0x802E73D0; -ui_msg_frame_b_3_1_png = 0x802E73F0; -ui_msg_frame_b_3_5_png = 0x802E7410; -ui_msg_frame_b_4_1_png = 0x802E7430; -ui_msg_frame_b_4_5_png = 0x802E7450; -ui_msg_frame_b_5_1_png = 0x802E7470; -ui_msg_frame_b_5_2_png = 0x802E7490; -ui_msg_frame_b_5_3_png = 0x802E74B0; -ui_msg_frame_b_5_4_png = 0x802E74D0; -ui_msg_frame_b_5_5_png = 0x802E74F0; heap_generalHead = 0x802FB800; gFrameBuf0 = 0x8038F800; gFrameBuf1 = 0x803B5000; @@ -1053,51 +768,17 @@ pulse_stone_ROM_END = 0xE2B440; i_spy_ROM_START = 0xE2B440; i_spy_ROM_END = 0xE2C0F0; -set_player_imgfx_comp = 0x80111A34; -set_player_imgfx_all = 0x80111B48; WorldTattleInteractionID = 0x802BDF60; -set_standard_shadow_scale = 0x80117A6C; -set_peach_shadow_scale = 0x80117BE4; -gCollisionStatus = 0x8015F4D0; -should_collider_allow_interact = 0x8014AD98; interact_inspect_setup = 0x802B70B4; appendGfx_interact_prompt = 0x802B71E8; -gCurrentHiddenPanels = 0x8015F4F8; ispy_notification_setup = 0x802b72c0; world_watt_sync_held_position = 0x802BE06C; -get_entity_type = 0x801158B4; appendGfx_speech_bubble = 0x802B71C8; interact_speech_setup = 0x802B70B4; appendGfx_pulse_stone_icon = 0x802B71D4; appendGfx_ispy_icon = 0x802b7000; -exec_ShakeCam1 = 0x802CB56C; pulse_stone_notification_setup = 0x802B7140; -sfx_play_sound_at_player = 0x8014ED88; world_lakilester_can_dismount = 0x802BD7DC; -hide_popup_menu = 0x800f1340; -destroy_popup_menu = 0x800f14c8; -create_standard_popup_menu = 0x800f4fd4; -HES_StatusHP = 0x801083D8; -HES_StatusHeart = 0x801086A8; -HES_StatusFP = 0x80108400; -HES_StatusFlower = 0x801086C8; -HES_StatusCoin = 0x801086E8; -HES_StatusStarPoint = 0x8010883C; -HES_StatusSPShine = 0x80104D7C; -func_800F0D5C = 0x800F0CEC; -HES_StatusSPEmptyIncrement = 0x80108540; -HES_StatusStarEmpty = 0x80108680; -copy_world_hud_element_ref_to_battle = 0x8014a364; -hud_element_set_tint = 0x80149fac; -get_worker = 0x8012884c; -create_worker_frontUI = 0x8012844c; -func_800F0CB0 = 0x800f0c40; -func_800F102C = 0x800F0FBC; -func_800F0D80 = 0x800F0D10; -hud_element_draw_clipped = 0x80149858; -draw_number = 0x8012c8b0; -basic_hidden_window_update = 0x8014C624; -basic_window_update = 0x8014C524; action_update_idle = 0x802B6000; world_action_idle_ROM_START = 0xE2C0F0; @@ -1166,39 +847,6 @@ action_update_ride = 0x802B6000; action_update_step_up = 0x802B6000; action_update_state_23 = 0x802B609C; -HES_MenuTimes = 0x80109400; - -HES_StatusDigit0 = 0x80108248; -HES_StatusDigit1 = 0x80108270; -HES_StatusDigit2 = 0x80108298; -HES_StatusDigit3 = 0x801082C0; -HES_StatusDigit4 = 0x801082E8; -HES_StatusDigit5 = 0x80108310; -HES_StatusDigit6 = 0x80108338; -HES_StatusDigit7 = 0x80108360; -HES_StatusDigit8 = 0x80108388; -HES_StatusDigit9 = 0x801083B0; - -HES_StatusSlash = 0x80108220; -HES_StatusTimes = 0x801081F8; - -HES_StatusSPIncrement1 = 0x80108428; -HES_StatusSPIncrement2 = 0x80108450; -HES_StatusSPIncrement3 = 0x80108478; -HES_StatusSPIncrement4 = 0x801084A0; -HES_StatusSPIncrement5 = 0x801084C8; -HES_StatusSPIncrement6 = 0x801084F0; -HES_StatusSPIncrement7 = 0x80108518; -HES_StatusSPIncrement8 = 0x80108540; - -HES_StatusStar1 = 0x80108568; -HES_StatusStar2 = 0x80108590; -HES_StatusStar3 = 0x801085B8; -HES_StatusStar4 = 0x801085E0; -HES_StatusStar5 = 0x80108608; -HES_StatusStar6 = 0x80108630; -HES_StatusStar7 = 0x80108658; - world_use_item_ROM_START = 0x32d500; world_use_item_ROM_END = 0x32ddd0; world_use_item_VRAM = 0x802C0000; @@ -1324,4 +972,181 @@ EVS_WorldTwink_Update = 0x802BD20C; EVS_WorldTwink_UseAbility = 0x802BD228; EVS_WorldTwink_PutAway = 0x802BD244; -D_80109610_JP = 0x80109610; +heap_spriteHead = 0x8034F800; +gCurrentModelTreeNodeInfo = 0x8009A5D4; +sprite_shading_profiles_ROM_START = 0x0031DF90; +Entity_UltraBlockContent_Render = 0x0A000800; +entity_model_SimpleSpring_gfx_ROM_END = 0x00E72BD0; +Entity_SaveBlock_RenderNone = 0x0A003508; +entity_model_BlueSwitch_ROM_END = 0x00E6D750; +Entity_HitYellowBlock_Mesh = 0x00000084; +entity_model_Hammer3Block_ROM_END = 0x00E3B2A0; +entity_model_SimpleSpring_anim_ROM_END = 0x00E74030; +Entity_SuperBlockContent_Render2 = 0x0A000380; +Entity_Chest_RenderBox = 0x0A000EB8; +Entity_InertYellowBlock_Render = 0x0A0004E0; +entity_model_HitYellowBlock_gfx_ROM_END = 0x00E4FC90; +Entity_SaveBlock_RenderBlock = 0x0A0034F0; +entity_model_UltraBlockContent_ROM_END = 0x00E54160; +Entity_HitFloatingYellowBlock_AnimationIdle = 0x0000022C; +entity_model_PowBlock_ROM_START = 0x00E4C9A0; +entity_model_ShatteringHammer1Block_ROM_END = 0x00E3E4F0; +Entity_Signpost_Render = 0x0A000A68; +entity_model_BlueWarpPipe_ROM_END = 0x00E62300; +entity_model_Hammer1Block_ROM_START = 0x00E3A3B0; +entity_model_HitRedBlock_anim_ROM_END = 0x00E52CC0; +D_0A000240_E4A8E0 = 0x0A000240; +entity_model_WoodenCrate_ROM_START = 0x00E5A4C0; +entity_model_Hammer2Block_ROM_END = 0x00E3ADB0; +Entity_HeartBlock_Render = 0x0A000918; +Entity_Hammer2Block_Render = 0x0A0004F0; +Entity_HitRedBlock_AnimationHit = 0x00000094; +Entity_BrickBlock_Render = 0x0A0004A0; +Entity_SuperBlockContent_Render = 0x0A000328; +entity_model_SuperBlockContent_ROM_START = 0x00E53520; +entity_model_InertRedBlock_ROM_START = 0x00E4B5C0; +entity_model_SuperBlockContent_ROM_END = 0x00E53900; +entity_model_Hammer3Block_ROM_START = 0x00E3ADB0; +Entity_ScriptSpring_AnimLaunch = 0x000001E4; +entity_model_Chest_ROM_START = 0x00E6D750; +Entity_GreenStompSwitch_Render = 0x0A000740; +entity_model_HiddenPanel_ROM_END = 0x00E5FCE0; +entity_model_ShatteringBrickBlock_ROM_END = 0x00E4B0C0; +Entity_Chest_LidMtx = 0x0A000C48; +Entity_HeartBlockContent_RenderHeartHappy = 0x0A000808; +entity_model_GreenStompSwitch_ROM_END = 0x00E6B940; +Entity_HeartBlockContent_RenderHeartSleeping = 0x0A000700; +entity_model_RedBlock_ROM_END = 0x00E45C50; +Entity_SaveBlock_RenderContent = 0x0A0034E0; +Entity_HeartBlockContent_RenderHeartAwake = 0x0A0007B0; +D_0A000220_E4A8C0 = 0x0A000220; +entity_model_PowBlock_ROM_END = 0x00E4D680; +entity_model_ShatteringBrickBlock_ROM_START = 0x00E470E0; +Entity_HitYellowBlock_AnimationHit = 0x00000094; +entity_model_YellowBlock_ROM_END = 0x00E451A0; +entity_model_HitFloatingYellowBlock_anim_ROM_START = 0x00E51370; +Entity_PushBlock_Render = 0x0A000338; +entity_model_ScriptSpring_gfx_ROM_START = 0x00E6E620; +Entity_InertRedBlock_Render = 0x0A000A90; +entity_model_ShatteringHammer3Block_ROM_START = 0x00E41710; +Entity_Hammer3Block_Render = 0x0A0004E0; +entity_model_Chest_ROM_END = 0x00E6E620; +entity_model_RedBlock_ROM_START = 0x00E451A0; +entity_model_BrickBlock_ROM_START = 0x00E46C30; +entity_model_HitFloatingYellowBlock_anim_ROM_END = 0x00E51600; +entity_model_InertYellowBlock_ROM_END = 0x00E4B5C0; +Entity_WoodenCrate_Render = 0x0A004338; +entity_model_ShatteringHammer3Block_ROM_END = 0x00E446F0; +entity_model_HitYellowBlock_anim_ROM_START = 0x00E4FC90; +entity_model_HitRedBlock_gfx_ROM_END = 0x00E52A60; +entity_model_UltraBlock_ROM_START = 0x00E4DF90; +entity_model_BrickBlock_ROM_END = 0x00E470E0; +entity_model_HeartBlockContent_ROM_END = 0x00E53520; +Entity_SuperBlock_Render = 0x0A0008F8; +Gfx_HiddenPanel_Render = 0x0A000280; +entity_model_HitRedBlock_anim_ROM_START = 0x00E52A60; +Entity_ShatteringHammer1Block_FragmentsMatrices = 0x0A001508; +entity_model_HeartBlock_ROM_START = 0x00E4C070; +Entity_ShatteringHammer3Block_FragmentsRender = 0x0A002F78; +Entity_UltraBlockContent_Render2 = 0x0A000750; +Entity_Chest_RenderLid = 0x0A000DC0; +Entity_WoodenCrate_FragmentsMatrices = 0x0A0026F0; +Entity_SimpleSpring_Mesh = 0x000001B8; +entity_model_ShatteringHammer2Block_ROM_END = 0x00E41710; +entity_model_SaveBlock_ROM_END = 0x00E57670; +entity_model_GreenStompSwitch_ROM_START = 0x00E6B1F0; +entity_model_ShatteringHammer1Block_ROM_START = 0x00E3B2A0; +Gfx_AltHiddenPanel_RenderTop = 0x0A0001B0; +entity_model_SimpleSpring_anim_ROM_START = 0x00E72BD0; +entity_model_Hammer2Block_ROM_START = 0x00E3A8B0; +entity_model_PushBlock_ROM_END = 0x00E46C30; +entity_model_InertRedBlock_ROM_END = 0x00E4C070; +Entity_BlueSwitch_Render = 0x0A000EF8; +entity_model_PushBlock_ROM_START = 0x00E468E0; +entity_model_BlueSwitch_ROM_START = 0x00E6C840; +Entity_RedBlock_Render = 0x0A000A90; +Entity_RedSwitch_Render = 0x0A000EE8; +entity_model_HitFloatingYellowBlock_gfx_ROM_END = 0x00E51370; +entity_model_HitYellowBlock_anim_ROM_END = 0x00E4FF30; +entity_model_HitRedBlock_gfx_ROM_START = 0x00E51600; +entity_model_HitFloatingYellowBlock_gfx_ROM_START = 0x00E4FF30; +Entity_BlueWarpPipe_RenderBase = 0x0A000680; +entity_model_ScriptSpring_anim_ROM_END = 0x00E71400; +Entity_ShatteringHammer2Block_FragmentsRender = 0x0A0031B0; +entity_model_HeartBlock_ROM_END = 0x00E4C9A0; +Gfx_HiddenPanel_Render2 = 0x0A0002A0; +entity_model_Hammer1Block_ROM_END = 0x00E3A8B0; +entity_model_Signpost_ROM_END = 0x00E62D80; +entity_model_SuperBlock_ROM_END = 0x00E4DF90; +entity_model_ScriptSpring_gfx_ROM_END = 0x00E6FFA0; +entity_model_Signpost_ROM_START = 0x00E62300; +entity_model_UltraBlockContent_ROM_START = 0x00E53900; +entity_model_InertYellowBlock_ROM_START = 0x00E4B0C0; +Entity_ShatteringBrickBlock_FragmentsRender = 0x0A003F70; +entity_model_SuperBlock_ROM_START = 0x00E4D680; +Entity_PowBlock_Render = 0x0A000CC8; +Entity_ShatteringBrickBlock_FragmentsMatrices = 0x0A002318; +Entity_Hammer1Block_Render = 0x0A0004F0; +entity_model_UltraBlock_ROM_END = 0x00E4E870; +entity_model_YellowBlock_ROM_START = 0x00E446F0; +Gfx_HiddenPanel_RenderHole = 0x0A000230; +entity_model_HeartBlockContent_ROM_START = 0x00E52CC0; +D_0A000260_E4A900 = 0x0A000260; +Entity_ScriptSpring_AnimIdle = 0x0000131C; +entity_model_BlueWarpPipe_ROM_START = 0x00E61B50; +Entity_HitRedBlock_Mesh = 0x00000084; +Entity_BlueWarpPipe_RenderPipe = 0x0A0006B8; +Entity_SimpleSpring_AnimLaunch = 0x000001E4; +Entity_YellowBlock_Render = 0x0A000A90; +entity_model_WoodenCrate_ROM_END = 0x00E5E8C0; +entity_model_HitYellowBlock_gfx_ROM_START = 0x00E4E870; +Entity_ShatteringHammer3Block_FragmentsMatrices = 0x0A001218; +Entity_ShatteringHammer1Block_FragmentsRender = 0x0A0031E0; +Gfx_HiddenPanel_RenderTop = 0x0A000180; +entity_model_ScriptSpring_anim_ROM_START = 0x00E6FFA0; +entity_model_HiddenPanel_ROM_START = 0x00E5FA20; +Entity_UltraBlock_Render = 0x0A0008C8; +Entity_HitFloatingYellowBlock_Mesh = 0x00000084; +entity_model_RedSwitch_ROM_END = 0x00E6C840; +Entity_ShatteringHammer2Block_FragmentsMatrices = 0x0A0014D8; +Entity_HitYellowBlock_AnimationIdle = 0x0000023C; +Entity_ScriptSpring_Mesh = 0x000001B8; +Entity_SimpleSpring_AnimIdle = 0x0000131C; +Entity_SaveBlock_Mtx = 0x0A003260; +D_0A000200_E4A8A0 = 0x0A000200; +entity_model_RedSwitch_ROM_START = 0x00E6B940; +entity_model_SimpleSpring_gfx_ROM_START = 0x00E71400; +Entity_WoodenCrate_FragmentsRender = 0x0A004350; +entity_model_ShatteringHammer2Block_ROM_START = 0x00E3E4F0; +entity_model_SaveBlock_ROM_START = 0x00E54160; + +entity_default_ROM_START = 0x00E343B0; +BattleEntityHeapBottom = 0x801A7000; +entity_jan_iwa_ROM_START = 0x00E365B0; +entity_sbk_omo_ROM_END = 0x00E3A3B0; +ClearRenderTaskLists = 0x802B7E00; +entity_default_ROM_END = 0x00E365B0; +entity_sbk_omo_ROM_START = 0x00E385D0; +TextureHeap = 0x8028E000; +entity_jan_iwa_ROM_END = 0x00E385D0; +flip_card_1_header = 0x000C0490; +horizontal_pipe_curl_header = 0x0001E830; +shock_header = 0x00014358; +tutankoopa_swirl_2_header = 0x000A1820; +flutter_down_header = 0x000314E0; +tutankoopa_swirl_1_header = 0x000ACDE8; +unused_1_header = 0x0005B7A8; +tutankoopa_gather_header = 0x00096258; +imgfx_data_ROM_START = 0x00253C00; +vertical_pipe_curl_header = 0x0001A858; +flip_card_2_header = 0x000C49B8; +flip_card_3_header = 0x000C6150; +shuffle_cards_header = 0x000BBF68; +unfurl_header = 0x00033498; +spirit_capture_header = 0x00039228; +unused_2_header = 0x0007CF10; +unused_3_header = 0x00086490; +cymbal_crush_header = 0x000CA380; +startle_header = 0x00029458; +get_in_bed_header = 0x00038988; +shiver_header = 0x00018200; diff --git a/ver/pal/asm/nonmatchings/msg/appendGfx_message.s b/ver/pal/asm/nonmatchings/msg_draw/appendGfx_message.s similarity index 100% rename from ver/pal/asm/nonmatchings/msg/appendGfx_message.s rename to ver/pal/asm/nonmatchings/msg_draw/appendGfx_message.s diff --git a/ver/pal/splat.yaml b/ver/pal/splat.yaml index 4c659d4f37..f9f1c45a53 100644 --- a/ver/pal/splat.yaml +++ b/ver/pal/splat.yaml @@ -557,6 +557,7 @@ segments: - [auto, c, entity_model] - [auto, c, worker] - [auto, c, msg] + - [auto, c, msg_draw] - [auto, c, draw_img_util] - [auto, c, item_entity] - [auto, c, screen_overlays] @@ -577,6 +578,7 @@ segments: - [auto, .data, animator] - [auto, .data, entity_model] - [auto, .data, msg] + - [auto, .data, msg_draw] - [auto, .data, draw_img_util] - [auto, .data, item_entity] - start: 0xE1610 diff --git a/ver/us/asm/os/exceptasm.s b/ver/us/asm/os/exceptasm.s index aed93c4a01..2ebe0216ff 100644 --- a/ver/us/asm/os/exceptasm.s +++ b/ver/us/asm/os/exceptasm.s @@ -7,11 +7,75 @@ .section .rodata -dlabel jtbl_80099D80 -.word 0x141818, 0x1C1C1C1C, 0x20202020, 0x20202020, 0x40808, 0xC0C0C0C, 0x10101010, 0x10101010 +__osIntOffTable: + .byte 0x00 + .byte 0x14 + .byte 0x18 + .byte 0x18 + .byte 0x1C + .byte 0x1C + .byte 0x1C + .byte 0x1C + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x20 + .byte 0x00 + .byte 0x04 + .byte 0x08 + .byte 0x08 + .byte 0x0C + .byte 0x0C + .byte 0x0C + .byte 0x0C + .byte 0x10 + .byte 0x10 + .byte 0x10 + .byte 0x10 + .byte 0x10 + .byte 0x10 + .byte 0x10 + .byte 0x10 +.size __osIntOffTable, . - __osIntOffTable -dlabel jtbl_80099DA0 -.word .L8006AF00_46300, .L8006AEC4_462C4, .L8006AEA0_462A0, .L8006ACC8_460C8, .L8006AC80_46080, .L8006AE3C_4623C, .L8006AC44_46044, .L8006AC50_46050, .L8006AC5C_4605C, 0, 0, 0 +__osIntTable: + .word .L8006AF00_46300 + .word .L8006AEC4_462C4 + .word .L8006AEA0_462A0 + .word .L8006ACC8_460C8 + .word .L8006AC80_46080 + .word .L8006AE3C_4623C + .word .L8006AC44_46044 + .word .L8006AC50_46050 + .word .L8006AC5C_4605C + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 +.size __osIntTable, . - __osIntTable + +.section .data + +__osHwIntTable: + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 +.size __osHwIntTable, . - __osHwIntTable + +__osPiIntTable: + .word 0x00000000 + .word 0x00000000 +.size __osPiIntTable, . - __osPiIntTable .section .text, "ax" @@ -166,12 +230,12 @@ glabel func_8006AA34 /* 4601C 8006AC1C 00095202 */ srl $t2, $t1, 8 /* 46020 8006AC20 214A0010 */ addi $t2, $t2, 0x10 .L8006AC24: -/* 46024 8006AC24 3C01800A */ lui $at, %hi(jtbl_80099D80) +/* 46024 8006AC24 3C01800A */ lui $at, %hi(__osIntOffTable) /* 46028 8006AC28 002A0821 */ addu $at, $at, $t2 -/* 4602C 8006AC2C 902A9D80 */ lbu $t2, %lo(jtbl_80099D80)($at) -/* 46030 8006AC30 3C01800A */ lui $at, %hi(jtbl_80099DA0) +/* 4602C 8006AC2C 902A9D80 */ lbu $t2, %lo(__osIntOffTable)($at) +/* 46030 8006AC30 3C01800A */ lui $at, %hi(__osIntTable) /* 46034 8006AC34 002A0821 */ addu $at, $at, $t2 -/* 46038 8006AC38 8C2A9DA0 */ lw $t2, %lo(jtbl_80099DA0)($at) +/* 46038 8006AC38 8C2A9DA0 */ lw $t2, %lo(__osIntTable)($at) /* 4603C 8006AC3C 01400008 */ jr $t2 /* 46040 8006AC40 00000000 */ nop .L8006AC44_46044: @@ -195,8 +259,8 @@ glabel func_8006AA34 .L8006AC80_46080: /* 46080 8006AC80 2401F7FF */ addiu $at, $zero, -0x801 /* 46084 8006AC84 02018024 */ and $s0, $s0, $at -/* 46088 8006AC88 3C098009 */ lui $t1, %hi(D_80095910) -/* 4608C 8006AC8C 25295910 */ addiu $t1, $t1, %lo(D_80095910) +/* 46088 8006AC88 3C098009 */ lui $t1, %hi(__osHwIntTable) +/* 4608C 8006AC8C 25295910 */ addiu $t1, $t1, %lo(__osHwIntTable) /* 46090 8006AC90 21290008 */ addi $t1, $t1, 8 /* 46094 8006AC94 8D2A0000 */ lw $t2, ($t1) /* 46098 8006AC98 11400007 */ beqz $t2, .L8006ACB8 @@ -285,8 +349,8 @@ glabel func_8006AA34 /* 461C8 8006ADC8 24090002 */ addiu $t1, $zero, 2 /* 461CC 8006ADCC 3C01A460 */ lui $at, %hi(D_A4600010) /* 461D0 8006ADD0 AC290010 */ sw $t1, %lo(D_A4600010)($at) -/* 461D4 8006ADD4 3C098009 */ lui $t1, %hi(D_80095938) -/* 461D8 8006ADD8 25295938 */ addiu $t1, $t1, %lo(D_80095938) +/* 461D4 8006ADD4 3C098009 */ lui $t1, %hi(__osPiIntTable) +/* 461D8 8006ADD8 25295938 */ addiu $t1, $t1, %lo(__osPiIntTable) /* 461DC 8006ADDC 8D2A0000 */ lw $t2, ($t1) /* 461E0 8006ADE0 11400006 */ beqz $t2, .L8006ADFC /* 461E4 8006ADE4 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index be632d7a05..4f0ce7319b 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -427,6 +427,7 @@ segments: - [auto, .data, os/contpfs] - [auto, .data, os/contramread] - [auto, .data, os/initialize] + - [auto, .data, os/exceptasm] - [auto, .data, os/xlitob] - [auto, .data, os/vi] - [auto, .data, os/pfsisplug] @@ -888,6 +889,7 @@ segments: - [auto, c, entity_model] - [auto, c, worker] - [auto, c, msg] + - [auto, c, msg_draw] - [auto, c, draw_img_util] - [auto, c, item_entity] - [auto, c, screen_overlays] @@ -908,6 +910,7 @@ segments: - [auto, .data, animator] - [auto, .data, entity_model] - [auto, .data, msg] + - [auto, .data, msg_draw] - [auto, .data, draw_img_util] - [auto, .data, item_entity] - start: 0xE2DF0