Mouses fixes for the editor

git-svn-id: https://svn.eduke32.com/eduke32@164 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-05-13 00:53:49 +00:00
parent 66a36e564b
commit c6bd11d7bd
2 changed files with 9 additions and 3 deletions

View file

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

View file

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