mirror of https://github.com/ZDoom/qzdoom.git
- fixed: The automap tried to access a variable before it was initialized.
The fix is not ideal but the way this code is used it cannot be done any better.
This commit is contained in:
parent
3a1228bf95
commit
91ac6e30fe
|
@ -790,7 +790,6 @@ static double mapystart=0; // y-value for the start of the map bitmap...used in
|
||||||
static double mapxstart=0; //x-value for the bitmap.
|
static double mapxstart=0; //x-value for the bitmap.
|
||||||
|
|
||||||
static bool stopped = true;
|
static bool stopped = true;
|
||||||
static int viewbottom;
|
|
||||||
|
|
||||||
static void AM_calcMinMaxMtoF();
|
static void AM_calcMinMaxMtoF();
|
||||||
|
|
||||||
|
@ -1063,7 +1062,7 @@ static void AM_findMinMaxBoundaries ()
|
||||||
static void AM_calcMinMaxMtoF()
|
static void AM_calcMinMaxMtoF()
|
||||||
{
|
{
|
||||||
double a = SCREENWIDTH / max_w;
|
double a = SCREENWIDTH / max_w;
|
||||||
double b = viewbottom / max_h;
|
double b = StatusBar->GetTopOfStatusbar() / max_h;
|
||||||
|
|
||||||
min_scale_mtof = a < b ? a : b;
|
min_scale_mtof = a < b ? a : b;
|
||||||
max_scale_mtof = SCREENHEIGHT / (2*PLAYERRADIUS);
|
max_scale_mtof = SCREENHEIGHT / (2*PLAYERRADIUS);
|
||||||
|
@ -1421,7 +1420,7 @@ void AM_NewResolution()
|
||||||
else if (scale_mtof > max_scale_mtof)
|
else if (scale_mtof > max_scale_mtof)
|
||||||
AM_maxOutWindowScale();
|
AM_maxOutWindowScale();
|
||||||
f_w = screen->GetWidth();
|
f_w = screen->GetWidth();
|
||||||
f_h = viewbottom;
|
f_h = StatusBar->GetTopOfStatusbar();
|
||||||
AM_activateNewScale();
|
AM_activateNewScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3169,7 +3168,6 @@ void AM_Drawer (int bottom)
|
||||||
bool allmap = (level.flags2 & LEVEL2_ALLMAP) != 0;
|
bool allmap = (level.flags2 & LEVEL2_ALLMAP) != 0;
|
||||||
bool allthings = allmap && players[consoleplayer].mo->FindInventory(NAME_PowerScanner, true) != nullptr;
|
bool allthings = allmap && players[consoleplayer].mo->FindInventory(NAME_PowerScanner, true) != nullptr;
|
||||||
|
|
||||||
viewbottom = bottom;
|
|
||||||
if (am_portaloverlay)
|
if (am_portaloverlay)
|
||||||
{
|
{
|
||||||
sector_t *sec;
|
sector_t *sec;
|
||||||
|
@ -3186,7 +3184,7 @@ void AM_Drawer (int bottom)
|
||||||
// and view size adjustments.
|
// and view size adjustments.
|
||||||
f_x = f_y = 0;
|
f_x = f_y = 0;
|
||||||
f_w = screen->GetWidth ();
|
f_w = screen->GetWidth ();
|
||||||
f_h = viewbottom;
|
f_h = bottom;
|
||||||
f_p = screen->GetPitch ();
|
f_p = screen->GetPitch ();
|
||||||
|
|
||||||
AM_clearFB(AMColors[AMColors.Background]);
|
AM_clearFB(AMColors[AMColors.Background]);
|
||||||
|
|
Loading…
Reference in New Issue