mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Add gLevelValues.jrbDarkenSkybox
This commit is contained in:
parent
a6648cf517
commit
e42f114b2d
6 changed files with 10 additions and 4 deletions
|
@ -904,6 +904,7 @@
|
|||
--- @field public hudRedCoinsRadar integer
|
||||
--- @field public hudSecretsRadar integer
|
||||
--- @field public infiniteStairsRequirement integer
|
||||
--- @field public jrbDarkenSkybox integer
|
||||
--- @field public maxCoins integer
|
||||
--- @field public maxLives integer
|
||||
--- @field public metalCapDuration integer
|
||||
|
|
|
@ -1245,6 +1245,7 @@
|
|||
| hudRedCoinsRadar | `integer` | |
|
||||
| hudSecretsRadar | `integer` | |
|
||||
| infiniteStairsRequirement | `integer` | |
|
||||
| jrbDarkenSkybox | `integer` | |
|
||||
| maxCoins | `integer` | |
|
||||
| maxLives | `integer` | |
|
||||
| metalCapDuration | `integer` | |
|
||||
|
|
|
@ -124,7 +124,8 @@ struct LevelValues gDefaultLevelValues = {
|
|||
.numCoinsToLife = 50,
|
||||
.wdwWaterLevelSpeed = 10.0f,
|
||||
.useGlobalStarIds = FALSE,
|
||||
.zoomOutCameraOnPause = TRUE
|
||||
.zoomOutCameraOnPause = TRUE,
|
||||
.jrbDarkenSkybox = TRUE
|
||||
};
|
||||
|
||||
struct LevelValues gLevelValues = { 0 };
|
||||
|
|
|
@ -90,6 +90,7 @@ struct LevelValues {
|
|||
f32 wdwWaterLevelSpeed;
|
||||
u8 useGlobalStarIds;
|
||||
u8 zoomOutCameraOnPause;
|
||||
u8 jrbDarkenSkybox;
|
||||
};
|
||||
|
||||
extern struct LevelValues gLevelValues;
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
#include "segment2.h"
|
||||
#include "sm64.h"
|
||||
#include "hud.h"
|
||||
|
||||
#include "geo_commands.h"
|
||||
#include "hardcoded.h"
|
||||
|
||||
/**
|
||||
* @file skybox.c
|
||||
|
@ -343,7 +344,7 @@ Gfx *create_skybox_facing_camera(s8 player, s8 background, f32 fov,
|
|||
s8 colorIndex = 1;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -996,7 +996,7 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] =
|
|||
{ "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] = {
|
||||
{ "bubbleOnDeathBarrierInCapStages", LVT_U8, offsetof(struct LevelValues, bubbleOnDeathBarrierInCapStages), 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 },
|
||||
{ "hudSecretsRadar", LVT_U8, offsetof(struct LevelValues, hudSecretsRadar), 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 },
|
||||
{ "maxLives", LVT_U16, offsetof(struct LevelValues, maxLives), false, LOT_NONE },
|
||||
{ "metalCapDuration", LVT_U16, offsetof(struct LevelValues, metalCapDuration), false, LOT_NONE },
|
||||
|
|
Loading…
Reference in a new issue