From 40e9c6687c19e07aeba244c7f6dd701a91db198b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 25 Jun 2018 22:59:29 +0200 Subject: [PATCH] new commandline options: -fsh and -noshadow --- commandline.cpp | 3 +++ graph.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/commandline.cpp b/commandline.cpp index 9fb02a81..1edf814b 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -121,6 +121,9 @@ int arg::readCommon() { else if(argis("-wm")) { PHASEFROM(2); shift(); vid.wallmode = argi(); } else if(argis("-mm")) { PHASEFROM(2); shift(); vid.monmode = argi(); } + else if(argis("-wsh")) { shift(); patterns::whichShape = args()[0]; } + else if(argis("-noshadow")) { noshadow = true; } + // non-configurable options else if(argis("-vsync_off")) { vsync_off = true; diff --git a/graph.cpp b/graph.cpp index 19fb33b6..c69b86b1 100644 --- a/graph.cpp +++ b/graph.cpp @@ -448,10 +448,12 @@ void animallegs(const transmatrix& V, eMonster mo, int col, double footphase) { #endif } +bool noshadow; + void ShadowV(const transmatrix& V, const hpcshape& bp, int prio) { #if CAP_POLY if(mmspatial) { - if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere) + if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere || noshadow) return; // shadows break the depth testing dynamicval p(poly_outline, OUTLINE_TRANS); queuepolyat(V, bp, SHADOW_MON, prio); @@ -3082,7 +3084,7 @@ bool use_swapped_duals() { } void floorShadow(cell *c, const transmatrix& V, int col) { - if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere) + if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere || noshadow) return; // shadows break the depth testing dynamicval p(poly_outline, OUTLINE_TRANS); if(qfi.shape) {