This involves refactoring gResearchedRideTypes and gResearchedRideEntries
and the functions involved.
Also renames some functions in order to better express what they do.
When loading a savegame, its filename gets stored as gScenarioFileName.
However, that isn't necessarily the same name as the filename of the
corresponding scenario (or any, for that matter, due to the different
file extension). This broke highscores, so for savegames we have to
take the scenario filename stored in the file.
This uses a previously unused S6 flag to save this option persistently.
This should not make S6 import much harder, but should reduce the amount of questions about S4 import.
Also refactor the checks whether the user can ask money for rides or entry. This should make it a lot easier
when our own save format comes around.
This fixes bugs when completing an RCT1 scenario, where the highscore
would be saved for the wrong park because gScenarioFileName hasn't been updated on load.
Implement 'missing objects' window
Basic implementation of 'bad objects' window
Add new object_load_error.c
Add object_load_error.c
Faffing about
String stuff
Stuff
Get window basically displaying
Proper col header for object
Display object types
Display file name and explanatory message
Probably about time I added myself to the dev list
Cleanup and comments
Make bad object window work with SC6
Fix whitespace, string IDs, flip core function sense
Fix spacing in string_ids.h
Fix string ID snafu
Fix HasNoInvalidObjects() sense
Attempt to refactor this to pass data properly
Move typedefs to separate header
Fix up signatures
Add park_load_result_types.h
Clean up includes and remnants of prev implementation
Split duplication into function, free invalid entries list on close
Use pointer for object_validity_result param
Fixup string IDs
Use LoadObject() directly
Use dependency injection, fix string termination
Xcode fix, make helper function static
Fix buffer overrun and memory leak
Use SDL for clipboard functionality
Fix function & variable declarations
Rework editor_read_s6() to use new park load result type
Update changelog for #5624
[ci skip]
Fix mem leak, function signature and whitespace
Ghost elements are notoriously a reason of network desyncs, because they
don't get transferred over network. They are meant to be local only and
disregarded by any logic, but it is not yet the case in many places.
Upon saving, we *remove* all the ghost elements (by calling
`scenario_fix_ghosts`), based on assumption they can only be caused by
local interaction. Testing has shown there are `sv6`s in the wild that
have elements marked as ghosts and this could lead to a situation where
we strip away parts of the park. This also causes network desyncs for
reason stated above.
As we strip elements with ghost flag from saves anyway, it should be
safe to assume none of our saves introduce ghosts and this issue is
limited to hacked parks only. One example of such park is [Cocopa
Bay](http://www.nedesigns.com/park/3473/cocopa-bay/).
This change removes the flag on all map elements while importing. This
is much less invasive than removing all ghost elements on importing, as
they may contain some actual data. This ~~fixes~~ hides the desync that
could be seen in the Cocopa Bay park.
As this doesn't change any in-game logic, no network version update is
necessary.
#5094