mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 05:00:41 +00:00
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
This commit is contained in:
parent
008c93636c
commit
786df72c6d
3 changed files with 13 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue