summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrakxo <87568477+Prakxo@users.noreply.github.com>2023-09-19 20:44:50 +0200
committerGitHub <noreply@github.com>2023-09-19 11:44:50 -0700
commitefd664e21960019bab6be475d848b5f9e68ea396 (patch)
tree9e10e0a34cae73a9068f550e0fa4bfbbd6bce3bd /include
parentef0a26fd481675a955b301d1b2261ded362c4190 (diff)
The NPC PR 2/3 OK (#97)
* m_npc_schedule OK Co-authored-by: Maide <you@example.com> * fix structs * fixes --------- Co-authored-by: Maide <you@example.com>
Diffstat (limited to 'include')
-rw-r--r--include/6D2720.h8
-rw-r--r--include/m_common_data.h3
-rw-r--r--include/m_event.h2
-rw-r--r--include/m_npc.h2
-rw-r--r--include/m_npc_schedule.h46
5 files changed, 50 insertions, 11 deletions
diff --git a/include/6D2720.h b/include/6D2720.h
index 4fe9a80..eaccea7 100644
--- a/include/6D2720.h
+++ b/include/6D2720.h
@@ -3,14 +3,6 @@
#include "ultra64.h"
-
-// void func_800AEA80_jp();
-// void mNPS_set_schedule_area();
-// void func_800AEB9C_jp();
-// void func_800AEBC8_jp();
-// void func_800AEC74_jp();
-// void mNPS_schedule_manager();
-void mNPS_set_all_schedule_area(void);
void func_800B0010_jp(void);
#endif
diff --git a/include/m_common_data.h b/include/m_common_data.h
index dd96b67..48981c2 100644
--- a/include/m_common_data.h
+++ b/include/m_common_data.h
@@ -10,6 +10,7 @@
#include "m_mail.h"
#include "m_npc.h"
#include "m_npc_walk.h"
+#include "m_npc_schedule.h"
#include "m_private.h"
#include "m_quest.h"
#include "unk.h"
@@ -234,7 +235,7 @@ typedef struct CommonData {
/* 0x104B0 */ UNK_TYPE1 unk_104B0[0xE8];
/* 0x10598 */ mQst_not_saved_c quest;
/* 0x105A0 */ u32 scene_from_title_demo;
- /* 0x105A4 */ UNK_TYPE1 unk_105A4[0xF0];
+ /* 0x105A4 */ NpsSchedule npcSchedule[ANIMAL_NUM_MAX];
/* 0x10694 */ NpcWalking npcWalk;
/* 0x10710 */ UNK_TYPE1 unk_10710[0x3C];
/* 0x1074C */ UNK_TYPE unk_1074C;
diff --git a/include/m_event.h b/include/m_event.h
index 250cf21..67c911a 100644
--- a/include/m_event.h
+++ b/include/m_event.h
@@ -108,7 +108,7 @@ void mEv_finish(Event* event);
// void func_8007FE0C_jp();
void mEv_clear_status(s32, s16);
// void func_8007FEBC_jp();
-// void func_8007FF08_jp();
+s32 mEv_check_status(s32, s16);
// void func_8007FF8C_jp();
// void func_8007FFC4_jp();
// void func_80080000_jp();
diff --git a/include/m_npc.h b/include/m_npc.h
index 62f82cf..9191c09 100644
--- a/include/m_npc.h
+++ b/include/m_npc.h
@@ -88,7 +88,7 @@ void mNpc_RenewalAnimalMemory(void);
// void func_800A78DC_jp();
// void mNpc_ClearAnimalInfo();
// void mNpc_ClearAnyAnimalInfo();
-// void mNpc_CheckFreeAnimalInfo();
+s32 mNpc_CheckFreeAnimalInfo(Animal_c*);
// void mNpc_GetFreeAnimalInfo();
// void mNpc_UseFreeAnimalInfo();
// void mNpc_CopyAnimalInfo();
diff --git a/include/m_npc_schedule.h b/include/m_npc_schedule.h
new file mode 100644
index 0000000..b410c6f
--- /dev/null
+++ b/include/m_npc_schedule.h
@@ -0,0 +1,46 @@
+#ifndef M_NPC_SCHEDULE_H
+#define M_NPC_SCHEDULE_H
+
+#include "ultra64.h"
+#include "m_npc.h"
+
+typedef enum NpsScheduleType{
+ /* 0 */ NPS_SCHEDULE_FIELD, /* in same acre as their home */
+ /* 1 */ NPS_SCHEDULE_IN_HOUSE, /* inside their house */
+ /* 2 */ NPS_SCHEDULE_SLEEP, /* asleep in their house */
+ /* 3 */ NPS_SCHEDULE_STAND, /* standing around town?? */
+ /* 4 */ NPS_SCHEDULE_WANDER, /* wander around town */
+ /* 5 */ NPS_SCHEDULE_SPECIAL, /* unique schedule method for each NPC actor type */
+ /* 6 */ NPS_SCHEDULE_TYPE_NUM
+} NpsScheduleType;
+
+typedef struct NpsScheduleData {
+ /* 0x00 */ NpsScheduleType type;
+ /* 0x04 */ s32 endTime;
+} NpsScheduleData; // size = 0x8
+
+typedef struct NpsScheduleDataTable {
+ /* 0x00 */ s32 count;
+ /* 0x04 */ NpsScheduleData* scheduleData;
+} NpsScheduleDataTable; // size = 0x8
+
+typedef struct NpsSchedule{
+ /* 0x00 */ AnmPersonalID_c* id;
+ /* 0x04 */ NpsScheduleDataTable* dataTable;
+ /* 0x08 */ u8 currentType;
+ /* 0x09 */ u8 forcedType;
+ /* 0x0A */ u8 savedType;
+ /* 0x0C */ s32 forcedTimer;
+}NpsSchedule; // size = 0x10
+
+
+
+NpsSchedule* mNPS_get_schedule_area(AnmPersonalID_c* id);
+void mNPS_set_schedule_area(AnmPersonalID_c* id);
+void mNPS_reset_schedule_area(AnmPersonalID_c* id);
+void mNPS_schedule_manager_sub0(void);
+void mNPS_schedule_manager_sub(void);
+void mNPS_schedule_manager(void);
+void mNPS_set_all_schedule_area(void);
+
+#endif