Ł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
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
Gymnasiast
09cc95f536
Move remaining calls to set_format_arg()
2020-06-03 14:49:04 +02:00
Gymnasiast
02338ffc5c
Migrate 50 more calls to set_format_arg()
2020-06-03 14:49:04 +02:00
Ted John
f6fbd272ec
Add built_date to ScRide and add GetAge()
2020-05-23 15:28:03 +01:00
TusharSariya
2cf95adc4b
Fix #11565 : gfx_draw_string_left_clipped to use ScreenCoordsXY ( #11765 )
...
* Issue #11565 , created overload for gfx_draw_string_left_clipped
Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
TomasZilinek
277080de74
Fix #11570 - create gfx_draw_string_centered() overload ( #11760 )
...
* Fix #11570 - create gfx_draw_string_centered() overload
I created the overload, updated all calls from the old function to the new and deleted the old one
2020-05-17 15:29:56 -03:00
Gymnasiast
15b5d97795
Refactor shop items
2020-05-11 19:16:23 +02:00
Michael Steenbeek
d7637cd70f
Replace many C-style casts ( #11720 )
2020-05-11 14:32:56 +02:00
Michael Steenbeek
d5f2168b22
Merge pull request #11653 from Gymnasiast/refactor/window-skeleton
...
Introduce WINDOW_SHIM define
2020-05-10 11:34:21 +02:00
frutiemax
c447cde63c
Close #11561 : Use ScreenCoordsXY in gfx_draw_string_centred_wrapped()
...
* Add gfx_draw_string_centred_wrapped overload using ScreenCoordsXY
* Update calls to gfx_draw_string_centred_wrapped
* Remove old signature of gfx_draw_string_centred_wrapped
* Meaningful coordinate variable names and constructor calls
2020-05-10 01:00:26 -03:00
Gymnasiast
f8aeb70398
Apply review requests
2020-05-09 18:07:16 +02:00
Gymnasiast
00461aedf3
Fix formatting and errors
2020-05-09 18:07:16 +02:00
Gymnasiast
43556d2dec
Remove ifdefs for LEFT_CLOSEBOX - for now
2020-05-09 18:07:16 +02:00
Gymnasiast
9e4c664944
Replace defines with constexpr
2020-05-09 18:07:16 +02:00
Gymnasiast
96fe3d3b3c
Make WINDOW_SKELETON take a title, height and width
2020-05-09 18:07:16 +02:00
tassaron2
559ede5d14
Add compile option to move close box to the left
2020-05-09 18:07:16 +02:00
Michael Steenbeek
8660bbe9d7
Fix #1013 : negative length in Ride window ( #11651 )
2020-05-06 11:32:10 +02:00
Tulio Leao
d0704baab2
Make window_dropdown_show_text() use ScreenCoordsXY
2020-05-01 15:58:36 -03:00
Tulio Leao
4933785b1c
Make window_dropdown_show_text_custom_width() use ScreenCoordsXY
2020-05-01 15:48:20 -03:00
Tulio Leao
9299228f07
Use ScreenCoordsXY on windows/Ride.cpp
2020-05-01 12:58:10 -03:00
hdpoliveira
d69cc1c877
Part of #9473 : Create Vehicle::TrainHead and Vehicle::TrainTail
...
Converted from vehicle_get_head and vehicle_get_tail
2020-04-30 20:53:17 -03:00
Gymnasiast
e67ebed697
Remove some Americanisms
2020-04-26 11:07:19 +02:00
Gymnasiast
100236c2d2
Move available ride modes to RTD; ride mode cleanup
2020-04-26 11:07:19 +02:00
Michael Steenbeek
44f62a97c2
Move PhotoItem to RTD ( #11415 )
2020-04-24 04:47:40 +02:00
Michael Steenbeek
e1e58423fc
Replace RideTypeHasRideGroups with flag ( #11375 )
2020-04-20 21:50:35 +02:00
Gymnasiast
7d50a2d186
Move alternate ride type to RTD
2020-04-19 18:44:38 +02:00
Michael Steenbeek
deb56c2a72
Move LiftData to RTDs ( #11347 )
2020-04-19 14:41:26 +02:00
Michał Janiszewski
5bfc41f49e
openrct2-ui cast fixes ( #11348 )
2020-04-19 14:08:22 +02:00
Michael Steenbeek
d3a5446114
Create ride type flag for suspended rides ( #11355 )
2020-04-19 13:53:51 +02:00
Michael Steenbeek
8127437de1
Reduce direct ride type checking; move available piece lookup to RTD ( #11353 )
2020-04-19 13:32:43 +02:00
Gymnasiast
c41fb64535
Move available breakdowns to RTD
2020-04-18 15:22:41 +02:00
Tulio Leao
935cfe90fc
Use named casts on openrct2-ui/windows ( #11136 )
2020-04-18 13:32:48 +02:00
Michael Steenbeek
b4a763c751
Move naming convention to RTD ( #11319 )
2020-04-18 12:12:07 +02:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors
2020-04-17 17:03:33 +02:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places ( #10992 )
2020-03-26 21:38:26 +01:00
Gymnasiast
ceec430ae1
Raise max size of dropdowns to 512 items
2020-03-20 21:48:27 +01:00
Ted John
c89cecb2b5
Refactor the ride type to entry map ( #10967 )
...
Use C++ vectors and allow larger ride entry indices (> 256)
2020-03-20 18:07:31 +01:00
Aaron van Geffen
340f6522dd
Increase the height of various price/loan/duration spinner widgets.
2020-03-16 23:46:33 +01:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags ( #10947 )
2020-03-16 22:52:06 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates
2020-03-13 12:03:43 +01:00
Gymnasiast
8883f428ba
Clean up window vars
2020-03-05 08:03:38 -03:00
Tulio Leao
724a6d4dcf
Make rct_window use ScreenCoordsXY
2020-03-02 20:51:01 -03:00
Tulio Leao
87f724d038
Use Coords objects for viewport_create()
2020-03-02 20:49:59 -03:00
Tulio Leao
9bcd20e0e6
Prefer const ref to send ScreenCoordsXY over
2020-02-29 08:25:48 -03:00
Michael Steenbeek
e16a53df1d
Fix #10694 : Lift hill speed of the Flying RC cannot be changed
2020-02-22 18:47:33 +01:00
Michael Steenbeek
d16fbb0cd2
Change ride->overall_view to CoordsXY ( #10673 )
2020-02-08 17:19:59 +01:00
Duncan
171e255981
Fix #10598 . Mistake made when fixing #7784 . ( #10606 )
2020-01-23 22:43:29 +01:00
Aaron van Geffen
d1eb041958
Increase height of track save buttons. ( #10604 )
2020-01-22 13:30:33 +01:00
duncanspumpkin
a5ef8d6240
Rename rct_vehicle
2020-01-19 17:14:56 +00:00
Michael Steenbeek
f05aeb1fcd
Fix #7784 : Vehicle tab takes 1st car colour instead of tab_vehicle's colour ( #10544 )
2020-01-12 10:32:11 +01:00