This commit fixes this bug by adding a missing ^ operator on frameNum.
Before a recent refactor, the framenum was changed to the mirrored one
with "^ 1", but it was omitted. Using "^ col" when col is 0 or 1, adds
this back.
* Move over max rides to limits file
* Move max stations to limits file
* Move over max inversions, golf holes, helices, custhistsize
* Move over max trains per ride
* Bring over Max cars per train and max circuits per ride
* Port over NumColourSchemes and max vehicle colours
* Fix compilation
* Move over max awards
* Move over max peep spawns and park entrances
* Fix rebase issues
* Remove future work
* Switch style
* Update copyright
This move is to fix an issue where ride_select_backwards_from_front() or
ride_select_forwards_from_back() can change _currentTrackPieceDirection
and cause currentDirection to be wrong, causing an error when trying to
delete the element.
The function did not truncate the string afterwards, so you ended up with a very long string containing null terminators on the end. This wouldn't have caused an issue when passing it as a char *, but due to it now being passed as string or string_view, this causes issues.
It also wouldn't have worked for paths greater than MAX_PATH, because it wasn't passing the buffer size to the function.
* Rename OptionsWindow tab constants for clarity
The new WIDX_FIRST_TAB constant can be used by code that just wants the
first tab without worrying about which it is.
* Remove use of this-> in OptionsWindow
* Replace widget_invalidate with InvalidateWidget
* WidgetSetCheckboxValue -> SetCheckboxValue
* Move repeated per-tab code into common methods
Previously, each FooPrepareDraw() method would call
CommonPrepareDrawBefore() at the start, and CommonPrepareDrawAfter() at
the end. Let's reduce this duplication by having OnPrepareDraw() call
these instead. :^)
The same goes for a few other repeated code snippets.
* Use WindowFocusOrCreate for OptionsWindow
* Fix#16504: Display RCT1-path tooltip
When the OptionsWindow was first refactored into a Window class, the
AdvancedTooltip() method was created but never called. Hooking it up
fixes the crash and makes the path tooltip appear again. :^)
* Make MAIN_OPTIONS_ENABLED_WIDGETS a constexpr
* Move OptionsWindow constants into the class
* WindowInitScrollWidgets() -> InitScrollWidgets()