sub_8146CA4

This commit is contained in:
PikalaxALT
2018-10-08 14:24:44 -04:00
parent 7040e8e956
commit 4dd5029fdc
4 changed files with 32 additions and 54 deletions
+25
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "mevent.h"
#include "random.h"
#include "event_data.h"
#ifdef NONMATCHING
void sub_8146C30(u32 a0)
@@ -72,3 +73,27 @@ void sub_8146C30(u32 a0)
"\tbx r0");
}
#endif
void sub_8146C88(void)
{
struct MysteryEventStruct *r5 = sub_8143D94();
r5->unk_0_0 = 0;
r5->unk_0_2 = 0;
r5->unk_0_5 = 0;
r5->unk_1 = 0;
VarSet(0x4028, 0);
}
void sub_8146CA4(void)
{
u16 *r4 = sub_806E454(0x4028);
struct MysteryEventStruct *r5 = sub_8143D94();
struct MysteryEventStruct r0 = *r5;
if ((u8)r0.unk_0_5 > 4 && ++(*r4) > 0x1f3)
{
r5->unk_0_5 = 0;
*r4 = 0;
}
}