Commit Graph

2784 Commits

Author SHA1 Message Date
Gymnasiast a088537b65
Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Ted John 05f2995d71
Fix #17843: New ride window incorrectly shows track design list 2022-08-21 16:19:43 +02:00
skdltmxn 4fcdafc0f4
Fix #17834: finance window becomes blank after 4096 years 2022-08-17 23:05:18 +02:00
ale 7f33e4886d
Fix #17544: Placement rule in Invention List window does not move 2022-08-15 19:52:20 -04:00
ale 3a5a8d4f78
Fix #17754: Scenery Group thumbnails missing in Invention List window 2022-08-15 19:50:01 -04:00
Michael Steenbeek 354df90ab1
Fix #17815,#17818: Special... dropdown and brake settings glitches 2022-08-14 20:37:32 +00:00
Gymnasiast 5945f7110a
Move gGotoStartPlacementMode to windows/RideConstruction.cpp 2022-08-13 23:00:54 +02:00
Gymnasiast f8a94c2e12
Move two functions out of _legacy.cpp 2022-08-13 23:00:53 +02:00
Michael Steenbeek d9e23e9dfa
Use ride_type_t instead of uint8_t in more places (#17803)
Part of preparation for making ride types into objects.
2022-08-13 21:49:19 +02:00
Michael Steenbeek 49215a52cf
Remove unnecessary pops from some strings (#17805) 2022-08-13 20:12:30 +02:00
frutiemax 2202f8d060
Add ConstructionWindowContext field to RTD (#17749) 2022-08-13 09:18:56 -03:00
Michael Steenbeek 5661da1c68
Unwrap game action compat wrappers 2022-08-11 00:00:58 +02:00
Michael Steenbeek 93807ec5bf
Remove ride type checks for log bumps/rapids string 2022-08-10 23:43:00 +02:00
Michael Steenbeek a7e66535d9
Change ‘restroom’ to ‘toilet’ in the code 2022-08-06 14:33:37 +00:00
frutiemax 6868b3dcaf
Rename IS_SHOP to IS_SHOP_OR_FACILITY and use it for RideObject 2022-08-06 15:00:52 +02:00
frutiemax 2d75858589
Add IS_FIRST_AID flag 2022-08-06 15:00:52 +02:00
frutiemax 76104cbbee
Use RIDE_TYPE_FLAG_IS_TOILET 2022-08-06 15:00:52 +02:00
AuraSpecs 5249ae1426
Enlarge Special Elements dropdown
Enlarging the Special Element dropdown to accomodate for the new longest name "Large Corkscrew (right)" so you can at least make out which direction it's turning in.
2022-08-06 11:25:25 +02:00
Nikolas Parshook a44ddd5adc
Refactor NewRideWindow to use Window class 2022-08-03 21:59:03 +02:00
Michael Steenbeek 80f0d952ad
Merge pull request #17638 from X123M3-256/new_track_pieces
Add new track pieces to the hybrid and single rail
2022-08-01 23:24:22 +02:00
Henry Cheng 281cf137f4
Fix #17639: Duplicate special elements when building upside down 2022-07-31 21:51:08 +00:00
Gymnasiast 9841b4e9e0
Fix naming conflicts 2022-07-31 22:30:18 +02:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink 7cb2113252
Apply clang-format rules 2022-07-31 20:34:32 +02:00
Hielke Morsink d6525e3cd0
Refactor window functions to take references 7 2022-07-31 17:23:18 +02:00
Hielke Morsink d05d675ed9
Refactor window functions to take references 6 2022-07-31 17:23:17 +02:00
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Hielke Morsink 523bb8136e
Refactor window functions to take references 3 2022-07-31 17:23:16 +02:00
Hielke Morsink c8605a8763
Refactor window functions to take references 2 2022-07-31 17:23:15 +02:00
Hielke Morsink 76c1bc8980
Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
frutiemax e96f428c7b
Add RIDE_TYPE_FLAG_HAS_SEAT_ROTATION for multi-dim rollercoaster 2022-07-31 12:01:22 +02:00
X123M3-256 da710557de Fix bug in ride construction window 2022-07-31 10:22:46 +01:00
X123M3-256 ffbf8f4706 Fix bit shifts in ride construction window 2022-07-31 10:22:45 +01:00
X123M3-256 c6a5a6da5f Allow more than 32 special pieces in construction menu 2022-07-31 10:22:04 +01:00
Michał Janiszewski 3c4a07859b
Provide enough space in temp buffer
```
src/openrct2-ui/windows/Ride.cpp:3338:44: error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=]
 3338 |     snprintf(buffer, std::size(buffer), "%u", currentValue);
      |

(...)

/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:35: note: ‘__builtin___snprintf_chk’ output between 2 and 6 bytes into a destination of size 5
```
2022-07-30 23:19:52 +02:00
Michael Steenbeek 0bfc151ab9
Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
Ted John 142b9ff243
Optimise object selection search
* Do case insensitive string matching for object search.
* Return as soon as first field is a hit.
2022-07-30 16:50:54 +02:00
Michael Steenbeek 5a5b107245
Refactor Twist rotations, fix truncating of operating value (#17636) 2022-07-30 16:32:22 +02:00
Hielke Morsink e2da19f0f7
Add missing includes 2022-07-29 18:45:10 +02:00
Gymnasiast 5e8b749277
Fix #17542: Stalls will autorotate towards paths outside the park 2022-07-28 21:26:11 +02:00
Raymond Zhao 7399163a3c
Use more smart ptrs and u8strings (#17611)
* Use smart ptr for PlatformUiContext and WindowManager

* Remove more delete calls

* Apply PR feedback
2022-07-28 18:19:38 +01:00
Michael Steenbeek e5d2e3001d
Fix buffer size handling for ride operations input
Ensure a nicely terminated string
2022-07-28 14:24:19 +02:00
Michael Steenbeek 1a8660d59d
Pass window reference to tool_set (#17625) 2022-07-27 22:22:22 -03:00
Gymnasiast 39f60c3412
Input current value; fix dodgems mode detection 2022-07-27 23:13:01 +02:00
Rik Smeets 1eb3a86770
Ride operating settings can be set via text input
Both minimum and maximum wait time and operating settings for flat rides can now be set via text input.
2022-07-27 22:50:04 +02:00
Michael Steenbeek 30f477972c
Close #15358: Increase park name character limit 2022-07-27 17:35:15 +02:00
Duncan 7433119749
Fix #17620. Missing setting ride id for construction window (#17622)
This would eventually cause a crash when trying to reset the window on last track piece deletion. Mistake made in refactor #17578
2022-07-27 16:06:33 +01:00
Raymond Zhao 4f23e5e9ec
Refactor struct TrackDesignFileRef
- Refactors track_design_file_ref to TrackDesignFileRef and replaces the utf8* fields of that struct with u8string
- Gets rid of some String::Duplicate() and delete calls
- Uses a bunch of c_str() calls to interface with older functions
2022-07-26 16:12:46 +00:00
Nikolas Parshook 628da77c0e
Refactor ride construction window (#17578) 2022-07-26 15:17:25 +01:00
Ted John bd6817cb45
Fix #17533: Missing audio when specifying --rct2-data-path 2022-07-25 14:26:28 +00:00
Henry Cheng 08e0b9ae8d
Fix #17508: Grid Doesn't Disable After Setting Patrol Area (#17574)
* Move show_gridlines to only run under condition

* Update changelog.txt

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-07-25 13:39:19 +00:00
AuraSpecs d82360cc16
Add Authors to the list of things you can search for in the Object Selection menu (#17575)
* Add Authors to Search option

Joint effort from Spacek and karst

* Update changelog.txt

* Apply code review comment

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-07-23 20:28:39 +00:00
Henry Cheng 46a2047309
Refactor Server Start Window to Class (#17592)
* Refactor first

* Update refactor

* Add fixes requested

* Dropped static
2022-07-23 20:47:17 +01:00
Raymond Zhao 71ad3af930
Use more smart pointers in openrct2-ui (#17582)
* Use more smart ptrs

* Use move instead of copy ctor
2022-07-22 11:48:43 +01:00
Raymond Zhao f4df6be8ae
Remove some calls to free (#17577) 2022-07-21 07:50:43 +01:00
Henry Cheng 3bad01a704
Fix #17553: Crash when moving invention list items to empty list (#17555)
* Fix content check

* Add change log entry

Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
2022-07-17 07:12:29 +00:00
Cory Sanin 37a38af6a5
Fix: [#17503] Correct staff refactor issue (#17546) 2022-07-17 07:43:32 +01:00
8street 213696ea27
Add option to sell merchandise in random colours
Co-authored-by: 8street <nikolai_e@rambler.ru>
2022-07-12 22:20:49 +00:00
Michael Steenbeek 11614d7170
Merge pull request #17486 from duncanspumpkin/inventionWnd
Invention List Window Class Refactor
2022-07-12 19:49:03 +02:00
Gymnasiast 06c368694a
Update variables containing a CarEntry 2022-07-11 18:06:22 +02:00
Duncan 5d896c65b5
Refactor Guest Window to Class 2022-07-03 22:00:37 +02:00
Artem Yanenko 019ed54a48
Fix #17377: Park entrance can be placed without path in Scenario Editor 2022-07-02 14:02:27 +00:00
duncanspumpkin 8492453702 Refactor to conform to style. Move uncommon items out of rct_window 2022-07-02 07:53:46 +01:00
duncanspumpkin 144cd5ada7 Complete moving into class 2022-07-02 07:28:16 +01:00
duncanspumpkin 22f50b8199 Start creating invention list class 2022-07-01 14:57:24 +01:00
Duncan 43562a6899
Window Class Refactor: Invention List Drag (#17415)
* Start working on drag

* Finish moving invention drag into window class

* Refactor drag item into a window variable

* Remove rct2 comment
2022-06-30 10:25:18 +01:00
Hielke Morsink ac7331f878
Include <array> and use page count for size 2022-06-30 07:25:24 +00:00
Duncan d6e188d289
Park Window to class (#17364)
* Start base of class

* Start moving things into class

* Finish porting over

* Refactor to conform more with style

* Add no discard to imageid

* Fix objective window position

* Fix audio on viewport

* Make further fixes

* Move nodiscard again
2022-06-30 05:37:43 +01:00
Karst 7345dd58fe
Fix: Footpath Railing tooltip showing incorrect tooltip (#17461)
* Fix Footpath Railing tooltip

* Add changelog entry

* Update src/openrct2-ui/windows/Footpath.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-06-28 21:15:44 -03:00
Henry Cheng 36f43285ad
Close #16688: Remove unused variables on RideConstruction (#17453)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-06-28 21:15:15 -03:00
Ted John 585ebed600
Fix #17297: Crash when switching language (#17370)
* Refactor all uses of IAudioChannel and the audio mixer.
* Use shared_ptr to avoid dead pointers hanging about.
* Reload particular audio channels where necessary after object reload.
2022-06-27 17:41:53 +01:00
Nicolas Espinosa Mooser 69ff925b1e
Refactor window to class: Staff (#17400)
* Refactor window to class: Staff
Close OpenRCT2/OpenRCT2#13806
2022-06-26 07:07:59 +01:00
jazzysoggy f77611dcd2
Fix #17229: Rename G1_FLAG_BMP to G1_FLAG_HAS_TRANSPARENCY (#17441)
* Renamed All Instance of G1_FLAG_BMP

Renamed all instances of G1_FLAG_BMP to GA_FLAG_HAS_TRANSPARENCY

* Fixed comments and labels

Fixed comments and labels to be more in line with new definitions
2022-06-25 07:04:40 +01:00
Artem Yanenko 790e237b80
Fix #15787: toggling upper case banners only works after 10 secs 2022-06-21 20:37:45 +02:00
Artem Yanenko 29beb2962d
Fix primary color picker for canvas tent (#17416) 2022-06-20 21:24:09 +02:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
Duncan f0949284c4
Editor Bottom Toolbar Window class (#17358)
* Move EditorBottomToolbar to window class

* Minor refactoring

* Further refactoring

* keep compilers happy
2022-06-08 20:54:03 +01:00
duncanspumpkin d521327072 use consistent style 2022-06-07 22:35:06 +01:00
duncanspumpkin 249eaa989e Refactor sign internal variables 2022-06-07 22:35:06 +01:00
duncanspumpkin 3dba3984bf Remove map_variables 2022-06-07 22:35:06 +01:00
Michael Steenbeek 3fae2413db
Use “car” instead of the ambiguous “vehicle”, part 1
Currently, the word “vehicle” is used for both “train” and “car”. This is a first effort towards disambiguation.
2022-06-07 20:36:20 +00:00
Duncan 5bae48e505
Fix auto positioning 2022-06-07 14:09:18 +00:00
Duncan bde81c1d34
Move MainWindow into window class (#17351) 2022-06-07 12:06:57 +01:00
Duncan a73df7e376
Remove Editor Main (#17348)
* Remove editor main window

* Remove editor main completely

* Update src/openrct2/Editor.cpp

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-06-07 08:26:58 +01:00
Michael Steenbeek 3243183680
Fix #17187: Text input window does not resize correctly
window_set_resize() already invalidates, so no need to call it twice.

Co-authored-by: guljam <guljam@users.noreply.github.com>
2022-06-06 00:11:29 +02:00
Hielke Morsink 6d04e21518
Make map size spinners in mapgen window functional 2022-06-05 09:49:40 +02:00
Hielke Morsink 7f2f27e826
Show map size inside spinner widgets 2022-06-04 23:23:00 +02:00
Hielke Morsink 49c3f49535
Split X and Y size in mapgen logic 2022-06-04 19:56:31 +02:00
Hielke Morsink 1644cb68d3
Split X and Y map size spinners in mapgen 2022-06-04 11:26:46 +02:00
Hielke Morsink 8d14016c3f
Allow maps to be resized to non-rectangular shapes 2022-06-04 11:26:34 +02:00
spacek531 673ec0fa10
Frames rotation count part 1 (#17106)
Refactor vehicle sprite groups

rename rotationType to spriteGroup

remove numframes getters from scobject

add sprite groups getters

add documentation to plugin

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-06-03 23:03:02 +01:00
Ted John 9a4492c704
Fix unable to save landscape in editor
Audio objects were being unloaded, while they were still in the loaded object list.
2022-05-30 23:34:29 +02:00
Hielke Morsink 529c1bcd07
Merge pull request #17294 2022-05-30 19:37:57 +02:00
Duncan 1cc2901680
Dropdown Window Class Refactor (#17278)
* Move dropdown window to class

* Refactor and move locals into member vars

* Deduplicate slightly

* Apply review comments
2022-05-29 01:06:23 +01:00
Hielke Morsink 3ea70cdeaf
Fix: shortcut key highlight remains when cursor leaves list 2022-05-28 20:55:42 +00:00
Hielke Morsink 205f98560b
Remove highlight when cursor leaves new rides list 2022-05-28 13:09:26 +02:00
Hielke Morsink d709668eab
Remember scroll position instead of ride selection 2022-05-28 13:09:26 +02:00
Hielke Morsink 64eff42c60
Introduce constant for ride tab count 2022-05-28 10:16:41 +02:00
Rik Smeets 275adc9e68
Fix #7983: Change when certain G-forces show up in red
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-05-27 22:09:18 +00:00
X123M3-256 502f06af91
Add "Alpine Coaster" ride type (#16825)
* Implement "Alpine Coaster" ride type


Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-05-26 21:28:17 +00:00
Ted John a2e6691ac2 Add new audio objects for loading sounds 2022-05-23 22:24:56 +01:00
Duncan 5349e6fe88
Window Class Refactor: DebugPaint (#17269)
* Move debug paint window to class

* Refactor global

* Use ref where possible
2022-05-22 23:15:39 +01:00
Hielke Morsink 6b94d8c0bc
Fix overwriting buffer for parent directory when browsing "Up" 2022-05-22 14:32:06 +00:00
Hielke Morsink 95df149804
Fix: Ghosts and tooltips move when panning the viewport by right-click dragging
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-05-21 09:40:43 +02:00
Ted John 0b9184b99b Avoid overwriting _currentTrackPieceDirection when placing TD 2022-05-10 22:41:09 +01:00
Michael Steenbeek 493c97246c
Merge pull request #16952 from karst/reorg-objsel
Make "Object Selection" order more coherent
2022-05-08 00:02:12 +02:00
Gymnasiast 0708b82430
Remove unnecessary code, check bounds and restore newline 2022-05-07 23:39:59 +02:00
Sebastian Flinck Lindström 8fe124b1dd
Close #13966: Sort Music Style dropdown by name 2022-05-07 20:51:51 +00:00
Michael Steenbeek 29d123b79d
Minor code refactor aimed at optimization code (#17055)
* Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors

* Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen

* Fix: Main thread can reallocate data of worker threads

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-05-07 20:18:09 +02:00
Karst cfa18bd113 Change Object Selection order
Might take a little bit for people to get used to. But it's a lot more coherent and makes more sense.
2022-05-07 19:55:58 +02:00
germanaizek 958bfbc08a
Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen 2022-05-07 16:05:39 +02:00
germanaizek 0045aed7f9
Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors 2022-05-07 16:05:38 +02:00
Hielke Morsink 5f2bde9375
Show Tile Inspector hint when nothing is selected 2022-05-07 13:42:24 +00:00
Íkorni cdc1a912d3
Refactor window to class: Finances (#16149)
* Convert Finances window to new window system

* Fix shadowed variable names

* Fix issues with code, rebase merge
2022-05-05 07:31:26 +01:00
Olivier Wervers 593be7ef28
Add option to show ride vehicles separately 2022-05-03 22:49:47 +02:00
Hielke Morsink 9da63961de
Use eye glyph instead of checkbox for visibility 2022-05-02 22:07:06 +02:00
spacek531 5659d43f46
Cleanup vehicle drawing code part 3 (#16968)
* Cleanup vehicle drawing code part 3

* Create functions to convert between rotation amounts

* Add regions to ease code navigation
2022-04-30 07:56:23 +01:00
Olivier Wervers ef1eabd04e
Fix thumbnail box size in object selection window 2022-04-30 01:43:50 +02:00
Hielke Morsink 2954b0a30d
Fix #17005: Unable to set patrol area for first staff member in park 2022-04-27 21:11:45 +00:00
Hielke Morsink 35915b0a5d
Fix: Writing out of bounds when trains have over 144 cars 2022-04-27 22:02:39 +02:00
Hielke Morsink 1c55e6ee7a
Close #17050: Transparency can be toggled directly (#17075) 2022-04-27 13:30:58 +02:00
Ted John e3ee511a0c
Update options UI 2022-04-26 22:18:19 +02:00
Ted John 9f28b66eec
Remove title editor 2022-04-26 22:17:38 +02:00
csunday95 6ca2a5eb7c
Fix #17029: Ride Cheats tab behaves as a button 2022-04-24 14:50:17 +02:00
EWouters 658efeb4a2
Remove enabledWidgets (#17023)
This was old and unused code which broke the build on MacOS.
2022-04-21 05:59:35 +01:00
Michael Steenbeek c8d00a4a62
Merge pull request #16958 from IntelOrca/fix/16478-park-no-money
Fix  #16478: No money in .park scenarios
2022-04-16 22:13:50 +02:00
norisa118 483548120b
Fix #16879: TED::Price is price modifier, not price (#16962)
* Fix #16879: TED::Price is price modifier, not price

Change unit type to uint32_t, change name to 'PriceModifer' &
add comment on how to use PriceModifier.
2022-04-14 20:36:39 +01:00
Duncan a4700e152e
Fix #16950. Prevent accessing private members (#16976)
* Fix #16950. Prevent accessing private members

* Move further private variable and rename

* Allow persistency of selection

* Move code to open event
2022-04-14 20:36:04 +01:00
Duncan 4596105aed
Fix #16922: Unable to place helix ups on certain tracks
Due to heavy reuse of widget index's and dual uses of items this was incorrectly grouped up in the SLOPE_STEEP_UP refactor. The correct way to split up this is to create a HELIX_UP HELIX_DOWN which will be left for a future refactor
2022-04-11 19:25:55 +02:00
Ian-Polito 5f60dc4081
Take the nice additional changes from #16095 2022-04-09 17:50:17 +02:00
Hielke Morsink c995abc25e
Fix: Crash on opening scenery window after removing tabs
The crash occurred because gWindowSceneryTabSelections did not get cleared when the window is not open, yet this is a global variable that needs clearing. The function that handles this (WindowSceneryResetSelectedSceneryItems) gets called with the `INTENT_ACTION_REFRESH_SCENERY` intent.
2022-04-09 17:42:17 +02:00
Ted John 92fe3bf5e8 Fix drawing of scenario editor buttons 2022-04-09 12:36:47 +01:00
Ted John 11f4993c03 Remove no money scenerio flag 2022-04-09 12:36:31 +01:00
Ted John e1401acb47 Use start scenario logic when choosing new game 2022-04-09 11:40:25 +01:00
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
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
Silent 660b03f00b
Fix assertion in InitialiseListItems 2022-03-27 22:33:57 +02:00
Evan Haataja 3127a4dc64 Allow game to run with GUI while without audio. 2022-03-23 23:44:50 -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 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
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
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
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 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
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