Commit Graph

16126 Commits

Author SHA1 Message Date
spacek531 ea6fdc4708
fix piece height 2021-02-07 22:07:24 +01:00
Cory Sanin 456202b0f5
Feature: Use allowed_hosts when creating listening socket 2021-02-06 16:47:56 +01:00
Ted John fe70cf26a7
Fix #13933: Clients do not run server plugins 2021-02-05 23:27:15 +01:00
Matt 8bfda5cab1
Use correct condition 2021-02-05 20:08:51 +02:00
Matt 35e52acd7d
Remove unused variable 2021-02-05 18:41:20 +02:00
Matt ee3a36dc0f
Use TileElementsView for guest code 2021-02-05 18:20:44 +02:00
Matt 9dde45fb05
Use TileElementsView for virtual floor 2021-02-05 17:39:25 +02:00
Matt 93e22d6770
Use TileElementsView for WallRemoveAction 2021-02-05 17:34:05 +02:00
Matt ddd67db1d2
Use TileElementsView for SmallSceneryRemoveAction 2021-02-05 17:28:18 +02:00
Matt 83221d51aa
Use TileElementsView for RideEntranceExitRemoveAction and cleanup 2021-02-05 17:25:07 +02:00
Matt 5e2e7143cd
Use TileElementsView for LargeSceneryRemoveAction and cleanup 2021-02-05 17:10:17 +02:00
Matt 5bd6ba25b7
Use TileElementsView for LandSetRightsAction 2021-02-05 16:59:04 +02:00
Matt cf91a13d1e
Use TileElementsView for LandSetHeightAction 2021-02-05 16:54:50 +02:00
Matt dc1c3fe451
Use TileElementsView for FootpathPlaceAction 2021-02-05 16:44:05 +02:00
Matt a7b8978f6e
Use TileElementsView for BannerRemoveAction 2021-02-05 16:38:39 +02:00
Matt 5caa6abc85
Use TileElementsView for BannerPlaceAction 2021-02-05 16:33:40 +02:00
Michael Steenbeek c0ab9e8a3b
Merge pull request #13994 from ZehMatt/refactor/tileelementview-3
Make tile element insertion type explicit
2021-02-05 13:46:58 +01:00
Matt 1aa75f04b7
Add templated version for tile element insertion and cleanup code 2021-02-05 12:22:34 +02:00
ζeh Matt 2a06043860
Merge pull request #13996 from ZehMatt/fix-13992
Fix #13992: Do not show empty groups in guest list
2021-02-04 20:31:15 +02:00
Matt 41c6c0bee3
Support casting back to TileElement 2021-02-04 20:29:32 +02:00
Matt 0427ad2914
Fix #13992: Do not show empty groups in guest list 2021-02-04 19:30:44 +02:00
Matt 71174b8de7
Make the insertion of tile elements type explicit 2021-02-04 19:00:59 +02:00
ζeh Matt 6186766a05
Introduce TileElementsView (#13975)
* Simplify TileElement type conversation

* Introduce TileElementsView

* Move TileElementsView code into TileElementsView.h

* Cleanup code and move into OpenRCT2 namespace

* Use reference instead of pointer

* Fix include

* Make GCC happy

* Move the cast functions into base

* Use the cast function instead of reinterpret_cast

* Add TileElementsView tests

* Fix iterating on TileElementBase, return pointer not reference
2021-02-04 18:58:45 +02:00
Cory Sanin a4f58c67f4
Fix #13961: Guests sliding down slide missing on close zoom levels 2021-02-04 14:03:52 +01:00
Duncan 9d3f3fa224
Fix #13234. Check for correct peep state when removing mass (#13983)
* Check for correct peep state when removing mass

* Add apply mass function

* Increment network version

* Fix #13234. Add to changelog
2021-02-03 09:13:56 +00:00
Umdlye 2c408342d9
Create toggle for zoom toolbar button 2021-02-01 17:27:40 +01:00
Jaime Centeno 83fcfa6e68
Refactored water window code into WaterWindow class
Created a new WaterWindow class that inherits from Window class and overrides On methods. Added a new generic method for WindowFocusOnCreate that takes position as an argument.
2021-02-01 14:33:22 +01:00
Duncan 2d6da7551b
Fix #13958: Queue corruption due to intersecting entrances
There was a whole host of bugs that this issue has exposed which were caused by intersecting the queue of a ride with an entrance/exit or shop. When this was done the peep would be removed from the queue incorrectly and could end up at the wrong station or a variety of other unexpected behaviour
2021-01-30 17:20:01 +01:00
ζeh Matt 9ff2138f3f
Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
Michael Steenbeek e3a1af3d05
Use getters/setters for track type and direction 2021-01-30 15:16:17 +01:00
ζeh Matt 15ef22c2f6
Merge pull request #13970 from ZehMatt/refactor/fixed-vector
Use FixedVector for paint_structs
2021-01-30 12:57:12 +02:00
Duncan dc113ff6e4
Remove dead code from #6819 (#13971)
This was missed back in 2017 there is now no longer a reason to make a backup tunnel array as we never modify it. I've also added a const to make it clear we never write to the array
2021-01-30 08:33:36 +00:00
Matt 64cbccdda6
Re-order members of paint_struct for better code generation 2021-01-30 09:16:42 +02:00
Matt 3fecb36a19
Use fixed vector for paint_entry 2021-01-30 09:16:42 +02:00
Ted John 4a37f1479c
Merge pull request #13927 from IntelOrca/plugin/extra-ui
* Add isVisible property to widgets so that you can easily show / hide widgets.
* Add new text box widget for text input
* Allow plugin windows to be transparent
* Add `textAlign` property to label widget
2021-01-29 20:55:25 +00:00
Ted John 2fdf91874c Implement centred labels 2021-01-29 17:50:32 +00:00
Ted John 180a41686c Implement transparent windows for plugins 2021-01-29 17:50:27 +00:00
Michael Steenbeek d3a4c16270
Reserve room for tile owner 2021-01-29 16:56:33 +01:00
spacek531 1e3fe9b550
Separate booster track elem type (#13857)
* add data to Track.cpp

add data to TrackData.cpp

add import helper functions

fix Booster value

import booster as 256

export booster as 100

add vehicle subposition data

add SV4 import

add TD4 import

add TD6 import

use track_type_t when importing TD6

add TD6 export

change peep tracktype type to auto

fix SV4 track element import

fix import of booster speed

add None enum to TrackElemType

move _legacy RideConstruction functions to Ride.cpp

change _currentPossibleRideConfigurations to use track_type_t

fix booster track category

add booster string tto

expand _currentTrackCurve to 32 bits

expand track_curve_chain to 32 bits

update get_track_element et al. to handle 16 bit track types

run clang-format

remove unused #includes from _legacy.cpp

Revert "remove unused #includes from _legacy.cpp"

This reverts commit 4c4d4b06edb0c130314789d8fe371246be246c9f.

Revert "update get_track_element et al. to handle 16 bit track types"

This reverts commit 73920dafd4a6c9e7c9f0c7ee1098d493f8f5d262.

Revert "move _legacy RideConstruction functions to Ride.cpp"

This reverts commit 2d83a75c1477d387ad77a7a5085f37a28f72a589.

update _legacy functions for 16-bit track types

update ride_construction_reset_current_piece behavior with new enum

fix declaration of _currentTrackCurve to match other track tcurve vars

remove unused include from T4Importer.cpp

move SCT to 256 part 1: RideConstruction.cpp

move SCT to 256 part 2: TrackData.cpp

move SCT to 256 part 3: Ride.h/Ride.cpp

move SCT to 256 Part 4: revert changes to S4Importer.cpp, T4Importer.cpp

fix stations appearing as curves

fix too many initializers in TrackData.cpp

move SCT to 256 part 5: S6/T6 importing and exporting

move SCT to 256 part 6: simplify RCT12.cpp functions

fix comments in S6Exporter.cpp, S6Importer.cpp

fix clang-format on S6Importer.cpp

add missing data to TrackData.cpp

revert new functions for checking if track type is a booster

revert unused include

change trackType to auto and add comment to S6Exporter.cpp

move track type aliasing from TrackDesign.cpp to T6Import.cpp, T6Export.cpp

add comment about sv6 vehicle.track_type

static cast to uint8_t in T6Exporter.cpp`

set type to auto when setting value to _currentTrackCurve

revert moving function in S6Importer.cpp

fix value names in RideData.cpp

revert cahnge to uint16_t return for GetTrackType() in RCT12.cpp

fix GetTrackType return type for real

add changelog entry

bump network version

cast alternate track type to track_type_t

static_cast tuple input value in _legacy.cpp

change _currentTrackCurve to uint32

use TrackElemType::Count to determine length of subposition array

perform some changes

remove padding from rct_trackdefinition

fix alternative type check

remove _boosterTrackSelected

add missing condition for booster speed

add comments for TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop

add missing comments to RideData.cpp

remove extra entry

simplify some things

fix formatting

remove redundant checks todo: fix building the track piece

use TrackElemType::None more

remove git.txt

* bump network version

* make conditional more explicit w/ parentheses

* move booster check to RCT12.cpp

* implement getters and setters for vehicle track type and direction

* fix formatting

* rename RCT12TrackTypeIsBooster to RCT2TrackTypeIsBooster

* add whitespace in RCT2.h

* change the thing I thought I changed

* move booster check function to RCT2.cpp

* move function into if condition

* fix scope issues with setters
2021-01-29 15:24:53 +00:00
ζeh Matt 109a06663d
Fix entrance or exit stacked on top considered a duplicate 2021-01-29 16:19:07 +01:00
Ted John c2eb6d4153 Improve plugin API and type definitions 2021-01-28 20:52:17 +00:00
Ted John 383cbe5368 Load music into the correct slots 2021-01-27 19:26:28 +00:00
Ted John a9755609c2 Move ride audio into own namespace 2021-01-27 18:45:28 +00:00
Ted John 28f4ec2b43 Implement code review suggestions 2021-01-27 18:45:28 +00:00
Ted John d9b8413ec4 Use IStream for zip streaming 2021-01-27 18:45:27 +00:00
Ted John 2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
ζeh Matt db4841ca45
Avoid copy and allocation for rendering the viewport (#13911) 2021-01-27 07:28:07 +00:00
ζeh Matt ea9d4f35c9
Merge pull request #13938 from janisozaur/nullptr_check
Add nullptr check in get_loaded_object_entry
2021-01-27 08:14:04 +02:00
ζeh Matt 8eab5d167e
Merge pull request #13869 from ZehMatt/feature/timescale
Allow the main game loop to scale the delta time
2021-01-27 06:09:51 +02:00
Ted John 4d8faee062 Increment plugin API version 2021-01-27 00:28:59 +00:00
Ted John 2fcaed8165 Allow more fields to be optional 2021-01-27 00:28:59 +00:00
Ted John 136783270f Fix initial value for showTextInput 2021-01-27 00:28:59 +00:00
Ted John c0d8786af8 Add text box widget 2021-01-27 00:28:59 +00:00
Duncan 8c5cd61b69
Split free id's into seperate vector (#13924) 2021-01-26 07:42:56 +00:00
Ted John be350f7e2e Add widget visible flag 2021-01-26 00:25:59 +00:00
Ted John c1a1f8f639 Fix #13953: invalid-read in StaffListWindow::RefreshList 2021-01-26 00:17:34 +00:00
Ted John c9a07eaa84
Refactor staff window to class (#13819) 2021-01-25 21:57:06 +00:00
ζeh Matt 329b228cac
Fix #13916: use correct constant for maximum station locations 2021-01-23 23:06:05 +01:00
Michał Janiszewski b1e43f828b Add nullptr check in get_loaded_object_entry 2021-01-23 22:26:02 +01:00
Duncan eb52391b9a
Remove next_in_quadrant (#13754)
* Use std::vector of quadrants

* Prevent ptr invalidation issues

* Remove next_in_quadrant

* Make review changes

* Rebuild next_in_quadrant for S6Export

* Fix formatting

* Constexpr where possible

* Increment network version and update replays
2021-01-23 07:36:46 +00:00
Duncan 3cc283adb2
Name MapFlashingFlags and split up guest/staff loop (#13865)
* Name MapFlashingFlags and split up guest/staff loop

* Use constexpr instead of macros
2021-01-23 06:45:14 +00:00
Duncan fb274f55d5
Fix #13905: Fix walking off end of array when saving (#13913)
Mistake made in refactor
2021-01-22 22:45:00 +00:00
ζeh Matt 73275b311b
Fix #13903: ride exits not being recognized (#13906) 2021-01-22 22:08:54 +00:00
ζeh Matt 54578a0870
Merge pull request #13901 from ZehMatt/fix-replaysnapshot
Fix replay snapshots comparing states with different ticks
2021-01-22 20:15:33 +02:00
Duncan 85df2c6854
Refactor guestlist (#13899)
* Refactor GuestList groups to use more standard functions

* Remove index

* Apply review comments
2021-01-22 18:02:22 +00:00
Duncan 1a11456f36
Rework remove floating to use EntityList (#13895) 2021-01-22 14:36:55 +00:00
ζeh Matt bc20efb3df
Merge pull request #13822 from ZehMatt/refactor/fixedvector
Avoid some allocations by using a fixed size vector
2021-01-22 16:17:14 +02:00
Matt 6034cef358
Fix replay snapshots comparing states with different ticks 2021-01-22 15:35:16 +02:00
Michael Steenbeek 20f959c833
Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Duncan f80531070b
Implement EntityLists (#13853)
* Implement EntityLists

* Remove dead code

* Use alternative name for iterator

* Add comments

* Increment network version

* Update replays

* Remove further dead code

* Update replays again
2021-01-21 18:36:34 +00:00
Duncan 3321720d4a
Split up misc list access to be type specific (#13870)
* Split up misc list access to be type specific

Took the opertunity to use a fold expression to simplify the code

* Increment network version
2021-01-21 08:29:02 +00:00
Matt f684ebd7d9
Allow the main game loop to scale the delta time 2021-01-20 23:13:02 +02:00
Duncan 8d25e4ccd9
Split closest peep calculation into Staff and Guest (#13880) 2021-01-20 14:21:22 +01:00
Ted John 19f0d8dfe9
Fix #13842: News is imported incorrectly 2021-01-20 12:35:11 +01:00
Michał Janiszewski 9d666700f9
Merge pull request #13873 from janisozaur/memleak
Fix some memleaks
2021-01-20 07:32:32 +01:00
ζeh Matt 40a23db14b
Fix #13871: Crash on banner window invalidation 2021-01-19 22:44:22 +01:00
Michał Janiszewski 4a21676d17 Plug memory leak in DataSerialiser 2021-01-19 22:11:08 +01:00
Michał Janiszewski 4bcf68d84a Use simple std::string assignment to plug memory leak 2021-01-19 22:10:15 +01:00
Duncan 354a131892
Use specific type for peep list access (#13831)
* Use specific type for peep list access

* Simplify calculation further
2021-01-19 17:57:22 +00:00
Michael Steenbeek 052306f992
Merge pull request #13854 from Gymnasiast/refactor/remove-regs
Remove remaining register usage
2021-01-18 22:12:03 +01:00
Gymnasiast 87ff851fd1
Rename flagsForSomething to remainingDistanceFlags 2021-01-18 22:11:28 +01:00
Basssiiie 813b111710
Fix #11912: Update active palette on selection 2021-01-18 21:25:57 +01:00
Gymnasiast 9a3d9c512e
Move register definition to TestPaint 2021-01-17 22:14:55 +01:00
Gymnasiast a2e84d161d
Remove last usage of registers 2021-01-17 20:11:50 +01:00
Gymnasiast cb63b3356a
Replace another occurence of regs.ebx 2021-01-17 20:06:35 +01:00
Gymnasiast 98a9827ee8
Remove unused regs.cx 2021-01-17 20:06:35 +01:00
Gymnasiast e4e4ca1122
Replace occurrence of regs.ax 2021-01-17 20:06:35 +01:00
Gymnasiast 2baf0f992f
Remove unused regs.dx 2021-01-17 20:06:35 +01:00
Gymnasiast d817d595eb
Replace occurrence of regs.ax 2021-01-17 20:06:33 +01:00
Gymnasiast d9fb4616a6
Replace 2 occurences of regs.eax 2021-01-17 20:06:05 +01:00
Gymnasiast b24962546e
Replace an occurence of regs.eax 2021-01-17 20:06:05 +01:00
Gymnasiast 7e50d1bbc5
Integrate loc_6DB967 2021-01-17 20:06:05 +01:00
Gymnasiast c200d7ab9c
Integrate loc_6DBE7F 2021-01-17 20:06:05 +01:00
Gymnasiast 60b0ba809a
Integrate loc_6DBE5E 2021-01-17 20:06:05 +01:00
Gymnasiast 39162b8f8e
Remove 2 occurrences of regs.ebx 2021-01-17 20:06:03 +01:00
Gymnasiast 9fb46e7fcc
Remove occurrence of regs.ebx 2021-01-17 20:05:31 +01:00
Gymnasiast 6561f1cb49
Remove occurrence of regs.ebx 2021-01-17 20:04:49 +01:00
Duncan 4ff5b9a89f
Reset Entity to 0 on removal (#13835)
This is to force any use after remove bugs to the surface
2021-01-16 15:48:39 +00:00
Michael Steenbeek 12edd610e6
Merge pull request #13841 from Gymnasiast/fix/13236
Fix #13236: New ride type appears as new vehicle type in research
2021-01-15 22:38:28 +01:00
Michael Steenbeek 32d8dadc2b
Replace some leftover use of uint8_t for ride subtype 2021-01-15 19:35:06 +01:00