Commit Graph

61 Commits

Author SHA1 Message Date
ζeh Matt 01c808c601
Remove unused argument of wooden_(a|b)_supports_paint_setup 2021-08-26 20:54:06 +03:00
Duncan 008f106242
Add constants for golf flags (#15072)
* Add constants for golf flags

* Reorg SubPositionData for minigolf

* Add enum for golf states

* Add golf animation enum

* Fix names of animations

* Correct spleing

* Revert stray change
2021-08-25 11:08:57 +01:00
ZehMatt 7feea62ab3
Remove overload of PaintAddImageAsParent with bbox offset 2021-08-20 23:34:44 +03:00
Michael Steenbeek 8f5ec43486
Pass derived tile element classes to functions (#15206) 2021-08-11 23:26:46 +02:00
ζeh Matt 87007ba2a3
Change track paint signature to pass ride instead of ride index 2021-07-28 18:21:59 +02:00
Matt db493d157e
Refactor uses of PaintAddImageAsParent in MiniGolf.cpp 2021-06-05 17:16:06 +03:00
Duncan 39fcc5d078
Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Duncan 0a47d2157a
Use more specific types where appropriate (#14388)
It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
2021-03-25 08:44:25 +00:00
duncanspumpkin 6882ddaf12 Clang format the relevant files 2020-11-07 14:15:25 +00:00
duncanspumpkin d6669be939 Rename main paint add image functions 2020-11-07 14:15:24 +00: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
Richard Fine 74b581c572 Remove unused 'direction' parameter
The get_track_paint_function functions have all been taking an extra 'direction' parameter, but nothing is actually using it. To simplify things, remove the parameter.
2020-09-07 21:20:34 -04:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Hudson Oliveira ef5f117373
Part of #9473: Create Vehicle::GetRide (#12002)
* Part of #9473: Create Vehicle::GetRide

* Redefine Vehicle::GetRide in Compat.cpp
2020-06-21 08:38:53 +01: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
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
Michael Steenbeek fa91b4091f
Name tunnel constants (#11694) 2020-05-09 23:54:47 +02:00
Matt c381d9ff3f
Remove obsolete construction of CoordsXY object 2020-02-13 12:11:20 +01:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
Sijmen Schoon ab2dbea32a
Change a sizable portion of LocationXY(Z) to (Tile)CoordsXY(Z) 2019-10-31 00:19:14 +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
Matt 37c3809744 Implement partial multicore rendering 2019-03-31 15:50:55 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John 8701286772
Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Ted John 06f203a7e7 Implement surfaces, edges and stations as objects 2018-12-09 23:30:40 +00:00
Matt 468d94a6ca Remove gCurrentViewportFlags 2018-12-05 23:09:17 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michael Steenbeek 74ccf010e6 Port surface elements to new structure 2018-09-16 21:34:51 +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
clang-format ca6fda5724 clang-format generated ride files 2018-07-23 16:00:08 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +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
ζeh Matt ee56021067 Minor code cleanup. (#7538) 2018-05-18 22:50:57 +02:00
oli414 3bff12c081 Seperate surface tile element 2018-05-01 16:33:16 +02:00
Hielke Morsink 30063984e6
Delete unused function arguments or mark them so (#7426)
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).

I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski 32619f460b Remove remaining calls to get_current_rotation in paint code 2018-02-17 13:11:07 +01:00
Michał Janiszewski acccd0a2c8 Remove rotation argument from sub_98199C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 3f92471ffb Remove rotation argument from sub_98197C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 3f76bd214f Const all the painted tile elements
Extracted from https://github.com/OpenRCT2/OpenRCT2/pull/7036
2018-02-12 16:03:20 +01:00
duncanspumpkin 5401e69b50 Name vehicle animation offsets 2018-01-30 12:53:50 +00:00
Michał Janiszewski 3ba0cc3dae Add missed constexprs 2018-01-14 16:13:37 +01:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00