Commit Graph

337 Commits

Author SHA1 Message Date
Duncan 32eb7071a1
Fix #11550: Use std::nullopt instead of empty brace (#11595)
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
Gymnasiast cc65564521
Use (RCT12)ObjectEntryIndex in more places 2020-05-01 22:06:13 +02:00
Gymnasiast 73671bbeeb
Make ResearchItem use ObjectEntryIndex 2020-04-30 12:59:18 +02:00
Tulio Leao a4e4040a0c
Use named casts on openrct2/rct* (#11169) 2020-04-18 12:37:34 +02:00
Breno Rodrigues Guimarães 174a480870
Use utf8_remove_format_codes to remove format codes from user strings (#11289)
The previous code used RCT12::RemoveFormatCodes to remove format codes from RCT strings. But that function uses utf8 methods to identify format codes. In this new version, rct2_to_utf8 is called first to obtain an utf8 string, and then utf8_remove_format_codes can be used.
2020-04-15 07:17:43 +02:00
duncanspumpkin 54a058ca6c Fix boat location import/export/update.
After a refactoring to split off the boat location the import/export functions meant incorrect information could be loaded into the s6 file for boats that had not left the station. Boats that had left the station had other fields clobbered for the same reason
2020-04-07 20:19:26 +01:00
Duncan 919a70361b
Fix incorrect saves in backtrace (#11229) 2020-04-05 21:54:11 +02:00
Gymnasiast cfdc8567f7
Fix #11230: Seat Rotation not imported correctly for hacked rides 2020-04-05 12:29:07 +02:00
Michael Steenbeek c6e42ac313
Avoid assertion getting hit in scenery_is_invented() (#11079) 2020-03-27 12:53:18 +01:00
Michael Steenbeek 268e81c21b
Fix mistake in #11029 (#11044) 2020-03-25 20:52:08 +00:00
Michael Steenbeek 766339d771
Fix #11027: Third color on walls becomes black when saving (#11029) 2020-03-25 13:57:15 +01:00
Ted John d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Gymnasiast be4f723287
Avoid writing outside _researchedSceneryItems bounds 2020-03-16 14:04:02 +01:00
Gymnasiast 70e287b076
Clean up scenery handling 2020-03-15 12:15:12 +01:00
Gymnasiast ad91654a3d
Use big Z in more places 2020-03-07 21:54:47 +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
Michael Steenbeek d64b73c29a
Clean up RCT1/2 constants (#10855) 2020-03-05 22:49:16 +01:00
Michael Steenbeek 904cad77b5
Merge pull request #10864 from Gymnasiast/refactor/station-starts
Change station starts to CoordsXY
2020-03-05 22:48:53 +01:00
Michael Steenbeek f7151317b4
Translate SV6 object offsets to OpenRCT2 ones (#10881) 2020-03-05 22:14:50 +01:00
Michael Steenbeek d085a0ed20
Split OBJECT_ENTRY_COUNT into RCT2/OpenRCT2 variants (#10877) 2020-03-05 17:25:57 +01:00
Gymnasiast 2eb967b30d
Change station start to CoordsXY 2020-03-05 12:29:02 +01:00
Gymnasiast 3ed7694495
Move tile element-specific flags 2020-03-04 22:01:09 +01:00
Gymnasiast 57a40c0657
Extend PathElement 2020-03-04 21:57:42 +01:00
Michael Steenbeek 61175a4fbf
Confine use of LocationXY8 to RCT12 load/save code (#10698) 2020-03-01 21:16:10 +01:00
Michael Steenbeek d5c4d78d49
Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Michael Steenbeek 270417f788
Merge pull request #10819 from Gymnasiast/refactor/even-more-rtd
Move track paint function lookup to RTDs
2020-02-24 10:56:43 +01:00
Michael Steenbeek 6d7a2bea69
Merge pull request #10818 from tupaschoal/coords-xy-2
Use ScreenCoordsXY for some window interactions
2020-02-23 13:23:50 +01:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 86a79e742f
Use RideTypeDescriptor for available track pieces 2020-02-22 20:13:44 +01:00
Tulio Leao 1b3f0e9a44 Create ScreenCoordsXY gSavedView from separate x,y variables 2020-02-22 16:01:21 -03:00
Gymnasiast 1e6efa6eb4
Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
Michael Steenbeek d16fbb0cd2
Change ride->overall_view to CoordsXY (#10673) 2020-02-08 17:19:59 +01:00
Gymnasiast ca2f37ae7f
Remove opt::optional polyfill
std::optional is supported by Xcode 10. The non-polyfill variant was already used in our code, so this is not likely to break anything that wasn't broken before.
2020-02-01 22:25:03 +01:00
Gymnasiast c77c69a0c4
Refactor calls 2020-01-26 16:21:42 +01:00
Gymnasiast e6c32230bc
Convert rawValue to uint32 2020-01-26 14:12:57 +01:00
Gymnasiast 63fddee603
Convert gResearchLast/NextItem to std::optional 2020-01-26 10:07:16 +01:00
Michael Steenbeek 2b6e925744
Fix testing giga coaster with cable lift crashing the game (#10620) 2020-01-25 12:24:04 +01: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
duncanspumpkin 86a20805ad Correct the types for exporting 2020-01-19 17:08:57 +00:00
duncanspumpkin 4e796ec92d Increase Sprite size to 0x200
This should allow for major refactoring of the sprite classes
2020-01-19 17:08:57 +00:00
modulo7 fdf0c17fd8
Name field var_CD of vehicle struct. Refactor to enum 2020-01-19 17:34:11 +01:00
Michael Steenbeek 0c9b1cec96
Correct max vehicles per ride value (#10504)
* Correct max vehicles per ride value

* Fix formatting

* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Tulio Leao 1bc399537e Fix C6001: using uninitialized memory 2019-12-27 15:05:27 -03:00
duncanspumpkin 18af061c16 Fix formatting 2019-12-24 12:22:54 +00:00
duncanspumpkin 38434ad688 Use CoordsXYZ for cable lift location 2019-12-24 12:04:14 +00:00
duncanspumpkin 0f90b2c353 Rename variable as its technically new 2019-12-24 11:46:56 +00:00
duncanspumpkin 370a9b1113 Change type of cur_test_track_location 2019-12-24 11:44:01 +00:00
duncanspumpkin c08958a705 Prepare cur_test_track_location for type change 2019-12-24 11:43:55 +00:00