Minimap screenshot: add console params and help to mostly match screenshot.

This commit is contained in:
Jonathan G Rennison
2015-09-11 03:44:25 +01:00
parent 019e862536
commit dde1c16105
3 changed files with 23 additions and 4 deletions

View File

@@ -924,7 +924,7 @@ static void MinimapOwnerCallback(void *userdata, void *buf, uint y, uint pitch,
/**
* Saves the complete savemap in a PNG-file.
*/
void SaveMinimap()
void SaveMinimap(const char *name)
{
/* setup owner table */
const Company *c;
@@ -941,6 +941,9 @@ void SaveMinimap()
_colour_gradient[c->colour][5] * 0x01010101;
}
_screenshot_name[0] = '\0';
if (name != NULL) strecpy(_screenshot_name, name, lastof(_screenshot_name));
const ScreenshotFormat *sf = _screenshot_formats + _cur_screenshot_format;
sf->proc(MakeScreenshotName("minimap", sf->extension), MinimapOwnerCallback, NULL, MapSizeX(), MapSizeY(), 32, _cur_palette.palette);
}