diff options
| author | emilybrooks <emilybrooksemilybrooks@gmail.com> | 2023-09-11 10:27:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-11 10:27:49 -0700 |
| commit | 1b465cfe8b3f228faa08fba8d58a8d3be6e82d06 (patch) | |
| tree | 52f985360d8ea448dc71ade81773f3db66c4825f /include | |
| parent | 67934dfa87091278cad91df45e9b9577236e5742 (diff) | |
m_snowman OK (#94)
* moved everything from private fork
* trying to figure out name stuff
* matched mSN_check_life
* fully matching
* add season enum
* forgot
* fixed structs
Diffstat (limited to 'include')
| -rw-r--r-- | include/libc64/qrand.h | 1 | ||||
| -rw-r--r-- | include/m_common_data.h | 23 | ||||
| -rw-r--r-- | include/m_field_info.h | 4 | ||||
| -rw-r--r-- | include/m_name_table.h | 10 | ||||
| -rw-r--r-- | include/m_police_box.h | 8 | ||||
| -rw-r--r-- | include/m_snowman.h | 27 |
6 files changed, 61 insertions, 12 deletions
diff --git a/include/libc64/qrand.h b/include/libc64/qrand.h index b50dbdb..b22bf17 100644 --- a/include/libc64/qrand.h +++ b/include/libc64/qrand.h @@ -3,7 +3,6 @@ #include "ultra64.h" - u32 qrand(void); void sqrand(u32 seed); f32 fqrand(void); diff --git a/include/m_common_data.h b/include/m_common_data.h index bd3d432..c3ef8d1 100644 --- a/include/m_common_data.h +++ b/include/m_common_data.h @@ -13,6 +13,7 @@ #include "m_private.h" #include "m_quest.h" #include "unk.h" +#include "m_snowman.h" struct Actor; struct ActorOverlay; @@ -101,6 +102,13 @@ typedef struct mPr_mother_mail_info_c { /* 0x00 */ UNK_TYPE1 unk_00[0xE]; } mPr_mother_mail_info_c; // size = 0xE +typedef enum Season { + /* 0 */ SPRING, + /* 1 */ SUMMER, + /* 2 */ FALL, + /* 3 */ WINTER, +} Season; + typedef struct Time_c { /* 0x00 */ u32 season; /* 0x04 */ u32 term_idx; @@ -160,7 +168,9 @@ typedef struct CommonData { /* 0x0EF58 */ u16 fruit; /* 0x0EF5A */ UNK_TYPE1 unk_0EF5A[0x12]; /* 0x0EF6C */ Mail unk_0EF6C[5]; - /* 0x0F2A0 */ UNK_TYPE1 unk_0F2A0[0x198]; + /* 0x0F2A0 */ UNK_TYPE1 unk_0F2A0[0x17C]; + /* 0x0F41C */ SnowmanData snowmanData[SNOWMAN_SAVE_COUNT]; + /* 0x0F428 */ UNK_TYPE1 unk_F428[0x10]; /* 0x0F438 */ u8 station_type; /* train station type */ /* 0x0F439 */ u8 unk0F439[0x3]; /* 0x0F43C */ u16 deposit[FG_BLOCK_X_NUM * FG_BLOCK_Z_NUM][UT_Z_NUM]; /* flags for which items are buried around town */ @@ -171,7 +181,12 @@ typedef struct CommonData { /* 0x0F86A */ u8 unk0F86A[0x32]; /* 0x0F89C */ lbRTC_time_c unk_0F89C; /* 0x0F8A4 */ lbRTC_time_c unk_0F8A4; - /* 0x0F8AC */ u8 unk0F8AC[0x754]; + /* 0x0F8AC */ UNK_TYPE1 unk0F8AC; + /* 0x0F8AD */ u8 snowmanYear; // Year last snowman was built. + /* 0x0F8AE */ u8 snowmanMonth; // Month last snowman was built. + /* 0x0F8AF */ u8 snowmanDay; // Day last snowman was built. + /* 0x0F8B0 */ u8 snowmanHour; // Hour last snowman was built. + /* 0x0F8B1 */ UNK_TYPE1 unk0F8B1[0x74F]; /* 0x10000 */ u8 unk_10000; // named "game_started" in AC GCN decomp /* 0x10001 */ u8 unk_10001; /* 0x10002 */ u8 unk10002[0x1]; @@ -209,7 +224,9 @@ typedef struct CommonData { /* 0x105A0 */ u32 scene_from_title_demo; /* 0x105A4 */ UNK_TYPE1 unk_105A4[0xF0]; /* 0x10694 */ mNpc_walk_c npc_walk; - /* 0x10710 */ UNK_TYPE1 unk_10710[0xA6]; + /* 0x10710 */ UNK_TYPE1 unk_10710[0x3C]; + /* 0x1074C */ UNK_TYPE unk_1074C; + /* 0x10750 */ UNK_TYPE1 unk_10750[0x66]; /* 0x107B6 */ s16 unk_107B6; // named "demo_profile" in AC GCN decomp (though it's an array of two s16s in that game) /* 0x107B8 */ u8 unk107B8[0x28]; /* 0x107E0 */ s8 player_decoy_flag; diff --git a/include/m_field_info.h b/include/m_field_info.h index 7451f66..913190e 100644 --- a/include/m_field_info.h +++ b/include/m_field_info.h @@ -88,7 +88,7 @@ struct Game_Play; // void func_8008A3BC_jp(); // void func_8008A410_jp(); // void func_8008A4F8_jp(); -// void mFI_GetUnitFG(); +u16* mFI_GetUnitFG(Vec3f); // void func_8008A608_jp(); // void func_8008A670_jp(); // void func_8008A74C_jp(); @@ -154,7 +154,7 @@ void func_8008C478_jp(u16* deposit, int ut_x, int ut_z); // void func_8008C610_jp(); // void func_8008C630_jp(); // void func_8008C650_jp(); -// void mFI_Wpos2DepositOFF(); +void mFI_Wpos2DepositOFF(Vec3f); // void func_8008C708_jp(); // void func_8008C764_jp(); // void func_8008C798_jp(); diff --git a/include/m_name_table.h b/include/m_name_table.h index 795c642..f0656d2 100644 --- a/include/m_name_table.h +++ b/include/m_name_table.h @@ -149,4 +149,14 @@ #define DEAD_GOLD_SAPLING (GOLD_TREE + 1) /* end of environmental objects */ +#define SNOWMAN0 0xA008 +#define SNOWMAN1 (SNOWMAN0 + 1) +#define SNOWMAN2 (SNOWMAN1 + 1) +#define SNOWMAN3 (SNOWMAN2 + 1) +#define SNOWMAN4 (SNOWMAN3 + 1) +#define SNOWMAN5 (SNOWMAN4 + 1) +#define SNOWMAN6 (SNOWMAN5 + 1) +#define SNOWMAN7 (SNOWMAN6 + 1) +#define SNOWMAN8 (SNOWMAN7 + 1) + #endif diff --git a/include/m_police_box.h b/include/m_police_box.h new file mode 100644 index 0000000..639815d --- /dev/null +++ b/include/m_police_box.h @@ -0,0 +1,8 @@ +#ifndef M_POLICE_BOX_H +#define M_POLICE_BOX_H + +#include "ultra64.h" + +void mPB_keep_item(u16); + +#endif diff --git a/include/m_snowman.h b/include/m_snowman.h index caca944..b2c9a15 100644 --- a/include/m_snowman.h +++ b/include/m_snowman.h @@ -2,13 +2,28 @@ #define M_SNOWMAN_H #include "ultra64.h" +#include "z64math.h" -// void mSN_check_life(); -// void mSN_ClearSnowmanData(); -// void mSN_ClearSnowman(); -// void mSN_MeltSnowman(); -// void mSN_get_free_space(); -// void func_800C8BC4_jp(); +#define SNOWMAN_SAVE_COUNT 3 + +typedef struct SnowmanData { + /* 0x00 */ u8 exists; + /* 0x01 */ u8 headSize; + /* 0x02 */ u8 bodySize; + /* 0x03 */ u8 unk3; //score +} SnowmanData; // size = 0x4 + +typedef struct SnowmanInfo { + /* 0x00 */ s32 unk0; //scale + /* 0x04 */ Vec3f position; +} SnowmanInfo; // size = 0x10 + +s32 mSN_check_life(u16* name, s32 daysElapsed); +void mSN_ClearSnowmanData(u16* name, s32 snowmanIndex); +s32 mSN_ClearSnowman(u16* name); +s32 mSN_MeltSnowman(u16* name, s32 daysElapsed); +s32 mSN_get_free_space(void); +void mSN_regist_snowman_society(SnowmanInfo* snowmanInfo); void mSN_decide_msg(void); void mSN_snowman_init(void); |
