Commit Graph

205 Commits

Author SHA1 Message Date
Hielke Morsink edde5096db
Use correct size for monorail_cycles_track_pieces_flat 2021-10-19 21:54:02 +02:00
Hielke Morsink 9dd20ec619
Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
Hielke Morsink c2d3ca5f85
Automatically deduce std::array types
This also improves formatting of some arrays with weird or no indention.
2021-10-14 23:27:28 +02:00
ζeh Matt b733e97bfa
Remove numerics from common.h and use it as needed 2021-09-11 20:21:08 +03:00
Michael Steenbeek e62fabf607
Merge pull request #15317 from spacek531/more-no-platform
even fewer platforms
2021-09-05 13:40:46 +02:00
Ted John 3c451a4af4
Use music objects instead of IDs 2021-09-01 10:26:23 +02:00
spacek531 77d546f39d dodgems and flying saucers 2021-08-31 08:55:31 -07:00
spacek531 c248c8fada format spiralslide 2021-08-31 08:55:30 -07:00
spacek531 c8bed6fa87 tower rides and slide 2021-08-31 08:55:30 -07:00
ζ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 77b06cbf9a
Use CoordsXY for haunted_house_bound_box and correct arg passing 2021-08-20 23:34:44 +03:00
ZehMatt 5f49276d53
Use CoordsXY for ferris_wheel_bound_box and correct arg passing 2021-08-20 23:34:44 +03:00
ZehMatt a5d2939108
Use CoordsXY for rct_crooked_house_bound_box and correct arg passing 2021-08-20 23:34:44 +03:00
ZehMatt 7feea62ab3
Remove overload of PaintAddImageAsParent with bbox offset 2021-08-20 23:34:44 +03:00
ZehMatt 6c233ac802
Remove first overload of PaintAddImageAsParent 2021-08-20 23:34:44 +03:00
Duncan 940cab87d3
Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01: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
Gymnasiast bb682ca09d
Hide brown base on flat rides if "no platform" station style is selected 2021-07-28 11:22:44 +02:00
Matt 5b2655fe7e
Refactor uses of PaintAddImageAsParent in Maze.cpp 2021-06-05 17:16:06 +03:00
Matt db493d157e
Refactor uses of PaintAddImageAsParent in MiniGolf.cpp 2021-06-05 17:16:06 +03:00
Matt a12a2b6964
Refactor uses of PaintAddImageAsParent in MerryGoRound.cpp 2021-06-05 17:16:05 +03:00
Matt 5781f8e810
Refactor uses of PaintAddImageAsParent in FlyingSaucers.cpp 2021-06-05 17:16:04 +03:00
Matt ef527d3c4b
Refactor uses of PaintAddImageAsParent in CarRide.cpp 2021-06-05 17:16:04 +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
ZxBiohazardZx 36b2742c19
Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Duncan 975ed665f8
Fix opengl extra zoom bugs (#14601)
* Fix #14449: Surface smoothing not working at extra zooms

Caused by two issues. One was spotted by @AaronVanGeffen in that surface smoothing was turned off. The other was caused by a bug in the opengl renderer that went unnoticed due to never being hit during normal play.

* Fix merrygoround and enterprise extra zoom peep drawing

* Add changelog entry
2021-05-10 12:43:46 -03: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
Michał Janiszewski bfdf6874ac Reduce inclusion of Vehicle.h 2021-02-25 10:56:27 +01:00
Gymnasiast 1b964c0f2e
Refactor flat ride track pieces 2021-02-18 17:50:19 +01:00
Cory Sanin a4f58c67f4
Fix #13961: Guests sliding down slide missing on close zoom levels 2021-02-04 14:03:52 +01:00
Michael Steenbeek 60d1e94046
Close #7059: Implement landscape doors on Ghost Train (#13636)
* Implement landscape door updating

* Implement door drawing for Ghost Train

* Amend changelog and bump network version

* Apply review requests

* Always return default seat rotation for ride types with landscape doors

* Fix comment

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-01-10 21:38:02 +00:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Richard Qian b86c28a66e Restore extra cheat track pieces for some rides; intended to fix #13324
Includes:
* Corkscrew Roller Coaster
* Hypercoaster
* Steel Wild Mouse
* Spinning Wild Mouse
* Water Coaster
* Car Ride
* Monster Trucks

Some pieces are incorrectly labelled (log bumps and rotation control toggle),
and need to be investigated further
2020-12-19 15:33:19 -06:00
Łukasz Pękalski 4adf745237
Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Łukasz Pękalski 3de233c796
Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
Florian Probst 923b5f990d
Close #12438: Refactor RIDE_COMPONENT_TYPE to use strong enum (#13456)
* Part of #12438  Changed RIDE_COMPONENT_TYPE to enum class

(1/3)

Changed the enum RIDE_COMPONENT_TYPE to be enum class in RideData.h.
Shortened the enumerators.
And fixed

I split the changes I did into 3 commits because the enum is used in a total of 85 different files where I just replace the single line where they occur.

The changes in those 85 files are analogous to my change in line 328 in RideData.h in this commit.

* Part of #12438  changed all RIDE_COMPONENT_TYPE enumerators appearances

(2/3)

Changed every appearance of the old RIDE_COMPONENT_TYPE enumerators to the changed enumerators from last commit.

* Part of #12438

(3/3)

Used EnumValue() wherever a field or variable of the type RideComponentType was used as an index.

Havent checked if anything from these 3 commits on this branch got codestyle issues

* Part of #12438

used clang-format

* Closes #12438  Added Accessor function for RideComponentName

Added Accessor function GetRideComponentName to RideData.
to replace the use RideComponentNames[EnumValue(RideComponentType type)]

* Close #12438 moving GetRideComponentName to RideData Headerfile

Moved GetRideComponentName to RideData Headerfile since thats where it should be.
2020-11-26 15:23:47 -03:00
duncanspumpkin 6882ddaf12 Clang format the relevant files 2020-11-07 14:15:25 +00:00
duncanspumpkin f6d2db48dc Name 98196C 2020-11-07 14:15:25 +00:00
duncanspumpkin 533a845b0f Name further functions 2020-11-07 14:15:25 +00:00
duncanspumpkin d6669be939 Rename main paint add image functions 2020-11-07 14:15:24 +00:00
Duncan 214f6992dd
Rename to TitleCase and name LastAttachedPS (#13260) 2020-10-22 18:13:54 +01:00
ζeh Matt 61b510db66
Merge pull request #13073 from ZehMatt/refactor/audio-cleanup
Minor cleanup around audio code
2020-10-07 21:18:59 +03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Vinicius Sa 59e9162137
Give a variable for an arithmetic operation used as a condition
Avoid reverse logic around if-statement for the sake of readability.

Reported by PVS-Studio (Warning: V793).

Fix 4/7.

Issue: 12523
2020-10-06 18:21:21 -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
Łukasz Pękalski 065da23b3b
Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00