mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Add bounds checks to skybox get/set functions
This commit is contained in:
parent
bc4e893f2d
commit
69cb215219
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "pc/gfx/gfx_pc.h"
|
||||
#include "game/rendering_graph_node.h"
|
||||
#include "game/skybox.h"
|
||||
#include "geo_commands.h"
|
||||
|
||||
void set_override_fov(f32 fov) {
|
||||
gOverrideFOV = fov;
|
||||
|
@ -76,10 +77,12 @@ void set_fog_intensity(f32 intensity) {
|
|||
///
|
||||
|
||||
s8 get_skybox(void) {
|
||||
if (gOverrideBackground != -1) { return gOverrideBackground; }
|
||||
return gReadOnlyBackground;
|
||||
}
|
||||
|
||||
void set_override_skybox(s8 background) {
|
||||
if (background < -1 || background > BACKGROUND_CUSTOM) { return; }
|
||||
gOverrideBackground = background;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue