create map preview pictures during spectating

pressing CTRL+F12 during spectating creates a clean screenshot and saves
it as map preview picture

  modkeypressed

    returns 1, if a CTRL key is pressed and 0, if not

  screenshotpreview [lines]

    creates a screenshot cropped to 4:3 with a given number of lines
    (in the range of 144 to 480, default 240 or last given value)
    and jpeg quality 80

  gotovantagepoint

    now returns 1, if the map actually has a vantage point set

DOCREF screenshotpreview modkeypressed gotovantagepoint
This commit is contained in:
ac-stef
2017-06-11 21:13:50 +02:00
parent 06b9d3103d
commit 528d923f81
5 changed files with 51 additions and 22 deletions
+2
View File
@@ -206,6 +206,8 @@ void findkeycode(const char* s)
}
COMMAND(findkeycode, "s");
COMMANDF(modkeypressed, "", () { intret((SDL_GetModState() & MOD_KEYS_CTRL) ? 1 : 0); });
keym *keypressed = NULL;
char *keyaction = NULL;