Allow random screenshots to be taken.

This commit is contained in:
Steve 2018-02-26 07:53:12 +00:00
parent bf9ab57e2f
commit 583373402a
5 changed files with 13 additions and 3 deletions

View File

@ -86,6 +86,11 @@ int main(int argc, char *argv[])
awardTrophies();
expireTexts(0);
if (dev.takeScreenshots)
{
saveScreenshot(NULL);
}
}
}

View File

@ -35,6 +35,7 @@ extern void doTrophyAlerts(void);
extern void drawTrophyAlert(void);
extern void expireTexts(int all);
extern void saveTrophyScreenshot(void);
extern void saveScreenshot(char *name);
App app;
Camera camera;

View File

@ -265,7 +265,7 @@ void saveScreenshot(char *name)
}
else
{
sprintf(filename, "%s/%d.bmp", app.saveDir, SDL_GetTicks());
sprintf(filename, "%s/%d.bmp", dev.screenshotFolder, SDL_GetTicks());
}
screenshot = SDL_CreateRGBSurface(0, SCREEN_WIDTH, SCREEN_HEIGHT, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);

View File

@ -24,7 +24,7 @@ void initAtlasTest(void)
{
int test;
dev.debug = 1;
dev.debug = 0;
dev.cheatStatic = 0;
dev.cheatBlind = 1;
dev.cheatNoEnemies = 0;
@ -32,11 +32,14 @@ void initAtlasTest(void)
dev.cheatPower = 0;
dev.cheatHealth = 0;
dev.cheatLevels = 0;
dev.takeScreenshots = 0;
loadGame();
saveGame();
createScreenshotFolder();
test = 1;
switch (test)
@ -46,7 +49,7 @@ void initAtlasTest(void)
break;
case 1:
STRNCPY(game.worldId, "outpost1", MAX_NAME_LENGTH);
STRNCPY(game.worldId, "boss1", MAX_NAME_LENGTH);
initWorld();
break;

View File

@ -25,6 +25,7 @@ extern void initHub(void);
extern void loadGame(void);
extern void saveGame(void);
extern void initOptions(void);
extern void createScreenshotFolder(void);
extern App app;
extern Dev dev;