From 786df72c6db61946b178b599c034d75cbd1ca318 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 16 Aug 2012 21:48:56 +0000 Subject: [PATCH] In setaspect_new, determine the aspect with {x,y}dim again except for showview. setaspect(), which is called by setaspect_new, already uses the *dimen variables, so it's the same thing done twice. Now, a change from the original full status bar to the original mini status bar keeps the horizontal FOV again and only bumps the view a little higher, as with the classic aspect determination. git-svn-id: https://svn.eduke32.com/eduke32@2913 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/baselayer.h | 1 + polymer/eduke32/build/src/engine.c | 11 ++++++++--- polymer/eduke32/source/gameexec.c | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index 9d2ed091d..367c8d1fe 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -30,6 +30,7 @@ extern int32_t startwin_idle(void *); // video extern int32_t r_usenewaspect, newaspect_enable; +extern int32_t setaspect_new_use_dimen; extern uint32_t r_screenxy; extern int32_t xres, yres, bpp, fullscreen, bytesperline; extern intptr_t frameplace; diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index b069ce5b4..85191698c 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13516,6 +13516,8 @@ restart_grand: #endif } +int32_t setaspect_new_use_dimen = 0; + void setaspect_new() { if (r_usenewaspect && newaspect_enable && getrendermode()!=4) @@ -13525,6 +13527,9 @@ void setaspect_new() int32_t vr, yx=(65536*4*100)/(3*107); int32_t y, x; + const int32_t xd = setaspect_new_use_dimen ? xdimen : xdim; + const int32_t yd = setaspect_new_use_dimen ? ydimen : ydim; + if (fullscreen) { int32_t pixratio; @@ -13532,13 +13537,13 @@ void setaspect_new() x=r_screenxy/100; y=r_screenxy%100; if (y==0 || x==0) { x=4; y=3; } - pixratio = divscale16(xdimen*y, ydimen*x); + pixratio = divscale16(xd*y, yd*x); yx = divscale16(yx, pixratio); } else { - x = xdimen; - y = ydimen; + x = xd; + y = yd; } vr = divscale16(x*3, y*4); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ec558904e..af3008943 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2448,7 +2448,11 @@ nullquote: { int32_t o = newaspect_enable; newaspect_enable = r_usenewaspect; + setaspect_new_use_dimen = 1; + setview(x1,y1,x2,y2); + + setaspect_new_use_dimen = 0; newaspect_enable = o; }