1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00
Commit Graph

708 Commits

Author SHA1 Message Date
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
Tulio Leao
ccd76f8fc4 Rename Peep::current_ride to CurrentRide 2020-06-08 17:36:35 -03:00
Tulio Leao
1ac3b3d2dc Rename Peep::current_train to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao
335cbc900e Rename Peep::current_car to CurrentCar 2020-06-08 17:36:34 -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
Ted John
626178a70e Add constants for palette indexes 2020-05-28 22:37:50 +01:00
Ted John
d3f7ec4844 Create new PaletteMap type to replace byte pointers 2020-05-28 20:00:23 +01:00
Duncan
97e985521e Merge pull request #11819 from IntelOrca/refactor/game-palette
Refactor rct_palette to GamePalette
2020-05-28 11:41:04 +01:00
Gymnasiast
9a9ab47856 Remove Twitch from the rest of the code 2020-05-28 09:28:32 +02:00
Ted John
46bb30f8a1 Refactor rct_palette to GamePalette 2020-05-27 20:52:51 +01:00
Michael Steenbeek
d7637cd70f Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
TomasZilinek
9fde6a74c3 Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
Ted John
45d32bec68 [Plugin] Add API for taking captures and giant captures of the park 2020-05-09 13:55:24 +02:00
Ted John
0ebdd93e00 Fix #11667: Memory dumps being generated every time the game is closed 2020-05-08 15:55:19 +01: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
Duncan
32eb7071a1 Fix #11550: Use std::nullopt instead of empty brace (#11595)
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
Gymnasiast
cc65564521 Use (RCT12)ObjectEntryIndex in more places 2020-05-01 22:06:13 +02:00
Tulio Leao
9960e4b563 Merge pull request #11552 from IntelOrca/plugin/window-tabs
[Plugin] Implement custom window tabs
2020-05-01 13:49:31 -03:00
Ted John
98249c777d Implement string tooltips for plugins 2020-05-01 00:06:58 +01:00
Ted John
4501173c0d Implement custom window tabs 2020-04-30 23:42:28 +01: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
Michael Steenbeek
2e50cd44ba Refactor ride_list_item to RideSelection (#11505) 2020-04-27 16:26:35 +02:00
Ted John
c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John
e6341f0a42 Get scripting compiling on clang 2020-04-26 14:35:03 +01:00
Ted John
bac91cd563 Allow scripting to be compile-disabled 2020-04-26 14:35:03 +01:00
Ted John
639faa2085 Fix GCC issues 2020-04-26 14:35:03 +01:00
Ted John
e0f66fe3cd Implement viewport widgets 2020-04-26 14:35:02 +01:00
Ted John
da98ef63d3 Implement checkboxes and disabling widgets 2020-04-26 14:35:02 +01:00
Ted John
5bd58118b5 Get the plugin branch building again 2020-04-26 14:35:00 +01:00
Hielke Morsink
e8bdb95f13 format new files
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Hielke Morsink
c37d7d859e Use C++ types 2020-04-26 14:35:00 +01:00
Ted John
7047dec1d9 Get custom drop downs working
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-04-26 14:34:59 +01:00
Ted John
918022da3e Get custom buttons working 2020-04-26 14:34:59 +01:00
Ted John
291143c3cd Add opening of a custom window 2020-04-26 14:34:59 +01:00
Ted John
43508e0402 Add script engine and connect to std console 2020-04-26 14:34:58 +01:00
Breno Rodrigues Guimarães
a0619d04cf Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03: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
Olivier Wervers
fc5a5fe320 Fix #11370: Copy and paste shortcuts switched (#11373) 2020-04-20 12:16:50 +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