z_kankyo pt 1 (#1377)

* z64environment.h

* remove todo

* Cleanup

* data + bss + 2 functions

* Bring over simple functions

* Remove lerp comment

* code functions csv

* Remove docs changes

* ZBufValToFixedPoint

* Remove leading 0's

* SEGMENT macros

* eventDayCount

* format

* z64bombers_notebook.h

* fix merge

* Comments

---------

Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
Derek Hensley 2023-10-04 22:08:08 -07:00 committed by GitHub
parent d3104be63c
commit 03d1a794e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 1895 additions and 884 deletions

View File

@ -527,89 +527,6 @@ void Font_LoadChar(PlayState* play, u16 codePointIndex, s32 offset);
void Font_LoadCharNES(PlayState* play, u8 codePointIndex, s32 offset);
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon);
void Font_LoadOrderedFont(Font* font);
// void func_800F5090(void);
s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
void Environment_Init(PlayState* play, EnvironmentContext* envCtx, s32 arg2);
u32 func_800F5954(u8* param_1, u32 param_2, u32 param_3, u8 param_4, u8 param_5);
f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
// void func_800F5B10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxContext* skyboxCtx);
void func_800F6834(PlayState* play, s32 waterLightsIndex);
void func_800F694C(PlayState* play);
// void func_800F6A04(void);
// void func_800F6A40(void);
// void func_800F6AB8(void);
void func_800F6B44(PlayState* play, EnvironmentContext* envCtx, s32 iParm3, s32 iParm4, s16* param_5);
// void func_800F6CEC(void);
// void func_800F6EA4(void);
// UNK_TYPE4 Kankyo_IsSceneUpsideDown(PlayState* play);
void func_800F6FF8(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx);
// void func_800F8554(void);
// void func_800F88C4(void);
// void func_800F8970(void);
// void func_800F8A9C(void);
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx,
PauseContext* pauseCtx, MessageContext* msgCtx, GameOverContext* gameOverCtx,
GraphicsContext* gfxCtx);
// void func_800F8D84(void);
void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx, Vec3f pos);
void func_800F9824(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx, Vec3f vec, f32 arg5, f32 arg6, s8 arg7, s8 arg8);
// void func_800FA39C(void);
// void func_800FA3C4(void);
void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx);
void func_800FAAB4(PlayState* play, u8 arg1);
// void func_800FAC20(void);
// void func_800FAF74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_800FB010(void);
void Environment_AddLightningBolts(PlayState* play, u8 num);
// void func_800FB388(void);
void func_800FB758(PlayState* play);
// void func_800FB9B4(void);
void Environment_DrawCustomLensFlare(PlayState* play);
void Kankyo_InitGameOverLights(PlayState* play);
void Kankyo_FadeInGameOverLights(PlayState* play);
void Kankyo_FadeOutGameOverLights(PlayState* play);
// void func_800FC3DC(void);
void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, u8 alpha, u8 drawFlags);
void Environment_DrawSandstorm(PlayState* play, u8 sandstormState);
s32 func_800FD2B4(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
void func_800FD538(Color_RGB8* param_1, Color_RGB8* param_2, f32 param_3, Vec3s* param_4);
void Environment_LerpAmbientColor(PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpDiffuseColor(PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpFogColor(PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpFog(PlayState* play, s16 fogNearTarget, s16 zFarTarget, f32 lerp);
// u32 get_days_elapsed(void);
// void reset_days_elapsed(void);
// u32 get_current_day(void);
void func_800FD750(u16 seqId);
s32 func_800FD768(void);
void func_800FD78C(PlayState* play);
void func_800FD858(PlayState* play);
void func_800FD928(s32 param_1);
// void func_800FD980(void);
// void func_800FDAF8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800FDC94(void);
void func_800FE390(PlayState* play);
void func_800FE3E0(PlayState* play);
void Environment_StopTime(void);
void Environment_StartTime(void);
u8 Environment_IsTimeStopped(void);
u32 func_800FE4B8(PlayState* play);
s32 func_800FE590(PlayState* play);
// void func_800FE5D0(void);
// UNK_TYPE4 func_800FE610(void);
u32 func_800FE620(PlayState* play);
void func_800FE658(f32 arg0);
// UNK_TYPE4 func_800FE6F8(UNK_TYPE4 param_1, s16 param_2, s16 param_3);
// void func_800FE778(void);
// void func_800FE788(void);
// void func_800FE798(void);
void func_800FE7A8(Color_RGBA8* inColor, Color_RGBA8* outColor);
s32 func_800FE9B4(PlayState* play);
void func_800FEA50(PlayState* play);
void func_800FEAB0(void);
// void func_800FEAC0(void);
void func_800FEAF4(EnvironmentContext* envCtx);
void* Lib_MemCpy(void* dest, void* src, size_t size);
void* Lib_MemSet(void* buffer, s32 value, size_t size);
@ -620,7 +537,7 @@ void Lib_PlaySfx(u16 sfxId);
void Lib_PlaySfx_2(u16 sfxId);
void Lib_PlaySfx_AtPos(Vec3f* pos, u16 sfxId);
void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src, Vec3f* dst);
void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst);
void Color_RGB8_Lerp(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst);
void Lib_Nop801004FC(void);
void* Lib_SegmentedToVirtual(void* ptr);
void* Lib_SegmentedToVirtualNull(void* ptr);

View File

@ -146,8 +146,8 @@ typedef struct GraphicsContext {
/* 0x2D8 */ char unk_2D8[0x2];
/* 0x2DA */ u8 updateViMode;
/* 0x2DB */ u8 framebufferIndex;
/* 0x2DC */ void (*callback)(struct GraphicsContext*, u32);
/* 0x2E0 */ u32 callbackArg;
/* 0x2DC */ void (*callback)(struct GraphicsContext*, void*);
/* 0x2E0 */ void* callbackArg;
/* 0x2E4 */ f32 xScale;
/* 0x2E8 */ f32 yScale;
/* 0x2EC */ GfxMasterList* masterList;

View File

@ -32,6 +32,11 @@
#define SEGMENT_BSS_END(segment) (_ ## segment ## SegmentBssEnd)
#define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment))
#define ROM_FILE(name) \
{ (uintptr_t)SEGMENT_ROM_START(name), (uintptr_t)SEGMENT_ROM_END(name) }
#define ROM_FILE_UNSET \
{ 0 }
DECLARE_SEGMENT(boot)
DECLARE_ROM_SEGMENT(boot)

View File

@ -99,36 +99,6 @@ extern BgSpecialSceneMaxObjects sCustomDynapolyMem[];
// extern UNK_TYPE4 D_801BDAF8;
extern u8 kanfontOrdering[92];
// extern UNK_TYPE4 D_801BDB90;
// extern UNK_TYPE4 D_801BDB94;
// extern UNK_TYPE4 D_801BDB98;
// extern UNK_TYPE2 D_801BDB9C;
// extern UNK_TYPE1 D_801BDBA0;
// extern UNK_TYPE1 D_801BDBA4;
// extern UNK_TYPE1 D_801BDBA8;
extern u8 gWeatherMode;
// extern UNK_TYPE1 D_801BDBB4;
// extern UNK_TYPE1 D_801BDBB8;
// extern UNK_TYPE1 D_801BDBBC;
// extern UNK_TYPE1 D_801BDBC0;
// extern UNK_TYPE1 D_801BDBC4;
extern u8 D_801BDBC8;
// extern UNK_TYPE1 D_801BDBCC;
// extern UNK_TYPE1 D_801BDCF4;
// extern UNK_TYPE1 D_801BE38E;
// extern UNK_TYPE1 D_801BE38F;
// extern UNK_TYPE1 D_801BE390;
// extern UNK_TYPE1 D_801BE4D4;
// extern UNK_TYPE1 D_801BE4F4;
// extern UNK_TYPE1 D_801BE534;
// extern UNK_TYPE1 D_801BE6D4;
// extern UNK_TYPE1 D_801BE874;
// extern UNK_TYPE4 D_801BE894;
// extern UNK_TYPE4 D_801BE8BC;
// extern UNK_TYPE4 D_801BE8E4;
// extern UNK_TYPE1 D_801BE90C;
// extern UNK_TYPE1 D_801BE92C;
// extern UNK_TYPE1 D_801BE944;
// extern actor_init_var_func sInitChainHandlers[11];
// extern UNK_TYPE4 D_801BEAD4;
// extern UNK_TYPE4 D_801BEAD8;
@ -1683,43 +1653,6 @@ extern TriNorm D_801EF638;
extern SaveContext gSaveContext;
// extern UNK_TYPE1 D_801F4E20;
extern u8 D_801F4E30;
// extern UNK_TYPE1 D_801F4E31;
extern s8 D_801F4E32;
extern Vec3f D_801F4E38;
extern f32 D_801F4E44;
extern f32 D_801F4E48;
extern s16 D_801F4E4C;
extern s8 D_801F4E4E;
extern Vec3f D_801F4E50;
extern f32 D_801F4E5C;
extern f32 D_801F4E60;
extern s16 D_801F4E64;
extern u8 D_801F4E68;
extern f32 D_801F4E70;
// extern UNK_TYPE1 D_801F4E74;
extern u16 D_801F4E78;
extern s16 D_801F4E7A;
// extern UNK_TYPE1 D_801F4E80;
// extern UNK_TYPE1 D_801F4EE0;
// extern UNK_TYPE1 D_801F4EE8;
// extern UNK_TYPE1 D_801F4EF8;
// extern UNK_TYPE1 D_801F4F00;
// extern UNK_TYPE1 D_801F4F10;
// extern UNK_TYPE1 D_801F4F14;
// extern UNK_TYPE1 D_801F4F18;
// extern UNK_TYPE1 D_801F4F1C;
// extern UNK_TYPE1 D_801F4F20;
// extern UNK_TYPE1 D_801F4F24;
// extern UNK_TYPE1 D_801F4F28;
// extern UNK_TYPE1 D_801F4F2C;
// extern UNK_TYPE1 D_801F4F2E;
// extern UNK_TYPE1 D_801F4F30;
// extern UNK_TYPE1 D_801F4F31;
// extern UNK_TYPE1 D_801F4F32;
// extern UNK_TYPE1 D_801F4F33;
// extern UNK_TYPE1 D_801F4F34;
// extern UNK_TYPE1 D_801F4F38;
// extern UNK_TYPE1 sBeatingHeartsDDPrim;
// extern UNK_TYPE1 sBeatingHeartsDDEnv;
// extern UNK_TYPE1 sHeartsDDPrim;

View File

@ -40,6 +40,7 @@
#include "z64dma.h"
#include "z64eff_footmark.h"
#include "z64effect.h"
#include "z64environment.h"
#include "z64frameadvance.h"
#include "z64game_over.h"
#include "z64game.h"
@ -60,11 +61,13 @@
#include "z64skybox.h"
#include "z64sound_source.h"
#include "z64subs.h"
#include "z64rumble.h"
#include "z64transition.h"
#include "z64view.h"
#include "regs.h"
typedef struct {
typedef struct PauseContext {
/* 0x000 */ View view;
/* 0x168 */ u8* iconItemSegment;
/* 0x16C */ u8* iconItem24Segment;
@ -163,68 +166,6 @@ typedef enum {
/* 0x02 */ KALEID_OVL_MAX
} KaleidoMgrOverlayType;
typedef struct {
/* 0x00 */ u16 unk_0;
/* 0x02 */ u16 sceneTimeSpeed;
/* 0x04 */ Vec3f sunPos;
/* 0x10 */ u8 skybox1Index;
/* 0x11 */ u8 skybox2Index;
/* 0x12 */ u8 unk_12;
/* 0x13 */ u8 skyboxBlend;
/* 0x14 */ u8 unk_14;
/* 0x15 */ u8 skyboxDisabled;
/* 0x16 */ u8 sunMoonDisabled;
/* 0x17 */ u8 skyboxConfig;
/* 0x18 */ u8 changeSkyboxNextConfig;
/* 0x19 */ u8 changeSkyboxState;
/* 0x1A */ u16 changeSkyboxTimer;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u8 lightMode;
/* 0x1F */ u8 lightConfig;
/* 0x20 */ u8 changeLightNextConfig;
/* 0x21 */ u8 changeLightEnabled;
/* 0x22 */ u16 changeLightTimer;
/* 0x24 */ u16 changeDuration;
/* 0x26 */ u8 unk_26;
/* 0x28 */ LightInfo dirLight1; // sun 1
/* 0x36 */ LightInfo unk_36; // sun 2
/* 0x44 */ s8 skyboxDmaState;
/* 0x48 */ DmaRequest dmaRequest;
/* 0x68 */ OSMesgQueue loadQueue;
/* 0x80 */ OSMesg loadMsg;
/* 0x84 */ f32 glareAlpha;
/* 0x88 */ f32 lensFlareAlphaScale;
/* 0x8C */ EnvLightSettings lightSettings;
/* 0xA8 */ f32 unk_A8;
/* 0xAC */ Vec3s windDir;
/* 0xB4 */ f32 windSpeed;
/* 0xB8 */ u8 numLightSettings;
/* 0xBC */ LightSettings* lightSettingsList;
/* 0xC0 */ u8 lightBlendEnabled;
/* 0xC1 */ u8 lightSetting;
/* 0xC2 */ u8 prevLightSetting;
/* 0xC3 */ u8 lightSettingOverride;
/* 0xC4 */ LightSettings unk_C4;
/* 0xDA */ u16 lightBlendRateOverride;
/* 0xDC */ f32 lightBlend;
/* 0xE0 */ u8 unk_E0;
/* 0xE1 */ u8 unk_E1;
/* 0xE2 */ s8 unk_E2;
/* 0xE3 */ u8 unk_E3; // modified by unused func in EnWeatherTag
/* 0xE4 */ u8 unk_E4;
/* 0xE5 */ u8 fillScreen;
/* 0xE6 */ u8 screenFillColor[4];
/* 0xEA */ u8 sandstormState;
/* 0xEB */ u8 sandstormPrimA;
/* 0xEC */ u8 sandstormEnvA;
/* 0xED */ u8 unk_ED;
/* 0xEE */ u8 unk_EE[4];
/* 0xF2 */ u8 unk_F2[8]; // [3] is used by both DemoKankyo and ObjectKankyo effect count
/* 0xFA */ u8 unk_FA[4];
} EnvironmentContext; // size = 0x100
struct PlayState;
typedef struct {
/* 0x0 */ u8 seqId;
/* 0x1 */ u8 ambienceId;

327
include/z64environment.h Normal file
View File

@ -0,0 +1,327 @@
#ifndef Z64ENVIRONMENT_H
#define Z64ENVIRONMENT_H
#include "PR/ultratypes.h"
#include "PR/os_message.h"
#include "z64math.h"
#include "z64dma.h"
#include "unk.h"
struct GameOverContext;
struct GraphicsContext;
struct LightContext;
struct MessageContext;
struct PauseContext;
struct PlayState;
struct SkyboxContext;
struct View;
#define FILL_SCREEN_OPA (1 << 0)
#define FILL_SCREEN_XLU (1 << 1)
#define NEXT_TIME_NONE 0xFFFF
#define NEXT_TIME_DAY CLOCK_TIME(12, 0)
#define NEXT_TIME_NIGHT CLOCK_TIME(0, 0)
#define NEXT_TIME_DAY_SET 0xFFFE
#define NEXT_TIME_NIGHT_SET 0xFFFD
#define LIGHT_SETTING_MAX 31
#define LIGHT_SETTING_OVERRIDE_NONE 0xFF
// This mode disables the updating of lights in both light modes.
// With this mode enabled, the only way lights can change is via the adjustment arrays.
// This mode is not used in the original game.
#define LIGHT_SETTING_OVERRIDE_FULL_CONTROL 0xFE
#define LIGHT_BLENDRATE_OVERRIDE_NONE 0xFFFF
#define LIGHT_BLEND_OVERRIDE_NONE 0
#define LIGHT_BLEND_OVERRIDE_ON 1
// This mode disables the light system's automatic blending between
// light settings for `LIGHT_MODE_SETTINGS` (or using a light setting override).
// This is a bit of a hack used only by bosses in the original game.
#define LIGHT_BLEND_OVERRIDE_FULL_CONTROL 2
typedef enum {
/* 0 */ LIGHT_MODE_TIME, // environment lights use `lightConfig` and change based on time of day
/* 1 */ LIGHT_MODE_SETTINGS // environment lights use `lightSetting`
} LightMode;
typedef enum {
/* 0 */ LIGHTNING_OFF, // no lightning
/* 1 */ LIGHTNING_ON, // request ligtning strikes at random intervals
/* 2 */ LIGHTNING_LAST // request one lightning strike before turning off
} LightningState;
typedef enum {
/* 0 */ LIGHTNING_STRIKE_WAIT, // wait between lightning strikes. request bolts when timer hits 0
/* 1 */ LIGHTNING_STRIKE_START, // fade in the flash. note: bolts are requested in the previous state
/* 2 */ LIGHTNING_STRIKE_END // fade out the flash and go back to wait
} LightningStrikeState;
typedef enum {
/* 0 */ WEATHER_MODE_CLEAR,
/* 1 */ WEATHER_MODE_1, // rain?
/* 2 */ WEATHER_MODE_2,
/* 3 */ WEATHER_MODE_SNOW
} WeatherMode;
typedef enum {
/* 0 */ CHANGE_SKYBOX_INACTIVE,
/* 1 */ CHANGE_SKYBOX_REQUESTED,
/* 2 */ CHANGE_SKYBOX_WAIT,
/* 3 */ CHANGE_SKYBOX_ACTIVE
} ChangeSkyboxState;
typedef enum {
/* 0 */ SKYBOX_DMA_INACTIVE,
/* 1 */ SKYBOX_DMA_TEXTURE1_START,
/* 11 */ SKYBOX_DMA_TEXTURE2_START = 11
} SkyboxDmaState;
//! @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
/* 1 */ PRECIP_RAIN_CUR, // current number of rain drops being drawn on screen
/* 2 */ PRECIP_SNOW_CUR, // current number of snowflakes being drawn on screen
/* 3 */ PRECIP_SNOW_MAX, // max number of snowflakes that can draw
/* 4 */ PRECIP_SOS_MAX, // max number of rain drops requested from song of storms specifically
/* 5 */ PRECIP_MAX
} PrecipitationData;
typedef enum {
/* 0 */ STORM_REQUEST_NONE,
/* 1 */ STORM_REQUEST_START,
/* 2 */ STORM_REQUEST_STOP
} StormRequest;
typedef enum {
/* 0 */ STORM_STATE_OFF,
/* 1 */ STORM_STATE_ON
} StormState;
typedef enum {
/* 0x00 */ TIMESEQ_DAY_BGM,
/* 0x01 */ TIMESEQ_FADE_DAY_BGM,
/* 0x02 */ TIMESEQ_NIGHT_BEGIN_SFX,
/* 0x03 */ TIMESEQ_EARLY_NIGHT_CRITTERS,
/* 0x04 */ TIMESEQ_NIGHT_DELAY,
/* 0x05 */ TIMESEQ_NIGHT_CRITTERS,
/* 0x06 */ TIMESEQ_DAY_BEGIN_SFX,
/* 0x07 */ TIMESEQ_MORNING_CRITTERS,
/* 0x08 */ TIMESEQ_DAY_DELAY,
/* 0xFE */ TIMESEQ_REQUEST = 0xFE,
/* 0xFF */ TIMESEQ_DISABLED
} TimeBasedSeqState;
#define SCENESEQ_DEFAULT 0
#define SCENESEQ_MORNING 0xFE
typedef enum {
/* 0x0 */ SANDSTORM_OFF,
/* 0x1 */ SANDSTORM_FILL,
/* 0x2 */ SANDSTORM_UNFILL,
/* 0x3 */ SANDSTORM_ACTIVE,
/* 0x4 */ SANDSTORM_DISSIPATE,
/* 0x5 */ SANDSTORM_5,
/* 0x6 */ SANDSTORM_6,
/* 0x7 */ SANDSTORM_7,
/* 0x8 */ SANDSTORM_8,
/* 0x9 */ SANDSTORM_9,
/* 0xA */ SANDSTORM_A,
/* 0xB */ SANDSTORM_B,
/* 0xC */ SANDSTORM_C,
/* 0xD */ SANDSTORM_D
} SandstormState;
typedef struct LightningStrike {
/* 0x00 */ u8 state;
/* 0x01 */ u8 flashRed;
/* 0x02 */ u8 flashGreen;
/* 0x03 */ u8 flashBlue;
/* 0x04 */ u8 flashAlphaTarget;
/* 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
typedef struct {
/* 0x00 */ u8 ambientColor[3];
/* 0x03 */ s8 light1Dir[3];
/* 0x06 */ u8 light1Color[3];
/* 0x09 */ s8 light2Dir[3];
/* 0x0C */ u8 light2Color[3];
/* 0x0F */ u8 fogColor[3];
/* 0x12 */ s16 fogNear; // ranges from 0-1000 (0: starts immediately, 1000: no fog), but is clamped to ENV_FOGNEAR_MAX
/* 0x14 */ s16 zFar; // Max depth (render distance) of the view as a whole. fogFar will always match zFar
} CurrentEnvLightSettings; // size = 0x16
// `EnvLightSettings` is very similar to `CurrentEnvLightSettings` with one key difference.
// The light settings data in the scene packs blend rate information with the fog near value.
// The blendRate determines how fast the current light settings fade to the next one
// (under LIGHT_MODE_SETTINGS, otherwise unused).
// Get blend rate from `EnvLightSettings.blendRateAndFogNear` in 0-255 range
#define ENV_LIGHT_SETTINGS_BLEND_RATE_U8(blendRateAndFogNear) (((blendRateAndFogNear) >> 10) * 4)
#define ENV_LIGHT_SETTINGS_FOG_NEAR(blendRateAndFogNear) ((blendRateAndFogNear) & 0x3FF)
typedef struct {
/* 0x00 */ u8 ambientColor[3];
/* 0x03 */ s8 light1Dir[3];
/* 0x06 */ u8 light1Color[3];
/* 0x09 */ s8 light2Dir[3];
/* 0x0C */ u8 light2Color[3];
/* 0x0F */ u8 fogColor[3];
/* 0x12 */ s16 blendRateAndFogNear;
/* 0x14 */ s16 zFar;
} EnvLightSettings; // size = 0x16
// ZAPD compatibility typedefs
// TODO: Remove when ZAPD adds support for them
typedef CurrentEnvLightSettings LightSettings;
typedef struct EnvironmentContext {
/* 0x00 */ u16 unk_0;
/* 0x02 */ u16 sceneTimeSpeed;
/* 0x04 */ Vec3f sunPos;
/* 0x10 */ u8 skybox1Index;
/* 0x11 */ u8 skybox2Index;
/* 0x12 */ u8 unk_12;
/* 0x13 */ u8 skyboxBlend;
/* 0x14 */ u8 unk_14;
/* 0x15 */ u8 skyboxDisabled;
/* 0x16 */ u8 sunDisabled;
/* 0x17 */ u8 skyboxConfig;
/* 0x18 */ u8 changeSkyboxNextConfig;
/* 0x19 */ u8 changeSkyboxState;
/* 0x1A */ u16 changeSkyboxTimer;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u8 lightMode;
/* 0x1F */ u8 lightConfig;
/* 0x20 */ u8 changeLightNextConfig;
/* 0x21 */ u8 changeLightEnabled;
/* 0x22 */ u16 changeLightTimer;
/* 0x24 */ u16 changeDuration;
/* 0x26 */ u8 unk_26;
/* 0x28 */ LightInfo dirLight1; // sun 1
/* 0x36 */ LightInfo dirLight2; // sun 2
/* 0x44 */ s8 skyboxDmaState;
/* 0x48 */ DmaRequest dmaRequest;
/* 0x68 */ OSMesgQueue loadQueue;
/* 0x80 */ OSMesg loadMsg[1];
/* 0x84 */ f32 glareAlpha;
/* 0x88 */ f32 lensFlareAlphaScale;
/* 0x8C */ AdjLightSettings adjLightSettings;
/* 0xA8 */ f32 unk_A8;
/* 0xAC */ Vec3s windDirection;
/* 0xB4 */ f32 windSpeed;
/* 0xB8 */ u8 numLightSettings;
/* 0xBC */ EnvLightSettings* lightSettingsList; // list of light settings from the scene file
/* 0xC0 */ u8 lightBlendEnabled; // only used with `LIGHT_MODE_SETTINGS` or on override
/* 0xC1 */ u8 lightSetting; // only used with `LIGHT_MODE_SETTINGS` or on override
/* 0xC2 */ u8 prevLightSetting;
/* 0xC3 */ u8 lightSettingOverride;
/* 0xC4 */ CurrentEnvLightSettings lightSettings; // settings for the currently "live" lights
/* 0xDA */ u16 lightBlendRateOverride;
/* 0xDC */ f32 lightBlend;
/* 0xE0 */ u8 lightBlendOverride;
/* 0xE1 */ u8 stormRequest;
/* 0xE2 */ u8 stormState;
/* 0xE3 */ u8 lightningState; // modified by unused func in EnWeatherTag
/* 0xE4 */ u8 timeSeqState;
/* 0xE5 */ u8 fillScreen;
/* 0xE6 */ u8 screenFillColor[4];
/* 0xEA */ u8 sandstormState;
/* 0xEB */ u8 sandstormPrimA;
/* 0xEC */ u8 sandstormEnvA;
/* 0xED */ u8 customSkyboxFilter;
/* 0xEE */ u8 skyboxFilterColor[4];
/* 0xF2 */ u8 precipitation[PRECIP_MAX];
/* 0xF7 */ UNK_TYPE1 unk_FA[9];
} EnvironmentContext; // size = 0x100
s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
void Environment_Init(struct PlayState* play2, EnvironmentContext* envCtx, s32 arg2);
u8 Environment_SmoothStepToU8(u8* pvalue, u8 target, u8 scale, u8 step, u8 minStep);
f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
f32 Environment_LerpWeightAccelDecel(u16 endFrame, u16 startFrame, u16 curFrame, u16 accelDuration, u16 decelDuration);
void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, struct SkyboxContext* skyboxCtx);
void Environment_EnableUnderwaterLights(struct PlayState* play, s32 waterLightsIndex);
void Environment_DisableUnderwaterLights(struct PlayState* play);
void Environment_Update(struct PlayState* play, EnvironmentContext* envCtx, struct LightContext* lightCtx,
struct PauseContext* pauseCtx, struct MessageContext* msgCtx, struct GameOverContext* gameOverCtx,
struct GraphicsContext* gfxCtx);
void Environment_DrawSunLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view, struct GraphicsContext* gfxCtx, Vec3f vec);
void Environment_DrawLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view, struct GraphicsContext* gfxCtx, Vec3f pos, f32 scale, f32 colorIntensity, s16 glareStrength, u8 isSun);
void Environment_DrawRain(struct PlayState* play, struct View* view, struct GraphicsContext* gfxCtx);
void Environment_ChangeLightSetting(struct PlayState* play, u8 lightSetting);
void Environment_AddLightningBolts(struct PlayState* play, u8 num);
void Environment_PlaySceneSequence(struct PlayState* play);
void Environment_DrawCustomLensFlare(struct PlayState* play);
void Environment_InitGameOverLights(struct PlayState* play);
void Environment_FadeInGameOverLights(struct PlayState* play);
void Environment_FadeOutGameOverLights(struct PlayState* play);
void Environment_FillScreen(struct GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, u8 alpha, u8 drawFlags);
void Environment_DrawSandstorm(struct PlayState* play, u8 sandstormState);
s32 Environment_AdjustLights(struct PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
void Environment_LerpAmbientColor(struct PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpDiffuseColor(struct PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpFogColor(struct PlayState* play, Color_RGB8* to, f32 lerp);
void Environment_LerpFog(struct PlayState* play, s16 fogNearTarget, s16 fogFarTarget, f32 lerp);
void Environment_ForcePlaySequence(u16 seqId);
s32 Environment_IsForcedSequenceDisabled(void);
void Environment_PlayStormNatureAmbience(struct PlayState* play);
void Environment_StopStormNatureAmbience(struct PlayState* play);
void Environment_Draw(struct PlayState* play);
void Environment_DrawSkyboxStars(struct PlayState* play);
void Environment_StopTime(void);
void Environment_StartTime(void);
u8 Environment_IsTimeStopped(void);
u32 Environment_GetStormState(struct PlayState* play);
u8 Environment_IsFinalHours(struct PlayState* play);
u16 Environment_GetTimeSpeed(struct PlayState* play);
void Environment_SetTimeJump(f32 minutes);
u8 func_800FE6F8(struct PlayState* play, s16 timeAdvanceScaling, s16 nextTimeLimit);
void Environment_LerpSandstormColors(Color_RGBA8* colorSrc, Color_RGBA8* colorDst);
u8 func_800FE9B4(struct PlayState* play);
void func_800FEA50(struct PlayState* play);
void func_800FEAB0(void);
void func_800FEAF4(EnvironmentContext* envCtx);
// Data
extern u8 gWeatherMode;
extern u8 gLightConfigAfterUnderwater;
extern u8 gInterruptSongOfStorms;
extern u8 gSceneSeqState;
// Bss
extern u8 D_801F4E30;
extern u8 gCustomLensFlare1On;
extern Vec3f gCustomLensFlare1Pos;
extern f32 D_801F4E44;
extern f32 D_801F4E48;
extern s16 D_801F4E4C;
extern u8 gCustomLensFlare2On;
extern Vec3f gCustomLensFlare2Pos;
extern f32 D_801F4E5C;
extern f32 D_801F4E60;
extern s16 D_801F4E64;
extern struct LightningStrike gLightningStrike;
extern f32 D_801F4E74;
extern u16 D_801F4E78;
extern u16 gSkyboxNumStars;
#endif

View File

@ -8,26 +8,14 @@
struct PlayState;
typedef struct {
/* 0x00 */ u8 ambientColor[3];
/* 0x03 */ s8 diffuseDir1[3];
/* 0x06 */ u8 diffuseColor1[3];
/* 0x09 */ s8 diffusePos2[3];
/* 0x0C */ u8 diffuseColor[3];
/* 0x0F */ u8 fogColor[3];
/* 0x12 */ s16 fogNear;
/* 0x14 */ s16 zFar;
} LightSettings; // size = 0x16
typedef struct {
/* 0x00 */ s16 ambientColor[3];
/* 0x06 */ s16 diffuseColor1[3];
/* 0x0C */ s16 diffuseColor2[3];
/* 0x06 */ s16 light1Color[3];
/* 0x0C */ s16 light2Color[3];
/* 0x12 */ s16 fogColor[3];
/* 0x18 */ s16 fogNear;
/* 0x1A */ s16 zFar;
} EnvLightSettings; // size = 0x1C
} AdjLightSettings; // size = 0x1C
typedef struct {
/* 0x0 */ s16 x;
@ -77,8 +65,8 @@ typedef struct LightsBuffer {
typedef struct LightContext {
/* 0x0 */ LightNode* listHead;
/* 0x4 */ Color_RGB8 ambient;
/* 0x7 */ Color_RGB8 fogColor;
/* 0x4 */ u8 ambientColor[3];
/* 0x7 */ u8 fogColor[3];
/* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - 996
/* 0xC */ s16 zFar; // draw distance. range 0 - 12800
} LightContext; // size = 0x10

View File

@ -327,7 +327,7 @@ typedef struct Save {
/* 0x10 */ s32 isNight; // "asahiru_fg"
/* 0x14 */ s32 timeSpeedOffset; // "change_zelda_time"
/* 0x18 */ s32 day; // "totalday"
/* 0x1C */ s32 daysElapsed; // "eventday"
/* 0x1C */ s32 eventDayCount; // "eventday"
/* 0x20 */ u8 playerForm; // "player_character"
/* 0x21 */ u8 snowheadCleared; // "spring_flag"
/* 0x22 */ u8 hasTatl; // "bell_flag"

2
spec
View File

@ -476,8 +476,6 @@ beginseg
include "build/src/code/z_kaleido_setup.o"
include "build/src/code/z_kanfont.o"
include "build/src/code/z_kankyo.o"
include "build/data/code/z_kankyo.data.o"
include "build/data/code/z_kankyo.bss.o"
include "build/src/code/z_lib.o"
include "build/src/code/z_lifemeter.o"
include "build/src/code/z_lights.o"

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "z64.h"
#include "regs.h"
#include "functions.h"

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "z64.h"
#include "regs.h"
#include "functions.h"

View File

@ -12,7 +12,7 @@ void SaveContext_Init(void) {
gSaveContext.nextCutsceneIndex = 0xFFEF;
gSaveContext.cutsceneTrigger = 0;
gSaveContext.chamberCutsceneNum = 0;
gSaveContext.nextDayTime = 0xFFFF;
gSaveContext.nextDayTime = NEXT_TIME_NONE;
gSaveContext.skyboxTime = 0;
gSaveContext.dogIsLost = true;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;

View File

@ -1,6 +1,4 @@
#include "PR/ultratypes.h"
#include "prevent_bss_reordering.h"
#include "prevent_bss_reordering2.h"
// Variables are put before most headers as a hacky way to bypass bss reordering
struct CutsceneCamera;
@ -13,6 +11,15 @@ static s16 sBssPad;
u8 gDisablePlayerCsModeStartPos;
s16 gDungeonBossWarpSceneId;
#include "prevent_bss_reordering.h"
#include "prevent_bss_reordering2.h"
// clang-format off
// Partial structs taken from "prevent_bss_reordering.h"
struct Dummy200 { int x; };
struct Dummy201 { int x; };
struct Dummy202 { int x; };
// clang-format on
#include "global.h"
#include "z64quake.h"
#include "z64rumble.h"
@ -154,8 +161,8 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
switch (cmd->type) {
case CS_MISC_RAIN:
if (isFirstFrame) {
func_800FD78C(play);
play->envCtx.unk_F2[0] = 60;
Environment_PlayStormNatureAmbience(play);
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 60;
}
break;
@ -163,19 +170,19 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
if (isFirstFrame) {
Audio_SetAmbienceChannelIO(AMBIENCE_CHANNEL_LIGHTNING, CHANNEL_IO_PORT_0, 0);
Environment_AddLightningBolts(play, 3);
D_801F4E68 = 1;
gLightningStrike.state = LIGHTNING_STRIKE_START;
}
break;
case CS_MISC_LIFT_FOG:
if (play->envCtx.lightSettings.zFar < 12800) {
play->envCtx.lightSettings.zFar += 35;
if (play->envCtx.adjLightSettings.zFar < 12800) {
play->envCtx.adjLightSettings.zFar += 35;
}
break;
case CS_MISC_CLOUDY_SKY:
if (isFirstFrame) {
play->envCtx.changeSkyboxState = 1;
play->envCtx.changeSkyboxState = CHANGE_SKYBOX_REQUESTED;
play->envCtx.skyboxConfig = 1;
play->envCtx.changeSkyboxNextConfig = 0;
play->envCtx.changeSkyboxTimer = 60;
@ -238,16 +245,16 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
case CS_MISC_RED_PULSATING_LIGHTS:
if (play->state.frames & 8) {
if (play->envCtx.lightSettings.ambientColor[0] < 40) {
play->envCtx.lightSettings.ambientColor[0] += 2;
play->envCtx.lightSettings.diffuseColor1[1] -= 3;
play->envCtx.lightSettings.diffuseColor1[2] -= 3;
if (play->envCtx.adjLightSettings.ambientColor[0] < 40) {
play->envCtx.adjLightSettings.ambientColor[0] += 2;
play->envCtx.adjLightSettings.light1Color[1] -= 3;
play->envCtx.adjLightSettings.light1Color[2] -= 3;
}
} else {
if (play->envCtx.lightSettings.ambientColor[0] > 2) {
play->envCtx.lightSettings.ambientColor[0] -= 2;
play->envCtx.lightSettings.diffuseColor1[1] += 3;
play->envCtx.lightSettings.diffuseColor1[2] += 3;
if (play->envCtx.adjLightSettings.ambientColor[0] > 2) {
play->envCtx.adjLightSettings.ambientColor[0] -= 2;
play->envCtx.adjLightSettings.light1Color[1] += 3;
play->envCtx.adjLightSettings.light1Color[2] += 3;
}
}
break;
@ -262,7 +269,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
case CS_MISC_SANDSTORM_FILL:
if (isFirstFrame) {
play->envCtx.sandstormState = 1;
play->envCtx.sandstormState = SANDSTORM_FILL;
}
Audio_PlaySfx_2(NA_SE_EV_SAND_STORM - SFX_FLAG);
break;
@ -409,7 +416,7 @@ void CutsceneCmd_SetLightSetting(PlayState* play, CutsceneContext* csCtx, CsCmdL
play->envCtx.lightSettingOverride = cmd->settingPlusOne - 1;
play->envCtx.lightBlend = 1.0f;
} else {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
}
}

View File

@ -15,7 +15,7 @@ void GameOver_FadeLights(PlayState* play) {
if ((gameOverCtx->state >= GAMEOVER_DEATH_WAIT_GROUND && gameOverCtx->state < GAMEOVER_REVIVE_START) ||
(gameOverCtx->state >= GAMEOVER_REVIVE_RUMBLE && gameOverCtx->state < GAMEOVER_REVIVE_FADE_OUT)) {
Kankyo_FadeInGameOverLights(play);
Environment_FadeInGameOverLights(play);
}
}
@ -66,7 +66,7 @@ void GameOver_Update(PlayState* play) {
gSaveContext.nextHudVisibility = HUD_VISIBILITY_IDLE;
gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
gSaveContext.hudVisibilityTimer = 0;
Kankyo_InitGameOverLights(play);
Environment_InitGameOverLights(play);
sGameOverTimer = 20;
Rumble_Request(0.0f, 126, 124, 63);
gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND;
@ -92,7 +92,7 @@ void GameOver_Update(PlayState* play) {
case GAMEOVER_REVIVE_START:
gameOverCtx->state++; // GAMEOVER_REVIVE_RUMBLE
sGameOverTimer = 0;
Kankyo_InitGameOverLights(play);
Environment_InitGameOverLights(play);
ShrinkWindow_Letterbox_SetSizeTarget(32);
break;
@ -119,7 +119,7 @@ void GameOver_Update(PlayState* play) {
break;
case GAMEOVER_REVIVE_FADE_OUT:
Kankyo_FadeOutGameOverLights(play);
Environment_FadeOutGameOverLights(play);
sGameOverTimer--;
if (sGameOverTimer == 0) {
gameOverCtx->state = GAMEOVER_INACTIVE;

File diff suppressed because it is too large Load Diff

View File

@ -663,7 +663,7 @@ void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src,
dst->z = translation->z + (src->z * cos - src->x * sin);
}
void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
void Color_RGB8_Lerp(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
f32 aF;
aF = a->r;

View File

@ -257,15 +257,15 @@ void LightContext_Init(PlayState* play, LightContext* lightCtx) {
}
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
lightCtx->ambient.r = r;
lightCtx->ambient.g = g;
lightCtx->ambient.b = b;
lightCtx->ambientColor[0] = r;
lightCtx->ambientColor[1] = g;
lightCtx->ambientColor[2] = b;
}
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) {
lightCtx->fogColor.r = r;
lightCtx->fogColor.g = g;
lightCtx->fogColor.b = b;
lightCtx->fogColor[0] = r;
lightCtx->fogColor[1] = g;
lightCtx->fogColor[2] = b;
lightCtx->fogNear = near;
lightCtx->zFar = far;
}
@ -274,7 +274,7 @@ void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16
* Allocate a new Lights group and initilize the ambient color with that provided by LightContext
*/
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx) {
return Lights_New(gfxCtx, lightCtx->ambient.r, lightCtx->ambient.g, lightCtx->ambient.b);
return Lights_New(gfxCtx, lightCtx->ambientColor[0], lightCtx->ambientColor[1], lightCtx->ambientColor[2]);
}
void LightContext_InitList(PlayState* play, LightContext* lightCtx) {

View File

@ -5432,7 +5432,7 @@ void Interface_StartMoonCrash(PlayState* play) {
}
gSaveContext.save.day = 4;
gSaveContext.save.daysElapsed = 4;
gSaveContext.save.eventDayCount = 4;
gSaveContext.save.time = CLOCK_TIME(6, 0) + 10;
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12);
gSaveContext.nextCutsceneIndex = 0;

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "z64.h"
#include "regs.h"
#include "functions.h"
@ -360,8 +361,8 @@ void Play_ClearTransition(PlayState* this) {
Gfx* Play_SetFog(PlayState* this, Gfx* gfx) {
s32 fogFar = this->lightCtx.zFar * (5.0f / 64.0f);
return Gfx_SetFogWithSync(gfx, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g, this->lightCtx.fogColor.b, 0,
this->lightCtx.fogNear, ((fogFar <= 1000) ? 1000 : fogFar));
return Gfx_SetFogWithSync(gfx, this->lightCtx.fogColor[0], this->lightCtx.fogColor[1], this->lightCtx.fogColor[2],
0, this->lightCtx.fogNear, ((fogFar <= 1000) ? 1000 : fogFar));
}
void Play_Destroy(GameState* thisx) {
@ -524,7 +525,7 @@ void Play_UpdateWaterCamera(PlayState* this, Camera* camera) {
}
func_801A3EC0(0x20);
func_800F6834(this, lightIndex);
Environment_EnableUnderwaterLights(this, lightIndex);
if ((sQuakeIndex == -1) || (Quake_GetTimeLeft(sQuakeIndex) == 10)) {
s16 quakeIndex = Quake_Request(camera, QUAKE_TYPE_5);
@ -553,7 +554,7 @@ void Play_UpdateWaterCamera(PlayState* this, Camera* camera) {
if (sQuakeIndex != 0) {
Quake_RemoveRequest(sQuakeIndex);
}
func_800F694C(this);
Environment_DisableUnderwaterLights(this);
func_801A3EC0(0);
}
}
@ -585,20 +586,20 @@ void Play_UpdateTransition(PlayState* this) {
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) ||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) &&
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE))) &&
(!func_800FE590(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
(!Environment_IsFinalHours(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS))) {
func_801A4058(20);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
}
if (func_800FD768()) {
if (Environment_IsForcedSequenceDisabled()) {
func_801A4058(20);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
}
if (func_800FE590(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
if (Environment_IsFinalHours(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS)) {
func_801A41C8(20);
}
@ -824,10 +825,10 @@ void Play_UpdateTransition(PlayState* this) {
case TRANS_MODE_SANDSTORM_INIT:
if (this->transitionTrigger != TRANS_TRIGGER_END) {
this->envCtx.sandstormState = 1;
this->envCtx.sandstormState = SANDSTORM_FILL;
this->transitionMode = TRANS_MODE_SANDSTORM;
} else {
this->envCtx.sandstormState = 2;
this->envCtx.sandstormState = SANDSTORM_UNFILL;
this->envCtx.sandstormPrimA = 255;
this->envCtx.sandstormEnvA = 255;
this->transitionMode = TRANS_MODE_SANDSTORM;
@ -856,7 +857,7 @@ void Play_UpdateTransition(PlayState* this) {
case TRANS_MODE_SANDSTORM_END_INIT:
if (this->transitionTrigger == TRANS_TRIGGER_END) {
this->envCtx.sandstormState = 4;
this->envCtx.sandstormState = SANDSTORM_DISSIPATE;
this->envCtx.sandstormPrimA = 255;
this->envCtx.sandstormEnvA = 255;
@ -1144,8 +1145,8 @@ void Play_DrawMain(PlayState* this) {
if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.curRoom.roomShape->base.type == ROOM_SHAPE_TYPE_IMAGE)) {
func_8012CF0C(gfxCtx, false, true, 0, 0, 0);
} else {
func_8012CF0C(gfxCtx, true, true, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g,
this->lightCtx.fogColor.b);
func_8012CF0C(gfxCtx, true, true, this->lightCtx.fogColor[0], this->lightCtx.fogColor[1],
this->lightCtx.fogColor[2]);
}
} else {
func_8012CF0C(gfxCtx, false, false, 0, 0, 0);
@ -1292,7 +1293,7 @@ void Play_DrawMain(PlayState* this) {
}
}
func_800FE390(this);
Environment_Draw(this);
}
sp268 = LightContext_NewLights(&this->lightCtx, gfxCtx);
@ -1324,8 +1325,7 @@ void Play_DrawMain(PlayState* this) {
}
}
// envCtx.precipitation[PRECIP_RAIN_CUR]
if (this->envCtx.unk_F2[1] != 0) {
if (this->envCtx.precipitation[PRECIP_RAIN_CUR] != 0) {
Environment_DrawRain(this, &this->view, gfxCtx);
}
}
@ -1339,7 +1339,7 @@ void Play_DrawMain(PlayState* this) {
}
if (1) {
if (!this->envCtx.sunMoonDisabled) {
if (!this->envCtx.sunDisabled) {
sp25C.x = this->view.eye.x + this->envCtx.sunPos.x;
sp25C.y = this->view.eye.y + this->envCtx.sunPos.y;
sp25C.z = this->view.eye.z + this->envCtx.sunPos.z;
@ -1367,7 +1367,7 @@ void Play_DrawMain(PlayState* this) {
}
if (1) {
if (this->envCtx.sandstormState != 0) {
if (this->envCtx.sandstormState != SANDSTORM_OFF) {
Environment_DrawSandstorm(this, this->envCtx.sandstormState);
}
}
@ -1440,7 +1440,7 @@ SkipPostWorldDraw:
}
if (!sp25B) {
func_800FE3E0(this);
Environment_DrawSkyboxStars(this);
}
CLOSE_DISPS(gfxCtx);
@ -2217,7 +2217,7 @@ void Play_Init(GameState* thisx) {
gSaveContext.save.cutsceneIndex = 0;
}
if (gSaveContext.nextDayTime != 0xFFFF) {
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {
gSaveContext.save.time = gSaveContext.nextDayTime;
gSaveContext.skyboxTime = gSaveContext.nextDayTime;
}
@ -2250,14 +2250,14 @@ void Play_Init(GameState* thisx) {
KaleidoScopeCall_Init(this);
Interface_Init(this);
if (gSaveContext.nextDayTime != 0xFFFF) {
if (gSaveContext.nextDayTime == 0x8000) {
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {
if (gSaveContext.nextDayTime == NEXT_TIME_DAY) {
gSaveContext.save.day++;
gSaveContext.save.daysElapsed++;
gSaveContext.save.eventDayCount++;
gSaveContext.dogIsLost = true;
gSaveContext.nextDayTime = -2;
gSaveContext.nextDayTime = NEXT_TIME_DAY_SET;
} else {
gSaveContext.nextDayTime = -3;
gSaveContext.nextDayTime = NEXT_TIME_NIGHT_SET;
}
}
@ -2348,7 +2348,7 @@ void Play_Init(GameState* thisx) {
CutsceneManager_StoreCamera(&this->mainCamera);
Interface_SetSceneRestrictions(this);
func_800FB758(this);
Environment_PlaySceneSequence(this);
gSaveContext.seqId = this->sequenceCtx.seqId;
gSaveContext.ambienceId = this->sequenceCtx.ambienceId;
AnimationContext_Update(this, &this->animationCtx);

View File

@ -581,12 +581,12 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) {
Actor_SpawnTransitionActors(play, &play->actorCtx);
if (((play->sceneId != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) && (play->sceneId != SCENE_IKNINSIDE)) {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.unk_E0 = 0;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
play->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_NONE;
}
func_800FEAB0();
if (!func_800FE4B8(play)) {
func_800FD858(play);
if (Environment_GetStormState(play) == STORM_STATE_OFF) {
Environment_StopStormNatureAmbience(play);
}
} else {
return 0;

View File

@ -255,7 +255,7 @@ void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
play->envCtx.unk_E2 = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
play->envCtx.stormState = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
}
// SceneTableEntry Header Command 0x0A: Mesh Header
@ -386,7 +386,7 @@ void Scene_CommandSkyboxSettings(PlayState* play, SceneCmd* cmd) {
// SceneTableEntry Header Command 0x12: Skybox Disables
void Scene_CommandSkyboxDisables(PlayState* play, SceneCmd* cmd) {
play->envCtx.skyboxDisabled = cmd->skyboxDisables.unk4;
play->envCtx.sunMoonDisabled = cmd->skyboxDisables.unk5;
play->envCtx.sunDisabled = cmd->skyboxDisables.unk5;
}
// SceneTableEntry Header Command 0x10: Time Settings
@ -436,9 +436,9 @@ void Scene_CommandWindSettings(PlayState* play, SceneCmd* cmd) {
s8 temp2 = cmd->windSettings.vertical;
s8 temp3 = cmd->windSettings.south;
play->envCtx.windDir.x = temp1;
play->envCtx.windDir.y = temp2;
play->envCtx.windDir.z = temp3;
play->envCtx.windDirection.x = temp1;
play->envCtx.windDirection.y = temp2;
play->envCtx.windDirection.z = temp3;
play->envCtx.windSpeed = cmd->windSettings.clothIntensity;
}

View File

@ -430,7 +430,7 @@ void Sram_SaveEndOfCycle(PlayState* play) {
u8 item;
gSaveContext.save.timeSpeedOffset = 0;
gSaveContext.save.daysElapsed = 0;
gSaveContext.save.eventDayCount = 0;
gSaveContext.save.day = 0;
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
@ -650,7 +650,7 @@ void Sram_SaveEndOfCycle(PlayState* play) {
void Sram_IncrementDay(void) {
if (CURRENT_DAY <= 3) {
gSaveContext.save.day++;
gSaveContext.save.daysElapsed++;
gSaveContext.save.eventDayCount++;
}
gSaveContext.save.saveInfo.bombersCaughtNum = 0;
@ -918,7 +918,7 @@ u16 sSaveDefaultChecksum = 0;
*/
void Sram_InitNewSave(void) {
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
gSaveContext.save.daysElapsed = 0;
gSaveContext.save.eventDayCount = 0;
gSaveContext.save.day = 0;
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
Sram_ResetSave();

View File

@ -338,8 +338,8 @@ void func_808B7A90(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
func_800FE7A8(D_808B82F0, &sp2C);
func_800FE7A8(D_808B8300, &sp28);
Environment_LerpSandstormColors(D_808B82F0, &sp2C);
Environment_LerpSandstormColors(D_808B8300, &sp28);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, sp2C.r, sp2C.g, sp2C.b, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sp28.r, sp28.g, sp28.b, 255);
@ -358,15 +358,15 @@ void func_808B7B54(Actor* thisx, PlayState* play) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_800FE7A8(D_808B8310, &sp50);
func_800FE7A8(D_808B8330, &sp4C);
Environment_LerpSandstormColors(D_808B8310, &sp50);
Environment_LerpSandstormColors(D_808B8330, &sp4C);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, sp50.r, sp50.g, sp50.b, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sp4C.r, sp4C.g, sp4C.b, 255);
gSPDisplayList(POLY_XLU_DISP++, object_posthouse_obj_DL_000A50);
func_800FE7A8(D_808B8320, &sp50);
func_800FE7A8(D_808B8340, &sp4C);
Environment_LerpSandstormColors(D_808B8320, &sp50);
Environment_LerpSandstormColors(D_808B8340, &sp4C);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, sp50.r, sp50.g, sp50.b, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sp4C.r, sp4C.g, sp4C.b, 255);

View File

@ -1320,7 +1320,7 @@ void Boss02_Static_Update(Actor* thisx, PlayState* play) {
Boss02* this = THIS;
this->giantModeScaleFactor = sGiantModeScaleFactor;
play->envCtx.sandstormState = 0xD;
play->envCtx.sandstormState = SANDSTORM_D;
if (sBlueWarp != NULL) {
this->fogNear = KREG(23) + -15.0f;
@ -1828,7 +1828,7 @@ void Boss02_HandleGiantsMaskCutscene(Boss02* this, PlayState* play) {
Actor_SetScale(&player->actor, this->playerScale);
}
play->envCtx.lightSettings.fogNear = this->fogNear;
play->envCtx.adjLightSettings.fogNear = this->fogNear;
// Switches from the "normal" variation of the arena to the "giant" variation (or vice versa)
// at the appropriate point in the Giant's Mask cutscene.

View File

@ -431,26 +431,26 @@ void Boss06_Update(Actor* thisx, PlayState* play) {
if (this->unk_1E4 > 0.0f) {
if (ENBOSS06_GET_PARAMS(&this->actor) == 0) {
D_801F4E32 = 1;
D_801F4E38.x = this->actor.world.pos.x + this->unk_1B0;
D_801F4E38.y = this->actor.world.pos.y + 80.0f + this->unk_1B4 + this->unk_1AC;
D_801F4E38.z = this->actor.world.pos.z;
gCustomLensFlare1On = true;
gCustomLensFlare1Pos.x = this->actor.world.pos.x + this->unk_1B0;
gCustomLensFlare1Pos.y = this->actor.world.pos.y + 80.0f + this->unk_1B4 + this->unk_1AC;
gCustomLensFlare1Pos.z = this->actor.world.pos.z;
D_801F4E44 = this->unk_1E4;
D_801F4E48 = 10.0f;
D_801F4E4C = 0;
} else {
D_801F4E4E = 1;
D_801F4E50.x = this->actor.world.pos.x + this->unk_1B0;
D_801F4E50.y = this->actor.world.pos.y + 80.0f + this->unk_1B4 + this->unk_1AC;
D_801F4E50.z = this->actor.world.pos.z;
gCustomLensFlare2On = true;
gCustomLensFlare2Pos.x = this->actor.world.pos.x + this->unk_1B0;
gCustomLensFlare2Pos.y = this->actor.world.pos.y + 80.0f + this->unk_1B4 + this->unk_1AC;
gCustomLensFlare2Pos.z = this->actor.world.pos.z;
D_801F4E5C = this->unk_1E4;
D_801F4E60 = 10.0f;
D_801F4E64 = 0;
}
} else if (ENBOSS06_GET_PARAMS(&this->actor) == 0) {
D_801F4E32 = 0;
gCustomLensFlare1On = false;
} else {
D_801F4E4E = 0;
gCustomLensFlare2On = false;
}
if ((this->unk_1C8 != 0) && (this->unk_1C8 != 0)) {

View File

@ -335,10 +335,10 @@ void DemoEffect_DrawLight(Actor* thisx, PlayState* play2) {
CLOSE_DISPS(play->state.gfxCtx);
D_801F4E32 = 1;
D_801F4E38.x = thisx->world.pos.x;
D_801F4E38.y = thisx->world.pos.y;
D_801F4E38.z = thisx->world.pos.z;
gCustomLensFlare1On = true;
gCustomLensFlare1Pos.x = thisx->world.pos.x;
gCustomLensFlare1Pos.y = thisx->world.pos.y;
gCustomLensFlare1Pos.z = thisx->world.pos.z;
D_801F4E44 = thisx->scale.x * 60.0f;
D_801F4E48 = thisx->scale.x * 50.0f;

View File

@ -56,21 +56,21 @@ void DemoKakyo_LostWoodsSparkleActionFunc(DemoKankyo* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (play->roomCtx.unk7A[1] != 0) {
if (play->envCtx.unk_F2[3] != 0) {
play->envCtx.unk_F2[3]--;
if (play->envCtx.precipitation[PRECIP_SNOW_MAX] != 0) {
play->envCtx.precipitation[PRECIP_SNOW_MAX]--;
} else {
Actor_Kill(&this->actor);
}
} else if (play->envCtx.unk_F2[3] < DEMOKANKYO_EFFECT_COUNT) {
play->envCtx.unk_F2[3] += 16;
} else if (play->envCtx.precipitation[PRECIP_SNOW_MAX] < DEMOKANKYO_EFFECT_COUNT) {
play->envCtx.precipitation[PRECIP_SNOW_MAX] += 16;
}
// note: DemoKankyo can crash if placed in an area that snows (ObjectKankyo)
// because they both use unk_F2 as an effect counter,
// because they both use PRECIP_SNOW_MAX precipitation as an effect counter,
// causing DemoKankyo to write beyond its efffect array boundry
// this crash can occur if the two actors are in different scenes connected by an exit
// e.g. if you add DemoKankyo to GoronShrine, you will crash entering/leaving through door
for (i = 0; i < play->envCtx.unk_F2[3]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_MAX]; i++) {
repositionLimit = 130.0f;
eyeToAt.x = play->view.at.x - play->view.eye.x;
@ -304,8 +304,8 @@ void DemoKakyo_MoonSparklesActionFunc(DemoKankyo* this, PlayState* play) {
s32 pad1;
Vec3f worldPos;
if (play->envCtx.unk_F2[3] < DEMOKANKYO_EFFECT_COUNT) {
play->envCtx.unk_F2[3] += 16;
if (play->envCtx.precipitation[PRECIP_SNOW_MAX] < DEMOKANKYO_EFFECT_COUNT) {
play->envCtx.precipitation[PRECIP_SNOW_MAX] += 16;
}
eyeToAt.x = play->view.at.x - play->view.eye.x;
@ -318,7 +318,7 @@ void DemoKakyo_MoonSparklesActionFunc(DemoKankyo* this, PlayState* play) {
halfScreenHeight = SCREEN_HEIGHT / 2;
for (i = 0; i < play->envCtx.unk_F2[3]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_MAX]; i++) {
switch (this->effects[i].state) {
case DEMO_KANKYO_STATE_INIT:
this->effects[i].posBase.x = play->view.eye.x + (eyeToAtNormX * halfScreenHeight);
@ -511,7 +511,7 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, PlayState* play2) {
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(gSun1Tex));
gSPDisplayList(POLY_XLU_DISP++, gSunSparkleMaterialDL);
for (i = 0; i < play->envCtx.unk_F2[3]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_MAX]; i++) {
worldPos.x = this->effects[i].posBase.x + this->effects[i].posOffset.x;
worldPos.y = this->effects[i].posBase.y + this->effects[i].posOffset.y;
worldPos.z = this->effects[i].posBase.z + this->effects[i].posOffset.z;
@ -601,7 +601,7 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) {
Gfx_SetupDL25_Xlu(gfxCtx);
for (i = 0; i < play->envCtx.unk_F2[3]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_MAX]; i++) {
worldPos.x = this->effects[i].posBase.x + this->effects[i].posOffset.x;
worldPos.y = this->effects[i].posBase.y + this->effects[i].posOffset.y;
worldPos.z = this->effects[i].posBase.z + this->effects[i].posOffset.z;

View File

@ -499,8 +499,8 @@ void func_80C17468(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
func_800FE7A8(D_80C17824, &sp2C);
func_800FE7A8(D_80C17834, &sp28);
Environment_LerpSandstormColors(D_80C17824, &sp2C);
Environment_LerpSandstormColors(D_80C17834, &sp28);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, sp2C.r, sp2C.g, sp2C.b, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sp28.r, sp28.g, sp28.b, 255);

View File

@ -110,12 +110,13 @@ void func_80A1F75C(DmHina* this, PlayState* play) {
Math_SmoothStepToF(&this->unk14C, 1.0f, 0.4f, 0.05f, 0.001f);
this->unk17F = this->unk14C * 255.0f;
this->unk150 = Math_SinS(play->state.frames * 0x1F40);
for (i = 0; i < 3; i++) {
play->envCtx.lightSettings.ambientColor[i] = play->envCtx.lightSettings.fogColor[i] =
play->envCtx.lightSettings.diffuseColor1[i] = -255.0f * this->unk14C;
for (i = 0; i < ARRAY_COUNT(play->envCtx.adjLightSettings.light1Color); i++) {
play->envCtx.adjLightSettings.ambientColor[i] = play->envCtx.adjLightSettings.fogColor[i] =
play->envCtx.adjLightSettings.light1Color[i] = -255.0f * this->unk14C;
}
play->envCtx.lightSettings.fogNear = -500.0f * this->unk14C;
if (play->envCtx.lightSettings.fogNear < -300) {
play->envCtx.adjLightSettings.fogNear = -500.0f * this->unk14C;
if (play->envCtx.adjLightSettings.fogNear < -300) {
play->roomCtx.curRoom.segment = NULL;
}
break;

View File

@ -1073,9 +1073,9 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
this->deflectCount = 0;
this->maskType = SK_MASK_TYPE_NORMAL;
this->animIndex = SK_ANIM_IDLE;
this->fogR = play->lightCtx.fogColor.r;
this->fogG = play->lightCtx.fogColor.g;
this->fogB = play->lightCtx.fogColor.b;
this->fogR = play->lightCtx.fogColor[0];
this->fogG = play->lightCtx.fogColor[1];
this->fogB = play->lightCtx.fogColor[2];
if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneLayer == 1)) {
this->alpha = 0;
@ -1643,9 +1643,9 @@ void DmStk_HandleCutscene(DmStk* this, PlayState* play) {
this->fadeInState++;
}
this->fogR = play->lightCtx.fogColor.r * this->fogScale;
this->fogG = play->lightCtx.fogColor.g * this->fogScale;
this->fogB = play->lightCtx.fogColor.b * this->fogScale;
this->fogR = play->lightCtx.fogColor[0] * this->fogScale;
this->fogG = play->lightCtx.fogColor[1] * this->fogScale;
this->fogB = play->lightCtx.fogColor[2] * this->fogScale;
} else if (this->fadeInState == SK_FADE_IN_STATE_INCREASE_FOG) {
if (this->fogN < 996) {
this->fogN += 10;

View File

@ -178,10 +178,9 @@ void DoorWarp1_Destroy(Actor* thisx, PlayState* play) {
LightContext_RemoveLight(play, &play->lightCtx, this->unk_1DC);
LightContext_RemoveLight(play, &play->lightCtx, this->unk_1F0);
for (i = 0; i < ARRAY_COUNT(play->envCtx.lightSettings.diffuseColor1); i++) {
play->envCtx.lightSettings.diffuseColor1[i] = 0;
play->envCtx.lightSettings.fogColor[i] = play->envCtx.lightSettings.diffuseColor1[i];
play->envCtx.lightSettings.ambientColor[i] = play->envCtx.lightSettings.diffuseColor1[i];
for (i = 0; i < ARRAY_COUNT(play->envCtx.adjLightSettings.light1Color); i++) {
play->envCtx.adjLightSettings.ambientColor[i] = play->envCtx.adjLightSettings.fogColor[i] =
play->envCtx.adjLightSettings.light1Color[i] = 0;
}
if (this->unk_1D3 != 0) {
@ -781,7 +780,6 @@ void func_808BA550(DoorWarp1* this, PlayState* play) {
Player* player2 = GET_PLAYER(play);
Player* player = GET_PLAYER(play);
s16 i;
s32 temp_f16;
f32 temp_f0;
f32 temp_f2;
s32 temp;
@ -869,16 +867,13 @@ void func_808BA550(DoorWarp1* this, PlayState* play) {
if (1) {}
temp_f0 = 1.0f - ((f32)(D_808BC000 - this->unk_1D0) / ((D_808BC000 - tempS) + 100));
if (temp_f0 > 0.0f) {
temp_f16 = -255.0f * temp_f0;
for (i = 0; i < 3; i++) {
play->envCtx.lightSettings.diffuseColor1[i] = temp_f16;
play->envCtx.lightSettings.fogColor[i] = temp_f16;
play->envCtx.lightSettings.ambientColor[i] = temp_f16;
for (i = 0; i < ARRAY_COUNT(play->envCtx.adjLightSettings.light1Color); i++) {
play->envCtx.adjLightSettings.ambientColor[i] = play->envCtx.adjLightSettings.fogColor[i] =
play->envCtx.adjLightSettings.light1Color[i] = -255.0f * temp_f0;
}
play->envCtx.lightSettings.fogNear = -500.0f * temp_f0;
if (play->envCtx.lightSettings.fogNear < -300) {
play->envCtx.adjLightSettings.fogNear = -500.0f * temp_f0;
if (play->envCtx.adjLightSettings.fogNear < -300) {
play->roomCtx.curRoom.segment = NULL;
}
}

View File

@ -81,7 +81,7 @@ void func_80A4C5CC(EffChange* this, PlayState* play) {
if (func_80183DE0(&this->skeletonInfo)) {
Actor_Kill(&this->actor);
CutsceneManager_Stop(CS_ID_GLOBAL_ELEGY);
func_800FD2B4(play, 0.0f, 850.0f, 0.2f, 0.0f);
Environment_AdjustLights(play, 0.0f, 850.0f, 0.2f, 0.0f);
return;
}
@ -108,7 +108,7 @@ void func_80A4C5CC(EffChange* this, PlayState* play) {
} else if (phi_fv0 < 0.0f) {
phi_fv0 = 0.0f;
}
func_800FD2B4(play, phi_fv0, 850.0f, 0.2f, 0.0f);
Environment_AdjustLights(play, phi_fv0, 850.0f, 0.2f, 0.0f);
if (CutsceneManager_GetCurrentCsId() != CS_ID_GLOBAL_ELEGY) {
if (CutsceneManager_IsNext(CS_ID_GLOBAL_ELEGY)) {
CutsceneManager_Start(CS_ID_GLOBAL_ELEGY, &this->actor);

View File

@ -153,8 +153,8 @@ void EffKamejimaWave_Draw(Actor* thisx, PlayState* play) {
Color_RGBA8 primColor;
Color_RGBA8 envColor;
func_800FE7A8(sPrimColors, &primColor);
func_800FE7A8(sEnvColors, &envColor);
Environment_LerpSandstormColors(sPrimColors, &primColor);
Environment_LerpSandstormColors(sEnvColors, &envColor);
EffKamejimaWave_SetVtxAlpha(sVtxAlpha);
OPEN_DISPS(play->state.gfxCtx);

View File

@ -475,7 +475,7 @@ void EnAob01_BeforeRace_StartRace(EnAob01* this, PlayState* play) {
SET_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
this->stateFlags |= ENAOB01_FLAG_STARTED_RACE;
func_800FD750(NA_BGM_HORSE);
Environment_ForcePlaySequence(NA_BGM_HORSE);
play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;

View File

@ -1526,7 +1526,7 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
if (play->msgCtx.choiceIndex == 0) {
Audio_PlaySfx_MessageDecide();
play->msgCtx.msgMode = MSGMODE_PAUSED;
func_800FD750(NA_BGM_TIMED_MINI_GAME);
Environment_ForcePlaySequence(NA_BGM_TIMED_MINI_GAME);
func_80A94AB8(this, play, 1);
func_80A979DC(this, play);
} else {
@ -1571,7 +1571,7 @@ void func_80A97C4C(EnAz* this, PlayState* play) {
func_80A97410(this, play);
if ((this->unk_2FA == 1) || (this->unk_2FA == 3) || (this->unk_2FA == 6) || (this->unk_2FA == 8)) {
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_01);
func_800FD750(NA_BGM_TIMED_MINI_GAME);
Environment_ForcePlaySequence(NA_BGM_TIMED_MINI_GAME);
play->nextEntrance = Entrance_CreateFromSpawn(1);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -1009,7 +1009,7 @@ void EnBigslime_CallMinislime(EnBigslime* this, PlayState* play) {
EnBigslime_UpdateCameraIntroCs(this, play, 25);
Audio_PlayBgm_StorePrevBgm(NA_BGM_MINI_BOSS);
EnBigslime_InitFallMinislime(this);
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
this->callTimer = 35;
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
}
@ -1989,7 +1989,7 @@ void EnBigslime_Melt(EnBigslime* this, PlayState* play) {
if (this->meltCounter == 100) {
EnBigslime_SetTargetVtxFromPreFrozen(this);
} else if (this->meltCounter == 50) {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
}
@ -2777,7 +2777,7 @@ void EnBigslime_UpdateBigslime(Actor* thisx, PlayState* play) {
Vec3f vtxMin;
if (play->envCtx.lightSettingOverride == 3) {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
Audio_SetSfxUnderwaterReverb(true);
@ -2822,7 +2822,7 @@ void EnBigslime_UpdateGekko(Actor* thisx, PlayState* play) {
s32 pad;
if (play->envCtx.lightSettingOverride == 3) {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
Audio_SetSfxUnderwaterReverb(false);

View File

@ -356,28 +356,28 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider2.base);
}
if (play->envCtx.lightSettings.diffuseColor1[0] != 0) {
play->envCtx.lightSettings.diffuseColor1[0] -= 25;
if (play->envCtx.adjLightSettings.light1Color[0] != 0) {
play->envCtx.adjLightSettings.light1Color[0] -= 25;
}
if (play->envCtx.lightSettings.diffuseColor1[1] != 0) {
play->envCtx.lightSettings.diffuseColor1[1] -= 25;
if (play->envCtx.adjLightSettings.light1Color[1] != 0) {
play->envCtx.adjLightSettings.light1Color[1] -= 25;
}
if (play->envCtx.lightSettings.diffuseColor1[2] != 0) {
play->envCtx.lightSettings.diffuseColor1[2] -= 25;
if (play->envCtx.adjLightSettings.light1Color[2] != 0) {
play->envCtx.adjLightSettings.light1Color[2] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[0] != 0) {
play->envCtx.lightSettings.ambientColor[0] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[0] != 0) {
play->envCtx.adjLightSettings.ambientColor[0] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[1] != 0) {
play->envCtx.lightSettings.ambientColor[1] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[1] != 0) {
play->envCtx.adjLightSettings.ambientColor[1] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[2] != 0) {
play->envCtx.lightSettings.ambientColor[2] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[2] != 0) {
play->envCtx.adjLightSettings.ambientColor[2] -= 25;
}
if (this->timer == 0) {
@ -550,10 +550,10 @@ void EnBom_Update(Actor* thisx, PlayState* play) {
CLEAR_TAG_PARAMS(this->isPowderKeg));
Actor_RequestQuakeAndRumble(thisx, play, sQuakeY[this->isPowderKeg],
sQuakeDurations[this->isPowderKeg]);
play->envCtx.lightSettings.diffuseColor1[0] = play->envCtx.lightSettings.diffuseColor1[1] =
play->envCtx.lightSettings.diffuseColor1[2] = 250;
play->envCtx.lightSettings.ambientColor[0] = play->envCtx.lightSettings.ambientColor[1] =
play->envCtx.lightSettings.ambientColor[2] = 250;
play->envCtx.adjLightSettings.light1Color[0] = play->envCtx.adjLightSettings.light1Color[1] =
play->envCtx.adjLightSettings.light1Color[2] = 250;
play->envCtx.adjLightSettings.ambientColor[0] = play->envCtx.adjLightSettings.ambientColor[1] =
play->envCtx.adjLightSettings.ambientColor[2] = 250;
Camera_AddQuake(&play->mainCamera, 2, 11, 8);
thisx->params = BOMB_TYPE_EXPLOSION;
this->timer = 10;

View File

@ -273,28 +273,28 @@ void func_808AEFD4(EnBombf* this, PlayState* play) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
}
if (play->envCtx.lightSettings.diffuseColor1[0] != 0) {
play->envCtx.lightSettings.diffuseColor1[0] -= 25;
if (play->envCtx.adjLightSettings.light1Color[0] != 0) {
play->envCtx.adjLightSettings.light1Color[0] -= 25;
}
if (play->envCtx.lightSettings.diffuseColor1[1] != 0) {
play->envCtx.lightSettings.diffuseColor1[1] -= 25;
if (play->envCtx.adjLightSettings.light1Color[1] != 0) {
play->envCtx.adjLightSettings.light1Color[1] -= 25;
}
if (play->envCtx.lightSettings.diffuseColor1[2] != 0) {
play->envCtx.lightSettings.diffuseColor1[2] -= 25;
if (play->envCtx.adjLightSettings.light1Color[2] != 0) {
play->envCtx.adjLightSettings.light1Color[2] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[0] != 0) {
play->envCtx.lightSettings.ambientColor[0] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[0] != 0) {
play->envCtx.adjLightSettings.ambientColor[0] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[1] != 0) {
play->envCtx.lightSettings.ambientColor[1] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[1] != 0) {
play->envCtx.adjLightSettings.ambientColor[1] -= 25;
}
if (play->envCtx.lightSettings.ambientColor[2] != 0) {
play->envCtx.lightSettings.ambientColor[2] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[2] != 0) {
play->envCtx.adjLightSettings.ambientColor[2] -= 25;
}
if (this->timer == 0) {
@ -414,10 +414,10 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_EXPLOSION));
Actor_PlaySfx(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
play->envCtx.lightSettings.diffuseColor1[0] = play->envCtx.lightSettings.diffuseColor1[1] =
play->envCtx.lightSettings.diffuseColor1[2] = 250;
play->envCtx.lightSettings.ambientColor[0] = play->envCtx.lightSettings.ambientColor[1] =
play->envCtx.lightSettings.ambientColor[2] = 250;
play->envCtx.adjLightSettings.light1Color[0] = play->envCtx.adjLightSettings.light1Color[1] =
play->envCtx.adjLightSettings.light1Color[2] = 250;
play->envCtx.adjLightSettings.ambientColor[0] = play->envCtx.adjLightSettings.ambientColor[1] =
play->envCtx.adjLightSettings.ambientColor[2] = 250;
Camera_AddQuake(&play->mainCamera, 2, 11, 8);

View File

@ -563,7 +563,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) {
}
if ((play->sceneId == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) {
play->envCtx.lightSettingOverride = 0xFF;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
if (SkelAnime_Update(&this->skelAnime)) {
@ -1118,7 +1118,7 @@ void func_8089CF00(EnDinofos* this, PlayState* play) {
Animation_PlayOnce(&this->skelAnime, &gDinolfosFireEndAnim);
this->colliderJntSph.base.atFlags &= ~AT_ON;
if (play->sceneId == SCENE_MITURIN) {
play->envCtx.lightSettingOverride = 255;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
this->actionFunc = func_8089CF70;
}
@ -1289,7 +1289,7 @@ s32 func_8089D60C(EnDinofos* this, PlayState* play) {
func_8089ACEC(this, play);
func_8089AD70(this);
if (play->sceneId == SCENE_MITURIN) {
play->envCtx.lightSettingOverride = 255;
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
}
this->colliderQuad.base.atFlags &= ~(AT_ON | AT_BOUNCED);

View File

@ -1323,7 +1323,7 @@ void func_8088FC34(EnElf* this, PlayState* play) {
} else {
Math_StepToF(&this->unk_240, 1.0f, 0.05f);
}
func_800FD2B4(play, SQ(this->unk_240), player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f);
Environment_AdjustLights(play, SQ(this->unk_240), player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f);
}
}
@ -1521,8 +1521,8 @@ void func_8089010C(Actor* thisx, PlayState* play) {
this->elfMsg = NULL;
this->timer++;
if ((this->unk_240 >= 0.0f) &&
func_800FD2B4(play, SQ(this->unk_240) * this->unk_240, player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f)) {
if ((this->unk_240 >= 0.0f) && Environment_AdjustLights(play, SQ(this->unk_240) * this->unk_240,
player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f)) {
Math_StepToF(&this->unk_240, -0.05f, 0.05f);
}

View File

@ -169,10 +169,10 @@ void EnEncount3_Update(Actor* thisx, PlayState* play2) {
this->unk164 = this->unk160 / 60.0f;
if (this->unk164 != 0.0f) {
play->envCtx.lightSettings.fogNear = (960 - play->envCtx.unk_C4.fogNear) * this->unk164;
play->envCtx.lightSettings.fogColor[0] = (40.0f - play->envCtx.unk_C4.fogColor[0]) * this->unk164;
play->envCtx.lightSettings.fogColor[1] = (10.0f - play->envCtx.unk_C4.fogColor[1]) * this->unk164;
play->envCtx.lightSettings.fogColor[2] = (0.0f - play->envCtx.unk_C4.fogColor[2]) * this->unk164;
play->envCtx.adjLightSettings.fogNear = (960 - play->envCtx.lightSettings.fogNear) * this->unk164;
play->envCtx.adjLightSettings.fogColor[0] = (40.0f - play->envCtx.lightSettings.fogColor[0]) * this->unk164;
play->envCtx.adjLightSettings.fogColor[1] = (10.0f - play->envCtx.lightSettings.fogColor[1]) * this->unk164;
play->envCtx.adjLightSettings.fogColor[2] = (0.0f - play->envCtx.lightSettings.fogColor[2]) * this->unk164;
}
}

View File

@ -5314,8 +5314,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Cutscene_StopManual(play, &play->csCtx);
D_8090CD4C = 0;
sSubCamId = SUB_CAM_ID_DONE;
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
Environment_EnableUnderwaterLights(play, 0);
play->envCtx.adjLightSettings.fogNear = 0;
player->unk_B28 = -5;
D_80917200 = 5;
break;
@ -5356,8 +5356,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_8090CD4C = 0;
sSubCamId = SUB_CAM_ID_DONE;
D_8090CD50 = 30;
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
Environment_EnableUnderwaterLights(play, 0);
play->envCtx.adjLightSettings.fogNear = 0;
}
break;
@ -5460,8 +5460,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_80917200 = 5;
D_8090CD54 = 0;
D_809171F6 = 20;
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
Environment_EnableUnderwaterLights(play, 0);
play->envCtx.adjLightSettings.fogNear = 0;
}
}
}
@ -5476,15 +5476,15 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Math_ApproachF(&sSubCamVelFactor, 1.0f, 1.0f, 0.02f);
if (sSubCamEye.y <= (WATER_SURFACE_Y(play) + 1.0f)) {
func_800F6834(play, 1);
Environment_EnableUnderwaterLights(play, 1);
if (D_809171CA != 0) {
play->envCtx.lightSettings.fogNear = -0xB2;
play->envCtx.adjLightSettings.fogNear = -178;
} else {
play->envCtx.lightSettings.fogNear = -0x2E;
play->envCtx.adjLightSettings.fogNear = -46;
}
} else {
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
Environment_EnableUnderwaterLights(play, 0);
play->envCtx.adjLightSettings.fogNear = 0;
}
}
@ -5534,10 +5534,10 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
if (Rand_ZeroOne() < 0.5f) {
D_8090CCD4 = Rand_ZeroFloat(10.0f) + 5.0f;
play->envCtx.unk_E1 = 1;
play->envCtx.stormRequest = STORM_REQUEST_START;
} else {
D_8090CCD4 = 0;
play->envCtx.unk_E1 = 2;
play->envCtx.stormRequest = STORM_REQUEST_STOP;
}
}
@ -5568,8 +5568,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Math_ApproachZeroF(&D_8090CCD8, 1.0f, 2.0f);
}
play->envCtx.lightSettings.diffuseColor1[0] = play->envCtx.lightSettings.diffuseColor1[1] =
play->envCtx.lightSettings.diffuseColor1[2] = D_8090CCD8;
play->envCtx.adjLightSettings.light1Color[0] = play->envCtx.adjLightSettings.light1Color[1] =
play->envCtx.adjLightSettings.light1Color[2] = D_8090CCD8;
if ((u8)D_8090CCD0 > 0) {
s32 pad;

View File

@ -996,46 +996,46 @@ s32 func_80963810(PlayState* play, Vec3f pos) {
s32 func_809638F8(PlayState* play) {
s32 ret = true;
if (play->envCtx.lightSettings.diffuseColor1[0] > 25) {
play->envCtx.lightSettings.diffuseColor1[0] -= 25;
if (play->envCtx.adjLightSettings.light1Color[0] > 25) {
play->envCtx.adjLightSettings.light1Color[0] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.diffuseColor1[0] = 0;
play->envCtx.adjLightSettings.light1Color[0] = 0;
}
if (play->envCtx.lightSettings.diffuseColor1[1] > 25) {
play->envCtx.lightSettings.diffuseColor1[1] -= 25;
if (play->envCtx.adjLightSettings.light1Color[1] > 25) {
play->envCtx.adjLightSettings.light1Color[1] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.diffuseColor1[1] = 0;
play->envCtx.adjLightSettings.light1Color[1] = 0;
}
if (play->envCtx.lightSettings.diffuseColor1[2] > 25) {
play->envCtx.lightSettings.diffuseColor1[2] -= 25;
if (play->envCtx.adjLightSettings.light1Color[2] > 25) {
play->envCtx.adjLightSettings.light1Color[2] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.diffuseColor1[2] = 0;
play->envCtx.adjLightSettings.light1Color[2] = 0;
}
if (play->envCtx.lightSettings.ambientColor[0] > 25) {
play->envCtx.lightSettings.ambientColor[0] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[0] > 25) {
play->envCtx.adjLightSettings.ambientColor[0] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.ambientColor[0] = 0;
play->envCtx.adjLightSettings.ambientColor[0] = 0;
}
if (play->envCtx.lightSettings.ambientColor[1] > 25) {
play->envCtx.lightSettings.ambientColor[1] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[1] > 25) {
play->envCtx.adjLightSettings.ambientColor[1] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.ambientColor[1] = 0;
play->envCtx.adjLightSettings.ambientColor[1] = 0;
}
if (play->envCtx.lightSettings.ambientColor[2] > 25) {
play->envCtx.lightSettings.ambientColor[2] -= 25;
if (play->envCtx.adjLightSettings.ambientColor[2] > 25) {
play->envCtx.adjLightSettings.ambientColor[2] -= 25;
ret = false;
} else {
play->envCtx.lightSettings.ambientColor[2] = 0;
play->envCtx.adjLightSettings.ambientColor[2] = 0;
}
return ret;
}

View File

@ -364,7 +364,7 @@ void func_80B0FD8C(EnGb2* this, PlayState* play) {
}
void func_80B0FE18(PlayState* play) {
func_800FD750(NA_BGM_MINI_BOSS);
Environment_ForcePlaySequence(NA_BGM_MINI_BOSS);
play->nextEntrance = ENTRANCE(GHOST_HUT, 1);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_64;

View File

@ -1066,7 +1066,7 @@ void EnGs_Update(Actor* thisx, PlayState* play) {
Math_StepToF(&this->unk_200, 1.0f, 0.02f);
}
func_80997AFC(this->unk_194, &this->unk_1F7);
Lib_LerpRGB(&this->unk_1F4, &this->unk_1F7, this->unk_200, &this->unk_1FA);
Color_RGB8_Lerp(&this->unk_1F4, &this->unk_1F7, this->unk_200, &this->unk_1FA);
if (this->unk_200 >= 1.0f) {
this->unk_1F4 = this->unk_1FA;
}

View File

@ -62,10 +62,10 @@ void EnHata_Update(Actor* thisx, PlayState* play2) {
this->skelAnime.playSpeed = 2.75f * phi_fv0;
this->skelAnime.playSpeed += 1.0f + Rand_ZeroFloat(1.25f);
sp34.x = play->envCtx.windDir.x;
sp34.y = play->envCtx.windDir.y + ((1.0f - phi_fv0) * 240.0f);
sp34.x = play->envCtx.windDirection.x;
sp34.y = play->envCtx.windDirection.y + ((1.0f - phi_fv0) * 240.0f);
sp34.y = CLAMP(sp34.y, -118.0f, 118.0f);
sp34.z = play->envCtx.windDir.z;
sp34.z = play->envCtx.windDirection.z;
phi_fv0 = CLAMP(phi_fv0, 0.1f, 0.4f);
Math_ApproachF(&this->unk_2A4.x, sp34.x, phi_fv0, 1000.0f);

View File

@ -879,7 +879,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
case 0x3475:
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_START);
func_800FD750(NA_BGM_HORSE);
Environment_ForcePlaySequence(NA_BGM_HORSE);
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
play->transitionTrigger = TRANS_TRIGGER_START;
@ -1176,7 +1176,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
case 0x3475:
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_START);
func_800FD750(NA_BGM_HORSE);
Environment_ForcePlaySequence(NA_BGM_HORSE);
play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5);
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -750,7 +750,7 @@ void EnInvadepohDemo_Ufo_Draw(EnInvadepohDemo* this, PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx);
if (EnInvadepohDemo_Ufo_ShouldDrawLensFlare(play, &flashPos)) {
func_800F9824(play, &play->envCtx, &play->view, play->state.gfxCtx, flashPos, 20.0f, 9.0f, 0, 0);
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, flashPos, 20.0f, 9.0f, 0, 0);
}
}

View File

@ -203,7 +203,7 @@ void EnMThunder_Destroy(Actor* thisx, PlayState* play) {
}
void EnMThunder_AdjustLights(PlayState* play, f32 arg1) {
func_800FD2B4(play, arg1, 850.0f, 0.2f, 0.0f);
Environment_AdjustLights(play, arg1, 850.0f, 0.2f, 0.0f);
}
void EnMThunder_Spin_AttackNoMagic(EnMThunder* this, PlayState* play) {

View File

@ -318,7 +318,7 @@ void EnMttag_RaceStart(EnMttag* this, PlayState* play) {
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_GORON_RACE | SEQ_FLAG_ASYNC);
play->envCtx.unk_E4 = 0xFE;
play->envCtx.timeSeqState = TIMESEQ_REQUEST;
player->stateFlags1 &= ~PLAYER_STATE1_20;
} else if ((this->timer < 60) && (play->interfaceCtx.minigameState == MINIGAME_STATE_COUNTDOWN_GO)) {
this->timer = 0;

View File

@ -366,7 +366,7 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) {
gSaveContext.save.time = CLOCK_TIME(8, 0);
Sram_IncrementDay();
} else {
func_800FE658(120.0f);
Environment_SetTimeJump(120.0f);
}
this->behaviour++;

View File

@ -41,7 +41,7 @@ void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play) {
void EnOkarinaEffect_Init(Actor* thisx, PlayState* play) {
EnOkarinaEffect* this = THIS;
if (play->envCtx.unk_F2[1]) {
if (play->envCtx.precipitation[PRECIP_RAIN_CUR] != 0) {
Actor_Kill(&this->actor);
}
EnOkarinaEffect_SetupAction(this, func_8096B104);
@ -49,10 +49,10 @@ void EnOkarinaEffect_Init(Actor* thisx, PlayState* play) {
void func_8096B104(EnOkarinaEffect* this, PlayState* play) {
this->unk144 = 0x50;
play->envCtx.unk_F2[4] = 0x3C;
D_801F4E70 = 501.0f;
play->envCtx.unk_E3 = 2;
func_800FD78C(play);
play->envCtx.precipitation[PRECIP_SOS_MAX] = 60;
gLightningStrike.delayTimer = 501.0f;
play->envCtx.lightningState = LIGHTNING_LAST;
Environment_PlayStormNatureAmbience(play);
EnOkarinaEffect_SetupAction(this, func_8096B174);
}
@ -65,11 +65,11 @@ void func_8096B174(EnOkarinaEffect* this, PlayState* play) {
}
void func_8096B1FC(EnOkarinaEffect* this, PlayState* play) {
if (play->envCtx.unk_F2[4]) {
if (play->envCtx.precipitation[PRECIP_SOS_MAX] != 0) {
if ((play->state.frames & 3) == 0) {
play->envCtx.unk_F2[4]--;
if (play->envCtx.unk_F2[4] == 8) {
func_800FD858(play);
play->envCtx.precipitation[PRECIP_SOS_MAX]--;
if (play->envCtx.precipitation[PRECIP_SOS_MAX] == 8) {
Environment_StopStormNatureAmbience(play);
}
}
} else {

View File

@ -459,8 +459,8 @@ void func_80B5C3D8(EnOt* this, PlayState* play) {
this->unk_360->actor.shape.rot.y = BINANG_ROT180(temp);
if (this->unk_740 < 1.0f) {
Lib_LerpRGB(&D_80B5E408, &D_80B5E40C, this->unk_740, &this->unk_744);
Lib_LerpRGB(&D_80B5E408, &D_80B5E40C, this->unk_740, &this->unk_360->unk_744);
Color_RGB8_Lerp(&D_80B5E408, &D_80B5E40C, this->unk_740, &this->unk_744);
Color_RGB8_Lerp(&D_80B5E408, &D_80B5E40C, this->unk_740, &this->unk_360->unk_744);
Math_StepToF(&this->unk_740, 1.0f, 0.05f);
}

View File

@ -782,7 +782,7 @@ s32 func_80A3FBE8(EnTest3* this, PlayState* play) {
CutsceneManager_SetReturnCamera(CAM_ID_MAIN);
Environment_StartTime();
if (((void)0, gSaveContext.save.time) > CLOCK_TIME(6, 0)) {
func_800FE658(TIME_TO_MINUTES_ALT_F(fabsf((s16) - ((void)0, gSaveContext.save.time))));
Environment_SetTimeJump(TIME_TO_MINUTES_ALT_F(fabsf((s16) - ((void)0, gSaveContext.save.time))));
}
if (play->actorCtx.flags & ACTORCTX_FLAG_6) {
SET_WEEKEVENTREG(WEEKEVENTREG_ESCAPED_SAKONS_HIDEOUT);

View File

@ -60,8 +60,8 @@ void func_80A41D70(EnTest4* this, PlayState* play) {
}
Interface_NewDay(play, CURRENT_DAY);
D_801BDBC8 = 0xFE;
func_800FB758(play);
gSceneSeqState = SCENESEQ_MORNING;
Environment_PlaySceneSequence(play);
func_800FEAF4(&play->envCtx);
this->actionFunc = func_80A42AB8;
}
@ -97,8 +97,8 @@ void func_80A41FA4(EnTest4* this, PlayState* play) {
gSaveContext.save.time = CLOCK_TIME(6, 0);
Interface_NewDay(play, CURRENT_DAY);
Message_DisplaySceneTitleCard(play, sDayMessages2[CURRENT_DAY - 1]);
D_801BDBC8 = 0xFE;
func_800FB758(play);
gSceneSeqState = SCENESEQ_MORNING;
Environment_PlaySceneSequence(play);
func_800FEAF4(&play->envCtx);
this->actionFunc = func_80A42AB8;
}
@ -324,7 +324,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) {
} else {
gSaveContext.save.day = 1;
dayTemp = gSaveContext.save.day;
gSaveContext.save.daysElapsed = dayTemp;
gSaveContext.save.eventDayCount = dayTemp;
this->csIdIndex = 1;
this->unk_146 = gSaveContext.save.time;
this->actionFunc = func_80A42AB8;
@ -517,38 +517,38 @@ void func_80A42F20(EnTest4* this, PlayState* play) {
void func_80A430C8(EnTest4* this, PlayState* play) {
if ((CURRENT_DAY == 2) && (gSaveContext.save.time >= CLOCK_TIME(7, 0)) &&
(gSaveContext.save.time < CLOCK_TIME(17, 30)) && (play->envCtx.unk_F2[2] == 0)) {
(gSaveContext.save.time < CLOCK_TIME(17, 30)) && (play->envCtx.precipitation[PRECIP_SNOW_CUR] == 0)) {
// rain?
gWeatherMode = 1;
func_800FD78C(play);
play->envCtx.unk_E3 = 1;
play->envCtx.unk_F2[0] = 0x3C;
gWeatherMode = WEATHER_MODE_1;
Environment_PlayStormNatureAmbience(play);
play->envCtx.lightningState = LIGHTNING_ON;
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 60;
} else {
if (play->envCtx.unk_F2[0] != 0) {
if (play->envCtx.precipitation[PRECIP_RAIN_MAX] != 0) {
if ((play->state.frames % 4) == 0) {
play->envCtx.unk_F2[0]--;
if ((play->envCtx.unk_F2[0]) == 8) {
func_800FD858(play);
play->envCtx.precipitation[PRECIP_RAIN_MAX]--;
if ((play->envCtx.precipitation[PRECIP_RAIN_MAX]) == 8) {
Environment_StopStormNatureAmbience(play);
}
}
}
}
if (gWeatherMode == 1) {
if (gWeatherMode == WEATHER_MODE_1) {
this->state = TEST4_STATE_1;
}
}
void func_80A431C8(EnTest4* this, PlayState* play) {
if (((gSaveContext.save.time >= CLOCK_TIME(17, 30)) && (gSaveContext.save.time < CLOCK_TIME(23, 0)) &&
(play->envCtx.unk_F2[0] != 0)) ||
(play->envCtx.unk_F2[2] != 0)) {
gWeatherMode = 0;
play->envCtx.unk_E3 = 2;
(play->envCtx.precipitation[PRECIP_RAIN_MAX] != 0)) ||
(play->envCtx.precipitation[PRECIP_SNOW_CUR] != 0)) {
gWeatherMode = WEATHER_MODE_CLEAR;
play->envCtx.lightningState = LIGHTNING_LAST;
}
if (gWeatherMode == 0) {
if (gWeatherMode == WEATHER_MODE_CLEAR) {
this->state = TEST4_STATE_0;
}
}
@ -557,7 +557,7 @@ void func_80A4323C(EnTest4* this, PlayState* play) {
s32 temp_v0 = (this->actor.params >> 0xA) * 0x64;
if (temp_v0 > 0) {
D_801F4E7A = temp_v0;
gSkyboxNumStars = temp_v0;
}
}
@ -568,7 +568,7 @@ void EnTest4_Update(Actor* thisx, PlayState* play) {
if (!(player->stateFlags1 & PLAYER_STATE1_2)) {
this->actionFunc(this, play);
if (func_800FE4B8(play) != 0) {
if (Environment_GetStormState(play) != STORM_STATE_OFF) {
switch (this->state) {
case TEST4_STATE_0:
func_80A430C8(this, play);

View File

@ -375,24 +375,24 @@ void EnTest6_Destroy(Actor* thisx, PlayState* play2) {
EnTest6* this = THIS;
s32 i;
play->envCtx.lightSettings.ambientColor[0] = 0;
play->envCtx.lightSettings.ambientColor[1] = 0;
play->envCtx.lightSettings.ambientColor[2] = 0;
play->envCtx.adjLightSettings.ambientColor[0] = 0;
play->envCtx.adjLightSettings.ambientColor[1] = 0;
play->envCtx.adjLightSettings.ambientColor[2] = 0;
play->envCtx.lightSettings.diffuseColor1[0] = 0;
play->envCtx.lightSettings.diffuseColor1[1] = 0;
play->envCtx.lightSettings.diffuseColor1[2] = 0;
play->envCtx.adjLightSettings.light1Color[0] = 0;
play->envCtx.adjLightSettings.light1Color[1] = 0;
play->envCtx.adjLightSettings.light1Color[2] = 0;
play->envCtx.lightSettings.diffuseColor2[0] = 0;
play->envCtx.lightSettings.diffuseColor2[1] = 0;
play->envCtx.lightSettings.diffuseColor2[2] = 0;
play->envCtx.adjLightSettings.light2Color[0] = 0;
play->envCtx.adjLightSettings.light2Color[1] = 0;
play->envCtx.adjLightSettings.light2Color[2] = 0;
play->envCtx.lightSettings.fogColor[0] = 0;
play->envCtx.lightSettings.fogColor[1] = 0;
play->envCtx.lightSettings.fogColor[2] = 0;
play->envCtx.adjLightSettings.fogColor[0] = 0;
play->envCtx.adjLightSettings.fogColor[1] = 0;
play->envCtx.adjLightSettings.fogColor[2] = 0;
play->envCtx.lightSettings.fogNear = 0;
play->envCtx.lightSettings.zFar = 0;
play->envCtx.adjLightSettings.fogNear = 0;
play->envCtx.adjLightSettings.zFar = 0;
play->envCtx.fillScreen = false;
@ -425,7 +425,7 @@ void EnTest6_StartCutscene(EnTest6* this, PlayState* play) {
break;
default:
gSaveContext.save.daysElapsed = 0;
gSaveContext.save.eventDayCount = 0;
gSaveContext.save.day = 0;
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
EnTest6_SetupAction(this, EnTest6_SharedSoTCutscene);

View File

@ -987,6 +987,7 @@ void EnTest7_Draw(Actor* thisx, PlayState* play) {
func_80AF14FC(play, this->unk_15C);
if (this->unk_144 & 4) {
func_800F9824(play, &play->envCtx, &play->view, play->state.gfxCtx, this->actor.world.pos, 70.0f, 5.0f, 0, 0);
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, this->actor.world.pos, 70.0f,
5.0f, 0, 0);
}
}

View File

@ -324,7 +324,7 @@ void func_80AECB6C(EnTk* this, PlayState* play) {
}
if (R_TIME_SPEED != 0.0f) {
this->skelAnime.playSpeed = (f32)func_800FE620(play) / R_TIME_SPEED;
this->skelAnime.playSpeed = (f32)Environment_GetTimeSpeed(play) / R_TIME_SPEED;
} else {
this->skelAnime.playSpeed = 0.0f;
}

View File

@ -77,7 +77,7 @@ void func_8089F014(EnViewer* this, PlayState* play, f32 arg2) {
arg2 = 0.0f;
}
play->envCtx.lightSettingOverride = 0;
play->envCtx.unk_E0 = 2;
play->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_FULL_CONTROL;
play->envCtx.lightSetting = this->actor.world.rot.x;
play->envCtx.prevLightSetting = this->actor.world.rot.z;
play->envCtx.lightBlend = arg2;
@ -87,11 +87,11 @@ void func_8089F0A0(EnViewer* this, PlayState* play) {
Player* player = GET_PLAYER(play);
D_8089F3E4++;
if ((D_8089F3E4 == D_8089F3E0) && (play->envCtx.lightSettingOverride != 255)) {
play->envCtx.lightSettingOverride = 255;
play->envCtx.unk_E0 = 0;
if ((D_8089F3E4 == D_8089F3E0) && (play->envCtx.lightSettingOverride != LIGHT_SETTING_OVERRIDE_NONE)) {
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
play->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_NONE;
play->envCtx.lightBlend = 1.0f;
func_800FAAB4(
Environment_ChangeLightSetting(
play, SurfaceType_GetLightSettingIndex(&play->colCtx, player->actor.floorPoly, player->actor.floorBgId));
play->envCtx.lightBlend = 1.0f;
play->envCtx.prevLightSetting = play->envCtx.lightSetting;

View File

@ -47,12 +47,6 @@ ActorInit En_Weather_Tag_InitVars = {
(ActorFunc)EnWeatherTag_Draw,
};
extern f32 D_801F4E74;
extern u8 D_801BDBB8;
extern u8 D_801BDBB4;
extern u8 D_801F4E30;
extern s16 D_801F4E7A;
void EnWeatherTag_SetupAction(EnWeatherTag* this, EnWeatherTagActionFunc func) {
this->actionFunc = func;
}
@ -131,17 +125,17 @@ u8 func_80966608(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4,
if (WEATHER_TAG_RANGE100(&this->actor) > Actor_WorldDistXZToActor(&player->actor, &this->actor)) {
if (play->envCtx.lightConfig == play->envCtx.changeLightNextConfig) {
D_801BDBB8 = 1;
if (!(play->envCtx.lightMode == 0) ||
gInterruptSongOfStorms = true;
if (!(play->envCtx.lightMode == LIGHT_MODE_TIME) ||
((play->envCtx.lightConfig != 1) && !play->envCtx.changeLightEnabled)) {
D_801BDBB8 = 0;
gInterruptSongOfStorms = false;
if (gWeatherMode != weatherMode) {
gWeatherMode = weatherMode;
play->envCtx.changeLightEnabled = true;
play->envCtx.lightConfig = lightConfig;
play->envCtx.changeLightNextConfig = changeLightNextConfig;
D_801BDBB4 = changeLightNextConfig;
gLightConfigAfterUnderwater = changeLightNextConfig;
play->envCtx.changeDuration = changeDuration;
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
}
@ -161,16 +155,16 @@ u8 func_80966758(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4,
if (WEATHER_TAG_RANGE100(&this->actor) < Actor_WorldDistXZToActor(&player->actor, &this->actor)) {
if (play->envCtx.lightConfig == play->envCtx.changeLightNextConfig) {
D_801BDBB8 = 1;
if (!(play->envCtx.lightMode == 0) ||
gInterruptSongOfStorms = true;
if (!(play->envCtx.lightMode == LIGHT_MODE_TIME) ||
((play->envCtx.lightConfig != 1) && !play->envCtx.changeLightEnabled)) {
D_801BDBB8 = 0;
gWeatherMode = 0;
gInterruptSongOfStorms = false;
gWeatherMode = WEATHER_MODE_CLEAR;
play->envCtx.changeLightEnabled = true;
play->envCtx.lightConfig = lightConfig;
play->envCtx.changeLightNextConfig = changeLightNextConfig;
D_801BDBB4 = changeLightNextConfig;
gLightConfigAfterUnderwater = changeLightNextConfig;
play->envCtx.changeDuration = changeDuration;
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
returnVal = 1;
@ -201,11 +195,11 @@ void func_8096689C(EnWeatherTag* this, PlayState* play) {
play->envCtx.windSpeed = (this->actor.world.rot.z * partialResult) + 30.0f;
if (partialResult > 0.01f) {
play->envCtx.sandstormState = 8;
play->envCtx.sandstormState = SANDSTORM_8;
D_801F4E30 = 0x9B;
} else if (play->envCtx.sandstormState == 8) {
} else if (play->envCtx.sandstormState == SANDSTORM_8) {
D_801F4E30 = 0;
play->envCtx.sandstormState = 9;
play->envCtx.sandstormState = SANDSTORM_9;
}
}
@ -243,7 +237,7 @@ void EnWeatherTag_Die(EnWeatherTag* this, PlayState* play) {
// poisoned swamp: placed behind the water fall from ikana
// this tag stops spawning after STT cleared?
void func_80966B08(EnWeatherTag* this, PlayState* play) {
if (func_80966608(this, play, 0, 0, play->envCtx.lightConfig, 5, 100, 2) || (gWeatherMode == 2)) {
if (func_80966608(this, play, 0, 0, play->envCtx.lightConfig, 5, 100, 2) || (gWeatherMode == WEATHER_MODE_2)) {
play->skyboxId = SKYBOX_3;
EnWeatherTag_SetupAction(this, func_80966D20);
} else if (D_801F4E74 <= 0.01f) {
@ -315,7 +309,7 @@ void func_80966D20(EnWeatherTag* this, PlayState* play) {
EnWeatherTag_SetupAction(this, func_80966B08);
}
if (gWeatherMode != 2) {
if (gWeatherMode != WEATHER_MODE_2) {
EnWeatherTag_SetupAction(this, func_80966B08);
}
}
@ -325,7 +319,7 @@ void func_80966D20(EnWeatherTag* this, PlayState* play) {
// path to goron village winter, winter mountain village
void func_80966E0C(EnWeatherTag* this, PlayState* play) {
if (func_80966608(this, play, 0, 1, 0, 2, 60, 3)) {
play->envCtx.unk_F2[3] = 0x80;
play->envCtx.precipitation[PRECIP_SNOW_MAX] = 128;
EnWeatherTag_SetupAction(this, func_80966E84);
}
}
@ -333,7 +327,7 @@ void func_80966E0C(EnWeatherTag* this, PlayState* play) {
// WEATHERTAG_TYPE_WINTERFOG 2
void func_80966E84(EnWeatherTag* this, PlayState* play) {
if (func_80966758(this, play, 1, 0, 2, 0, 60)) {
play->envCtx.unk_F2[3] = 0;
play->envCtx.precipitation[PRECIP_SNOW_MAX] = 0;
EnWeatherTag_SetupAction(this, func_80966E0C);
}
}
@ -343,8 +337,8 @@ void func_80966E84(EnWeatherTag* this, PlayState* play) {
// wait if you enter the scene through a room instead of fog you get a flash rain shower
void func_80966EF0(EnWeatherTag* this, PlayState* play) {
if (func_80966608(this, play, 0, 1, 0, 2, 100, 4)) {
func_800FD78C(play);
play->envCtx.unk_F2[0] = 60;
Environment_PlayStormNatureAmbience(play);
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 60;
EnWeatherTag_SetupAction(this, func_80966F74);
}
}
@ -352,8 +346,8 @@ void func_80966EF0(EnWeatherTag* this, PlayState* play) {
// WEATHERTAG_TYPE_UNK3 2
void func_80966F74(EnWeatherTag* this, PlayState* play) {
if (func_80966758(this, play, 1, 0, 2, 0, 100)) {
func_800FD858(play);
play->envCtx.unk_F2[0] = 0;
Environment_StopStormNatureAmbience(play);
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 0;
EnWeatherTag_SetupAction(this, func_80966EF0);
}
}
@ -365,7 +359,7 @@ void func_80966FEC(EnWeatherTag* this, PlayState* play) {
// weirdly, not the same as the other param lookup used in the rest of the file, which is float
s32 distance = WEATHER_TAG_RANGE100INT(&this->actor);
if (distance > 0) {
D_801F4E7A = distance;
gSkyboxNumStars = distance;
}
if ((play->sceneId == SCENE_KAIZOKU) && (play->actorCtx.flags & ACTORCTX_FLAG_1)) {
@ -410,9 +404,9 @@ void EnWeatherTag_DoNothing(EnWeatherTag* this, PlayState* play) {
// these two are isolated, they call themselves but nothing calls them?
void EnWeatherTag_Unused_809671B8(EnWeatherTag* this, PlayState* play) {
if (func_80966608(this, play, 0, 1, 0, 4, 100, 5)) {
func_800FD78C(play);
play->envCtx.unk_E3 = 1;
play->envCtx.unk_F2[0] = 60;
Environment_PlayStormNatureAmbience(play);
play->envCtx.lightningState = LIGHTNING_ON;
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 60;
EnWeatherTag_SetupAction(this, EnWeatherTag_Unused_80967250);
}
}
@ -420,9 +414,9 @@ void EnWeatherTag_Unused_809671B8(EnWeatherTag* this, PlayState* play) {
// these two are isolated, they call themselves but nothing calls them
void EnWeatherTag_Unused_80967250(EnWeatherTag* this, PlayState* play) {
if (func_80966758(this, play, 1, 0, 4, 0, 100)) {
func_800FD858(play);
play->envCtx.unk_E3 = 2;
play->envCtx.unk_F2[0] = 0;
Environment_StopStormNatureAmbience(play);
play->envCtx.lightningState = LIGHTNING_LAST;
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 0;
EnWeatherTag_SetupAction(this, EnWeatherTag_Unused_809671B8);
}
}
@ -442,20 +436,20 @@ void func_809672DC(EnWeatherTag* this, PlayState* play) {
range = WEATHER_TAG_RANGE100(&this->actor);
if (distance < range) {
play->envCtx.sandstormState = 6;
play->envCtx.sandstormState = SANDSTORM_6;
strength = 1.0f - (distance / range);
if (0.8f < strength) {
strength = 1.0f;
}
D_801F4E30 = (200.0f * strength);
} else {
if (play->envCtx.sandstormState == 6) {
if (play->envCtx.sandstormState == SANDSTORM_6) {
D_801F4E30 = 0;
play->envCtx.sandstormState = 7;
play->envCtx.sandstormState = SANDSTORM_7;
}
}
Math_SmoothStepToS(&play->envCtx.lightSettings.fogNear, (s16)(-40.0f * strength), 1, 1, 1);
Math_SmoothStepToS(&play->envCtx.adjLightSettings.fogNear, -40.0f * strength, 1, 1, 1);
}
// WEATHERTAG_TYPE_LOCALDAY2RAIN: rain proximity as approaching rainy scene
@ -466,19 +460,19 @@ void func_809674C8(EnWeatherTag* this, PlayState* play) {
if (Actor_WorldDistXZToActor(&player->actor, &this->actor) < WEATHER_TAG_RANGE100(&this->actor)) {
if (CURRENT_DAY == 2) {
if ((gSaveContext.save.time >= CLOCK_TIME(7, 0)) && (gSaveContext.save.time < CLOCK_TIME(17, 30)) &&
(play->envCtx.unk_F2[2] == 0)) {
(play->envCtx.precipitation[PRECIP_SNOW_CUR] == 0)) {
gWeatherMode = 1;
func_800FD78C(play);
play->envCtx.unk_F2[4] = 0x20;
gWeatherMode = WEATHER_MODE_1;
Environment_PlayStormNatureAmbience(play);
play->envCtx.precipitation[PRECIP_SOS_MAX] = 32;
EnWeatherTag_SetupAction(this, func_80967608);
}
}
} else {
if ((play->envCtx.unk_F2[4] != 0) && !(play->state.frames & 3)) {
play->envCtx.unk_F2[4]--;
if ((play->envCtx.unk_F2[4]) == 8) {
func_800FD858(play);
if ((play->envCtx.precipitation[PRECIP_SOS_MAX] != 0) && !(play->state.frames & 3)) {
play->envCtx.precipitation[PRECIP_SOS_MAX]--;
if ((play->envCtx.precipitation[PRECIP_SOS_MAX]) == 8) {
Environment_StopStormNatureAmbience(play);
}
}
}
@ -488,7 +482,7 @@ void func_809674C8(EnWeatherTag* this, PlayState* play) {
void func_80967608(EnWeatherTag* this, PlayState* play) {
if ((WEATHER_TAG_RANGE100(&this->actor) + 10.0f) <
Actor_WorldDistXZToActor(&GET_PLAYER(play)->actor, &this->actor)) {
gWeatherMode = 0;
gWeatherMode = WEATHER_MODE_CLEAR;
EnWeatherTag_SetupAction(this, func_809674C8);
}
}

View File

@ -119,19 +119,19 @@ void EnWizFire_Destroy(Actor* thisx, PlayState* play) {
EnWizFire* this = THIS;
if (this->type == EN_WIZ_FIRE_TYPE_MAGIC_PROJECTILE) {
play->envCtx.lightSettings.fogColor[2] = 0;
play->envCtx.lightSettings.fogColor[1] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.fogColor[0] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor2[2] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor2[1] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor2[0] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor1[2] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor1[1] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.diffuseColor1[0] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.ambientColor[2] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.ambientColor[1] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.ambientColor[0] = play->envCtx.lightSettings.fogColor[2];
play->envCtx.lightSettings.fogNear = play->envCtx.lightSettings.fogColor[2];
play->envCtx.adjLightSettings.fogColor[2] = 0;
play->envCtx.adjLightSettings.fogColor[1] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.fogColor[0] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light2Color[2] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light2Color[1] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light2Color[0] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light1Color[2] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light1Color[1] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.light1Color[0] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.ambientColor[2] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.ambientColor[1] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.ambientColor[0] = play->envCtx.adjLightSettings.fogColor[2];
play->envCtx.adjLightSettings.fogNear = play->envCtx.adjLightSettings.fogColor[2];
}
Collider_DestroyCylinder(play, &this->collider);
@ -518,38 +518,39 @@ void EnWizFire_Update(Actor* thisx, PlayState* play2) {
fogNear = 968.0f;
}
play->envCtx.lightSettings.fogNear = (fogNear - (s16)play->envCtx.unk_C4.fogNear) * this->blendScaleFrac;
play->envCtx.adjLightSettings.fogNear =
(fogNear - (s16)play->envCtx.lightSettings.fogNear) * this->blendScaleFrac;
play->envCtx.lightSettings.ambientColor[0] =
((f32)lightSettingsColors[index].r - play->envCtx.unk_C4.ambientColor[0]) * this->blendScaleFrac;
play->envCtx.lightSettings.ambientColor[1] =
((f32)lightSettingsColors[index].g - play->envCtx.unk_C4.ambientColor[1]) * this->blendScaleFrac;
play->envCtx.lightSettings.ambientColor[2] =
((f32)lightSettingsColors[index].b - play->envCtx.unk_C4.ambientColor[2]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.ambientColor[0] =
((f32)lightSettingsColors[index].r - play->envCtx.lightSettings.ambientColor[0]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.ambientColor[1] =
((f32)lightSettingsColors[index].g - play->envCtx.lightSettings.ambientColor[1]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.ambientColor[2] =
((f32)lightSettingsColors[index].b - play->envCtx.lightSettings.ambientColor[2]) * this->blendScaleFrac;
index++;
play->envCtx.lightSettings.diffuseColor1[0] =
((f32)lightSettingsColors[index].r - play->envCtx.unk_C4.diffuseColor1[0]) * this->blendScaleFrac;
play->envCtx.lightSettings.diffuseColor1[1] =
((f32)lightSettingsColors[index].g - play->envCtx.unk_C4.diffuseColor1[1]) * this->blendScaleFrac;
play->envCtx.lightSettings.diffuseColor1[2] =
((f32)lightSettingsColors[index].b - play->envCtx.unk_C4.diffuseColor1[2]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light1Color[0] =
((f32)lightSettingsColors[index].r - play->envCtx.lightSettings.light1Color[0]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light1Color[1] =
((f32)lightSettingsColors[index].g - play->envCtx.lightSettings.light1Color[1]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light1Color[2] =
((f32)lightSettingsColors[index].b - play->envCtx.lightSettings.light1Color[2]) * this->blendScaleFrac;
index++;
play->envCtx.lightSettings.diffuseColor2[0] =
((f32)lightSettingsColors[index].r - play->envCtx.unk_C4.diffuseColor[0]) * this->blendScaleFrac;
play->envCtx.lightSettings.diffuseColor2[1] =
((f32)lightSettingsColors[index].g - play->envCtx.unk_C4.diffuseColor[1]) * this->blendScaleFrac;
play->envCtx.lightSettings.diffuseColor2[2] =
((f32)lightSettingsColors[index].b - play->envCtx.unk_C4.diffuseColor[2]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light2Color[0] =
((f32)lightSettingsColors[index].r - play->envCtx.lightSettings.light2Color[0]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light2Color[1] =
((f32)lightSettingsColors[index].g - play->envCtx.lightSettings.light2Color[1]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.light2Color[2] =
((f32)lightSettingsColors[index].b - play->envCtx.lightSettings.light2Color[2]) * this->blendScaleFrac;
index++;
play->envCtx.lightSettings.fogColor[0] =
((f32)lightSettingsColors[index].r - play->envCtx.unk_C4.fogColor[0]) * this->blendScaleFrac;
play->envCtx.lightSettings.fogColor[1] =
((f32)lightSettingsColors[index].g - play->envCtx.unk_C4.fogColor[1]) * this->blendScaleFrac;
play->envCtx.lightSettings.fogColor[2] =
((f32)lightSettingsColors[index].b - play->envCtx.unk_C4.fogColor[2]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.fogColor[0] =
((f32)lightSettingsColors[index].r - play->envCtx.lightSettings.fogColor[0]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.fogColor[1] =
((f32)lightSettingsColors[index].g - play->envCtx.lightSettings.fogColor[1]) * this->blendScaleFrac;
play->envCtx.adjLightSettings.fogColor[2] =
((f32)lightSettingsColors[index].b - play->envCtx.lightSettings.fogColor[2]) * this->blendScaleFrac;
}
}

View File

@ -328,7 +328,7 @@ void ObjEtcetera_Update(Actor* thisx, PlayState* play) {
if (floorBgId == BGCHECK_SCENE) {
floorPoly = this->dyna.actor.floorPoly;
if ((floorPoly != NULL) && (this->burrowFlag & 1)) {
func_800FAAB4(play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, floorBgId));
Environment_ChangeLightSetting(play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, floorBgId));
}
}

View File

@ -55,11 +55,11 @@ void func_808DBEB0(ObjectKankyo* this, PlayState* play) {
D_808DE5B0 = 0.0f;
this->unk_144 = Rand_ZeroOne() * 360.0f;
this->unk_148 = Rand_ZeroOne() * 360.0f;
if (play->envCtx.unk_F2[2] == 128) {
if (play->envCtx.precipitation[PRECIP_SNOW_CUR] == 128) {
D_808DE5B0 = 1.0f;
this->unk_114E = 1;
for (i = 0; i < play->envCtx.unk_F2[2]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_CUR]; i++) {
this->unk_14C[i].unk_10 = Rand_ZeroOne() * -200.0f;
}
} else {
@ -107,7 +107,7 @@ void ObjectKankyo_Init(Actor* thisx, PlayState* play) {
break;
case 2:
play->envCtx.unk_F2[2] = 0x80;
play->envCtx.precipitation[PRECIP_SNOW_CUR] = 128;
func_808DBFB0(this, play);
break;
@ -180,16 +180,16 @@ void func_808DC18C(ObjectKankyo* this, PlayState* play) {
magnitude = play->envCtx.windSpeed / 60.0f;
magnitude = CLAMP(magnitude, 0.0f, 1.0f);
sp30.x = play->envCtx.windDir.x * magnitude;
sp30.y = play->envCtx.windDir.y + 100.0f;
sp30.z = play->envCtx.windDir.z * magnitude;
sp30.x = play->envCtx.windDirection.x * magnitude;
sp30.y = play->envCtx.windDirection.y + 100.0f;
sp30.z = play->envCtx.windDirection.z * magnitude;
this->unk_14C[2].unk_00 = 0x4000 - Math_Vec3f_Pitch(&gZeroVec3f, &sp30);
this->unk_14C[2].unk_04 = Math_Vec3f_Yaw(&gZeroVec3f, &sp30) + 0x8000;
}
void func_808DC454(ObjectKankyo* this, PlayState* play) {
s16 i;
u32 tempI;
s32 pad1;
f32 phi_f20;
f32 spD0;
f32 spCC;
@ -214,7 +214,7 @@ void func_808DC454(ObjectKankyo* this, PlayState* play) {
spCC = y / magnitude;
spC8 = z / magnitude;
for (i = 0; i < play->envCtx.unk_F2[2]; i++) {
for (i = 0; i < play->envCtx.precipitation[PRECIP_SNOW_CUR]; i++) {
switch (this->unk_14C[i].unk_1C) {
case 0:
this->unk_14C[i].unk_00 = play->view.eye.x + (spD0 * 120.0f);
@ -231,14 +231,13 @@ void func_808DC454(ObjectKankyo* this, PlayState* play) {
this->unk_14C[i].unk_10 = temp_f22;
} else {
this->unk_14C[i].unk_10 += temp_f22;
tempI = i;
if (play->envCtx.unk_F2[2] == (tempI + 1)) {
if (play->envCtx.precipitation[PRECIP_SNOW_CUR] == ((u32)i + 1)) {
this->unk_114E = 0;
}
}
this->unk_14C[i].unk_14 = (Rand_ZeroOne() - 0.5f) * (2.0f * temp_120);
if (play->envCtx.unk_F2[4] == 0) {
if (play->envCtx.precipitation[PRECIP_SOS_MAX] == 0) {
this->unk_14C[i].unk_18 = (Rand_ZeroOne() * 3.0f) + 1.0f;
} else {
this->unk_14C[i].unk_18 = (Rand_ZeroOne() * 3.0f) + 8.0f;
@ -251,14 +250,14 @@ void func_808DC454(ObjectKankyo* this, PlayState* play) {
temp_f28 = play->view.eye.y + (spCC * 120.0f);
temp_f30 = play->view.eye.z + (spC8 * 120.0f);
magnitude =
sqrtf((f32)SQ(play->envCtx.windDir.x) + SQ(play->envCtx.windDir.y) + SQ(play->envCtx.windDir.z));
magnitude = sqrtf((f32)SQ(play->envCtx.windDirection.x) + SQ(play->envCtx.windDirection.y) +
SQ(play->envCtx.windDirection.z));
if (magnitude == 0.0f) {
magnitude = 0.001f;
}
spC4 = -play->envCtx.windDir.x / magnitude;
spC0 = -play->envCtx.windDir.y / magnitude;
spBC = -play->envCtx.windDir.z / magnitude;
spC4 = -play->envCtx.windDirection.x / magnitude;
spC0 = -play->envCtx.windDirection.y / magnitude;
spBC = -play->envCtx.windDirection.z / magnitude;
if (i == 0) {
this->unk_144 += 0.049999997f * Rand_ZeroOne();
@ -318,13 +317,13 @@ void func_808DC454(ObjectKankyo* this, PlayState* play) {
}
void func_808DCB7C(ObjectKankyo* this, PlayState* play) {
if (play->envCtx.unk_F2[2] < play->envCtx.unk_F2[3]) {
if (play->envCtx.precipitation[PRECIP_SNOW_CUR] < play->envCtx.precipitation[PRECIP_SNOW_MAX]) {
if ((play->state.frames % 16) == 0) {
play->envCtx.unk_F2[2] += 2;
play->envCtx.precipitation[PRECIP_SNOW_CUR] += 2;
}
} else if (play->envCtx.unk_F2[3] < play->envCtx.unk_F2[2]) {
} else if (play->envCtx.precipitation[PRECIP_SNOW_MAX] < play->envCtx.precipitation[PRECIP_SNOW_CUR]) {
if ((play->state.frames % 16) == 0) {
play->envCtx.unk_F2[2] -= 2;
play->envCtx.precipitation[PRECIP_SNOW_CUR] -= 2;
}
}
func_808DC454(this, play);
@ -333,24 +332,24 @@ void func_808DCB7C(ObjectKankyo* this, PlayState* play) {
void func_808DCBF8(ObjectKankyo* this, PlayState* play) {
f32 temp_f0;
if ((play->envCtx.unk_F2[2] > 0) && (this->unk_114C == 0)) {
if ((play->envCtx.precipitation[PRECIP_SNOW_CUR] > 0) && (this->unk_114C == 0)) {
if ((play->state.frames % 16) == 0) {
play->envCtx.unk_F2[2] -= 9;
if ((s8)play->envCtx.unk_F2[2] < 0) {
play->envCtx.unk_F2[2] = 0;
play->envCtx.precipitation[PRECIP_SNOW_CUR] -= 9;
if ((s8)play->envCtx.precipitation[PRECIP_SNOW_CUR] < 0) {
play->envCtx.precipitation[PRECIP_SNOW_CUR] = 0;
}
}
}
temp_f0 = (f32)play->envCtx.unk_F2[2] / 128;
temp_f0 = (f32)play->envCtx.precipitation[PRECIP_SNOW_CUR] / 128;
temp_f0 = CLAMP(temp_f0, 0.0f, 1.0f);
if (temp_f0 > 0.01f) {
D_801F4E30 = 155.0f * temp_f0;
play->envCtx.sandstormState = 10;
play->envCtx.sandstormState = SANDSTORM_A;
} else {
D_801F4E30 = 0;
play->envCtx.sandstormState = 10;
play->envCtx.sandstormState = SANDSTORM_A;
}
func_808DC454(this, play);
}
@ -413,14 +412,14 @@ void func_808DCDB4(ObjectKankyo* this, PlayState* play) {
temp_f28 = play->view.eye.y + (spA8 * 120.0f);
temp_f18 = play->view.eye.z + (spA4 * 120.0f);
magnitude =
sqrtf((f32)SQ(play->envCtx.windDir.x) + SQ(play->envCtx.windDir.y) + SQ(play->envCtx.windDir.z));
magnitude = sqrtf((f32)SQ(play->envCtx.windDirection.x) + SQ(play->envCtx.windDirection.y) +
SQ(play->envCtx.windDirection.z));
if (magnitude == 0.0f) {
magnitude = 0.001f;
}
spA0 = -play->envCtx.windDir.x / magnitude;
sp9C = -play->envCtx.windDir.z / magnitude;
spA0 = -play->envCtx.windDirection.x / magnitude;
sp9C = -play->envCtx.windDirection.z / magnitude;
if (i == 0) {
this->unk_144 += 0.049999997f * Rand_ZeroOne();
@ -512,7 +511,7 @@ void func_808DD3C8(Actor* thisx, PlayState* play2) {
f32 temp_f2;
f32 tempf;
if ((play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_UNDERWATER) || ((u8)play->envCtx.unk_E2 == 0)) {
if ((play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_UNDERWATER) || ((u8)play->envCtx.stormState == 0)) {
return;
}
@ -525,14 +524,14 @@ void func_808DD3C8(Actor* thisx, PlayState* play2) {
temp_f0 = CLAMP(temp_f0, 0.0f, 1.0f);
Math_SmoothStepToF(&D_808DE5B0, temp_f0, 0.2f, 0.1f, 0.001f);
sp68 = play->envCtx.unk_F2[2];
sp68 = play->envCtx.precipitation[PRECIP_SNOW_CUR];
sp68 *= D_808DE5B0;
if ((play->envCtx.unk_F2[2] >= 32) && (sp68 < 32)) {
if ((play->envCtx.precipitation[PRECIP_SNOW_CUR] >= 32) && (sp68 < 32)) {
sp68 = 32;
}
} else {
sp68 = play->envCtx.unk_F2[2];
sp68 = play->envCtx.precipitation[PRECIP_SNOW_CUR];
}
for (i = 0; i < sp68; i++) {
@ -654,7 +653,7 @@ void func_808DDE9C(Actor* thisx, PlayState* play2) {
Player* player = GET_PLAYER(play);
s32 i;
u8 phi_s5;
u16 end = play->envCtx.unk_F2[1];
u16 end = play->envCtx.precipitation[PRECIP_RAIN_CUR];
f32 temp_f12;
f32 temp_f20;
f32 temp_f22;

View File

@ -144,7 +144,7 @@ void OceffSpot_Update(Actor* thisx, PlayState* play) {
temp = (2.0f - this->unk16C) * this->unk16C;
func_800FD2B4(play, temp * 0.5f, 880.0f, 0.2f, 0.9f);
Environment_AdjustLights(play, temp * 0.5f, 880.0f, 0.2f, 0.9f);
Lights_PointNoGlowSetInfo(&this->lightInfo1, this->actor.world.pos.x, this->actor.world.pos.y + 55.0f,
this->actor.world.pos.z, (s32)(255.0f * temp), (s32)(255.0f * temp), (s32)(200.0f * temp),

View File

@ -522,7 +522,7 @@ FloorEffect sPlayerFloorEffect;
Input* sPlayerControlInput;
s32 sPlayerUseHeldItem; // When true, the current held item is used. Is reset to false every frame.
s32 sPlayerHeldItemButtonIsHeldDown; // Indicates if the button for the current held item is held down.
EnvLightSettings D_80862B50; // backup of play->envCtx.lightSettings
AdjLightSettings D_80862B50; // backup of lay->envCtx.adjLightSettings
s32 D_80862B6C; // this->skelAnime.moveFlags // sPlayerSkelMoveFlags?
s32 func_8082DA90(PlayState* play) {
@ -6284,7 +6284,7 @@ s32 func_80835DF8(PlayState* play, Player* this, CollisionPoly** outPoly, s32* o
f32 yIntersect = func_80835CD8(play, this, &D_8085D100, &pos, outPoly, outBgId);
if ((*outBgId == BGCHECK_SCENE) && (fabsf(this->actor.world.pos.y - yIntersect) < 10.0f)) {
func_800FAAB4(play, SurfaceType_GetLightSettingIndex(&play->colCtx, *outPoly, *outBgId));
Environment_ChangeLightSetting(play, SurfaceType_GetLightSettingIndex(&play->colCtx, *outPoly, *outBgId));
return true;
}
return false;
@ -7323,7 +7323,7 @@ void func_808388B8(PlayState* play, Player* this, PlayerTransformation playerFor
gSaveContext.save.playerForm = playerForm;
this->stateFlags1 |= PLAYER_STATE1_2;
D_80862B50 = play->envCtx.lightSettings;
D_80862B50 = play->envCtx.adjLightSettings;
this->actor.velocity.y = 0.0f;
Actor_DeactivateLens(play);
}
@ -11243,7 +11243,8 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) {
func_801A3CF4(SurfaceType_GetEcho(&play->colCtx, floorPoly, this->actor.floorBgId));
if (this->actor.floorBgId == BGCHECK_SCENE) {
func_800FAAB4(play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, this->actor.floorBgId));
Environment_ChangeLightSetting(
play, SurfaceType_GetLightSettingIndex(&play->colCtx, floorPoly, this->actor.floorBgId));
} else {
DynaPoly_SetPlayerAbove(&play->colCtx, this->actor.floorBgId);
}
@ -11838,9 +11839,9 @@ void func_80844784(PlayState* play, Player* this) {
}
if (play->envCtx.windSpeed >= 50.0f) {
temp_fa0 = play->envCtx.windDir.x;
temp_fa1 = play->envCtx.windDir.y;
temp_ft4 = play->envCtx.windDir.z;
temp_fa0 = play->envCtx.windDirection.x;
temp_fa1 = play->envCtx.windDirection.y;
temp_ft4 = play->envCtx.windDirection.z;
temp_fv0_2 = sqrtf(SQ(temp_fa0) + SQ(temp_fa1) + SQ(temp_ft4));
if (temp_fv0_2 != 0.0f) {
@ -12617,7 +12618,7 @@ void Player_Draw(Actor* thisx, PlayState* play) {
CLAMP_MIN(spB8, spB4) * this->actor.scale.z * 1.15f, MTXMODE_APPLY);
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
Scene_SetRenderModeXlu(play, 0, 1);
Lib_LerpRGB(&D_8085D580, &D_8085D584, this->unk_B10[0], &spBC);
Color_RGB8_Lerp(&D_8085D580, &D_8085D584, this->unk_B10[0], &spBC);
gDPSetEnvColor(POLY_OPA_DISP++, spBC.r, spBC.g, spBC.b, 255);
@ -17838,14 +17839,14 @@ void func_80854EFC(PlayState* play, f32 arg1, struct_8085D848_unk_00* arg2) {
u8* new_var;
s32 pad[4];
new_var = play->envCtx.unk_C4.diffuseColor1;
sp70.fogNear = play->envCtx.unk_C4.fogNear;
sp70.fogColor[0] = play->envCtx.unk_C4.fogColor[0];
sp70.fogColor[1] = play->envCtx.unk_C4.fogColor[1];
sp70.fogColor[2] = play->envCtx.unk_C4.fogColor[2];
sp70.ambientColor[0] = play->envCtx.unk_C4.ambientColor[0];
sp70.ambientColor[1] = play->envCtx.unk_C4.ambientColor[1];
sp70.ambientColor[2] = play->envCtx.unk_C4.ambientColor[2];
new_var = play->envCtx.lightSettings.light1Color;
sp70.fogNear = play->envCtx.lightSettings.fogNear;
sp70.fogColor[0] = play->envCtx.lightSettings.fogColor[0];
sp70.fogColor[1] = play->envCtx.lightSettings.fogColor[1];
sp70.fogColor[2] = play->envCtx.lightSettings.fogColor[2];
sp70.ambientColor[0] = play->envCtx.lightSettings.ambientColor[0];
sp70.ambientColor[1] = play->envCtx.lightSettings.ambientColor[1];
sp70.ambientColor[2] = play->envCtx.lightSettings.ambientColor[2];
if (arg1 <= 1.0f) {
arg1 -= 0.0f;
@ -17876,13 +17877,13 @@ void func_80854EFC(PlayState* play, f32 arg1, struct_8085D848_unk_00* arg2) {
var_t4 = D_8085D844;
}
play->envCtx.lightSettings.fogNear =
((s16)((var_v1->fogNear - var_t0->fogNear) * arg1) + var_t0->fogNear) - play->envCtx.unk_C4.fogNear;
play->envCtx.adjLightSettings.fogNear =
((s16)((var_v1->fogNear - var_t0->fogNear) * arg1) + var_t0->fogNear) - play->envCtx.lightSettings.fogNear;
func_80854CD0(arg1, play->envCtx.lightSettings.fogColor, var_v1->fogColor, var_t0->fogColor,
play->envCtx.unk_C4.fogColor, play->envCtx.lightSettings.ambientColor, var_v1->ambientColor,
var_t0->ambientColor, play->envCtx.unk_C4.ambientColor, play->envCtx.lightSettings.diffuseColor1,
var_t3, var_t4, new_var);
func_80854CD0(arg1, play->envCtx.adjLightSettings.fogColor, var_v1->fogColor, var_t0->fogColor,
play->envCtx.lightSettings.fogColor, play->envCtx.adjLightSettings.ambientColor, var_v1->ambientColor,
var_t0->ambientColor, play->envCtx.lightSettings.ambientColor,
play->envCtx.adjLightSettings.light1Color, var_t3, var_t4, new_var);
}
struct_8085D848 D_8085D848[] = {
@ -18107,7 +18108,7 @@ void Player_Action_87(Player* this, PlayState* play) {
this->prevMask = this->currentMask;
this->csId = play->playerCsIds[PLAYER_CS_ID_MASK_TRANSFORMATION];
Player_StopCutscene(this);
play->envCtx.lightSettings = D_80862B50;
play->envCtx.adjLightSettings = D_80862B50;
func_8085B384(this, play);
return;
}

View File

@ -26,7 +26,7 @@ u32 EffectSsLightning_Init(PlayState* play, u32 index, EffectSs* this, void* ini
void EffectSsLightning_Update(PlayState* play, u32 index, EffectSs* this);
void EffectSsLightning_Draw(PlayState* play, u32 index, EffectSs* this);
TexturePtr sLightningTextures[] = {
static TexturePtr sLightningTextures[] = {
gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex, gEffLightning4Tex,
gEffLightning5Tex, gEffLightning6Tex, gEffLightning7Tex, gEffLightning8Tex,
};

View File

@ -84,7 +84,7 @@ void DayTelop_Update(DayTelopState* this, GameState* thisx) {
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));
gSaveContext.save.time = CLOCK_TIME(6, 0);
D_801BDBC8 = 0xFE;
gSceneSeqState = SCENESEQ_MORNING;
} else if (this->transitionCountdown == 90) {
this->fadeInState = DAYTELOP_HOURSTEXT_FADEIN;
this->alpha = 0;

View File

@ -2197,7 +2197,7 @@ void FileSelect_LoadGame(GameState* thisx) {
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
gSaveContext.cutsceneTrigger = 0;
gSaveContext.chamberCutsceneNum = 0;
gSaveContext.nextDayTime = 0xFFFF;
gSaveContext.nextDayTime = NEXT_TIME_NONE;
gSaveContext.retainWeatherMode = false;
gSaveContext.buttonStatus[EQUIP_SLOT_B] = BTN_ENABLED;
@ -2489,7 +2489,7 @@ void FileSelect_InitContext(GameState* thisx) {
Skybox_Init(&this->state, &this->skyboxCtx, 1);
R_TIME_SPEED = 10;
envCtx->changeSkyboxState = 0;
envCtx->changeSkyboxState = CHANGE_SKYBOX_INACTIVE;
envCtx->changeSkyboxTimer = 0;
envCtx->changeLightEnabled = false;
envCtx->changeLightTimer = 0;

View File

@ -51,7 +51,7 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entrance, s32 spawn) {
gSaveContext.respawn[RESPAWN_MODE_ZORA].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF;
gWeatherMode = 0;
gWeatherMode = WEATHER_MODE_CLEAR;
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, Play_Init, sizeof(PlayState));

View File

@ -1706,86 +1706,86 @@
0x800F4F54:("Font_LoadCharNES",),
0x800F4FC0:("Font_LoadMessageBoxEndIcon",),
0x800F5004:("Font_LoadOrderedFont",),
0x800F5090:("func_800F5090",),
0x800F5090:("Environment_GraphCallback",),
0x800F50D4:("Environment_ZBufValToFixedPoint",),
0x800F510C:("Environment_Init",),
0x800F5954:("func_800F5954",),
0x800F5954:("Environment_SmoothStepToU8",),
0x800F5A8C:("Environment_LerpWeight",),
0x800F5B10:("func_800F5B10",),
0x800F5B10:("Environment_LerpWeightAccelDecel",),
0x800F5CD0:("Environment_UpdateSkybox",),
0x800F6834:("func_800F6834",),
0x800F694C:("func_800F694C",),
0x800F6A04:("func_800F6A04",),
0x800F6A40:("func_800F6A40",),
0x800F6AB8:("func_800F6AB8",),
0x800F6B44:("func_800F6B44",),
0x800F6834:("Environment_EnableUnderwaterLights",),
0x800F694C:("Environment_DisableUnderwaterLights",),
0x800F6A04:("Environment_WipeRumbleRequests",),
0x800F6A40:("Environment_UpdateSkyboxRotY",),
0x800F6AB8:("Environment_UpdateNextDayTime",),
0x800F6B44:("Environment_UpdateTime",),
0x800F6CEC:("func_800F6CEC",),
0x800F6EA4:("func_800F6EA4",),
0x800F6FCC:("Kankyo_IsSceneUpsideDown",),
0x800F6FF8:("func_800F6FF8",),
0x800F8554:("func_800F8554",),
0x800F6FCC:("Environment_IsSceneUpsideDown",),
0x800F6FF8:("Environment_UpdateLights",),
0x800F8554:("Environment_UpdateSun",),
0x800F88C4:("func_800F88C4",),
0x800F8970:("func_800F8970",),
0x800F8A9C:("func_800F8A9C",),
0x800F8A9C:("Environment_UpdatePostmanEvents",),
0x800F8CD4:("Environment_Update",),
0x800F8D84:("func_800F8D84",),
0x800F8D84:("Environment_DrawSun",),
0x800F9728:("Environment_DrawSunLensFlare",),
0x800F9824:("func_800F9824",),
0x800FA39C:("func_800FA39C",),
0x800FA3C4:("func_800FA3C4",),
0x800F9824:("Environment_DrawLensFlare",),
0x800FA39C:("Environment_RandCentered",),
0x800FA3C4:("Environment_DrawRainImpl",),
0x800FA9FC:("Environment_DrawRain",),
0x800FAAB4:("func_800FAAB4",),
0x800FAC20:("func_800FAC20",),
0x800FAF74:("func_800FAF74",),
0x800FB010:("func_800FB010",),
0x800FAAB4:("Environment_ChangeLightSetting",),
0x800FAC20:("Environment_DrawSkyboxFilters",),
0x800FAF74:("Environment_DrawLightningFlash",),
0x800FB010:("Environment_UpdateLightningStrike",),
0x800FB320:("Environment_AddLightningBolts",),
0x800FB388:("func_800FB388",),
0x800FB758:("func_800FB758",),
0x800FB9B4:("func_800FB9B4",),
0x800FB388:("Environment_DrawLightning",),
0x800FB758:("Environment_PlaySceneSequence",),
0x800FB9B4:("Environment_UpdateTimeBasedSequence",),
0x800FBCBC:("Environment_DrawCustomLensFlare",),
0x800FBDEC:("Kankyo_InitGameOverLights",),
0x800FBF3C:("Kankyo_FadeInGameOverLights",),
0x800FC158:("Kankyo_FadeOutGameOverLights",),
0x800FC3DC:("func_800FC3DC",),
0x800FBDEC:("Environment_InitGameOverLights",),
0x800FBF3C:("Environment_FadeInGameOverLights",),
0x800FC158:("Environment_FadeOutGameOverLights",),
0x800FC3DC:("Environment_UpdateRain",),
0x800FC444:("Environment_FillScreen",),
0x800FC64C:("Environment_DrawSandstorm",),
0x800FD2B4:("func_800FD2B4",),
0x800FD538:("func_800FD538",),
0x800FD2B4:("Environment_AdjustLights",),
0x800FD538:("Environment_LerpRGB8",),
0x800FD59C:("Environment_LerpAmbientColor",),
0x800FD5E0:("Environment_LerpDiffuseColor",),
0x800FD654:("Environment_LerpFogColor",),
0x800FD698:("Environment_LerpFog",),
0x800FD720:("get_days_elapsed",),
0x800FD730:("reset_days_elapsed",),
0x800FD740:("get_current_day",),
0x800FD750:("func_800FD750",),
0x800FD768:("func_800FD768",),
0x800FD78C:("func_800FD78C",),
0x800FD858:("func_800FD858",),
0x800FD928:("func_800FD928",),
0x800FD980:("func_800FD980",),
0x800FDAF8:("func_800FDAF8",),
0x800FDC94:("func_800FDC94",),
0x800FE390:("func_800FE390",),
0x800FE3E0:("func_800FE3E0",),
0x800FD720:("Environment_GetEventDayCount",),
0x800FD730:("Environment_ClearEventDayCount",),
0x800FD740:("Environment_GetTotalDays",),
0x800FD750:("Environment_ForcePlaySequence",),
0x800FD768:("Environment_IsForcedSequenceDisabled",),
0x800FD78C:("Environment_PlayStormNatureAmbience",),
0x800FD858:("Environment_StopStormNatureAmbience",),
0x800FD928:("Environment_WarpSongLeave",),
0x800FD980:("Environment_SetupSkyboxStars",),
0x800FDAF8:("Environment_DrawSkyboxStar",),
0x800FDC94:("Environment_DrawSkyboxStarsImpl",),
0x800FE390:("Environment_Draw",),
0x800FE3E0:("Environment_DrawSkyboxStars",),
0x800FE484:("Environment_StopTime",),
0x800FE498:("Environment_StartTime",),
0x800FE4A8:("Environment_IsTimeStopped",),
0x800FE4B8:("func_800FE4B8",),
0x800FE590:("func_800FE590",),
0x800FE4B8:("Environment_GetStormState",),
0x800FE590:("Environment_IsFinalHours",),
0x800FE5D0:("func_800FE5D0",),
0x800FE610:("func_800FE610",),
0x800FE620:("func_800FE620",),
0x800FE658:("func_800FE658",),
0x800FE620:("Environment_GetTimeSpeed",),
0x800FE658:("Environment_SetTimeJump",),
0x800FE6F8:("func_800FE6F8",),
0x800FE778:("func_800FE778",),
0x800FE788:("func_800FE788",),
0x800FE798:("func_800FE798",),
0x800FE7A8:("func_800FE7A8",),
0x800FE778:("Environment_GetSandstormColorIndex",),
0x800FE788:("Environment_GetNextSandstormColorIndex",),
0x800FE798:("Environment_GetSandstormLerpScale",),
0x800FE7A8:("Environment_LerpSandstormColors",),
0x800FE9B4:("func_800FE9B4",),
0x800FEA50:("func_800FEA50",),
0x800FEAB0:("func_800FEAB0",),
0x800FEAC0:("func_800FEAC0",),
0x800FEAC0:("Environment_JumpForwardInTime",),
0x800FEAF4:("func_800FEAF4",),
0x800FEC90:("Lib_MemCpy",),
0x800FECC0:("Lib_MemSet",),
@ -1849,7 +1849,7 @@
0x801000CC:("Lib_PlaySfx_2",),
0x801000F4:("Lib_PlaySfx_AtPos",),
0x8010011C:("Lib_Vec3f_TranslateAndRotateY",),
0x801001B8:("Lib_LerpRGB",),
0x801001B8:("Color_RGB8_Lerp",),
0x80100448:("Math_Vec3f_StepTo",),
0x801004FC:("Lib_Nop801004FC",),
0x80100504:("Lib_SegmentedToVirtual",),

View File

@ -946,36 +946,33 @@
0x801BDB08:("sKaleidoSetupRightPageEyeX","UNK_TYPE1","",0x1),
0x801BDB18:("sKaleidoSetupRightPageEyeZ","UNK_TYPE1","",0x1),
0x801BDB30:("kanfontOrdering","u8","[92]",0x5c),
0x801BDB90:("D_801BDB90","f32","",0x4),
0x801BDB94:("D_801BDB94","UNK_TYPE4","",0x4),
0x801BDB98:("D_801BDB98","UNK_TYPE4","",0x4),
0x801BDB9C:("D_801BDB9C","UNK_TYPE2","",0x2),
0x801BDBA0:("D_801BDBA0","UNK_TYPE1","",0x1),
0x801BDBA4:("D_801BDBA4","UNK_TYPE1","",0x1),
0x801BDB90:("sSandstormLerpScale","f32","",0x4),
0x801BDB94:("sSunScreenDepth","UNK_TYPE4","",0x4),
0x801BDB98:("sEnvSkyboxNumStars","UNK_TYPE4","",0x4),
0x801BDB9C:("sTimeJump","UNK_TYPE2","",0x2),
0x801BDBA0:("sSandstormColorIndex","UNK_TYPE1","",0x1),
0x801BDBA4:("sNextSandstormColorIndex","UNK_TYPE1","",0x1),
0x801BDBA8:("D_801BDBA8","UNK_TYPE1","",0x1),
0x801BDBB0:("gWeatherMode","u8","",0x1),
0x801BDBB4:("D_801BDBB4","UNK_TYPE1","",0x1),
0x801BDBB8:("D_801BDBB8","UNK_TYPE1","",0x1),
0x801BDBBC:("D_801BDBBC","UNK_TYPE1","",0x1),
0x801BDBB4:("gLightConfigAfterUnderwater","UNK_TYPE1","",0x1),
0x801BDBB8:("gInterruptSongOfStorms","UNK_TYPE1","",0x1),
0x801BDBBC:("sSkyboxIsChanging","UNK_TYPE1","",0x1),
0x801BDBC0:("D_801BDBC0","UNK_TYPE1","",0x1),
0x801BDBC4:("D_801BDBC4","UNK_TYPE1","",0x1),
0x801BDBC8:("D_801BDBC8","u8","",0x1),
0x801BDBCC:("D_801BDBCC","UNK_TYPE1","",0x1),
0x801BDCF4:("D_801BDCF4","UNK_TYPE1","",0x1),
0x801BE38E:("D_801BE38E","UNK_TYPE1","",0x1),
0x801BE38F:("D_801BE38F","UNK_TYPE1","",0x1),
0x801BE390:("D_801BE390","UNK_TYPE1","",0x1),
0x801BE4D4:("D_801BE4D4","UNK_TYPE1","",0x1),
0x801BE4F4:("D_801BE4F4","UNK_TYPE1","",0x1),
0x801BE534:("D_801BE534","UNK_TYPE1","",0x1),
0x801BE6D4:("D_801BE6D4","UNK_TYPE1","",0x1),
0x801BE874:("D_801BE874","UNK_TYPE1","",0x1),
0x801BE894:("D_801BE894","UNK_TYPE4","",0x4),
0x801BE8BC:("D_801BE8BC","UNK_TYPE4","",0x4),
0x801BE8E4:("D_801BE8E4","UNK_TYPE4","",0x4),
0x801BE90C:("D_801BE90C","UNK_TYPE1","",0x1),
0x801BE92C:("D_801BE92C","UNK_TYPE1","",0x1),
0x801BE944:("D_801BE944","UNK_TYPE1","",0x1),
0x801BDBC8:("gSceneSeqState","u8","",0x1),
0x801BDBCC:("sTimeBasedLightConfigs","UNK_TYPE1","",0x1),
0x801BDCF4:("sTimeBasedSkyboxConfigs","TimeBasedSkyboxEntry","[28][9]",0x7E0),
0x801BE4D4:("sNormalSkyFiles","UNK_TYPE1","",0x1),
0x801BE4F4:("sZBufValConversionTable","UNK_TYPE1","",0x1),
0x801BE534:("sSkyboxPrimColors","UNK_TYPE1","",0x1),
0x801BE6D4:("sSkyboxEnvColors","UNK_TYPE1","",0x1),
0x801BE874:("sLensFlareColors","UNK_TYPE1","",0x1),
0x801BE894:("sLensFlareScales","UNK_TYPE4","",0x4),
0x801BE8BC:("sLensFlareAlphas","UNK_TYPE4","",0x4),
0x801BE8E4:("sLensFlareTypes","UNK_TYPE4","",0x4),
0x801BE90C:("sLightningTextures","UNK_TYPE1","",0x1),
0x801BE92C:("sSandstormPrimColors","UNK_TYPE1","",0x1),
0x801BE944:("sSandstormEnvColors","UNK_TYPE1","",0x1),
0x801BE960:("sInitChainHandlers","actor_init_var_func","[11]",0x2c),
0x801BE990:("sHeartsPrimColors","s16","[3][3]",0x12),
0x801BE9A4:("sHeartsEnvColors","s16","[3][3]",0x12),
@ -3870,45 +3867,45 @@
0x801F4E20:("D_801F4E20","UNK_TYPE1","",0x1),
0x801F4E30:("D_801F4E30","UNK_TYPE1","",0x1),
0x801F4E31:("D_801F4E31","UNK_TYPE1","",0x1),
0x801F4E32:("D_801F4E32","UNK_TYPE1","",0x1),
0x801F4E38:("D_801F4E38","UNK_TYPE1","",0x1),
0x801F4E32:("gCustomLensFlare1On","UNK_TYPE1","",0x1),
0x801F4E38:("gCustomLensFlare1Pos","UNK_TYPE1","",0x1),
0x801F4E3C:("D_801F4E3C","UNK_TYPE1","",0x1),
0x801F4E40:("D_801F4E40","UNK_TYPE1","",0x1),
0x801F4E44:("D_801F4E44","UNK_TYPE1","",0x1),
0x801F4E48:("D_801F4E48","UNK_TYPE1","",0x1),
0x801F4E4C:("D_801F4E4C","UNK_TYPE1","",0x1),
0x801F4E4E:("D_801F4E4E","UNK_TYPE1","",0x1),
0x801F4E50:("D_801F4E50","UNK_TYPE1","",0x1),
0x801F4E4E:("gCustomLensFlare2On","UNK_TYPE1","",0x1),
0x801F4E50:("gCustomLensFlare2Pos","UNK_TYPE1","",0x1),
0x801F4E54:("D_801F4E54","UNK_TYPE1","",0x1),
0x801F4E58:("D_801F4E58","UNK_TYPE1","",0x1),
0x801F4E5C:("D_801F4E5C","UNK_TYPE1","",0x1),
0x801F4E60:("D_801F4E60","UNK_TYPE1","",0x1),
0x801F4E64:("D_801F4E64","UNK_TYPE1","",0x1),
0x801F4E68:("D_801F4E68","UNK_TYPE1","",0x1),
0x801F4E68:("gLightningStrike","UNK_TYPE1","",0x1),
0x801F4E70:("D_801F4E70","UNK_TYPE1","",0x1),
0x801F4E74:("D_801F4E74","UNK_TYPE1","",0x1),
0x801F4E78:("D_801F4E78","UNK_TYPE1","",0x1),
0x801F4E7A:("D_801F4E7A","s16","",0x2),
0x801F4E80:("D_801F4E80","UNK_TYPE1","",0x1),
0x801F4EE0:("D_801F4EE0","UNK_TYPE1","",0x1),
0x801F4EE8:("D_801F4EE8","UNK_TYPE1","",0x1),
0x801F4EF8:("D_801F4EF8","UNK_TYPE1","",0x1),
0x801F4F00:("D_801F4F00","UNK_TYPE1","",0x1),
0x801F4F10:("D_801F4F10","UNK_TYPE1","",0x1),
0x801F4F14:("D_801F4F14","UNK_TYPE1","",0x1),
0x801F4F18:("D_801F4F18","UNK_TYPE1","",0x1),
0x801F4F1C:("D_801F4F1C","UNK_TYPE1","",0x1),
0x801F4F20:("D_801F4F20","UNK_TYPE1","",0x1),
0x801F4F24:("D_801F4F24","UNK_TYPE1","",0x1),
0x801F4E7A:("gSkyboxNumStars","s16","",0x2),
0x801F4E80:("sLightningBolts","UNK_TYPE1","",0x1),
0x801F4EE0:("sNGameOverLightNode","UNK_TYPE1","",0x1),
0x801F4EE8:("sNGameOverLightInfo","UNK_TYPE1","",0x1),
0x801F4EF8:("sSGameOverLightNode","UNK_TYPE1","",0x1),
0x801F4F00:("sSGameOverLightInfo","UNK_TYPE1","",0x1),
0x801F4F10:("sSunEnvAlpha","UNK_TYPE1","",0x1),
0x801F4F14:("sSunColor","UNK_TYPE1","",0x1),
0x801F4F18:("sSunScale","UNK_TYPE1","",0x1),
0x801F4F1C:("sSunPrimAlpha","UNK_TYPE1","",0x1),
0x801F4F20:("sSunDepthTestX","UNK_TYPE1","",0x1),
0x801F4F24:("sSunDepthTestY","UNK_TYPE1","",0x1),
0x801F4F28:("D_801F4F28","UNK_TYPE1","",0x1),
0x801F4F2C:("D_801F4F2C","UNK_TYPE1","",0x1),
0x801F4F2E:("D_801F4F2E","UNK_TYPE1","",0x1),
0x801F4F2C:("sLightningFlashAlpha","UNK_TYPE1","",0x1),
0x801F4F2E:("sSandstormScroll","UNK_TYPE1","",0x1),
0x801F4F30:("D_801F4F30","UNK_TYPE1","",0x1),
0x801F4F31:("D_801F4F31","UNK_TYPE1","",0x1),
0x801F4F32:("D_801F4F32","UNK_TYPE1","",0x1),
0x801F4F32:("sEnvIsTimeStopped","UNK_TYPE1","",0x1),
0x801F4F33:("D_801F4F33","UNK_TYPE1","",0x1),
0x801F4F34:("D_801F4F34","UNK_TYPE1","",0x1),
0x801F4F38:("D_801F4F38","UNK_TYPE1","",0x1),
0x801F4F34:("sGameOverLightsIntensity","UNK_TYPE1","",0x1),
0x801F4F38:("sSkyboxStarsDList","UNK_TYPE1","",0x1),
0x801F4F40:("sBeatingHeartsDDPrim","s32","[3]",0x6),
0x801F4F48:("sBeatingHeartsDDEnv","s32","[3]",0x6),
0x801F4F50:("sHeartsDDPrim","s32","[2][3]",0xC),

View File

@ -649,10 +649,64 @@ wordReplace = {
"func_800A81F0": "EffectBlure_AddVertex",
"func_800A8514": "EffectBlure_AddSpace",
"Effect_GetParams": "Effect_GetByIndex",
"func_800FE484": "Environment_StopTime",
"func_800FE498": "Environment_StartTime",
"func_800FE4A8": "Environment_IsTimeStopped",
"func_800F5A8C": "Environment_LerpWeight",
"func_800FD2B4": "Environment_AdjustLights",
"func_800FAAB4": "Environment_ChangeLightSetting",
"func_800FD78C": "Environment_PlayStormNatureAmbience",
"func_800FD858": "Environment_StopStormNatureAmbience",
"func_800F6834": "Environment_EnableUnderwaterLights",
"func_800F9824": "Environment_DrawLensFlare",
"func_800FE658": "Environment_SetTimeJump",
"func_800FE620": "Environment_GetTimeSpeed",
"func_800FD750": "Environment_ForcePlaySequence",
"func_800FE7A8": "Environment_LerpSandstormColors",
"func_800FB758": "Environment_PlaySceneSequence",
"func_800FE4B8": "Environment_GetStormState",
"Kankyo_FadeInGameOverLights": "Environment_FadeInGameOverLights",
"Kankyo_InitGameOverLights": "Environment_InitGameOverLights",
"Kankyo_FadeOutGameOverLights": "Environment_FadeOutGameOverLights",
"func_800F5090": "Environment_GraphCallback",
"func_800F5954": "Environment_SmoothStepToU8",
"func_800F5B10": "Environment_LerpWeightAccelDecel",
"func_800F694C": "Environment_DisableUnderwaterLights",
"func_800F6A40": "Environment_UpdateSkyboxRotY",
"func_800F6AB8": "Environment_UpdateNextDayTime",
"func_800F6B44": "Environment_UpdateTime",
"Kankyo_IsSceneUpsideDown": "Environment_IsSceneUpsideDown",
"func_800F6FF8": "Environment_UpdateLights",
"func_800F8554": "Environment_UpdateSun",
"func_800F8A9C": "Environment_UpdatePostmanEvents",
"func_800F8D84": "Environment_DrawSun",
"func_800FA39C": "Environment_RandCentered",
"func_800FA3C4": "Environment_DrawRainImpl",
"func_800FAC20": "Environment_DrawSkyboxFilters",
"func_800FAF74": "Environment_DrawLightningFlash",
"func_800FB010": "Environment_UpdateLightningStrike",
"func_800FB388": "Environment_DrawLightning",
"func_800FB9B4": "Environment_UpdateTimeBasedSequence",
"func_800FC3DC": "Environment_UpdateRain",
"func_800FD538": "Environment_LerpRGB8",
"get_days_elapsed": "Environment_GetEventDayCount",
"reset_days_elapsed": "Environment_ClearEventDayCount",
"get_current_day": "Environment_GetTotalDays",
"func_800FD768": "Environment_IsForcedSequenceDisabled",
"func_800FD928": "Environment_WarpSongLeave",
"func_800FD980": "Environment_SetupSkyboxStars",
"func_800FDAF8": "Environment_DrawSkyboxStar",
"func_800FDC94": "Environment_DrawSkyboxStarsImpl",
"func_800FE390": "Environment_Draw",
"func_800FE3E0": "Environment_DrawSkyboxStars",
"func_800FE590": "Environment_IsFinalHours",
"func_800FE778": "Environment_GetSandstormColorIndex",
"func_800FE788": "Environment_GetNextSandstormColorIndex",
"func_800FE798": "Environment_GetSandstormLerpScale",
"func_800FE7A8": "Environment_LerpSandstormColors",
"func_800FEAC0": "Environment_JumpForwardInTime",
"func_801A3F54": "Audio_SetCutsceneFlag",
"func_800EA0D4": "Cutscene_StartManual",
@ -1031,6 +1085,8 @@ wordReplace = {
"gSaveContext.save.horseData": "gSaveContext.save.saveInfo.horseData",
"gSaveContext.save.checksum": "gSaveContext.save.saveInfo.checksum",
"gSaveContext.save.daysElapsed": "gSaveContext.save.eventDayCount",
"player->unk_A87": "player->exchangeItemAction",
"player->exchangeItemId": "player->exchangeItemAction",
"player->leftHandActor": "player->heldActor",
@ -1085,7 +1141,7 @@ wordReplace = {
"globalCtx->mf_187FC": "play->billboardMtxF",
"globalCtx->projectionMatrix": "play->viewProjectionMtxF",
"globalCtx->actorCtx.actorList[": "play->actorCtx.actorLists[",
"globalCtx->envCtx.unk_8C": "play->envCtx.lightSettings",
"globalCtx->envCtx.unk_8C": "play->envCtx.adjLightSettings",
"globalCtx->envCtx.unk_E5": "play->envCtx.fillScreen",
"globalCtx->envCtx.unk_E6": "play->envCtx.screenFillColor",
"globalCtx->envCtx.unk_C3": "play->envCtx.lightSettingOverride",
@ -1161,6 +1217,15 @@ wordReplace = {
"play->roomCtx.unk31": "play->roomCtx.status",
"play->objectCtx.status": "play->objectCtx.slots",
"play->envCtx.unk_E0": "play->envCtx.lightBlendOverride",
"play->envCtx.unk_E1": "play->envCtx.stormRequest",
"play->envCtx.unk_E2": "play->envCtx.stormState",
"play->envCtx.unk_E3": "play->envCtx.lightningState",
"play->envCtx.unk_E4": "play->envCtx.timeSeqState",
"play->envCtx.unk_F2": "play->envCtx.precipitation",
"play->envCtx.windDir": "play->envCtx.windDirection",
"play->envCtx.sunMoonDisabled": "play->envCtx.sunDisabled",
"actorCtx.unkC": "actorCtx.halfDaysBit",
"actorCtx.unk1F4": "actorCtx.playerImpact.type",
"actorCtx.unk1F5": "actorCtx.playerImpact.timer",
@ -1198,6 +1263,16 @@ wordReplace = {
"D_801BDA9C": "gHorseIsMounted",
"D_801BDAA4": "gHorsePlayedEponasSong",
"D_801BDBC8": "gSceneSeqState",
"D_801F4E32": "gCustomLensFlare1On",
"D_801F4E38": "gCustomLensFlare1Pos",
"D_801F4E4E": "gCustomLensFlare2On",
"D_801F4E50": "gCustomLensFlare2Pos",
"D_801F4E7A": "gSkyboxNumStars",
"D_801BDBB8": "gInterruptSongOfStorms",
"D_801BDBB4": "gLightConfigAfterUnderwater",
"D_801F4E68": "gLightningStrike",
# Macros
"CUR_EQUIP_VALUE_VOID": "GET_CUR_EQUIP_VALUE",
"CUR_UPG_VALUE_VOID": "GET_CUR_UPG_VALUE",

View File

@ -1220,86 +1220,86 @@ asm/non_matchings/code/z_kanfont/Font_LoadChar.s,Font_LoadChar,0x800F4F40,0x5
asm/non_matchings/code/z_kanfont/Font_LoadCharNES.s,Font_LoadCharNES,0x800F4F54,0x1B
asm/non_matchings/code/z_kanfont/Font_LoadMessageBoxEndIcon.s,Font_LoadMessageBoxEndIcon,0x800F4FC0,0x11
asm/non_matchings/code/z_kanfont/Font_LoadOrderedFont.s,Font_LoadOrderedFont,0x800F5004,0x23
asm/non_matchings/code/z_kankyo/func_800F5090.s,func_800F5090,0x800F5090,0x11
asm/non_matchings/code/z_kankyo/Environment_GraphCallback.s,Environment_GraphCallback,0x800F5090,0x11
asm/non_matchings/code/z_kankyo/Environment_ZBufValToFixedPoint.s,Environment_ZBufValToFixedPoint,0x800F50D4,0xE
asm/non_matchings/code/z_kankyo/Environment_Init.s,Environment_Init,0x800F510C,0x212
asm/non_matchings/code/z_kankyo/func_800F5954.s,func_800F5954,0x800F5954,0x4E
asm/non_matchings/code/z_kankyo/Environment_SmoothStepToU8.s,Environment_SmoothStepToU8,0x800F5954,0x4E
asm/non_matchings/code/z_kankyo/Environment_LerpWeight.s,Environment_LerpWeight,0x800F5A8C,0x21
asm/non_matchings/code/z_kankyo/func_800F5B10.s,func_800F5B10,0x800F5B10,0x70
asm/non_matchings/code/z_kankyo/Environment_LerpWeightAccelDecel.s,Environment_LerpWeightAccelDecel,0x800F5B10,0x70
asm/non_matchings/code/z_kankyo/Environment_UpdateSkybox.s,Environment_UpdateSkybox,0x800F5CD0,0x2D9
asm/non_matchings/code/z_kankyo/func_800F6834.s,func_800F6834,0x800F6834,0x46
asm/non_matchings/code/z_kankyo/func_800F694C.s,func_800F694C,0x800F694C,0x2E
asm/non_matchings/code/z_kankyo/Environment_EnableUnderwaterLights.s,Environment_EnableUnderwaterLights,0x800F6834,0x46
asm/non_matchings/code/z_kankyo/Environment_DisableUnderwaterLights.s,Environment_DisableUnderwaterLights,0x800F694C,0x2E
asm/non_matchings/code/z_kankyo/func_800F6A04.s,func_800F6A04,0x800F6A04,0xF
asm/non_matchings/code/z_kankyo/func_800F6A40.s,func_800F6A40,0x800F6A40,0x1E
asm/non_matchings/code/z_kankyo/func_800F6AB8.s,func_800F6AB8,0x800F6AB8,0x23
asm/non_matchings/code/z_kankyo/func_800F6B44.s,func_800F6B44,0x800F6B44,0x6A
asm/non_matchings/code/z_kankyo/Environment_UpdateSkyboxRotY.s,Environment_UpdateSkyboxRotY,0x800F6A40,0x1E
asm/non_matchings/code/z_kankyo/Environment_UpdateNextDayTime.s,Environment_UpdateNextDayTime,0x800F6AB8,0x23
asm/non_matchings/code/z_kankyo/Environment_UpdateTime.s,Environment_UpdateTime,0x800F6B44,0x6A
asm/non_matchings/code/z_kankyo/func_800F6CEC.s,func_800F6CEC,0x800F6CEC,0x6E
asm/non_matchings/code/z_kankyo/func_800F6EA4.s,func_800F6EA4,0x800F6EA4,0x4A
asm/non_matchings/code/z_kankyo/Kankyo_IsSceneUpsideDown.s,Kankyo_IsSceneUpsideDown,0x800F6FCC,0xB
asm/non_matchings/code/z_kankyo/func_800F6FF8.s,func_800F6FF8,0x800F6FF8,0x557
asm/non_matchings/code/z_kankyo/func_800F8554.s,func_800F8554,0x800F8554,0xDC
asm/non_matchings/code/z_kankyo/Environment_IsSceneUpsideDown.s,Environment_IsSceneUpsideDown,0x800F6FCC,0xB
asm/non_matchings/code/z_kankyo/Environment_UpdateLights.s,Environment_UpdateLights,0x800F6FF8,0x557
asm/non_matchings/code/z_kankyo/Environment_UpdateSun.s,Environment_UpdateSun,0x800F8554,0xDC
asm/non_matchings/code/z_kankyo/func_800F88C4.s,func_800F88C4,0x800F88C4,0x2B
asm/non_matchings/code/z_kankyo/func_800F8970.s,func_800F8970,0x800F8970,0x4B
asm/non_matchings/code/z_kankyo/func_800F8A9C.s,func_800F8A9C,0x800F8A9C,0x8E
asm/non_matchings/code/z_kankyo/Environment_UpdatePostmanEvents.s,Environment_UpdatePostmanEvents,0x800F8A9C,0x8E
asm/non_matchings/code/z_kankyo/Environment_Update.s,Environment_Update,0x800F8CD4,0x2C
asm/non_matchings/code/z_kankyo/func_800F8D84.s,func_800F8D84,0x800F8D84,0x269
asm/non_matchings/code/z_kankyo/Environment_DrawSun.s,Environment_DrawSun,0x800F8D84,0x269
asm/non_matchings/code/z_kankyo/Environment_DrawSunLensFlare.s,Environment_DrawSunLensFlare,0x800F9728,0x3F
asm/non_matchings/code/z_kankyo/func_800F9824.s,func_800F9824,0x800F9824,0x2DE
asm/non_matchings/code/z_kankyo/func_800FA39C.s,func_800FA39C,0x800FA39C,0xA
asm/non_matchings/code/z_kankyo/func_800FA3C4.s,func_800FA3C4,0x800FA3C4,0x18E
asm/non_matchings/code/z_kankyo/Environment_DrawLensFlare.s,Environment_DrawLensFlare,0x800F9824,0x2DE
asm/non_matchings/code/z_kankyo/Environment_RandCentered.s,Environment_RandCentered,0x800FA39C,0xA
asm/non_matchings/code/z_kankyo/Environment_DrawRainImpl.s,Environment_DrawRainImpl,0x800FA3C4,0x18E
asm/non_matchings/code/z_kankyo/Environment_DrawRain.s,Environment_DrawRain,0x800FA9FC,0x2E
asm/non_matchings/code/z_kankyo/func_800FAAB4.s,func_800FAAB4,0x800FAAB4,0x5B
asm/non_matchings/code/z_kankyo/func_800FAC20.s,func_800FAC20,0x800FAC20,0xD5
asm/non_matchings/code/z_kankyo/func_800FAF74.s,func_800FAF74,0x800FAF74,0x27
asm/non_matchings/code/z_kankyo/func_800FB010.s,func_800FB010,0x800FB010,0xC4
asm/non_matchings/code/z_kankyo/Environment_ChangeLightSetting.s,Environment_ChangeLightSetting,0x800FAAB4,0x5B
asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxFilters.s,Environment_DrawSkyboxFilters,0x800FAC20,0xD5
asm/non_matchings/code/z_kankyo/Environment_DrawLightningFlash.s,Environment_DrawLightningFlash,0x800FAF74,0x27
asm/non_matchings/code/z_kankyo/Environment_UpdateLightningStrike.s,Environment_UpdateLightningStrike,0x800FB010,0xC4
asm/non_matchings/code/z_kankyo/Environment_AddLightningBolts.s,Environment_AddLightningBolts,0x800FB320,0x1A
asm/non_matchings/code/z_kankyo/func_800FB388.s,func_800FB388,0x800FB388,0xF4
asm/non_matchings/code/z_kankyo/func_800FB758.s,func_800FB758,0x800FB758,0x97
asm/non_matchings/code/z_kankyo/func_800FB9B4.s,func_800FB9B4,0x800FB9B4,0xC2
asm/non_matchings/code/z_kankyo/Environment_DrawLightning.s,Environment_DrawLightning,0x800FB388,0xF4
asm/non_matchings/code/z_kankyo/Environment_PlaySceneSequence.s,Environment_PlaySceneSequence,0x800FB758,0x97
asm/non_matchings/code/z_kankyo/Environment_UpdateTimeBasedSequence.s,Environment_UpdateTimeBasedSequence,0x800FB9B4,0xC2
asm/non_matchings/code/z_kankyo/Environment_DrawCustomLensFlare.s,Environment_DrawCustomLensFlare,0x800FBCBC,0x4C
asm/non_matchings/code/z_kankyo/Kankyo_InitGameOverLights.s,Kankyo_InitGameOverLights,0x800FBDEC,0x54
asm/non_matchings/code/z_kankyo/Kankyo_FadeInGameOverLights.s,Kankyo_FadeInGameOverLights,0x800FBF3C,0x87
asm/non_matchings/code/z_kankyo/Kankyo_FadeOutGameOverLights.s,Kankyo_FadeOutGameOverLights,0x800FC158,0xA1
asm/non_matchings/code/z_kankyo/func_800FC3DC.s,func_800FC3DC,0x800FC3DC,0x1A
asm/non_matchings/code/z_kankyo/Environment_InitGameOverLights.s,Environment_InitGameOverLights,0x800FBDEC,0x54
asm/non_matchings/code/z_kankyo/Environment_FadeInGameOverLights.s,Environment_FadeInGameOverLights,0x800FBF3C,0x87
asm/non_matchings/code/z_kankyo/Environment_FadeOutGameOverLights.s,Environment_FadeOutGameOverLights,0x800FC158,0xA1
asm/non_matchings/code/z_kankyo/Environment_UpdateRain.s,Environment_UpdateRain,0x800FC3DC,0x1A
asm/non_matchings/code/z_kankyo/Environment_FillScreen.s,Environment_FillScreen,0x800FC444,0x82
asm/non_matchings/code/z_kankyo/Environment_DrawSandstorm.s,Environment_DrawSandstorm,0x800FC64C,0x31A
asm/non_matchings/code/z_kankyo/func_800FD2B4.s,func_800FD2B4,0x800FD2B4,0xA1
asm/non_matchings/code/z_kankyo/func_800FD538.s,func_800FD538,0x800FD538,0x19
asm/non_matchings/code/z_kankyo/Environment_AdjustLights.s,Environment_AdjustLights,0x800FD2B4,0xA1
asm/non_matchings/code/z_kankyo/Environment_LerpRGB8.s,Environment_LerpRGB8,0x800FD538,0x19
asm/non_matchings/code/z_kankyo/Environment_LerpAmbientColor.s,Environment_LerpAmbientColor,0x800FD59C,0x11
asm/non_matchings/code/z_kankyo/Environment_LerpDiffuseColor.s,Environment_LerpDiffuseColor,0x800FD5E0,0x1D
asm/non_matchings/code/z_kankyo/Environment_LerpFogColor.s,Environment_LerpFogColor,0x800FD654,0x11
asm/non_matchings/code/z_kankyo/Environment_LerpFog.s,Environment_LerpFog,0x800FD698,0x22
asm/non_matchings/code/z_kankyo/get_days_elapsed.s,get_days_elapsed,0x800FD720,0x4
asm/non_matchings/code/z_kankyo/reset_days_elapsed.s,reset_days_elapsed,0x800FD730,0x4
asm/non_matchings/code/z_kankyo/get_current_day.s,get_current_day,0x800FD740,0x4
asm/non_matchings/code/z_kankyo/func_800FD750.s,func_800FD750,0x800FD750,0x6
asm/non_matchings/code/z_kankyo/func_800FD768.s,func_800FD768,0x800FD768,0x9
asm/non_matchings/code/z_kankyo/func_800FD78C.s,func_800FD78C,0x800FD78C,0x33
asm/non_matchings/code/z_kankyo/func_800FD858.s,func_800FD858,0x800FD858,0x34
asm/non_matchings/code/z_kankyo/func_800FD928.s,func_800FD928,0x800FD928,0x16
asm/non_matchings/code/z_kankyo/func_800FD980.s,func_800FD980,0x800FD980,0x5E
asm/non_matchings/code/z_kankyo/func_800FDAF8.s,func_800FDAF8,0x800FDAF8,0x67
asm/non_matchings/code/z_kankyo/func_800FDC94.s,func_800FDC94,0x800FDC94,0x1BF
asm/non_matchings/code/z_kankyo/func_800FE390.s,func_800FE390,0x800FE390,0x14
asm/non_matchings/code/z_kankyo/func_800FE3E0.s,func_800FE3E0,0x800FE3E0,0x29
asm/non_matchings/code/z_kankyo/Environment_GetEventDayCount.s,Environment_GetEventDayCount,0x800FD720,0x4
asm/non_matchings/code/z_kankyo/Environment_ClearEventDayCount.s,Environment_ClearEventDayCount,0x800FD730,0x4
asm/non_matchings/code/z_kankyo/Environment_GetTotalDays.s,Environment_GetTotalDays,0x800FD740,0x4
asm/non_matchings/code/z_kankyo/Environment_ForcePlaySequence.s,Environment_ForcePlaySequence,0x800FD750,0x6
asm/non_matchings/code/z_kankyo/Environment_IsForcedSequenceDisabled.s,Environment_IsForcedSequenceDisabled,0x800FD768,0x9
asm/non_matchings/code/z_kankyo/Environment_PlayStormNatureAmbience.s,Environment_PlayStormNatureAmbience,0x800FD78C,0x33
asm/non_matchings/code/z_kankyo/Environment_StopStormNatureAmbience.s,Environment_StopStormNatureAmbience,0x800FD858,0x34
asm/non_matchings/code/z_kankyo/Environment_WarpSongLeave.s,Environment_WarpSongLeave,0x800FD928,0x16
asm/non_matchings/code/z_kankyo/Environment_SetupSkyboxStars.s,Environment_SetupSkyboxStars,0x800FD980,0x5E
asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStar.s,Environment_DrawSkyboxStar,0x800FDAF8,0x67
asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStarsImpl.s,Environment_DrawSkyboxStarsImpl,0x800FDC94,0x1BF
asm/non_matchings/code/z_kankyo/Environment_Draw.s,Environment_Draw,0x800FE390,0x14
asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStars.s,Environment_DrawSkyboxStars,0x800FE3E0,0x29
asm/non_matchings/code/z_kankyo/Environment_StopTime.s,Environment_StopTime,0x800FE484,0x5
asm/non_matchings/code/z_kankyo/Environment_StartTime.s,Environment_StartTime,0x800FE498,0x4
asm/non_matchings/code/z_kankyo/Environment_IsTimeStopped.s,Environment_IsTimeStopped,0x800FE4A8,0x4
asm/non_matchings/code/z_kankyo/func_800FE4B8.s,func_800FE4B8,0x800FE4B8,0x36
asm/non_matchings/code/z_kankyo/func_800FE590.s,func_800FE590,0x800FE590,0x10
asm/non_matchings/code/z_kankyo/Environment_GetStormState.s,Environment_GetStormState,0x800FE4B8,0x36
asm/non_matchings/code/z_kankyo/Environment_IsFinalHours.s,Environment_IsFinalHours,0x800FE590,0x10
asm/non_matchings/code/z_kankyo/func_800FE5D0.s,func_800FE5D0,0x800FE5D0,0x10
asm/non_matchings/code/z_kankyo/func_800FE610.s,func_800FE610,0x800FE610,0x4
asm/non_matchings/code/z_kankyo/func_800FE620.s,func_800FE620,0x800FE620,0xE
asm/non_matchings/code/z_kankyo/func_800FE658.s,func_800FE658,0x800FE658,0x28
asm/non_matchings/code/z_kankyo/Environment_GetTimeSpeed.s,Environment_GetTimeSpeed,0x800FE620,0xE
asm/non_matchings/code/z_kankyo/Environment_SetTimeJump.s,Environment_SetTimeJump,0x800FE658,0x28
asm/non_matchings/code/z_kankyo/func_800FE6F8.s,func_800FE6F8,0x800FE6F8,0x20
asm/non_matchings/code/z_kankyo/func_800FE778.s,func_800FE778,0x800FE778,0x4
asm/non_matchings/code/z_kankyo/func_800FE788.s,func_800FE788,0x800FE788,0x4
asm/non_matchings/code/z_kankyo/func_800FE798.s,func_800FE798,0x800FE798,0x4
asm/non_matchings/code/z_kankyo/func_800FE7A8.s,func_800FE7A8,0x800FE7A8,0x83
asm/non_matchings/code/z_kankyo/Environment_GetSandstormColorIndex.s,Environment_GetSandstormColorIndex,0x800FE778,0x4
asm/non_matchings/code/z_kankyo/Environment_GetNextSandstormColorIndex.s,Environment_GetNextSandstormColorIndex,0x800FE788,0x4
asm/non_matchings/code/z_kankyo/Environment_GetSandstormLerpScale.s,Environment_GetSandstormLerpScale,0x800FE798,0x4
asm/non_matchings/code/z_kankyo/Environment_LerpSandstormColors.s,Environment_LerpSandstormColors,0x800FE7A8,0x83
asm/non_matchings/code/z_kankyo/func_800FE9B4.s,func_800FE9B4,0x800FE9B4,0x27
asm/non_matchings/code/z_kankyo/func_800FEA50.s,func_800FEA50,0x800FEA50,0x18
asm/non_matchings/code/z_kankyo/func_800FEAB0.s,func_800FEAB0,0x800FEAB0,0x4
asm/non_matchings/code/z_kankyo/func_800FEAC0.s,func_800FEAC0,0x800FEAC0,0xD
asm/non_matchings/code/z_kankyo/Environment_JumpForwardInTime.s,Environment_JumpForwardInTime,0x800FEAC0,0xD
asm/non_matchings/code/z_kankyo/func_800FEAF4.s,func_800FEAF4,0x800FEAF4,0x67
asm/non_matchings/code/z_lib/Lib_MemCpy.s,Lib_MemCpy,0x800FEC90,0xC
asm/non_matchings/code/z_lib/Lib_MemSet.s,Lib_MemSet,0x800FECC0,0x21
@ -1363,7 +1363,7 @@ asm/non_matchings/code/z_lib/Lib_PlaySfx.s,Lib_PlaySfx,0x801000A4,0xA
asm/non_matchings/code/z_lib/Lib_PlaySfx_2.s,Lib_PlaySfx_2,0x801000CC,0xA
asm/non_matchings/code/z_lib/Lib_PlaySfx_AtPos.s,Lib_PlaySfx_AtPos,0x801000F4,0xA
asm/non_matchings/code/z_lib/Lib_Vec3f_TranslateAndRotateY.s,Lib_Vec3f_TranslateAndRotateY,0x8010011C,0x27
asm/non_matchings/code/z_lib/Lib_LerpRGB.s,Lib_LerpRGB,0x801001B8,0xA4
asm/non_matchings/code/z_lib/Color_RGB8_Lerp.s,Color_RGB8_Lerp,0x801001B8,0xA4
asm/non_matchings/code/z_lib/Math_Vec3f_StepTo.s,Math_Vec3f_StepTo,0x80100448,0x2D
asm/non_matchings/code/z_lib/Lib_Nop801004FC.s,Lib_Nop801004FC,0x801004FC,0x2
asm/non_matchings/code/z_lib/Lib_SegmentedToVirtual.s,Lib_SegmentedToVirtual,0x80100504,0xE

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
1220 asm/non_matchings/code/z_kanfont/Font_LoadCharNES.s Font_LoadCharNES 0x800F4F54 0x1B
1221 asm/non_matchings/code/z_kanfont/Font_LoadMessageBoxEndIcon.s Font_LoadMessageBoxEndIcon 0x800F4FC0 0x11
1222 asm/non_matchings/code/z_kanfont/Font_LoadOrderedFont.s Font_LoadOrderedFont 0x800F5004 0x23
1223 asm/non_matchings/code/z_kankyo/func_800F5090.s asm/non_matchings/code/z_kankyo/Environment_GraphCallback.s func_800F5090 Environment_GraphCallback 0x800F5090 0x11
1224 asm/non_matchings/code/z_kankyo/Environment_ZBufValToFixedPoint.s Environment_ZBufValToFixedPoint 0x800F50D4 0xE
1225 asm/non_matchings/code/z_kankyo/Environment_Init.s Environment_Init 0x800F510C 0x212
1226 asm/non_matchings/code/z_kankyo/func_800F5954.s asm/non_matchings/code/z_kankyo/Environment_SmoothStepToU8.s func_800F5954 Environment_SmoothStepToU8 0x800F5954 0x4E
1227 asm/non_matchings/code/z_kankyo/Environment_LerpWeight.s Environment_LerpWeight 0x800F5A8C 0x21
1228 asm/non_matchings/code/z_kankyo/func_800F5B10.s asm/non_matchings/code/z_kankyo/Environment_LerpWeightAccelDecel.s func_800F5B10 Environment_LerpWeightAccelDecel 0x800F5B10 0x70
1229 asm/non_matchings/code/z_kankyo/Environment_UpdateSkybox.s Environment_UpdateSkybox 0x800F5CD0 0x2D9
1230 asm/non_matchings/code/z_kankyo/func_800F6834.s asm/non_matchings/code/z_kankyo/Environment_EnableUnderwaterLights.s func_800F6834 Environment_EnableUnderwaterLights 0x800F6834 0x46
1231 asm/non_matchings/code/z_kankyo/func_800F694C.s asm/non_matchings/code/z_kankyo/Environment_DisableUnderwaterLights.s func_800F694C Environment_DisableUnderwaterLights 0x800F694C 0x2E
1232 asm/non_matchings/code/z_kankyo/func_800F6A04.s func_800F6A04 0x800F6A04 0xF
1233 asm/non_matchings/code/z_kankyo/func_800F6A40.s asm/non_matchings/code/z_kankyo/Environment_UpdateSkyboxRotY.s func_800F6A40 Environment_UpdateSkyboxRotY 0x800F6A40 0x1E
1234 asm/non_matchings/code/z_kankyo/func_800F6AB8.s asm/non_matchings/code/z_kankyo/Environment_UpdateNextDayTime.s func_800F6AB8 Environment_UpdateNextDayTime 0x800F6AB8 0x23
1235 asm/non_matchings/code/z_kankyo/func_800F6B44.s asm/non_matchings/code/z_kankyo/Environment_UpdateTime.s func_800F6B44 Environment_UpdateTime 0x800F6B44 0x6A
1236 asm/non_matchings/code/z_kankyo/func_800F6CEC.s func_800F6CEC 0x800F6CEC 0x6E
1237 asm/non_matchings/code/z_kankyo/func_800F6EA4.s func_800F6EA4 0x800F6EA4 0x4A
1238 asm/non_matchings/code/z_kankyo/Kankyo_IsSceneUpsideDown.s asm/non_matchings/code/z_kankyo/Environment_IsSceneUpsideDown.s Kankyo_IsSceneUpsideDown Environment_IsSceneUpsideDown 0x800F6FCC 0xB
1239 asm/non_matchings/code/z_kankyo/func_800F6FF8.s asm/non_matchings/code/z_kankyo/Environment_UpdateLights.s func_800F6FF8 Environment_UpdateLights 0x800F6FF8 0x557
1240 asm/non_matchings/code/z_kankyo/func_800F8554.s asm/non_matchings/code/z_kankyo/Environment_UpdateSun.s func_800F8554 Environment_UpdateSun 0x800F8554 0xDC
1241 asm/non_matchings/code/z_kankyo/func_800F88C4.s func_800F88C4 0x800F88C4 0x2B
1242 asm/non_matchings/code/z_kankyo/func_800F8970.s func_800F8970 0x800F8970 0x4B
1243 asm/non_matchings/code/z_kankyo/func_800F8A9C.s asm/non_matchings/code/z_kankyo/Environment_UpdatePostmanEvents.s func_800F8A9C Environment_UpdatePostmanEvents 0x800F8A9C 0x8E
1244 asm/non_matchings/code/z_kankyo/Environment_Update.s Environment_Update 0x800F8CD4 0x2C
1245 asm/non_matchings/code/z_kankyo/func_800F8D84.s asm/non_matchings/code/z_kankyo/Environment_DrawSun.s func_800F8D84 Environment_DrawSun 0x800F8D84 0x269
1246 asm/non_matchings/code/z_kankyo/Environment_DrawSunLensFlare.s Environment_DrawSunLensFlare 0x800F9728 0x3F
1247 asm/non_matchings/code/z_kankyo/func_800F9824.s asm/non_matchings/code/z_kankyo/Environment_DrawLensFlare.s func_800F9824 Environment_DrawLensFlare 0x800F9824 0x2DE
1248 asm/non_matchings/code/z_kankyo/func_800FA39C.s asm/non_matchings/code/z_kankyo/Environment_RandCentered.s func_800FA39C Environment_RandCentered 0x800FA39C 0xA
1249 asm/non_matchings/code/z_kankyo/func_800FA3C4.s asm/non_matchings/code/z_kankyo/Environment_DrawRainImpl.s func_800FA3C4 Environment_DrawRainImpl 0x800FA3C4 0x18E
1250 asm/non_matchings/code/z_kankyo/Environment_DrawRain.s Environment_DrawRain 0x800FA9FC 0x2E
1251 asm/non_matchings/code/z_kankyo/func_800FAAB4.s asm/non_matchings/code/z_kankyo/Environment_ChangeLightSetting.s func_800FAAB4 Environment_ChangeLightSetting 0x800FAAB4 0x5B
1252 asm/non_matchings/code/z_kankyo/func_800FAC20.s asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxFilters.s func_800FAC20 Environment_DrawSkyboxFilters 0x800FAC20 0xD5
1253 asm/non_matchings/code/z_kankyo/func_800FAF74.s asm/non_matchings/code/z_kankyo/Environment_DrawLightningFlash.s func_800FAF74 Environment_DrawLightningFlash 0x800FAF74 0x27
1254 asm/non_matchings/code/z_kankyo/func_800FB010.s asm/non_matchings/code/z_kankyo/Environment_UpdateLightningStrike.s func_800FB010 Environment_UpdateLightningStrike 0x800FB010 0xC4
1255 asm/non_matchings/code/z_kankyo/Environment_AddLightningBolts.s Environment_AddLightningBolts 0x800FB320 0x1A
1256 asm/non_matchings/code/z_kankyo/func_800FB388.s asm/non_matchings/code/z_kankyo/Environment_DrawLightning.s func_800FB388 Environment_DrawLightning 0x800FB388 0xF4
1257 asm/non_matchings/code/z_kankyo/func_800FB758.s asm/non_matchings/code/z_kankyo/Environment_PlaySceneSequence.s func_800FB758 Environment_PlaySceneSequence 0x800FB758 0x97
1258 asm/non_matchings/code/z_kankyo/func_800FB9B4.s asm/non_matchings/code/z_kankyo/Environment_UpdateTimeBasedSequence.s func_800FB9B4 Environment_UpdateTimeBasedSequence 0x800FB9B4 0xC2
1259 asm/non_matchings/code/z_kankyo/Environment_DrawCustomLensFlare.s Environment_DrawCustomLensFlare 0x800FBCBC 0x4C
1260 asm/non_matchings/code/z_kankyo/Kankyo_InitGameOverLights.s asm/non_matchings/code/z_kankyo/Environment_InitGameOverLights.s Kankyo_InitGameOverLights Environment_InitGameOverLights 0x800FBDEC 0x54
1261 asm/non_matchings/code/z_kankyo/Kankyo_FadeInGameOverLights.s asm/non_matchings/code/z_kankyo/Environment_FadeInGameOverLights.s Kankyo_FadeInGameOverLights Environment_FadeInGameOverLights 0x800FBF3C 0x87
1262 asm/non_matchings/code/z_kankyo/Kankyo_FadeOutGameOverLights.s asm/non_matchings/code/z_kankyo/Environment_FadeOutGameOverLights.s Kankyo_FadeOutGameOverLights Environment_FadeOutGameOverLights 0x800FC158 0xA1
1263 asm/non_matchings/code/z_kankyo/func_800FC3DC.s asm/non_matchings/code/z_kankyo/Environment_UpdateRain.s func_800FC3DC Environment_UpdateRain 0x800FC3DC 0x1A
1264 asm/non_matchings/code/z_kankyo/Environment_FillScreen.s Environment_FillScreen 0x800FC444 0x82
1265 asm/non_matchings/code/z_kankyo/Environment_DrawSandstorm.s Environment_DrawSandstorm 0x800FC64C 0x31A
1266 asm/non_matchings/code/z_kankyo/func_800FD2B4.s asm/non_matchings/code/z_kankyo/Environment_AdjustLights.s func_800FD2B4 Environment_AdjustLights 0x800FD2B4 0xA1
1267 asm/non_matchings/code/z_kankyo/func_800FD538.s asm/non_matchings/code/z_kankyo/Environment_LerpRGB8.s func_800FD538 Environment_LerpRGB8 0x800FD538 0x19
1268 asm/non_matchings/code/z_kankyo/Environment_LerpAmbientColor.s Environment_LerpAmbientColor 0x800FD59C 0x11
1269 asm/non_matchings/code/z_kankyo/Environment_LerpDiffuseColor.s Environment_LerpDiffuseColor 0x800FD5E0 0x1D
1270 asm/non_matchings/code/z_kankyo/Environment_LerpFogColor.s Environment_LerpFogColor 0x800FD654 0x11
1271 asm/non_matchings/code/z_kankyo/Environment_LerpFog.s Environment_LerpFog 0x800FD698 0x22
1272 asm/non_matchings/code/z_kankyo/get_days_elapsed.s asm/non_matchings/code/z_kankyo/Environment_GetEventDayCount.s get_days_elapsed Environment_GetEventDayCount 0x800FD720 0x4
1273 asm/non_matchings/code/z_kankyo/reset_days_elapsed.s asm/non_matchings/code/z_kankyo/Environment_ClearEventDayCount.s reset_days_elapsed Environment_ClearEventDayCount 0x800FD730 0x4
1274 asm/non_matchings/code/z_kankyo/get_current_day.s asm/non_matchings/code/z_kankyo/Environment_GetTotalDays.s get_current_day Environment_GetTotalDays 0x800FD740 0x4
1275 asm/non_matchings/code/z_kankyo/func_800FD750.s asm/non_matchings/code/z_kankyo/Environment_ForcePlaySequence.s func_800FD750 Environment_ForcePlaySequence 0x800FD750 0x6
1276 asm/non_matchings/code/z_kankyo/func_800FD768.s asm/non_matchings/code/z_kankyo/Environment_IsForcedSequenceDisabled.s func_800FD768 Environment_IsForcedSequenceDisabled 0x800FD768 0x9
1277 asm/non_matchings/code/z_kankyo/func_800FD78C.s asm/non_matchings/code/z_kankyo/Environment_PlayStormNatureAmbience.s func_800FD78C Environment_PlayStormNatureAmbience 0x800FD78C 0x33
1278 asm/non_matchings/code/z_kankyo/func_800FD858.s asm/non_matchings/code/z_kankyo/Environment_StopStormNatureAmbience.s func_800FD858 Environment_StopStormNatureAmbience 0x800FD858 0x34
1279 asm/non_matchings/code/z_kankyo/func_800FD928.s asm/non_matchings/code/z_kankyo/Environment_WarpSongLeave.s func_800FD928 Environment_WarpSongLeave 0x800FD928 0x16
1280 asm/non_matchings/code/z_kankyo/func_800FD980.s asm/non_matchings/code/z_kankyo/Environment_SetupSkyboxStars.s func_800FD980 Environment_SetupSkyboxStars 0x800FD980 0x5E
1281 asm/non_matchings/code/z_kankyo/func_800FDAF8.s asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStar.s func_800FDAF8 Environment_DrawSkyboxStar 0x800FDAF8 0x67
1282 asm/non_matchings/code/z_kankyo/func_800FDC94.s asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStarsImpl.s func_800FDC94 Environment_DrawSkyboxStarsImpl 0x800FDC94 0x1BF
1283 asm/non_matchings/code/z_kankyo/func_800FE390.s asm/non_matchings/code/z_kankyo/Environment_Draw.s func_800FE390 Environment_Draw 0x800FE390 0x14
1284 asm/non_matchings/code/z_kankyo/func_800FE3E0.s asm/non_matchings/code/z_kankyo/Environment_DrawSkyboxStars.s func_800FE3E0 Environment_DrawSkyboxStars 0x800FE3E0 0x29
1285 asm/non_matchings/code/z_kankyo/Environment_StopTime.s Environment_StopTime 0x800FE484 0x5
1286 asm/non_matchings/code/z_kankyo/Environment_StartTime.s Environment_StartTime 0x800FE498 0x4
1287 asm/non_matchings/code/z_kankyo/Environment_IsTimeStopped.s Environment_IsTimeStopped 0x800FE4A8 0x4
1288 asm/non_matchings/code/z_kankyo/func_800FE4B8.s asm/non_matchings/code/z_kankyo/Environment_GetStormState.s func_800FE4B8 Environment_GetStormState 0x800FE4B8 0x36
1289 asm/non_matchings/code/z_kankyo/func_800FE590.s asm/non_matchings/code/z_kankyo/Environment_IsFinalHours.s func_800FE590 Environment_IsFinalHours 0x800FE590 0x10
1290 asm/non_matchings/code/z_kankyo/func_800FE5D0.s func_800FE5D0 0x800FE5D0 0x10
1291 asm/non_matchings/code/z_kankyo/func_800FE610.s func_800FE610 0x800FE610 0x4
1292 asm/non_matchings/code/z_kankyo/func_800FE620.s asm/non_matchings/code/z_kankyo/Environment_GetTimeSpeed.s func_800FE620 Environment_GetTimeSpeed 0x800FE620 0xE
1293 asm/non_matchings/code/z_kankyo/func_800FE658.s asm/non_matchings/code/z_kankyo/Environment_SetTimeJump.s func_800FE658 Environment_SetTimeJump 0x800FE658 0x28
1294 asm/non_matchings/code/z_kankyo/func_800FE6F8.s func_800FE6F8 0x800FE6F8 0x20
1295 asm/non_matchings/code/z_kankyo/func_800FE778.s asm/non_matchings/code/z_kankyo/Environment_GetSandstormColorIndex.s func_800FE778 Environment_GetSandstormColorIndex 0x800FE778 0x4
1296 asm/non_matchings/code/z_kankyo/func_800FE788.s asm/non_matchings/code/z_kankyo/Environment_GetNextSandstormColorIndex.s func_800FE788 Environment_GetNextSandstormColorIndex 0x800FE788 0x4
1297 asm/non_matchings/code/z_kankyo/func_800FE798.s asm/non_matchings/code/z_kankyo/Environment_GetSandstormLerpScale.s func_800FE798 Environment_GetSandstormLerpScale 0x800FE798 0x4
1298 asm/non_matchings/code/z_kankyo/func_800FE7A8.s asm/non_matchings/code/z_kankyo/Environment_LerpSandstormColors.s func_800FE7A8 Environment_LerpSandstormColors 0x800FE7A8 0x83
1299 asm/non_matchings/code/z_kankyo/func_800FE9B4.s func_800FE9B4 0x800FE9B4 0x27
1300 asm/non_matchings/code/z_kankyo/func_800FEA50.s func_800FEA50 0x800FEA50 0x18
1301 asm/non_matchings/code/z_kankyo/func_800FEAB0.s func_800FEAB0 0x800FEAB0 0x4
1302 asm/non_matchings/code/z_kankyo/func_800FEAC0.s asm/non_matchings/code/z_kankyo/Environment_JumpForwardInTime.s func_800FEAC0 Environment_JumpForwardInTime 0x800FEAC0 0xD
1303 asm/non_matchings/code/z_kankyo/func_800FEAF4.s func_800FEAF4 0x800FEAF4 0x67
1304 asm/non_matchings/code/z_lib/Lib_MemCpy.s Lib_MemCpy 0x800FEC90 0xC
1305 asm/non_matchings/code/z_lib/Lib_MemSet.s Lib_MemSet 0x800FECC0 0x21
1363 asm/non_matchings/code/z_lib/Lib_PlaySfx_2.s Lib_PlaySfx_2 0x801000CC 0xA
1364 asm/non_matchings/code/z_lib/Lib_PlaySfx_AtPos.s Lib_PlaySfx_AtPos 0x801000F4 0xA
1365 asm/non_matchings/code/z_lib/Lib_Vec3f_TranslateAndRotateY.s Lib_Vec3f_TranslateAndRotateY 0x8010011C 0x27
1366 asm/non_matchings/code/z_lib/Lib_LerpRGB.s asm/non_matchings/code/z_lib/Color_RGB8_Lerp.s Lib_LerpRGB Color_RGB8_Lerp 0x801001B8 0xA4
1367 asm/non_matchings/code/z_lib/Math_Vec3f_StepTo.s Math_Vec3f_StepTo 0x80100448 0x2D
1368 asm/non_matchings/code/z_lib/Lib_Nop801004FC.s Lib_Nop801004FC 0x801004FC 0x2
1369 asm/non_matchings/code/z_lib/Lib_SegmentedToVirtual.s Lib_SegmentedToVirtual 0x80100504 0xE