1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00
Commit Graph

67 Commits

Author SHA1 Message Date
Aaron van Geffen
531cb68727 RideManager: use explicit game state rather than using implicit global 2025-09-11 13:42:18 +02:00
Gymnasiast
fa15bc56d2 Rename INVALID_DIRECTION to kInvalidDirection 2025-03-25 22:47:08 +01:00
ζeh Matt
cac21504cd Refactor PerformNextAction, we don't need a wrapper 2025-03-20 21:23:32 +02:00
Michael Steenbeek
05b64985f4 Update Ride struct to new codestyle 2025-03-09 00:26:25 +01:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
4f32028e01 Move RideManager struct into its own compilation unit (#23379)
* Move RideManager struct into its own compilation unit

* Move RidesEndOfUsedRange into GameState_t

* Let RideManager keep a GameState_t& internally
2024-12-11 15:54:45 +01:00
Michael Steenbeek
a2ed026264 Split up remaining tile elements 2024-10-15 22:02:31 +02:00
ζeh Matt
3755f3a6d1 Remove two more globals, pass them as arguments 2024-09-30 22:31:13 +03:00
Matt
9d9f0af0cd Pathfinding cleanup (#21407)
* Eliminate unnecessary abstraction for path finding

* Pass the goal to ChooseDirection instead of using globals

* Remove gPeepPathFindGoalPosition and pass it by parameter instead

* Remove _peepPathFindIsStaff and make ignoring banners explicit

* Code style and naming fixups

* Apply clang-format

* Add comment specifying to why it does not ignore banners

* Apply review comments
2024-02-22 21:52:01 +02:00
ζeh Matt
ae3c1037ad Properly name what the getter/setter for surface object index is 2023-08-26 20:50:06 +03:00
Matthias Moninger
379287ed0f Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
ζeh Matt
ac583569da Remove Platform::CoreInit 2023-06-27 23:35:11 +03:00
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