diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index aae8cb2612..84ce538873 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -289,7 +289,7 @@ namespace OpenRCT2::Title { gLoadKeepWindowsOpen = true; CloseParkSpecificWindows(); - context_load_park_from_file(path); + GetContext()->LoadParkFromFile(path); } else { diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index fa081f7a2e..b0d98d5fa9 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -293,7 +293,7 @@ private: if (result == MODAL_RESULT_OK) { game_notify_map_change(); - context_load_park_from_file(path); + GetContext()->LoadParkFromFile(path); network_begin_server(gConfigNetwork.default_port, gConfigNetwork.listen_address); } } diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 81f9651c56..9eb99aec68 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -1360,11 +1360,6 @@ void context_init() GetContext()->GetUiContext()->GetWindowManager()->Init(); } -bool context_load_park_from_file(const utf8* path) -{ - return GetContext()->LoadParkFromFile(path); -} - bool context_load_park_from_stream(void* stream) { return GetContext()->LoadParkFromStream(static_cast(stream), ""); diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 5611e66962..e286d3327b 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -221,7 +221,6 @@ void context_update_map_tooltip(); void context_handle_input(); void context_input_handle_keyboard(bool isTitle); void context_quit(); -bool context_load_park_from_file(const utf8* path); bool context_load_park_from_stream(void* stream); bool ContextOpenCommonFileDialog(utf8* outFilename, OpenRCT2::Ui::FileDialogDesc& desc, size_t outSize); u8string ContextOpenCommonFileDialog(OpenRCT2::Ui::FileDialogDesc& desc); diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 1c1a1679dd..7d90c73ad0 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -140,7 +140,7 @@ namespace Editor return; } - if (!context_load_park_from_file(path)) + if (!GetContext()->LoadParkFromFile(path)) { return; } diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 439aa6e58b..764d2d680a 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -726,7 +726,7 @@ static void game_load_or_quit_no_save_prompt_callback(int32_t result, const utf8 game_notify_map_change(); game_unload_scripts(); window_close_by_class(WindowClass::EditorObjectSelection); - context_load_park_from_file(path); + GetContext()->LoadParkFromFile(path); game_load_scripts(); game_notify_map_changed(); gIsAutosaveLoaded = gIsAutosave; diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index dfb4e9c038..65a1bc2d4b 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -1517,7 +1517,7 @@ static int32_t cc_load_park([[maybe_unused]] InteractiveConsole& console, [[mayb { savePath += ".park"; } - if (context_load_park_from_file(savePath.c_str())) + if (OpenRCT2::GetContext()->LoadParkFromFile(savePath)) { console.WriteFormatLine("Park %s was loaded successfully", savePath.c_str()); }