Commit Graph

151 Commits

Author SHA1 Message Date
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
pizza2004 b0fd5f93d7
Refactor UI/Interface misc to TitleCase (#13354)
* Refactor LandTool to Namespace

* Refactor Theme to TitleCase

* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
ζeh Matt 645289f4ec
Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
Matt ccde06ab0f
Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +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
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 b34b573ad9
Refactor more widget definitions (#12354)
* Refactor Dropdown

* Refactor EditorMain

* Refactor EditorScenarioOptions

* Refactor InstallTrack

Increased window height to 460 (was 448); one line of text was overflowing.

* Refactor Guest

* Refactor LandRights

* Refactor LoadSave

* Refactor Main

* Refactor Map

* Add extra constants to EditorScenarioOptions
2020-07-27 19:54:22 -03: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 0fa0ca451e
Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
frutiemax 59618327af
Part of #12096: Use ScreenRect on gfx_fill_rect in Map.cpp (#12230) 2020-07-13 14:36:49 -03:00
duncanspumpkin e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01: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
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
TomasZilinek 2264c5f7f1
Part of #11571 - Use gfx_draw_string_left with ScreenCoordsXY (#12008) 2020-06-20 11:56:36 -03:00
frutiemax 51f32130b3
Part of #11964: Merge RideColourKey in RideTypeDescriptor (#11996) 2020-06-19 20:21:16 +02:00
Aaron van Geffen d66c61ca08
Change map generation button heights (#11986) 2020-06-18 23:33:08 +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 c45a0536eb Use new class 2020-06-16 20:27:40 +01: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
Gymnasiast f640446d58
Migrate 40 calls to set_format_arg() 2020-06-03 14:49:04 +02: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 f8aeb70398
Apply review requests 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
Tulio Leao 935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Duncan f64ea65d03
Rename SPRITE_LIST_TRAIN_HEAD to reduce car head confusion (#11105)
A single car on a coaster can comprise of multiple vehicles. One of those vehicles will be the car head vehicle. The train can comprise of multiple cars. Therefore not all vehicle->IsHead 's will be in SPRITE_LIST_TRAIN_HEAD. This rename makes that slightly more clear
2020-03-29 09:23:24 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Gymnasiast cded8313d7
Replace many occurrences of LocationXY16 2020-03-01 22:15:28 +01:00
Michael Steenbeek e3f5eb7275
Merge pull request #10847 from tupaschoal/const-ref-coords
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao 91c4735917 Revert to copy instead of const-ref for functions that edit content 2020-03-01 00:49:00 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao 475eed0a56 Receive CoordsXY by const ref instead of copy 2020-02-29 01:16:19 -03:00
duncanspumpkin 272e4f29a3 Further minor refactors 2020-01-19 17:16:42 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Tulio Leao 89edde6a3c Use CoordsXY on footpath_bridge_get_info_from_pos() 2020-01-12 22:27:30 -03:00
Tulio Leao 201d13577e Use CoordsXY for footpath_get_coordinates_from_pos() 2020-01-12 22:20:29 -03:00
Duncan d486ac4d3b Reduce direct usage of LOCATION_NULL (#10480)
* Reduce direct usage of Location_Null

Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.

* Remove incorrect AND with LOCATION_NULL

In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Tulio Leao 06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek 77494bbc73 Create definitions for some coords related stuff (#10456)
* Create definitions for some coords related stuff

* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00