Skip to content

Commit

Permalink
libcommon: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jun 20, 2012
1 parent 4258d05 commit 20624a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/p_saveg.h
Expand Up @@ -106,7 +106,7 @@ boolean SV_SaveGame(int slot, const char* name);
boolean SV_LoadGame(int slot);

#if __JHEXEN__
void SV_MapTeleport(uint map, uint position);
void SV_MapTeleport(uint map, uint position);
#else
/**
* Saves a snapshot of the world, a still image.
Expand Down
6 changes: 4 additions & 2 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -2009,11 +2009,13 @@ void G_DoReborn(int plrNum)

#if __JHEXEN__
if(SV_HxRebornSlotAvailable())
{ // Use the reborn code if the slot is available
{
// Use the reborn logic if the slot is available and in use.
G_SetGameAction(GA_SINGLEREBORN);
}
else
{ // Start a new game if there's no reborn info
{
// Start a new game if there's no reborn info
G_SetGameAction(GA_NEWGAME);
}
#else
Expand Down
3 changes: 0 additions & 3 deletions doomsday/plugins/common/src/p_saveg.c
Expand Up @@ -400,20 +400,17 @@ void SV_Register(void)
#if __JHEXEN__
void SV_HxInitBaseSlot(void)
{
errorIfNotInited("SV_HxInitBaseSlot");
SV_ClearSaveSlot(BASE_SLOT);
}

void SV_HxUpdateRebornSlot(void)
{
errorIfNotInited("SV_HxUpdateRebornSlot");
SV_ClearSaveSlot(REBORN_SLOT);
SV_CopySaveSlot(BASE_SLOT, REBORN_SLOT);
}

void SV_HxClearRebornSlot(void)
{
errorIfNotInited("SV_HxClearRebornSlot");
SV_ClearSaveSlot(REBORN_SLOT);
}

Expand Down
5 changes: 5 additions & 0 deletions doomsday/plugins/common/src/p_saveio.c
Expand Up @@ -277,6 +277,9 @@ void SV_ClearSaveSlot(int slot)
{
AutoStr* path;

errorIfNotInited("SV_ClearSaveSlot");
if(!SV_IsValidSlot(slot)) return;

{ int i;
for(i = 0; i < MAX_HUB_MAPS; ++i)
{
Expand Down Expand Up @@ -533,6 +536,8 @@ void SV_CopySaveSlot(int sourceSlot, int destSlot)
{
AutoStr* src, *dst;

errorIfNotInited("SV_CopySaveSlot");

if(!SV_IsValidSlot(sourceSlot))
{
#if _DEBUG
Expand Down

0 comments on commit 20624a3

Please sign in to comment.