1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-30 10:51:21 +00:00

Add ENV_LIGHT_SETTINGS_BLEND_RATE_AND_FOG_NEAR_PACK, fix extracted negative blendRate

This commit is contained in:
Dragorn421 2025-07-12 09:33:50 +02:00
parent 80c4f33da5
commit b57da0041d
No known key found for this signature in database
GPG key ID: 05949E029F4EF294
2 changed files with 6 additions and 2 deletions

View file

@ -155,8 +155,10 @@ typedef struct CurrentEnvLightSettings {
// The blendRate determines how fast the current light settings fade to the next one
// (under LIGHT_MODE_SETTINGS, otherwise unused).
#define ENV_LIGHT_SETTINGS_BLEND_RATE_AND_FOG_NEAR_PACK(blendRate, fogNear) (s16)((((blendRate) / 4) << 10) | (fogNear))
// 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_BLEND_RATE_U8(blendRateAndFogNear) (u8)(((blendRateAndFogNear) >> 10) * 4)
#define ENV_LIGHT_SETTINGS_FOG_NEAR(blendRateAndFogNear) ((blendRateAndFogNear) & 0x3FF)
typedef struct EnvLightSettings {