1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00
Commit Graph

235 Commits

Author SHA1 Message Date
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Manuel Vögele
69b07904c1 Make TileElement conversion preserve the const qualifier
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Duncan
250586cb45 Port some OpenLoco helper functions (#13113)
* Port some OpenLoco helper functions

Added a few helper functions from OpenLoco to make viewport code a bit simpler
2020-10-12 22:25:11 -03:00
Tulio Leao
29955f28e0 Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum
Refactor TRACK_ELEM_* enum
2020-10-01 22:05:44 -03:00
Simon Jarrett
52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Łukasz Pękalski
d1cd2e08b5 Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
Gymnasiast
247de81e3b Apply requested fixes 2020-09-12 13:45:50 +02:00
Ron4u
5fe542dd25 fixed issue 12335 2020-09-12 13:18:00 +02:00
Richard Fine
4d3ba7a6f0 Rename PathElement::Edges for clarity
PathElement::Edges actualy stores both 'edges' (in the lower 4 bits) and 'corners' in the upper four. Rename the variable to make this dual usage easier to see.
2020-09-07 21:20:34 -04:00
Simon J
b51e98215a Fix #12728: Paths made in scenario editor don't connect to the map edge (#12730)
Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-08-19 19:51:13 -03:00
frutiemax
9ab1f3b5fe Close #12336: Remove goto from loc_6A6D7E (#12366) 2020-08-17 23:28:26 -03:00
Duncan
aa11773da3 Fix #12566, #12565, #12562, #12560, #12558: Nullptr deref (#12567)
Mistake made in refactor meant that a nullptr deref took place when the screen coords were outside of the normal play area
2020-08-02 20:13:09 +01:00
Duncan
733bc5a981 Close #12518: Viewport Refactor (#12541)
* Remove viewport pointer from get_map_coordinates_from_pos

* Removed viewport from get_window

* Return a InteractionInfo from get_map_coord...

* Remove viewport_interaction_info struct

* Add Entity union to simplify code

* Name the enum used for viewport interaction

* Simplify functions further by returning the info struct

* Add default switches
2020-08-02 08:32:59 +01:00
Matt
4b17b2ea76 Fix GetAdditionEntry trying obtain the object when no additions exist 2020-07-24 15:58:17 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
27734e2971 Part of #12160: Use Coords for viewport_coord_to_map_coord (#12216) 2020-07-12 18:42:54 -03:00
duncanspumpkin
a30374d200 Use new iterator
Fix mac builds

Fix minor mistake

Fix vehicle loops
2020-06-16 20:25:47 +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
hdpoliveira
a3fe90c250 Create SpriteBase::Invalidate methods (#11948) 2020-06-14 15:18:07 -03: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
duncanspumpkin
517ed57593 Remove IsPeep 2020-06-06 11:36:48 +01: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
ifimfree
fb6dd4bfad Create constants for a few flags 2020-04-20 10:39:26 +02:00
Michael Steenbeek
8127437de1 Reduce direct ride type checking; move available piece lookup to RTD (#11353) 2020-04-19 13:32:43 +02:00
Tulio Leao
64e4a8420e Use named casts on openrct2/world (#11141) 2020-04-17 21:08:22 +02:00
Michael Steenbeek
cfb405f0ed Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Gymnasiast
bdf681f440 Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Gymnasiast
c9afcaa5b3 Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast
3ed7694495 Move tile element-specific flags 2020-03-04 22:01:09 +01:00
Gymnasiast
57a40c0657 Extend PathElement 2020-03-04 21:57:42 +01: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
Michael Steenbeek
f41f878581 Replace some usages of LocationXY(Z)16 (#10699) 2020-02-18 22:42:38 +01:00
Matt
758a7e432f Use const reference instead of copy for location structures 2020-02-13 11:53:14 +01:00
duncanspumpkin
5e9e9df7ce Refactor invalidate_sprite 2020-01-19 17:16:42 +00:00
duncanspumpkin
a262f325ed Refactor sprite_remove 2020-01-19 17:15:52 +00:00
duncanspumpkin
164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Tulio Leao
ad89319918 Simplify loop on footpath_update_path_wide() 2020-01-19 13:09:45 -03:00
Tulio Leao
132ab424f7 Use loop on footpath_update_path_wide() to iterate with CoordsDirectionDelta 2020-01-19 13:09:45 -03:00
Tulio Leao
57faa437c0 Prefer CoordsDirectionDelta on footpath_update_path_wide_flags() 2020-01-19 13:09:45 -03:00
Michael Steenbeek
8a9f0eeca5 Prepare track piece handling code for more than 256 pieces (#10575) 2020-01-17 12:27:14 +01:00
Tulio Leao
931adaa747 Use TileCoordsXY on footpath_fix_corners_around() 2020-01-14 07:33:46 -03:00
Tulio Leao
05baa13012 Use CoordsXY on footpath_fix_ownership() 2020-01-14 07:33:46 -03:00
Tulio Leao
ac063a7e9a Use CoordsXY on footpath_update_path_wide_flags() 2020-01-14 07:33:43 -03:00
Tulio Leao
89edde6a3c Use CoordsXY on footpath_bridge_get_info_from_pos() 2020-01-12 22:27:30 -03:00