Allow random screenshots to be taken.
This commit is contained in:
parent
bf9ab57e2f
commit
583373402a
|
@ -86,6 +86,11 @@ int main(int argc, char *argv[])
|
||||||
awardTrophies();
|
awardTrophies();
|
||||||
|
|
||||||
expireTexts(0);
|
expireTexts(0);
|
||||||
|
|
||||||
|
if (dev.takeScreenshots)
|
||||||
|
{
|
||||||
|
saveScreenshot(NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ extern void doTrophyAlerts(void);
|
||||||
extern void drawTrophyAlert(void);
|
extern void drawTrophyAlert(void);
|
||||||
extern void expireTexts(int all);
|
extern void expireTexts(int all);
|
||||||
extern void saveTrophyScreenshot(void);
|
extern void saveTrophyScreenshot(void);
|
||||||
|
extern void saveScreenshot(char *name);
|
||||||
|
|
||||||
App app;
|
App app;
|
||||||
Camera camera;
|
Camera camera;
|
||||||
|
|
|
@ -265,7 +265,7 @@ void saveScreenshot(char *name)
|
||||||
}
|
}
|
||||||
else
|
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);
|
screenshot = SDL_CreateRGBSurface(0, SCREEN_WIDTH, SCREEN_HEIGHT, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||||||
|
|
|
@ -24,7 +24,7 @@ void initAtlasTest(void)
|
||||||
{
|
{
|
||||||
int test;
|
int test;
|
||||||
|
|
||||||
dev.debug = 1;
|
dev.debug = 0;
|
||||||
dev.cheatStatic = 0;
|
dev.cheatStatic = 0;
|
||||||
dev.cheatBlind = 1;
|
dev.cheatBlind = 1;
|
||||||
dev.cheatNoEnemies = 0;
|
dev.cheatNoEnemies = 0;
|
||||||
|
@ -32,11 +32,14 @@ void initAtlasTest(void)
|
||||||
dev.cheatPower = 0;
|
dev.cheatPower = 0;
|
||||||
dev.cheatHealth = 0;
|
dev.cheatHealth = 0;
|
||||||
dev.cheatLevels = 0;
|
dev.cheatLevels = 0;
|
||||||
|
dev.takeScreenshots = 0;
|
||||||
|
|
||||||
loadGame();
|
loadGame();
|
||||||
|
|
||||||
saveGame();
|
saveGame();
|
||||||
|
|
||||||
|
createScreenshotFolder();
|
||||||
|
|
||||||
test = 1;
|
test = 1;
|
||||||
|
|
||||||
switch (test)
|
switch (test)
|
||||||
|
@ -46,7 +49,7 @@ void initAtlasTest(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
STRNCPY(game.worldId, "outpost1", MAX_NAME_LENGTH);
|
STRNCPY(game.worldId, "boss1", MAX_NAME_LENGTH);
|
||||||
initWorld();
|
initWorld();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ extern void initHub(void);
|
||||||
extern void loadGame(void);
|
extern void loadGame(void);
|
||||||
extern void saveGame(void);
|
extern void saveGame(void);
|
||||||
extern void initOptions(void);
|
extern void initOptions(void);
|
||||||
|
extern void createScreenshotFolder(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
Loading…
Reference in New Issue