From 1d98974693a00637b1cba1c9643d5199adb16430 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 24 Oct 2008 09:36:54 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1115 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 20 +++++++++++++++++++- polymer/eduke32/source/game.c | 8 +++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index cd60fe364..908c8d53f 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -4173,8 +4173,26 @@ void polymost_drawrooms() short hitsect, hitwall, hitsprite; int vx, vy, vz, hitx, hity, hitz; int cz, fz; + double ratio = 1.0; - ox2 = (searchx-ghalfx)/1.2; oy2 = (searchy-ghoriz)/ 1.2; oz2 = ghalfx; + if (glwidescreen == 1) + ratio = 1.2f; + else if (glprojectionhacks == 1) + { + if (gshang > 0) + ratio += gshang*0.33f; + if (gshang < 0) + ratio += -gshang*0.33f; + } + else if (glprojectionhacks == 2) + { + if (gshang > 0.7f) + ratio += 4.f*(gshang-0.7f); + if (gshang < -0.7f) + ratio += 4.f*(-gshang-0.7f); + } + + ox2 = (searchx-ghalfx)/ratio; oy2 = (searchy-ghoriz)/ ratio; oz2 = ghalfx; //Tilt rotation ox = ox2*gctang + oy2*gstang; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index dc9045851..6dfd6f0dd 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -4377,7 +4377,7 @@ void displayrooms(int snum,int smoothratio) short tang; int tiltcx,tiltcy,tiltcs=0; // JBF 20030807 - if (pub > 0 || getrendermode() >= 3) // JBF 20040101: redraw background always + if (pub > 0) // JBF 20040101: redraw background always { if (getrendermode() >= 3 || ud.screen_size > 8 || (ud.screen_size == 8 && ud.statusbarscale<100)) drawbackground(); @@ -4419,6 +4419,9 @@ void displayrooms(int snum,int smoothratio) drawrooms(s->x,s->y,s->z-(4<<8),ud.cameraang,s->yvel,s->sectnum); animatesprites(s->x,s->y,ud.cameraang,smoothratio); drawmasks(); + + if (getrendermode() >= 3) + drawbackground(); } else { @@ -4601,6 +4604,9 @@ void displayrooms(int snum,int smoothratio) animatesprites(ud.camerax,ud.cameray,ud.cameraang,smoothratio); drawmasks(); + if (getrendermode() >= 3) + drawbackground(); + if (screencapt == 1) { setviewback();