diff --git a/doomsday/plugins/common/src/hu_automap.c b/doomsday/plugins/common/src/hu_automap.c index 30a572eb02..b13237caaa 100644 --- a/doomsday/plugins/common/src/hu_automap.c +++ b/doomsday/plugins/common/src/hu_automap.c @@ -126,6 +126,7 @@ void UIAutomap_Register(void) { "map-rotate", 0, CVT_BYTE, &cfg.automapRotate, 0, 1 }, { "map-zoom-speed", 0, CVT_FLOAT, &cfg.automapZoomSpeed, 0, 1 }, { "map-open-timer", CVF_NO_MAX, CVT_FLOAT, &cfg.automapOpenSeconds, 0, 0 }, + { "map-title-position", 0, CVT_BYTE, &cfg.automapTitleAtBottom, 0, 1}, { "rend-dev-freeze-map", CVF_NO_ARCHIVE, CVT_BYTE, &freezeMapRLs, 0, 1 }, // Aliases for old names: diff --git a/doomsday/plugins/common/src/hu_log.c b/doomsday/plugins/common/src/hu_log.c index 794caabcf1..d2868c6a8c 100644 --- a/doomsday/plugins/common/src/hu_log.c +++ b/doomsday/plugins/common/src/hu_log.c @@ -289,7 +289,7 @@ void UILog_Drawer(uiwidget_t* obj, const Point2Raw* offset) guidata_log_message_t* msg; assert(obj->type == GUI_LOG); - if(Hu_IsMapTitleVisible()) + if(Hu_IsMapTitleVisible() && !cfg.automapTitleAtBottom) { offsetDueToMapTitle = Hu_MapTitleHeight(); } diff --git a/doomsday/plugins/common/src/hu_stuff.cpp b/doomsday/plugins/common/src/hu_stuff.cpp index 8a4689db7b..054da711d2 100644 --- a/doomsday/plugins/common/src/hu_stuff.cpp +++ b/doomsday/plugins/common/src/hu_stuff.cpp @@ -1569,9 +1569,21 @@ void Hu_MapTitleDrawer(const RectRaw* portGeometry) { if(!cfg.mapTitle || !portGeometry) return; + // Scale according to the viewport size. + float scale; + R_ChooseAlignModeAndScaleFactor(&scale, SCREENWIDTH, SCREENHEIGHT, + portGeometry->size.width, portGeometry->size.height, + scalemode_t(cfg.menuScaleMode)); + + // Determine origin of the title. Point2Raw origin(portGeometry->size.width / 2, 6 * portGeometry->size.height / SCREENHEIGHT); - float scale; + + if(cfg.automapTitleAtBottom && ST_AutomapIsActive(DISPLAYPLAYER) && (actualMapTime > 6 * TICSPERSEC)) + { + origin.y = portGeometry->size.height * + (SCREENHEIGHT - 1.2f * (cfg.statusbarScale * ST_HEIGHT + Hu_MapTitleHeight()))/float(SCREENHEIGHT); + } DGL_MatrixMode(DGL_MODELVIEW); DGL_PushMatrix(); @@ -1579,10 +1591,6 @@ void Hu_MapTitleDrawer(const RectRaw* portGeometry) // After scaling, the title is centered horizontally on the screen. DGL_Translatef(origin.x, origin.y, 0); - // Scale according to the viewport size. - R_ChooseAlignModeAndScaleFactor(&scale, SCREENWIDTH, SCREENHEIGHT, - portGeometry->size.width, portGeometry->size.height, - scalemode_t(cfg.menuScaleMode)); DGL_Scalef(scale, scale * 1.2f/*aspect correct*/, 1); // Level information is shown for a few seconds in the beginning of a level. diff --git a/doomsday/plugins/doom/include/d_config.h b/doomsday/plugins/doom/include/d_config.h index f8e94d2665..6e7fecb0e7 100644 --- a/doomsday/plugins/doom/include/d_config.h +++ b/doomsday/plugins/doom/include/d_config.h @@ -199,6 +199,7 @@ typedef struct jdoom_config_s { float automapPanSpeed; byte automapPanResetOnOpen; float automapOpenSeconds; + byte automapTitleAtBottom; int msgCount; float msgScale; diff --git a/doomsday/plugins/doom/src/d_main.c b/doomsday/plugins/doom/src/d_main.c index 130b3db944..22ddca1925 100644 --- a/doomsday/plugins/doom/src/d_main.c +++ b/doomsday/plugins/doom/src/d_main.c @@ -318,6 +318,7 @@ void D_PreInit(void) cfg.netGravity = -1; // use map default cfg.plrViewHeight = DEFAULT_PLAYER_VIEWHEIGHT; cfg.mapTitle = true; + cfg.automapTitleAtBottom = true; cfg.hideIWADAuthor = true; cfg.confirmQuickGameSave = true; diff --git a/doomsday/plugins/doom64/include/d_config.h b/doomsday/plugins/doom64/include/d_config.h index 27e110b21b..eee964a165 100644 --- a/doomsday/plugins/doom64/include/d_config.h +++ b/doomsday/plugins/doom64/include/d_config.h @@ -114,6 +114,8 @@ typedef struct jdoom64_config_s { int menuTextFlashSpeed; float menuTextGlitter; + float statusbarScale; + byte inludeScaleMode; int inludePatchReplaceMode; @@ -192,6 +194,7 @@ typedef struct jdoom64_config_s { float automapPanSpeed; byte automapPanResetOnOpen; float automapOpenSeconds; + byte automapTitleAtBottom; int msgCount; float msgScale; diff --git a/doomsday/plugins/doom64/include/st_stuff.h b/doomsday/plugins/doom64/include/st_stuff.h index eb56c07a75..6bb0488b0b 100644 --- a/doomsday/plugins/doom64/include/st_stuff.h +++ b/doomsday/plugins/doom64/include/st_stuff.h @@ -43,6 +43,8 @@ extern "C" { #endif +#define ST_HEIGHT 32 + // Palette indices. // For damage/bonus red-/gold-shifts #define STARTREDPALS (1) diff --git a/doomsday/plugins/doom64/src/d_main.c b/doomsday/plugins/doom64/src/d_main.c index ece471f225..9fc4696ed0 100644 --- a/doomsday/plugins/doom64/src/d_main.c +++ b/doomsday/plugins/doom64/src/d_main.c @@ -237,6 +237,7 @@ void D_PreInit(void) cfg.netGravity = -1; // Use map default. cfg.plrViewHeight = DEFAULT_PLAYER_VIEWHEIGHT; cfg.mapTitle = true; + cfg.automapTitleAtBottom = true; cfg.hideIWADAuthor = true; cfg.menuTextColors[0][CR] = 1; cfg.menuTextColors[0][CG] = 0; @@ -254,6 +255,8 @@ void D_PreInit(void) cfg.menuShortcutsEnabled = true; cfg.menuGameSaveSuggestName = true; + cfg.statusbarScale = 1; + cfg.confirmQuickGameSave = true; cfg.confirmRebornLoad = true; cfg.loadAutoSaveOnReborn = false; diff --git a/doomsday/plugins/heretic/include/h_config.h b/doomsday/plugins/heretic/include/h_config.h index 0d9aaa1fe2..dc7fe4416f 100644 --- a/doomsday/plugins/heretic/include/h_config.h +++ b/doomsday/plugins/heretic/include/h_config.h @@ -189,6 +189,7 @@ typedef struct jheretic_config_s { float automapPanSpeed; byte automapPanResetOnOpen; float automapOpenSeconds; + byte automapTitleAtBottom; int msgCount; float msgScale; diff --git a/doomsday/plugins/heretic/src/h_main.c b/doomsday/plugins/heretic/src/h_main.c index ead0a762f8..0c8e1e97db 100644 --- a/doomsday/plugins/heretic/src/h_main.c +++ b/doomsday/plugins/heretic/src/h_main.c @@ -240,6 +240,7 @@ void H_PreInit(void) cfg.netGravity = -1; // Use map default. cfg.plrViewHeight = DEFAULT_PLAYER_VIEWHEIGHT; cfg.mapTitle = true; + cfg.automapTitleAtBottom = true; cfg.hideIWADAuthor = true; cfg.menuTextColors[0][0] = defFontRGB[0]; cfg.menuTextColors[0][1] = defFontRGB[1]; diff --git a/doomsday/plugins/hexen/include/x_config.h b/doomsday/plugins/hexen/include/x_config.h index 53b0bfb1f8..0dc0dfd471 100644 --- a/doomsday/plugins/hexen/include/x_config.h +++ b/doomsday/plugins/hexen/include/x_config.h @@ -153,6 +153,7 @@ typedef struct { float automapPanSpeed; byte automapPanResetOnOpen; float automapOpenSeconds; + byte automapTitleAtBottom; int messagesOn; char* chatMacros[10]; diff --git a/doomsday/plugins/hexen/src/h2_main.c b/doomsday/plugins/hexen/src/h2_main.c index a92937c2be..c4b3d8529b 100644 --- a/doomsday/plugins/hexen/src/h2_main.c +++ b/doomsday/plugins/hexen/src/h2_main.c @@ -216,6 +216,7 @@ void X_PreInit(void) cfg.netGravity = -1; // use map default cfg.plrViewHeight = DEFAULT_PLAYER_VIEWHEIGHT; cfg.mapTitle = true; + cfg.automapTitleAtBottom = true; cfg.hideIWADAuthor = true; cfg.menuPatchReplaceMode = PRM_ALLOW_TEXT; cfg.menuScale = .75f;