matching rom

This commit is contained in:
Evan
2019-11-18 21:03:51 -07:00
parent 186e17b7eb
commit 6fb437f9eb
7 changed files with 137 additions and 93 deletions
+17 -16
View File
@@ -1,43 +1,44 @@
#include "constants/maps.h" #include "constants/maps.h"
#include "constants/species.h" #include "constants/species.h"
.include "asm/macros.inc" .include "asm/macros.inc"
.include "constants/constants.inc" .include "constants/constants.inc"
.section .rodata .section .rodata
.align 2 .align 2
gUnknown_83CC2B8:: @ 83CC2B8 gUnknown_83CC2B8:: @ 83CC2B8
.incbin "baserom.gba", 0x3CC2B8, 0x20 .incbin "baserom.gba", 0x3CC2B8, 0x20
gUnknown_83CC2D8:: @ 83CC2D8 gUnknown_83CC2D8:: @ 83CC2D8
.incbin "baserom.gba", 0x3CC2D8, 0xC .incbin "baserom.gba", 0x3CC2D8, 0xC
gUnknown_83CC2E4:: @ 83CC2E4 gUnknown_83CC2E4:: @ 83CC2E4
.incbin "baserom.gba", 0x3CC2E4, 0x20 .incbin "baserom.gba", 0x3CC2E4, 0x20
gUnknown_83CC304:: @ 83CC304 gUnknown_83CC304:: @ 83CC304
.incbin "baserom.gba", 0x3CC304, 0x10 .incbin "baserom.gba", 0x3CC304, 0x10
gUnknown_83CC314:: @ 83CC314 gUnknown_83CC314:: @ 83CC314
.incbin "baserom.gba", 0x3CC314, 0x1C .incbin "baserom.gba", 0x3CC314, 0x1C
gUnknown_83CC330:: @ 83CC330 gUnknown_83CC330:: @ 83CC330
.incbin "baserom.gba", 0x3CC330, 0xC .incbin "baserom.gba", 0x3CC330, 0xC
gUnknown_83CC33C:: @ 83CC33C gUnknown_83CC33C:: @ 83CC33C
.incbin "baserom.gba", 0x3CC33C, 0x8 .incbin "baserom.gba", 0x3CC33C, 0x8
gUnknown_83CC344:: @ 83CC344 gUnknown_83CC344:: @ 83CC344
.incbin "baserom.gba", 0x3CC344, 0x8 .incbin "baserom.gba", 0x3CC344, 0x8
gUnknown_83CC34C:: @ 83CC34C gUnknown_83CC34C:: @ 83CC34C
.incbin "baserom.gba", 0x3CC34C, 0x8 .incbin "baserom.gba", 0x3CC34C, 0x8
gUnknown_83CC354:: @ 83CC354 gUnknown_83CC354:: @ 83CC354
.incbin "baserom.gba", 0x3CC354, 0xC .incbin "baserom.gba", 0x3CC354, 0xC
gUnknown_83CC360:: @ 83CC360 gUnknown_83CC360:: @ 83CC360
.incbin "baserom.gba", 0x3CC360, 0x3 .incbin "baserom.gba", 0x3CC360, 0x3
gUnknown_83CC363:: @ 83CC363 gUnknown_83CC363:: @ 83CC363
.incbin "baserom.gba", 0x3CC363, 0x3 .incbin "baserom.gba", 0x3CC363, 0x3
+15 -15
View File
@@ -2904,7 +2904,7 @@ gUnknown_8419D89:: @ 8419D89
.string "Waiting for the other TRAINER to\n" .string "Waiting for the other TRAINER to\n"
.string "finish reading your TRAINER CARD.$" .string "finish reading your TRAINER CARD.$"
gUnknown_8419DCC:: @ 8419DCC gText_MenuOptionOption:: @ 8419DCC
.string "OPTION$" .string "OPTION$"
gText_TextSpeed:: @ 0x8419DD3 gText_TextSpeed:: @ 0x8419DD3
@@ -2928,49 +2928,49 @@ gText_Frame:: @ 0x8419E0A
gText_OptionMenuCancel:: @ 0x8419E10 gText_OptionMenuCancel:: @ 0x8419E10
.string "CANCEL$" .string "CANCEL$"
gUnknown_8419E17:: @ 0x8419E17 gText_TextSpeedSlow:: @ 0x8419E17
.string "SLOW$" .string "SLOW$"
gUnknown_8419E1C:: @ 0x8419E1C gText_TextSpeedMid:: @ 0x8419E1C
.string "MID$" .string "MID$"
gUnknown_8419E20:: @ 0x8419E20 gText_TextSpeedFast:: @ 0x8419E20
.string "FAST$" .string "FAST$"
gUnknown_8419E25:: @ 0x8419E25 gText_BattleSceneOn:: @ 0x8419E25
.string "ON$" .string "ON$"
gUnknown_8419E28:: @ 0x8419E28 gText_BattleSceneOff:: @ 0x8419E28
.string "OFF$" .string "OFF$"
gUnknown_8419E2C:: @ 0x8419E2C gText_BattleStyleShift:: @ 0x8419E2C
.string "SHIFT$" .string "SHIFT$"
gUnknown_8419E32:: @ 0x8419E32 gText_BattleStyleSet:: @ 0x8419E32
.string "SET$" .string "SET$"
gUnknown_8419E36:: @ 0x8419E36 gText_SoundMono:: @ 0x8419E36
.string "MONO$" .string "MONO$"
gUnknown_8419E3B:: @ 0x8419E3B gText_SoundStereo:: @ 0x8419E3B
.string "STEREO$" .string "STEREO$"
gUnknown_8419E42:: @ 0x8419E42 gUnknown_8419E42:: @ 0x8419E42
.string "$" .string "$"
gUnknown_8419E46:: @ 0x8419E46 gText_ButtonTypeNormal:: @ 0x8419E46
.string "HELP$" .string "HELP$"
gUnknown_8419E4B:: @ 0x8419E4B gText_ButtonTypeLR:: @ 0x8419E4B
.string "LA$" .string "LA$"
gUnknown_8419E4F:: @ 0x8419E4F gText_ButtonTypeLEqualsA:: @ 0x8419E4F
.string "LR$" .string "LR$"
gUnknown_8419E52:: @ 8419E52 gText_FrameType:: @ 8419E52
.string "TYPE$" .string "TYPE$"
gUnknown_8419E57:: @ 8419E57 gText_PickSwitchCancel:: @ 8419E57
.string "{DPAD_UPDOWN}PICK {DPAD_LEFTRIGHT}SWITCH {A_BUTTON}{B_BUTTON}CANCEL$" .string "{DPAD_UPDOWN}PICK {DPAD_LEFTRIGHT}SWITCH {A_BUTTON}{B_BUTTON}CANCEL$"
gUnknown_8419E72:: @ 0x8419E72 gUnknown_8419E72:: @ 0x8419E72
+19
View File
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
255 255 255
255 255 255
99 99 99
214 214 206
230 8 8
255 189 115
33 156 8
148 247 148
49 82 206
165 197 247
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
+1 -1
View File
@@ -12,7 +12,7 @@ struct YesNoFuncTable
}; };
bool16 RunTextPrinters_CheckActive(u8 textPrinterId); bool16 RunTextPrinters_CheckActive(u8 textPrinterId);
bool32 sub_80BF72C(void); bool8 sub_80BF72C(void);
bool8 sub_80BF748(void); bool8 sub_80BF748(void);
bool8 MenuHelpers_LinkSomething(void); bool8 MenuHelpers_LinkSomething(void);
void SetVBlankHBlankCallbacksToNull(void); void SetVBlankHBlankCallbacksToNull(void);
+14
View File
@@ -749,6 +749,20 @@ extern const u8 gText_Sound[];
extern const u8 gText_ButtonMode[]; extern const u8 gText_ButtonMode[];
extern const u8 gText_Frame[]; extern const u8 gText_Frame[];
extern const u8 gText_OptionMenuCancel[]; extern const u8 gText_OptionMenuCancel[];
extern const u8 gText_TextSpeedSlow[];
extern const u8 gText_TextSpeedMid[];
extern const u8 gText_TextSpeedFast[];
extern const u8 gText_BattleSceneOn[];
extern const u8 gText_BattleSceneOff[];
extern const u8 gText_BattleStyleShift[];
extern const u8 gText_BattleStyleSet[];
extern const u8 gText_SoundMono[];
extern const u8 gText_SoundStereo[];
extern const u8 gText_ButtonTypeNormal[];
extern const u8 gText_ButtonTypeLR[];
extern const u8 gText_ButtonTypeLEqualsA[];
extern const u8 gText_MenuOptionOption[];
extern const u8 gText_FrameType[];
extern const u8 gText_PickSwitchCancel[]; extern const u8 gText_PickSwitchCancel[];
+1 -1
View File
@@ -125,7 +125,7 @@ bool8 MenuHelpers_LinkSomething(void)
return FALSE; return FALSE;
} }
bool32 sub_80BF72C(void) bool8 sub_80BF72C(void)
{ {
if (!MenuHelpers_LinkSomething()) if (!MenuHelpers_LinkSomething())
return FALSE; return FALSE;
+70 -60
View File
@@ -36,11 +36,10 @@ enum
enum enum
{ {
WIN_TEXT_OPTION, WIN_TEXT_OPTION,
WIN_OPTIONS WIN_OPTIONS,
}; };
/* /*
static const struct WindowTemplate gUnknown_83CC2B8[] = //sOptionMenuWinTemplates static const struct WindowTemplate gUnknown_83CC2B8[] = //3CC2B8 -> sOptionMenuWinTemplates
{ {
{ {
.bg = 1, .bg = 1,
@@ -49,20 +48,29 @@ static const struct WindowTemplate gUnknown_83CC2B8[] = //sOptionMenuWinTempl
.width = 26, .width = 26,
.height = 2, .height = 2,
.paletteNum = 1, .paletteNum = 1,
.baseBlock = 2 .baseBlock = 2,
}, },
{ {
.bg = 0, .bg = 0,
.tilemapLeft = 2, .tilemapLeft = 2,
.tilemapTop =7, .tilemapTop = 7,
.width = 26, .width = 26,
.height = 12, .height = 12,
.paletteNum = 1, .paletteNum = 1,
.baseBlock = 0x36 .baseBlock = 0x36,
}, },
DUMMY_WIN_TEMPLATE {
.bg = 2,
.tilemapLeft = 0,
.tilemapTop = 0,
.width = 30,
.height = 2,
.paletteNum = 0xF,
.baseBlock = 0x16e,
},
DUMMY_WIN_TEMPLATE,
}; };
static const struct BgTemplate gUnknown_83CC2D8[] = //sOptionMenuBgTemplates static const struct BgTemplate gUnknown_83CC2D8[] = //3CC2D8 -> sOptionMenuBgTemplates
{ {
{ {
.bg = 1, .bg = 1,
@@ -81,12 +89,20 @@ static const struct BgTemplate gUnknown_83CC2D8[] = //sOptionMenuBgTemplates
.paletteMode = 0, .paletteMode = 0,
.priority = 1, .priority = 1,
.baseTile = 0 .baseTile = 0
} },
{
.bg = 2,
.charBaseIndex = 1,
.mapBaseIndex = 29,
.screenSize = 0,
.paletteMode = 0,
.priority = 2,
.baseTile = 0,
},
}; };
static const u16 gUnknown_83CC2E4[] = INCBIN_U16("graphics/misc/unk_83cc2e4.gbapal"); //3CC2E4
static const u16 gUnknown_83CC304[MENUITEM_COUNT] = {3, 2, 2, 2, 3, 10, 0}; //3CC304 -> sOptionsMenuItemCounts
static const u16 gUnknown_83CC304[MENUITEM_COUNT] = {3, 2, 2, 2, 3, 10, 0}; //sOptionsMenuItemCounts static const u8* gUnknown_83CC314[MENUITEM_COUNT] = //3CC314 -> sOptionMenuItemsNames
static const u8* gUnknown_83CC314[MENUITEM_COUNT] = //sOptionMenuItemsNames
{ {
[MENUITEM_TEXTSPEED] = gText_TextSpeed, [MENUITEM_TEXTSPEED] = gText_TextSpeed,
[MENUITEM_BATTLESCENE] = gText_BattleScene, [MENUITEM_BATTLESCENE] = gText_BattleScene,
@@ -96,8 +112,28 @@ static const u8* gUnknown_83CC314[MENUITEM_COUNT] = //sOptionMenuItemsNames
[MENUITEM_FRAMETYPE] = gText_Frame, [MENUITEM_FRAMETYPE] = gText_Frame,
[MENUITEM_CANCEL] = gText_OptionMenuCancel, [MENUITEM_CANCEL] = gText_OptionMenuCancel,
}; };
static const u8* gUnknown_83CC330[] = {gText_TextSpeedSlow, gText_TextSpeedMid, gText_TextSpeedFast}; //3CC330
static const u8* gUnknown_83CC33C[] = {gText_BattleSceneOn, gText_BattleSceneOff}; //3CC33C
static const u8* gUnknown_83CC344[] = {gText_BattleStyleShift, gText_BattleStyleSet}; //3CC344
static const u8* gUnknown_83CC34C[] = {gText_SoundMono, gText_SoundStereo}; //3CC34C
static const u8* gUnknown_83CC354[] = {gText_ButtonTypeNormal, gText_ButtonTypeLR, gText_ButtonTypeLEqualsA}; //3CC354
static const u8 gUnknown_83CC360[] = {0xF, 0x1, 0x2}; //3CC360
static const u8 gUnknown_83CC363[] = {0, 5, 4, 0, 0}; //3CC363
*/ */
extern const struct WindowTemplate gUnknown_83CC2B8[3];
extern const struct BgTemplate gUnknown_83CC2D8[3];
extern const u16 gUnknown_83CC2E4[0x20];
extern const u16 gUnknown_83CC304[MENUITEM_COUNT];
extern const u8* gUnknown_83CC314[MENUITEM_COUNT];
extern const u8* gUnknown_83CC330[12];
extern const u8* gUnknown_83CC33C[8];
extern const u8* gUnknown_83CC344[8];
extern const u8* gUnknown_83CC34C[8];
extern const u8* gUnknown_83CC354[12];
extern const u8 gUnknown_83CC360[3];
extern const u8 gUnknown_83CC363[3];
//This file's functions //This file's functions
static void sub_808835C(void); static void sub_808835C(void);
static void sub_8088374(void); static void sub_8088374(void);
@@ -118,25 +154,9 @@ static void sub_8088C0C(void);
static void sub_8088D8C(void); static void sub_8088D8C(void);
static void sub_8088DE0(u16 selection); static void sub_8088DE0(u16 selection);
extern const struct WindowTemplate gUnknown_83CC2B8[3];
extern const struct BgTemplate gUnknown_83CC2D8[2];
extern const u16 gUnknown_83CC2E4[0x20];
extern const u16 gUnknown_83CC304[MENUITEM_COUNT]; //sOptionsMenuItemCounts
extern const u8* gUnknown_83CC314[MENUITEM_COUNT];
extern const u8 gUnknown_83CC330[0xC];
extern const u8 gUnknown_83CC33C[0x8];
extern const u8 gUnknown_83CC344[0x8];
extern const u8 gUnknown_83CC34C[0x8];
extern const u8 gUnknown_83CC354[0xC];
extern const u8 gUnknown_83CC360[0x3];
extern const u8 gUnknown_83CC363[0x3];
extern const u8 gUnknown_8419DCC[];
extern const u8 gUnknown_8419E52[];
extern const u8 gUnknown_8419E57[];
struct OptionsMenu struct OptionsMenu
{ {
/*0x00*/ u16 option[7]; //0,2,4,6,8,a,c /*0x00*/ u16 option[MENUITEM_COUNT]; //0,2,4,6,8,a,c
/*0x0E*/ u16 unkE; /*0x0E*/ u16 unkE;
/*0x10*/ u8 state3; /*0x10*/ u8 state3;
/*0x11*/ u8 state; /*0x11*/ u8 state;
@@ -147,6 +167,7 @@ struct OptionsMenu
EWRAM_DATA struct OptionsMenu *sOptionsMenu = {0}; EWRAM_DATA struct OptionsMenu *sOptionsMenu = {0};
//CB2_InitOptionsMenu //CB2_InitOptionsMenu
static void sub_808835C(void) static void sub_808835C(void)
{ {
@@ -272,7 +293,7 @@ static void sub_8088530(void)
DmaClear16(3, (void *)PLTT, PLTT_SIZE); DmaClear16(3, (void *)PLTT, PLTT_SIZE);
SetGpuReg(REG_OFFSET_DISPCNT, 0); SetGpuReg(REG_OFFSET_DISPCNT, 0);
ResetBgsAndClearDma3BusyFlags(0); ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, gUnknown_83CC2D8, 3); //3 -> ARRAY_COUNT(gUnknown_83CC2D8) InitBgsFromTemplates(0, gUnknown_83CC2D8, ARRAY_COUNT(gUnknown_83CC2D8));
ChangeBgX(0, 0, 0); ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0); ChangeBgY(0, 0, 0);
ChangeBgX(1, 0, 0); ChangeBgX(1, 0, 0);
@@ -297,9 +318,9 @@ static void sub_8088530(void)
static void sub_8088680(void) static void sub_8088680(void)
{ {
s32 x; s32 x;
x = 0xE4 - GetStringWidth(0, gUnknown_8419E57, 0); x = 0xE4 - GetStringWidth(0, gText_PickSwitchCancel, 0);
FillWindowPixelBuffer(2, 0xFF); FillWindowPixelBuffer(2, 0xFF);
AddTextPrinterParameterized3(2, 0, x, 0, gUnknown_83CC360, 0, gUnknown_8419E57); AddTextPrinterParameterized3(2, 0, x, 0, gUnknown_83CC360, 0, gText_PickSwitchCancel);
PutWindowTilemap(2); PutWindowTilemap(2);
CopyWindowToVram(2, 3); CopyWindowToVram(2, 3);
} }
@@ -357,7 +378,7 @@ static void sub_8088780(u8 taskId)
sOptionsMenu->state3++; sOptionsMenu->state3++;
break; break;
case 2: case 2:
if (sub_80BF72C() == TRUE) if ((bool32) sub_80BF72C() == TRUE) //cast to bool32 to remove the lsl/lsr 0x18 after func call
return; return;
switch (sub_80888C0()) switch (sub_80888C0())
{ {
@@ -547,10 +568,8 @@ static void sub_8088780(u8 taskId)
"\tpop {r0}\n" "\tpop {r0}\n"
"\tbx r0\n"); "\tbx r0\n");
} }
#endif #endif
//OptionsMenu_ProcessInput //OptionsMenu_ProcessInput
static u8 sub_80888C0(void) static u8 sub_80888C0(void)
{ {
@@ -616,7 +635,6 @@ static void sub_80889A8(u8 selection)
u8* str; u8* str;
u8* v8; u8* v8;
u8 x, y; u8 x, y;
u8** col;
memcpy(&dst, gUnknown_83CC363, 3); memcpy(&dst, gUnknown_83CC363, 3);
y = ((GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) - 1) * selection) + 2; y = ((GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) - 1) * selection) + 2;
@@ -641,7 +659,7 @@ static void sub_80889A8(u8 selection)
AddTextPrinterParameterized3(1, 2, x, y, dst, -1, gUnknown_83CC354); AddTextPrinterParameterized3(1, 2, x, y, dst, -1, gUnknown_83CC354);
break; break;
case MENUITEM_FRAMETYPE: case MENUITEM_FRAMETYPE:
StringCopy(str, gUnknown_8419E52); StringCopy(str, gText_FrameType);
ConvertIntToDecimalStringN(v8, sOptionsMenu->option[2*selection] + 1, 1, 2); ConvertIntToDecimalStringN(v8, sOptionsMenu->option[2*selection] + 1, 1, 2);
StringAppendN(str, v8, 3); StringAppendN(str, v8, 3);
AddTextPrinterParameterized3(1, 2, x, y, dst, -1, str); AddTextPrinterParameterized3(1, 2, x, y, dst, -1, str);
@@ -773,7 +791,7 @@ static void sub_80889A8(u8 selection)
"_08088A94: .4byte gUnknown_83CC354\n" "_08088A94: .4byte gUnknown_83CC354\n"
"_08088A98: .4byte sOptionsMenu\n" "_08088A98: .4byte sOptionsMenu\n"
"_08088A9C:\n" "_08088A9C:\n"
"\tldr r1, _08088AF8 @ =gUnknown_8419E52\n" "\tldr r1, _08088AF8 @ =gText_FrameType\n"
"\tadd r0, sp, 0xC\n" "\tadd r0, sp, 0xC\n"
"\tbl StringCopy\n" "\tbl StringCopy\n"
"\tadd r4, sp, 0x20\n" "\tadd r4, sp, 0x20\n"
@@ -815,7 +833,7 @@ static void sub_80889A8(u8 selection)
"\tpop {r0}\n" "\tpop {r0}\n"
"\tbx r0\n" "\tbx r0\n"
"\t.align 2, 0\n" "\t.align 2, 0\n"
"_08088AF8: .4byte gUnknown_8419E52\n" "_08088AF8: .4byte gText_FrameType\n"
"_08088AFC: .4byte sOptionsMenu\n"); "_08088AFC: .4byte sOptionsMenu\n");
} }
#endif #endif
@@ -846,14 +864,13 @@ static void sub_8088B00(u8 taskId)
static void sub_8088BD0(void) static void sub_8088BD0(void)
{ {
FillWindowPixelBuffer(0, 0x11); FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized(WIN_TEXT_OPTION, 2, gUnknown_8419DCC, 8, 1, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(WIN_TEXT_OPTION, 2, gText_MenuOptionOption, 8, 1, TEXT_SPEED_FF, NULL);
PutWindowTilemap(0); PutWindowTilemap(0);
CopyWindowToVram(0, 3); CopyWindowToVram(0, 3);
} }
//sub_8088C0C //sub_8088C0C
//double check
static void sub_8088C0C(void) static void sub_8088C0C(void)
{ {
u8 h; u8 h;
@@ -863,7 +880,7 @@ static void sub_8088C0C(void)
FillBgTilemapBufferRect(1, 0x1B4, 2, 2, 0x1B, 1, 3); FillBgTilemapBufferRect(1, 0x1B4, 2, 2, 0x1B, 1, 3);
FillBgTilemapBufferRect(1, 0x1B5, 0x1C, 2, 1, 1, 3); FillBgTilemapBufferRect(1, 0x1B5, 0x1C, 2, 1, 1, 3);
FillBgTilemapBufferRect(1, 0x1B6, 1, 3, 1, h, 3); FillBgTilemapBufferRect(1, 0x1B6, 1, 3, 1, h, 3);
FillBgTilemapBufferRect(1, 0x1B8, 1, 0x1C, 1, h, 3); FillBgTilemapBufferRect(1, 0x1B8, 0x1C, 3, 1, h, 3);
FillBgTilemapBufferRect(1, 0x1B9, 1, 5, 1, 1, 3); FillBgTilemapBufferRect(1, 0x1B9, 1, 5, 1, 1, 3);
FillBgTilemapBufferRect(1, 0x1BA, 2, 5, 0x1B, 1, 3); FillBgTilemapBufferRect(1, 0x1BA, 2, 5, 0x1B, 1, 3);
FillBgTilemapBufferRect(1, 0x1BB, 0x1C, 5, 1, 1, 3); FillBgTilemapBufferRect(1, 0x1BB, 0x1C, 5, 1, 1, 3);
@@ -878,24 +895,15 @@ static void sub_8088C0C(void)
CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(1);
} }
//sub_8088D8C //sub_8088D8C
static void sub_8088D8C(void) static void sub_8088D8C(void)
{ {
int i; u8 i;
u8 y;
FillWindowPixelBuffer(1, 0x11); FillWindowPixelBuffer(1, 0x11);
for (i = 0; i < MENUITEM_COUNT; i++) for (i = 0; i < MENUITEM_COUNT; i++)
{ {
//AddTextPrinterParameterized(1, 2, gUnknown_83CC314[i], 8, (u8) ((i*(GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT))) + 2) - i, 0xFF, 0); AddTextPrinterParameterized(1, 2, gUnknown_83CC314[i], 8, (u8) ((i*(GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT))) + 2) - i, 0xFF, 0);
//gets registers right, but an lsl/lsr 0x18 after GetFontAttribute that shouldn't be there
y = i*(GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT));
y += 2;
y -= i;
AddTextPrinterParameterized(1, 2, gUnknown_83CC314[i], 8, y, 0xFF, 0);
} }
} }
@@ -903,9 +911,11 @@ static void sub_8088D8C(void)
//sub_8088DE0 //sub_8088DE0
static void sub_8088DE0(u16 selection) static void sub_8088DE0(u16 selection)
{ {
u8 attr; u16 v1, v2;
attr = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT);
SetGpuReg(0x44, ((selection * (attr - 1) + 58) << 8) | (selection * (attr - 1) + 58 + attr)); v1 = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT);
SetGpuReg(0x40, 4320); v2 = selection * (v1 - 1) + 0x3A;
SetGpuReg(0x44, (v2 << 8) | (v2 + v1));
SetGpuReg(0x40, 0x10E0);
} }