mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2023-12-30 21:52:56 +00:00
parent
f561cadf63
commit
3be26282b3
@ -145,14 +145,13 @@ void pb::SelectDatFile(const std::vector<const char*>& dataSearchPaths)
|
|||||||
}
|
}
|
||||||
for (auto path : dataSearchPaths)
|
for (auto path : dataSearchPaths)
|
||||||
{
|
{
|
||||||
if (!DatFileName.empty() || !path)
|
if (!path)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BasePath = path;
|
BasePath = path;
|
||||||
for (const auto& datFileName : datFileNames)
|
for (const auto& datFileName : datFileNames)
|
||||||
{
|
{
|
||||||
auto fileName = datFileName;
|
auto fileName = datFileName;
|
||||||
auto found = false;
|
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
@ -164,19 +163,15 @@ void pb::SelectDatFile(const std::vector<const char*>& dataSearchPaths)
|
|||||||
if (datFile)
|
if (datFile)
|
||||||
{
|
{
|
||||||
fclose(datFile);
|
fclose(datFile);
|
||||||
DatFileName = datFileName;
|
DatFileName = fileName;
|
||||||
if (datFileName == "CADET.DAT")
|
if (datFileName == "CADET.DAT")
|
||||||
FullTiltMode = true;
|
FullTiltMode = true;
|
||||||
if (datFileName == "DEMO.DAT")
|
if (datFileName == "DEMO.DAT")
|
||||||
FullTiltDemoMode = FullTiltMode = true;
|
FullTiltDemoMode = FullTiltMode = true;
|
||||||
printf("Loading game from: %s\n", datFilePath.c_str());
|
printf("Loading game from: %s\n", datFilePath.c_str());
|
||||||
found = true;
|
return;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user