diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-08 16:02:11 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-08 16:02:11 -0400 |
commit | 1d50bcb0b95e52fb43c22a3348ac033b3534f860 (patch) | |
tree | 2f1805ef467b7b726637ccbfa6e5933c45da504a | |
parent | eda4a9f9406aa2ef3fe91006e134f44b07035081 (diff) |
Cleanup and create menews_jisan header
-rw-r--r-- | include/event_data.h | 2 | ||||
-rw-r--r-- | include/gba/defines.h | 1 | ||||
-rw-r--r-- | include/menews_jisan.h | 8 | ||||
-rw-r--r-- | src/menews_jisan.c | 23 |
4 files changed, 22 insertions, 12 deletions
diff --git a/include/event_data.h b/include/event_data.h index 914217588..f28ed4f75 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -51,4 +51,6 @@ extern u16 gSpecialVar_MonBoxId; extern u16 gSpecialVar_MonBoxPos; extern u16 gSpecialVar_0x8014; +extern u16 gUnknown_20370D0; + #endif // GUARD_EVENT_DATA_H diff --git a/include/gba/defines.h b/include/gba/defines.h index fe81770e3..a0ef506dd 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -69,5 +69,6 @@ #define WIN_RANGE(a, b) (((a) << 8) | (b)) #define NAKED __attribute__((naked)) +#define UNUSED __attribute__((unused)) #endif // GUARD_GBA_DEFINES diff --git a/include/menews_jisan.h b/include/menews_jisan.h new file mode 100644 index 000000000..8dc1d0a99 --- /dev/null +++ b/include/menews_jisan.h @@ -0,0 +1,8 @@ +#ifndef GUARD_MENEWS_JISAN_H +#define GUARD_MENEWS_JISAN_H + +void sub_8146C30(u32 a0); +void sub_8146C88(void); +void sub_8146CA4(void); + +#endif //GUARD_MENEWS_JISAN_H diff --git a/src/menews_jisan.c b/src/menews_jisan.c index dd1376c26..7dfcee939 100644 --- a/src/menews_jisan.c +++ b/src/menews_jisan.c @@ -2,14 +2,13 @@ #include "mevent.h" #include "random.h" #include "event_data.h" +#include "menews_jisan.h" -extern EWRAM_DATA u16 gUnknown_20370D0; - -u32 sub_8146D74(struct MysteryEventStruct *); -void sub_8146DD8(struct MysteryEventStruct *); -u32 sub_8146E0C(struct MysteryEventStruct *); -void sub_8146DA0(struct MysteryEventStruct *); -void sub_8146D94(struct MysteryEventStruct *); +static u32 sub_8146D74(struct MysteryEventStruct *); +static void sub_8146DD8(struct MysteryEventStruct *); +static u32 sub_8146E0C(struct MysteryEventStruct *); +static void sub_8146DA0(struct MysteryEventStruct *); +static void sub_8146D94(struct MysteryEventStruct *); #ifdef NONMATCHING void sub_8146C30(u32 a0) @@ -144,7 +143,7 @@ u16 sub_8146CE8(void) return r5; } -u32 sub_8146D74(struct MysteryEventStruct *a0) +static u32 sub_8146D74(struct MysteryEventStruct *a0) { u32 r4; @@ -155,26 +154,26 @@ u32 sub_8146D74(struct MysteryEventStruct *a0) return r4; } -void sub_8146D94(struct MysteryEventStruct *a0) +static void sub_8146D94(struct MysteryEventStruct *a0) { a0->unk_0_2 = 0; } -void sub_8146DA0(struct MysteryEventStruct *a0) +static 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) +static 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) +static u32 sub_8146E0C(struct MysteryEventStruct *a0) { struct MysteryEventStruct r0; if ((u8)a0->unk_0_5 == 5) |