mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
Replace context_load_park_from_file() with object equivalent
This commit is contained in:
@@ -289,7 +289,7 @@ namespace OpenRCT2::Title
|
||||
{
|
||||
gLoadKeepWindowsOpen = true;
|
||||
CloseParkSpecificWindows();
|
||||
context_load_park_from_file(path);
|
||||
GetContext()->LoadParkFromFile(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<IStream*>(stream), "");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace Editor
|
||||
return;
|
||||
}
|
||||
|
||||
if (!context_load_park_from_file(path))
|
||||
if (!GetContext()->LoadParkFromFile(path))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user