New level screenshots
18
rc.c
|
@ -37,6 +37,9 @@ int lockcredits = B_FALSE;
|
||||||
|
|
||||||
int globtimer;
|
int globtimer;
|
||||||
|
|
||||||
|
int autoshot = B_FALSE;
|
||||||
|
int shottaken = B_FALSE;
|
||||||
|
|
||||||
int introstate;
|
int introstate;
|
||||||
|
|
||||||
TTF_Font *font[MAXLETTERHEIGHT];
|
TTF_Font *font[MAXLETTERHEIGHT];
|
||||||
|
@ -219,6 +222,9 @@ int main (int argc, char **argv) {
|
||||||
} else if (!strcmp(argv[i], "-c")) {
|
} else if (!strcmp(argv[i], "-c")) {
|
||||||
printf("Cheat mode.\n");
|
printf("Cheat mode.\n");
|
||||||
cheat = B_TRUE;
|
cheat = B_TRUE;
|
||||||
|
} else if (!strcmp(argv[i], "-as")) {
|
||||||
|
printf("Automatic screenshot mode activated.\n");
|
||||||
|
autoshot = B_TRUE;
|
||||||
} else if (!strcmp(argv[i], "-l")) {
|
} else if (!strcmp(argv[i], "-l")) {
|
||||||
if (++i >= argc) {
|
if (++i >= argc) {
|
||||||
printf("Missing level number.\n");
|
printf("Missing level number.\n");
|
||||||
|
@ -907,11 +913,10 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// screenshot
|
// screenshot
|
||||||
if (keydown(0, SDLK_F12) || keydown(0, SDLK_w)) {
|
if (autoshot && (levelcomplete == LV_INPROGRESS)) {
|
||||||
if (toggletimer == 0) {
|
if (!shottaken) {
|
||||||
///
|
|
||||||
savebmp(screen);
|
savebmp(screen);
|
||||||
toggletimer = 80;
|
shottaken = B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1369,6 +1374,10 @@ void nextlevel(void) {
|
||||||
|
|
||||||
// reset timer
|
// reset timer
|
||||||
timer = 0;
|
timer = 0;
|
||||||
|
|
||||||
|
if (autoshot) {
|
||||||
|
shottaken = B_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void jump(sprite_t *s, int dir) {
|
void jump(sprite_t *s, int dir) {
|
||||||
|
@ -12377,5 +12386,6 @@ int savebmp(SDL_Surface *which) {
|
||||||
char filename[BUFLEN];
|
char filename[BUFLEN];
|
||||||
sprintf(filename, "/tmp/level_%d_%d.bmp",getcurworld(), getcurlevel());
|
sprintf(filename, "/tmp/level_%d_%d.bmp",getcurworld(), getcurlevel());
|
||||||
rv = SDL_SaveBMP(which, filename);
|
rv = SDL_SaveBMP(which, filename);
|
||||||
|
printf("Screenshot saved in %s\n",filename);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 70 KiB |