Replace occurrences of OpenRCT with OpenRCT2 (#11898)

This commit is contained in:
Michael Steenbeek 2020-06-08 15:11:07 +02:00 committed by GitHub
parent 22d099d6bd
commit e83b86df4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 44 additions and 43 deletions

View File

@ -13,6 +13,7 @@
- Change: [#11209] Warn when user is running OpenRCT2 through Wine.
- Change: [#11358] Switch copy and paste button positions in tile inspector.
- Change: [#11449] Remove complete circuit requirement from Air Powered Vertical Coaster (for RCT1 parity).
- Change: [#11898] The `openrct-data-path` command-line argument has been renamed to `openrct2-data-path`.
- Fix: [#1013] Negative length displayed in Ride window.
- Fix: [#1148] Research funding dropdown not shown in finances window.
- Fix: [#5451] Guests scream on every descent, no matter how small.

View File

@ -86,7 +86,7 @@ spritefile idx output
spritefile output_directory
.Sh OPTIONS
.Bl -tag -width "-openrct-data-path path "
.Bl -tag -width "-openrct2-data-path path "
.It Fl h | -help
Print a summary of all options to stdout and exit.
@ -122,7 +122,7 @@ Password needed to join the server.
Path to the user data directory (containing
.Pa config.ini )
.It Fl -openrct-data-path Ar path
.It Fl -openrct2-data-path Ar path
Path to the OpenRCT2 data directory (containing
.Pa languages )

View File

@ -30,19 +30,19 @@ pushd build
if [[ $TARGET == "docker64" ]]
then
# CMAKE and MAKE opts from environment
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:64bit-only bash -c "export PATH=/usr/lib/ccache/bin:\$PATH LD_PRELOAD=/usr/lib/libSegFault.so && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja all install $OPENRCT_MAKE_OPTS && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && ./openrct2-cli scan-objects && ctest --output-on-failure && cd .. && bash <(curl -s https://codecov.io/bash) 2>\&1 | grep -v \"has arcs\""
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:64bit-only bash -c "export PATH=/usr/lib/ccache/bin:\$PATH LD_PRELOAD=/usr/lib/libSegFault.so && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja all install $OPENRCT2_MAKE_OPTS && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && ./openrct2-cli scan-objects && ctest --output-on-failure && cd .. && bash <(curl -s https://codecov.io/bash) 2>\&1 | grep -v \"has arcs\""
elif [[ $TARGET == "ubuntu_i686" ]]
then
# CMAKE and MAKE opts from environment
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "export PATH=/usr/lib/ccache:\$PATH && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja all testpaint install $OPENRCT_MAKE_OPTS && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ./openrct2-cli scan-objects && LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ctest --output-on-failure && ( LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi ) && cd .. && bash <(curl -s https://codecov.io/bash)"
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "export PATH=/usr/lib/ccache:\$PATH && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja all testpaint install $OPENRCT2_MAKE_OPTS && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ./openrct2-cli scan-objects && LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ctest --output-on-failure && ( LD_PRELOAD=/lib/i386-linux-gnu/libSegFault.so ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi ) && cd .. && bash <(curl -s https://codecov.io/bash)"
elif [[ $TARGET == "ubuntu_amd64" ]]
then
# CMAKE and MAKE opts from environment
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "export PATH=/usr/lib/ccache:\$PATH LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT_MAKE_OPTS install && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && ./openrct2-cli scan-objects && ctest --output-on-failure && cd .. && bash <(curl -s https://codecov.io/bash)"
docker run $ci_env -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "export PATH=/usr/lib/ccache:\$PATH LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so && ccache --show-stats > ccache_before && cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT2_MAKE_OPTS install && ccache --show-stats > ccache_after && ( diff -U100 ccache_before ccache_after || true ) && ./openrct2-cli scan-objects && ctest --output-on-failure && cd .. && bash <(curl -s https://codecov.io/bash)"
elif [[ $TARGET == "windows" ]]
then
# CMAKE and MAKE opts from environment
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:mingw-arch bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT_MAKE_OPTS"
docker run -v "$PARENT":"$PARENT" -w "$PARENT"/build -i -t openrct2/openrct2:mingw-arch bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && ninja $OPENRCT2_MAKE_OPTS"
else
echo "Unkown target $TARGET"
exit 1

View File

@ -1436,7 +1436,7 @@ void platform_get_user_directory(utf8* outPath, const utf8* subDirectory, size_t
* This function is deprecated.
* Use IPlatformEnvironment instead.
*/
void platform_get_openrct_data_path(utf8* outPath, size_t outSize)
void platform_get_openrct2_data_path(utf8* outPath, size_t outSize)
{
auto env = GetContext()->GetPlatformEnvironment();
auto path = env->GetDirectoryPath(DIRBASE::OPENRCT2);

View File

@ -13,7 +13,7 @@ int32_t gOpenRCT2StartupAction = STARTUP_ACTION_TITLE;
utf8 gOpenRCT2StartupActionPath[512] = { 0 };
utf8 gExePath[MAX_PATH];
utf8 gCustomUserDataPath[MAX_PATH] = { 0 };
utf8 gCustomOpenrctDataPath[MAX_PATH] = { 0 };
utf8 gCustomOpenRCT2DataPath[MAX_PATH] = { 0 };
utf8 gCustomRCT1DataPath[MAX_PATH] = { 0 };
utf8 gCustomRCT2DataPath[MAX_PATH] = { 0 };
utf8 gCustomPassword[MAX_PATH] = { 0 };

View File

@ -38,7 +38,7 @@ extern int32_t gOpenRCT2StartupAction;
extern utf8 gOpenRCT2StartupActionPath[512];
extern utf8 gExePath[MAX_PATH];
extern utf8 gCustomUserDataPath[MAX_PATH];
extern utf8 gCustomOpenrctDataPath[MAX_PATH];
extern utf8 gCustomOpenRCT2DataPath[MAX_PATH];
extern utf8 gCustomRCT1DataPath[MAX_PATH];
extern utf8 gCustomRCT2DataPath[MAX_PATH];
extern utf8 gCustomPassword[MAX_PATH];

View File

@ -142,9 +142,9 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
{
basePaths[static_cast<size_t>(DIRBASE::RCT2)] = gCustomRCT2DataPath;
}
if (!String::IsNullOrEmpty(gCustomOpenrctDataPath))
if (!String::IsNullOrEmpty(gCustomOpenRCT2DataPath))
{
basePaths[static_cast<size_t>(DIRBASE::OPENRCT2)] = gCustomOpenrctDataPath;
basePaths[static_cast<size_t>(DIRBASE::OPENRCT2)] = gCustomOpenRCT2DataPath;
}
if (!String::IsNullOrEmpty(gCustomUserDataPath))
{

View File

@ -54,7 +54,7 @@ static bool _verbose = false;
static bool _headless = false;
static utf8* _password = nullptr;
static utf8* _userDataPath = nullptr;
static utf8* _openrctDataPath = nullptr;
static utf8* _openrct2DataPath = nullptr;
static utf8* _rct1DataPath = nullptr;
static utf8* _rct2DataPath = nullptr;
static bool _silentBreakpad = false;
@ -62,22 +62,22 @@ static bool _silentBreakpad = false;
// clang-format off
static constexpr const CommandLineOptionDefinition StandardOptions[]
{
{ CMDLINE_TYPE_SWITCH, &_help, 'h', "help", "show this help message and exit" },
{ CMDLINE_TYPE_SWITCH, &_version, 'v', "version", "show version information and exit" },
{ CMDLINE_TYPE_SWITCH, &_noInstall, 'n', "no-install", "do not install scenario if passed" },
{ CMDLINE_TYPE_SWITCH, &_all, 'a', "all", "show help for all commands" },
{ CMDLINE_TYPE_SWITCH, &_about, NAC, "about", "show information about " OPENRCT2_NAME },
{ CMDLINE_TYPE_SWITCH, &_verbose, NAC, "verbose", "log verbose messages" },
{ CMDLINE_TYPE_SWITCH, &_headless, NAC, "headless", "run " OPENRCT2_NAME " headless" IMPLIES_SILENT_BREAKPAD },
#ifndef DISABLE_NETWORK
{ CMDLINE_TYPE_INTEGER, &_port, NAC, "port", "port to use for hosting or joining a server" },
{ CMDLINE_TYPE_STRING, &_address, NAC, "address", "address to listen on when hosting a server" },
#endif
{ CMDLINE_TYPE_STRING, &_password, NAC, "password", "password needed to join the server" },
{ CMDLINE_TYPE_STRING, &_userDataPath, NAC, "user-data-path", "path to the user data directory (containing config.ini)" },
{ CMDLINE_TYPE_STRING, &_openrctDataPath, NAC, "openrct-data-path", "path to the OpenRCT2 data directory (containing languages)" },
{ CMDLINE_TYPE_STRING, &_rct1DataPath, NAC, "rct1-data-path", "path to the RollerCoaster Tycoon 1 data directory (containing data/csg1.dat)" },
{ CMDLINE_TYPE_STRING, &_rct2DataPath, NAC, "rct2-data-path", "path to the RollerCoaster Tycoon 2 data directory (containing data/g1.dat)" },
{ CMDLINE_TYPE_SWITCH, &_help, 'h', "help", "show this help message and exit" },
{ CMDLINE_TYPE_SWITCH, &_version, 'v', "version", "show version information and exit" },
{ CMDLINE_TYPE_SWITCH, &_noInstall, 'n', "no-install", "do not install scenario if passed" },
{ CMDLINE_TYPE_SWITCH, &_all, 'a', "all", "show help for all commands" },
{ CMDLINE_TYPE_SWITCH, &_about, NAC, "about", "show information about " OPENRCT2_NAME },
{ CMDLINE_TYPE_SWITCH, &_verbose, NAC, "verbose", "log verbose messages" },
{ CMDLINE_TYPE_SWITCH, &_headless, NAC, "headless", "run " OPENRCT2_NAME " headless" IMPLIES_SILENT_BREAKPAD },
#ifndef DISABLE_NETWORK
{ CMDLINE_TYPE_INTEGER, &_port, NAC, "port", "port to use for hosting or joining a server" },
{ CMDLINE_TYPE_STRING, &_address, NAC, "address", "address to listen on when hosting a server" },
#endif
{ CMDLINE_TYPE_STRING, &_password, NAC, "password", "password needed to join the server" },
{ CMDLINE_TYPE_STRING, &_userDataPath, NAC, "user-data-path", "path to the user data directory (containing config.ini)" },
{ CMDLINE_TYPE_STRING, &_openrct2DataPath, NAC, "openrct2-data-path", "path to the OpenRCT2 data directory (containing languages)" },
{ CMDLINE_TYPE_STRING, &_rct1DataPath, NAC, "rct1-data-path", "path to the RollerCoaster Tycoon 1 data directory (containing data/csg1.dat)" },
{ CMDLINE_TYPE_STRING, &_rct2DataPath, NAC, "rct2-data-path", "path to the RollerCoaster Tycoon 2 data directory (containing data/g1.dat)" },
#ifdef USE_BREAKPAD
{ CMDLINE_TYPE_SWITCH, &_silentBreakpad, NAC, "silent-breakpad", "make breakpad crash reporting silent" },
#endif // USE_BREAKPAD
@ -204,12 +204,12 @@ exitcode_t CommandLine::HandleCommandDefault()
Memory::Free(_userDataPath);
}
if (_openrctDataPath != nullptr)
if (_openrct2DataPath != nullptr)
{
utf8 absolutePath[MAX_PATH]{};
Path::GetAbsolute(absolutePath, std::size(absolutePath), _openrctDataPath);
String::Set(gCustomOpenrctDataPath, std::size(gCustomOpenrctDataPath), absolutePath);
Memory::Free(_openrctDataPath);
Path::GetAbsolute(absolutePath, std::size(absolutePath), _openrct2DataPath);
String::Set(gCustomOpenRCT2DataPath, std::size(gCustomOpenRCT2DataPath), absolutePath);
Memory::Free(_openrct2DataPath);
}
if (_rct1DataPath != nullptr)

View File

@ -264,7 +264,7 @@ bool gfx_load_g2()
char path[MAX_PATH];
platform_get_openrct_data_path(path, sizeof(path));
platform_get_openrct2_data_path(path, sizeof(path));
safe_strcat_path(path, "g2.dat", MAX_PATH);
try
{

View File

@ -36,7 +36,7 @@ enum
DATE_FORMAT_YEAR_DAY_MONTH
};
struct openrct_timeofday
struct openrct2_timeofday
{
uint8_t second;
uint8_t minute;
@ -50,7 +50,7 @@ extern const rct_string_id DateFormatStringFormatIds[];
extern uint16_t gDateMonthTicks;
extern uint16_t gDateMonthsElapsed;
extern openrct_timeofday gRealTimeOfDay;
extern openrct2_timeofday gRealTimeOfDay;
int32_t date_get_month(int32_t months);
int32_t date_get_year(int32_t months);

View File

@ -36,7 +36,7 @@ const rct_string_id DateFormatStringFormatIds[] = {
};
// clang-format on
openrct_timeofday gRealTimeOfDay;
openrct2_timeofday gRealTimeOfDay;
int32_t date_get_month(int32_t months)
{

View File

@ -81,7 +81,7 @@ namespace Platform
std::string GetInstallPath()
{
// 1. Try command line argument
auto path = std::string(gCustomOpenrctDataPath);
auto path = std::string(gCustomOpenRCT2DataPath);
if (!path.empty())
{
return Path::GetAbsolute(path);

View File

@ -145,7 +145,7 @@ namespace Platform
std::string GetInstallPath()
{
auto path = std::string(gCustomOpenrctDataPath);
auto path = std::string(gCustomOpenRCT2DataPath);
if (!path.empty())
{
path = Path::GetAbsolute(path);

View File

@ -66,7 +66,7 @@ namespace Platform
std::string GetInstallPath()
{
auto path = std::string(gCustomOpenrctDataPath);
auto path = std::string(gCustomOpenRCT2DataPath);
if (!path.empty())
{
path = Path::GetAbsolute(path);

View File

@ -139,7 +139,7 @@ uint8_t platform_get_locale_measurement_format()
void platform_get_changelog_path(utf8* outPath, size_t outSize)
{
platform_get_openrct_data_path(outPath, outSize);
platform_get_openrct2_data_path(outPath, outSize);
safe_strcat_path(outPath, "changelog.txt", outSize);
}

View File

@ -110,7 +110,7 @@ bool platform_file_move(const utf8* srcPath, const utf8* dstPath);
bool platform_file_delete(const utf8* path);
uint32_t platform_get_ticks();
void platform_sleep(uint32_t ms);
void platform_get_openrct_data_path(utf8* outPath, size_t outSize);
void platform_get_openrct2_data_path(utf8* outPath, size_t outSize);
void platform_get_user_directory(utf8* outPath, const utf8* subDirectory, size_t outSize);
std::string platform_get_username();
bool platform_open_common_file_dialog(utf8* outFilename, file_dialog_desc* desc, size_t outSize);
@ -156,7 +156,7 @@ void platform_remove_file_associations();
bool platform_setup_uri_protocol();
// This function cannot be marked as 'static', even though it may seem to be,
// as it requires external linkage, which 'static' prevents
__declspec(dllexport) int32_t StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int32_t nCmdShow);
__declspec(dllexport) int32_t StartOpenRCT2(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int32_t nCmdShow);
#endif // _WIN32
#ifdef __ANDROID__

View File

@ -273,7 +273,7 @@ BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
return TRUE;
}
__declspec(dllexport) int StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
__declspec(dllexport) int StartOpenRCT2(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
if (_dllModule == nullptr)
{