Commit Graph

2061 Commits

Author SHA1 Message Date
frutiemax 26ae2dbf04
Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03:00
annoyingdroid 5056872676
Close #12087: Use ScreenCoordsXY on gfx_filter_pixel (#12102) 2020-07-02 11:08:46 -03:00
Duncan cd716ca4aa
Fix #12093. Incorrect position and animation of staff tab. (#12094)
Mistake made when refactoring transposed two digits. Additional mistake made when removing a variable that was unused that changed the memory layout of the window. This meant that a part of the code that accessed a different variable in a union fetched the wrong memory. This was a mistake ultimately made during implementation.
2020-07-02 09:19:19 -03:00
Tulio Leao a86a60cbf5 Extract ScreenRect from Graph for reusability 2020-06-30 09:32:22 -03:00
Michael Steenbeek 33e86ce0d8
Merge pull request #12016 from tupaschoal/screen-coords-string
Make interfaces use ScreenCoordsXY instead of x-y
2020-06-30 08:37:14 +02:00
Duncan 0f106da7eb
Fix #12065 again. Fixed track design previews with diagonals (#12074)
Unsure when mistake was made but there was a variety of issues with this section of code. The rotation of the entrance was meant to be relative to the track design rotation not the last track pieces rotation. This caused issues for tracks that were not complete circuits. In addition there was a mistake for diagonal track pieces where the location of the end piece was not incremented this caused the diagonal piece to act as though it didn't exist breaking the preview.
2020-06-29 10:58:31 -03:00
Tulio Leao b6f252f68e Make gfx_draw_sprite_raw_masked use ScreenCoordsXY 2020-06-29 10:29:05 -03:00
Tulio Leao b7dc5057e5 Make gfx_draw_string_centred_wrapped_partial use ScreenCoordsXY 2020-06-29 10:25:44 -03:00
Tulio Leao 1717f2a9a3 Make draw_string_centred_raw use ScreenCoordsXY 2020-06-29 10:23:54 -03:00
Tulio Leao a0ed2c181e Make gfx_draw_string_left_centred use ScreenCoordsXY 2020-06-29 10:23:54 -03:00
duncanspumpkin 6dfcc1a8b2 Fix #12065. Incorrect Entrance/Exit location on td preview
Unsure when the mistake was made but it could have been prevented by using const on variables that should be const.
2020-06-28 09:05:14 +01:00
TomasZilinek f08206a5d0
Fix #11963 - Refactor Peep::OutsideOfPark (#12060)
* Fix #11963 - Refactor Peep::OutsideOfPark

Changed the definition of Peep::OutsideOfPark from uint8_t to bool and refactored all its occurences in code accordingly.

* Fix #11963 - Refactor Peep::OutsideOfPark

One forgotten instance of Peep::OutsideOfPark occurrence

* Fix #11963 - Refactor Peep::OutsideOfPark

Fix code according to a review suggestion.
2020-06-28 08:39:30 +01:00
Aaron van Geffen 2cb5402069 Introduce widget::textTop 2020-06-26 19:39:30 +02: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
Michael Steenbeek a102892370
Merge pull request #11985 from AaronVanGeffen/windows/object-selection
Increase widget heights in object selection window
2020-06-24 23:09:10 +02:00
TomasZilinek 4974d1a9b0
Fix #12050: scenario options initial happiness value misplaced
Fix a mistake made in PR #11984.
2020-06-24 19:42:03 +02: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 9d965ccfb6
Part of #12017 - create gfx_draw_sprite overload (#12026)
* Part of #12017 - create gfx_draw_sprite overload

Part 1. Creates the overload and replaces about a half of the calls since there are too many for one PR.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-23 18:32:34 -03:00
frutiemax 6e47385b90
Part of #11389 : in peep class, FormatTo* use Formatter class (#12035) 2020-06-23 14:52:08 +01:00
frutiemax 32c342e88d
Part of #11389: Remove FormatTexto that take void* in banner struct (#12034) 2020-06-23 14:50:56 +01:00
frutiemax f86931d8a0
Close #12019: Use ScreenCoordsXY on gfx_draw_sprite_software 2020-06-22 23:52:54 +02:00
frutiemax 4a17d1d64e
Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software (#12028)
* Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-21 22:52:48 -03:00
TomasZilinek 69db54f770
Fix #12018 - gfx_draw_sprite_solid overload (#12023)
Creates the overload, replaces all calls to the old function and removes the old function.
2020-06-21 11:50:05 -03: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
TomasZilinek 2264c5f7f1
Part of #11571 - Use gfx_draw_string_left with ScreenCoordsXY (#12008) 2020-06-20 11:56:36 -03:00
Michael Steenbeek 82618f2441
Merge pull request #11972 from Gymnasiast/fix/7324
Fix #7324: Research window shows vehicle name instead of ride name
2020-06-20 13:46:31 +02:00
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
Gymnasiast f8699d1244
Apply review requests; fix error; remove debug code 2020-06-19 23:35:18 +02:00
Gymnasiast 5029f754ed
Fix #7324: Research window shows vehicle name instead of ride name 2020-06-19 22:50:53 +02:00
frutiemax 51f32130b3
Part of #11964: Merge RideColourKey in RideTypeDescriptor (#11996) 2020-06-19 20:21:16 +02:00
Ted John 5a7fbc8054
Fix #11961: Plugins: ViewportWidget unable to be moved or resized (#11997)
- Ensure child controls for dropdown and spinners are moved.
- Ensure viewport bounds are re-calculated if widget is moved / resized.
2020-06-19 20:20:58 +02:00
Aaron van Geffen 0e9857899e Use widget height constants in object selection window
Replaces hardcoded integers with LIST_ROW_HEIGHT and SCROLLABLE_ROW_HEIGHT.
2020-06-19 08:42:14 +02:00
Aaron van Geffen 81dd7c1a7d Use available vertical text box space for text and cursor 2020-06-19 08:42:12 +02:00
Aaron van Geffen 5cb7bf6216 Increase widget heights in object selection window
These changes accomodate CJK languages:
* Buttons from 11px to 13px.
* Text box from 11px to 13px.

Furthermore:
* Rename WIDX_FILTER_STRING_BUTTON constant to WIDX_FILTER_TEXT_BOX.
* Rename WINDOW_STAFF_LIST_WIDGET_IDX to WINDOW_EDITOR_OBJECT_SELECTION_WIDGET_IDX.
2020-06-19 08:42:10 +02:00
Aaron van Geffen d66c61ca08
Change map generation button heights (#11986) 2020-06-18 23:33:08 +02:00
Michael Steenbeek 5e8a3a709d
Merge pull request #11976 from Gymnasiast/refactor/vehicle-preference
Move build menu preference to objects themselves
2020-06-17 23:41:10 +02:00
Duncan 33298d2bde
Fix peep pickup. Mistake made during refactor. (#11978)
PeepPickupAction assumed that all locations that are passed into the function would be valid locations or null locations. This is not the case when picking up as a dummy value is passed into the function. The caller was fixed by passing a null location as expected by PeepPickupAction.
2020-06-17 21:11:50 +01:00
Gymnasiast c77d500394
Move build menu preference to objects themselves 2020-06-17 21:46:37 +02: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 c45a0536eb Use new class 2020-06-16 20:27:40 +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
Gymnasiast 9cf12e763d
Move RideHeights and max mass to RTDs 2020-06-16 20:57:55 +02:00
Gymnasiast 140f2d6922
Rename rct_ride_data_5 and its fields to RideHeights 2020-06-16 20:17:07 +02:00