Commit Graph

15820 Commits

Author SHA1 Message Date
duncanspumpkin ae87d81fe8 Adjust names further 2020-11-07 14:15:26 +00:00
duncanspumpkin 6882ddaf12 Clang format the relevant files 2020-11-07 14:15:25 +00:00
duncanspumpkin f6d2db48dc Name 98196C 2020-11-07 14:15:25 +00:00
duncanspumpkin a6a95bd28e Add overload for function 2020-11-07 14:15:25 +00:00
duncanspumpkin 99d4e8a10b Simplify functions further 2020-11-07 14:15:25 +00:00
duncanspumpkin 533a845b0f Name further functions 2020-11-07 14:15:25 +00:00
duncanspumpkin d6669be939 Rename main paint add image functions 2020-11-07 14:15:24 +00:00
duncanspumpkin 6abeeae4b7 Create helper function for calculating position hash 2020-11-07 14:15:24 +00:00
duncanspumpkin 4adcde42f6 Refactor to add allocators to paint session 2020-11-07 14:15:24 +00:00
Tulio Leao 8a35f27cfc Add converter from RideCategory to ResearchCategory 2020-11-07 11:14:55 -03:00
Tulio Leao 7d96dc9958 Move category names and invention strings to ResearchItem class 2020-11-07 11:14:55 -03:00
Tulio Leao 19ab8f1211 Use ResearchCategory Enum for ResearchItem 2020-11-07 11:14:55 -03:00
Gymnasiast 7ef8082185
Bump network version 2020-11-07 13:49:15 +01:00
Gymnasiast 802285fd92
Autoconvert ride id between RCT2 and OpenRCT2 2020-11-07 13:49:15 +01:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Gymnasiast 2846663533
Use ride_id_t for remaining peep ride fields 2020-11-07 12:58:32 +01:00
Gymnasiast a3aef90637
Replace loose usages of 0xFF 2020-11-07 12:58:32 +01:00
Gymnasiast 9e17081ee8
Use 16 bits for gTrackDesignSaveRideIndex throughout 2020-11-07 12:58:32 +01:00
Gymnasiast d58a8d1184
Change tile_element_get_ride_index() to method 2020-11-07 12:58:32 +01:00
Michael Steenbeek 92a5f1aa24
Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
Michael Steenbeek 3c1aaa97d7
Merge pull request #13379 from Gymnasiast/json-id-in-repo
Allow object lookup using new JSON id
2020-11-06 14:48:56 +01:00
Gymnasiast 880a267252
Implement @ZehMatt's suggestions 2020-11-06 14:33:16 +01:00
Gymnasiast ce15e20c94
Use plain std::string_view instead of const & 2020-11-06 11:40:52 +01:00
Sadret 4ff412dfe1
Close #13359: Make GameAction flags optional in plugin API. (#13381) 2020-11-06 09:40:15 +00:00
Gymnasiast 53aef4e549
Replace old edge style names in Tables.cpp 2020-11-05 21:36:28 +01:00
Gymnasiast 6df36127b4
Replace calls to LoadObjectLegacy() with new IDs 2020-11-05 21:33:13 +01:00
Gymnasiast bafafa6805
Create functions to load objects by JSON id 2020-11-05 21:24:43 +01:00
Gymnasiast 656cdda399
Add JSON identifier to object repository 2020-11-05 20:56:58 +01:00
Manuel Vögele 4a6db953f7
Convert a register to a variable 2020-11-05 17:43:51 +01:00
Sadret 2f4b1b9e3f
Close #13376: Open custom window at specified tab 2020-11-05 17:43:23 +01:00
Michael Steenbeek eea57f2bfe
Create calls for min/max cars per train 2020-11-05 17:42:02 +01:00
Manuel Vögele 69b07904c1
Make TileElement conversion preserve the const qualifier
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
Sadret 0b99943a3f
Fix address comments in TileElement.h 2020-11-04 17:41:38 +01:00
Manuel Vögele ef51cfb29c
Refactor loc_6DDF9C (#13369)
* Move ride_create_vehicles into Ride

* Refactor loc_6DDF9C
2020-11-04 15:58:24 +00:00
Duncan 88b73d8716
Refactor add 3d light follow on from #13281 (#13333)
Close #12406

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>
2020-11-04 11:24:56 +00:00
Manuel Vögele 96ff1894ee
Remove unnecessary parameter from Ride::Open (#13368)
Ride::Open is only ever called with RIDE_STATUS_OPEN,
so the parameter is redundant.
2020-11-04 11:24:32 +00:00
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
Manuel Vögele b40ea0169d
Rename sub_6B5952 to ChainQueues (#13357)
Also remove unreachable call to it
2020-11-03 22:43:26 -03:00
Richard Fine 438b197b80
Debunch peeps (#12917)
* Stop guests from being forced to the center line of a path over time

Change the way we apply randomness to peep destinations when moving from one tile to the next, to allow peeps that are moving along a straight path to maintain their perpendicular offset relative to the path direction, instead of being (eventually) forced back to the center line.

* Update test expectations

The changes to guest movement mean that the number of steps taken for these expected paths are now slightly different to before.
2020-11-03 22:30:36 -03:00
Tulio Leao faf10568bb
Rename VEHICLE_UPDATE_FLAG_1 to COLLISION_DISABLED (#13363)
Rename VEHICLE_UPDATE_FLAG_1
2020-11-03 19:23:22 -03:00
Łukasz Pękalski 88a6a085e4
Close #12455: Refactor MOUSE_STATE to use strong enum (#13361)
* Close #12455: Refactor MOUSE_STATE to use strong enum

refactor: MouseState to strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-03 18:41:19 -03:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Manuel Vögele 47419b8ba1 Rename vehicle_unset_update_flag_b1 and move it into Vehicle 2020-11-03 21:36:26 +01:00
Manuel Vögele 6517757df7 Rename VEHICLE_UPDATE_FLAG_1 2020-11-03 20:08:10 +01:00
Manuel Vögele 1b55914c96
Rename ride_set_block_points to RideOpenBlockBrakes (#13360) 2020-11-03 17:24:54 +00:00
Manuel Vögele 15dc5e004e
Rename VEHICLE_UPDATE_MOTION_TRACK_FLAG_10 (#13362) 2020-11-03 17:24:18 +00:00
Sadret c602db27fd
Close #13057: Make GameAction flags accessible by plugins. (#13359) 2020-11-03 15:43:43 +00: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
pizza2004 6cc3f2f4a8
Refactor Graph to TitleCase (#13353) 2020-11-03 08:21:20 +00:00
Sadret c2d309af38
Close #13346: Change FootpathScenery to FootpathAddition (#13350) 2020-11-03 08:17:29 +00:00
pizza2004 68bd035f12
Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
Michael Steenbeek 1aff58b23e
Use TrackElement in vehicle_create_trains() and friends (#13338) 2020-11-02 23:56:12 -03:00
Manuel Vögele fac1b1f81e
Refactor loc_6B51C0 2020-11-02 23:05:47 +01:00
pizza2004 1643c62939 Refactor UI/Input MouseInput to Title Case 2020-11-02 07:05:33 -07:00
pizza2004 34f362b86e Refactor UI/Input KeyboardShortcuts to Title Case 2020-11-02 06:55:16 -07:00
pizza2004 06c0c1b982 Refactor UI/Input Input to Title Case 2020-11-02 06:55:16 -07:00
Sadret 5893664785
Fix #13334: Uninitialised variables in CustomTabDesc 2020-11-01 20:59:19 +01:00
Michael Steenbeek 4ea6f8099f
Merge pull request #13319 from manuelVo/rename-ride_is_valid
Rename ride_is_valid_for_test/open and update return type
2020-11-01 20:49:55 +01:00
Aaron van Geffen cea5fab238 Release v0.3.2
- Feature: [#12110] Add Hybrid Coaster (Rocky Mountain Construction I-Box) track type.
- Feature: [#12999] .sea (RCT Classic) scenarios are now listed in the “New Scenario” dialog.
- Feature: [#13000] objective_options command for console.
- Feature: [#13096] Add Esperanto translation.
- Feature: [#13164] Add 'Objective options' to Cheats menu.
- Change: [#9568] Change lift sounds of Reverser Roller Coaster and Compact Inverted Coaster to better fitting ones.
- Change: [#13160] The lay-out of the Park Cheats tab has been improved.
- Fix: [#1324] Last track piece map selection still visible when placing ride entrance or exit (original bug).
- Fix: [#3200] Close Construction window upon selecting vehicle page.
- Fix: [#4022] Fix Mac cursor offset on launch
- Fix: [#4041] Garbled park option on scenario editor with custom theme.
- Fix: [#4865] Offer an option to disable inhibiting the monitor power.
- Fix: [#5178] Lighting effects cannot be disabled in software mode
- Fix: [#5904] Empty errors on tile inspector base height change.
- Fix: [#6086] Cannot install existing track design with another name.
- Fix: [#6614, #8623] Colours are distorted when using OpenGL with Intel integrated graphics drivers.
- Fix: [#7443] Construction arrows pulse at irregular intervals.
- Fix: [#7518] Water isn't cut down by view clipping tool.
- Fix: [#7748] Tooltips would not timeout for normal UI elements.
- Fix: [#8015] RCT2 files are not found when put into the OpenRCT2 folder.
- Fix: [#8957] Error title missing when building with insufficient funds
- Fix: [#10186] Placing multiple saved rides ignores design name (original bug).
- Fix: [#12368] Desync due to ghost station pieces affecting changing ride settings.
- Fix: [#12940] Windows cause issues with snow drawing.
- Fix: [#13019] Simulated trains sometimes open construction window when they crash.
- Fix: [#13021] Mowed grass and weeds don't show up in extra zoom levels.
- Fix: [#13024] Console cursor does not correctly render at current cursor position.
- Fix: [#13029] Not all Junior Roller Coaster pieces are shown when "Show all track pieces" cheat is enabled.
- Fix: [#13044] Rides in RCT1 saves all have "0 customers per hour".
- Fix: [#13074] Entrance and exit ghosts for mazes not being removed.
- Fix: [#13083] Dialog for renaming conflicting track design crops text out.
- Fix: [#13097] Missing direction arrow for stations
- Fix: [#13098] UI buttons for entrance and exit don't toggle according to them being built.
- Fix: [#13098] Maze can still be constructed while placing entrance and exit (original bug).
- Fix: [#13118] Closing construction window resets ride viewport.
- Fix: [#13129] Missing error message when waiting for train to leave station on the ride measurements graph.
- Fix: [#13138] Fix logical sorting of list windows.
- Fix: [#13158] Cursors are drawn incorrectly in text input fields.
- Fix: [#13222] Vehicle collision causes negative number of passengers (original bug).
- Fix: [#13226, #7280] No error is shown when attempting to load a corrupted save.
- Fix: [#13266] Plugin API: Deleting key of sharedStorage not working.
- Fix: [#13278] Desync caused by ghost tiles changing the ride mode.
- Fix: [#13289] Litter and vomit sometimes not loading with RCT1 saved game or scenario
- Fix: [#13292] Impossible excitement rating requirements with finish building 5 coasters goal
- Improved: [#13023] Made add_news_item console command last argument, assoc, optional.
- Improved: [#13098] Improvements to the maze construction window user interface
- Improved: [#13125] Selecting the RCT2 files now uses localised dialogs.
2020-11-01 20:00:01 +01:00
Duncan dcabc8451e
Fix #13250: Crash when opening parks with new ride types (#13256)
This only happens when a new ride type is added and the park is opened in the older version of the game where the ride type does not exist.

Reworked so that invalid rides are not loadable. Force reload of title if current scenario is corrupted.
2020-11-01 14:49:43 +01:00
Aaron van Geffen 89cc45908f Replace Backtrace token for v0.3.2 2020-11-01 10:18:49 +01:00
Manuel Vögele 1f7d73a741
Fix #13306: Restore entrance/exit for prebuilt ride design ghosts (#13309)
This fixes a regression introduced in c440dac
2020-10-31 12:27:38 +00:00
evilclownattack 3277153e87
Fix #13289: Litter and vomit sometimes not loading with RCT1 saves (#13322)
Issue was actually caused by loading RCT1 saves from certain rotations, and fixed by reseting sprite quadrants when loading. Wasn't an issue with RCT2 saves as litter screen coordinates are set directly from the save, rather than calculated based on rotation and sprite width/height.
2020-10-31 11:32:32 +00:00
evilclownattack 3e7ff12a72
Fix #13292: Impossible excitement rating requirements
Incorrect argument was used when drawing the minimum excitement rating in the Objective Selection window.
2020-10-28 23:55:29 +01:00
Manuel Vögele d0e5a5ab6e Move ride_open and ride_test into Ride 2020-10-28 18:13:37 +01:00
Manuel Vögele eaa340dd92 Rename ride_is_valid_for_test/open and update return type 2020-10-28 15:31:24 +01:00
Michael Steenbeek 6b4e942a58
Fix #13297: Missing null check in tile_element_get_banner_index() (#13313) 2020-10-27 22:49:06 -03:00
ju-pinheiro a31c958004 Adding missing SpriteIdentifier enumerations to switch statements 2020-10-27 18:52:56 -03:00
ju-pinheiro bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Gymnasiast 140e945a7b
Increase network version 2020-10-26 23:13:49 +01:00
Manuel Vögele 838cd4fc56
When placing a block brake perform full operation mode switch 2020-10-26 22:48:43 +01:00
Manuel Vögele d927fefb86
Fix #13019: Stop simulating when ghost train crashes in block mode 2020-10-26 21:37:51 +01:00
Manuel Vögele e4e7a0f2f2
Fix desync caused due to ghost tiles changing the ride mode 2020-10-26 21:36:09 +01:00
Manuel Vögele c440dac600
Fix #12368: Don't modify station properties when placing ghost tiles 2020-10-26 21:35:44 +01:00
Tulio Leao 7b10fa57bb
Merge pull request #13280 from Broxzier/bugfix/filestream-file-nonexisting-folder
Fix crash when using a writable FileStream to a file in non-existing folder
2020-10-25 14:46:48 -03:00
Keith Stellyes f550f8f5a5
Fix #13282: Autosaves are not deleted when limit is reached 2020-10-25 09:35:42 +01:00
Bryan DiLaura 894be65b6d
Closes #12415: Refactor CURRENCY_TYPE to strong enum (#13276)
* closes #12415 CURRENCY_TYPE enum refactor

* reverses unintended change in Linux.cpp

* closes #12415 CurrencyType strong enum
2020-10-25 01:33:06 -03:00
Hielke Morsink 2275585795 Undef Windows.h macros that cause conflicts
This caused errors on calls to Path::CreateDirectory in source files that include OpenGLAPI.h.
2020-10-24 17:39:16 +02:00
Hielke Morsink b54574fe19 Ensure path exists for writable filestreams 2020-10-24 17:39:16 +02:00
Michał Janiszewski 0aaac728b5 Change GL_TEXTURE_RECTANGLE to NPOT GL_TEXTURE_2D
This improves GLES compatiblity due to missing rectangle textures, but
NPOT 2D ones being universally available.
2020-10-24 17:28:05 +02:00
Michał Janiszewski 16b3a96e66 Change palette size to PoT square 2020-10-24 17:28:05 +02:00
Keith Stellyes 782fab93b4
Add compile-time check for nlohmann json (#13277) 2020-10-24 15:23:17 +02:00
Sadret 6c44fefcaa
Fix #13266: Plugin API Deleting key of shared storage not working 2020-10-23 14:18:51 +02:00
Tulio Leao f6de4b2e44
Fix #13263: SceneryGroup problems (#13270)
* Fix #13263: Scenery group research not working

* ResearchCategory::Group to SceneryGroup
2020-10-23 12:30:39 +01:00
Keith Stellyes 171132fb6d
Add Execute and FindApp to Platform class 2020-10-22 21:17:28 +02:00
Duncan 214f6992dd
Rename to TitleCase and name LastAttachedPS (#13260) 2020-10-22 18:13:54 +01:00
Simon J a017d3fa57
Fix #13215: lingering arrows after ride construction (#13245)
Co-authored-by: Simon Jarrett <mwnciau@users.noreply.github.com>
2020-10-21 23:45:53 -03:00
ζeh Matt 0c099be01c
Export loaded objects alongside inside the save for Backtrace reports (#13213) 2020-10-21 23:15:29 -03:00
aw20368 c81bf7b501
Refactor variable names in window_guest_stats_bars_paint (#13214)
* Refactor variable names in window_guest_stats_bars_paint

Change the variables eax/ebp to timeInPark and barColor, respectively.

* Refactor guest stat UI calculations

Simplify guest stat calculations and move them to a new function NormalizeGuestStatValue.
2020-10-21 07:38:44 +01:00
Bryan DiLaura 1f245b8288
Close #12436: refactor JUNIOR_RC_CHAINTYPE into strong enum (#13237)
* Close #12436: refactor JUNIOR_RC_CHAINTYPE enum
2020-10-20 21:48:29 -03:00
Hielke Morsink 257ada4617
Introduce constant for ticks per month (#13253) 2020-10-20 21:05:27 -03:00
Łukasz Pękalski 9dcbf6d4e6
Close #4865: Offer an option to disable inhibiting the monitor power (#13243)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-10-20 22:02:44 +02:00
rpstester 853f718aee
Close #12391: Refactor PeepUsingBinSubState to use strong enum (#13247)
Changed it to enum class and updated references.
2020-10-19 22:22:24 -03:00
Haven Kim ce2f78bd51
Fix #13222 : Vehicle collision causes negative number of passengers
When peep_sprite_remove is called, RemoveFromRide() will decrease ride's num_riders
2020-10-19 23:33:54 +02:00
Haven Kim 4bce329a40
Fix #12940: Windows cause issues with snow drawing (#13238)
Windows' left value inside of cosine function is causing glitch-feel
movement for snows but in fact, x_start can simply modified by another magic
numbers.
2020-10-19 18:58:47 +02:00
Michael Steenbeek 59d785ef64
Merge pull request #13224 from Broxzier/feature/refactor-autosave
Small autosave refactor
2020-10-18 20:20:41 +02:00
Keith Stellyes 41c0395adb
Fix #13226: No error is shown when attempting to load a corrupted save 2020-10-18 19:54:26 +02:00
Michael Steenbeek 6c687f576d
Merge pull request #13230 from Gymnasiast/refactor/get-source-game-to-method
Refactor legacy GetSourceGame() to method
2020-10-18 17:48:31 +02:00
Aaron van Geffen 1c1b7c8d28
Merge pull request #13209 from X123M3-256/hybrid_fix
Fix hybrid coaster
2020-10-18 17:16:31 +02:00
Haven Kim be824e941f
Fix #7518: Water isn't cut down by view clipping tool (#13205)
By comparing water level and clipping height, we just remove water from
rendering but keep the surface tiles at the bottom
2020-10-17 23:13:40 +02:00
Gymnasiast b47163c06c
Remove orphaned declaration of object_entry_get_type() 2020-10-17 22:46:52 +02:00
Gymnasiast 13fb0b43da
Refactor legacy GetSourceGame() to method 2020-10-17 22:45:12 +02:00
Haven Kim 8a4df108ba
Close #12428: Refactor OBJECT_SOURCE_GAME to use strong enum 2020-10-17 22:27:02 +02:00
Aaron van Geffen a9316869fc
Fix #13158: Cursors are drawn incorrectly in text input fields (#13228) 2020-10-17 22:24:24 +02:00
Łukasz Pękalski 384e0ee718
Close #12418: Refactor RESEARCH_CATEGORY_* to use strong enum (#13216) 2020-10-17 22:15:46 +02:00
duncanspumpkin 54a33674d3 Introduce tables to group information 2020-10-17 20:44:26 +01:00
Hielke Morsink 0cf049c2f7 Replace deprecated function call 2020-10-17 20:00:38 +02:00
Hielke Morsink 085a0e9452 Reduce branching and duplicated lines in limit_autosave_count 2020-10-17 20:00:38 +02:00
Aidan Waite d287653cb5
Fix #4022: Mac cursor offset on launch (#13095)
Update config when forcing windowed mode
2020-10-17 11:57:03 +02:00
Duncan cd39c30989
Tooltip 2 (#13159)
* Use ScreenCoords for tooltip

* Remove temporary variables

* Small refactor

* Fix #13151. Not passing tooltip arguments correctly for ride window

* Fix Server List window version tooltip

* Fix cheats tooltip event

* Add static to function decl

* Remove unreachable break statements in Ride.cpp

* Apply review suggestions

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-10-17 09:10:08 +01:00
Aaron van Geffen af26a2cef0
Improve park cheats tab layout (#13186)
* Remove 'Park parameters…' button
  The scenario options are already accessible through the cheats menu

* Split off Objective group from General group
* Split off new Maintenance group from Staff group

* Shrink 'Force park rating' spinner to make room for label
* Change label 'Force weather' to 'Change weather to'
* Change label "Plants don't age" to 'Disable plants withering'
* Change some strings for consistent capitalisation
2020-10-16 21:52:27 +02:00
X7123M3-256 11f2199476 Fix formatting 2020-10-15 20:45:39 +01:00
X7123M3-256 5c81d7deb9 Use block brake sprite for last station tile 2020-10-15 20:27:33 +01:00
X7123M3-256 dd8dcc6136 Fix incorrect bounding boxes 2020-10-15 20:27:33 +01:00
X7123M3-256 15aca5fbb5 Remove unnecessary comments 2020-10-15 20:27:33 +01:00
X7123M3-256 6ca16e0a06 Make JSON objects able to use hybrid track 2020-10-15 20:27:33 +01:00
Simon Jarrett 65a8c58af7 Fix missing direction arrow for stations 2020-10-15 19:44:36 +01:00
Simon Jarrett 25ce8b3f6e Fix #7443: Construction arrows pulse at irregular intervals. 2020-10-15 19:44:10 +01:00
Łukasz Pękalski 26720eb345
Fix #5178: Lighting effects cannot be disabled in software mode (#13206)
Lighting effect are now automatically turned off when software renderer is selected.
2020-10-15 17:05:39 +02:00
ζeh Matt 645289f4ec
Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
ζeh Matt 92e7b6244b
Fix #13192: Crash because of objects not properly loading (#13197) 2020-10-14 21:54:22 -03:00
Vinicius Sa 711dd00cde
Close #13000: Refactor ObjectFactory to use unique_ptr
Employs the smart pointer unique_ptr for safer memory management.

Classes involved:
 - ObjectRepository
 - ObjectManager
2020-10-14 21:56:48 +02:00
Aaron van Geffen 0c283ba3e7
Ride window: position graph buttons properly 2020-10-14 17:51:58 +02:00
Duncan 250586cb45
Port some OpenLoco helper functions (#13113)
* Port some OpenLoco helper functions

Added a few helper functions from OpenLoco to make viewport code a bit simpler
2020-10-12 22:25:11 -03:00
aw20368 0c195d14b9
Close #8848 Refactor TimeInPark (#13146)
Split TimeInPark into a union: ParkEntryTime for guests, HireDate for staff
2020-10-12 21:36:38 -03:00
Duncan feb188ecb2
Remove incorrect variable from interval names (#13175)
Not sure why this has ended up in the interval names as it is not a rct_string_id. Luckily nothing at present was accessing this.
2020-10-12 21:35:08 -03:00
Aaron van Geffen a5a65fe974
Fix #13167: Broken dropdown menu in rendering engine options (#13169) 2020-10-11 23:06:35 +02:00
Michael Steenbeek 0bf851cfb2
Merge pull request #13164 from Gymnasiast/feature/objective-options-in-cheats
Add Objective Options to Cheats menu
2020-10-11 19:28:50 +02:00
Gymnasiast eb2f40f35c
Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
Gymnasiast 16ca892449
Add Objective Options to Cheats menu 2020-10-11 19:28:25 +02:00
Keith Stellyes 2265938e9b
Fix old-style-cast build errors on BenchSpriteSort.cpp (#13148) (#13150) 2020-10-11 17:43:22 +01:00
Julia Pinheiro cba1d48226
Close #12408: Refactor CURSOR_ID to use strong enum 2020-10-11 18:01:14 +02:00
Tulio Leao f56039abfd
Close #5520: Use std::filesystem over fts.h for recursive deletion 2020-10-11 17:15:05 +02:00
Simon J d7b9a99a0f
Entrance/exit construction state fixes in ride and maze construction (#13098)
* Fix #1324: track selection visible when placing entrance or exit

* Improve maze construction window UX in entrance/exit mode

- Arrows are disabled when entrance and exit are being placed
- Clicking a construction mode will disable the entrance and exit mode
- Previous state restored when leaving entrance/exit construction mode
- Fix entrance/exit buttons not changing when the mode switches after placing the first entrance/exit

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-10-11 12:22:41 +01:00
Aaron van Geffen 8726b37951
Remove remaining old style casts from macos.mm (#13153) 2020-10-10 23:45:50 +02:00
X123M3-256 9681ea4cea
Add "Hybrid Coaster" ride type (#12110)
* Add "Hybrid coaster" ride type

* Add turns

* Add diagonal slopes

* Add bank transitions

* Add diagonal bank transitions

* Add banked turns

* Add sloped turns

* Add sloped bank transitions

* Add sloped banked turns

* Add s bends

* Add helices

* Add barrel rolls

* Add half loops

* Start changing supports to wooden

* Switch diagonals and banked turns to wooden supports

* Finish switching supports to wooden

* Alter default supports for small turns and steep turns

* Split track sprites that were glitching

* Fix incorrect sprite indices on small helices

* Add supports for large flat to steep pieces

* Fix bug with b supports

* Add supports for quarter loops

* Finalize set of track elements

* Fix strange colors when track piece is highlighted

* Update sprites.json

* Add support for corkscrews

* Fix incorrect remap colors and default supports

* Add slope to banked turn transitions

* Add support for preview image in color selection window

* Fix static glitches

* Correct Z offset

* Set segment heights (and fix more static glitches)

* Improve sloped curve supports

* Fix slope to banked turn transitions

* Fix dynamic glitches

* Fix boosters

* Remove corkscrews

* Set ride data and implement ride rating function

* Fix glitches on steep turns and gentle to steep

* Format code

* Add sprites

* Add track color preview image

* Fix formatting

* Add files to MSVC project

* Fix Testpaint

* Revert removal of RIDE_TYPE_50 from GetClassification

* Introduce constant instead of hard coded number

* Fix stray change

* Improve legibility of ride_ratings_calculate_hybrid_coaster()

* Fix comments on byte_97B23C

* Fix two other stray changes

* Fix Xcode project

* Adjust bounding boxes to make clipping behaviour more consistent

* Fix two glitches on medium and large turns

* Address comments from DuncansPumpkin

* Fix incorrect ride ID

* Fix steep turn sprites

* Run PNG images through OptiPNG

* Update changelog

* Fix namespace error

* Use arrays for supports to handle additional elements

* Rename functions to TitleCase and add namespace

* Increment network version

Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
Co-authored-by: tylerleamon <59478575+tylerleamon@users.noreply.github.com>
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-10-10 20:27:12 +01:00
Michał Janiszewski 0c3de1fa00
Fix potential nullptr dereference (#13149)
This fixes optimised builds on ARM
2020-10-10 14:49:33 -03:00
Julia Pinheiro b628bba704
Close #12429: Refactor OBJECT_ERROR to use strong enum and typo fix in build.sh (#13145)
* Close #12429: Refactor OBJECT_ERROR to use strong enum

* Typo Fix in build.sh: Unknown
2020-10-10 16:21:07 +01:00
Duncan f28907a87d
Rework tooltip to be more logical (#13137) 2020-10-10 10:49:56 -03:00
Tulio Leao 61c8cbf88b
Fix #13118: Closing construction window resets ride viewport (#13123) 2020-10-10 10:01:28 -03:00
Tulio Leao f418acfe19
Merge pull request #11493 from OpenRCT2/Wold-style-cast
Enable -Wold-style-cast
2020-10-10 09:15:59 -03:00
Bryan DiLaura 7c95f594d3
Close #12413: Refactor VISIBILITY_CACHE to use strong enum (#13136) 2020-10-09 19:12:14 -03:00
Keith Stellyes 3468d1fc6b
Close #13125: Selecting the RCT2 files now uses localised dialogs 2020-10-09 21:13:14 +02:00
Duncan e23c1cded7
Fix logical sort 2020-10-09 20:59:43 +02:00
Duncan 197bb897bb
Fix #7748. Move tooltip timeout reset to correct location (#13132)
* Fix #7748. Move tooltip timeout reset to correct location

Mistake made in implementation

* Add changelog entry
2020-10-09 16:53:31 +01:00
Duncan 84c9ff833a
Move formatter to separate file. Rework GetMeasurement (#13131)
* Move formatter to seperate file. Rework GetMeasurement

* Add Formatter source files to Xcode project

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-10-09 08:02:07 -03:00
Tulio Leao bace4d62f8 Specify SYSTEM includes on CMAKE builds 2020-10-09 01:28:34 -03:00
Tulio Leao 32c2b7d449
Merge pull request #13122 from vjavs/strong-enum/PeepSpriteType
Refactor PeepSpriteType to use strong enum
2020-10-08 23:48:45 -03:00
Duncan 4fb4feb83c
Fix missing error message on ride graph (#13129)
* Fix missing error message on ride graph

Mistake made during implementation meant that the ride graph would not show the error message when the ride had not left the station. Another mistake meant that the tertiary colour of the ride window was not set to green. The tertiary colour was only used by this error message though so was not noticed.
2020-10-08 15:22:23 -03:00
Tulio Leao 1cf0f91199
Fix #4041: Garbled park option on scenario editor with custom theme (#13126)
* Fix #4041: Garbled park option on scenario editor with custom theme

* Remove duplicate string draw
2020-10-08 14:35:25 +01:00