diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-11-25 17:34:33 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-25 17:34:33 +1100 |
| commit | b25e64d1bd2ece30301f9fa5af78f963afd0cf76 (patch) | |
| tree | 16bbd3fc0fb479b470351adfcbad35274abaf2c8 /include | |
| parent | 919d3d81e012e58cf5a04db6559844bb4869e247 (diff) | |
`z_en_test4.c` Documented (#1498)
* begin docs
* more docs
* skybox
* more cleanup
* more cleanup
* more cleanup
* Improve comment
* in-function static
Diffstat (limited to 'include')
| -rw-r--r-- | include/z64actor.h | 2 | ||||
| -rw-r--r-- | include/z64environment.h | 45 | ||||
| -rw-r--r-- | include/z64save.h | 7 |
3 files changed, 39 insertions, 15 deletions
diff --git a/include/z64actor.h b/include/z64actor.h index 6790bc222..19bf3b870 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -289,7 +289,7 @@ typedef enum { } ActorType; #define ACTORCTX_FLAG_0 (1 << 0) -#define ACTORCTX_FLAG_1 (1 << 1) +#define ACTORCTX_FLAG_TELESCOPE_ON (1 << 1) #define ACTORCTX_FLAG_PICTO_BOX_ON (1 << 2) #define ACTORCTX_FLAG_3 (1 << 3) #define ACTORCTX_FLAG_4 (1 << 4) diff --git a/include/z64environment.h b/include/z64environment.h index 0988355f4..45f8463f0 100644 --- a/include/z64environment.h +++ b/include/z64environment.h @@ -63,7 +63,7 @@ typedef enum { typedef enum { /* 0 */ WEATHER_MODE_CLEAR, - /* 1 */ WEATHER_MODE_1, // rain? + /* 1 */ WEATHER_MODE_RAIN, /* 2 */ WEATHER_MODE_2, /* 3 */ WEATHER_MODE_SNOW } WeatherMode; @@ -81,6 +81,38 @@ typedef enum { /* 11 */ SKYBOX_DMA_TEXTURE2_START = 11 } SkyboxDmaState; +typedef enum SkyboxConfig { + /* 0x00 */ SKYBOX_CONFIG_0, + /* 0x01 */ SKYBOX_CONFIG_1, + /* 0x02 */ SKYBOX_CONFIG_2, + /* 0x03 */ SKYBOX_CONFIG_3, + /* 0x04 */ SKYBOX_CONFIG_4, + /* 0x05 */ SKYBOX_CONFIG_5, + /* 0x06 */ SKYBOX_CONFIG_6, + /* 0x07 */ SKYBOX_CONFIG_7, + /* 0x08 */ SKYBOX_CONFIG_8, + /* 0x09 */ SKYBOX_CONFIG_9, + /* 0x0A */ SKYBOX_CONFIG_10, + /* 0x0B */ SKYBOX_CONFIG_11, + /* 0x0C */ SKYBOX_CONFIG_12, + /* 0x0D */ SKYBOX_CONFIG_13, + /* 0x0E */ SKYBOX_CONFIG_14, + /* 0x0F */ SKYBOX_CONFIG_15, + /* 0x10 */ SKYBOX_CONFIG_16, + /* 0x11 */ SKYBOX_CONFIG_17, + /* 0x12 */ SKYBOX_CONFIG_18, + /* 0x13 */ SKYBOX_CONFIG_19, + /* 0x14 */ SKYBOX_CONFIG_20, + /* 0x15 */ SKYBOX_CONFIG_21, + /* 0x16 */ SKYBOX_CONFIG_22, + /* 0x17 */ SKYBOX_CONFIG_23, + /* 0x18 */ SKYBOX_CONFIG_24, + /* 0x19 */ SKYBOX_CONFIG_25, + /* 0x1A */ SKYBOX_CONFIG_26, + /* 0x1B */ SKYBOX_CONFIG_27, + /* 0x1C */ SKYBOX_CONFIG_MAX +} SkyboxConfig; + //! @TODO: Verify from OoT (may not be the same) typedef enum { /* 0 */ PRECIP_RAIN_MAX, // max number of raindrops that can draw; uses this or SOS_MAX, whichever is larger @@ -145,15 +177,6 @@ typedef struct LightningStrike { /* 0x08 */ f32 delayTimer; } LightningStrike; // size = 0xC -typedef struct { - /* 0x0 */ u16 startTime; - /* 0x2 */ u16 endTime; - /* 0x4 */ u8 skybox1Index; - /* 0x5 */ u8 skybox2Index; - /* 0x6 */ u8 color1Index; - /* 0x7 */ u8 color2Index; -} TimeBasedSkyboxEntry; // size = 0x8 - #define ENV_FOGNEAR_MAX 996 #define ENV_ZFAR_MAX 15000 @@ -298,7 +321,7 @@ void Environment_LerpSandstormColors(Color_RGBA8* colorSrc, Color_RGBA8* colorDs u8 func_800FE9B4(struct PlayState* play); void func_800FEA50(struct PlayState* play); void func_800FEAB0(void); -void func_800FEAF4(EnvironmentContext* envCtx); +void Environment_NewDay(EnvironmentContext* envCtx); // Data extern u8 gWeatherMode; diff --git a/include/z64save.h b/include/z64save.h index 67449a178..c063fbd37 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -451,11 +451,12 @@ typedef enum { #define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT) #define CURRENT_DAY (((void)0, gSaveContext.save.day) % 5) +#define CURRENT_TIME ((void)0, gSaveContext.save.time) // The day begins at CLOCK_TIME(6, 0) so it must be offset. #define TIME_UNTIL_MOON_CRASH \ - ((4 - CURRENT_DAY) * DAY_LENGTH - (u16)(((void)0, gSaveContext.save.time) - CLOCK_TIME(6, 0))) -#define TIME_UNTIL_NEW_DAY (DAY_LENGTH - (u16)(((void)0, gSaveContext.save.time) - CLOCK_TIME(6, 0))) + ((4 - CURRENT_DAY) * DAY_LENGTH - (u16)(CURRENT_TIME - CLOCK_TIME(6, 0))) +#define TIME_UNTIL_NEW_DAY (DAY_LENGTH - (u16)(CURRENT_TIME - CLOCK_TIME(6, 0))) #define GET_PLAYER_FORM ((void)0, gSaveContext.save.playerForm) @@ -1581,7 +1582,7 @@ typedef enum { #define EVENTINF_47 0x47 #define EVENTINF_50 0x50 #define EVENTINF_51 0x51 -#define EVENTINF_52 0x52 +#define EVENTINF_HAS_DAYTIME_TRANSITION_CS 0x52 #define EVENTINF_53 0x53 #define EVENTINF_54 0x54 #define EVENTINF_55 0x55 |
