mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-23 01:50:41 +00:00
Changed screenshot naming scheme
This commit is contained in:
parent
f642e8eb9b
commit
ee889d1ce6
1 changed files with 26 additions and 28 deletions
|
@ -543,15 +543,15 @@ void R_TakeScreenshot( int x, int y, int width, int height, char *name, qboolean
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
R_ScreenshotFilename
|
R_ScreenshotFilenameEx
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void R_ScreenshotFilename( int lastNumber, char *fileName ) {
|
void R_ScreenshotFilenameEx( const char* extension, int lastNumber, char *fileName ) {
|
||||||
int a,b,c,d;
|
int a,b,c,d;
|
||||||
|
qtime_t now;
|
||||||
|
|
||||||
if ( lastNumber < 0 || lastNumber > 9999 ) {
|
if ( lastNumber < 0 || lastNumber > 9999 ) {
|
||||||
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot9999.tga" );
|
lastNumber = 9999;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a = lastNumber / 1000;
|
a = lastNumber / 1000;
|
||||||
|
@ -562,33 +562,31 @@ void R_ScreenshotFilename( int lastNumber, char *fileName ) {
|
||||||
lastNumber -= c*10;
|
lastNumber -= c*10;
|
||||||
d = lastNumber;
|
d = lastNumber;
|
||||||
|
|
||||||
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot%i%i%i%i.tga"
|
Com_RealTime(&now);
|
||||||
, a, b, c, d );
|
|
||||||
|
Com_sprintf( fileName, MAX_OSPATH, "screenshots/" PRODUCT_NAME "-%04i%02i%02i-%02i%02i%02i-%i%i%i%i.%s",
|
||||||
|
now.tm_year + 1900, now.tm_mon + 1, now.tm_mday,
|
||||||
|
now.tm_hour, now.tm_min, now.tm_sec,
|
||||||
|
a, b, c, d, extension );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
R_ScreenshotFilename
|
R_ScreenshotFilename
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
|
void R_ScreenshotFilename( int lastNumber, char *fileName ) {
|
||||||
|
R_ScreenshotFilenameEx("tga", lastNumber, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
==================
|
||||||
|
R_ScreenshotFilenameJPEG
|
||||||
|
==================
|
||||||
|
*/
|
||||||
void R_ScreenshotFilenameJPEG( int lastNumber, char *fileName ) {
|
void R_ScreenshotFilenameJPEG( int lastNumber, char *fileName ) {
|
||||||
int a,b,c,d;
|
R_ScreenshotFilenameEx("jpg", lastNumber, fileName);
|
||||||
|
|
||||||
if ( lastNumber < 0 || lastNumber > 9999 ) {
|
|
||||||
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot9999.jpg" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
a = lastNumber / 1000;
|
|
||||||
lastNumber -= a*1000;
|
|
||||||
b = lastNumber / 100;
|
|
||||||
lastNumber -= b*100;
|
|
||||||
c = lastNumber / 10;
|
|
||||||
lastNumber -= c*10;
|
|
||||||
d = lastNumber;
|
|
||||||
|
|
||||||
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot%i%i%i%i.jpg"
|
|
||||||
, a, b, c, d );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue