(svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function.
This commit is contained in:
@@ -2892,6 +2892,39 @@ void GenerateDefaultSaveName(char *buf, const char *last)
|
||||
SanitizeFilename(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the mode of the file to save or load based on the type of file entry at the file system.
|
||||
* @param ft Type of file entry of the file system.
|
||||
*/
|
||||
void FileToSaveLoad::SetMode(FiosType ft)
|
||||
{
|
||||
switch (ft) {
|
||||
case FIOS_TYPE_FILE:
|
||||
case FIOS_TYPE_SCENARIO:
|
||||
this->mode = SL_LOAD;
|
||||
break;
|
||||
|
||||
case FIOS_TYPE_OLDFILE:
|
||||
case FIOS_TYPE_OLD_SCENARIO:
|
||||
this->mode = SL_OLD_LOAD;
|
||||
break;
|
||||
|
||||
#ifdef WITH_PNG
|
||||
case FIOS_TYPE_PNG:
|
||||
this->mode = SL_PNG;
|
||||
break;
|
||||
#endif /* WITH_PNG */
|
||||
|
||||
case FIOS_TYPE_BMP:
|
||||
this->mode = SL_BMP;
|
||||
break;
|
||||
|
||||
default:
|
||||
this->mode = SL_INVALID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* Function to get the type of the savegame by looking at the file header.
|
||||
|
Reference in New Issue
Block a user