En_Weather_Tag (#178)

* EnWeatherTag: Start

* EnWeatherTag: matching function, but suspicious

* EnWeatherTag: two non-matching functions, rest match

* EnWeatherTag: cleaning and docs

* EnWeatherTag: more docs

* WeatherTag: more docs

* WeatherTag: cleaning

* WeatherTag: pad renamed to unk to match

* Update include/z64save.h

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update include/z64.h

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* WeatherTag: requested changes

Co-authored-by: isghj8 <isghj8@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
Isghj
2021-06-11 08:15:09 -04:00
committed by GitHub
co-authored by isghj8 Derek Hensley
parent 70b67402cb
commit bb7247875b
7 changed files with 505 additions and 42 deletions
+2 -2
View File
@@ -899,7 +899,7 @@ Actor* func_800BC270(GlobalContext* globalCtx, Actor* actor, f32 arg2, UNK_TYPE4
void func_800BCB70(Actor* actor, s16 arg1, u8 arg2, u8 arg3, u8 arg4);
void func_800BCBF4(Vec3f* uParm1, GlobalContext* globalCtx);
void func_800BCC68(Vec3f* param_1, GlobalContext* globalCtx);
// void func_800BCCDC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
UNK_RET func_800BCCDC(Vec3s* points, u8 pathcount, Vec3f* pos1, Vec3f* pos2, UNK_TYPE parm5);
// void func_800BD2B4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800BD384(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE1 param_9);
// void func_800BD6E4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
@@ -3032,7 +3032,7 @@ void* Play_LoadScene(GlobalContext* globalCtx, RomFile* entry);
void func_8016927C(GlobalContext* globalCtx, s16 sParm2);
// void func_801692C4(GlobalContext* globalCtx, UNK_TYPE1 uParm2);
// void Play_SceneInit(GlobalContext* globalCtx, s32 sceneIndex, UNK_TYPE1 param_3);
// void func_80169474(void);
UNK_RET func_80169474(GlobalContext* globalCtx, Vec3f* v1, Vec3f* v2);
s32 func_801694DC(GlobalContext* globalCtx);
s32 Play_GetActiveCameraIndex(GlobalContext* globalCtx);
void func_80169590(GlobalContext* globalCtx, s16 param_2, s16 param_3);
+6 -5
View File
@@ -677,7 +677,8 @@ typedef struct {
/* 0x272 */ char unk_272[0xD6];
} InterfaceContext; // size = 0x348
typedef struct {
// us rev 1: 803FDB24
typedef struct KankyoContext {
/* 0x00 */ UNK_TYPE1 unk0;
/* 0x01 */ UNK_TYPE1 unk1;
/* 0x02 */ u16 unk2;
@@ -823,14 +824,14 @@ typedef struct {
/* 0xE0 */ u8 unkE0;
/* 0xE1 */ UNK_TYPE1 unkE1;
/* 0xE2 */ s8 unkE2;
/* 0xE3 */ UNK_TYPE1 unkE3;
/* 0xE3 */ u8 unkE3; // modified by unused func in EnWeatherTag
/* 0xE4 */ UNK_TYPE1 unkE4;
/* 0xE5 */ UNK_TYPE1 unkE5;
/* 0xE6 */ UNK_TYPE1 unkE6;
/* 0xE7 */ UNK_TYPE1 unkE7;
/* 0xE8 */ UNK_TYPE1 unkE8;
/* 0xE9 */ UNK_TYPE1 unkE9;
/* 0xEA */ UNK_TYPE1 unkEA;
/* 0xEA */ u8 unkEA;
/* 0xEB */ UNK_TYPE1 unkEB;
/* 0xEC */ UNK_TYPE1 unkEC;
/* 0xED */ UNK_TYPE1 unkED;
@@ -838,7 +839,7 @@ typedef struct {
/* 0xEF */ UNK_TYPE1 unkEF;
/* 0xF0 */ UNK_TYPE1 unkF0;
/* 0xF1 */ UNK_TYPE1 unkF1;
/* 0xF2 */ u8 unkF2[0xC];
/* 0xF2 */ u8 unkF2[0xC]; // F2-F6 are used by weather tag
} KankyoContext; // size = 0xFE
typedef struct {
@@ -1553,7 +1554,7 @@ struct GlobalContext {
/* 0x18858 */ UNK_PTR unk18858;
/* 0x1885C */ EntranceEntry* setupEntranceList;
/* 0x18860 */ u16* setupExitList;
/* 0x18864 */ void* setupPathList;
/* 0x18864 */ Path* setupPathList;
/* 0x18868 */ UNK_PTR unk18868;
/* 0x1886C */ AnimatedMaterial* sceneMaterialAnims;
/* 0x18870 */ UNK_TYPE1 pad18870[0x4];
+2 -1
View File
@@ -51,7 +51,8 @@ typedef struct {
/* 0x000C */ u16 time; // "zelda_time"
/* 0x000E */ u16 owlSaveLocation;
/* 0x0010 */ s32 isNight; // "asahiru_fg"
/* 0x0014 */ u32 unk_14; // "change_zelda_time"
/* 0x0014 */ u16 unk_14; // "change_zelda_time"
/* 0x0016 */ u16 unk_16;
/* 0x0018 */ s32 day; // "totalday"
/* 0x001C */ u32 daysElapsed; // "eventday"
/* 0x0020 */ u8 playerForm; // "player_character"
+5 -1
View File
@@ -2625,9 +2625,13 @@ SECTIONS
ovl_En_Weather_Tag : AT(RomLocation)
{
build/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o(.text)
build/asm/overlays/ovl_En_Weather_Tag_data.o(.data)
build/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o(.data)
build/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o(.rodata)
#ifdef NON_MATCHING
build/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag_overlay.o(.ovl)
#else
build/asm/overlays/ovl_En_Weather_Tag_rodata.o(.rodata)
#endif
}
SegmentEnd = .;
SegmentSize = SegmentEnd - SegmentStart;
File diff suppressed because it is too large Load Diff
@@ -5,11 +5,36 @@
struct EnWeatherTag;
typedef void (*EnWeatherTagActionFunc)(struct EnWeatherTag*, GlobalContext*);
typedef struct EnWeatherTag {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x18];
/* 0x144 */ EnWeatherTagActionFunc actionFunc;
/* 0x148 */ u8 pad148[0x4]; // todo attempt remove
/* 0x14C */ u8 pathCount;
/* 0x150 */ Vec3s* pathPoints;
// 154: the code avoids what would be a negative value if signed, but signed wont match
/* 0x154 */ u16 unk154;
/* 0x156 */ u16 fadeDistance;
/* 0x158 */ u16 unk158; // increment/decrement amount for 154
} EnWeatherTag; // size = 0x15C
extern const ActorInit En_Weather_Tag_InitVars;
#define WEATHER_TAG_TYPE(x) (x->actor.params & 0xF)
#define WEATHER_TAG_PATHID(x) (x->actor.params >> 4 & 0xF)
#define WEATHER_TAG_RANGE100(x) ((u8)(((x->actor.params >> 8) & 0xFF)) * 100.0f)
#define WEATHER_TAG_RANGE100INT(x) ((u8)(((x->actor.params >> 8))) * 100)
typedef enum {
/* 0 */ WEATHERTAG_TYPE_UNK0,
/* 1 */ WEATHERTAG_TYPE_UNK1,
/* 2 */ WEATHERTAG_TYPE_WINTERFOG,
/* 3 */ WEATHERTAG_TYPE_UNK3,
/* 4 */ WEATHERTAG_TYPE_UNK4,
/* 5 */ WEATHERTAG_TYPE_UNK5,
/* 6 */ WEATHERTAG_TYPE_WATERMURK,
/* 7 */ WEATHERTAG_TYPE_LOCALDAY2RAIN,
} WeatherTagType;
#endif // Z_EN_WEATHER_TAG_H
+5 -5
View File
@@ -7915,7 +7915,7 @@
0x8096611C:("func_8096611C",),
0x809661BC:("EnMm_Update",),
0x80966238:("EnMm_Draw",),
0x80966410:("func_80966410",),
0x80966410:("EnWeatherTag_SetupAction",),
0x8096641C:("EnWeatherTag_Destroy",),
0x8096642C:("EnWeatherTag_Init",),
0x80966608:("func_80966608",),
@@ -7923,7 +7923,7 @@
0x8096689C:("func_8096689C",),
0x80966A08:("func_80966A08",),
0x80966A68:("func_80966A68",),
0x80966AE4:("func_80966AE4",),
0x80966AE4:("EnWeatherTag_Die",),
0x80966B08:("func_80966B08",),
0x80966BF4:("func_80966BF4",),
0x80966D20:("func_80966D20",),
@@ -7934,9 +7934,9 @@
0x80966FEC:("func_80966FEC",),
0x80967060:("func_80967060",),
0x80967148:("func_80967148",),
0x809671A8:("func_809671A8",),
0x809671B8:("func_809671B8",),
0x80967250:("func_80967250",),
0x809671A8:("EnWeatherTag_DoNothing",),
0x809671B8:("EnWeatherTag_Unused_809671B8",),
0x80967250:("EnWeatherTag_Unused_80967250",),
0x809672DC:("func_809672DC",),
0x809674C8:("func_809674C8",),
0x80967608:("func_80967608",),