Implement taking smallmap screenshots.

This is largely based on this patch:
http://www.tt-forums.net/viewtopic.php?p=849533#p849533
with the following changes:
* this uses a button in the smallmap window instead of a console command
* screenshot now uses zoom level and mode of smallmap window
This commit is contained in:
Jonathan G Rennison
2015-08-04 01:26:32 +01:00
parent 163c30570b
commit 948b4e1d5e
6 changed files with 128 additions and 9 deletions

View File

@@ -26,8 +26,11 @@ enum ScreenshotType {
SC_HEIGHTMAP, ///< Heightmap of the world.
};
class SmallMapWindow;
void SetupScreenshotViewport(ScreenshotType t, struct ViewPort *vp);
bool MakeHeightmapScreenshot(const char *filename);
bool MakeSmallMapScreenshot(unsigned int width, unsigned int height, SmallMapWindow *window);
bool MakeScreenshot(ScreenshotType t, const char *name);
extern char _screenshot_format_name[8];