Am Dienstag, den 20.01.2015, 07:13 +0100 schrieb Alexandre Detiste: > It's easy to spot when both native rott & dosbox rott.exe are > run windowed side by side.
Can you confirm that ROTT renders fog as intended with the attached patch, even at high resolutions? While creating the patch I have realized that the sky and the weapon sprite are completely out of scale at high resolutions. Should I fix that or have people got used to it? - Fabian
diff --git a/rott/rt_draw.c b/rott/rt_draw.c index 74b12f4..22f8ef9 100644 --- a/rott/rt_draw.c +++ b/rott/rt_draw.c @@ -1637,6 +1637,7 @@ void SetSpriteLightLevel (int x, int y, visobj_t * sprite, int dir, int fullbrig if (fog) { i=(sprite->viewheight>>normalshade)+minshade; + i = (i * 200) / iGLOBAL_SCREENHEIGHT; if (i>maxshade) i=maxshade; sprite->colormap=colormap+(i<<8); } @@ -1698,6 +1699,7 @@ void SetColorLightLevel (int x, int y, visobj_t * sprite, int dir, int color, in if (fog) { i=(height>>normalshade)+minshade; + i = (i * 200) / iGLOBAL_SCREENHEIGHT; if (i>maxshade) i=maxshade; sprite->colormap=map+(i<<8); } @@ -1793,6 +1795,7 @@ void SetWallLightLevel (wallcast_t * post) if (fog) { i =(post->wallheight>>normalshade)+minshade-lv+la; + i = (i * 200) / iGLOBAL_SCREENHEIGHT; if (i>maxshade+la) i=maxshade+la; shadingtable=colormap+(i<<8); } diff --git a/rott/rt_floor.c b/rott/rt_floor.c index 026e160..83ba48e 100644 --- a/rott/rt_floor.c +++ b/rott/rt_floor.c @@ -528,6 +528,7 @@ void SetFCLightLevel (int height) if (fog) { i=(height>>normalshade)+minshade; + i = (i * 200) / iGLOBAL_SCREENHEIGHT; if (i>maxshade) i=maxshade; shadingtable=colormap+(i<<8); } diff --git a/rott/rt_scale.c b/rott/rt_scale.c index ff4d839..267d043 100644 --- a/rott/rt_scale.c +++ b/rott/rt_scale.c @@ -150,6 +150,7 @@ void SetLightLevel (int height) if (fog) { i=(height>>normalshade)+minshade; + i = (i * 200) / iGLOBAL_SCREENHEIGHT; if (i>maxshade) i=maxshade; shadingtable=colormap+(i<<8); }