mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 15:30:00 +00:00
(svn r21895) -Cleanup: get rid of the unused SLD_NEW_GAME
This commit is contained in:
parent
7eadf07e44
commit
d74fc0bee3
@ -279,7 +279,7 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
|
|||||||
_fios_items.Clear();
|
_fios_items.Clear();
|
||||||
|
|
||||||
/* A parent directory link exists if we are not in the root directory */
|
/* A parent directory link exists if we are not in the root directory */
|
||||||
if (!FiosIsRoot(_fios_path) && mode != SLD_NEW_GAME) {
|
if (!FiosIsRoot(_fios_path)) {
|
||||||
fios = _fios_items.Append();
|
fios = _fios_items.Append();
|
||||||
fios->type = FIOS_TYPE_PARENT;
|
fios->type = FIOS_TYPE_PARENT;
|
||||||
fios->mtime = 0;
|
fios->mtime = 0;
|
||||||
@ -288,7 +288,7 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Show subdirectories */
|
/* Show subdirectories */
|
||||||
if (mode != SLD_NEW_GAME && (dir = ttd_opendir(_fios_path)) != NULL) {
|
if ((dir = ttd_opendir(_fios_path)) != NULL) {
|
||||||
while ((dirent = readdir(dir)) != NULL) {
|
while ((dirent = readdir(dir)) != NULL) {
|
||||||
strecpy(d_name, FS2OTTD(dirent->d_name), lastof(d_name));
|
strecpy(d_name, FS2OTTD(dirent->d_name), lastof(d_name));
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
|
|||||||
QSortT(_fios_items.Get(sort_start), _fios_items.Length() - sort_start, CompareFiosItems);
|
QSortT(_fios_items.Get(sort_start), _fios_items.Length() - sort_start, CompareFiosItems);
|
||||||
|
|
||||||
/* Show drives */
|
/* Show drives */
|
||||||
if (mode != SLD_NEW_GAME) FiosGetDrives();
|
FiosGetDrives();
|
||||||
|
|
||||||
_fios_items.Compact();
|
_fios_items.Compact();
|
||||||
}
|
}
|
||||||
@ -433,7 +433,7 @@ static FiosType FiosGetScenarioListCallback(SaveLoadDialogMode mode, const char
|
|||||||
return FIOS_TYPE_SCENARIO;
|
return FIOS_TYPE_SCENARIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO || mode == SLD_NEW_GAME) {
|
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
|
||||||
if (strcasecmp(ext, ".sv0") == 0 || strcasecmp(ext, ".ss0") == 0 ) {
|
if (strcasecmp(ext, ".sv0") == 0 || strcasecmp(ext, ".ss0") == 0 ) {
|
||||||
GetOldSaveGameName(file, title, last);
|
GetOldSaveGameName(file, title, last);
|
||||||
return FIOS_TYPE_OLD_SCENARIO;
|
return FIOS_TYPE_OLD_SCENARIO;
|
||||||
|
@ -98,7 +98,6 @@ enum SaveLoadDialogMode {
|
|||||||
SLD_SAVE_GAME,
|
SLD_SAVE_GAME,
|
||||||
SLD_SAVE_SCENARIO,
|
SLD_SAVE_SCENARIO,
|
||||||
SLD_LOAD_HEIGHTMAP,
|
SLD_LOAD_HEIGHTMAP,
|
||||||
SLD_NEW_GAME,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The different types of files been handled by the system */
|
/* The different types of files been handled by the system */
|
||||||
|
@ -203,7 +203,6 @@ void BuildFileList()
|
|||||||
FiosFreeSavegameList();
|
FiosFreeSavegameList();
|
||||||
|
|
||||||
switch (_saveload_mode) {
|
switch (_saveload_mode) {
|
||||||
case SLD_NEW_GAME:
|
|
||||||
case SLD_LOAD_SCENARIO:
|
case SLD_LOAD_SCENARIO:
|
||||||
case SLD_SAVE_SCENARIO:
|
case SLD_SAVE_SCENARIO:
|
||||||
FiosGetScenarioList(_saveload_mode); break;
|
FiosGetScenarioList(_saveload_mode); break;
|
||||||
@ -716,7 +715,6 @@ static const FileType _file_modetotype[] = {
|
|||||||
FT_SAVEGAME, ///< used for SLD_SAVE_GAME
|
FT_SAVEGAME, ///< used for SLD_SAVE_GAME
|
||||||
FT_SCENARIO, ///< used for SLD_SAVE_SCENARIO
|
FT_SCENARIO, ///< used for SLD_SAVE_SCENARIO
|
||||||
FT_HEIGHTMAP, ///< used for SLD_LOAD_HEIGHTMAP
|
FT_HEIGHTMAP, ///< used for SLD_LOAD_HEIGHTMAP
|
||||||
FT_SAVEGAME, ///< SLD_NEW_GAME
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void ShowSaveLoadDialog(SaveLoadDialogMode mode)
|
void ShowSaveLoadDialog(SaveLoadDialogMode mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user