extra options to change canvas_sky_style and grid_layers

This commit is contained in:
Zeno Rogue committed 2026-11-15 22:10:32 +01:00
1 parent d93ea565a3
commit d29fa04dcc
3 files changed
+10 -4

No files matched your search

+2
View File
@@ -1227,6 +1227,7 @@ EX void initConfig() {
-> editable("display grid", 'g');
param_b(models::desitter_projections, "desitter_projections", false);
param_b(nonisotropic_weird_transforms, "nonisotropic_weird_transforms", false);
param_i(grid_layers, "grid_layers");
param_b(arb::apeirogon_consistent_coloring, "apeirogon_consistent_coloring", true)
-> editable("apeirogon: consistent coloring", 'c')
@@ -3576,6 +3577,7 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
#if MAXMDIM >= 4
param_enum(draw_sky, "draw_sky", skyAutomatic)
-> editable({{"NO", "do not draw sky"}, {"automatic", ""}, {"skybox", "works only in Euclidean"}, {"always", "might be glitched in some settings"}}, "sky rendering", 's');
param_i(canvas_sky_style, "canvas_sky_style");
param_b(use_euclidean_infinity, "use_euclidean_infinity", true)
-> editable("infinite sky", 'i');
#endif
+4 -2
View File
@@ -442,6 +442,8 @@ EX void queue_transparent_wall(const shiftmatrix& V, hpcshape& sh, color_t color
}
}
EX int canvas_sky_style = 3;
#if MAXMDIM >= 4
EX int ceiling_category(cell *c) {
switch(c->land) {
@@ -545,8 +547,8 @@ EX int ceiling_category(cell *c) {
return 3;
case laCanvas:
if(canvas_default_wall == waInvisibleFloor) return 0;
return 3;
if(canvas_default_wall == waInvisibleFloor && canvas_sky_style == 3) return 0;
return canvas_sky_style;
case laPalace:
case laPrincessQuest:
+4 -2
View File
@@ -789,6 +789,8 @@ EX bool fat_edges = false;
EX bool gridbelow;
EX int grid_layers = 3;
EX void gridline(const shiftmatrix& V1, const hyperpoint h1, const shiftmatrix& V2, const hyperpoint h2, color_t col, int prec) {
transmatrix U2 = unshift(V2, V1.shift);
@@ -845,8 +847,8 @@ EX void gridline(const shiftmatrix& V1, const hyperpoint h1, const shiftmatrix&
#if MAXMDIM >= 4
if(WDIM == 2 && GDIM == 3) {
ld eps = cgi.human_height/100;
queueline(V1*orthogonal_move(h1,cgi.FLOOR+eps), V2*orthogonal_move(h2,cgi.FLOOR+eps), col, prec);
queueline(V1*orthogonal_move(h1,cgi.WALL-eps), V2*orthogonal_move(h2,cgi.WALL-eps), col, prec);
if(grid_layers & 1) queueline(V1*orthogonal_move(h1,cgi.FLOOR+eps), V2*orthogonal_move(h2,cgi.FLOOR+eps), col, prec);
if(grid_layers & 2) queueline(V1*orthogonal_move(h1,cgi.WALL-eps), V2*orthogonal_move(h2,cgi.WALL-eps), col, prec);
}
else
#endif