From e069a2cd46dc4f77d22090750c0c6b794107b258 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 30 May 2023 18:37:37 +0200 Subject: [PATCH] default_flooralpha and plainfloors --- celldrawer.cpp | 13 +++++++++---- config.cpp | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 7d37a8c7..f2a5904d 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -2042,6 +2042,8 @@ void celldrawer::bookkeeping() { } } +EX bool draw_plain_floors; + /** Display text statistics about the cell (distances in viewdists mode, pattern codes, etc.). may also change the colors provided in @@ -2133,13 +2135,15 @@ void celldrawer::draw_cellstat() { } } +EX int default_flooralpha = 255; + void celldrawer::draw_wall_full() { shiftmatrix Vf0; const shiftmatrix& Vf = (chasmg && wmspatial) ? (Vf0=orthogonal_move_fol(V, cgi.BOTTOM)) : V; #if CAP_SHAPES - int flooralpha = 255; + int flooralpha = default_flooralpha; #endif #if CAP_EDIT && CAP_TEXTURE @@ -2295,10 +2299,11 @@ void celldrawer::draw_wall_full() { } else { if(patterns::whichShape == '^') poly_outline = darkena(fcol, fd, flooralpha); - if(WDIM == 2 && GDIM == 3 && qfi.fshape) + if(WDIM == 2 && GDIM == 3 && qfi.fshape && !draw_plain_floors) draw_shapevec(c, V, qfi.fshape->levels[0], darkena(fcol, fd, 255), PPR::FLOOR); - else - draw_qfi(c, V, darkena(fcol, fd, flooralpha)); + else { + draw_qfi(c, V, darkena3(fcol, fd, flooralpha)); + } } #if MAXMDIM >= 4 diff --git a/config.cpp b/config.cpp index c9a32c8a..68846da5 100644 --- a/config.cpp +++ b/config.cpp @@ -2765,6 +2765,11 @@ EX int config3 = addHook(hooks_configfile, 100, [] { param_f(twopoint_xwidth, "twopoint_xwidth"); param_f(periodwidth, "periodwidth", 1); + param_b(draw_plain_floors, "draw_plain_floors", false) + ->editable("draw plain floors in 3D", 'p'); + param_i(default_flooralpha, "floor_alpha") + ->editable(0, 255, 15, "floor alpha", "255 = opaque", 'a'); + param_f(vid.depth_bonus, "depth_bonus", 0) ->editable(-5, 5, .1, "depth bonus in pseudohedral", "", 'b'); param_enum(vid.pseudohedral, "pseudohedral", "pseudohedral", phOFF)