From fdca639bd4a039a8ca213ce711bd4b027ad05dd2 Mon Sep 17 00:00:00 2001 From: Knightmare66 Date: Sun, 27 Sep 2020 19:59:38 -0400 Subject: [PATCH] Renamed save slots to use format of kmq2savexxx. Increased number of save slots in save/load menus to 24. --- kmquake2_changelog.txt | 2 +- server/sv_ccmds.c | 4 ++-- ui/ui_game_saveload.c | 44 +++++++++++++++++++++--------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/kmquake2_changelog.txt b/kmquake2_changelog.txt index 34a21cc..b783718 100644 --- a/kmquake2_changelog.txt +++ b/kmquake2_changelog.txt @@ -4,7 +4,7 @@ Changes as of v0.20 update 8: - Added 3840x1600 and 4096x2160 video modes. -- Added 160Hz and 240Hz refresh rates. +- Added 160Hz, 165Hz, 180Hz, and 240Hz refresh rates. - Added automatic setting of r_maxfps based on refresh rate set in video menu (r_displayrefresh). This can be disabled by setting the cvar r_maxfps_autoset to 0. diff --git a/server/sv_ccmds.c b/server/sv_ccmds.c index 3d9dbc5..9f8b17f 100644 --- a/server/sv_ccmds.c +++ b/server/sv_ccmds.c @@ -244,7 +244,7 @@ void SV_CopySaveGame (char *src, char *dst) FS_CopyFile (name, name2); // Knightmare- copy screenshot - if (strcmp(dst, "kmq2save0")) // no screenshot for start of level autosaves + if (strcmp(dst, "kmq2save000")) // no screenshot for start of level autosaves { // Com_sprintf (name, sizeof(name), "%s/save/%s/shot.jpg", FS_Savegamedir(), src); // was FS_Gamedir() // Com_sprintf (name2, sizeof(name2), "%s/save/%s/shot.jpg", FS_Savegamedir(), dst); // was FS_Gamedir() @@ -720,7 +720,7 @@ void SV_GameMap_f (void) && Q_strcasecmp (map+l-4, ".pcx")) { SV_WriteServerFile (true, false); - SV_CopySaveGame ("current", "kmq2save0"); + SV_CopySaveGame ("current", "kmq2save000"); } } diff --git a/ui/ui_game_saveload.c b/ui/ui_game_saveload.c index ba6f937..4b72b4a 100644 --- a/ui/ui_game_saveload.c +++ b/ui/ui_game_saveload.c @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#define MAX_SAVEGAMES 21 // was 15 +#define MAX_SAVEGAMES 25 // was 15, 21 static menuframework_s s_loadgame_menu; static menuaction_s s_loadgame_actions[MAX_SAVEGAMES]; @@ -72,8 +72,8 @@ void Load_Savestrings (qboolean update) for (i=0; igeneric.localdata[0] ] && (a->generic.localdata[0] != 0) ) // autosave has no saveshot, but uses levelshot instead { - // Com_sprintf(loadshotname, sizeof(loadshotname), "/save/kmq2save%i/shot.jpg", a->generic.localdata[0]); - Com_sprintf(loadshotname, sizeof(loadshotname), "/"SAVEDIRNAME"/kmq2save%i/shot.jpg", a->generic.localdata[0]); + // Com_sprintf(loadshotname, sizeof(loadshotname), "/save/kmq2save%03i/shot.jpg", a->generic.localdata[0]); + Com_sprintf(loadshotname, sizeof(loadshotname), "/"SAVEDIRNAME"/kmq2save%03i/shot.jpg", a->generic.localdata[0]); load_saveshot = loadshotname; } else { load_saveshot = NULL; } if ( m_savevalid[ a->generic.localdata[0] ] ) { - Cbuf_AddText (va("load kmq2save%i\n", a->generic.localdata[0] ) ); + Cbuf_AddText (va("load kmq2save%03i\n", a->generic.localdata[0] ) ); UI_ForceMenuOff (); } } @@ -286,7 +286,7 @@ void LoadGame_MenuInit (void) UI_UpdateSavegameData (); s_loadgame_menu.x = SCREEN_WIDTH*0.5 - 240; - s_loadgame_menu.y = SCREEN_HEIGHT*0.5 - 58; + s_loadgame_menu.y = SCREEN_HEIGHT*0.5 - 68; s_loadgame_menu.nitems = 0; // Load_Savestrings (); @@ -360,7 +360,7 @@ void SaveGameCallback (void *self) { menuaction_s *a = ( menuaction_s * ) self; - Cbuf_AddText (va("save kmq2save%i\n", a->generic.localdata[0] )); + Cbuf_AddText (va("save kmq2save%03i\n", a->generic.localdata[0] )); UI_ForceMenuOff (); } @@ -379,7 +379,7 @@ void SaveGame_MenuInit (void) UI_UpdateSavegameData (); s_savegame_menu.x = SCREEN_WIDTH*0.5 - 240; - s_savegame_menu.y = SCREEN_HEIGHT*0.5 - 58; + s_savegame_menu.y = SCREEN_HEIGHT*0.5 - 68; s_savegame_menu.nitems = 0; // Load_Savestrings ();