diff options
author | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-03-19 20:56:32 +0100 |
---|---|---|
committer | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-03-19 21:03:42 +0100 |
commit | 7dd1e6b1a3ce58430bca1d2ad95d68f7c7c7a0ea (patch) | |
tree | c2aa291fe5064fe17f993cdd4539446126b8d584 /arm9/src | |
parent | 885d7c10805d581e4758e57ada3908b5dc9eded7 (diff) |
decomp 02015E30
Diffstat (limited to 'arm9/src')
-rw-r--r-- | arm9/src/unk_02015E30.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arm9/src/unk_02015E30.c b/arm9/src/unk_02015E30.c new file mode 100644 index 00000000..848bc3ad --- /dev/null +++ b/arm9/src/unk_02015E30.c @@ -0,0 +1,38 @@ + +#include "unk_02015E30.h" + +extern u64 FUN_02020BF4(); +extern u64 FUN_02020C14(u64 param0); + +struct UnkStruct_02015E30 UNK_021C4898; + +THUMB_FUNC void FUN_02015E30() +{ + UNK_021C4898.unk00 = 0; +} + +THUMB_FUNC void FUN_02015E3C(struct IGT *igt) +{ + struct UnkStruct_02015E30 *unk1 = &UNK_021C4898; + UNK_021C4898.unk00 = 1; + UNK_021C4898.unk10 = 0; + UNK_021C4898.unk14 = 0; + UNK_021C4898.unk08 = 0; + UNK_021C4898.unk04 = igt; + + UNK_021C4898.unk18 = FUN_02020BF4(); +} + +THUMB_FUNC void FUN_02015E60() +{ + if (UNK_021C4898.unk00 != 0) + { + u64 res = FUN_02020C14(FUN_02020BF4() - UNK_021C4898.unk18); + + if (UNK_021C4898.unk08 < res) + { + AddIGTSeconds(UNK_021C4898.unk04, (u32)(res - UNK_021C4898.unk08)); + UNK_021C4898.unk08 = res; + } + } +}
\ No newline at end of file |