Skip to content

Commit

Permalink
Use game mode in savegame dir, Sv_HxInit added
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 3, 2003
1 parent da12187 commit 4aa129a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion doomsday/Src/jHexen/sv_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ extern acsInfo_t *ACSInfo;

// PUBLIC DATA DEFINITIONS -------------------------------------------------

char *SavePath = DEFAULT_SAVEPATH;
char SavePath[256] = DEFAULT_SAVEPATH;

// PRIVATE DATA DEFINITIONS ------------------------------------------------

Expand Down Expand Up @@ -268,6 +268,26 @@ static thinkInfo_t ThinkerInfo[] =

// CODE --------------------------------------------------------------------

//===========================================================================
// SV_HxInit
// Init the save path.
//===========================================================================
void SV_HxInit(void)
{
if(ArgCheckWith("-savedir", 1))
{
strcpy(SavePath, ArgNext());
// Add a trailing backslash is necessary.
if(SavePath[strlen(SavePath) - 1] != '\\') strcat(SavePath, "\\");
}
else
{
// Use the default save path.
sprintf(SavePath, DEFAULT_SAVEPATH "%s\\", G_Get(DD_GAME_MODE));
}
M_CheckPath(SavePath);
}

//==========================================================================
//
// SV_HxSaveGame
Expand Down

0 comments on commit 4aa129a

Please sign in to comment.