File diff suppressed because it is too large
Load Diff
@@ -3,17 +3,32 @@
|
||||
#include "bg.h"
|
||||
#include "window.h"
|
||||
|
||||
struct PokenavSub9
|
||||
{
|
||||
u32 (*unk0)(struct PokenavSub9*);
|
||||
u32 loopedTaskId;
|
||||
u8 filler[0xC];
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
struct PokenavSub18 *unk1C;
|
||||
};
|
||||
|
||||
u32 sub_81CFA68(struct PokenavSub9 *structPtr);
|
||||
u32 sub_81CFA88(struct PokenavSub9 *structPtr);
|
||||
u32 sub_81CFB08(struct PokenavSub9 *structPtr);
|
||||
u32 sub_81CFB10(struct PokenavSub9 *structPtr);
|
||||
u32 sub_81CFB8C(void);
|
||||
u32 sub_81CFC2C(void);
|
||||
u32 sub_81CFC40(void);
|
||||
u32 sub_81CFFFC(s32);
|
||||
u32 sub_81D0074(s32);
|
||||
u32 sub_81D00EC(s32);
|
||||
u32 sub_81D0164(s32);
|
||||
u32 sub_81D01DC(s32);
|
||||
u32 sub_81D021C(s32);
|
||||
u32 sub_81CFB74(s32 state);
|
||||
u32 sub_81CFFFC(s32 state);
|
||||
u32 sub_81D0074(s32 state);
|
||||
u32 sub_81D00EC(s32 state);
|
||||
u32 sub_81D0164(s32 state);
|
||||
u32 sub_81D01DC(s32 state);
|
||||
u32 sub_81D021C(s32 state);
|
||||
|
||||
u32 (*const gUnknown_086235D8[])(void) =
|
||||
u32 (*const gUnknown_086235D8[])(void) =
|
||||
{
|
||||
sub_81CFB8C,
|
||||
sub_81CFC2C,
|
||||
@@ -25,7 +40,7 @@ const u32 gUnknown_08623604[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz"
|
||||
const u32 gUnknown_086236CC[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz");
|
||||
const u16 gUnknown_08623790[] = INCBIN_U16("graphics/pokenav/8623790.gbapal");
|
||||
|
||||
const struct BgTemplate gUnknown_086237B0 =
|
||||
const struct BgTemplate gUnknown_086237B0 =
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 1,
|
||||
@@ -36,7 +51,7 @@ const struct BgTemplate gUnknown_086237B0 =
|
||||
.baseTile = 0
|
||||
};
|
||||
|
||||
const struct BgTemplate gUnknown_086237B4 =
|
||||
const struct BgTemplate gUnknown_086237B4 =
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 2,
|
||||
@@ -47,7 +62,7 @@ const struct BgTemplate gUnknown_086237B4 =
|
||||
.baseTile = 0
|
||||
};
|
||||
|
||||
const LoopedTask gUnknown_086237B8[] =
|
||||
const LoopedTask gUnknown_086237B8[] =
|
||||
{
|
||||
NULL,
|
||||
sub_81CFFFC,
|
||||
@@ -58,7 +73,7 @@ const LoopedTask gUnknown_086237B8[] =
|
||||
sub_81D021C
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_086237D4 =
|
||||
const struct WindowTemplate gUnknown_086237D4 =
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
@@ -72,3 +87,94 @@ const struct WindowTemplate gUnknown_086237D4 =
|
||||
const u8 gUnknown_086237DC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
const u8 gUnknown_086237E8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
const u8 gUnknown_086237F4[] = _("{UNK_SPACER}");
|
||||
|
||||
bool32 sub_81CF9BC(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(9, sizeof(struct PokenavSub9));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk1C = AllocSubstruct(18, sizeof(struct PokenavSub18));
|
||||
if (structPtr->unk1C == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk0 = sub_81CFA68;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sub_81CFB74, 1);
|
||||
structPtr->unk14 = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_81CFA04(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(9, sizeof(struct PokenavSub9));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk1C = GetSubstructPtr(18);
|
||||
structPtr->unk0 = sub_81CFA88;
|
||||
structPtr->unk14 = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_81CFA34(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
return structPtr->unk0(structPtr);
|
||||
}
|
||||
|
||||
void sub_81CFA48(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
if (!structPtr->unk18)
|
||||
FreePokenavSubstruct(18);
|
||||
FreePokenavSubstruct(9);
|
||||
}
|
||||
|
||||
u32 sub_81CFA68(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
if (!IsLoopedTaskActive(structPtr->loopedTaskId))
|
||||
structPtr->unk0 = sub_81CFA88;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_81CFA88(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
return 1;
|
||||
if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
return 2;
|
||||
if (gMain.newKeys & DPAD_LEFT)
|
||||
return 3;
|
||||
if (gMain.newKeys & DPAD_RIGHT)
|
||||
return 4;
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
structPtr->unk18 = 0;
|
||||
structPtr->unk0 = sub_81CFB08;
|
||||
return 5;
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
structPtr->unk1C->unk2 = GetSelectedMatchCall();
|
||||
structPtr->unk18 = 1;
|
||||
structPtr->unk0 = sub_81CFB10;
|
||||
return 6;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_81CFB08(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return 0x186a5;
|
||||
}
|
||||
|
||||
u32 sub_81CFB10(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return 0x186ad;
|
||||
}
|
||||
|
||||
u32 sub_81CFB18(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
return structPtr->unk14;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user