1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

ensure scenario path is set when loading a saved game

This commit is contained in:
IntelOrca
2015-02-22 18:24:19 +00:00
parent 6a2382d6ee
commit 7fbcc3598d
3 changed files with 9 additions and 0 deletions

View File

@@ -694,6 +694,8 @@ int game_load_save(const char *path)
load_palette();
gfx_invalidate_screen();
scenario_set_filename((char*)0x0135936C);
return 1;
}

View File

@@ -358,6 +358,12 @@ void scenario_end()
window_park_objective_open();
}
void scenario_set_filename(const char *value)
{
subsitute_path(_scenarioPath, RCT2_ADDRESS(RCT2_ADDRESS_SCENARIOS_PATH, char), value);
_scenarioFileName = path_get_filename(_scenarioPath);
}
/**
*
* rct2: 0x0066A752

View File

@@ -407,6 +407,7 @@ void scenario_update();
unsigned int scenario_rand();
int scenario_prepare_for_save();
int scenario_save(char *path, int flags);
void scenario_set_filename(const char *value);
void scenario_failure();
void scenario_success();
void scenario_success_submit_name(const char *name);