From 7dd1e6b1a3ce58430bca1d2ad95d68f7c7c7a0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Fri, 19 Mar 2021 20:56:32 +0100 Subject: decomp 02015E30 --- arm9/src/unk_02015E30.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 arm9/src/unk_02015E30.c (limited to 'arm9/src') 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 -- cgit v1.2.3 From 2b1cbfa8627fc799a53c6dfb5356dbcb10000126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Fri, 19 Mar 2021 21:05:16 +0100 Subject: new line --- arm9/src/unk_02015E30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arm9/src') diff --git a/arm9/src/unk_02015E30.c b/arm9/src/unk_02015E30.c index 848bc3ad..d52fb236 100644 --- a/arm9/src/unk_02015E30.c +++ b/arm9/src/unk_02015E30.c @@ -35,4 +35,4 @@ THUMB_FUNC void FUN_02015E60() UNK_021C4898.unk08 = res; } } -} \ No newline at end of file +} -- cgit v1.2.3