mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
fix automap reset when switching resolutions (#1351)
This commit is contained in:
parent
7c1b648d46
commit
b12994bccc
42
src/am_map.c
42
src/am_map.c
@ -588,6 +588,29 @@ void AM_enableSmoothLines(void)
|
|||||||
AM_drawFline = map_smooth_lines ? AM_drawFline_Smooth : AM_drawFline_Vanilla;
|
AM_drawFline = map_smooth_lines ? AM_drawFline_Smooth : AM_drawFline_Vanilla;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void AM_initScreenSize(void)
|
||||||
|
{
|
||||||
|
// killough 2/7/98: get rid of finit_ vars
|
||||||
|
// to allow runtime setting of width/height
|
||||||
|
//
|
||||||
|
// killough 11/98: ... finally add hires support :)
|
||||||
|
|
||||||
|
f_w = video.width;
|
||||||
|
if (automapoverlay && scaledviewheight == SCREENHEIGHT)
|
||||||
|
f_h = video.height;
|
||||||
|
else
|
||||||
|
f_h = video.height - ((ST_HEIGHT * video.yscale) >> FRACBITS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AM_ResetScreenSize(void)
|
||||||
|
{
|
||||||
|
AM_saveScaleAndLoc();
|
||||||
|
|
||||||
|
AM_initScreenSize();
|
||||||
|
|
||||||
|
AM_restoreScaleAndLoc();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// AM_LevelInit()
|
// AM_LevelInit()
|
||||||
//
|
//
|
||||||
@ -603,19 +626,10 @@ static void AM_LevelInit(void)
|
|||||||
static int precalc_once;
|
static int precalc_once;
|
||||||
|
|
||||||
automapfirststart = true;
|
automapfirststart = true;
|
||||||
|
|
||||||
f_x = f_y = 0;
|
f_x = f_y = 0;
|
||||||
|
|
||||||
// killough 2/7/98: get rid of finit_ vars
|
AM_initScreenSize();
|
||||||
// to allow runtime setting of width/height
|
|
||||||
//
|
|
||||||
// killough 11/98: ... finally add hires support :)
|
|
||||||
|
|
||||||
f_w = video.width;
|
|
||||||
if (automapoverlay && scaledviewheight == SCREENHEIGHT)
|
|
||||||
f_h = video.height;
|
|
||||||
else
|
|
||||||
f_h = video.height - ((ST_HEIGHT * video.yscale) >> FRACBITS);
|
|
||||||
|
|
||||||
AM_enableSmoothLines();
|
AM_enableSmoothLines();
|
||||||
|
|
||||||
@ -898,11 +912,7 @@ boolean AM_Responder
|
|||||||
default: togglemsg("%s", s_AMSTR_OVERLAYOFF); break;
|
default: togglemsg("%s", s_AMSTR_OVERLAYOFF); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (automapoverlay && scaledviewheight == SCREENHEIGHT)
|
AM_initScreenSize();
|
||||||
f_h = video.height;
|
|
||||||
else
|
|
||||||
f_h = video.height - ((ST_HEIGHT * video.yscale) >> FRACBITS);
|
|
||||||
|
|
||||||
AM_activateNewScale();
|
AM_activateNewScale();
|
||||||
}
|
}
|
||||||
else if (M_InputActivated(input_map_rotate))
|
else if (M_InputActivated(input_map_rotate))
|
||||||
|
@ -54,6 +54,8 @@ extern void AM_initVariables(void);
|
|||||||
|
|
||||||
void AM_SetMapCenter(fixed_t x, fixed_t y);
|
void AM_SetMapCenter(fixed_t x, fixed_t y);
|
||||||
|
|
||||||
|
void AM_ResetScreenSize(void);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int64_t x,y;
|
int64_t x,y;
|
||||||
|
@ -1047,6 +1047,9 @@ static void ResetResolution(int height)
|
|||||||
R_InitVisplanesRes();
|
R_InitVisplanesRes();
|
||||||
setsizeneeded = true; // run R_ExecuteSetViewSize
|
setsizeneeded = true; // run R_ExecuteSetViewSize
|
||||||
|
|
||||||
|
if (automapactive)
|
||||||
|
AM_ResetScreenSize();
|
||||||
|
|
||||||
I_InitDiskFlash();
|
I_InitDiskFlash();
|
||||||
|
|
||||||
I_Printf(VB_DEBUG, "ResetResolution: %dx%d", video.width, video.height);
|
I_Printf(VB_DEBUG, "ResetResolution: %dx%d", video.width, video.height);
|
||||||
@ -1530,9 +1533,6 @@ void I_ResetScreen(void)
|
|||||||
ResetResolution(CurrentResolutionMode());
|
ResetResolution(CurrentResolutionMode());
|
||||||
ResetLogicalSize();
|
ResetLogicalSize();
|
||||||
|
|
||||||
if (automapactive)
|
|
||||||
AM_Start(); // Reset automap dimensions
|
|
||||||
|
|
||||||
ST_Start(); // Reset palette
|
ST_Start(); // Reset palette
|
||||||
|
|
||||||
if (gamestate == GS_INTERMISSION)
|
if (gamestate == GS_INTERMISSION)
|
||||||
|
10
src/r_main.c
10
src/r_main.c
@ -562,13 +562,6 @@ void R_ExecuteSetViewSize (void)
|
|||||||
// [crispy] forcefully initialize the status bar backing screen
|
// [crispy] forcefully initialize the status bar backing screen
|
||||||
ST_refreshBackground(true);
|
ST_refreshBackground(true);
|
||||||
|
|
||||||
// [FG] reinitialize Automap
|
|
||||||
if (automapactive)
|
|
||||||
AM_Start();
|
|
||||||
|
|
||||||
// [FG] spectre drawing mode
|
|
||||||
R_SetFuzzColumnMode();
|
|
||||||
|
|
||||||
pspr_interp = false;
|
pspr_interp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,6 +577,9 @@ void R_Init (void)
|
|||||||
R_InitLightTables();
|
R_InitLightTables();
|
||||||
R_InitSkyMap();
|
R_InitSkyMap();
|
||||||
R_InitTranslationTables();
|
R_InitTranslationTables();
|
||||||
|
|
||||||
|
// [FG] spectre drawing mode
|
||||||
|
R_SetFuzzColumnMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user