From c6bd11d7bda85dbb623a51a231ce5cc27614adbf Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 13 May 2006 00:53:49 +0000 Subject: [PATCH] Mouses fixes for the editor git-svn-id: https://svn.eduke32.com/eduke32@164 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/build.c | 7 +++++-- polymer/build/src/polymost.c | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 058c0fb2d..56406e882 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -531,12 +531,15 @@ void editinput(void) { ang += mousx>>1; horiz -= (mousy>>2); + + if (mousy && !(mousy>>2)) + horiz--; + if (mousx && !(mousx>>1)) + ang++; if (horiz > 299) horiz = 299; if (horiz < -99) horiz = -99; - if (mousy && !(mousy>>2)) - horiz--; searchx = xdim>>1; searchy = ydim>>1; osearchx = searchx-mousx; diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index acf60d4e9..5fb18bf76 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -3352,8 +3352,11 @@ void polymost_drawrooms () { short hitsect, hitwall, hitsprite; long vx, vy, vz, hitx, hity, hitz; + float ratioratio = 1.0; - ox2 = searchx-ghalfx; oy2 = searchy-ghoriz; oz2 = ghalfx; + ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio + + ox2 = (searchx-ghalfx)/ratioratio; oy2 = (searchy-ghoriz)/((ratioratio > 1)?1.2:1); oz2 = ghalfx; //Tilt rotation ox = ox2*gctang + oy2*gstang;