MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetMode

Method SetMode

src/saveload/saveload.cpp:3421–3431  ·  view source on GitHub ↗

* Set the mode and file type of the file to save or load. * @param ft File type. * @param fop File operation being performed. */

Source from the content-addressed store, hash-verified

3419 * @param fop File operation being performed.
3420 */
3421void FileToSaveLoad::SetMode(const FiosType &ft, SaveLoadOperation fop)
3422{
3423 if (ft.abstract == FT_INVALID || ft.abstract == FT_NONE) {
3424 this->file_op = SLO_INVALID;
3425 this->ftype = FIOS_TYPE_INVALID;
3426 return;
3427 }
3428
3429 this->file_op = fop;
3430 this->ftype = ft;
3431}
3432
3433/**
3434 * Set the title of the file.

Callers 5

SetMethod · 0.95
openttd_mainFunction · 0.80
MakeNewGameFunction · 0.80
MakeNewEditorWorldFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected