Commit Graph

576 Commits

Author SHA1 Message Date
Gymnasiast 31d20cefb2
Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
Nils Caspar 4e6935f689
Consistently render various height marks when zoomed in (#12853) 2020-09-06 08:56:41 +01:00
Ted John 609cde2304 Fix drawing of money text when zoomed in 2020-08-28 01:29:59 +01:00
Łukasz Pękalski 411f242cfd
Close #12431 Refactor VirtualFloorStyles to use strong enum (#12790) 2020-08-27 21:06:39 -03:00
frutiemax 33f3f5cc3b
Use CoordsXYZ for sub_98199C in RiverRapids.cpp (#12289) 2020-08-18 09:27:23 -03: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
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Tom Parsons d9129bca0f
Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum (LightType) (#12569)
* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

- New strong enum LightType

- Remove unused enum members

- GetLightTypeSize and SetLightTypeSize modify size of light (0-3)

* actually save the change to lightType
2020-08-04 15:55:14 +01: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
Duncan 6d11825e1a
Reduce the use of rct_sprite (#12530)
* Reduce the use of rct_sprite

* Pass the correct types in S4 importer

* Add additional nullptr checks

* Simplify the viewport interaction

* Apply review comments

* Small cleanup of GetEntity

* Fix test paint
2020-08-01 11:29:54 +01:00
Duncan cd1d573c39
Pass the formatter directly to scrolling_text_setup 2020-07-31 12:31:26 +02:00
Duncan 8a378ad236
Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
frutiemax 6598ae14aa Close #12457: Rename INTRO_STATE to use PascalCase 2020-07-26 09:32:53 -04:00
frutiemax 0f1788d273 Part of #12457: Refactor INTRO_STATE to use strong enum 2020-07-26 09:25:29 -04: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 c8b66dd289
Fix #12257: Fix refactoring of is_sprite_interacted_with_palette_set (#12258)
* Fix #12257: Change type of paint x/y to int32_t

This corrects an issue with integer conversions due to signness.

* Change types to 16bit and correct functions parameters

* Fix test paint.

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-14 12:20:53 +01:00
Thamara Andrade 0fb2a6216c
Close #12099: Use ScreenLine on gfx_draw_line (#12143) 2020-07-12 18:50:52 -03:00
frutiemax 280a21fa30
Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Thamara Andrade 8ce799a72e
Close #12118: Prefer foward declaration of *Coords* in headers (#12142)
* Removing unnecessary world/Location includes in headers
* Prefer foward declaration of *Coords* in header files
Closes #12118
2020-07-06 10:10:39 -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 c723a1a314
Fix #12079: incorrect drawing of attached paint structs (#12082)
* Fix #12079: incorrect drawing of attached paint structs

The issue is caused by the paint_struct x and y coordinates being incorrectly marked as unsigned. Unfortunately they cannot easily be converted without careful rework. Therefore this is a stop gap until the type is changed to preferably a ScreenCoords.
2020-06-29 19:13:23 -03:00
Tulio Leao b6f252f68e Make gfx_draw_sprite_raw_masked use ScreenCoordsXY 2020-06-29 10:29:05 -03:00
Tulio Leao 592b54d354 Make gfx_draw_string_with_y_offsets use ScreenCoordsXY 2020-06-29 10:25:49 -03:00
Michael Steenbeek f330a22df1
Merge pull request #12030 from tupaschoal/more-coords-stuff
Small CoordsXY* Refactor
2020-06-24 13:07:37 +02: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 32c342e88d
Part of #11389: Remove FormatTexto that take void* in banner struct (#12034) 2020-06-23 14:50:56 +01:00
Tulio Leao 1a7943a5ab Make DrawOpenRCT2 use ScreenCoordsXY 2020-06-21 16:30:58 -03:00
duncanspumpkin 133d8c4a0a 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:25:03 +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
Duncan 78d062943b
Fix #11953: Incorrect shade used for wall banner text 2020-06-15 23:04:34 +02: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
Duncan 319bab8978
Refactor fountain painting (#11891)
* Refactor fountain painting


Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-11 20:20:00 -03:00
Tulio Leao 89a084cbc9 Rename Peep::action_sprite_type to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao 0d84779763 Rename Peep::next_action_sprite_type to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao d9e36e5592 Rename Peep::action_sprite_image_offset to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao e98cea3615 Rename Peep::action* to Action* 2020-06-08 17:36:33 -03:00
Michael Steenbeek 9ef8d6da42
Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
duncanspumpkin 517ed57593 Remove IsPeep 2020-06-06 11:36:48 +01:00
Tulio Leao e87343f9c6
Rename MoneyEffect member variables to prevent shadowing (#11748) 2020-05-16 17:04:31 -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 d7637cd70f
Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
Michael Steenbeek a261b4ce33
Remove commented out code (#11721) 2020-05-11 13:54:15 +02:00
TomasZilinek 9fde6a74c3
Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
Michael Steenbeek fa91b4091f
Name tunnel constants (#11694) 2020-05-09 23:54:47 +02:00
Gymnasiast 923701e16b
Clean up metal supports in Junior RC drawing 2020-05-04 14:59:29 +02:00
duncanspumpkin fed148648c Use IsPeep in more places 2020-04-28 07:57:47 +01:00
Breno Rodrigues Guimarães 305b4d4957
Fix #11469: Clear memory but dont increment buffer position (#11472)
Fix a regression from #11412 that did:

set_format_arg(0, rct_string_id, ...)
set_format_arg(4, uint32_t, 0)

ride->FormatNameTo(gCommonFormatArgs + 2)

Notice it continues from byte 2, and not 8.
So the `set_format_arg(4, uint32_t... )` was just
for clearing memory, not for adding a new argument
2020-04-26 10:48:35 -03:00
Breno Rodrigues Guimarães a0619d04cf
Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Michael Steenbeek b417da7905
Fix drawing of walls with incorrect scrolling modes (#11453) 2020-04-25 10:19:13 +01:00
Breno Rodrigues Guimarães c0d0c7de16
Part of #11389: Replace set_format_arg by Formatter::Common() (#11388) 2020-04-22 21:41:20 -03:00
Michał Janiszewski 2323cc1596
Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
ifimfree fb6dd4bfad
Create constants for a few flags 2020-04-20 10:39:26 +02:00
Michael Steenbeek ffa9996336
Reimplement landscape door drawing (#11233) 2020-04-17 19:59:38 +02:00
Breno Guimaraes 347c402984 Fix #11286: Fix coloring of banners on tooltip
This patch moves the function that adds coloring to the buffer text into the Buffer struct with a flag.
It also changes both Banner printing and Banner tooltip to use the colored version
2020-04-16 08:06:07 -03:00
Michał Janiszewski e19eaa6a98 Upload park recording in case of crash 2020-04-02 23:44:59 +02:00
Gymnasiast 905ba0c47b
Fix #475: GFX water sides drawn incorrectly 2020-03-26 20:01:25 +01:00
Gymnasiast aeb1b32078
Fix #7094: Back wall edge texture in water missing 2020-03-26 20:00:53 +01:00
Gymnasiast 6c0de27d54
Change calls to tile side drawing to use big Z 2020-03-26 20:00:53 +01:00
Michał Janiszewski 95e2590207
Fix #11043: Null banner object had method called on itself (#11049) 2020-03-25 22:57:15 +01:00
Ted John b5c6b968df Remove printf comment 2020-03-23 15:54:04 +00:00
Ted John 1af2720518 Create stub magnify versions of software blitters 2020-03-23 15:54:04 +00:00
Ted John 6e7a7c23c9 Fix odd issues at certain positions of the map 2020-03-23 15:54:03 +00:00
Ted John d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Duncan 7c03e0b589
Merge pull request #10974 from Gymnasiast/refactor/replace-some-register-usage
Replace some register usage
2020-03-20 20:08:28 +00:00
WantDiscussion 828eef7411
Introduced optional light effects for vehicles at night. (#10970) 2020-03-20 11:47:31 +01:00
Gymnasiast ff28654af0
Replace registers in surface paint 2020-03-19 17:21:06 +01:00
Michael Steenbeek 9fda7762e5
Fix #10942: Cut-away view is broken (#10945) 2020-03-16 21:47:38 +01:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Michael Steenbeek 4f86d0115c
Merge pull request #10866 from Gymnasiast/refactor/more-tile-element-prep
Refactor/more tile element prep
2020-03-06 09:25:32 +01:00
Gymnasiast 33d2155529
Use define for some remapping instructions 2020-03-05 18:15:03 +01:00
Gymnasiast 57a40c0657
Extend PathElement 2020-03-04 21:57:42 +01:00
Michael Steenbeek 5f0db41e48
Process @duncanspumpkin 's feedback on #10830 (#10853) 2020-03-01 14:39:18 +01:00
Michael Steenbeek 938f2a891f
Implement #682: Staff patrol area now drawn on the water (#10830) 2020-02-24 13:47:28 +01:00
pizza2004 57605f36e3
Fix #2485: Hide Vertical Faces not applied to water 2020-02-23 21:32:57 +01:00
Michael Steenbeek f41f878581
Replace some usages of LocationXY(Z)16 (#10699) 2020-02-18 22:42:38 +01:00
Matt c381d9ff3f
Remove obsolete construction of CoordsXY object 2020-02-13 12:11:20 +01:00
Matt 758a7e432f
Use const reference instead of copy for location structures 2020-02-13 11:53:14 +01:00
Michał Janiszewski 962787a854
Hide paint_arrange_structs_helper from global symbols (#10690) 2020-02-12 11:10:06 +01:00
Duncan 4a22158387 Fix #10386. Mistake made while refactoring (#10607)
Added some additional comments whilst investigating the issue. Ultimate fix should look at changing the bounding box units but unsure of consequences
2020-01-25 10:30:38 +01:00
Michael Steenbeek 733ec6ec24
Fix water sides glitch (#10599) 2020-01-21 14:34:25 +01:00
duncanspumpkin 08ea5585ee Small refactors and cleanups 2020-01-19 17:16:42 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +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
Michael Steenbeek 29922da871
Refactor calls to staff_is_patrol_area_set() 2019-12-31 10:10:40 +01:00
Duncan c170926200 Refactor to prefer baseZ instead of height for big Z (#10478) 2019-12-31 09:33:27 +01:00
Duncan 2c359736ee
Refactor to reduce usage of LocationXY8 and sLocationXY8 (#10479)
* Refactor to reduce LocationXY8 usage

* Further reduction of LocationXY usage and sLocationXY usage

* Reduce sLocationXY8 usage
2019-12-30 19:03:34 +00:00
Michael Steenbeek 8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01: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
Tulio Leao a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
duncanspumpkin f346e439fc Change type of map selection a and b 2019-12-21 12:18:34 +00:00
Tulio Leao 7c75db2b2d Make map_get_surface_element_at only accept Coords objects 2019-12-18 23:46:50 -03:00
Duncan 2a53ebd936
Merge pull request #10333 from tupaschoal/rotate-paint
Use CoordsXY for Paint rotations
2019-12-10 18:35:38 +00:00