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
Richard Fine
92f50efedc
Formatting fixes
2019-09-01 19:10:27 +01:00
Richard Fine
31ce0f20f7
Use range-based for loops for checking all directions
2019-09-01 18:40:28 +01:00
Richard Fine
3131bfdc74
Use INVALID_DIRECTION in a bunch of places
2019-09-01 18:40:24 +01:00
Richard Fine
5ff78e48c7
Reduce usage of GetDirectionWithOffset()
...
GetDirectionWithOffset(2) is the same thing as 'direction_reverse(GetDirection())', and the latter is more readable.
2019-09-01 18:40:08 +01:00
Richard Fine
6449393d50
Use Direction type in a bunch of the pathfinding code
2019-09-01 18:38:03 +01:00
Richard Fine
06b2f66ba1
Use Direction type for peep::direction
2019-09-01 16:08:01 +01:00
Matt
e0afefc6de
Add missing Invalidate calls
2019-08-21 12:31:05 +02:00
Matt
66793e664a
Refactor some unnecessary Invalidate calls and call member function if available
2019-08-21 12:08:19 +02:00
duncanspumpkin
5fe5f8e964
Refactor audio_play_sound_at_location to use CoordsXYZ
2019-08-19 20:04:58 +01:00
duncanspumpkin
af39ff20af
Refactor to use new inheritence and remove duplicate/redundant code
2019-08-19 20:04:58 +01:00
duncanspumpkin
bc12618d46
Clang format
2019-08-19 20:04:57 +01:00
duncanspumpkin
5b92b64ec7
Refactor map_get_path_element_at to return PathElement and use CoordsXYZ
2019-08-19 20:04:57 +01:00
duncanspumpkin
c6452095ca
Refactor tile_element_height to use CoordsXY
2019-08-19 20:04:57 +01:00
duncanspumpkin
5ba9d55415
Refactor map_is_location_owned_or_has_rights to use CoordsXY
2019-08-19 20:04:57 +01:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
duncanspumpkin
9619fd384d
Refactor map_is_location_owned to use CoordsXYZ
2019-08-19 20:04:56 +01:00
duncanspumpkin
9721b8a1bb
Fix #9878 . Prevent peeps from aimlessly wanderings/drowing when exiting rides.
...
Mistake made whilst refactoring
2019-08-15 20:24:01 +01:00
Duncan
3da62e4697
Refactor of Peep Update Action ( #9793 )
...
* Change the parameters of UpdateAction
* Use std::optional to make things a bit safer
* Use the core optional header to keep xcode happy
2019-08-15 18:32:19 +01:00
Matt
cc6321048f
Refactor window_invalidate to use rct_window::Invalidate
2019-08-11 17:22:00 +02:00
Ted John
d730a76809
Fix #9844 : Guests can't enter park
2019-08-10 15:22:03 +01:00
Ted John
9954f0b725
Add nullptr checks for more instances of get_ride ( #9819 )
2019-08-09 14:20:59 +01:00
Ted John
ab7b17fc4e
Add nullptr checks for get_ride in libopenrct2 ( #9788 )
2019-08-08 22:58:56 +01:00
Duncan
659b4d8f9f
Clean up some litter in the codebase ( #9753 )
...
13CA740 and 141F568 have been doing mostly nothing since the game action refacotr. Before that they didn't do much as I've never found any instance where the code was hit.
2019-08-08 06:05:58 +01:00
Duncan
75210ef3e2
Merge pull request #9742 from duncanspumpkin/fix_9729
...
Fix 9729
2019-08-08 06:02:08 +01:00
duncanspumpkin
ad06491d21
Abstract the common score generator
2019-08-07 20:35:20 +01:00
duncanspumpkin
8ba5b43636
Fix #9729 . Change peep pathfinding to take entrance height into account
...
When choosing which entrance to head to peeps would not take into account the height difference between the locations. This caused peeps to choose badly especially when useing lift transport rides.
2019-08-06 21:28:34 +01:00
Ted John
8022211112
Refactor guest ride consideration
2019-08-04 16:44:17 +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
7ce2f38c92
Fix formatting
2019-07-29 20:01:49 +01:00
Ted John
40d49b93d3
Do not use user strings for peep names
2019-07-29 19:18:16 +01:00
Ted John
f8b08b334e
Fix a few more bugs
2019-07-29 19:18:16 +01:00
Ted John
3f45976009
Fix openrct2ui errors
2019-07-29 19:18:16 +01:00
Ted John
3155c661fa
Refactor format peep action
2019-07-29 19:18:16 +01:00
Ted John
6fff2079f9
Refactor ride name to dynamic args and std::string
2019-07-29 19:18:16 +01:00
Jim Armstrong
a432a8a514
Fix #9487 : Access violation in UpdateRideEnterVehicle ( #9577 )
...
* Fix #9487 : Implement nullptr checks
Implemented nullptr checks for the ride and vehicle variables
in UpdateRideEnterVehicle()
2019-07-29 18:07:21 +01:00
Matt
98a17fe8d9
Refactor create_sprite and remove unnecessary move_sprite_to_list
2019-07-24 17:53:51 +02:00
Duncan
ab5f5b20cd
Use enum class for RCT2_SOUND ( #9618 )
...
* Use enum class for RCT2_SOUND
* Fix formatting. Fix mistaken declaration.
* Change name of enum to SoundId
* Fix clang format
2019-07-22 19:02:45 +01:00
Duncan
4e44818a04
Merge pull request #9449 from ZehMatt/refactor/sprite-list-pow2
...
Remove unnecessary multiplication and division for sprite lists
2019-07-13 09:37:35 +01:00
Jim Armstrong
cc62e41feb
Refactor #9291 : Move easter egg code to Guest
...
Refactored static Peep functions related to easter egg names into member
functions in the Guest struct.
2019-06-24 15:17:59 -04:00
Matt
fc3afb3349
Remove unnecessary multiplication and division for sprite lists
2019-06-22 17:38:28 +02:00
duncanspumpkin
2de9430bd3
Remove incorrect code that resets picked peep
...
The game command owner is never set for game actions so this would be incorrect
2019-06-20 20:13:23 +01:00
duncanspumpkin
b896f07687
Add PeepPickupAction
...
Move Guest and Staff pickup to the new game action. Rework the game
action so that only one game action is required for the two game
commands. Remove the final game command with a callback.
2019-06-20 19:34:02 +01:00
Aaron van Geffen
f1ac847fce
Merge pull request #9222 from IntelOrca/implement/485-ghost-train-simulation
...
Implement #485 : ghost train simulation
2019-06-04 20:24:16 +02:00
ζeh Matt
bc14f427a5
Fix #9322 : Peep crashing the game trying to find a ride to look at
2019-05-30 20:49:54 +02:00
Ted John
c4e18e570e
Add and implement simulation mode for rides
2019-05-28 16:50:08 +01:00
aw20368
8c20b635bd
Fix #9270 : Refactor money effect
...
Changed static functions to rct_money_effect member functions. GetStringId now returns std::pair.
2019-05-21 21:22:47 +02:00
nexgenration
6b232f7e53
Fix#9197: Peep insert new thought ( #9230 )
...
Improve the readability of the codebase by moving functions into the relevant structures.
- Change name of peep_insert_new_thought to InsertNewThought.
- Update InsertNewThought definition to Guest::InsertNewThought.
2019-05-18 09:47:25 +01:00
Greg Hennis
1fcedae3bc
Fix #9258 : Rename SPRITE_LIST_NULL to ..._FREE ( #9260 )
2019-05-15 19:07:01 +02:00
Gymnasiast
4e23c42d38
Remove stub functions from new_game_command_table[]
2019-05-13 22:51:41 +02:00
Gymnasiast
2ea1fcc69d
Remove unused declarations and functions
2019-05-13 22:16:14 +02:00
Filip Gawin
6833da77e3
Simplify boolean expresions
2019-05-10 22:00:38 +02:00
Michael Steenbeek
da6794ad9e
Refactor second argument to move_sprite_to_list()
2019-05-08 22:11:51 +02:00
Gymnasiast
7f5c9622c0
Fix guests eating popcorn being drawn eating pizza
2019-05-08 20:57:20 +02:00
Gymnasiast
916b8c2705
Use more constants
2019-05-07 19:46:58 +02:00
Gymnasiast
212f425ff0
Rename variables, change signature
2019-05-07 19:34:50 +02:00
NexGenration
846011e21b
another message here
2019-05-07 19:34:50 +02:00
ζeh Matt
cd8c67ddac
Implement SetCheatAction. ( #8990 )
...
* Implement SetCheatAction.
* Bump up network version
2019-05-04 15:28:38 +02:00
Michael Steenbeek
c8df801e66
Create ShopItemDescriptor
2019-04-26 20:25:11 +02:00
Duncan
3f4acd7e69
Merge pull request #9120 from Gymnasiast/fix/8079
...
Fix #8079 : Crash when unloading buggy custom rides
2019-04-23 18:28:34 +01:00
Nicole
d38fb6a7a2
Fix #8800 : ensure tile_element_height is used correctly ( #9087 )
...
* Changed calls to tile_element_height to tile_element_water_height
* Changes to calls to tile_element_height
* Removed tile element_height, map_get_highest_land_height, and map_get lowest_land_height
3 functions removed due to relocation.
* Added function tile_element_height back to map.cpp
Added tile_element height back to map.cpp. Was unnecessarily deleted.
* Update Map.h
* water_height changes
* Update Scenario.cpp
* Update Scenario.cpp
* Fix 8800: applied clang format
* Removed unnecessary ANDs
2019-04-23 18:26:48 +01:00
Gymnasiast
6d3eca31fd
Add log_verbose for vehicle entries with broken peep loading positions
2019-04-22 23:27:25 +02:00
Gymnasiast
ec6b738317
Fix #8079 : Crash when unloading buggy custom rides
2019-04-21 12:13:04 +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
Florian Will
6e9a9448a2
Fix format issue, second attempt
...
Let's see if I can get this right.
2019-04-15 16:10:57 +02:00
Florian Will
35ff10e480
Fix format issue and add myself to contributors.md
2019-04-15 15:51:01 +02:00
Florian Will
eb6ea8e81d
Fix #5893 : Invalidate widget only if it's visible
...
Remove the widget_invalidate() call after changing a guest's
guest_heading_to_ride_id, because that call fails a debug assertion if
the guest window is open and the currently active tab is not the
"overview" tab. In Release builds (if assertion is disabled),
widget_invalidate() might access the widgets array out of bounds.
Instead, introduce a new flag PEEP_INVALIDATE_PEEP_ACTION for
window_invalidate_flags in the peep struct and set that flag. The guest
window update function then makes sure to invalidate the label if the
flag is set.
The flag could be used in other places to reduce libopenrct2 dependency
on window_*() calls (see #6808 ), but this commit only cares about cases
where the assertion would fail.
2019-04-15 14:26:33 +02:00
Gymnasiast
44da799afd
Modify return type of get_num_of_sheltered_eighths()
2019-03-27 15:52:18 +01:00
Gymnasiast
64e51cd34b
Close #8965 : Refactor ride->inversions
2019-03-27 11:30:18 +01:00
Aaron van Geffen
f4602d0a34
Use SCREEN_FLAGS_EDITOR when appropriate.
2019-03-20 20:58:08 +01:00
duncanspumpkin
add40feb57
Merge #8898 branch 'staff_ga' into game_actions
2019-03-18 20:00:34 +00:00
Aaron van Geffen
2af13904c5
Update copyright notices for 2019. ( #8903 )
2019-03-17 07:16:15 +00:00
duncanspumpkin
0b231c8b38
Remove old game commands
2019-03-16 20:47:54 +00: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
duncanspumpkin
edff5caa7e
Merge pull request #8849 'ga-staff-hire'
2019-03-15 19:49:24 +00:00
Duncan
5538fe3ac5
Merge pull request #8599 from janisozaur/fix-h2h7-r4-diamondheights
...
Add missing nullptr check in rct_peep::UpdateRideMazePathfinding
2019-03-12 11:19:04 +00:00
Matt
f8e98b4e3e
Pass staff orders by parameter.
2019-03-11 16:54:46 +01:00
Matt
f96a1a1b5f
Implement StaffHireNewAction game action.
2019-03-11 13:44:34 +01:00
Ted John
f5904c90cb
Fix #8834 : Invalid read in UpdateRideApproachExitWaypoints
2019-03-09 11:36:53 +00:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
Duncan
f0092b7aae
Merge pull request #8781 from duncanspumpkin/flag_refactor
...
Flag refactor
2019-02-27 19:18:02 +00:00
Michael Steenbeek
6d3200aacc
Merge pull request #8772 from IntelOrca/refactor/sprite-import-export-2
...
Refactor in-game sprite structs
2019-02-27 13:29:13 +01:00
duncanspumpkin
fae15fceca
Use IsBroken
2019-02-27 10:49:48 +00:00
duncanspumpkin
7840f6a7f7
Use SetIsBroken
2019-02-27 10:49:48 +00:00
Ted John
a3af56f285
Fix formatting
2019-02-25 22:31:14 +00:00
Ted John
bac3168a23
Refactor IsChild to IsHead
2019-02-25 17:58:22 +00:00
duncanspumpkin
737c308e4e
Use IsGhost() to access ghost state
...
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
duncanspumpkin
6890f4f756
Use quarter tile for map can construct at
...
Make callees of map_can_construct_with_clear use QuarterTile
Use quarter tile for small scenery rotation
Fix clang format
Further clang format
2019-02-25 13:51:08 +00:00
duncanspumpkin
f9fe09634c
Move quarter tile class to the tile element header.
...
Refactor flags slightly
2019-02-25 13:51:07 +00:00
Ted John
520b1b4819
Try out changed sprite structs for main game
2019-02-25 12:29:31 +00:00
Ted John
261dd32697
Refactor peep_interact_with_path to prevent null ride warnings ( #8728 )
2019-02-20 16:47:38 +00:00
Ted John
9e461b2e34
Pass Ride* instead of ride_id_t
2019-02-12 23:29:38 +00:00
Ted John
fd090f5ef3
Refactor PickRideToGoOn
2019-02-12 23:29:38 +00:00
Ted John
e361655b10
Pass Ride* instead of ride_id_t
2019-02-12 23:29:37 +00:00
duncanspumpkin
8a69b89df6
Move Staff Set Orders into game action framework.
...
Split up costume and order game commands
2019-02-05 20:38:18 +00:00
Matt
7ad59bbb37
Refactor number values to RIDE_VALUE_UNDEFINED
2019-01-30 14:59:06 +01:00
ζeh Matt
6668a1fa86
Refactor remaining number values to RideStation::NO_TRAIN ( #8655 )
2019-01-30 13:49:46 +00:00
Matt
4026ead774
Fix #8653 : crash when peeps attempt to enter a ride with no vehicles.
2019-01-30 13:16:45 +01:00
Michael Steenbeek
6ef01b3cd3
Name some path drawing variables
2019-01-18 20:35:43 +01:00
Michael Steenbeek
b4bef2fe7d
Merge pull request #8560 from richard-fine/directions
...
Begin cleanup of direction handling
2019-01-18 19:09:39 +01:00
Ted John
92412d4bab
Store ride index inside ride struct
2019-01-18 11:46:18 +01:00
Michał Janiszewski
6043f583b0
Add missing nullptr check in rct_peep::UpdateRideMazePathfinding
...
Fixes https://www.nedesigns.com/park/3359/h2h7-r4-diamondheights/
2019-01-17 23:40:18 +01:00
Gymnasiast
74a3674e86
Replace more hardcoded instances of RIDE_ID_NULL
2019-01-12 12:38:23 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Richard Fine
b77f1285a4
Reformat
2019-01-05 19:48:12 +00:00
Richard Fine
e90e9dd73f
Introduce many uses of direction_reverse
...
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Hielke Morsink
53ae48ffca
Merge pull request #8550 from janisozaur/fallthroughs
...
Fix implicit fallthroughs
2019-01-04 23:27:02 +01:00
Hielke Morsink
5ef5e4153d
Fix some more implicit and conditional fallthroughs
2019-01-04 22:26:56 +01:00
ζeh Matt
20496b0390
Merge pull request #8545 from richard-fine/use-enum-types
...
Use of enum types in Peep code
2019-01-04 10:57:56 +01:00
Richard Fine
a30e154388
Handle all enum values in switches
...
Add 'default' cases to a few enums that were not otherwise handling all possible enum values. This wasn't a problem before because the variables we were switching on were not actually enum types, but now that they are, Clang is warning us about the non-covered cases.
2019-01-03 12:06:47 +00:00
Ted John
d979511628
Do code review suggestions
2019-01-02 19:46:13 +00:00
Richard Fine
3089781883
Reformat
2019-01-02 14:40:17 +00:00
Richard Fine
60396c6658
Rename enums to modern style
...
Change various PEEP_ENUM_TYPE names to PeepEnumType names, to match the more modern coding standard.
2019-01-02 14:10:05 +00:00
Richard Fine
88beb4ee6a
Define PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE
...
Previously untitled "PEEP_ACTION_SPRITE_TYPE_2" is a single-frame animation that guests play when they are standing still and watching a ride.
2019-01-01 23:17:45 +00:00
Richard Fine
73686e84d6
Define PEEP_ACTION_SPRITE_TYPE_SITTING_IDLE
...
Previously untitled 'PEEP_ACTION_SPRITE_TYPE7' is actually a single-frame animation for sitting on benches, from looking at the sprite. Makes sense with the way the value is used in the code too.
2019-01-01 23:06:57 +00:00
Richard Fine
f3292194f5
Use PEEP_SPRITE_TYPE enum
...
Use the PEEP_SPRITE_TYPE enum for rct_peep::sprite_type so we get type safety on it.
2019-01-01 22:40:59 +00:00
Richard Fine
88850cdab2
Use PEEP_ACTION_SPRITE_TYPE enum
...
Use the PEEP_ACTION_SPRITE_TYPE enum for rct_peep::action_sprite_type and ::next_action_sprite_type, as well as other code that deals with action sprite types.
2019-01-01 22:29:26 +00:00
Richard Fine
38cec94d9d
Use PEEP_THOUGHT_TYPE enum
...
Use PEEP_THOUGHT_TYPE for rct_peep_thought::type field, as well as functions that deal with selecting thoughts to add.
2019-01-01 22:18:49 +00:00
Richard Fine
b716fd071d
Use PEEP_TYPE enum for rct_peep::type field
...
Use the PEEP_TYPE enum for rct_peep::type so that the compiler/debugger understand what values it should contain.
2019-01-01 22:11:02 +00:00
Richard Fine
e1016bf71e
Use PEEP_ACTION_EVENTS enum for rct_peep::action field
...
Use the PEEP_ACTION_EVENTS enum for the rct_peep::action field explicitly, so that we get type safety on it from the compiler and debugger. In the process, force PEEP_ACTION_EVENTS to be of size uint8_t, and use named constants for NONE actions instead of magic numbers in a few places.
2019-01-01 22:06:02 +00:00
Ted John
38f632074b
Merge ride track colour arrays into one
2019-01-01 21:25:34 +00:00
Richard Fine
88b86eb0c1
Use PEEP_STATE enum type directly
...
Explicitly declare the PEEP_STATE enum as being uint8_t width, then use it instead of uint8_t in the rct_peep struct. This has a few benefits:
* It makes it clearer which values we expect to be assigned to that variable. If you hadn't already seen PEEP_STATE existed, it wouldn't be obvious.
* It lets the compiler catch assignment of non-PEEP_STATE values for us
* It lets the debugger show us symbolic constants when looking at a peep, instead of raw values.
The only downside is that we no longer see directly in the rct_peep struct that the field is 1 byte wide, but I think that the benefits outweigh the costs in this case...
2019-01-01 20:49:17 +00:00
Ted John
37f76d1687
Move station fields into new station struct
2019-01-01 02:26:14 +00:00
Matt
727ba2d7d0
Fix #8333 : Replace assert with in-game error.
2018-12-23 22:28:59 +01:00
Michał Janiszewski
a34957eb41
Add ride type check to rct_peep::ShouldGoOnRide
2018-12-22 15:35:26 +01:00
Gymnasiast
958f287bb7
Fix typo, fix nullptr check notation
2018-12-22 15:31:28 +01:00
Ted John
4195f0d9c9
Change gPeepSpawns to a vector so we can now have more than 2
2018-12-16 19:00:16 +00:00
Ted John
19a687f2fa
Change gParkEntrance to a vector so we can now have more than 4
2018-12-16 19:00:16 +00:00
ζeh Matt
7d19a5bc77
Refactor memcpy to std::memcpy and memset to std::memset ( #8408 )
2018-12-15 22:23:31 +01:00
Ted John
ab53c69c3c
Use new CanGrow method on surface element which uses object property
2018-12-11 23:31:06 +00:00
ζeh Matt
940fff4bbf
Fix dereferencing nullptr when game objects are missing. ( #8360 )
2018-12-05 22:59:15 +01:00
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Michał Janiszewski
da965cb1ad
Fix #8224 : invalid access in peep_find_ride_to_look_at ( #8225 )
...
* Fix #8224 : invalid access in peep_find_ride_to_look_at
* Update Guest.cpp
2018-11-05 06:25:46 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Michael Steenbeek
5f4cca3c7e
Remove rest of access to footpath edges
2018-10-31 15:08:06 +01:00
Michael Steenbeek
d89c3d9e67
Replace calls to get path edges
...
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Michael Steenbeek
af2c1e69d1
Remove residual access to path addition_status field
2018-10-31 13:10:07 +01:00
Michael Steenbeek
853e4c4a6a
Remove residual access to path ride_index field
2018-10-31 13:09:53 +01:00
Michael Steenbeek
0f4560598e
Replace residual access to path element entry index field
2018-10-31 13:09:29 +01:00
Michael Steenbeek
66cde65f87
Replace C style function for getting slope direction
2018-10-31 13:09:19 +01:00
Michał Janiszewski
4c62f89110
Remove empty branch in Peep.cpp
2018-10-30 06:48:32 +01:00
Gymnasiast
774d26306f
Fix formatting
2018-10-04 14:54:13 +02:00
Gymnasiast
b1f737d985
Remove remaining access to additions field
2018-10-04 14:54:12 +02:00
Gymnasiast
a6885ea464
Replace C-style functions for getting direction
2018-10-04 14:54:12 +02:00
Gymnasiast
ecd6247462
Replace C-style functions for checking getting path additions
2018-10-04 12:13:17 +02:00
Gymnasiast
ee05438953
Replace C-style functions for checking path addition ghost status
2018-10-04 12:13:17 +02:00
Gymnasiast
e159ac65a6
Replace C-style functions for IsWide() and SetWide()
2018-10-04 12:13:17 +02:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
Michael Steenbeek
882a65e4c0
Port queue functions
2018-10-03 12:18:21 +02:00
Michael Steenbeek
3b7fc4cf8c
Port rest of banner functions
2018-09-27 22:15:04 +02:00
Michael Steenbeek
3c93aca727
Port entrance station index and sequence lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
c7eaa1ba80
Port entrance ride index lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
cc7f8e612d
Port entrance type lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
3f17782692
Move direct access to maze entry to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
a3e9c63fc3
Move GetRideIndex to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
67d7d5c022
Move getting station index to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
6062960390
Port remaining wall stuff to struct methods
2018-09-17 15:42:34 +02:00
Gymnasiast
75877e82f8
Fix access to path element
2018-09-16 21:34:51 +02:00
Gymnasiast
0f08128657
Fix formatting
2018-09-16 21:34:51 +02:00
Michael Steenbeek
74ccf010e6
Port surface elements to new structure
2018-09-16 21:34:51 +02:00
Michael Steenbeek
35b4724626
Port large scenery to new structure
2018-09-16 21:34:50 +02:00
Michael Steenbeek
1d3baef9b7
Remove some C-style tile element functions
2018-09-16 21:34:04 +02:00
Michael Steenbeek
0e998c2d78
Merge pull request #7988 from Gymnasiast/tile-element-makeover
...
Change tile elements to use the OpenLoco structure
2018-09-14 10:56:19 +02:00
Michael Steenbeek
a31176b7e7
Remove remnants of old small scenery code
2018-09-13 18:12:20 +02:00
Michael Steenbeek
b5bb4c7fb9
Do not access old small scenery age field
2018-09-13 17:26:36 +02:00
Michael Steenbeek
e9993f78de
Replace read access of small scenery entry index
2018-09-13 17:02:38 +02:00
Matt
a89b352fb2
Rename rct_sprite::unknown to rct_sprite::generic
2018-08-20 18:27:40 +02:00
Linus Unnebäck
fd07be587a
Remove Math::Clamp in favour of std::clamp
2018-08-12 16:47:12 +01:00
clang-format
d787872cbe
Indent preprocessor directives
2018-07-23 16:00:23 +02:00
clang-format
b02dfdbc93
Binpack function arguments together
...
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format
95ce592579
Enforce not breaking before assignments and function names
...
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
Hielke Morsink
9cf4ea675f
Correct formatting for source files up to the rct2 folder
2018-07-23 16:00:16 +02:00
clang-format
bb3561f70b
clang-format peep
2018-07-23 16:00:07 +02:00
Michael Steenbeek
1b08fb4e69
Replace our own integer types with standard ones
2018-06-20 17:30:40 +02:00
Michael Steenbeek
ec3a1e575e
Replace Math::Min and Max with std variants
2018-06-20 17:11:35 +02:00
Hielke Morsink
0cf256ac9e
Ready copyright notice for clang-format
...
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.
I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Michał Janiszewski
bcd4e9c50b
Merge pull request #6284 from janisozaur/compiler-warnings
...
Compiler warnings
2018-06-11 11:06:34 +02:00
Michał Janiszewski
1d28826b79
Fix -Wdocumentation and add it to default warnings
2018-06-11 09:52:54 +02:00
Ted John
c300f873f5
Refactor peep check for vehicle
2018-06-10 22:59:58 +01:00
Jeroen D Stout
13017568db
Prevent peep from being blocked while already on blocked tile
2018-06-10 22:59:58 +01:00
Jeroen D Stout
547973066c
Add check for peep walking update to prevent walking onto blocked tiles
2018-06-10 22:59:58 +01:00
Hielke Morsink
204dd4439b
Mark unused arguments in the libopenrct2 project
...
For dummy classes and functions with empty bodies I've only commented out the arguments, for all others I used C++17's [[maybe_unused]].
2018-06-06 21:03:11 +02:00
Michael Steenbeek
a14d59028f
Modify some commands to use CoordsXY
2018-06-04 19:18:52 +02:00
Michał Janiszewski
debb6cd46c
Remove declarations of unimplemented functions ( #7615 )
2018-06-02 13:51:23 +02:00
Ted John
92f6ac7333
Rename header files to match renamed source files
2018-06-01 09:38:30 +02:00
Michael Steenbeek
b573bd49b3
Replace all occurrences of tile_element_is_last_for_tile()
2018-05-24 11:44:53 +02:00
oli414
8c5b56dda1
Fix #7418 : Staff walk off paths with a connection but no adjacent path
2018-05-19 15:46:08 +02:00
blackhand1001
c14056fd2a
Fix guest/staff speed when they enter a ride from a sloped path
2018-05-15 16:56:33 +02:00
Hielke Morsink
6c65c3d64d
Merge pull request #6774 from janisozaur/fixes
...
Various code improvements
2018-05-15 14:38:43 +02:00
William Fu
aece198560
Fix #7341 : Staff may auto-spawn on guests walking outside of paths
...
Staff placement code has been modified to only count guests who are on path tiles.
If all guests in the park are off paths, then the park entrance is used as a fallback.
2018-05-15 12:19:07 +02:00
Michael Steenbeek
fcf507e051
Spin off shop item stuff to separate files
2018-05-14 19:21:43 +02:00
Michał Janiszewski
0a92e74ced
Minor fixes
2018-05-11 15:38:30 +02:00
duncanspumpkin
27bed3522c
Fix desync issue due to mistaken refactor
2018-05-08 19:21:15 +01:00
duncanspumpkin
6f21614a07
Convert heuristic search to TileCoords
2018-05-08 18:09:45 +01:00
duncanspumpkin
213abaf6e8
Convert path is thin to TileCoords
2018-05-08 17:50:43 +01:00
duncanspumpkin
fc39c6c92c
Revert incorrect comment find and replace
2018-05-08 17:45:40 +01:00
duncanspumpkin
458b3710c7
Fix pathing getting the wrong tile
2018-05-06 21:34:48 +01:00
q--
ca6bf696b1
Fix incorrect comment for peep inital energy ( #7479 )
...
Also use % 64 instead of & 0x3F for added clarity.
Removed the 63 + 65 = 128 from the comment since that's fairly obvious
if we're using decimal instead of hexadecimal numbers.
Closes #7384
2018-05-05 11:42:47 +01:00