Commit Graph

3386 Commits

Author SHA1 Message Date
Hielke Morsink 90ab449f78
Fix #16050: Scenery window positioning
This supersedes #16095

The position and size arguments of WindowCreate are now optional - not a window doesn't have to know the size beforehand.
This removes the WF_NO_SCROLLING flag from the call to WindowCreate, but that seems to have no use for the scenery window anyway.

Co-authored-by: Ian-Polito <ipolito@mailfence.com>
2022-04-09 00:49:44 +02:00
Duncan 5760f11349
Simplify Track Cost calcs (#16940)
* Multiply out 5 in track cost calcs and use _GBP

* Fix typo on Hypercoaster conversion

* Use two decimals for literals converted by _GBP

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-04-07 11:35:11 +01:00
Michael Steenbeek 765bc59acd
Merge pull request #14207 from geoff-B/money32-UDL
#14093 User defined literals for Money32
2022-04-06 15:29:26 +02:00
Hielke Morsink 62abb1a5e0
Merge pull request #16924 2022-04-06 09:40:26 +02:00
Hielke Morsink b66d15659f
Remove the new cheat that disable queue length limits
This partially reverts commit 0ece5d0f44.
2022-04-05 19:55:44 +02:00
Ryan 42dc53cfd5 Remove unused call to Init 2022-04-04 12:53:50 -04:00
Ryan a8eb6f21a2 Fix scenery window colors defaulting to black 2022-04-04 01:02:48 -04:00
Ted John e2170a995f
Fix setPixelData for RAW image format (#16918) 2022-04-02 20:24:01 +02:00
Charles Machalow 0ece5d0f44
Add a new cheat to disable queue length limits 2022-04-02 20:07:06 +02:00
Geoff Banh 85baa6f7ca Fix #14093: Replace MONEY macro with user defined literal 2022-03-29 07:23:35 -03:00
spacek531 047a7f8090
Do not turn off chain when building downhill if chain cheat is on 2022-03-28 20:34:37 +00:00
X123M3-256 f5507c42e0
Add RIDE_TYPE_FLAG_UP_INCLINE_REQUIRES_LIFT 2022-03-28 21:32:42 +02:00
Michael Steenbeek 07f66f2322
Merge pull request #16872 from IntelOrca/plugin/image-apis
[Plugin] Add support for custom images
2022-03-28 20:27:10 +02:00
Silent 660b03f00b
Fix assertion in InitialiseListItems 2022-03-27 22:33:57 +02:00
Ted John 273fe52e74 Fix formatting 2022-03-24 23:34:57 +00:00
Ted John 6863fb1ecb Return undefined instead of null 2022-03-24 23:33:07 +00:00
Ted John 818dcacb31 Add draw to image API 2022-03-24 22:37:22 +00:00
Ted John e3a1733cdd Implement plugin ownership of images 2022-03-24 22:37:22 +00:00
Ted John a977bbaebe Implement loading .png and refactor 2022-03-24 22:37:22 +00:00
Ted John e74396b464 Refactor and implement RLE custom images 2022-03-24 22:37:22 +00:00
Ted John 8f30ed910f Start working on custom image APIs 2022-03-24 22:37:21 +00:00
Gymnasiast 1c851f022c Show SDL error message if no context was created 2022-03-23 23:44:50 -03:00
Evan Haataja 3127a4dc64 Allow game to run with GUI while without audio. 2022-03-23 23:44:50 -03:00
Tulio Leao fbeff35aec Split SDLException into source and header 2022-03-23 23:44:49 -03:00
Duncan 472f7f55c5
Remove hard cap of 0x80 scenery items in a group (#16853)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-03-22 21:38:54 -03:00
Duncan c5b5b95bcd
Show better errors when loading scenery groups (#16854) 2022-03-22 21:01:52 -03:00
Ted John a2f7ffcb71
Merge pull request #16707 from IntelOrca/plugin/intransient-2
Add initial functionality for intransient plugins. Intransient plugins are a new type of plugin that will start when OpenRCT2 launches, and remain loaded until shutdown. This provides plugins with the ability to hook map change and provide functionality on other screens such as the title menu.

**Example:**
```js
registerPlugin({
    type: 'intransient',
   ...
});
```

The [title sequence editor](https://github.com/OpenRCT2/title-sequence-editor) will be an intransient plugin so that it can be used from the title screen like the built in one.

Three new APIs have been introduced alongside this.
* `context.mode`
* `context.subscribe('map.change', callback)`
* `context.subscribe('map.changed', callback)`
* `ui.registerToolboxMenuItem(text, callback)`
2022-03-22 21:48:26 +00:00
Duncan ba8690d970
Move *10 on removal/price to the object load function (#16846)
This simplifies the code and ensures that money32/16 is at the same base for all users of these objects
2022-03-22 21:35:44 +00:00
Ted John 9f96b0df33 Separate map.change and map.changed events
Also fix network plugin logic.
2022-03-21 23:09:40 +00:00
Ted John 8f34029e89 Re-create windows if loading park on title screen 2022-03-21 21:42:30 +00:00
Ted John af340cbf34 Add API for toolbox menu items 2022-03-21 21:42:30 +00:00
Ted John 84fdd44e6a Add map changed hook 2022-03-21 21:42:30 +00:00
Ted John 91ceecc6fc
Change ternary to tertiary for plugins (#16833) 2022-03-21 21:42:10 +00:00
Michael Steenbeek 18be90f8b6
Split TRACK_SLOPE_STEEP into flags for up and down 2022-03-21 21:05:59 +01:00
Ted John fc2ed95641
Merge pull request #16831 from IntelOrca/feature/ternary-scenery-colours
Implement tertiary colours for small and large scenery objects.
2022-03-20 19:24:47 +00:00
Ted John 793acf67ae Implement small scenery ternary colours 2022-03-20 18:53:11 +00:00
Michael Steenbeek e78c29ea5c
Fix most occurrences of ‘ternary’ (#16832) 2022-03-20 19:22:05 +01:00
Ted John e9e377ac09 Implement large scenery ternary colours 2022-03-20 18:12:39 +00:00
Ted John f909be7a43
Merge pull request #16797 from IntelOrca/feature/enhanced-transparency
Introduce more transparency toggles and allow each one to be set to either an invisible or ghost state which is a persisted user setting.

A new window is introduced to control these settings and is inspired by OpenTTD.
2022-03-20 17:56:08 +00:00
Adam ea435f9361
chore: update macOS dependencies, remove workaround (#16826) 2022-03-20 09:02:46 -03:00
Michał Janiszewski 37a0a0cb18
Use std::stol over C strtol on ClearScenery.cpp (#15549)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-03-20 09:01:09 -03:00
Ted John 884ef6b8ac Change transparent trees to all vegetation 2022-03-19 00:07:06 +00:00
Gymnasiast ffe8b4b45d
Undo fspath() workaround for Android 2022-03-18 23:21:23 +01:00
Tulio Leao 397bc51e68 Rename _sdlfsFlags to _sdlFullscreenFlags 2022-03-18 00:38:26 -03:00
duncanspumpkin f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Ted John 81a123220b Update images for transparency window 2022-03-17 22:52:25 +00:00
Silent 771637f24c
Refactor filename_valid_characters into Platform::IsFilenameValid 2022-03-16 21:56:54 +01:00
Ted John 46873dfc7f Fix build failures 2022-03-14 23:43:50 +00:00
Ted John fea101289c Save invisible flags to config 2022-03-14 21:57:05 +00:00
Ted John 52e5d48501 Update shortcuts and toolbar menu 2022-03-14 21:57:05 +00:00
Ted John 61f1e13c0b Refactor viewport flags 2022-03-14 21:57:05 +00:00
Ted John c68359662d Refactor visibility control 2022-03-14 21:57:05 +00:00
Ted John ba2fea88fd Fix build failure 2022-03-14 21:55:07 +00:00
Kane b83e21a953 Improve code readability (added parentheses) 2022-03-14 21:43:12 +00:00
Kane 20cd8465f5 Code cleanup, remove ignore_invisible_flag.
Known issues:
- Some flat-rides have transparency issues
2022-03-14 21:43:12 +00:00
Kane 5d7f7485aa Update for rebase, add window theme, fix bugs
- Along with rebasing the code it became nessecary to update various
  calls to `scenery_small_entry_has_flag` and `EntityBase`.

- Added a new window theme with default colours.

- Fixed bug with see-through supports not working.

- Removed incomplete "ride exclusions" tab

- Removed unused text string (Ride Exclusions)
2022-03-14 21:43:09 +00:00
Kane 3d3271a5ec Misc. clean ups
Define see-through paint colours in Paint.h for global use
Color staff sprite button
Change ride->is_visible bool to ignore_invisible_flag bool
Add shortcut to open transparency options (CTRL+T)
2022-03-14 21:41:49 +00:00
Kane 9bf003c018 Add new sprites 2022-03-14 21:40:30 +00:00
Kane 564dee2671 Remove unused variables 2022-03-14 21:40:30 +00:00
Kane 2e93e42a71 More finishing touches
- Changes all references of `VIEWPORT_FLAG_INVISIBLE_PEEPS` to `VIEWPORT_FLAG_INVISIBLE_GUESTS` and `VIEWPORT_FLAG_INVISIBLE_STAFF`
- Updates Invisible People menu item and shortcut.
- Added new viewport flags into the `viewport_set_visibility` function
- Invisible options only work if see-through is activated as well
- Added see-through supports

- Regression: Exclude ride from invisible no longer works (ride is still see-through)
2022-03-14 21:40:27 +00:00
Kane 503a351422 Start to implement ride selection list 2022-03-14 21:39:45 +00:00
Kane e134be9538 Implement more options
- Invisible guests
- Invisible staff
- See-through trees
- Invisible trees
- Strings/Ids
2022-03-14 21:38:46 +00:00
Kane 204f8ceac1 Add new Transparency options window.
Remove added options from Top Toolbar.
Move invisible ride code into ride paint functions.
Move invisible vehicle code into sprite paint function.
2022-03-14 21:37:41 +00:00
Kane 4856c3adaf Implement invisible rides, paths & scenery 2022-03-14 21:37:18 +00:00
Kane 9f78c6f0ce Add option to see-through vehicles 2022-03-14 21:36:47 +00:00
Ted John 5334b8f5c8 Do not re-create window when switching staff 2022-03-13 14:26:17 +00:00
Ted John 38d36acef3 Add patrol area tool window 2022-03-12 10:43:41 +00:00
Ted John 90718ca81c Refactor patrol area class to new file 2022-03-11 18:39:04 +00:00
Ivan Krushkov eb423a73b7
Close #12793: Excitement/Intensity/Nausea ratings to Ride List view with sorting (#16655) 2022-03-11 11:17:14 +00:00
Silent 5e725913f8
Close #16566: Favour WinNT preprocessor version checks over MinGW (#16677) 2022-03-11 07:59:09 -03:00
Silent 3773fa4cb0
Refactor uses of path_append_extension 2022-03-10 20:18:17 +01:00
Michael Steenbeek 0f2cf23318
Safely look up widget for drawing 2022-03-10 01:01:59 +01:00
Teodor Sorescu 354f8bf506
Refactor window to class: TrackDesignPlace (#16669)
* Refactor window to class: TrackDesignPlace (#13811)

* Standardise names

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-03-05 15:26:25 +00:00
Duncan d219a99b56
Convert scenery window to class (#16729)
* Convert scenery window to class

Close #13799

* Move static's into class

* Simplify eyedropper setting code
2022-03-04 07:17:20 +00:00
Michael Steenbeek 323138ebd6
Use C++ strings in WindowNewRideListVehiclesFor() 2022-03-03 19:32:34 +00:00
Michael Steenbeek c334c7a176
Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename
Remove four old path functions
2022-03-02 22:25:08 +01:00
Michael Steenbeek 61a18e7d90
Merge pull request #16733 from Broxzier/refactor/use-u8-strings
Use utf8 strings where expected
2022-03-02 22:13:13 +01:00
Rik Smeets d92f8c125d
Fix #15909: Prevent text overflow in 'Select ride design' windows
For designs with a long description, a line of text in the 'Select ride design' window could overflow onto the next window element. The window height was just one newline too small. Therefore, increased the window size with a single line.
2022-03-02 20:08:00 +01:00
Rik Smeets 2a7209bee5
Fix #16140: Disable 'follow this' in 'overall' and 'station' view 2022-03-02 20:05:53 +01:00
Hielke Morsink 6ba0a3bd49
Use u8 strings when dealing with file paths 2022-03-01 22:12:39 +01:00
Hielke Morsink 55c71b0c74
Properly use utf8 strings where expected 2022-03-01 22:12:39 +01:00
Rik Smeets 1f83fa417c
Update guest list defaults 2022-02-27 18:46:08 +01:00
Duncan d606c9730a
Cleanup Scenery Window for second scroll area (#16557)
* Refactor scenery window to check scroll index

* Move into seperate function calls

* Pass offset to tab draw (so it can be used by scrolls)
2022-02-27 12:26:26 -03:00
Hielke Morsink ba85cf4873
Close #15896: Refactor out the ZoomLevel operators 2022-02-26 23:14:59 +01:00
Sam Atkins fb4c9359d8
Close #13779: Refactor Map window into a class (#16559)
* Close #13779: Refactor Map window into a class

* Fix invalid memory read from temporary strings
2022-02-26 20:23:27 +00:00
Gymnasiast 376c79408a
Replace path_set_extension with Path::WithExtension() 2022-02-26 18:26:24 +01:00
Gymnasiast 49b414a40e
Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Hielke Morsink fea9254368
Remove unused GetEngine functions (#16722) 2022-02-26 07:27:48 -03:00
frutiemax cb16511d48
Use smart pointers in OpenGLDrawingEngine.cpp
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2022-02-26 09:49:41 +01:00
Charles Machalow 59c4beb3dd
Fix bug where file extension can get added twice (#16720) 2022-02-26 06:25:06 +00:00
Charles Machalow 6406b18c98
Fix #16715. The first time we save a park, default to the park's name… (#16719)
* Fix #16715. Default to the park's name as the file name

* Mark Combine as nodiscard

The return value must be used for the function to do something
2022-02-26 06:23:30 +00:00
Ted John 501328bc9a
Fix #16712: [Plugin] Crash when clicking on a list view item 2022-02-24 21:39:11 +01:00
spacek531 82378c09c3
Rename VAR_CE and its unions (#16215) 2022-02-20 23:20:06 -03:00
Ted John d93f4bdc1d
Fix #12774: Plugin: Scripts are not reloaded after new scenario (#16686) 2022-02-20 23:14:51 -03:00
Hielke Morsink 5c5f86ac42
Correct some mistakes 2022-02-18 23:28:21 +02:00
Hielke Morsink ad0a2a8f96
Remove entrance/exit location functions 2022-02-18 23:28:17 +02:00
Hielke Morsink 2137cea3bb
Reduce use of UnderlyingType 2022-02-18 23:21:38 +02:00
Hielke Morsink f06645d2f7
Make stations a private std::array and use getters for access 2022-02-18 23:21:35 +02:00
Hielke Morsink 054f7392a1
Let index underflow for reverse loops 2022-02-18 23:11:11 +02:00
Hielke Morsink f47c1b9f96
Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Michael Steenbeek 4c046024a3
Merge pull request #16640 from ZehMatt/refactor/entityid-16469
#16469: Introduce EntityId and refactor everything
2022-02-18 21:29:23 +01:00
Tulio Leao 1e58ab4c98
Merge pull request #16673 from IntelOrca/fix/16591-plugin-timeout 2022-02-18 09:38:19 -03:00
Sam Atkins 2b4579bd93
Use labels for OptionsWindow text
This lets us show tooltips for them. Most of the FooDraw() methods are
now empty and have been deleted.
2022-02-17 23:09:39 +01:00
Ted John 007a33404e Close plugin's windows gracefully when stopped
When a plugin is stopped, close all windows created by that plugin.
Ensure the close event on the window can not open a new window if the plugin is being stopped.
2022-02-17 20:18:30 +00:00
Duncan ad86544c83
Merge pull request #16668 from IntelOrca/fix/plugin-pressed-tab
Fix pressed tab for plugin windows
2022-02-17 16:13:41 +00:00
ζeh Matt 52047805db
Use correct type for EntityId and fix issues 2022-02-16 18:56:43 +02:00
ζeh Matt d7f5003943
Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 6c3a417af3
Merge pull request #16259 from IntelOrca/refactor/rectangle-maps
Refactor map size to allow for rectangle maps.
2022-02-15 19:08:37 +00:00
Michael Steenbeek ffe67ff33e
Merge pull request #16642 from Gymnasiast/refactor/dropdown
Create Dropdown::Item and use it for gDropdownItems
2022-02-15 18:50:26 +01:00
Ted John b5127089e2 Fix pressed tab for plugin windows 2022-02-15 10:37:18 +00:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
Duncan b22ac0551c
Merge pull request #16592 from skdltmxn/fix-integer-overflow
Fix staff statistics overflow
2022-02-14 21:41:52 +00:00
skdltmxn 9cd502a9f7 Fix staff statistics overflow 2022-02-14 07:42:18 +00:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00:00
Ted John 05b589fb93 Remove custom window widget limit 2022-02-13 23:09:42 +00:00
Ted John da89a4e413
Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
Silent 09897ede9e
Refactor last_*_directory and last_run_version to use u8string
Fixes a regression from #16631 causing a crash when
constructing u8string from a nullptr
2022-02-13 21:34:26 +01:00
Gymnasiast 4abbfcb32b
Create dropdown item flags 2022-02-13 00:14:33 +01:00
Gymnasiast 723867e0a0
Create Dropdown::Item and use it for gDropdownItems 2022-02-12 23:57:22 +01:00
Gymnasiast a17c4ad304
Rename Dropdown::Item to ItemExt 2022-02-12 23:42:59 +01:00
Gymnasiast 49ccc21d84
Fix #16576: Cannot select vehicle types with entry index >= 256 2022-02-12 20:43:45 +01:00
Gymnasiast 3ff8225bb9
Replace some uint8_t in Ride.cpp 2022-02-12 20:43:45 +01:00
ζeh Matt c0474d2d27
Merge pull request #16466 from ZehMatt/refactor/identifier-rideid
Use TIdentifier for RideId
2022-02-12 11:23:54 -08:00
Michael Steenbeek ee54603695
Rename value strings for spinners (#16637) 2022-02-12 20:17:37 +01:00
ζeh Matt f22142d2cf
Use RideId::GetNull over SELECTED_RIDE_UNDEFINED 2022-02-12 18:13:50 +02:00
ζeh Matt 06e430157f
Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
ζeh Matt 4554d6d883
Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt a2470c0573
Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
Michael Steenbeek 2e37f12365
Merge pull request #16631 from CookiePLMonster/fix-crashy-paths
Fix more crashes related to paths
2022-02-12 16:07:26 +01:00
Silent 5028ce3bf6
Turn GeneralConfiguration::rct1_path into an u8string
Fixes a crash when opening Advanced Options on the first launch
2022-02-12 16:07:04 +01:00
Silent 4621cc4264
Json: Fix wrong implicit path typecasts in ReadFromFile and WriteToFile
These functions accepted fs::path which meant passing a u8string to them
wrongly assumed an ANSI encoding and not UTF-8. This would be
a non-issue in C++20 where char8_t is separate, but until then it was an issue
causing incorrect character conversions, and thus an exception.
2022-02-12 14:36:37 +01:00
Silent 46deac8620
Fix a crash in WindowLoadsaveOpen when last_game_directory is empty
The variable path was left unitialized, which worked fine
in Release builds most of the time, but consistently crashed in Debug.
2022-02-12 00:53:26 +01:00
GalBr cb83d8ff05
Fix #14674: Recent Messages only shows at most 6 or 7 notifications 2022-02-11 21:47:08 +01:00
Michael Steenbeek 63ed6c99a5
Make StrDecompToPrecomp() take C++ strings 2022-02-07 18:56:04 +01:00
Duncan cdd3c28b2e
Use intents to control scenery window (#16562)
* Use intents to control scenery window
2022-02-03 21:10:21 +00:00
Johan Mattsson c00cc90b1f
Fix bounds checks and a nullptr check 2022-02-03 21:42:12 +01:00
Duncan 5157b57a15
OpenRCT2 Limits (#16088)
* 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
2022-02-01 20:59:48 +00:00
GalBr 111f6479df
Move currentDirection creation to after element selection
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.
2022-01-31 23:02:17 +01:00
Ted John f84c2851be
Fix SHGetPathFromIDListLongPath (#16545)
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.
2022-01-31 21:35:48 +00:00
Silent 45debeeb3f
Fix IMalloc* leak in Win32 ShowDirectoryDialog 2022-01-30 12:32:00 +01:00
ζeh Matt 284fff8961
Merge pull request #16544 from ZehMatt/desync/gLastStationStyle
Refactor usage of gLastEntranceStyle
2022-01-29 16:54:08 -08:00
Sam Atkins 99d3d17092
Clean-up OptionsWindow (#16529)
* 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()
2022-01-29 21:52:33 +00:00
ζeh Matt 383412252c
Only modify gLastEntranceStyle for the callee of the game action 2022-01-29 16:42:27 +02:00
Gymnasiast 2f0e6389da
Use u8string in FileDialogDesc 2022-01-29 14:09:13 +01:00
Gymnasiast fd6b327adb
Use emplace_back() instead of push_back() 2022-01-29 14:07:21 +01:00
Gymnasiast 55591b1b2f
Merge old and new FileDialogDesc 2022-01-29 13:55:10 +01:00
Michael Steenbeek f43a4344ce
Remove platform_get_user_directory() (#16530) 2022-01-29 09:01:05 -03:00
Sam Atkins f4dfde39e7 Refactor NewsOptions as a Window subclass
Closes #13789.
2022-01-28 12:08:57 +00:00
Sam Atkins b2a1c72867 Add Window::InitScrollWidgets()
This is just a wrapper around WindowInitScrollWidgets(), but better
matches the code style.
2022-01-28 12:08:57 +00:00
Michael Steenbeek 2c8c940caa
Refactor get_file_extension_type() 2022-01-27 11:14:19 +00:00
Gymnasiast d7dcffbee8
Remove C string overload for Path::GetAbsolute() 2022-01-26 14:54:49 +01:00
Michael Steenbeek 9f74c7081b
Create definitions for u8string and u8string_view 2022-01-25 16:41:45 +01:00
Michael Steenbeek 28b10f6787
Merge pull request #16498 from Gymnasiast/remove/scaling-dropdown
Always use SNN for non-integer scaling
2022-01-25 10:55:17 +01:00
Michael Steenbeek c903d95512
Replace platform_open_directory_browser() with ShowDirectoryDialog() 2022-01-25 10:54:12 +01:00
Duncan 6eec7b8d48
Merge pull request #16472 from duncanspumpkin/editor
Refactor Editor Object Selection Flags
2022-01-25 07:43:39 +00:00
Michael Steenbeek 4192fc5cc8
Fix leftover references to SC6 2022-01-24 20:03:20 +01:00
Gymnasiast 9191a8f884
Fix positioning of Steam overlay option 2022-01-24 17:48:05 +01:00
Gymnasiast 98cd39a375
Always use SNN for non-integer scaling 2022-01-24 17:46:22 +01:00
duncanspumpkin eb58e498e4 Rename type to conform to coding style 2022-01-19 17:45:51 +00:00
duncanspumpkin 6f9283a7f6 Refactor to remove double usage of flag 2022-01-19 17:33:54 +00:00
Ted John 992ece4a4c
Fix #16449: Viewport doesn't close when switching tabs 2022-01-19 10:23:44 +01:00
GalBr df5c4dd91c
Fix #15947, #15960: Cannot remove rotated flat rides
Replace _currentTrackPieceDirection with local variable. This change
fixes a problem where when trying to remove a rotated ride,
_currentTrackPieceDirection would be reset back to 0 by calling
ride_initialise_construction_window, causing TrackRemoveAction to not
being able to find and remove the ride.
Using a local variable with the current direction, saved before resetting
the global variable, fixes this issue.
2022-01-16 14:04:00 +01:00
GalBr f2f47aa492
Fix TrackDesignPreviewDrawOutlines using a local struct
TrackDesignPreviewDrawOutlines created and modified a local
TrackDesignState struct, so the calculated information was lost.
Now the function receives a ref to a TrackDesignState struct.
2022-01-15 21:24:59 +01:00
Duncan 7e46427059
refactor ride track groups to use new bitset (#16172) 2022-01-15 07:50:00 +00:00
GalBr b69448d075
Refactor MazeConstruction window to class (#16307) 2022-01-15 07:41:24 +00:00
Hielke Morsink 1d5c0361b5
Consistently shift 8-byte constants by widget indices 2022-01-10 23:26:31 +01:00
Hielke Morsink 4494eb3949
Ensure parks are not paused in title sequence 2022-01-09 22:11:09 +01:00
Gymnasiast 6bcf848b2f
Use C++ filesystem for more file/path functions 2022-01-08 19:07:48 +01:00
Gymnasiast 10301507a9
Fix Android 2022-01-08 16:58:57 +01:00
Gymnasiast 919c73d030
C++-ify most path handling 2022-01-08 16:58:57 +01:00
Hielke Morsink b4f264fe4d
Fix #16292: .park files cannot be added to title sequence 2022-01-05 12:44:48 +01:00
Michael Steenbeek 2b0d4e6b3d
Merge pull request #16352 from Gymnasiast/fix/16061
Fix #16061: Incorrect colours in minimap
2022-01-03 14:40:10 +01:00
Michael Steenbeek 819495800c
Fix #15943: Crash accessing unset w->focus (#16364) 2022-01-03 10:11:34 +00:00
Michael Steenbeek d7f5995bfd
Remove unintended execute rights 2022-01-01 19:58:28 +01:00
Michael Steenbeek 65500461e1
Fix #16073: Crash in Sub6E1F34SmallScenery() 2022-01-01 19:56:12 +01:00
Gymnasiast de2b893d99
Fix #16061: Incorrect colours in minimap 2022-01-01 16:52:49 +01:00
Michael Steenbeek 875115ec33
Fix #16343: Crash in Ride::PopulateVehicleTypeDropdown() 2022-01-01 15:07:42 +01:00
Michael Steenbeek 678dd0f69f
Merge pull request #16195 from frutiemax/ForwardDeclareFormatter
Forward declare Formatter
2021-12-30 23:01:42 +01:00
Michael Steenbeek c7f87d3aa9
Merge pull request #16310 from frutiemax/ted_description
Add description field to TrackElementDescriptor
2021-12-30 22:26:08 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Hielke Morsink 4daae678c3
Remove unused include from Banner.cpp 2021-12-30 17:25:04 +01:00
Hielke Morsink e7d213ded1
Remove unused include from TopToolbar.cpp 2021-12-30 17:21:15 +01:00
Vinícius Hashimoto 4155bf9ce0
Close #13748: Refactor About window to class (#16297) 2021-12-27 18:44:06 -03:00
frutiemax 36f0cce65b Add description field to TrackElementDescriptor 2021-12-25 09:55:03 -05:00
spacek531 52d55f5341 refactor ride track groups to use new bitset
remove erroneous value from dummy rtd

make comment more descriptive

remove comment
2021-12-23 02:17:57 -08:00
Michael Steenbeek f65e12fc78
Close #12243: Merge pull request #16295 from GalBr/use-coords-objects-in-maze-functions
Use Coords objects in maze functions
2021-12-22 19:16:34 +01:00
Gal B 343f9bbca0 Refactor maze_set_track to use const CoordsXYZD& 2021-12-22 18:48:37 +02:00
Duncan ee297e9ed3
Fix #16287: Incorrect sv6 extension using console or system browser 2021-12-22 16:19:02 +01:00
Michael Steenbeek 25cb49f8ce
Pass paint_session as reference 2021-12-19 14:48:00 +00:00
Gymnasiast ef6f2cceee
Create RideConstruction.h 2021-12-18 20:27:13 +01:00
Gymnasiast 449da0d6bd
Convert ride_get_station_object() to method 2021-12-18 18:48:52 +01:00
Ted John e165de7482
Refactor paint structs to use ImageId and extend size of image list (#16258)
* Move to image ID for paint struct

* Move image list to be past the end of legacy limit

* Extend image list size

* Introduce constants for image list size

* Use std::array to store internal paint struct
2021-12-18 07:40:10 +00:00
ζeh Matt 186d3efb59
Merge pull request #16092 from ZehMatt/refactor/timing
Refactor update/time related things
2021-12-17 10:08:42 -08:00
Duncan d6e13476ef
Merge pull request #16208 from bkolstad1/window-refactor
Close #13768: Refactor window to class: DemolishRidePrompt
2021-12-14 21:25:23 +00:00
GalBr 35e8bc7f69
Refactor Land Rights window to class (#16183) 2021-12-14 21:19:27 +00:00
Brian Kolstad 35a56c0810 Split demolish and refurbish into seperate windows 2021-12-14 14:03:22 -05:00
ζeh Matt fa737dc4ac
Merge pull request #16207 from ZehMatt/refactor/bitset
#16198: Implement custom BitSet and replace std::bitset
2021-12-13 14:49:16 -08:00
Ted John 6d7e2446db Fix #16204: Invisible entrance/exits render as tiny land sprites 2021-12-13 22:11:55 +00:00
ζeh Matt 94e20ba7fe
Rename some Update functions to Tick 2021-12-13 19:04:48 +02:00