mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-29 12:15:26 +01:00
filesystem: add two new gameinfo.txt keys quicksave_aged_count and autosave_aged_count that control the amount of quick/autosaves rotated
This commit is contained in:
parent
c3a6cad0c1
commit
88c560aac4
@ -598,11 +598,18 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
|
||||
if( GameInfo->noskills )
|
||||
FS_Printf( f, "noskills\t\t\"%i\"\n", GameInfo->nomodels );
|
||||
|
||||
#define SAVE_AGED_COUNT 2 // the default count of quick and auto saves
|
||||
if( GameInfo->quicksave_aged_count != SAVE_AGED_COUNT )
|
||||
FS_Printf( f, "quicksave_aged_count\t\t%d\n", GameInfo->quicksave_aged_count );
|
||||
|
||||
if( GameInfo->autosave_aged_count != SAVE_AGED_COUNT )
|
||||
FS_Printf( f, "autosave_aged_count\t\t%d\n", GameInfo->autosave_aged_count );
|
||||
#undef SAVE_AGED_COUNT
|
||||
|
||||
// always expose our extensions :)
|
||||
FS_Printf( f, "internal_vgui_support\t\t%s\n", GameInfo->internal_vgui_support ? "1" : "0" );
|
||||
FS_Printf( f, "render_picbutton_text\t\t%s\n", GameInfo->render_picbutton_text ? "1" : "0" );
|
||||
|
||||
FS_Print( f, "\n\n\n" );
|
||||
FS_Close( f ); // all done
|
||||
}
|
||||
|
||||
@ -847,6 +854,16 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
|
||||
pfile = COM_ParseFile( pfile, token, sizeof( token ));
|
||||
GameInfo->internal_vgui_support = Q_atoi( token );
|
||||
}
|
||||
else if( !Q_stricmp( token, "quicksave_aged_count" ))
|
||||
{
|
||||
pfile = COM_ParseFile( pfile, token, sizeof( token ));
|
||||
GameInfo->quicksave_aged_count = bound( 2, Q_atoi( token ), 99 );
|
||||
}
|
||||
else if( !Q_stricmp( token, "autosave_aged_count" ))
|
||||
{
|
||||
pfile = COM_ParseFile( pfile, token, sizeof( token ));
|
||||
GameInfo->autosave_aged_count = bound( 2, Q_atoi( token ), 99 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,9 @@ typedef struct gameinfo_s
|
||||
char game_dll_osx[64]; // custom path for game.dll
|
||||
|
||||
qboolean added;
|
||||
|
||||
int quicksave_aged_count; // min is 1, max is 99
|
||||
int autosave_aged_count; // min is 1, max is 99
|
||||
} gameinfo_t;
|
||||
|
||||
typedef enum
|
||||
|
Loading…
Reference in New Issue
Block a user