diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-08 14:58:51 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-08 14:58:51 -0400 |
commit | d348c44eb66a30d50a742d900760826a863c5759 (patch) | |
tree | 9316e45f852532ed0461e7f4dcfaadd588eab387 /src | |
parent | 6b27e999f242f51a81bef70c40a378d5adbaf9e2 (diff) |
Finish decompile of menews_jisan.s
Diffstat (limited to 'src')
-rw-r--r-- | src/menews_jisan.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/menews_jisan.c b/src/menews_jisan.c index 93f98ab7a..6c3f669eb 100644 --- a/src/menews_jisan.c +++ b/src/menews_jisan.c @@ -7,7 +7,7 @@ extern EWRAM_DATA u16 gUnknown_20370D0; u32 sub_8146D74(struct MysteryEventStruct *); void sub_8146DD8(struct MysteryEventStruct *); -u16 sub_8146E0C(struct MysteryEventStruct *); +u32 sub_8146E0C(struct MysteryEventStruct *); void sub_8146DA0(struct MysteryEventStruct *); void sub_8146D94(struct MysteryEventStruct *); @@ -159,3 +159,42 @@ void sub_8146D94(struct MysteryEventStruct *a0) { a0->unk_0_2 = 0; } + +void sub_8146DA0(struct MysteryEventStruct *a0) +{ + a0->unk_0_2++; + if ((u8)a0->unk_0_2 > 4) + a0->unk_0_2 = 4; +} + +void sub_8146DD8(struct MysteryEventStruct *a0) +{ + a0->unk_0_5++; + if ((u8)a0->unk_0_5 > 5) + a0->unk_0_5 = 5; +} + +u32 sub_8146E0C(struct MysteryEventStruct *a0) +{ + struct MysteryEventStruct r0; + if ((u8)a0->unk_0_5 == 5) + return 6; + + r0 = *a0; + switch (r0.unk_0_0) + { + case 0: + return 3; + case 1: + return 1; + case 2: + return 2; + case 3: + if ((u8)r0.unk_0_2 < 3) + return 4; + return 5; + default: + AGBAssert("C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/menews_jisan.c", 383, "0", 1); + return 0; + } +} |