through sub_80EB218

This commit is contained in:
PikalaxALT
2017-10-27 22:12:11 -04:00
parent d17ff9430a
commit 9c3a79f3de
4 changed files with 48 additions and 104 deletions

View File

@@ -36,6 +36,7 @@
#include "decoration.h"
#include "decoration_inventory.h"
#include "link.h"
#include "tv.h"
#include "secret_base.h"
// Static type declarations
@@ -1890,3 +1891,48 @@ void sub_80EAF80(void *records, size_t recordSize, u8 linkIdx)
}
}
}
void sub_80EB18C(struct SecretBaseRecord *bases)
{
u32 i;
for (i = 0; i < 20; i ++)
{
if (bases[i].language == LANGUAGE_JAPANESE)
{
ClearSecretBase(&bases[i]);
}
}
}
void sub_80EB1AC(void)
{
VarSet(VAR_0x40EC, 0);
VarSet(VAR_0x40ED, 0);
VarSet(VAR_0x40EE, 0);
VarSet(VAR_0x40EF, 0);
if (VarGet(VAR_0x4054) != 0)
{
VarSet(VAR_0x40F0, TRUE);
}
else
{
VarSet(VAR_0x40F0, FALSE);
}
gUnknown_0203A01D = FALSE;
}
void sub_80EB218(void)
{
if (VarGet(VAR_0x40F0) && gUnknown_0203A01D == TRUE && !CurrentMapIsSecretBase())
{
VarSet(VAR_0x40F0, FALSE);
gUnknown_0203A01D = FALSE;
sub_80EEA70();
VarSet(VAR_0x40EC, 0);
VarSet(VAR_0x40ED, 0);
VarSet(VAR_0x40EE, 0);
VarSet(VAR_0x40EF, 0);
VarSet(VAR_0x40F0, FALSE);
}
}