Menu struct fixed for good this time

This commit is contained in:
theo3
2020-07-22 23:35:26 -07:00
parent e0cfbb15a5
commit f4320b6fcd
5 changed files with 53 additions and 72 deletions
+3 -3
View File
@@ -117,7 +117,7 @@ void sub_080AD474(void)
gMenu.menuType = 1;
gMenu.overlayType = 0;
gMenu.transitionTimer = 0x1e;
gMenu.field_0x3 = 7;
gMenu.field_0x4 = 7;
EraseAllEntities();
sub_080ADD30(sub_0801CFA8(0));
gUnk_02024490 = 1;
@@ -191,8 +191,8 @@ void sub_080AD474(void)
sub_080ADA14(0x1ff,0);
}
}
if (gMenu.field_0x3 != ((struct_02000000*)0x2000000)->gameLanguage) {
gMenu.field_0x3 = ((struct_02000000*)0x2000000)->gameLanguage;
if (gMenu.field_0x4 != ((struct_02000000*)0x2000000)->gameLanguage) {
gMenu.field_0x4 = ((struct_02000000*)0x2000000)->gameLanguage;
sub_0801D7EC(3);
}
sub_080AD89C();
+40
View File
@@ -2,6 +2,7 @@
#include "functions.h"
#include "menu.h"
#include "structures.h"
#include "screen.h"
extern void (*const gUnk_081280C4[])();
@@ -18,4 +19,43 @@ void DrawKinstoneMenu(void)
sub_080AD9B0();
sub_080AD918();
gUnk_030010A0.field_0x24[8] = 0;
}
extern void gUnk_081280DC;
void sub_080A3BD0(void)
{
s32 iVar1;
s32 iVar2;
gMenu.field_0x1 = 1;
gMenu.field_0x12[0x17] = 0;
sub_080A4D34();
LoadPalettesByPaletteGroupIndex(0xcb);
sub_0801D7EC(0x75);
iVar1 = sub_080A4494();
iVar2 = iVar1 + 7;
if (iVar2 < 0) {
iVar2 += 0x7;
}
iVar1 = (iVar2 >> 3) - 6;
iVar1 = max(iVar1, 0);
iVar1 = min(iVar1, 6);
sub_0801D7EC(iVar1 + 0x76);
gScreen.lcd.lcdControl2 |= 0x1e00;
gScreen.bg1.unk = 0x1c01;
gScreen.bg2.unk = 0x1d02;
gScreen.affine.unk2 = 0x1e0b;
gScreen.bg2.bg0xOffset = 1;
gScreen.affine.bg2xOffset = 1;
gScreen.affine.bg3xOffset = 1;
sub_080A4528();
sub_080A4398();
sub_0801E738(0);
sub_080A70AC(&gUnk_081280DC);
sub_080A7114(1);
DoFade(6, 8);
}