Commit Graph

2180 Commits

Author SHA1 Message Date
Michael Steenbeek 7530a03b8e
Merge pull request #15508 from Broxzier/refactor/widget-references
Use (const) references to widgets and scrolls where possible
2021-10-03 21:07:31 +02:00
ζeh Matt 24ec2e1b67
Merge pull request #15510 from ZehMatt/refactor/largescenerayplace-result
Refactor LargeSceneryPlaceAction result data passing
2021-10-03 07:54:59 -07:00
Hielke Morsink b246a4919d
Fix #15514: Two “quit to menu” menu items available in track designer 2021-10-03 15:20:45 +02:00
ζeh Matt 76c2f9db85
Refactor LargeSceneryPlaceAction result data passing 2021-10-02 00:56:59 +03:00
Hielke Morsink 1d62a902e7
Make scenery_small_entry_has_flag a member function (#15509) 2021-10-01 16:50:05 -03:00
Hielke Morsink 5b9b52c028
Use (const) references to scrolls where possible 2021-10-01 15:21:01 +02:00
Hielke Morsink 6de1868ad8
Use (const) references to widgets where possible
Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
2021-10-01 15:21:00 +02:00
Hielke Morsink 94144bcd89
Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
Michael Steenbeek 987174e828
Merge pull request #15436 from duncanspumpkin/staff
Small Staff Refactor from NSF
2021-09-29 20:46:24 +02:00
frutiemax 2906cb8c89
Fix #14474: Map size can be synced in multiplayer (#15312)
* Fix #14474: Map size can be synced in multiplayer

* Bump up network version

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2021-09-29 16:46:03 +01:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Michael Steenbeek 1feac16bed
Merge pull request #15414 from frutiemax/develop
#15367: Encode RideType in TrackElement
2021-09-25 12:02:08 +02:00
Hielke Morsink a8b84989eb
Check for nullptr explicitly in operct2-ui (#15460) 2021-09-25 08:45:06 +02:00
ζeh Matt e5de2adc4f
Merge pull request #15429 from ZehMatt/backport/ticks
Remove scenario ticks and adjust export/import
2021-09-23 12:08:16 -07:00
ζeh Matt 74e8988dd8
Remove scenario ticks and adjust export/import
Co-authored-by: Ted John <ted@brambles.org>
2021-09-23 21:49:09 +03:00
ζeh Matt 719a5a9d8e
Merge pull request #15369 from ZehMatt/refactor/tile-coords
Refactor overload map_get_first_element_at
2021-09-21 14:36:03 -07:00
Duncan a268350615
Fix #15439: Ride viewport is partially grey
The ride viewport does not work the same as other viewports due to the selection of views that it has. After refactoring the focus system to use a more streamlined approach the ride viewport lost its invalidation on resizing. If the ride window was to use the same viewport update code as say the guest window then the viewport focus still ends up incorrect due to it no longer centring the focus. Therefore the best approach was to lose the focus on resize and force a recalculation of it.

Also renamed Focus2 to Focus as Focus2 was meant to just be fill in whilst removing the original focus structs.
2021-09-21 11:06:04 +02:00
Gymnasiast 11607f525d
const auto& 2021-09-21 10:49:29 +02:00
Gymnasiast 1e17304e76
Show the appropriate ride type in the TI 2021-09-21 10:49:29 +02:00
frutiemax 355019f97f
#15367: Encode RideType in TrackElement 2021-09-21 10:49:28 +02:00
Hielke Morsink d3f7660a46
Use min/max water height defines in mapgen 2021-09-19 17:18:23 +02:00
duncanspumpkin ca689c3948 Introduce methods from NSF
These methods still call the same legacy functionality for now
2021-09-19 08:28:25 +01:00
Duncan 938792e6be
Use CoordsXYZ for ride view (#15434)
* Use CoordsXYZ for ride view

Part of the NSF but also took the time to refactor slightly to use the more appropriate types. Annoyingly there isn't a operator/ for CoordsXYZ otherwise this could have been further simplified.

* Fix missed minx/maxx occurrence

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-09-19 07:19:32 +01:00
Duncan fa57b6aea0
Remove focus union and replace with typed focus (#15426)
* Remove focus union and replace with typed focus

This if for the NSF to allow for CoordsXYZ

* Remove legacy structures

* Rework viewport_create to deduplicate logic

* Simplify yet further

* Apply review comments

* Remove intermediate
2021-09-18 20:34:38 +01:00
Hielke Morsink 77141f57b0
Merge pull request #15416 from Broxzier/refactor/unnecessary-else
Remove unnecessary else blocks
2021-09-17 14:56:30 +02:00
ζeh Matt de85a1788b
Merge pull request #15412 from ZehMatt/refactor/ga-results
Allow game actions to store custom data instead of using inheritance
2021-09-16 14:35:03 -07:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
Michael Steenbeek 37821ce25e
Merge pull request #15336 from Gymnasiast/refactor/more-paths
Prepare footpath handling for surfaces and railings (from NSF)
2021-09-15 10:58:01 +02:00
ζeh Matt 42254d774d
Allow game actions to store custom data instead of using inheritance 2021-09-14 20:25:37 +03:00
Hielke Morsink 28681eebc0
Merge pull request #15407 from ZehMatt/refactor/optional-use
Make use of std::optional strict
2021-09-14 17:45:18 +02:00
Hielke Morsink cf78d6841d
return nullopt instead of {} 2021-09-13 23:24:57 +02:00
Kane b35fd28c55
Feature #7682: Lock camera to vehicle in main window
Pressing the "Locate" button in the Ride window when selected on a "Vehicle/Train" will now have the main viewport track the vehicle.
2021-09-13 20:44:52 +02:00
ζeh Matt 59a6c34db4
Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Michael Steenbeek 6ffb03dde0
Add icon for path railings tab 2021-09-13 09:29:46 +02:00
Gymnasiast c567ca09db
Fix stray changes 2021-09-12 17:52:01 +02:00
Gymnasiast 6715250d54
Remove now-unused enum 2021-09-12 17:52:01 +02:00
Gymnasiast 024f836960
Create FootpathCreateConstructFlags 2021-09-12 17:52:01 +02:00
Gymnasiast 866c66bc58
Use title case, scope slope variable 2021-09-12 17:52:01 +02:00
IntelOrca 4f319d6ed4
Prepare footpath handling for surfaces and railings 2021-09-12 17:52:01 +02:00
ζeh Matt e5eb8f84cf
Apply review suggestions 2021-09-10 19:36:14 +03:00
ζeh Matt 516232e0a7
Change static casts to EnumValue 2021-09-10 19:10:15 +03:00
ζeh Matt d7e0e473c1
Apply review suggestion, cleanup 2021-09-10 19:10:14 +03:00
ζeh Matt f8e26a3752
Fix signed/unsigned mismatch 2021-09-10 19:10:14 +03:00
ζeh Matt 18af5d4950
Use union for window association to prevent casts 2021-09-10 19:10:13 +03:00
ζeh Matt ec65a04883
Cast fixes 2021-09-10 19:10:13 +03:00
ZehMatt 3ad72baaae
Cast fixes 2021-09-10 19:10:12 +03:00
Michael Steenbeek 624a32e93b
Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
seanmajorpayne 33fbad9726
Fix #15257: Chat widgets removed from Scenario Editor (#15365)
* Update TopToolbar.cpp

Removed else statement which caused the game to skip toolbar element deactivations.

* Update contributors.md

Adding name to contrib.md

* Update changelog.txt

Updated changelog

* Update changelog.txt

Fixing changelog item position
2021-09-08 12:39:34 +02:00
ζeh Matt 07a7946caf
Remove redundant conversions 2021-09-07 22:36:16 +03:00