1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Remove startup checks

This commit is contained in:
Ted John
2017-07-02 19:24:13 +01:00
parent edcbfdf097
commit 1394512df6
4 changed files with 1 additions and 60 deletions

View File

@@ -181,7 +181,7 @@ namespace OpenRCT2
config_save_default();
}
if (!rct2_init_directories() || !rct2_startup_checks())
if (!rct2_init_directories())
{
return false;
}

View File

@@ -47,34 +47,4 @@ extern "C"
// OpenSSL's message digest context used for calculating sprite checksums
EVP_MD_CTX * gHashCTX = nullptr;
#endif // DISABLE_NETWORK
bool check_file_path(sint32 pathId)
{
const utf8 * path = get_file_path(pathId);
switch (pathId) {
case PATH_ID_G1:
if (!File::Exists(path))
{
Console::Error::WriteLine("Unable to find '%s'", path);
return false;
}
break;
case PATH_ID_CUSTOM1:
case PATH_ID_CUSTOM2:
if (File::Exists(path))
{
try
{
auto fs = FileStream(path, FILE_MODE_OPEN);
sint32 index = 36 + (pathId - PATH_ID_CUSTOM1);
gRideMusicInfoList[index]->length = fs.GetLength();
}
catch (const Exception &)
{
}
}
break;
}
return true;
}
}

View File

@@ -192,18 +192,6 @@ void substitute_path(char *dest, size_t size, const char *path, const char *file
safe_strcpy(dest, filename, size - written);
}
/**
*
* rct2: 0x00674B42
*/
sint32 rct2_startup_checks()
{
if (!check_file_paths())
return 0;
return 1;
}
void rct2_draw(rct_drawpixelinfo *dpi)
{
if (gIntroState != INTRO_STATE_NONE) {
@@ -275,20 +263,6 @@ static void rct2_draw_fps(rct_drawpixelinfo *dpi)
gfx_set_dirty_blocks(x - 16, y - 4, gLastDrawStringX + 16, 16);
}
/**
*
* rct2: 0x00674C95
*/
sint32 check_file_paths()
{
for (sint32 pathId = 0; pathId < PATH_ID_END; pathId++) {
if (!check_file_path(pathId)) {
return 0;
}
}
return 1;
}
/**
*
* rct2: 0x00674E6C

View File

@@ -168,11 +168,8 @@ extern char gRCT2AddressTracksPath[];
bool rct2_init();
sint32 rct2_init_directories();
sint32 rct2_startup_checks();
void substitute_path(char *dest, size_t size, const char *path, const char *filename);
sint32 check_mutex();
sint32 check_file_paths();
bool check_file_path(sint32 pathId);
sint32 check_files_integrity();
const char *get_file_path(sint32 pathId);
void rct2_quit();