Commit Graph

55 Commits

Author SHA1 Message Date
Duncan 09611cd9a5
Remove snake_case from OpenRCT2/entity folder 2023-01-17 21:16:36 +00:00
Michael Steenbeek bb55c6ce66
Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +00:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Duncan 67bbc8560d
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map)

* Initial few desnaking of Map.h
2022-10-11 19:39:24 +01:00
Gymnasiast 830fedb6b8
Replace load_from_sv6() and load_from_sc6() 2022-10-08 20:12:35 +02:00
duncanspumpkin 3e8dc1b2ac Remove snakes from the foopaths 2022-10-04 20:08:14 +01:00
Hielke Morsink e2da19f0f7
Add missing includes 2022-07-29 18:45:10 +02:00
LordOfLunacy fa71bbc1b2 Implement requested changes
- Change the GuestPathfinder object to a smart pointer

 - Improved function signatures

 - Added javadoc comments to the abstract base class

 - Converted pointers to references in  pathfinding function calls
2022-05-14 15:28:24 -04:00
LordOfLunacy eddda64e20 Fixed formatting 2022-05-13 19:59:47 -04:00
LordOfLunacy 45013a90cc Part of pathfinding rework 2022-05-13 19:18:46 -04:00
Michał Janiszewski d81b36e16f Update GoogleTest version 2022-05-08 22:22:03 +02:00
Hielke Morsink ad0a2a8f96
Remove entrance/exit location functions 2022-02-18 23:28:17 +02:00
Hielke Morsink f47c1b9f96
Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
ζeh Matt a2470c0573
Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
ζeh Matt 9f23449ffb
Move Staff/Guest/Peep to entity 2021-11-26 18:26:19 +02:00
Duncan 3f19d6f7d7
Split Peep header Guest into separate header (#15810)
* Move guest functions and classes to guest header

* Reduce includes of Peep.h
2021-10-28 21:38:23 +01:00
ζeh Matt eb2de0222b
Use GetLocation in more places 2021-09-28 03:16:04 +03:00
ZehMatt 47b782ec2d
Use correct type in path finding code 2021-09-10 19:10:12 +03:00
Hielke Morsink 617bb698ae
Use UK spelling of center 2021-06-29 00:03:45 +02:00
Duncan 8eabdf8c8f
Split guest and staff peep variables (#14462)
* Split guest and staff peep variables

* Move variable location

* Increment network version

* Update replays
2021-04-18 17:48:21 +01:00
Matt 62baee3adb
Allow passing of destination tolerance via SetDestination 2021-02-21 09:52:33 +02:00
Matt 965041b437
Remove direct access to DirectionX and DirectionY 2021-02-21 09:52:33 +02:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Richard Fine 438b197b80
Debunch peeps (#12917)
* Stop guests from being forced to the center line of a path over time

Change the way we apply randomness to peep destinations when moving from one tile to the next, to allow peeps that are moving along a straight path to maintain their perpendicular offset relative to the path direction, instead of being (eventually) forced back to the center line.

* Update test expectations

The changes to guest movement mean that the number of steps taken for these expected paths are now slightly different to before.
2020-11-03 22:30:36 -03:00
Richard Fine 542eb873fc Consolidate pathfinding code
Consolidate all the guest pathfinding code from Peep.cpp into GuestPathfinding.cpp, and make a dedicated header for GuestPathfinding to help make it easier to see what the actual public interface is to the pathfinding system.
2020-09-12 14:59:40 -04:00
TomasZilinek f08206a5d0
Fix #11963 - Refactor Peep::OutsideOfPark (#12060)
* Fix #11963 - Refactor Peep::OutsideOfPark

Changed the definition of Peep::OutsideOfPark from uint8_t to bool and refactored all its occurences in code accordingly.

* Fix #11963 - Refactor Peep::OutsideOfPark

One forgotten instance of Peep::OutsideOfPark occurrence

* Fix #11963 - Refactor Peep::OutsideOfPark

Fix code according to a review suggestion.
2020-06-28 08:39:30 +01:00
Tulio Leao e54a3d89f2
Rename some Peep member variables to use TitleCase (#11931)
* Rename Peep::destination_tolerance to use TitleCase

* Rename Peep::destination_y to use TitleCase

* Rename Peep::destination_x to use TitleCase

* Rename Peep::trousers_colour to use Title Case

* Rename Peep::tshirt_colour to use TitleCase

* Rename Peep::no_of_rides to use Title Case

* Rename Peep::staff_type to use TitleCase

* Rename Peep::type to use TitleCase

* Rename Peep::sprite_type to use TitleCase

* Rename Peep::sub_state to use TitleCase

* Rename Peep::state to use TitleCase

* Rename Peep::outside_of_park to use TitleCase

* Rename Peep::next_flags to use TitleCase

* Rename Peep::name to use TitleCase

* Rename Peep::NoOfRides to GuestNoOfRides

* Rename Peep::Type to AssignedPeepType

* Rename Peep::GuestNoOfRides to GuestNumRides
2020-06-14 06:31:08 +01:00
Tulio Leao 1a3f8490ad Rename Peep::direction to PeepDirection 2020-06-06 11:53:51 -03:00
Tulio Leao d05e5f8dc7
Rename Peep::guest_heading_to_ride_id to GuestHeadingToRideId 2020-06-04 19:16:12 +02: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
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
Gymnasiast 0d09a645fc
Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +01:00
Tulio Leao 7e7b4029a9 Simplified conversions from TileCoordsXYZ to CoordsXY 2019-12-19 08:12:42 -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
Richard Fine 6449393d50 Use Direction type in a bunch of the pathfinding code 2019-09-01 18:38:03 +01:00
duncanspumpkin 5333dc4295 Return a SurfaceElement from get_surface_element 2019-08-19 20:04:56 +01:00
Ted John a863c7ae50 Remove rest of FOR_ALL_RIDES instances 2019-08-04 16:44:17 +01:00
Ted John 3f8890afde Fix remaining errors and a few bugs 2019-07-29 19:18: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
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Tom Lankhorst 6a42a95495
Refactor random engine
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Ted John 8701286772
Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Richard Fine cec457fbf1 Reformat 2019-01-02 14:12:51 +00:00
Richard Fine 315ea057fe Verify that peeps stay on paths
As per PR recommendation, confirm that a peep is still on the footpath for every step of the pathfinding tests.
2019-01-02 14:12:51 +00:00
Richard Fine bb4e79ddda Rework tests to use ride entrances as path targets
It turns out that trying to just give a peep a pathfinding goal and then let them loose doesn't work, because every time they reach a junction, the pathfinder has them walk 'aimlessly' instead of pursuing their target. That's why we were seeing some very large step counts in previous tests - they were (eventually) walking onto the target square, but only after lots of wandering around in circles.

This commit reworks the test data to contain an actual ride for each test scenario, where the peep will path to the tile in front of the ride entrance. A nice side benefit of this is that the ride names must match the test names, so you can now tell from looking at the rides in the test data which one is used for which test instance.

The 'yellow marker' tiles for goal positions are also removed here, as we're deriving goal positions from the ride entrances instead.
2019-01-02 14:12:51 +00:00
Richard Fine c8c1abd10a Reformat 2019-01-02 14:12:51 +00:00