Commit Graph

729 Commits

Author SHA1 Message Date
Tulio Leao 7d25480a4d Rename Peep::time_to_sitdown to TimeToSitdown 2020-06-08 17:36:34 -03:00
Tulio Leao 3ad2471a24 Rename Peep::special_sprite to SpecialSprite 2020-06-08 17:36:34 -03:00
Tulio Leao 89a084cbc9 Rename Peep::action_sprite_type to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao 0d84779763 Rename Peep::next_action_sprite_type to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao d9e36e5592 Rename Peep::action_sprite_image_offset to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao e98cea3615 Rename Peep::action* to Action* 2020-06-08 17:36:33 -03:00
Michael Steenbeek e83b86df4d
Replace occurrences of OpenRCT with OpenRCT2 (#11898) 2020-06-08 15:11:07 +02:00
Tulio Leao c953da800a Rename Peep::step_progress to StepProgress 2020-06-07 20:00:07 -03:00
Tulio Leao 95624c748e Prefix Peep::NextInQueue with Guest 2020-06-07 10:46:18 -03:00
Tulio Leao d195c9fb1d Rename Peep::next_in_queue to NextInQueue 2020-06-06 11:53:51 -03:00
Tulio Leao f1f915b540 Rename Peep::maze_last_edge to MazeLastEdge 2020-06-06 11:53:51 -03:00
Tulio Leao 1a3f8490ad Rename Peep::direction to PeepDirection 2020-06-06 11:53:51 -03:00
Tulio Leao 8a50fafdc8 Rename Peep::interaction_ride_index to use TitleCase 2020-06-06 11:53:51 -03:00
Tulio Leao 8400a7f54d Rename Peep::time_in_queue to TimeInQueue 2020-06-06 11:53:51 -03:00
Tulio Leao 3748cdb194 Rename Peep::rides_been_on to RidesBeenOn 2020-06-06 11:53:51 -03:00
Tulio Leao 4cdfccb338 Rename Peep::id to Id 2020-06-06 11:53:51 -03:00
Tulio Leao 77af2326ff Rename Peep::cash_in_pocket to CashInPocket 2020-06-06 11:53:50 -03:00
Tulio Leao 0fc7bd1afd Rename Peep::cash_spent to CashSpent 2020-06-06 11:26:04 -03:00
Tulio Leao cf4b052cd4 Rename Peep::time_in_park to TimeInPark 2020-06-06 11:26:04 -03:00
Tulio Leao 4c459fada3 Rename Peep::rejoin_queue_timeout to use TitleCase 2020-06-06 11:26:00 -03:00
Tulio Leao 3dad0fd500 Rename Peep::previous_ride to PreviousRide 2020-06-06 11:26:00 -03:00
Tulio Leao 7701b1827d Rename Peep::previous_ride_time_out to use TitleCase 2020-06-06 11:25:47 -03:00
Tulio Leao e08c1b44b2 Rename Peep::thoughts to Thoughts 2020-06-06 10:03:58 -03:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
Tulio Leao 57a2dab064
Rename Peep::NoActionFrameNum to WalkingFrameNum 2020-06-04 19:16:25 +02:00
Tulio Leao c9f071a766
Rename Peep::TimeOnRide to GuestTimeOnRide 2020-06-04 19:16:25 +02:00
Tulio Leao fabdb8cdef
Rename Peep::path_check_optimisation to PathCheckOptimisation 2020-06-04 19:16:24 +02:00
Tulio Leao d05e5f8dc7
Rename Peep::guest_heading_to_ride_id to GuestHeadingToRideId 2020-06-04 19:16:12 +02:00
Tulio Leao 9fbaf61e07
Rename Peep::staff_orders to StaffOrders 2020-06-04 19:16:12 +02:00
Tulio Leao 7357eeca60
Rename Peep::photo1_ride_ref to Photo1RideRef 2020-06-04 19:16:11 +02:00
Tulio Leao a2a0fad886
Rename Peep::peep_flags to PeepFlags 2020-06-04 19:16:11 +02:00
Tulio Leao 53bff03a3f
Rename Peep::pathfind_goal to PathfindGoal 2020-06-04 19:16:11 +02:00
Tulio Leao cad809275e
Rename Peep::pathfind_history to PathfindHistory 2020-06-04 19:16:11 +02:00
Tulio Leao f2808eecbe
Rename Peep:no_action_frame_num to NoActionFrameNum 2020-06-04 19:16:11 +02:00
Tulio Leao 0933cd4e57
Rename Peep::litter_count to LitterCount 2020-06-04 19:16:11 +02:00
Tulio Leao 7665d1386f
Rename Peep:time_on_ride to TimeOnRide 2020-06-04 19:16:11 +02:00
Tulio Leao e1d0d21b5e
Merge pull request #11849 from hdpoliveira/swing_vars
Rename swing-related variables in Vehicle
2020-06-01 08:27:57 -03:00
hdpoliveira 86550dad20 Rename swing-related variables in Vehicle 2020-05-31 16:37:09 -03:00
Tulio Leao e18abc7e3d Rename NoOf... to AmountOf... on Peep 2020-05-31 09:13:56 -03:00
Tulio Leao 0c502988ef Rename Peep::disgusting_count to DisgustingCount 2020-05-30 20:35:06 -03:00
Tulio Leao a987a9ee5e Rename Peep::paid_to_enter to PaidToEnter 2020-05-30 20:35:06 -03:00
Tulio Leao 3f091d33e2 Rename Peep::paid_on_rides to PaidOnRides 2020-05-30 20:35:05 -03:00
Tulio Leao 414cff9b91 Rename Peep::paid_on_food to PaidOnFood 2020-05-30 20:35:05 -03:00
Tulio Leao c2f7efa328 Rename Peep::paid_on_souvenirs to PaidOnSouvenirs 2020-05-30 20:35:05 -03:00
Tulio Leao a729ac1589 Rename Peep::no_of_food to NoOfFood 2020-05-30 20:35:04 -03:00
Tulio Leao bc7ea40c4b Rename Peep::no_of_drinks to NoOfDrinks 2020-05-30 20:35:04 -03:00
Tulio Leao 625f7859a4 Rename Peep::no_of_souvenirs to NoOfSouvenirs 2020-05-30 20:35:04 -03:00
Tulio Leao fc1ba40dc8 Rename Peep::vandalism_seen to VandalismSeen 2020-05-30 20:35:04 -03:00
Tulio Leao fd71b1b009 Rename Peep::voucher_type to VoucherType 2020-05-30 20:35:04 -03:00
Tulio Leao bf228abf55 Rename Peep::voucher_arguments to VoucherArguments 2020-05-30 20:35:03 -03:00
Michał Janiszewski 7f8a65c095 Make strlogicalcmp case insensitive 2020-05-20 08:35:41 +02:00
Michał Janiszewski 16d8c64cea Improve strlogicalcmp for strings of unequal lengths
This version actually works and doesn't overrun provided buffers
2020-05-20 08:33:25 +02:00
Tulio Leao e87343f9c6
Rename MoneyEffect member variables to prevent shadowing (#11748) 2020-05-16 17:04:31 -03:00
Tulio Leao c17aa095d5 Rename Peep::surrounding_thought_timeout > SurroundingsThoughtTimeout 2020-05-13 23:28:16 -03:00
Tulio Leao 32c8e5614f Rename Peep::angriness to Angriness 2020-05-13 23:25:09 -03:00
Tulio Leao 589a7a48be Rename Peep::time_lost to TimeLost 2020-05-13 23:22:08 -03:00
Tulio Leao a216cb9930 Rename Peep::days_in_queue to DaysInQueue 2020-05-13 23:19:41 -03:00
Tulio Leao 128c1993c1 Rename Peep::balloon_colour to BalloonColour 2020-05-13 23:16:43 -03:00
Tulio Leao 6c57f33dc9 Rename Peep::umbrella_colour to UmbrellaColour 2020-05-13 23:14:45 -03:00
Tulio Leao 222f8df6cb Rename Peep::hat_colour to HatColour 2020-05-13 23:11:28 -03:00
Tulio Leao 3b632fcf95 Rename Peep::favourite_ride to FavouriteRide 2020-05-13 23:06:40 -03:00
Tulio Leao 7a6de648fe Rename Peep::favourite_ride_rating to FavouriteRideRating 2020-05-13 23:03:58 -03:00
Tulio Leao 14e0cc5e4a Rename Peep::item_standard_flags to ItemStandardFlags 2020-05-13 23:01:03 -03:00
Michael Steenbeek d7637cd70f
Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Gymnasiast 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Michael Steenbeek 8127437de1
Reduce direct ride type checking; move available piece lookup to RTD (#11353) 2020-04-19 13:32:43 +02:00
Gymnasiast 9044d0a263
Fix failing tests 2020-04-17 17:03:33 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Gymnasiast 8a8eba0829
Clean up station functions and construction markers in TestPaint 2020-04-16 12:44:56 +02:00
duncanspumpkin bc04fb29c2 Remove all replay tests from 32bit builds 2020-04-12 11:18:23 +01:00
Gymnasiast 2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +01:00
Gymnasiast 6b9b60aa94
Fix compilation error in pathfinding test 2020-03-13 20:30:23 +01:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Gymnasiast c9afcaa5b3
Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast 38e7aafd07
Remove unused TestPaint defines (including one LocationXY16 occurrence) 2020-03-01 22:15:28 +01:00
Michael Steenbeek d5c4d78d49
Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Gymnasiast 63430412be
Move TrackDataOld.cpp to Testpaint project 2020-02-22 20:29:35 +01:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
Ted John 5dbd3c7c0c Allow tests to work with CRLF test data 2020-02-02 15:47:50 +00:00
duncanspumpkin 85f2b0b21d Fix testpaint 2020-01-19 17:37:24 +00:00
duncanspumpkin 28565b370d Fix clang format 2020-01-19 17:19:45 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Michael Steenbeek b1e8caa575
Merge pull request #10570 from tupaschoal/use-more-coords-6
Prefer CoordsXY* on more places
2020-01-19 18:06:20 +01:00
Gymnasiast af12421f2d
Apply fixes 2020-01-19 17:34:11 +01:00
Tulio Leao b7e9b36a27 Prefer std::array and COORDS defines on Map::CoordsDirectionDelta 2020-01-19 13:30:29 -03:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Gymnasiast 0d09a645fc
Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +01:00
Michael Steenbeek 97b1c888b3 Also change gClipSelectionA/B in TestPaint (#10485) 2019-12-31 07:12:17 +00:00
Tulio Leao 06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek 64f7cac6d6
Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00
Michael Steenbeek 8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01:00
Tulio Leao 0c2e5747b8 Clarify test coords conversions 2019-12-24 11:19:06 -03:00
Tulio Leao 6c998d7b4d Make Map::map_get_track_element_at() use CoordsXYZ 2019-12-24 11:19:03 -03:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
duncanspumpkin b34defa907 Fix testpaint 2019-12-21 12:18:34 +00:00
Michael Steenbeek 6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Tulio Leao 7e7b4029a9 Simplified conversions from TileCoordsXYZ to CoordsXY 2019-12-19 08:12:42 -03:00
Tulio Leao aea755bd70 Allow TileCoordsXYZD to generate CoordsXYZD equivalent 2019-12-19 00:11:26 -03:00
Tulio Leao 5c657bde9f Remove map_get_surface_element_at operating with TileCoordsXY 2019-12-18 23:47:17 -03:00
Tulio Leao 7c75db2b2d Make map_get_surface_element_at only accept Coords objects 2019-12-18 23:46:50 -03:00
Tulio Leao c71c4284d0 Make map entrance/exit fetching functions use only CoordsXY objects 2019-12-17 23:55:46 -03:00
Tulio Leao 03e7e29b21 Make map entrance/exit fetching functions use Coords objects 2019-12-14 12:13:09 -03:00
Matt 6dd00787f6
Add missing static keywords 2019-10-20 14:13:59 +02:00
Matt 3d7c06f4b3
Change fopen_s to fopen and use EXPECT_EQ for COMPARE_FIELD 2019-10-20 14:13:59 +02:00
Matt e6d520e371
Add missing include 2019-10-20 13:49:39 +02:00
Matt 8243c2b64e
Update CMakeLists.txt 2019-10-20 13:49:39 +02:00
Matt 6177255991
Add S6 Import/Export test and remove old NetworkLoadSave test 2019-10-20 13:49:35 +02:00
Michael Steenbeek a5700a3d07
Merge pull request #9959 from richard-fine/directions
Convert more code to use proper Direction symbols
2019-09-22 16:59:41 +02:00
Richard Fine 0e04dbeea1 Allow SwapBE to swap non-uint types
If we want to have more semantically meaningful types (like Direction), it's useful to be able to support those in the DataSerializer too. Swapping bytes for entire structures is probably never going to make sense, but for types that are pure wrappers around integer types, we want to be able to swap them as if they were the integer they wrap.
2019-09-01 18:40:11 +01:00
Richard Fine 6449393d50 Use Direction type in a bunch of the pathfinding code 2019-09-01 18:38:03 +01:00
Gymnasiast bb73dd0dfb
Refactor track element to use 16 bytes 2019-08-31 13:14:19 +02:00
Gymnasiast abdf6e695a
Fix testpaint 2019-08-31 10:01:57 +02:00
Gymnasiast f365bc3cb7
Create getters and setters for occupied quadrant 2019-08-27 21:12:48 +02:00
Gymnasiast ec5ba20992
Create dedicated method for SetLastForTile() 2019-08-25 16:13:02 +02:00
Gymnasiast 6e200459d3
Refactor some accessors to tile element type and flags fields 2019-08-24 22:42:47 +02:00
Ted John d5a1b4fc8f Fix #9920: Ghost pieces break maps on multiplayer for the client (#9928) 2019-08-23 21:05:00 +02:00
duncanspumpkin 5333dc4295 Return a SurfaceElement from get_surface_element 2019-08-19 20:04:56 +01:00
Matt 45452ad2c8
Run replay tests with network disabled 2019-08-12 18:04:08 +02:00
Ted John cd4eb86a7c
Merge pull request #9725 from IntelOrca/refactor/ride-manager
Refactor ride list
2019-08-07 21:03:17 +01:00
ζeh Matt 7730b35d82
Merge pull request #9571 from ZehMatt/replay-cleanup
Replay cleanup
2019-08-05 18:31:03 +02:00
Ted John f49447bed5 Fix compile errors 2019-08-04 17:47:16 +01:00
Ted John a863c7ae50 Remove rest of FOR_ALL_RIDES instances 2019-08-04 16:44:17 +01:00
Ted John 414b53b56d Remove ride classifications 2019-08-04 16:43:50 +01:00
Ted John a3fe00f0a3 Refactor ride list to a manager with iterator 2019-08-04 16:43:50 +01:00
Ted John 3f8890afde Fix remaining errors and a few bugs 2019-07-29 19:18:16 +01:00
Matt 17918d2f6b
Remove replays 2019-07-14 16:45:55 +02:00
Ted John 6f0298deb3 Refactor ride measurement storage 2019-06-09 11:55:41 +02:00
Gymnasiast f0f09c7f6b Fix tests 2019-05-28 16:50:08 +01:00
Tom Lankhorst ed353faccf Implement replace_if condition lambda
Fix include typo and CS
2019-05-11 13:54:16 +01:00
Tom Lankhorst 744f2225ed Write platform tests 2019-05-11 13:54:16 +01:00
Gymnasiast 17ddd451db Fix tests, fix formatting 2019-05-07 20:04:07 +02:00
NexGenration e6c88a05db Make peep generate a static member function 2019-05-07 19:34:50 +02:00
Michael Steenbeek 5a906b2378
Port more functions to Ride struct (#9119) 2019-04-20 22:22:39 +02:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Matt 37c3809744 Implement partial multicore rendering 2019-03-31 15:50:55 +02:00
Duncan 9c4430736d
Use get track element (#8884)
* Use get_track_element and change its return type

* Make things work

* Use helper functions where possible
2019-03-16 11:21:36 +00:00
Matt 15838861cd Add load and save test. 2019-03-02 13:11:08 +01:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
duncanspumpkin 9d78bb0d4e Fix compile and formating 2019-02-27 10:54:08 +00:00
duncanspumpkin eb9ecea92e Add IsGhost to the testpaint calls 2019-02-26 08:50:04 +00:00
Matt c631177877 [ci skip] Add bpb.sv6 to the replays with 7000 ticks. 2019-02-16 09:09:51 +01:00
Michał Janiszewski 5e74f7487d
Merge pull request #8700 from janisozaur/icc-fixes
Icc fixes
2019-02-10 12:21:33 +01:00