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

277 Commits

Author SHA1 Message Date
Tulio Leao
8f5ee758ee Fix #3200: Close Construction window upon selecting vehicle page (#13022) 2020-09-28 07:37:22 -03:00
Matt
958f3824c9 Fix #12969: Crash opening ride window with invalid mechanic assigned 2020-09-27 13:40:40 +03:00
Matt
ccde06ab0f Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
frutiemax
af591c834b Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1) (#12938)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-16 00:02:22 -03:00
Gymnasiast
d140dd72c6 Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast
b788a099b5 Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Nils Caspar
22f29bf192 Close #12414: Refactor GUEST_LIST_FILTER_TYPE to use strong enum (#12830) 2020-09-02 12:50:16 -03:00
Tulio Leao
731a93dc39 Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Gymnasiast
549a771120 Use Formatter& 2020-08-26 17:13:19 +02:00
Gymnasiast
879ce64a86 Use Formatter in windows/Ride.cpp 2020-08-26 13:59:18 +02:00
Michael Steenbeek
56c623e549 Merge pull request #12671 from AaronVanGeffen/refactor/tabs
MakeTab wrapper for standard tab widgets
2020-08-26 12:13:36 +02: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
Aaron van Geffen
6b9211c8b8 Refactor Park, Player, Research, Ride* to use MakeTab 2020-08-17 20:59:42 +02:00
Duncan
55ba164dee Fix crash when switching ride types with construct window open (#12694) 2020-08-16 18:48:21 +01:00
pizza2004
647730fcfa Fix #12691: Tooltip at ride's graph tab is not using a proper string 2020-08-15 23:17:38 +02:00
Arran Ireland
4de58e1fd4 Close #12440: Refactor VEHICLE_STATUS to use strong enum (#12606)
* Close #12440: Refactor VEHICLE_STATUS to use strong enum

* Fix code formatting for VEHICLE_STATUS refactoring

* Refactor VehicleStatus enum to be inside Vehicle

This commit moves VehicleStatus inside Vehicle,
renamed as Status.
2020-08-09 06:24:25 +01:00
Duncan
0809069e74 Fix #12577: Mistake made in refactor #12538 (#12579)
Loop called the peep window open only when nullptr. Added extra checks for nullptr on window open
2020-08-03 20:09:24 -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
Łukasz Pękalski
0f78d452a4 Part of #12497: Remove extra SPRITE_INDEX_NULL check (#12538)
* refactor: deleted double check of SPRITE_INDEX_NULL in Staff* ride_get_mechanic(Ride* ride)

* refactor: deleted double check of SPRITE_INDEX_NULL in Ride.cpp file

* refactor: deleted double check of SPRITE_INDEX_NULL in windows/Ride.cpp in function static rct_string_id window_ride_get_status_vehicle

* refactor: deleted double check of SPRITE_INDEX_NULL in ride/Ride.cpp

* refactor: deleted double check in FormatStatusTo
2020-08-02 08:28:11 +01:00
Michael Steenbeek
4e9c32ff3a Merge pull request #12521 from AaronVanGeffen/refactor/widgets-8
Refactor the last sets of widget definitions
2020-08-01 15:11:28 +02:00
Aaron van Geffen
e6e850e399 Apply suggestions from code review
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-07-31 11:25:50 +02: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
Aaron van Geffen
9b6f6b6216 Refactor Ride 2020-07-30 22:36:42 +02:00
Gymnasiast
cf664c8340 Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
frutiemax
84a4c4e473 Part of #12096: ScreenRect on gfx_fill_rect in windows/Ride.cpp (#12239) 2020-07-13 17:49:12 -03:00
Michał Janiszewski
dbf00956b5 Fix null pointers reported by launchpad builders (#12168) 2020-07-09 22:52:14 +01:00
Tulio Leao
f29abf6953 Part of #11389: Use Formatter on Ride::FormatStatusTo (#12172) 2020-07-09 18:54:30 +02:00
duncanspumpkin
e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
frutiemax
d969e93ea1 Fix #12112: Move TrackColourPreviews to RideTypeDescriptors (#12114) 2020-07-03 22:15:11 +02:00
frutiemax
4661262572 Fix #12085: Use ScreenCoordsXY on clip_drawpixelinfo (#12105) 2020-07-02 14:06:28 -03:00
Aaron van Geffen
2e153a7e95 Introduce widget::midX and widget::midY helper functions 2020-06-25 10:31:15 +02:00
Aaron van Geffen
681b8d7938 Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
frutiemax
14a07359b3 Part of #11389: Use formatter class for Ride::FormatNameTo (#12041) 2020-06-24 21:02:08 -03:00
TomasZilinek
cd6076b5bc FIx #12017 - Create gfx_draw_sprite overload (#12049)
Second and final part. replaces the rest of the calls and removes the old function.
2020-06-24 12:48:17 -03:00
frutiemax
6e47385b90 Part of #11389 : in peep class, FormatTo* use Formatter class (#12035) 2020-06-23 14:52:08 +01:00
TomasZilinek
9efe43fa59 Fix #11562 - gfx_draw_string_left_wrapped overload (#12015)
I created the overload, replaced remaining calls with the new function and removed the old function.
2020-06-21 06:25:31 -03: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
TomasZilinek
c1546059ad Close #11571 - Remove <x,y> gfx_draw_string_left overload (#12010)
Third and final part. replaces the rest of the calls to x,y overload
2020-06-20 16:09:45 -03:00
Michael Steenbeek
e2b187c24a Merge pull request #11921 from duncanspumpkin/CreateSprite6
Entity List Iterator
2020-06-17 21:28:36 +02:00
frutiemax
de1c172c74 Move RideProperties and rideBonusValue to RideTypeDescriptors
Part of #11964.
2020-06-17 18:59:04 +02:00
Gymnasiast
96678a14eb Move ride naming to RTD
This also means that all unused ride types will now have the same name. I have made an exception for the 'arbitrary ride type change' dropdown only.
2020-06-16 22:52:48 +02: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
613cec3f7a Part of #11564: gfx_draw_string_centred_clipped with ScreenCoordsXY 2020-06-14 12:26:53 -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
Michael Steenbeek
7646f1b7e4 Merge pull request #11896 from hdpoliveira/update_flags
Update flags
2020-06-07 23:03:48 +02:00
hdpoliveira
5b1469b8b7 Create Vehicle::GetTrackType() (#11895) 2020-06-07 21:43:32 +01:00
hdpoliveira
480d1a6d6b Create Vehicle::ClearUpdateFlag 2020-06-07 17:16:12 -03:00
Gymnasiast
66a71e009d Create Rewind method on Formatter 2020-06-03 14:49:04 +02:00