Commit Graph

3386 Commits

Author SHA1 Message Date
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 755deeef8e
Refactor window functions to take references 5 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
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
Michael Steenbeek 2b859c7099
Remove __ENABLE_LIGHTFX__ define
It is already enabled for all our builds, and upcoming changes to RTD would add a slew more.
Discussed in team chat with Duncan and Hielke.
2022-07-28 21:34:02 +00: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
jazzysoggy c0853b56ad
Fix Format_VA. Rename Format to StdFormat.
author jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1655955994 -0400
committer jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1656516326 -0400

Fixed Format_VA and renamed Format to StdFormat. Both now output to Std::String, while taking the same input as before. Changed functions that use these two to account for this output difference
2022-07-24 19:30:57 +02: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
Duncan 3edcc91e40
Fix #17339. Reset Scaleing frame buffers on scale change (#17598)
* Fix #17339. Poor visuals due to scalling incorrectly

Mistake made during refactor meant that the scaleing framebuffers were
kept enabled even though at integer numbers of scale they are not meant
to be used.

* Update changelog
2022-07-23 20:11:00 +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
Michał Janiszewski 5688eb511d
Use SDL_free to release SDL_RWops (#17591) 2022-07-22 22:28:58 +00: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
Hielke Morsink 43a98680ac
Fix: Fallback when selecting RCT1 titles while it's not installed 2022-07-03 16:39:27 +02:00
Hielke Morsink d06f564506
Clean up some title sequence code 2022-07-03 16:20:23 +02:00
Cory Sanin 05f1007dd9
Fix #16989: Re-focusing maximised window triggers a restore and maximise
Fixes #16989 by removing an SDL hack. Originally added to address issue #2158, I can't reproduce this issue with the hack removed. Tested on Linux (by CorySanin) and Windows (by Broxzier).
2022-07-02 21:48:43 +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
Sadret 544770c0fb
Fix #16539: CustomListView header unclickable when scrolled 2022-07-02 12:34:12 +02: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