1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00
Commit Graph

121 Commits

Author SHA1 Message Date
ju-pinheiro
bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Hielke Morsink
257ada4617 Introduce constant for ticks per month (#13253) 2020-10-20 21:05:27 -03:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Gymnasiast
eb2f40f35c Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
ζeh Matt
54edba2272 Merge pull request #13023 from gsckoco/make_add_news_item_assoc_optional
Make add_news_item assoc optional
2020-09-28 20:28:45 +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
gsckoco
391dabc4f9 Made add_news_item argument assoc optional 2020-09-28 12:28:31 +01:00
Michael Steenbeek
3c07a9e49b Allow opening Objective options via console (#13000) 2020-09-27 21:53:31 -03:00
Tulio Leao
c1729c8a87 Merge pull request #12858 from ju-pinheiro/network-strong-enums
NETWORK_PERMISSION and NETWORK_AUTH replaced by strong enums
2020-09-15 08:07:19 -03:00
ju-pinheiro
214620951f Close #12421: Refactor NETWORK_AUTH to use strong enum
Replacing enum NETWORK_AUTH with enum class NetworkAuth.
2020-09-10 19:32:28 -03:00
Jacob Schwartz
fe71ce437d Close #12434: Refactor ENTERTAINER_COSTUME to use strong enum (#12865) 2020-09-08 16:29:18 -03:00
Simon Ellmann
5f3fe62f83 Close #12432: Refactor STAFF_MODE to use strong enum (#12752)
* Refactor STAFF_MODE to use strong enum

Closes #12432

* Change type of gStaffModes to StaffMode
2020-09-02 12:48:40 -03:00
Sidney
5330f7fb86 closes #12445 Refactor CLIMATE to use strong enum (#12551) 2020-08-21 09:43:57 +01:00
ryan-bello
cc2bb33892 changed enum STAFF_TYPE to strong enum StaffType, moved it to Peep.h 2020-08-17 22:59:02 -04:00
ryan-bello
54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03: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
Duncan
c6e26267a4 Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
Tulio Leao
63f683853e Merge pull request #12479 from pizza2004/news-enum
Refactor NewsItem to use strong enums
2020-07-28 18:21:45 -03:00
pizza2004
cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
Duncan
8a378ad236 Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
Matt
fa2bd4cad6 Refactor PeepType to use strong enum 2020-07-25 11:54:37 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
f49149222e Close #12245: Use coords objects for SetLocation (Window_internal.h) 2020-07-16 23:01:42 +02:00
Duncan
94b3598102 Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising

* Fix null deref issues
2020-07-06 22:02:25 +01:00
duncanspumpkin
e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +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
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
Tulio Leao
a993ad8408 Rename Peep::energy to Energy 2020-06-08 23:34:35 -03:00
Tulio Leao
1c59cc2aae Rename Peep::energy_target to EnergyTarget 2020-06-08 23:32:22 -03:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
duncanspumpkin
5c48e5f0bb Remove AsPeep 2020-06-06 11:36:48 +01:00
Gymnasiast
9a9ab47856 Remove Twitch from the rest of the code 2020-05-28 09:28:32 +02:00
Gymnasiast
cc65564521 Use (RCT12)ObjectEntryIndex in more places 2020-05-01 22:06:13 +02:00
Gymnasiast
bafb63df55 Add missing RIDE_TYPE_NULL check 2020-04-30 13:58:48 +02:00
Gymnasiast
6cdee9db93 Fix #7006: Use RTDs for determining ride category 2020-04-30 12:59:18 +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
Julian
a6684603d8 Load_Park feature for headless server (#11218)
* Load_Park feature

New feature "load_park name" from "save" folder.

* Fix codestyle

-

* Fix codestyle

-

* Fixed typo for load_park 

load_park is now <name> instead of [name]

* improve load_park command

allow to specify park via absolute path
make .sv6 filename extension optional
support .sc6 filename extension, but default to .sv6

* report success or failure of load_park to console

Co-authored-by: quadratrund <56112624+quadratrund@users.noreply.github.com>
2020-04-16 16:36:00 +02:00
Michał Janiszewski
46f8c1458e Add add_news_item to the console (#11281) 2020-04-16 16:27:48 +02:00
duncanspumpkin
1395b9a9c1 Fix normalisation writing files to unknown location 2020-04-12 10:54:17 +01:00
Michał Janiszewski
e19eaa6a98 Upload park recording in case of crash 2020-04-02 23:44:59 +02:00
Michael Steenbeek
d86dce17e8 Prepare object indices for uint16_t (part 2) (#10966) 2020-03-18 21:27:53 +01:00
jeysbach
568b19e7b3 Feature #10637: Console command for removing floating objects 2020-03-16 09:48:26 +01:00
Michael Steenbeek
18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Michael Steenbeek
be13c1fc87 Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Gymnasiast
2eb967b30d Change station start to CoordsXY 2020-03-05 12:29:02 +01:00
Gymnasiast
66dbb5e166 Refactor access to ResearchItem's rawValue 2020-01-26 15:17:37 +01:00
duncanspumpkin
08ea5585ee Small refactors and cleanups 2020-01-19 17:16:42 +00:00