new commandline options: -fsh and -noshadow

This commit is contained in:
Zeno Rogue 2018-06-25 22:59:29 +02:00
parent 440940a945
commit 40e9c6687c
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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<int> 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<int> p(poly_outline, OUTLINE_TRANS);
if(qfi.shape) {