Helio Santos
925d21eeda
Part of #12159 : update check_for_adjacent_station to use CoordsXYZ&
...
Update check_for_adjacent_station to use CoordsXYZ&. Updated caller(s) accordingly.
2020-07-10 11:00:00 -07:00
Helio Santos
b0a4f2a97e
Part of #12159 : updated get_station_platform to use CoordsXYRangedZ
...
Updated get_station_platform function to use CoordsXYRangedZ. Updated caller(s) accordingly. Implemented constructor for CoordsXYRangedZ that takes a CoordsXYZ as argument.
2020-07-10 10:59:52 -07:00
Helio Santos
fb9fab69a9
Part of #12159 : Uses CoordXY on find_closest_mechanic
...
Updated find_closest_mechanic prototype to use CoordXY. Updated caller(s) accordingly.
2020-07-10 09:41:51 -07:00
Tulio Leao
e5e70688c5
Use big Z coords on some Ride station functions ( #12192 )
2020-07-10 08:40:42 -03:00
Tulio Leao
f29abf6953
Part of #11389 : Use Formatter on Ride::FormatStatusTo ( #12172 )
2020-07-09 18:54:30 +02:00
duncanspumpkin
57d2877e67
Provide accesor function for get entity list count
2020-07-05 07:28:38 +01:00
duncanspumpkin
e51bbeed23
Convert SPRITE_LIST to an enum class
2020-07-04 07:38:11 +01:00
frutiemax
14a07359b3
Part of #11389 : Use formatter class for Ride::FormatNameTo ( #12041 )
2020-06-24 21:02:08 -03:00
frutiemax
f86931d8a0
Close #12019 : Use ScreenCoordsXY on gfx_draw_sprite_software
2020-06-22 23:52:54 +02:00
frutiemax
57b50e46df
Part of #11964 : Move RideTypeEnumNames to RideTypeDescriptors
2020-06-19 23:03:24 +02:00
frutiemax
57b121d448
Part of 11964: move RideColourPresets to RideTypeDescriptors
2020-06-19 18:04:43 +02:00
Michael Steenbeek
2013e1a36f
Merge pull request #11974 from Gymnasiast/refactor/ride-type-misc
...
Refactor/ride type misc
2020-06-17 23:15:30 +02:00
Michael Steenbeek
e2b187c24a
Merge pull request #11921 from duncanspumpkin/CreateSprite6
...
Entity List Iterator
2020-06-17 21:28:36 +02:00
Gymnasiast
2a9c2be7d0
Remove unused function
2020-06-17 19:11:02 +02:00
frutiemax
de1c172c74
Move RideProperties and rideBonusValue to RideTypeDescriptors
...
Part of #11964 .
2020-06-17 18:59:04 +02:00
Gymnasiast
96678a14eb
Move ride naming to RTD
...
This also means that all unused ride types will now have the same name. I have made an exception for the 'arbitrary ride type change' dropdown only.
2020-06-16 22:52:48 +02:00
duncanspumpkin
6ed17b4ff9
Remove FOR_ALL_PEEPS/GUESTS/STAFF macros
...
Replaced with an EntityList iterator
Fix formatting
Fix nullptr issues
2020-06-16 20:27:44 +01:00
duncanspumpkin
904e6c6987
Implement GetSprite and use it in a number of places
...
This will eventually replace all of the get_sprite and try_get_sprite calls
Further use of GetSprite
Use GetSprite in all remaining easy to use functions
Correct formatting
Rename GetSprite to GetEntity
Make suggested changes
Remove const to allow for building
Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
Gymnasiast
9cf12e763d
Move RideHeights and max mass to RTDs
2020-06-16 20:57:55 +02:00
Gymnasiast
140f2d6922
Rename rct_ride_data_5 and its fields to RideHeights
2020-06-16 20:17:07 +02:00
Gymnasiast
2eccef5979
Split max_mass from rct_ride_data_5
2020-06-16 20:00:25 +02: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
hdpoliveira
55bb2eaec9
Change all invalidate_sprite_2(Vehicle*) to Vehicle->Invalidate() ( #11935 )
2020-06-11 20:42:11 +01:00
Tulio Leao
92fbb9fc04
Rename Peep::happiness to Happiness
2020-06-08 23:30:27 -03:00
Tulio Leao
1b7223462f
Rename Peep::happiness_target to use TitleCase
2020-06-08 23:27:47 -03:00
Tulio Leao
f732c2f1cd
Rename Peep::window_invalidate_flags to use TitleCase
2020-06-08 22:25:54 -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
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
7bef44b020
Create Vehicle::SetUpdateFlag
2020-06-07 17:16:13 -03: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
d195c9fb1d
Rename Peep::next_in_queue to NextInQueue
2020-06-06 11:53:51 -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
Michael Steenbeek
f21ddb0723
Refactor checks for station pieces ( #11876 )
2020-06-05 17:55:15 -03:00
Tulio Leao
9fbaf61e07
Rename Peep::staff_orders to StaffOrders
2020-06-04 19:16:12 +02:00
hdpoliveira
86550dad20
Rename swing-related variables in Vehicle
2020-05-31 16:37:09 -03:00
hdpoliveira
c5e0489a48
#9473 : Create Vehicle::CableLiftUpdateTrackMotion
2020-05-30 20:23:02 -03:00
Ted John
bfa96d6205
Fix price in ScRide
2020-05-23 15:28:03 +01:00
Ted John
f6fbd272ec
Add built_date to ScRide and add GetAge()
2020-05-23 15:28:03 +01:00
Tulio Leao
3b632fcf95
Rename Peep::favourite_ride to FavouriteRide
2020-05-13 23:06:40 -03:00
Michael Steenbeek
620fb5e5c4
Migrate many set_format_arg calls to Formatter ( #11744 )
2020-05-13 21:29:39 -03:00
Michael Steenbeek
32609791de
Merge pull request #11719 from Gymnasiast/random-cleanup
...
Convert sprite_move to method
2020-05-13 11:52:18 +02:00
Michael Steenbeek
511a300251
Some cleanup in Vehicle.cpp ( #11742 )
2020-05-13 11:51:38 +02:00
Gymnasiast
b5b563c2a8
Apply review requests
2020-05-13 10:53:30 +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
d10f9ebf2a
Use named flags in calls to sub_6C683D() ( #11650 )
2020-05-05 23:11:38 -03:00
Fred-1044276
b03fbc086d
Fix #11450 : Can't open rides, even with "Enable all track pieces"
2020-05-05 11:16:24 +02:00
Gymnasiast
f88e1c03a0
Fix #11624 : Crash when testing ride with a ghost end-of-station
2020-05-04 17:46:12 +02:00
Gymnasiast
50c750e176
Clean up GetOriginElement()
2020-05-04 17:10:57 +02:00
Tulio Leao
a808ded45a
Favour usage of CoordsXY objects instead of individual variables
2020-05-02 11:07:18 -03:00
Tulio Leao
1872152df9
Make window_ride_construction_update_state() use CoordsXYZ*
2020-05-02 11:07:18 -03:00
Tulio Leao
02a5c10a58
Make place_provisional_track_piece() use CoordsXYZ
2020-05-02 11:07:18 -03:00
Tulio Leao
28b3ac1693
Make track_block_get_previous() use CoordsXYE
2020-05-02 11:07:18 -03:00
Tulio Leao
d58f3ec0b6
Make track_block_get_previous_from_zero() use CoordsXYZ
2020-05-02 11:07:17 -03:00
Tulio Leao
6203a5a20d
Make track_block_get_next_from_zero() use CoordsXYZ
2020-05-02 11:07:15 -03:00
hdpoliveira
4649b573f4
Part of #9473 : Create Vehicle::GetGForces
...
Converted from vehicle_get_g_forces
2020-05-01 19:49:03 -03:00
Tulio Leao
4589560a15
Make sub_6C683D() use CoordsXYZ on parameter and return
2020-05-01 18:06:26 -03:00
Michael Steenbeek
fc860e8b6e
Merge pull request #11521 from Gymnasiast/refactor/oein3
...
Make ResearchItem use ObjectEntryIndex
2020-05-01 13:28:21 +02:00
hdpoliveira
4389670939
Improve names in UpdateDodgemsCollision
2020-04-30 20:53:18 -03:00
hdpoliveira
90cd90e738
Part of #9473 : Create Vehicle::Entry
...
Converted from vehicle_get_vehicle_entry
2020-04-30 20:53:15 -03:00
hdpoliveira
c88695a29c
Part of #9473 : Create Vehicle::UpdateDodgemsCollision
...
Converted from vehicle_update_dodgems_collision
2020-04-30 20:53:15 -03:00
Gymnasiast
6cdee9db93
Fix #7006 : Use RTDs for determining ride category
2020-04-30 12:59:18 +02:00
duncanspumpkin
63549dee57
Ensure move_sprite_to_list only used in sprite.cpp
...
After an entity is created it should never need to call this function. This will be important in later changes when the lists are changed to vectors
2020-04-28 07:27:05 +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
Michael Steenbeek
bcabc1d807
Merge pull request #11457 from Gymnasiast/refactor/rtd-forever
...
More RTD + cleanup
2020-04-27 15:11:54 +02:00
Fred-1044276
a3e7f0958c
Allow Air Powered Vertical Coaster without complete circuit
...
This changes the Air Powered Vertical Coaster so that it can be tested and opened without the need for a complete circuit (mirroring RCT1 and RCT3 behaviour). There appears to be no technical reason for RCT2's requirement for having a complete circuit.
2020-04-26 11:25:08 +02:00
Gymnasiast
100236c2d2
Move available ride modes to RTD; ride mode cleanup
2020-04-26 11:07:19 +02:00
Gymnasiast
2e3a4d41ce
Clean up some ride construction variables
2020-04-26 11:07:19 +02:00
Michael Steenbeek
b89130e0f3
Use ObjectEntryIndex in more places ( #11440 )
2020-04-25 00:10:47 +02:00
Michael Steenbeek
44f62a97c2
Move PhotoItem to RTD ( #11415 )
2020-04-24 04:47:40 +02:00
Breno Rodrigues Guimarães
ef8fd20c99
Let Ride::FormatStatusTo return the number of written bytes ( #11411 )
2020-04-22 21:24:51 -03: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
Michael Steenbeek
e1e58423fc
Replace RideTypeHasRideGroups with flag ( #11375 )
2020-04-20 21:50:35 +02:00
ifimfree
fb6dd4bfad
Create constants for a few flags
2020-04-20 10:39:26 +02: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
Gymnasiast
99d270388b
Move ride start piece to RTD
2020-04-19 18:05:57 +02:00
Michael Steenbeek
957294568f
Use constants in ride_entry_get_supported_track_pieces() ( #11337 )
2020-04-19 13:33:01 +02:00
hdpoliveira
fd111403f1
Part of #9473 : vehicle_update_track_motion to Vehicle::UpdateTrackMotion
2020-04-18 14:41:47 -03:00
Michael Steenbeek
3bf316ee8c
Merge pull request #11336 from Gymnasiast/refactor/available-breakdowns-to-rtd
...
Move available breakdowns, category and independent listing flag to RTD
2020-04-18 18:31:39 +02:00
Eyal Minsky-Fenick
2ef77414d5
Ensure ride->inspection_station is set in ride_prepare_breakdown ( #10245 )
2020-04-18 15:30:25 +02:00
Gymnasiast
5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag
2020-04-18 15:22:41 +02:00
Gymnasiast
c41fb64535
Move available breakdowns to RTD
2020-04-18 15:22:41 +02:00
Michael Steenbeek
b4a763c751
Move naming convention to RTD ( #11319 )
2020-04-18 12:12:07 +02:00
Gymnasiast
a295f3c003
Fix #11315 : Never opened ride shown as favourite ride of 74 guests
2020-04-18 07:39:24 +01:00
Tulio Leao
b449e445f7
Use named casts on openrct2/ride ( #11163 )
...
Excluding subfolders
2020-04-17 19:53:33 +02:00
Michael Steenbeek
777201c7fd
Return false for non-existing ride types
...
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-17 17:05:16 +02:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors
2020-04-17 17:03:33 +02:00
duncanspumpkin
b857792f23
Fix vehicles changing state on export/import
2020-04-07 20:07:37 +01:00
Michał Janiszewski
94f6d70ac7
Fix #11084 : null broken vehicle ( #11090 )
2020-04-06 22:32:27 +02:00
Michał Janiszewski
63c11ab8fd
Fix #11128 : null tile element in track_block_get_previous ( #11144 )
2020-04-06 22:32:27 +02:00
Michał Janiszewski
27da48336a
Revert "Fix #11084 : null broken vehicle ( #11090 )"
...
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 24edada2d8
.
2020-04-03 09:53:36 +02:00
Michał Janiszewski
620be75285
Revert "Fix #11128 : null tile element in track_block_get_previous ( #11144 )"
...
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 d1faa228c5
.
2020-04-03 09:49:58 +02:00
Michał Janiszewski
d1faa228c5
Fix #11128 : null tile element in track_block_get_previous ( #11144 )
2020-03-29 22:01:13 +01:00
Duncan
f64ea65d03
Rename SPRITE_LIST_TRAIN_HEAD to reduce car head confusion ( #11105 )
...
A single car on a coaster can comprise of multiple vehicles. One of those vehicles will be the car head vehicle. The train can comprise of multiple cars. Therefore not all vehicle->IsHead 's will be in SPRITE_LIST_TRAIN_HEAD. This rename makes that slightly more clear
2020-03-29 09:23:24 +01:00
Tulio Leao
fc645180be
Ammend #11090 for consistency on nullptr check ( #11104 )
2020-03-28 11:39:59 +00:00
Michał Janiszewski
24edada2d8
Fix #11084 : null broken vehicle ( #11090 )
2020-03-28 10:21:24 +00:00
Michael Steenbeek
b70c5cefd6
Use station index in a few more places ( #11066 )
2020-03-27 11:13:02 +01:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places ( #10992 )
2020-03-26 21:38:26 +01:00
Aaron van Geffen
302fe1cb2b
Merge pull request #10926 from IntelOrca/zoom-refactor
...
Zoom refactor
2020-03-24 23:28:32 +01:00
Michael Steenbeek
e66a6754f5
Remove some hardcoded numbers ( #11004 )
2020-03-23 19:12:57 +01: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
Ted John
c89cecb2b5
Refactor the ride type to entry map ( #10967 )
...
Use C++ vectors and allow larger ride entry indices (> 256)
2020-03-20 18:07:31 +01:00
Michael Steenbeek
b73098ba21
Fix #10902 : Resetting ride let guest out in the air ( #10968 )
2020-03-18 22:22:25 +01:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags ( #10947 )
2020-03-16 22:52:06 +01:00
X123M3-256
7219c880e2
Allow opening rides with unsuitable track when "Enable all drawable track pieces" cheat is on. ( #10923 )
...
Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
2020-03-15 14:11:04 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates
2020-03-13 12:03:43 +01:00
Gymnasiast
9fd2b883a8
Apply review request
2020-03-12 15:27:58 +01:00
Gymnasiast
02c135e4fa
Clean up many staff functions
2020-03-07 23:07:47 +01:00
Gymnasiast
ad91654a3d
Use big Z in more places
2020-03-07 21:54: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
9c7c57f722
Apply review request
2020-03-05 21:25:58 +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
Michael Steenbeek
e3f5eb7275
Merge pull request #10847 from tupaschoal/const-ref-coords
...
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao
9bcd20e0e6
Prefer const ref to send ScreenCoordsXY over
2020-02-29 08:25:48 -03:00
Tulio Leao
181eaf768d
Receive CoordsXYZ by const ref instead of copy
2020-02-29 01:14:05 -03:00
Tulio Leao
473bb4683b
Receive (Tile)CoordsXYZD by const ref instead of copy
2020-02-29 01:09:24 -03: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
Duncan
171e255981
Fix #10598 . Mistake made when fixing #7784 . ( #10606 )
2020-01-23 22:43:29 +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
65c6564165
Use SpriteBase instead of rct_sprite for move_sprite_to_list
2020-01-19 17:15:52 +00:00
duncanspumpkin
a5ef8d6240
Rename rct_vehicle
2020-01-19 17:14:56 +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
modulo7
fdf0c17fd8
Name field var_CD of vehicle struct. Refactor to enum
2020-01-19 17:34:11 +01:00
Tulio Leao
c8097eab3a
Use CoordsXYE on maze_entrance_hedge_removal()
2020-01-19 13:30:28 -03:00
Tulio Leao
a3ecefcf89
Use CoordsXYE on maze_entrance_hedge_replacement()
2020-01-19 13:30:28 -03:00
Michael Steenbeek
8a9f0eeca5
Prepare track piece handling code for more than 256 pieces ( #10575 )
2020-01-17 12:27:14 +01:00
Michael Steenbeek
f05aeb1fcd
Fix #7784 : Vehicle tab takes 1st car colour instead of tab_vehicle's colour ( #10544 )
2020-01-12 10:32:11 +01:00
Michael Steenbeek
44dc2068e7
Merge pull request #10515 from tupaschoal/use-more-coords-4
...
Use CoordsXY* on world/Footpath.cpp
2020-01-11 20:52:39 +01:00
Tulio Leao
c5ec4982a3
Use CoordsXY on footpath_chain_ride_queue()
2020-01-11 11:13:05 -03:00
Tulio Leao
7cf03d3e41
Use CoordsXY on footpath_remove_edges_at()
2020-01-11 11:13:04 -03:00
Michael Steenbeek
0c9b1cec96
Correct max vehicles per ride value ( #10504 )
...
* Correct max vehicles per ride value
* Fix formatting
* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Gymnasiast
0d09a645fc
Refactor map_get_footpath_element() and fix #10486
2019-12-31 10:08:36 +01:00
Duncan
c170926200
Refactor to prefer baseZ instead of height for big Z ( #10478 )
2019-12-31 09:33:27 +01:00
Duncan
d486ac4d3b
Reduce direct usage of LOCATION_NULL ( #10480 )
...
* Reduce direct usage of Location_Null
Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.
* Remove incorrect AND with LOCATION_NULL
In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Tulio Leao
a7b33a7d36
Use more Coords on some files. ( #10463 )
...
* Use more Coords on MazePlaceTrackAction
* Use more Coords on MazeSetTrackAction
* Use more Coords on PlacePeepSpawnAction
* Use more Coords on SetCheatAction
* Use more Coords on SurfaceSetStyleAction
* Use more Coords on Station
2019-12-30 16:50:48 +00: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
Michael Steenbeek
4b0dff92aa
Name word_981D6C ( #10471 )
2019-12-30 12:29:08 +01:00
Michael Steenbeek
fa4ed37895
Fix #10468 : Ride's Entrance/Exit is not buildable above a certain height level ( #10472 )
2019-12-29 23:48:15 +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
1d011630be
Remove LocationXY usage on openrct2\ride\Ride.cpp
2019-12-27 08:31:15 -03:00
Tulio Leao
ef31ce8149
Improve readability on ride_create_vehicles_find_first_block
2019-12-24 11:19:06 -03:00
Tulio Leao
21435a4d01
Make Map::map_get_track_element_at_of_type_seq() use CoordsXYZ
2019-12-24 11:19:05 -03:00
Tulio Leao
6c998d7b4d
Make Map::map_get_track_element_at() use CoordsXYZ
2019-12-24 11:19:03 -03:00
duncanspumpkin
38434ad688
Use CoordsXYZ for cable lift location
2019-12-24 12:04:14 +00:00
duncanspumpkin
a3a4a7f153
Make suggested changes
2019-12-24 12:04:07 +00:00
duncanspumpkin
0a5d094785
Change type of ChairLiftBullwheel to TileCoordsXYZ
2019-12-24 08:28:10 +00: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
Duncan
96ff8fe7a1
Change value of COORDS_NULL to a less likely to collide value. ( #10423 )
...
It will also now match LOCATION_NULL. As this change should only affect in memory coords there should be no save, replay, network issues.
2019-12-22 14:03:32 +01:00
Michael Steenbeek
c2565bfe1c
Merge pull request #10407 from duncanspumpkin/refactor_stations
...
Fixing COORDS_NULL: Refactor stations
2019-12-21 16:13:48 +01:00
Gymnasiast
11cc07a2b8
Replace hard-coded index with constant
2019-12-21 14:00:45 +01:00
duncanspumpkin
b3dafc64c3
Refactor to improve readability as per suggestions
2019-12-21 12:12:10 +00:00
duncanspumpkin
45403ac2d3
Move station_starts to TileCoordsXY
2019-12-21 11:48:13 +00:00
duncanspumpkin
7297125cae
Refactor stations ready for TileCoordsXY
2019-12-21 11:26:37 +00:00
Michael Steenbeek
a2b9598341
Modify code using Location8 to use isNull()/setNull() ( #10403 )
2019-12-21 11:34:46 +01:00
Tulio Leao
918624e090
Fix #10396 : Function returning TileCoordsXYZD'z coord in a CoordsXYZD object ( #10398 )
2019-12-19 15:41:22 +01:00
Michael Steenbeek
f59f5d9b1f
Merge pull request #10375 from tupaschoal/coords-for-map-entrance-exit
...
Make map entrance/exit fetching functions use Coords objects
2019-12-19 11:39:37 +01:00
Tulio Leao
aea755bd70
Allow TileCoordsXYZD to generate CoordsXYZD equivalent
2019-12-19 00:11:26 -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
af7b364946
Prefer map_is_location_valid over hardcoded map limits ( #10373 )
2019-12-14 22:50:34 +01:00
Tulio Leao
03e7e29b21
Make map entrance/exit fetching functions use Coords objects
2019-12-14 12:13:09 -03:00
Duncan
90bde58852
Merge pull request #10329 from tupaschoal/coords-for-windows-rotate
...
Use CoordsXY on TopToolbar and TrackDesignPlace rotations
2019-12-11 08:44:06 +00:00
Tulio Leao
43366a0a51
Make sure height comparisons are done against TileCoords
2019-12-10 23:33:53 -03:00
Tulio Leao
68e0519c5e
Remove Map::map_offset_with_rotation()
2019-12-09 17:55:57 -03:00
Tulio Leao
01c62437b2
Remove Ride::ride_get_rotated_coords()
2019-12-09 16:52:47 -03:00
Tulio Leao
aca4d39107
Allow TileCoordsXYZ conversion to CoordsXYZ
2019-12-05 21:43:20 -03:00
Tulio Leao
accb4ea691
Use CoordsXY on TopToolbar and TrackDesignPlace rotations
2019-12-04 22:07:11 -03:00
Tulio Leao
d9348cf562
Use CoordsXY::ToTileCentre() on Ride.cpp
2019-12-04 22:02:11 -03:00
Tulio Leao
6f0ebfea27
Use CoordsXY and ScreenCoordsXY for rotate in Ride*.*
2019-12-04 08:02:09 -03:00
Tulio Leao
1532ee2b23
Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre()
2019-11-30 16:47:23 +01:00
Tulio Leao
4537c061d9
Prefer std::optional over LOCATION_NULL on Viewport ( #10297 )
2019-11-29 17:17:01 +01:00
Tulio Leao
47935288d0
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-25 17:45:02 -03:00
duncanspumpkin
1d6a923298
Refactor screen_get_map_xy_with_z to use CoordsXY structs
2019-11-19 11:20:58 +00:00
ζeh Matt
5606b4895b
Fix desync because of ride status ( #10227 )
2019-11-16 16:12:33 +01:00
Tulio Leao
0bc28406e0
Fix mistake on Coords Z assignment
2019-11-14 07:27:28 -03:00
Tulio Leao
7e65aeaea3
Fix issues in code review
...
Implement operator== and operator!= for CoordsXYZD
Set location to null before returning from ride_get_entrance_or_exit_position_from_screen_position
2019-11-13 18:46:02 -03:00
Tulio Leao
27f47e1407
Apply suggestions from code review
2019-11-13 05:18:06 -08:00
Tulio Leao
677bd119cf
Update src/openrct2/ride/Ride.cpp
2019-11-13 05:17:02 -08:00
Tulio Leao
c568510bdc
Fix warning displayed on CI
2019-11-13 09:54:05 -03:00
Tulio Leao
5dfe373061
Refactor ride_get_entrance_or_exit_position_from_screen_position()
2019-11-13 09:41:58 -03:00
ζeh Matt
040a0e58aa
Fix desync in headless mode with rides that create smoke particles
2019-10-27 16:55:34 +01:00
Duncan
c3e14328f1
Little Refactor ( #10075 )
...
* Correct the label for track elem 255.
* Catch last little change
2019-10-19 10:00:42 +02:00
Tulio Leao
9d468167e4
Fix #10106 : Reset number of circuits if unsupported
...
Closes #10106
2019-10-18 18:06:51 -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
Michael Steenbeek
5e1d14f061
Merge pull request #9939 from IntelOrca/refactor/image-id
...
Create new ImageId struct
2019-09-22 17:07:49 +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
Duncan
b94b8880aa
Fix ride station index related bugs
2019-09-19 22:56:54 +02:00
ζeh Matt
afda556e86
Merge pull request #9915 from ZehMatt/audio-music-limit
...
#1349 : Increase the number of ride music played simultaneously to 32
2019-09-10 13:02:29 +02: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
Ted John
48bc28b618
Fix #9937 : Incorrect tooltips when hovering ride entrances and ride exits
...
- Localised strings have an extra POP16, not sure why it was there in vanilla.
- Exit string never appended station number.
2019-08-26 14:31:20 +01:00
Matt
db5c4ab1b4
Cleanup code in ride_music_update_final
2019-08-25 18:14:28 +02:00
Matt
1e1dd2fc2f
Increase the number of ride music played simultaneously to 32
2019-08-25 18:14:25 +02:00
Ted John
c653f13552
Add tertiary colour to ImageId
2019-08-24 22:40:19 +01:00
Ted John
3925a6162d
Start using ImageId
2019-08-24 18:35:40 +01:00
duncanspumpkin
4f157240aa
Fix coordinate direction
2019-08-19 20:04:59 +01:00
duncanspumpkin
927c8a4e85
Create ScreenCoords struct. Refactor 3d_to_2d again
2019-08-19 20:04:58 +01:00
duncanspumpkin
5ba9d55415
Refactor map_is_location_owned_or_has_rights to use CoordsXY
2019-08-19 20:04:57 +01:00
Ted John
42e1f35874
Fix #9864 : Diagonal track cannot be built
2019-08-12 23:09:17 +01:00
Ted John
132a1916d6
Fix #9832 : Access violation in ride_measurement_update ( #9842 )
...
We can not store a ride pointer in ride measurement as rides are now stored in a vector which means their addresses can change when rides are constructed / removed.
2019-08-10 15:14:22 +01:00
duncanspumpkin
54d6722bf2
Link everything together
2019-08-09 20:40:35 +01:00
Ted John
93789b9034
Add nullptr checks for get_ride in libopenrct2ui ( #9795 )
2019-08-09 08:06:25 +01:00
Ted John
ab7b17fc4e
Add nullptr checks for get_ride in libopenrct2 ( #9788 )
2019-08-08 22:58:56 +01:00
Ted John
7fd4fd0c2a
Fix #9179 : Crash when modifying a ride occasionally ( #9756 )
...
Add lots of nullptr and tile element checks in the ride_modify call chain.
2019-08-08 12:59:06 +01:00
Ted John
08677a3322
Fix #9761 : invalid read in ride_measurement_update
2019-08-08 12:55:14 +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
Ted John
cbc74a3c51
Fix GetOrAllocateRide
2019-08-04 20:44:11 +01: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
1a6e5b5548
Fix #9680 : invalid-read in ride_entry_get_supported_track_pieces ( #9681 )
2019-08-03 19:55:24 +02:00
Ted John
fcc41b4647
Fix #9701 : GetRideEntry nullptr can cause stack overflow ( #9702 )
...
GetName calls GetRideEntry so we can't log the name of the ride. I don't think the log is necessary as we now assume rides can have a null ride entry and all callers should check for this.
2019-08-01 23:42:39 +02:00
Ted John
af5daaec70
Fix importing and exporting of banner strings containing colour
2019-07-29 21:20:22 +01:00
Ted John
40d49b93d3
Do not use user strings for peep names
2019-07-29 19:18:16 +01:00
Ted John
300ce9727e
Protect against nullptr
2019-07-29 19:18:16 +01:00
Ted John
eb4c9acb08
Fix compile errors and ride entry null edge case
2019-07-29 19:18:16 +01:00
Ted John
1d4c1958dd
Do not allow duplicate ride names
2019-07-29 19:18:16 +01:00
Ted John
3f8890afde
Fix remaining errors and a few bugs
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
Ted John
0315c9b741
Add lots of guards to track block get next / previous ( #9661 )
2019-07-29 16:37:51 +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
b32f799e21
Merge pull request #9546 from aaruel/vector-locations
...
Refactor #9110 : Use a vector for station locations list in sub_6CB945
2019-07-14 17:46:29 +01:00
Michael Steenbeek
aff3e42408
Merge pull request #9453 from duncanspumpkin/remove_gc
...
Remove Networked Game Commands
2019-07-14 14:46:46 +02:00
aaruel
4eadbe3c6e
Cleaned up location duplication check
2019-07-09 21:10:57 -04:00
aaruel
899b5c136a
Refactor station locations array to vector
2019-07-09 03:04:56 -04:00
duncanspumpkin
2d75c01882
Unnetwork game commands
...
Only track designs still use game commands and they cannot be networked so remove dead code
2019-06-23 18:50:35 +01:00
Matt
fc3afb3349
Remove unnecessary multiplication and division for sprite lists
2019-06-22 17:38:28 +02:00
Duncan
ba040fcd6a
Fix clang format ( #9393 )
2019-06-09 19:18:04 +01:00
Peter
dd948f99c4
#9295 Refactor rct_vehcile->status to rct_vehicle::SetState() ( #9329 )
...
Fix #9295 . Refactor rct_vehicle->status to rct_vehicle::SetState()
Created rct_vehicle::SetState() and refactored all assignments to
rct_vehcile->status. SetState also includes a call to
vehicle_invalidate_window(), so it cannot be forgotten.
2019-06-09 15:45:56 +01:00
Ted John
6f0298deb3
Refactor ride measurement storage
2019-06-09 11:55:41 +02:00