MCPcopy Create free account
hub / github.com/assaultcube/AC / screenshotpreview

Function screenshotpreview

source/src/main.cpp:478–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476COMMAND(mapshot, "");
477
478void screenshotpreview(int *res)
479{
480 static int lastres = 240;
481 defformatstring(buf)("packages" PATHDIVS "maps" PATHDIVS "%spreview" PATHDIVS "%s.jpg", securemapcheck(getclientmap(), false) ? "official" PATHDIVS : "", behindpath(getclientmap()));
482 mapscreenshot(buf, false, 1, 1.0f, (lastres = clamp(((*res ? *res : lastres) / 48) * 48, 144, 480)), 80);
483 reloadtexture(*textureload(buf, 3));
484}
485COMMAND(screenshotpreview, "i");
486
487bool needsautoscreenshot = false;

Callers

nothing calls this directly

Calls 6

securemapcheckFunction · 0.85
getclientmapFunction · 0.85
behindpathFunction · 0.85
mapscreenshotFunction · 0.85
reloadtextureFunction · 0.85
textureloadFunction · 0.85

Tested by

no test coverage detected