Tulio Leao
2fdf38a0a9
Rename Peep::time_to_consume to use TitleCase
2020-06-08 23:04:04 -03:00
Tulio Leao
4f9227fd83
Rename Peep::intensity to Intensity
2020-06-08 22:55:07 -03:00
Tulio Leao
f1337768f5
Rename Peep::nausea_tolerance to use TitleCase
2020-06-08 22:41:15 -03:00
Tulio Leao
f732c2f1cd
Rename Peep::window_invalidate_flags to use TitleCase
2020-06-08 22:25:54 -03:00
Tulio Leao
1c566eebcb
Rename Peep::paid_on_drink to PaidOnDrink
2020-06-08 20:23:14 -03:00
Tulio Leao
61a598edba
Rename Peep::ride_types_been_on to use TitleCase
2020-06-08 20:10:15 -03:00
Tulio Leao
958ffabf15
Rename Peep::item_extra_flags to use TitleCase
2020-06-08 20:07:44 -03:00
Tulio Leao
ea6b3aa05a
Fix Peep watching state being based on wrong flag
2020-06-08 17:38:10 -03:00
Tulio Leao
18995664fe
Use constant to check null Peep::CurrentRide
2020-06-08 17:38:10 -03:00
Tulio Leao
1ee5653c8c
Rename Peep::photo2_ride_ref to use TitleCase
2020-06-08 17:36:35 -03:00
Tulio Leao
397c1137db
Rename Peep::photo3_ride_ref to use TitleCase
2020-06-08 17:36:35 -03:00
Tulio Leao
df87daaa6e
Rename Peep::photo4_ride_ref to use TitleCase
2020-06-08 17:36:35 -03:00
Tulio Leao
ccd76f8fc4
Rename Peep::current_ride to CurrentRide
2020-06-08 17:36:35 -03:00
Tulio Leao
c302b16386
Rename Peep::current_ride_station to use TitleCase
2020-06-08 17:36:34 -03:00
Tulio Leao
1ac3b3d2dc
Rename Peep::current_train to use TitleCase
2020-06-08 17:36:34 -03:00
Tulio Leao
335cbc900e
Rename Peep::current_car to CurrentCar
2020-06-08 17:36:34 -03:00
Tulio Leao
1376dc45c0
Rename Peep::current_seat to CurrentSeat
2020-06-08 17:36:34 -03:00
Tulio Leao
7d25480a4d
Rename Peep::time_to_sitdown to TimeToSitdown
2020-06-08 17:36:34 -03:00
Tulio Leao
267bec698f
Rename Peep::time_to_stand to TimeToStand
2020-06-08 17:36:34 -03:00
Tulio Leao
355bebc63a
Rename Peep::standing_flags to StandingFlags
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
Tulio Leao
c953da800a
Rename Peep::step_progress to StepProgress
2020-06-07 20:00:07 -03:00
Michael Steenbeek
a0c6752ff3
Merge pull request #11882 from tupaschoal/prevent-shadow-peep-4
...
Rename some Peep member variables to use TitleCase
2020-06-07 23:35:23 +02:00
Michael Steenbeek
7646f1b7e4
Merge pull request #11896 from hdpoliveira/update_flags
...
Update flags
2020-06-07 23:03:48 +02:00
hdpoliveira
5b1469b8b7
Create Vehicle::GetTrackType() ( #11895 )
2020-06-07 21:43:32 +01:00
hdpoliveira
480d1a6d6b
Create Vehicle::ClearUpdateFlag
2020-06-07 17:16:12 -03:00
Tulio Leao
95624c748e
Prefix Peep::NextInQueue with Guest
2020-06-07 10:46:18 -03:00
Tulio Leao
357db49819
Rename Peep::mechanic_time_sine_call to use TitleCase
2020-06-06 11:53:51 -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
duncanspumpkin
5c48e5f0bb
Remove AsPeep
2020-06-06 11:36:48 +01:00
duncanspumpkin
517ed57593
Remove IsPeep
2020-06-06 11:36:48 +01:00
duncanspumpkin
1758f2a133
Implement As and Is functions for SpriteBase
2020-06-06 11:36:42 +01: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
ce952961b9
Rename Peep::PeepIsLostCountdown to GuestIsLostCountdown
2020-06-04 19:16:24 +02:00
Tulio Leao
fabdb8cdef
Rename Peep::path_check_optimisation to PathCheckOptimisation
2020-06-04 19:16:24 +02:00
Tulio Leao
6dc08afdd0
Rename Peep:staff_id to StaffId
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
480009c0f6
Rename Peep::peep_is_lost_countdown to PeepIsLostCountdown
2020-06-04 19:16:11 +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
0e170d40d4
Rename Peep::staff_mowing_timeout to StaffMowingTimeout
2020-06-04 19:16:11 +02:00
hdpoliveira
a1be45d0b7
#9473 : Create Vehicle::UpdateFlag ( #11850 )
2020-06-01 08:35:30 -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
07f36a93de
Rename Peep::staff_lawns_mown to StaffLawnsMown
2020-05-30 20:35:05 -03:00
Tulio Leao
133ff992b6
Rename Peep::staff_rides_fixed to StaffRidesFixed
2020-05-30 20:35:05 -03:00
Tulio Leao
3f091d33e2
Rename Peep::paid_on_rides to PaidOnRides
2020-05-30 20:35:05 -03:00
Tulio Leao
719607f876
Rename Peep::staff_gardens_watered to StaffGardensWatered
2020-05-30 20:35:05 -03:00
Tulio Leao
6b56a353f9
Rename Peep::staff_rides_inspected to StaffRidesInspected
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
5bd3e88972
Rename Peep::staff_litter_swept to StaffLitterSwept
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
7d581e6978
Rename Peep::staff_bins_emptied to StaffBinsEmptied
2020-05-30 20:35:04 -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
Gymnasiast
9a9ab47856
Remove Twitch from the rest of the code
2020-05-28 09:28:32 +02:00
tylerleamon
51872f9741
Fix #10634 : Guests are unable to use uphill paths out of toilets
...
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-05-22 19:58:38 +02:00
Ted John
b710e417df
Split peep into guest and staff and add more fields
2020-05-14 18:35:21 +01: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
f0bd05cf6d
Part of #11158 : Remove more C-style casts ( #11743 )
2020-05-13 21:22:50 -03:00
Gymnasiast
ae194192d6
Clean up calls to MoveTo
2020-05-13 10:47:33 +02:00
Gymnasiast
11472f909d
Convert sprite_move to method
2020-05-13 10:47:32 +02:00
Gymnasiast
15b5d97795
Refactor shop items
2020-05-11 19:16:23 +02:00
Michael Steenbeek
a261b4ce33
Remove commented out code ( #11721 )
2020-05-11 13:54:15 +02:00
Ted John
7b8ffdb865
Refactor peep.intensity into new strict struct
2020-05-09 12:37:51 +01:00
Tulio Leao
28b3ac1693
Make track_block_get_previous() use CoordsXYE
2020-05-02 11:07:18 -03:00
Duncan
32eb7071a1
Fix #11550 : Use std::nullopt instead of empty brace ( #11595 )
...
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
hdpoliveira
e8c95e6e3a
Part of #9473 : Create Vehicle::IsUsedInPairs
...
Converted from vehicle_is_used_in_pairs
2020-05-01 19:49:01 -03:00
Gymnasiast
cc65564521
Use (RCT12)ObjectEntryIndex in more places
2020-05-01 22:06:13 +02:00
duncanspumpkin
fed148648c
Use IsPeep in more places
2020-04-28 07:57:47 +01:00
duncanspumpkin
5b07a76f05
Use sprite_identifier when identifying entitys
...
The linked list index is only meant to be used for accessing the linked lists. Using the wrong variable is unlikely to cause issues for this exact case but it makes things cleaner.
2020-04-27 18:47:51 +01:00
Gymnasiast
e67ebed697
Remove some Americanisms
2020-04-26 11:07:19 +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
44f62a97c2
Move PhotoItem to RTD ( #11415 )
2020-04-24 04:47:40 +02:00
Breno Rodrigues Guimarães
c0d0c7de16
Part of #11389 : Replace set_format_arg by Formatter::Common() ( #11388 )
2020-04-22 21:41:20 -03:00
Mustapha Elghoul
b138cb46ba
Name Flags in PeepThoughtToActionMap
2020-04-22 18:50:53 +02:00
Michał Janiszewski
2323cc1596
Use named casts instead of old-style casts
...
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Breno Rodrigues Guimarães
374b744477
Use Formatter to handle argument formatting for tooltips ( #11379 )
2020-04-21 12:38:59 +02:00
Breno Rodrigues Guimarães
2479256bc1
Adjust Formatter function names according to coding style ( #11378 )
2020-04-20 18:55:15 -03:00
Breno Rodrigues Guimarães
d4a2a98e20
Replacing set_format_arg_on macro in favor of a more C++zy solution ( #11350 )
2020-04-20 07:10:33 +02:00
duncanspumpkin
b81f6d0bed
Fix crash caused by bad pointers
2020-04-18 11:41:05 +01:00
duncanspumpkin
f9ae3dd980
Make review changes
2020-04-18 10:34:41 +01:00
ThomasZ
401504aff9
Fix #11075 : SpriteListHead Refactor
...
Refactor "for (spriteIndex = gSpriteListHead[SPRITE_LIST_PEEP]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex)" like for loops across files with replacing them by FOR_ALL_PEEPS(sprite_index, peep). The same for FOR_ALL_STAFF, FOR_ALL_GUESTS where necessary.
modify incorrect codestyle
modifying incorrect codestyle of the first attempted PR of issue 11075 (missing space after FOR_ALL_GUEST, FOR_ALL_STUFF ...)
modify codestyle further
Forgot to add one more space, correcting it.
another codestyle correction
apparently there is someting wrong with src/openrct2/peep/Peeps.cpp adding a newline after i = 0;
event further modifying codestyle
changing i = 0; to int i = 0;
another codestyle modification, at this point just trying to pass CI clang
adding another newline
another modification
2020-04-18 10:31:02 +01:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors
2020-04-17 17:03:33 +02:00
Michał Janiszewski
a197e529e8
Fix #6238 : Invalid tile elem iteration in Guest::UpdateUsingBin ( #11248 )
2020-04-08 01:03:02 +02:00
Michael Steenbeek
3a47e3b309
Fix #11166 : Null pointer read in Guest::UpdateRideAdvanceThroughEntrance ( #11182 )
2020-04-06 22:32:27 +02:00
Michał Janiszewski
971db142a5
Revert "Fix #11166 : Null pointer read in Guest::UpdateRideAdvanceThroughEntrance ( #11182 )"
...
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.
This reverts commit 598b85d0ca
.
2020-04-03 09:51:32 +02:00
Michael Steenbeek
598b85d0ca
Fix #11166 : Null pointer read in Guest::UpdateRideAdvanceThroughEntrance ( #11182 )
2020-04-01 12:45:08 +02:00
Duncan
2806104db0
Remove peep sort ( #11088 )
...
* Remove peep sort. No longer required.
Peeps are now only sorted in a temporary vector when the staff or guest list is open. This allows for simpler allocation of sprites
* Increment Network Version
2020-03-28 12:37:01 +00:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places ( #10992 )
2020-03-26 21:38:26 +01:00
Michael Steenbeek
81c6bb26e9
Prepare guest counters for more than 32767 guests ( #10989 )
2020-03-26 20:02:15 +01:00
Duncan
40160892a9
Rework GuestList to use a vector. ( #11014 )
...
* Rework GuestList to use a vector.
This is part of a chain of refactors that will be used to rework peep order in the sprite list
* Apply comments. Remove setting var_492 as no longer required
2020-03-26 07:23:30 +00:00
Ted John
d34dec9c27
Create ZoomLevel struct to add two new zoom levels
2020-03-23 15:54:03 +00:00
Gymnasiast
2f7a26e8da
Refactor station index a bit
2020-03-21 17:05:16 +01:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags ( #10947 )
2020-03-16 22:52:06 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates
2020-03-13 12:03:43 +01:00
Gymnasiast
3412c47a9e
Convert some Guest functions to methods
2020-03-13 10:50:22 +01:00
Michael Steenbeek
9b5e8140f9
Fix #10919 : Crash when assertion fails in heavily damaged park ( #10921 )
2020-03-13 10:35:03 +01:00
Gymnasiast
02c135e4fa
Clean up many staff functions
2020-03-07 23:07:47 +01:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Michael Steenbeek
904cad77b5
Merge pull request #10864 from Gymnasiast/refactor/station-starts
...
Change station starts to CoordsXY
2020-03-05 22:48:53 +01:00
Gymnasiast
dcf4301559
Use constant for invalid direction
2020-03-05 18:27:36 +01:00
Gymnasiast
2eb967b30d
Change station start to CoordsXY
2020-03-05 12:29:02 +01:00
Tulio Leao
09fad0ef7f
Change rct_viewport to use ScreenCoordsXY
2020-03-02 20:50:58 -03: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
Tulio Leao
2da96e8cfc
Revert to copy instead of const-ref for functions that edit content
2020-03-01 09:57:03 -03:00
Tulio Leao
475eed0a56
Receive CoordsXY by const ref instead of copy
2020-02-29 01:16:19 -03:00
Tulio Leao
b9186f4b0b
Receive TileCoordsXYZ by const ref instead of copy
2020-02-29 01:16:16 -03:00
Tulio Leao
181eaf768d
Receive CoordsXYZ by const ref instead of copy
2020-02-29 01:14:05 -03:00
Michael Steenbeek
f41f878581
Replace some usages of LocationXY(Z)16 ( #10699 )
2020-02-18 22:42:38 +01:00
Michał Janiszewski
d3db4f5cf8
Fix GCC10 warnings ( #10703 )
...
The warnings reported were:
```
../src/openrct2/peep/GuestPathfinding.cpp: In function ‘Direction peep_pathfind_choose_direction(TileCoordsXYZ, Peep*)’:
../src/openrct2/peep/GuestPathfinding.cpp:1371:81: error: ‘void* memset(void*, int, size_t)’ writing to an object of non-trivial type ‘struct<unnamed>’; use assignment instead [-Werror=class-memaccess]
1371 | std::memset(_peepPathFindHistory, 0xFF, sizeof(_peepPathFindHistory));
| ^
../src/openrct2/peep/GuestPathfinding.cpp:35:1: note: ‘struct<unnamed>’ declared here
35 | {
| ^
../src/openrct2/world/Sprite.cpp: In function ‘void reset_sprite_list()’:
../src/openrct2/world/Sprite.cpp:152:52: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘union rct_sprite’; use assignment or value-initialization instead [-Werror=class-memaccess]
152 | std::memset(_spriteList, 0, sizeof(_spriteList));
| ^
In file included from ../src/openrct2/world/Sprite.cpp:10:
../src/openrct2/world/Sprite.h:117:7: note: ‘union rct_sprite’ declared here
117 | union rct_sprite
| ^~~~~~~~~~
```
2020-02-18 00:00:19 +01:00
Michael Steenbeek
6d97601d6f
Replace hardcoded occurrences of maximum map size ( #10696 )
2020-02-13 20:27:13 +01:00
Matt
c381d9ff3f
Remove obsolete construction of CoordsXY object
2020-02-13 12:11:20 +01:00
Matt
758a7e432f
Use const reference instead of copy for location structures
2020-02-13 11:53:14 +01:00
Michael Steenbeek
e53d76ae2e
Fix errors in #10680 ( #10692 )
2020-02-12 23:11:04 +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
ca2f37ae7f
Remove opt::optional polyfill
...
std::optional is supported by Xcode 10. The non-polyfill variant was already used in our code, so this is not likely to break anything that wasn't broken before.
2020-02-01 22:25:03 +01:00
duncanspumpkin
5e9e9df7ce
Refactor invalidate_sprite
2020-01-19 17:16:42 +00:00
duncanspumpkin
bdcfd615ed
Refactor sprite_move
2020-01-19 17:16:41 +00:00
duncanspumpkin
a262f325ed
Refactor sprite_remove
2020-01-19 17:15:52 +00:00
duncanspumpkin
1b6bfa2bbf
Remove no longer strictly correct comments
2020-01-19 17:15:51 +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
Gymnasiast
af12421f2d
Apply fixes
2020-01-19 17:34:11 +01:00
modulo7
fdf0c17fd8
Name field var_CD of vehicle struct. Refactor to enum
2020-01-19 17:34:11 +01: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
duncanspumpkin
f04e791f7c
When in NO_MONEY mode still path to shops with prices
2020-01-16 20:28:38 +00:00
Tulio Leao
b829b22415
Use CoordsXYRangedZ on fence_in_the_way()
2020-01-11 11:13:01 -03:00
Michael Steenbeek
29922da871
Refactor calls to staff_is_patrol_area_set()
2019-12-31 10:10:40 +01:00
Duncan
c170926200
Refactor to prefer baseZ instead of height for big Z ( #10478 )
2019-12-31 09:33:27 +01:00
Michael Steenbeek
77494bbc73
Create definitions for some coords related stuff ( #10456 )
...
* Create definitions for some coords related stuff
* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Tulio Leao
2d7dccb0c2
Make Map::map_can_construct_*() use CoordsXYRangedZ ( #10462 )
...
* Make Map::map_can_construct_with_clear_at() use CoordsXYRangedZ
* Make Map::map_can_construct_at() use CoordsXYRangedZ
2019-12-30 15:00:42 +00:00
Michael Steenbeek
4b0dff92aa
Name word_981D6C ( #10471 )
2019-12-30 12:29:08 +01:00
Tulio Leao
98110c0544
Make Map::map_invalidate*() use CoordsXY ( #10437 )
...
* Make Map::map_invalidate_element() use CoordsXY
* Make Map::map_invalidate_tile_full() use CoordsXY
* Make Map::map_invalidate_tile_zoom0() use CoordsXY
* Make Map::map_invalidate_tile_zoom1() use CoordsXY
* Make Map::map_invalidate_tile() use CoordsXY
* Use CoordsXYRangedZ for map invalidation
* Fix vehicle tile invalidation use Z instead of Y coord
* Fix BannerRemoveAction sending Z TileCoords to invalidate tile
* Fix wrong tile invalidation on peep_update_walking_break_scenery
* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +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
a4e99695d4
Remove LocationXY usage on openrct2\peep\Staff.cpp
2019-12-27 08:49:35 -03:00
Tulio Leao
37973c162f
Remove LocationXY usage on openrct2\peep\Guest.cpp
2019-12-27 08:49:35 -03:00
ζeh Matt
518780c3e8
Merge pull request #10422 from ZehMatt/refactor/gCommandExpenditure
...
Refactor out gCommandExpenditureType
2019-12-25 01:49:46 +01:00
Tulio Leao
6ab46bd74a
Make Map::map_get_track_element_at_from_ride() use CoordsXYZ
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
85ecb52e7c
Manually replace more Z occurrences
2019-12-23 20:05:26 +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
Matt
52ee9c6896
Use enum class for ExpenditureType
2019-12-22 20:51:55 +01:00
Matt
79acb6a073
Move staff wage data to Staff.cpp/h
2019-12-22 20:51:55 +01:00
Matt
c24112ffad
Refactor out gCommandExpenditureType
2019-12-22 20:51:49 +01:00
duncanspumpkin
45403ac2d3
Move station_starts to TileCoordsXY
2019-12-21 11:48:13 +00:00
Michael Steenbeek
a2b9598341
Modify code using Location8 to use isNull()/setNull() ( #10403 )
2019-12-21 11:34:46 +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
Tulio Leao
af7b364946
Prefer map_is_location_valid over hardcoded map limits ( #10373 )
2019-12-14 22:50:34 +01:00
Tulio Leao
801e6e085d
Use CoordsXY on Map::map_surface_is_blocked() ( #10369 )
...
* Use CoordsXY on Map::map_surface_is_blocked()
* Update src/openrct2/peep/GuestPathfinding.cpp
* Use map_is_location_valid() instead of hardcoded number
2019-12-14 09:57:13 +01:00
Tulio Leao
1532ee2b23
Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre()
2019-11-30 16:47:23 +01:00
Tulio Leao
72b4d93ad2
Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2
2019-11-18 08:01:04 -03:00
Tulio Leao
b793d7e79a
Avoid dereferencing map_get_first_element_at nullptr on libopenrct2 ( #10013 )
...
* Avoid dereferencing map_get_first_element_at nullptr on Map.cpp
* Avoid dereferencing map_get_first_element_at nullptr on MapAnimation.cpp
Returning true or internal control variable, based on what was seen on `map_animation_invalidate_track_onridephoto`
* Avoid dereferencing map_get_first_element_at nullptr on Park.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Scenery.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Sprite.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TileInspector.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Wall.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Fountain.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Footpath.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Entrance.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Banner.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Vehicle.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TrackDesignSave.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TrackDesign.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Track.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Station.cpp
* Avoid dereferencing map_get_first_element_at nullptr on RideRatings.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Ride.cpp
* Avoid dereferencing map_get_first_element_at nullptr on S4Importer.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Staff.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Peep.cpp
* Avoid dereferencing map_get_first_element_at nullptr on GuestPathfinding.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Guest.cpp
* Avoid dereferencing map_get_first_element_at nullptr on VirtualFloor.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Paint.TileElement.cpp
* Fix issues raised on review
* Fix remaining review issues.
* Early exit on loops if tileElement is nullptr
* Fix clang-format issues
2019-10-09 15:02:21 +01:00
Ted John
15767c3be3
Fix output result of remove_unused_objects ( #10029 )
2019-10-01 22:30:11 +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
gill984
565ad3798d
Fix #9957 : Guests complain about running out of money in no money parks
2019-09-22 16:52:53 +02:00