Reverting 1805

This commit is contained in:
Richard Allen 2012-03-30 13:11:45 +00:00
parent 6364b2dbe7
commit dee0665b9a

View file

@ -523,17 +523,17 @@ void R_TakeScreenshot( int x, int y, int width, int height, char *name, qboolean
/*
==================
R_ScreenshotFilenameEx
R_ScreenshotFilename
==================
*/
void R_ScreenshotFilenameEx( const char* extension, int lastNumber, char *fileName ) {
void R_ScreenshotFilename( int lastNumber, char *fileName ) {
int a,b,c,d;
qtime_t now;
if ( lastNumber < 0 || lastNumber > 9999 ) {
lastNumber = 9999;
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot9999.tga" );
return;
}
a = lastNumber / 1000;
lastNumber -= a*1000;
b = lastNumber / 100;
@ -542,31 +542,33 @@ void R_ScreenshotFilenameEx( const char* extension, int lastNumber, char *fileNa
lastNumber -= c*10;
d = lastNumber;
Com_RealTime(&now);
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 );
Com_sprintf( fileName, MAX_OSPATH, "screenshots/shot%i%i%i%i.tga"
, a, b, c, d );
}
/*
==================
R_ScreenshotFilename
==================
*/
void R_ScreenshotFilename( int lastNumber, char *fileName ) {
R_ScreenshotFilenameEx("tga", lastNumber, fileName);
}
/*
==================
R_ScreenshotFilenameJPEG
==================
*/
void R_ScreenshotFilenameJPEG( int lastNumber, char *fileName ) {
R_ScreenshotFilenameEx("jpg", lastNumber, fileName);
int a,b,c,d;
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 );
}
/*
@ -680,10 +682,10 @@ void R_ScreenShot_f (void) {
for ( ; lastNumber <= 9999 ; lastNumber++ ) {
R_ScreenshotFilename( lastNumber, checkname );
if (!ri.FS_FileExists( checkname ))
{
break; // file doesn't exist
}
if (!ri.FS_FileExists( checkname ))
{
break; // file doesn't exist
}
}
if ( lastNumber >= 9999 ) {