Add gLevelValues.jrbDarkenSkybox
This commit is contained in:
parent
a6648cf517
commit
e42f114b2d
|
@ -904,6 +904,7 @@
|
||||||
--- @field public hudRedCoinsRadar integer
|
--- @field public hudRedCoinsRadar integer
|
||||||
--- @field public hudSecretsRadar integer
|
--- @field public hudSecretsRadar integer
|
||||||
--- @field public infiniteStairsRequirement integer
|
--- @field public infiniteStairsRequirement integer
|
||||||
|
--- @field public jrbDarkenSkybox integer
|
||||||
--- @field public maxCoins integer
|
--- @field public maxCoins integer
|
||||||
--- @field public maxLives integer
|
--- @field public maxLives integer
|
||||||
--- @field public metalCapDuration integer
|
--- @field public metalCapDuration integer
|
||||||
|
|
|
@ -1245,6 +1245,7 @@
|
||||||
| hudRedCoinsRadar | `integer` | |
|
| hudRedCoinsRadar | `integer` | |
|
||||||
| hudSecretsRadar | `integer` | |
|
| hudSecretsRadar | `integer` | |
|
||||||
| infiniteStairsRequirement | `integer` | |
|
| infiniteStairsRequirement | `integer` | |
|
||||||
|
| jrbDarkenSkybox | `integer` | |
|
||||||
| maxCoins | `integer` | |
|
| maxCoins | `integer` | |
|
||||||
| maxLives | `integer` | |
|
| maxLives | `integer` | |
|
||||||
| metalCapDuration | `integer` | |
|
| metalCapDuration | `integer` | |
|
||||||
|
|
|
@ -124,7 +124,8 @@ struct LevelValues gDefaultLevelValues = {
|
||||||
.numCoinsToLife = 50,
|
.numCoinsToLife = 50,
|
||||||
.wdwWaterLevelSpeed = 10.0f,
|
.wdwWaterLevelSpeed = 10.0f,
|
||||||
.useGlobalStarIds = FALSE,
|
.useGlobalStarIds = FALSE,
|
||||||
.zoomOutCameraOnPause = TRUE
|
.zoomOutCameraOnPause = TRUE,
|
||||||
|
.jrbDarkenSkybox = TRUE
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LevelValues gLevelValues = { 0 };
|
struct LevelValues gLevelValues = { 0 };
|
||||||
|
|
|
@ -90,6 +90,7 @@ struct LevelValues {
|
||||||
f32 wdwWaterLevelSpeed;
|
f32 wdwWaterLevelSpeed;
|
||||||
u8 useGlobalStarIds;
|
u8 useGlobalStarIds;
|
||||||
u8 zoomOutCameraOnPause;
|
u8 zoomOutCameraOnPause;
|
||||||
|
u8 jrbDarkenSkybox;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct LevelValues gLevelValues;
|
extern struct LevelValues gLevelValues;
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
#include "segment2.h"
|
#include "segment2.h"
|
||||||
#include "sm64.h"
|
#include "sm64.h"
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
#include "geo_commands.h"
|
||||||
|
#include "hardcoded.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file skybox.c
|
* @file skybox.c
|
||||||
|
@ -343,7 +344,7 @@ Gfx *create_skybox_facing_camera(s8 player, s8 background, f32 fov,
|
||||||
s8 colorIndex = 1;
|
s8 colorIndex = 1;
|
||||||
|
|
||||||
// If the first star is collected in JRB, make the sky darker and slightly green
|
// If the first star is collected in JRB, make the sky darker and slightly green
|
||||||
if (background == 8 && !(save_file_get_star_flags(gCurrSaveFileNum - 1, COURSE_JRB - 1) & 1)) {
|
if (background == BACKGROUND_ABOVE_CLOUDS && gLevelValues.jrbDarkenSkybox && !(save_file_get_star_flags(gCurrSaveFileNum - 1, COURSE_JRB - 1) & 1)) {
|
||||||
colorIndex = 0;
|
colorIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -996,7 +996,7 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] =
|
||||||
{ "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
|
{ "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LUA_LEVEL_VALUES_FIELD_COUNT 50
|
#define LUA_LEVEL_VALUES_FIELD_COUNT 51
|
||||||
static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = {
|
static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = {
|
||||||
{ "bubbleOnDeathBarrierInCapStages", LVT_U8, offsetof(struct LevelValues, bubbleOnDeathBarrierInCapStages), false, LOT_NONE },
|
{ "bubbleOnDeathBarrierInCapStages", LVT_U8, offsetof(struct LevelValues, bubbleOnDeathBarrierInCapStages), false, LOT_NONE },
|
||||||
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
|
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
|
||||||
|
@ -1021,6 +1021,7 @@ static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] =
|
||||||
{ "hudRedCoinsRadar", LVT_U8, offsetof(struct LevelValues, hudRedCoinsRadar), false, LOT_NONE },
|
{ "hudRedCoinsRadar", LVT_U8, offsetof(struct LevelValues, hudRedCoinsRadar), false, LOT_NONE },
|
||||||
{ "hudSecretsRadar", LVT_U8, offsetof(struct LevelValues, hudSecretsRadar), false, LOT_NONE },
|
{ "hudSecretsRadar", LVT_U8, offsetof(struct LevelValues, hudSecretsRadar), false, LOT_NONE },
|
||||||
{ "infiniteStairsRequirement", LVT_S16, offsetof(struct LevelValues, infiniteStairsRequirement), false, LOT_NONE },
|
{ "infiniteStairsRequirement", LVT_S16, offsetof(struct LevelValues, infiniteStairsRequirement), false, LOT_NONE },
|
||||||
|
{ "jrbDarkenSkybox", LVT_U8, offsetof(struct LevelValues, jrbDarkenSkybox), false, LOT_NONE },
|
||||||
{ "maxCoins", LVT_U16, offsetof(struct LevelValues, maxCoins), false, LOT_NONE },
|
{ "maxCoins", LVT_U16, offsetof(struct LevelValues, maxCoins), false, LOT_NONE },
|
||||||
{ "maxLives", LVT_U16, offsetof(struct LevelValues, maxLives), false, LOT_NONE },
|
{ "maxLives", LVT_U16, offsetof(struct LevelValues, maxLives), false, LOT_NONE },
|
||||||
{ "metalCapDuration", LVT_U16, offsetof(struct LevelValues, metalCapDuration), false, LOT_NONE },
|
{ "metalCapDuration", LVT_U16, offsetof(struct LevelValues, metalCapDuration), false, LOT_NONE },
|
||||||
|
|
Loading…
Reference in New Issue