This commit is 90% contributed content:

- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
  specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
  * Added the ability to center things with fullscreenoffsets enabled.  Due
    to some limitations the syntax is [-]<integer> [+ center].
  * Fixed: the translucent flag on drawinventorybar didn't work quite right.
  * Fixed: Extremely minor inaccuracy in the Doom SBarInfo code.  The
    fullscreen inventory bar wasn't scaled correctly.


SVN r1571 (trunk)
This commit is contained in:
Randy Heit 2009-05-09 02:31:49 +00:00
commit 41a416f068
9 changed files with 305 additions and 142 deletions

View file

@ -104,6 +104,7 @@ CVAR (Int, deathmatch, 0, CVAR_SERVERINFO|CVAR_LATCH);
CVAR (Bool, chasedemo, false, 0);
CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, longsavemessages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (String, save_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
gameaction_t gameaction;
gamestate_t gamestate = GS_STARTUP;
@ -1760,32 +1761,28 @@ void G_SaveGame (const char *filename, const char *description)
FString G_BuildSaveName (const char *prefix, int slot)
{
FString name;
const char *leader;
FString leader;
const char *slash = "";
if (NULL != (leader = Args->CheckValue ("-savedir")))
leader = Args->CheckValue ("-savedir");
if (leader.IsEmpty())
{
size_t len = strlen (leader);
if (leader[len-1] != '\\' && leader[len-1] != '/')
#ifndef unix
if (Args->CheckParm ("-cdrom"))
{
slash = "/";
leader = CDROM_DIR "/";
}
else
#endif
{
leader = save_dir;
}
}
#ifndef unix
else if (Args->CheckParm ("-cdrom"))
size_t len = leader.Len();
if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/')
{
leader = CDROM_DIR "/";
slash = "/";
}
else
{
leader = progdir;
}
#else
else
{
leader = "";
}
#endif
if (slot < 0)
{
name.Format ("%s%s%s", leader, slash, prefix);
@ -1797,10 +1794,10 @@ FString G_BuildSaveName (const char *prefix, int slot)
#ifdef unix
if (leader[0] == 0)
{
name = GetUserFile (name);
return GetUserFile (name);
}
#endif
return name;
return NicePath(name);
}
CVAR (Int, autosavenum, 0, CVAR_NOSET|CVAR_ARCHIVE|CVAR_GLOBALCONFIG)