mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Mouses fixes for the editor
git-svn-id: https://svn.eduke32.com/eduke32@164 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
66a36e564b
commit
c6bd11d7bd
2 changed files with 9 additions and 3 deletions
|
@ -531,12 +531,15 @@ void editinput(void)
|
||||||
{
|
{
|
||||||
ang += mousx>>1;
|
ang += mousx>>1;
|
||||||
horiz -= (mousy>>2);
|
horiz -= (mousy>>2);
|
||||||
|
|
||||||
|
if (mousy && !(mousy>>2))
|
||||||
|
horiz--;
|
||||||
|
if (mousx && !(mousx>>1))
|
||||||
|
ang++;
|
||||||
if (horiz > 299)
|
if (horiz > 299)
|
||||||
horiz = 299;
|
horiz = 299;
|
||||||
if (horiz < -99)
|
if (horiz < -99)
|
||||||
horiz = -99;
|
horiz = -99;
|
||||||
if (mousy && !(mousy>>2))
|
|
||||||
horiz--;
|
|
||||||
searchx = xdim>>1;
|
searchx = xdim>>1;
|
||||||
searchy = ydim>>1;
|
searchy = ydim>>1;
|
||||||
osearchx = searchx-mousx;
|
osearchx = searchx-mousx;
|
||||||
|
|
|
@ -3352,8 +3352,11 @@ void polymost_drawrooms ()
|
||||||
{
|
{
|
||||||
short hitsect, hitwall, hitsprite;
|
short hitsect, hitwall, hitsprite;
|
||||||
long vx, vy, vz, hitx, hity, hitz;
|
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
|
//Tilt rotation
|
||||||
ox = ox2*gctang + oy2*gstang;
|
ox = ox2*gctang + oy2*gstang;
|
||||||
|
|
Loading…
Reference in a new issue