mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
an option to disable sky drawing
This commit is contained in:
parent
7b0b41967f
commit
ba7b9d6097
@ -2287,7 +2287,8 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
||||
addsaver(vid.use_wall_radar, "wallradar", true);
|
||||
addsaver(vid.fixed_facing, "fixed facing", 0);
|
||||
addsaver(vid.fixed_facing_dir, "fixed facing dir", 90);
|
||||
addsaver(vid.fixed_yz, "fixed YZ", true);
|
||||
param_b(vid.fixed_yz, "fixed YZ", true);
|
||||
param_b(draw_sky, "draw sky", true);
|
||||
param_f(vid.depth, "depth", "3D depth", 1)
|
||||
->editable(0, 5, .1, "Ground level below the plane", "", 'd')
|
||||
->set_extra([] {
|
||||
|
5
sky.cpp
5
sky.cpp
@ -52,8 +52,11 @@ vector<glhr::colored_vertex> skyvertices;
|
||||
cell *sky_centerover;
|
||||
shiftmatrix sky_cview;
|
||||
|
||||
EX bool draw_sky = true;
|
||||
|
||||
void compute_skyvertices(const vector<sky_item>& sky) {
|
||||
skyvertices.clear();
|
||||
if(!draw_sky) return;
|
||||
|
||||
int sk = get_skybrightness();
|
||||
|
||||
@ -245,7 +248,7 @@ void compute_skyvertices(const vector<sky_item>& sky) {
|
||||
}
|
||||
|
||||
void dqi_sky::draw() {
|
||||
if(!vid.usingGL || sky.empty()) return;
|
||||
if(!vid.usingGL || sky.empty() || skyvertices.empty()) return;
|
||||
|
||||
#if CAP_VR
|
||||
transmatrix s = (vrhr::rendering() ? vrhr::master_cview : cview()).T * inverse(sky_cview.T);
|
||||
|
Loading…
Reference in New Issue
Block a user