Commit Graph

47 Commits

Author SHA1 Message Date
TomasZilinek e93e32d139
Part of #11571: create gfx_draw_string_left() overload (#11984)
Replaces a third of all occurrences of the old function
2020-06-20 00:22:01 -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
duncanspumpkin 5c48e5f0bb Remove AsPeep 2020-06-06 11:36:48 +01: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
Tulio Leao 128c1993c1 Rename Peep::balloon_colour to BalloonColour 2020-05-13 23:16:43 -03:00
Tulio Leao 6c57f33dc9 Rename Peep::umbrella_colour to UmbrellaColour 2020-05-13 23:14:45 -03:00
Tulio Leao 222f8df6cb Rename Peep::hat_colour to HatColour 2020-05-13 23:11:28 -03:00
Michael Steenbeek 620fb5e5c4
Migrate many set_format_arg calls to Formatter (#11744) 2020-05-13 21:29:39 -03: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
Ted John 8798811561
Fix #11526: Plugin: Crash when using sprite type in park.postMessage (#11533) 2020-04-30 19:51:47 +02:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao 1ea9015315
Use CoordsXY(Z) in more places 2020-02-22 14:20:28 +01:00
Tulio Leao 9fa355cb8c Make window_event_list use Coords for moved and cursor (#10258) 2019-11-18 23:13:32 +01:00
Tulio Leao ce1f38da25 Use ScreenCoordsXY for window functions (#10086)
* Use ScreenCoordsXY for window_create function

* Use ScreenCoordsXY for window_find_from_point function

* Use ScreenCoordsXY for window_find_widget_from_point

* Use ScreenCoordsXY for ride_contruction_tool*

* Use ScreenCoordsXY for window_event_tool*

* Use ScreenCoordsXY for window_event_scroll_mouse*

* Use ScreenCoordsXY for remaining window_event*

* Use ScreenCoordsXY for window_(set|move)_position
2019-10-19 13:07:03 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Matt 862ef3018c Use gCurrentRealTimeTicks whenever appropriate. 2018-12-01 17:00:11 +01:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 5a368ce6d9 Move theme code to libopenrct2ui 2018-06-10 23:34:27 +01:00
Michał Janiszewski a2ef4bd699
Exclude pre-formatted blocks from clang-format (#7520)
[ci skip]
2018-05-16 20:41:29 +02:00
Olivier Wervers 7713cdac4d Replace month count magic numbers 2018-04-29 20:46:46 +02:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Marijn van der Werf 7efaf3dd80 Decrease dependency of world on windows 2018-02-01 13:59:46 +01:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Ted John 68202db51c Make ClimateWeatherData and ClimateWeatherGloomColours internal to Climate.cpp 2018-01-14 01:06:47 +00:00
Ted John 83cdd56825 Unify current and next climate state into common struct 2018-01-14 01:06:47 +00:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Aaron van Geffen e61194961f Rename WWT_25 to WWT_PLACEHOLDER.
This is only used in the bottom toolbar as a placeholder,
while still capturing events.
2018-01-08 00:01:45 +01:00
Ted John 83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Harrison Gentry 5862cd9d40 Fix guest counter to say '1 guest' instead of '1 guests' 2018-01-05 08:58:17 +01:00
Aaron van Geffen 81905fc161 Vertically align widgets in lower-left bottom toolbar. 2018-01-05 00:44:59 +01:00
Aaron van Geffen a5ae503f0a Take font line height into account for bottom toolbar 2017-12-27 14:54:09 +01:00
Aaron van Geffen 4455925fcb Move braces to follow code style. 2017-12-27 13:18:24 +01:00
Aaron van Geffen 10ed48611c Refactor bottom toolbar: hex to dec, apply macro.
This was one of the few windows that had its widget positions defined in
hexadecimals rather than decimals.

The logic was further obscured by using a macro to offset an experimental
change to accomodate longer dates. This change has been widely embraced,
so this patch applied said macro to improve legibility.
2017-12-27 13:18:07 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek 3868b100df Stop encrypting money
It serves no purpose any more. Of course, we still need the ENCRYPT_MONEY() and DECRYPT_MONEY() functions for importing and exporting S6 files.
2017-12-07 23:22:24 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Marijn van der Werf 8b7322ad6e Move bottom toolbar to UI module 2017-11-18 21:07:21 +01:00
Renamed from src/openrct2/windows/GameBottomToolbar.cpp (Browse further)