summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiangzhengwenjz <jiangzhengwenjzw@qq.com>2019-06-25 06:50:48 +0800
committerjiangzhengwenjz <jiangzhengwenjzw@qq.com>2019-06-26 04:52:53 +0800
commit2a870d54fca85b6f4501cff857837c3f2940fd7d (patch)
treee8ae7a779cbb2aee4ae6d1074bd1d6d937789b38
parent0d46c60b383d5feca05950e57bb05dc392f815cc (diff)
All Done
-rw-r--r--asm/new_menu_helpers.s315
-rw-r--r--asm/start_menu.s4
-rw-r--r--data/data_83FECCC.s17
-rw-r--r--include/new_menu_helpers.h10
-rw-r--r--include/quest_log.h3
-rw-r--r--include/text.h1
-rw-r--r--include/text_window.h2
-rw-r--r--ld_script.txt2
-rw-r--r--src/new_menu_helpers.c241
-rw-r--r--src/oak_speech.c6
-rw-r--r--src/quest_log.c8
-rw-r--r--src/text.c1
-rw-r--r--sym_ewram.txt3
13 files changed, 264 insertions, 349 deletions
diff --git a/asm/new_menu_helpers.s b/asm/new_menu_helpers.s
deleted file mode 100644
index 9f698cb52..000000000
--- a/asm/new_menu_helpers.s
+++ /dev/null
@@ -1,315 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start GetTextSpeedSetting
-GetTextSpeedSetting: @ 80F78A8
- push {lr}
- ldr r3, _080F78D8 @ =gSaveBlock2Ptr
- ldr r2, [r3]
- ldrb r1, [r2, 0x14]
- lsls r0, r1, 29
- lsrs r0, 29
- cmp r0, 0x2
- bls _080F78C4
- movs r0, 0x8
- negs r0, r0
- ands r0, r1
- movs r1, 0x1
- orrs r0, r1
- strb r0, [r2, 0x14]
-_080F78C4:
- ldr r1, _080F78DC @ =gUnknown_841F428
- ldr r0, [r3]
- ldrb r0, [r0, 0x14]
- lsls r0, 29
- lsrs r0, 29
- adds r0, r1
- ldrb r0, [r0]
- pop {r1}
- bx r1
- .align 2, 0
-_080F78D8: .4byte gSaveBlock2Ptr
-_080F78DC: .4byte gUnknown_841F428
- thumb_func_end GetTextSpeedSetting
-
- thumb_func_start sub_80F78E0
-sub_80F78E0: @ 80F78E0
- push {r4,lr}
- sub sp, 0x20
- lsls r0, 24
- lsrs r1, r0, 24
- ldr r4, _080F7934 @ =sStartMenuWindowId
- ldrb r0, [r4]
- cmp r0, 0xFF
- bne _080F792A
- movs r0, 0x7
- str r0, [sp]
- lsls r0, r1, 25
- movs r1, 0xFF
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- str r0, [sp, 0x4]
- movs r0, 0xF
- str r0, [sp, 0x8]
- ldr r0, _080F7938 @ =0x0000013d
- str r0, [sp, 0xC]
- add r0, sp, 0x10
- movs r1, 0
- movs r2, 0x16
- movs r3, 0x1
- bl SetWindowTemplateFields
- ldr r0, [sp, 0x10]
- ldr r1, [sp, 0x14]
- str r0, [sp, 0x18]
- str r1, [sp, 0x1C]
- add r0, sp, 0x18
- bl AddWindow
- strb r0, [r4]
- ldrb r0, [r4]
- bl PutWindowTilemap
-_080F792A:
- ldrb r0, [r4]
- add sp, 0x20
- pop {r4}
- pop {r1}
- bx r1
- .align 2, 0
-_080F7934: .4byte sStartMenuWindowId
-_080F7938: .4byte 0x0000013d
- thumb_func_end sub_80F78E0
-
- thumb_func_start GetStartMenuWindowId
-GetStartMenuWindowId: @ 80F793C
- ldr r0, _080F7944 @ =sStartMenuWindowId
- ldrb r0, [r0]
- bx lr
- .align 2, 0
-_080F7944: .4byte sStartMenuWindowId
- thumb_func_end GetStartMenuWindowId
-
- thumb_func_start remove_start_menu_window_maybe
-remove_start_menu_window_maybe: @ 80F7948
- push {r4,lr}
- ldr r4, _080F7960 @ =sStartMenuWindowId
- ldrb r0, [r4]
- cmp r0, 0xFF
- beq _080F795A
- bl RemoveWindow
- movs r0, 0xFF
- strb r0, [r4]
-_080F795A:
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080F7960: .4byte sStartMenuWindowId
- thumb_func_end remove_start_menu_window_maybe
-
- thumb_func_start sub_80F7964
-sub_80F7964: @ 80F7964
- movs r0, 0x80
- lsls r0, 2
- bx lr
- thumb_func_end sub_80F7964
-
- thumb_func_start sub_80F796C
-sub_80F796C: @ 80F796C
- movs r0, 0x85
- lsls r0, 2
- bx lr
- thumb_func_end sub_80F796C
-
- thumb_func_start sub_80F7974
-sub_80F7974: @ 80F7974
- push {r4,lr}
- adds r4, r0, 0
- bl sub_8112EB4
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x80
- lsls r1, 2
- movs r2, 0xF0
- bl sub_814FE6C
- adds r0, r4, 0
- movs r1, 0x2
- bl sub_8113018
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_80F7974
-
- thumb_func_start sub_80F7998
-sub_80F7998: @ 80F7998
- push {lr}
- movs r0, 0x2
- bl sub_8112EDC
- pop {r0}
- bx r0
- thumb_func_end sub_80F7998
-
- thumb_func_start sub_80F79A4
-sub_80F79A4: @ 80F79A4
- push {lr}
- bl Menu_LoadStdPal
- movs r1, 0x80
- lsls r1, 2
- movs r0, 0
- movs r2, 0xF0
- bl sub_814FEEC
- movs r1, 0x85
- lsls r1, 2
- movs r0, 0
- movs r2, 0xE0
- bl TextWindow_SetUserSelectedFrame
- pop {r0}
- bx r0
- thumb_func_end sub_80F79A4
-
- thumb_func_start SetDefaultFontsPointer
-SetDefaultFontsPointer: @ 80F79C8
- push {lr}
- ldr r0, _080F79D4 @ =gUnknown_841F444
- bl SetFontsPointer
- pop {r0}
- bx r0
- .align 2, 0
-_080F79D4: .4byte gUnknown_841F444
- thumb_func_end SetDefaultFontsPointer
-
- thumb_func_start GetFontAttribute
-GetFontAttribute: @ 80F79D8
- push {lr}
- lsls r0, 24
- lsrs r2, r0, 24
- lsls r1, 24
- lsrs r1, 24
- movs r0, 0
- cmp r1, 0x7
- bhi _080F7AB6
- lsls r0, r1, 2
- ldr r1, _080F79F4 @ =_080F79F8
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080F79F4: .4byte _080F79F8
- .align 2, 0
-_080F79F8:
- .4byte _080F7A18
- .4byte _080F7A2C
- .4byte _080F7A40
- .4byte _080F7A54
- .4byte _080F7A68
- .4byte _080F7A7C
- .4byte _080F7A90
- .4byte _080F7AA8
-_080F7A18:
- ldr r1, _080F7A28 @ =gUnknown_841F444
- lsls r0, r2, 1
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r0, [r0, 0x4]
- b _080F7AB6
- .align 2, 0
-_080F7A28: .4byte gUnknown_841F444
-_080F7A2C:
- ldr r1, _080F7A3C @ =gUnknown_841F444
- lsls r0, r2, 1
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r0, [r0, 0x5]
- b _080F7AB6
- .align 2, 0
-_080F7A3C: .4byte gUnknown_841F444
-_080F7A40:
- ldr r1, _080F7A50 @ =gUnknown_841F444
- lsls r0, r2, 1
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r0, [r0, 0x6]
- b _080F7AB6
- .align 2, 0
-_080F7A50: .4byte gUnknown_841F444
-_080F7A54:
- ldr r1, _080F7A64 @ =gUnknown_841F444
- lsls r0, r2, 1
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r0, [r0, 0x7]
- b _080F7AB6
- .align 2, 0
-_080F7A64: .4byte gUnknown_841F444
-_080F7A68:
- ldr r0, _080F7A78 @ =gUnknown_841F444
- lsls r1, r2, 1
- adds r1, r2
- lsls r1, 2
- adds r1, r0
- ldrb r0, [r1, 0x8]
- b _080F7A9C
- .align 2, 0
-_080F7A78: .4byte gUnknown_841F444
-_080F7A7C:
- ldr r0, _080F7A8C @ =gUnknown_841F444
- lsls r1, r2, 1
- adds r1, r2
- lsls r1, 2
- adds r1, r0
- ldrb r0, [r1, 0x8]
- b _080F7AB4
- .align 2, 0
-_080F7A8C: .4byte gUnknown_841F444
-_080F7A90:
- ldr r0, _080F7AA4 @ =gUnknown_841F444
- lsls r1, r2, 1
- adds r1, r2
- lsls r1, 2
- adds r1, r0
- ldrb r0, [r1, 0x9]
-_080F7A9C:
- lsls r0, 28
- lsrs r0, 28
- b _080F7AB6
- .align 2, 0
-_080F7AA4: .4byte gUnknown_841F444
-_080F7AA8:
- ldr r0, _080F7ABC @ =gUnknown_841F444
- lsls r1, r2, 1
- adds r1, r2
- lsls r1, 2
- adds r1, r0
- ldrb r0, [r1, 0x9]
-_080F7AB4:
- lsrs r0, 4
-_080F7AB6:
- pop {r1}
- bx r1
- .align 2, 0
-_080F7ABC: .4byte gUnknown_841F444
- thumb_func_end GetFontAttribute
-
- thumb_func_start GetMenuCursorDimensionByFont
-GetMenuCursorDimensionByFont: @ 80F7AC0
- lsls r0, 24
- lsls r1, 24
- lsrs r1, 24
- ldr r2, _080F7AD4 @ =gUnknown_841F4A4
- lsrs r0, 23
- adds r1, r0
- adds r1, r2
- ldrb r0, [r1]
- bx lr
- .align 2, 0
-_080F7AD4: .4byte gUnknown_841F4A4
- thumb_func_end GetMenuCursorDimensionByFont
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/start_menu.s b/asm/start_menu.s
index 4e26dc2db..9f6ef8662 100644
--- a/asm/start_menu.s
+++ b/asm/start_menu.s
@@ -1329,7 +1329,7 @@ sub_806F7A8: @ 806F7A8
lsrs r0, 24
movs r1, 0
bl ClearStdWindowAndFrame
- bl remove_start_menu_window_maybe
+ bl RemoveStartMenuWindow
movs r0, 0
bl sub_8112EDC
bl sub_806FCF4
@@ -2198,7 +2198,7 @@ sub_806FEA0: @ 806FEA0
lsrs r0, 24
movs r1, 0x1
bl ClearStdWindowAndFrame
- bl remove_start_menu_window_maybe
+ bl RemoveStartMenuWindow
bl sub_80696C0
bl ScriptContext2_Disable
pop {r0}
diff --git a/data/data_83FECCC.s b/data/data_83FECCC.s
index 3ec7b231b..1d96617c4 100644
--- a/data/data_83FECCC.s
+++ b/data/data_83FECCC.s
@@ -553,21 +553,8 @@ gUnknown_841F1C8:: @ 841F1C8
gTMCaseMainWindowPalette:: @ 841F408
.incbin "graphics/tm_case/unk_841F408.gbapal"
-gUnknown_841F428:: @ 841F428
- .incbin "baserom.gba", 0x41F428, 0x4
-
-sStandardTextBox_WindowTemplates:: @ 841F42C
- .incbin "baserom.gba", 0x41F42C, 0x10
-
-sYesNo_WindowTemplate:: @ 841F43C
- .incbin "baserom.gba", 0x41F43C, 0x8
-
-gUnknown_841F444:: @ 841F444
- .incbin "baserom.gba", 0x41F444, 0x60
-
-gUnknown_841F4A4:: @ 841F4A4
- .incbin "baserom.gba", 0x41F4A4, 0x10
-
+ .section .rodata.841F4B4
+ .align 2
gUnknown_841F4B4:: @ 841F4B4
.incbin "baserom.gba", 0x41F4B4, 0x1F534
diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h
index b817bc643..caa7cfc3c 100644
--- a/include/new_menu_helpers.h
+++ b/include/new_menu_helpers.h
@@ -19,9 +19,9 @@ void ClearDialogWindowAndFrame(u8, u8);
u8 GetTextSpeedSetting(void);
void sub_80F6E9C(void);
void DrawDialogueFrame(u8 windowId, bool8 transfer);
-void sub_80F7974(const u8 *);
-u8 GetStartMenuWindowId(void);
+void sub_80F7974(const u8 * text);
void sub_80F7998(void);
+void sub_80F79A4(void);
void DrawStdWindowFrame(u8 windowId, bool8 copyNow);
void InitStandardTextBoxWindows(void);
void ResetBg0(void);
@@ -33,7 +33,7 @@ void DecompressAndLoadBgGfxUsingHeap2(u8 bgId, const void *src, u32 size, u16 of
void Menu_LoadStdPal(void);
void Menu_LoadStdPalAt(u16);
void * MallocAndDecompress(const void * src, u32 * size);
-u16 sub_80F796C(void);
+u16 GetStdWindowBaseTileNum(void);
void ClearStdWindowAndFrame(u8 taskId, bool8 copyNow);
void sub_80F6E9C(void);
void sub_80F771C(bool8 copyToVram);
@@ -44,5 +44,9 @@ void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram);
void sub_80F7768(u8 windowId, bool8 copyToVram);
void DisplayYesNoMenuDefaultYes(void);
void DisplayYesNoMenuDefaultNo(void);
+u8 sub_80F78E0(u8 windowId);
+u8 GetStartMenuWindowId(void);
+void RemoveStartMenuWindow(void);
+void SetDefaultFontsPointer(void);
#endif // GUARD_NEW_MENU_HELPERS_H
diff --git a/include/quest_log.h b/include/quest_log.h
index 72b50e49e..4fb4fe0fa 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -27,6 +27,9 @@ u8 sub_8112CAC(void);
bool8 sub_81119D4(void (*func)(void));
void sub_8111F38(u16, u16);
void sub_8111134(void);
+void sub_8112EDC(u8 a0);
+u8 sub_8112EB4(void);
+void sub_8113018(const u8 * text, u8 mode);
void MapNamePopupWindowIdSetDummy(void);
extern u8 gUnknown_203ADFA;
diff --git a/include/text.h b/include/text.h
index 2e6a8c837..07f6b29c2 100644
--- a/include/text.h
+++ b/include/text.h
@@ -230,6 +230,7 @@ u16 Font4Func(struct TextPrinter *textPrinter);
u16 Font5Func(struct TextPrinter *textPrinter);
u16 Font7Func(struct TextPrinter *textPrinter);
u16 Font8Func(struct TextPrinter *textPrinter);
+u16 Font6Func(struct TextPrinter *textPrinter);
void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter);
void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter);
diff --git a/include/text_window.h b/include/text_window.h
index 3d64c0213..c1463a9c7 100644
--- a/include/text_window.h
+++ b/include/text_window.h
@@ -27,5 +27,7 @@ void LoadUserWindowBorderGfx(u8 windowId, u16 tileStart, u8 palette);
void sub_814FDA0(u8 windowId, u16 tileStart, u8 palette);
void DrawTextBorderOuter(u8 windowId, u16 tileStart, u8 palette);
void TextWindow_LoadTilesStdFrame1(u8 windowId, u16 destOffset);
+void sub_814FE6C(u8 windowId, u16 destOffset, u8 palIdx);
+void sub_814FEEC(u8 windowId, u16 destOffset, u8 palIdx);
#endif // GUARD_TEXT_WINDOW_H
diff --git a/ld_script.txt b/ld_script.txt
index 1beea3560..224f518f3 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -420,6 +420,8 @@ SECTIONS {
data/data_83FECCC.o(.rodata);
data/strings.o(.rodata);
data/data_83FECCC.o(.rodata.841EE44);
+ src/new_menu_helpers.o(.rodata);
+ data/data_83FECCC.o(.rodata.841F4B4);
src/bag.o(.rodata);
src/trainer_pokemon_sprites.o(.rodata);
src/vs_seeker.o(.rodata);
diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c
index 5f7451eb6..9ee172f0f 100644
--- a/src/new_menu_helpers.c
+++ b/src/new_menu_helpers.c
@@ -24,10 +24,139 @@
static EWRAM_DATA bool8 gUnknown_203AB58[4] = {FALSE}; // knizz: bgmaps_that_need_syncing
static EWRAM_DATA u16 gUnknown_203AB5C = {0};
static EWRAM_DATA void *gUnknown_203AB60[0x20] = {NULL};
+static EWRAM_DATA u8 sStartMenuWindowId = {0};
-extern const struct WindowTemplate sStandardTextBox_WindowTemplates[];
-extern const struct WindowTemplate sYesNo_WindowTemplate;
-EWRAM_DATA u8 sStartMenuWindowId;
+static const u8 gUnknown_841F428[] = { 8, 4, 1, 0, };
+
+static const struct WindowTemplate sStandardTextBox_WindowTemplates[] =
+{
+ {
+ .bg = 0,
+ .tilemapLeft = 0x2,
+ .tilemapTop = 0xF,
+ .width = 0x1A,
+ .height = 0x4,
+ .paletteNum = DLG_WINDOW_PALETTE_NUM,
+ .baseBlock = 0x198,
+ },
+ DUMMY_WIN_TEMPLATE,
+};
+
+static const struct WindowTemplate sYesNo_WindowTemplate =
+{
+ .bg = 0,
+ .tilemapLeft = 0x15,
+ .tilemapTop = 0x9,
+ .width = 0x6,
+ .height = 0x4,
+ .paletteNum = DLG_WINDOW_PALETTE_NUM,
+ .baseBlock = 0x125,
+};
+
+static const struct FontInfo gFontInfos[] =
+{
+ {
+ .fontFunction = Font0Func,
+ .maxLetterWidth = 0x8,
+ .maxLetterHeight = 0xD,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font1Func,
+ .maxLetterWidth = 0x8,
+ .maxLetterHeight = 0xE,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font2Func,
+ .maxLetterWidth = 0xA,
+ .maxLetterHeight = 0xE,
+ .letterSpacing = 0x1,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font3Func,
+ .maxLetterWidth = 0xA,
+ .maxLetterHeight = 0xE,
+ .letterSpacing = 0x1,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font4Func,
+ .maxLetterWidth = 0xA,
+ .maxLetterHeight = 0xE,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font5Func,
+ .maxLetterWidth = 0xA,
+ .maxLetterHeight = 0xE,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = Font6Func,
+ .maxLetterWidth = 0x8,
+ .maxLetterHeight = 0x10,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x2,
+ .unk = 0x0,
+ .fgColor = 0x2,
+ .bgColor = 0x1,
+ .shadowColor = 0x3,
+ },
+ {
+ .fontFunction = NULL,
+ .maxLetterWidth = 0x8,
+ .maxLetterHeight = 0x8,
+ .letterSpacing = 0x0,
+ .lineSpacing = 0x0,
+ .unk = 0x0,
+ .fgColor = 0x1,
+ .bgColor = 0x2,
+ .shadowColor = 0xF,
+ },
+};
+
+
+static const u8 gMenuCursorDimensions[][2] =
+{
+ { 0x8, 0xD, },
+ { 0x8, 0xE, },
+ { 0x8, 0xE, },
+ { 0x8, 0xE, },
+ { 0x8, 0xE, },
+ { 0x8, 0xE, },
+ { 0x8, 0x10, },
+ { 0x0, 0x0, },
+};
static u16 CopyDecompressedTileDataToVram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
static void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum);
@@ -528,3 +657,109 @@ void DisplayYesNoMenuDefaultNo(void)
CreateYesNoMenu(&sYesNo_WindowTemplate, 2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 1);
}
+u8 GetTextSpeedSetting(void)
+{
+ u32 speed;
+ if (gSaveBlock2Ptr->optionsTextSpeed > OPTIONS_TEXT_SPEED_FAST)
+ gSaveBlock2Ptr->optionsTextSpeed = OPTIONS_TEXT_SPEED_MID;
+ return gUnknown_841F428[gSaveBlock2Ptr->optionsTextSpeed];
+}
+
+u8 sub_80F78E0(u8 height)
+{
+ if (sStartMenuWindowId == 0xFF)
+ {
+ struct WindowTemplate wTemp1, wTemp2;
+ SetWindowTemplateFields(&wTemp1, 0, 0x16, 1, 7, height * 2 - 1, DLG_WINDOW_PALETTE_NUM, 0x13D);
+ wTemp2 = wTemp1; // This is required for matching
+ sStartMenuWindowId = AddWindow(&wTemp2);
+ PutWindowTilemap(sStartMenuWindowId);
+ }
+ return sStartMenuWindowId;
+}
+
+u8 GetStartMenuWindowId(void)
+{
+ return sStartMenuWindowId;
+}
+
+void RemoveStartMenuWindow(void)
+{
+ if (sStartMenuWindowId != 0xFF)
+ {
+ RemoveWindow(sStartMenuWindowId);
+ sStartMenuWindowId = 0xFF;
+ }
+}
+
+static u16 GetDlgWindowBaseTileNum(void)
+{
+ return DLG_WINDOW_BASE_TILE_NUM;
+}
+
+u16 GetStdWindowBaseTileNum(void)
+{
+ return STD_WINDOW_BASE_TILE_NUM;
+}
+
+void sub_80F7974(const u8 * text)
+{
+ sub_814FE6C(sub_8112EB4(), DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
+ sub_8113018(text, 2);
+}
+
+void sub_80F7998(void)
+{
+ sub_8112EDC(2);
+}
+
+void sub_80F79A4(void)
+{
+ Menu_LoadStdPal();
+ sub_814FEEC(0, DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
+ TextWindow_SetUserSelectedFrame(0, STD_WINDOW_BASE_TILE_NUM, 0x10 * STD_WINDOW_PALETTE_NUM);
+}
+
+void SetDefaultFontsPointer(void)
+{
+ SetFontsPointer(&gFontInfos[0]);
+}
+
+u8 GetFontAttribute(u8 fontId, u8 attributeId)
+{
+ int result = 0;
+
+ switch (attributeId)
+ {
+ case FONTATTR_MAX_LETTER_WIDTH:
+ result = gFontInfos[fontId].maxLetterWidth;
+ break;
+ case FONTATTR_MAX_LETTER_HEIGHT:
+ result = gFontInfos[fontId].maxLetterHeight;
+ break;
+ case FONTATTR_LETTER_SPACING:
+ result = gFontInfos[fontId].letterSpacing;
+ break;
+ case FONTATTR_LINE_SPACING:
+ result = gFontInfos[fontId].lineSpacing;
+ break;
+ case FONTATTR_UNKNOWN:
+ result = gFontInfos[fontId].unk;
+ break;
+ case FONTATTR_COLOR_FOREGROUND:
+ result = gFontInfos[fontId].fgColor;
+ break;
+ case FONTATTR_COLOR_BACKGROUND:
+ result = gFontInfos[fontId].bgColor;
+ break;
+ case FONTATTR_COLOR_SHADOW:
+ result = gFontInfos[fontId].shadowColor;
+ break;
+ }
+ return result;
+}
+
+u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
+{
+ return gMenuCursorDimensions[fontId][whichDimension];
+}
diff --git a/src/oak_speech.c b/src/oak_speech.c
index 96bb4cdd6..d444899f6 100644
--- a/src/oak_speech.c
+++ b/src/oak_speech.c
@@ -1054,7 +1054,7 @@ static void Task_OakSpeech19(u8 taskId)
{
gTasks[taskId].data[13] = AddWindow(&sNewGameAdventureIntroWindowTemplates[1]);
PutWindowTilemap(gTasks[taskId].data[13]);
- SetWindowBorderStyle(gTasks[taskId].data[13], 1, sub_80F796C(), 14);
+ SetWindowBorderStyle(gTasks[taskId].data[13], 1, GetStdWindowBaseTileNum(), 14);
FillWindowPixelBuffer(gTasks[taskId].data[13], 0x11);
sOakSpeechResources->unk_001C[0] = 1;
sOakSpeechResources->unk_001C[1] = 2;
@@ -1246,7 +1246,7 @@ static void Task_OakSpeech26(u8 taskId)
data[3]--;
else
{
- CreateYesNoMenu(&sNewGameAdventureIntroWindowTemplates[2], 2, 0, 2, sub_80F796C(), 14, 0);
+ CreateYesNoMenu(&sNewGameAdventureIntroWindowTemplates[2], 2, 0, 2, GetStdWindowBaseTileNum(), 14, 0);
gTasks[taskId].func = Task_OakSpeech27;
}
}
@@ -1850,7 +1850,7 @@ static void PrintNameChoiceOptions(u8 taskId, u8 state)
data[13] = AddWindow(&sNewGameAdventureIntroWindowTemplates[3]);
PutWindowTilemap(data[13]);
- SetWindowBorderStyle(data[13], 1, sub_80F796C(), 14);
+ SetWindowBorderStyle(data[13], 1, GetStdWindowBaseTileNum(), 14);
FillWindowPixelBuffer(gTasks[taskId].data[13], 0x11);
AddTextPrinterParameterized(data[13], 2, gOtherText_NewName, 8, 1, 0, NULL);
if (state == 0)
diff --git a/src/quest_log.c b/src/quest_log.c
index c1ce93ce3..dede9d6cd 100644
--- a/src/quest_log.c
+++ b/src/quest_log.c
@@ -2471,12 +2471,12 @@ void sub_8112FE4(const u8 * a0)
AddTextPrinterParameterized4(gUnknown_203B020, 0x02, 2, 5, 1, 1, &gUnknown_8456930, -1, a0);
}
-void sub_8113018(const u8 * a0, u8 a1)
+void sub_8113018(const u8 * text, u8 mode)
{
sub_8112FD0();
- sub_8112FE4(a0);
- if (a1)
- CopyWindowToVram(gUnknown_203B020, a1);
+ sub_8112FE4(text);
+ if (mode)
+ CopyWindowToVram(gUnknown_203B020, mode);
}
void sub_8113044(void)
diff --git a/src/text.c b/src/text.c
index f84420352..c0fe6a444 100644
--- a/src/text.c
+++ b/src/text.c
@@ -16,7 +16,6 @@ extern void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 wid
extern void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
extern u8 GetKeypadIconWidth(u8 keypadIconId);
extern void CopyWindowToVram(u8 windowId, u8 mode);
-extern u16 Font6Func(struct TextPrinter *textPrinter);
extern s32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
extern void PlaySE(u16 songNum);
extern u8* UnkTextUtil_GetPtrI(u8 a1);
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 8b50769cc..80a75be9a 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -1210,9 +1210,6 @@ gUnknown_203AB54: @ 203AB54
.include "src/new_menu_helpers.o"
.align 2
-sStartMenuWindowId: @ 203ABE0
- .space 0x4
-
gUnknown_203ABE4: @ 203ABE4
.space 0x4