diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 79738c3f0..7717e86a3 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -1641,10 +1641,12 @@ boolean M_ScreenshotResponder(event_t *ev) void M_MinimapGenerate(void) { #ifdef USE_PNG - char *filepath = va(pandf, srb2home, "MINIMAP.png"); + char *filepath; boolean ret = false; minigen_t *minigen = NULL; INT32 wh = 100; + size_t option_scale; + INT32 mul = 1; if (gamestate != GS_LEVEL) { @@ -1658,6 +1660,36 @@ void M_MinimapGenerate(void) return; } + option_scale = COM_CheckPartialParm("-m"); + + if (option_scale) + { + if (COM_Argc() < option_scale + 2)/* no argument after? */ + { + CONS_Alert(CONS_ERROR, + "No multiplier follows parameter '%s'.\n", + COM_Argv(option_scale)); + return; + } + + mul = atoi(COM_Argv(option_scale + 1)); + + if (mul < 1 || mul > 10) + { + CONS_Alert(CONS_ERROR, + "Multiplier %d must be within range 1-10.\n", + mul); + return; + } + + wh *= mul; + filepath = va("%s" PATHSEP "MINIMAP-%d.png", srb2home, mul); + } + else + { + filepath = va("%s" PATHSEP "MINIMAP.png", srb2home); + } + minigen = AM_MinimapGenerate(wh); if (minigen == NULL || minigen->buf == NULL) @@ -1673,6 +1705,10 @@ failure: if (ret) { CONS_Printf(M_GetText("%s saved.\nRemember that this is not a complete minimap,\nand must be edited before putting in-game.\n"), filepath); + if (mul != 1) + { + CONS_Printf("You should divide its size by %d!\n", mul); + } } else {