Skip to content

Commit

Permalink
Documentation|libcommon|SaveSlots: Minor SaveSlots apidoc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 21, 2014
1 parent 89ff7e3 commit 1ecc57b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
20 changes: 11 additions & 9 deletions doomsday/plugins/common/include/saveslots.h
Expand Up @@ -92,14 +92,16 @@ class SaveSlots
void addMissingSaveInfo();

/**
* Returns the save name (with file extension) of the game state associated with the save slot.
* Returns the save name (with file extension) for the specified @a map, for the logical
* save slot.
*
* @param map Logical map index.
*
* @return The composed name if reachable (else a zero-length string).
*/
de::String saveNameForMap(uint map) const;

/**
* Returns the save name (with file extension), for the logical save slot.
*/
de::String saveName() const;

private:
Expand Down Expand Up @@ -187,22 +189,22 @@ class SaveSlots
int findSlotWithUserSaveDescription(de::String description) const;

/**
* Returns @c true iff save @a slot is user-writable (i.e., not a special slot, such as
* the @em auto and @em base slots).
* Returns @c true iff save @a slotNumber is user-writable (i.e., not a special slot, such
* as the @em auto and @em base slots).
*/
bool slotIsUserWritable(int slot) const;
bool slotIsUserWritable(int slotNumber) const;

/**
* Deletes all save game files associated with the specified save @a slot.
* Deletes all save game files associated with the specified save @a slotNumber.
*
* @see isKnownSlot()
*/
void clearSlot(int slot);
void clearSlot(int slotNumber);

/**
* Copies all the save game files from one slot to another.
*/
void copySlot(int sourceSlot, int destSlot);
void copySlot(int sourceSlotNumber, int destSlotNumber);

/**
* Register the console commands and variables of this module.
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/common/src/saveslots.cpp
Expand Up @@ -58,6 +58,7 @@ void SaveSlots::Slot::bindSaveName(de::String newSaveName)
bool SaveSlots::Slot::isUsed() const
{
if(SV_SavePath().isEmpty()) return false;
if(!hasSaveInfo()) return false;
return SV_ExistingFile(SV_SavePath() / saveName()) && saveInfo().isLoadable();
}

Expand Down

0 comments on commit 1ecc57b

Please sign in to comment.