Commit Graph

15798 Commits

Author SHA1 Message Date
Ishmael King fb47b3bb90
Close #9568: Replace RRC lift sounds LiftWood to match SFRC (#13071)
* refactor: Replace RRC lift sounds LiftWood to match SFRC

* refactor: Replace SLC lift sounds with Classic lift sound

* Update replays for change in lift sound

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-10-05 23:14:43 -03:00
Vinicius Sa bd8c633ea3
Close #12394: Refactor PeepNauseaTolerance to use strong enum (#13106) 2020-10-05 22:13:44 -03:00
Aaron van Geffen 797fe48b0f
Merge pull request #13068 from mwnciau/json-compilation-performance
Fix #13055: Replace includes of Json.hpp in header files with json_fwd.hpp
2020-10-06 01:09:41 +02:00
Aaron van Geffen 0ad7e9787e Add JsonFwd.hpp to the Xcode project 2020-10-06 00:16:21 +02:00
Simon Jarrett 134371f03c Change includes of nlohmann/json_fwd.hpp to new core/JsonFwd.hpp 2020-10-06 00:16:21 +02:00
Michael Steenbeek b835477542
Add Esperanto to language list (#13096) 2020-10-05 08:21:27 -03:00
Aaron van Geffen fe54eee07c
Tab-specific event functions for Options window (#13058)
* Options window: move event lists and open function.

* Options: split off display tab events; add event lists for each tab

* Options: split off rendering tab events

* Options: split off culture tab events

* Options: split off audio tab events

* Options: split off control/interface tab events

* Options: split off misc tab events

* Options: split off advanced tab events; remove old event functions

* Reduce code duplication with common mouseup event
2020-10-04 17:08:10 +02:00
Tulio Leao f4b588256d
Merge pull request #13066 from tupaschoal/fix-5904
Light Tile Inspector Improvements
2020-10-03 15:16:10 -03:00
Michael Steenbeek 8e60ecc022
Do not output error if the sourceGame parameter is omitted (#13079)
Since >90% of objects in the wild are custom objects, it make sense if this
parameter can be safely omitted. Only warn if this field contains garbage.
2020-10-03 14:41:52 -03:00
Simon J 7f963c4901
Fix entrance and exit ghosts not being removed for mazes (#13074)
* Fix entrance and exit ghosts not being removed for mazes

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-10-03 09:33:28 -03:00
Matt 0d43f1fd91
Directly use enums for serialisation 2020-10-03 06:15:13 +03:00
Matt 13f332d5b8
Ensure/Cleanup member initialization for game actions 2020-10-03 05:58:57 +03:00
Matt 82916f6824
Use default constructor 2020-10-03 05:55:33 +03:00
Julia Pinheiro 6a76547c5b
Close #12412: Refactor PROMPT_MODE to use strong enum (#13076) 2020-10-02 23:04:59 -03:00
Mike Jones 4c26fb09b3
Close #12435: Refactor FILEDIALOG_TYPE to use strong enum (#13072)
* Close #12435: Refactor FILEDIALOG_TYPE to use strong enum
2020-10-02 22:43:06 -03:00
Julia Pinheiro 8800c32e52
Close #12404: Refactor DRAWING_ENGINE to use strong enum (#13070) 2020-10-02 22:41:30 -03:00
Simon Jarrett 9c5e9f8dbc Replace includes of Json.hpp in header files with json_fwd.hpp 2020-10-02 11:31:20 +01:00
Tulio Leao 09bb66848c Change windowTileInspectorTile to TileCoordsXY type 2020-10-02 01:45:08 -03:00
Tulio Leao e4d72cefaa Fix #5904: Empty errors on tile inspector base height change 2020-10-02 01:06:54 -03:00
Tulio Leao 0981b49e99
Fix #8957: Error title missing when building w/ insufficient funds (#13020) 2020-10-01 23:19:34 -03:00
Julia Pinheiro c36ec5c5ce
Close #12425: Refactor SOCKET_STATUS to use strong enum (#13064) 2020-10-01 22:10:51 -03:00
Julia Pinheiro 657106d4c6
Close #12424: Refactor NetworkStatisticsGroup to use strong enum (#13056) 2020-10-01 22:07:48 -03:00
Tulio Leao 29955f28e0
Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum
Refactor TRACK_ELEM_* enum
2020-10-01 22:05:44 -03:00
Simon Jarrett 088db4a7c3 Fix incorrect const names of long base pieces
- Fix function names referring to that of the renamed consts
- Fix incorrect mirror of TrackType::FlatToDown60Long in TrackData
2020-10-01 19:57:52 +01:00
Simon Jarrett 52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Sam J Gunner 55b4c4c6f1
Fix #13046: Simplify block sectioned comparisons (#13049) 2020-10-01 09:06:28 -03:00
Duncan ea036a38fd
Use MapCanConstructWithClear in LandSetHeightAction (#13037) 2020-10-01 08:41:35 -03:00
Michael Steenbeek e255c7bb58
Fix #13044: Rides in RCT1 saves all have "0 customers per hour" (#13045) 2020-10-01 10:32:51 +01:00
Bryan DiLaura 56e8cc77c6
Close #12409: Refactor CONSOLE_INPUT to use strong enum (#13052) 2020-10-01 10:31:03 +01:00
Duncan afbc983a94
Fix #13050: Mistake during refactor removed drawing cached track count (#13051) 2020-10-01 09:57:46 +02:00
Duncan 2063aea5ef
Remove common format formatter where possible (#13034)
* Remove common format formatter where possible

Eventually should have it limited to tooltips, window titles and widget args

* Remove remaining paint functions using common

* Remove misuse of gCommonFormatArgs
2020-09-30 22:42:04 +01:00
Michael Steenbeek e4068b9fa8
Fix #8015: RCT2 files are not found when put into the OpenRCT2 folder (#13043)
As mentioned in #8015, gExePath is never set, so I removed that variable altogether.
2020-09-30 18:37:50 -03:00
rpstester 3508bdc37d
Close #12390: Refactor PeepRideSubState to enum class
Also made a RideSubState as a union with SubState and SittingSubState
Updated all values across all files, and the corresponding assert.
2020-09-30 23:33:58 +02:00
Vinicius Sa 41820cd3c2
Close #12392: Refactor PeepActionType to use strong enum 2020-09-30 23:19:10 +02:00
Tulio Leao b92328ce34
Merge pull request #13004 from vjavs/strong-enum/PeepActionSpriteType
Refactor PeepActionSpriteType to use strong enum
2020-09-29 23:38:23 -03:00
ζeh Matt 30307ec42d
Merge pull request #13030 from ZehMatt/fix-4617-2
Fix #4617: Crash when rotating with invalid viewport open
2020-09-30 00:53:32 +03:00
Matt 005e1e0e1f
Final cleanup
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:51 +03:00
Matt 850b10f1fd
Fix memory leak
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:41 +03:00
Matt f765ed2f94
Use unique_ptr for TitleSequenceParkHandle Stream
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:28 +03:00
Matt e3a4d6a245
Use std::string for TitleSequenceParkHandle HintPath
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:01 +03:00
Matt 17bff41e82
Use std::unique_ptr for TitleSequenceParkHandle
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:44 +03:00
Matt 464545b907
Cleanup remnants
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:35 +03:00
Matt 668bd8dc9b
Use std::string for TitleSequence paths
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:25 +03:00
Matt f586981cd3
Use std::string for TitleSequence names
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:12 +03:00
Matt 612249bd74
Use vector for TitleSequence commands
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:58 +03:00
Matt 7245f23422
Use vector for TitleSequence saves
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:42 +03:00
Matt ccb6eb06f8
Use unique_ptr for TitleSequence instances
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:27 +03:00
Matt c23e2621a5
Cleanup string usage
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:03 +03:00
Matt d6c2ec898d
Fix #4617: Crash when rotating with invalid viewport open 2020-09-29 21:44:59 +03:00
Michael Steenbeek a850d76d60
Fix: Not all Junior RC pieces shown with "Show all track pieces" on 2020-09-29 19:57:34 +02:00
Vinicius Sa ca8fa55fdb
Use EnumValue to get the underlying value of an enum
Applied to objects of the enum class PeepActionSpriteType when they are
used as arrays subscripts.
2020-09-29 11:15:07 -03:00
Vinicius Sa f8dd0a57aa
Refactor PeepActionSpriteType to use strong enum 2020-09-29 11:15:04 -03:00
Ben Johnston 147daa8f01
Refactor PARK_AWARD to use strong enum (#13017)
* Refactor PARK_AWARD to use strong enum
2020-09-28 21:48:03 -03:00
Duncan 3c8adb1fc1
Remove gMapTooltip format args global (#12971)
Fix mistake
2020-09-28 21:45:28 -03:00
Aaron van Geffen a0341a7aeb
Fix #13021: Mowed grass and weeds don't show up (#13031) 2020-09-28 21:44:29 -03:00
Gymnasiast 84201678ca
Add comment 2020-09-28 21:41:50 +02:00
Matt 213b6cc672
Use unique_ptr for GetStreamFromRCT2Scenario 2020-09-28 21:17:28 +02:00
Gymnasiast 5f0aed0929
Add .sea support to New Scenario list and extension handling 2020-09-28 21:17:28 +02:00
Łukasz Pękalski d1cd2e08b5
Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
ζeh Matt 54edba2272
Merge pull request #13023 from gsckoco/make_add_news_item_assoc_optional
Make add_news_item assoc optional
2020-09-28 20:28:45 +03:00
Łukasz Pękalski 065da23b3b
Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00
gsckoco 391dabc4f9 Made add_news_item argument assoc optional 2020-09-28 12:28:31 +01:00
Tulio Leao 8f5ee758ee
Fix #3200: Close Construction window upon selecting vehicle page (#13022) 2020-09-28 07:37:22 -03:00
Michael Steenbeek 3c07a9e49b
Allow opening Objective options via console (#13000) 2020-09-27 21:53:31 -03:00
Duncan 4ec10837a6
Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required

* Remove common from Guest window where possible
2020-09-27 21:09:08 -03:00
Richard Fine a1222fa4ca
Staff code cleanup (#12907)
* Make UpdateFixing*() methods use const where possible

To make it clearer which steps actually modify the ride being fixed and which do not, pass const Ride* instead of Ride* where possible.

* Extract maximum litter search distance to a constant

* Make peep_update_*() methods return bool

* Use Direction type and helpers where applicable

* Const correctness and other cleanup

Make many functions take a const Peep* / const Staff* to clarify that they do not modify the peep being passed in. Also use the Direction type for some return values, and simplify staff_is_location_on_patrol_edge.

* Use clearer expression of constant value

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Convert staff functions to members

* Remove AsStaff const overload

* Use As<Staff>() instead of static_cast

* Simplify direction selection code

* Clean up use of magic constants

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-27 21:07:09 -03:00
Tulio Leao d01dcea98a Release v0.3.1
- Feature: [#10807] Add 2x and 4x zoom levels (currently limited to OpenGL).
- Feature: [#12703] Add scenario plugin APIs.
- Feature: [#12708] Add plugin-accessible names to all game actions.
- Feature: [#12712] Add TCP / socket plugin APIs.
- Feature: [#12840] Add Park.entranceFee to the plugin API.
- Feature: [#12884] Add BaseTileElement.occupiedQuadrants to the plugin API.
- Feature: [#12885] Add SmallSceneryElement.quadrant to the plugin API.
- Feature: [#12886] Make all scenery placement and remove actions available to the plugin API.
- Feature: [#2350, #12922] Add snow, heavy snow and blizzard to weather types.
- Fix: [#400] Unable to place some saved tracks flush to the ground (original bug).
- Fix: [#5753] Entertainers make themselves happy instead of the guests.
- Fix: [#7037] Unable to save tracks starting with a sloped turn or helix.
- Fix: [#12691] Ride graph tooltip incorrectly used count instead of number string.
- Fix: [#12694] Crash when switching ride types with construction window open.
- Fix: [#12701] Silent NSIS setup flag /S isn't silent, upgrade pop-up appears anyway.
- Fix: [#12737] Space Rings draw the same vehicle 4 times.
- Fix: [#12756] Scenario Editor crashing the game on macOS.
- Fix: [#12764] Rides don't start aged anymore.
- Fix: [#12818] Ride price not ignored in free-rides parks.
- Fix: [#12820] Title menu buttons not invalidating properly
- Fix: [#12845] Deleting ride with active ad campaign creates incorrect notification.
- Fix: [#12857] Incorrect Peep thoughts in imported RCT1 parks.
- Fix: [#12881] Guests' favourite rides are not listed in the guest window.
- Fix: [#12910] Plugin API: getRide sometimes returns null for valid ride IDs.
- Fix: [#12912] Plugin: selectedCell of CustomListView is being ignored on creation.
- Fix: [#12918] Cannot place vanilla TD6 tracks of the Hypercoaster, Monster Trucks, Classic Mini Roller Coaster, Spinning Wild Mouse and Hyper-Twister types.
- Fix: Incomplete loop collision box allowed overlapping track (original bug).
- Improved: [#12806] Add Esperanto diacritics to the sprite font.
- Improved: [#12837] Arabic text is now drawn and shaped correctly on Windows.
- Improved: [#12890] Add stroke to lowercase 'L' to differentiate from capital 'I'.
- Technical: [#12749] The required version of macOS has been lowered to 10.13 (High Sierra).
2020-09-27 17:57:34 -03:00
Tulio Leao afff2c10f2 Add new backtrace token for v0.3.1 2020-09-27 17:35:46 -03:00
Michał Janiszewski 8daca5b69e Add better controls over MinGW jobs to CMake 2020-09-27 20:29:49 +02:00
Matt 958f3824c9
Fix #12969: Crash opening ride window with invalid mechanic assigned 2020-09-27 13:40:40 +03:00
Aaron van Geffen 62b13e68bc
Fix #13005: Last player action is not truncated (#13007) 2020-09-27 11:41:28 +02:00
Michał Janiszewski 17e86a61c9
WinNT5.1 networking fixes (#12759) 2020-09-24 10:28:24 +02:00
Michael Steenbeek e5ec74feaf
Fix #12918: Cannot place "Blue Hurricane" (hypercoaster) (#12982)
The track design was recognised as a Corkscrew RC, not as a Hypercoaster. Moved the conversion code from the track design repository to the TD6Importer (where it should have been, really).

This also fixes the issue that Hypercoasters, Monster Trucks, Classic Mini Roller Coasters, Spinning Wild Mouses and Hyper-Twisters placed from a track design have the wrong ride type.
2020-09-21 22:42:25 +02:00
Michał Janiszewski 0ae86d0558
Don't use empty resolutions (#12980) 2020-09-20 23:13:10 -03:00
Richard Fine 4030d9050e
Fix #12974: unable to build fences on slopes (#12975)
Fix the casing of 'isAllowedOnSlope' to match the way it is cased in the JSON files, which causes the flag to be read correctly and re-enables building on slopes for the scenery pieces which have it specified.
2020-09-20 06:54:01 +01:00
Duncan 124161b459
Implement copy constructors (#12970) 2020-09-19 13:58:05 +01:00
Michael Steenbeek 4a79e9305f
Replace gfx_draw_string_right() with DrawTextBasic (#12966) 2020-09-18 21:39:00 -03:00
Michael Steenbeek fd194d0e32
Allow compilation with nlohmann/json < 3.9.0
According to the [API docs](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp#L23219-L23222), the fourth argument (which allows ignoring comments) was only introduced in version 3.9.0 (released on 27 July 2020), which is not present in Ubuntu 20.04 (it only has 3.7.3-1).

Since comments are not part of the JSON spec, this option is not terribly useful anyway. I have removed it, so that it can now compile on Ubuntu 20.04, and possibly also earlier versions.
2020-09-19 00:19:39 +02:00
Gymnasiast a896d238b1
Remove optional arguments to json_t::parse 2020-09-18 23:46:07 +02:00
Michael Steenbeek 77e22851cc
Merge pull request #12925 from richard-fine/dropdown-menus-static-data
RFC: Dropdown menus static data
2020-09-18 23:37:26 +02:00
Gymnasiast 72c13c8e77
Allow compilation with nlohmann/json < 3.9.0 2020-09-18 23:31:09 +02:00
Gymnasiast 265429c85a
Fix compilation on 32-bit Windows and MinGW 2020-09-18 20:54:36 +02:00
Ted John c204767176
Fix RTL for Windows 2020-09-18 19:46:12 +02:00
Gymnasiast 4ff77ebc35
Split RTL implementations to files; add preprocessor guards 2020-09-18 19:46:12 +02:00
Gymnasiast f11d1294fe
Use FriBidi on Windows, ICU on the rest 2020-09-18 19:46:12 +02:00
Gymnasiast 751810fc24
Use FriBidi for Bidi and shaping instead of ICU 2020-09-18 19:46:12 +02:00
Duncan da82144bfb
Fix #12944. Mistake from refactor meant formatter optimised away (#12961)
Not sure why it should get optimised away but this will fix the crashes.
2020-09-18 09:25:17 +01:00
Tulio Leao c72f547606
Merge pull request #12916 from richard-fine/pathfinding
Pathfinding cleanup
2020-09-17 17:58:31 -03:00
Matt b3b9a348c5
Apply review suggestions 2020-09-17 22:16:05 +03:00
Matt 38e03ae45d
Use the Formatter for News items 2020-09-17 22:14:36 +03:00
Matt ccde06ab0f
Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Matt 2639349925
Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Michael Steenbeek 1982e8491b
Merge pull request #12667 from mwnciau/json-refactor
Migrate JSON library to JSON for Modern C++
2020-09-17 21:11:06 +02:00
Richard Fine b57ed85098 Fixes from review feedback 2020-09-16 21:24:35 -04:00
Simon Jarrett f3aba68e46 Update project build files 2020-09-16 20:18:54 +01:00
Simon Jarrett 660c137958 Refactor Version to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett 2c92c652e2 Refactor ObjectLoadError to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett 57a57b0c02 Refactor Theme to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett 12dfa74eef Refactor CmdlineSprite to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett 0c58dfa1b3 Refactor objects to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett 97b44a7181 Refactor ObjectFactory to use new JSON library
- Removed a few try-catch blocks as this is now handled in Json::Read[...]
2020-09-16 20:18:53 +01:00
Simon Jarrett 5f17554c25 Refactor ObjectJsonHelpers
Move functions in ObjectJsonHelpers to their relevant namespaces and classes
- Move ParseColour to Colour::FromString
- Move ParseCursor to Cursor::FromString
- Move LoadStrings to StringTable::ReadJson
- Move LoadImages to ImageTable::ReadJson
- Move ParseObjectEntry to Object::ParseObjectEntry
- Move GetString, etc. to Json::GetString, etc.
- Delete ObjectJsonHelpers .cpp and .h files
2020-09-16 20:18:53 +01:00
Simon Jarrett 1b821c1059 Refactor ServerList to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett 651a2951a1 Refactor NetworkUser to use new JSON library
- Removed the ToJson(json_t) method
- The FromJson method expects to receive a JSON node of type object (as per added documentation)
- Unlike elsewhere, we need to use iterators for the Save() method to allow us to remove items from the array
2020-09-16 20:18:53 +01:00
Simon Jarrett de9a16404b Refactor NetworkServerAdvertiser to use new JSON library
- the body.dump() calls throughout use the default indent parameter of -1 so will produce JSON with no whitespace
- OnRegistrationReponse must be passed a JSON node of type object
2020-09-16 20:18:53 +01:00
Simon Jarrett c655d47dd3 Refactor NetworkGroup to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett f1bcf20050 Refactor NetworkBase to use new JSON library 2020-09-16 20:18:52 +01:00
Simon Jarrett 324e94e6ce Fix #9088: refactor JSON code to use a more modern C++ library
- Removed dependency on jansson
- Implemented nlohmann JSON for Modern C++
- Moved generic GetString, etc., helper functions out of ObjectJsonHelpers.hpp to Json.hpp
- Added GetEnum helper function
- Added AsObject and AsArray helper functions
- Removed GetStringArray, etc., helper functions as they're not needed with the better language features
- Added second GetFlags definition that allows specifying inverted flags - this is a bit cleaner than previous hacks
- Comments!
2020-09-16 20:18:52 +01:00
Matt 3eff713765
Remove unused Registration.hpp 2020-09-16 20:23:39 +03:00
Matt 16fc41e6bf
Always return unique_ptr for the IniReader/IniWriter interface 2020-09-16 20:23:39 +03:00
Matt d0d5cc5179
Remove unused declarations 2020-09-16 20:23:34 +03:00
frutiemax af591c834b
Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1) (#12938)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-16 00:02:22 -03:00
Michael Steenbeek 3acbb92074
Merge pull request #12922 from Gymnasiast/LetItSnow2 2020-09-15 18:11:45 +02:00
Tulio Leao c1729c8a87
Merge pull request #12858 from ju-pinheiro/network-strong-enums
NETWORK_PERMISSION and NETWORK_AUTH replaced by strong enums
2020-09-15 08:07:19 -03:00
Gymnasiast a46a21973f
Amend changelog; bump network version 2020-09-14 22:00:54 +02:00
Gymnasiast ce325fdb9b
Also set proper temperature when using weather cheat 2020-09-14 22:00:54 +02:00
Gymnasiast ac985a8d61
Do not transition to snow for now 2020-09-14 22:00:54 +02:00
Brett c9de4f49fe
Add snow as a weather type
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-14 21:58:00 +02:00
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
rpstester f7348b1f06
Close #12389: Refactor PeepSittingSubState (#12908)
* Refactor PeepSittingSubState

* Fix formatting
2020-09-14 20:11:17 +01:00
frutiemax 2857f9d276
Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp (#12906)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-14 08:44:50 -03:00
Richard Fine 4f31ddaca4 Make menu data declarations local to the functions using them 2020-09-13 16:30:17 -04:00
Richard Fine a51d8e4deb Convert cheats menu to use new constexpr menu specification 2020-09-13 16:16:05 -04:00
Richard Fine ce99928b81 Convert view menu to use new constexpr menu specification 2020-09-13 16:15:53 -04:00
Richard Fine 4a9974fda6 Introduce mechanism for configuring dropdown menu with static data
For menus with static content, provide a mechanism for building the menu items as a constexpr array, allowing developers to specify menus more concisely and to put the data into the .rodata section where it can be quickly copied through.
2020-09-13 16:15:28 -04:00
Michael Steenbeek 0fb307c12e
Merge pull request #12921 from OpenRCT2/plugin/extras
Add quadrants and scenario info to plugin API
2020-09-13 20:37:53 +02:00
Richard Fine d21da12f9f
Fix 11414: ‘Possible misuse of comma operator’ warnings (#12919)
Fix the ‘possible misuse of comma operator’ warnings reported by XCode - the two original ones reported in #11414, plus one more in Util.cpp.
2020-09-13 17:43:59 +01:00
Ted John e79d4be5a5 Add quadrant and occupiedQuadrants to plugin API 2020-09-13 17:02:12 +01:00
Ted John 146a754001 Add plugin API for scenario and objective 2020-09-13 17:02:12 +01:00
Ted John e5107141e9 Add plugin API for park flags 2020-09-13 15:00:09 +01:00
Michael Steenbeek cf5b48a9dd
Rename Rain.{cpp,h} to Weather.{cpp,h} (#12914) 2020-09-12 19:32:26 -03:00
Sadret a9cd89d02e
Fix #12912: Plugin: selectedCell of CustomListView (#12913) 2020-09-12 19:24:23 -03:00
Richard Fine 4a20ed38a8 Document public API for pathfinder
Add comments explaining the externally-visible points in the pathfinding code.
2020-09-12 14:59:40 -04:00
Richard Fine 542eb873fc Consolidate pathfinding code
Consolidate all the guest pathfinding code from Peep.cpp into GuestPathfinding.cpp, and make a dedicated header for GuestPathfinding to help make it easier to see what the actual public interface is to the pathfinding system.
2020-09-12 14:59:40 -04:00
Gymnasiast 247de81e3b
Apply requested fixes 2020-09-12 13:45:50 +02:00
Ron4u 5fe542dd25
fixed issue 12335 2020-09-12 13:18:00 +02:00
Ted John eb18a5db81
Fix #12910: Plugin API: getRide sometimes returns null for valid IDs 2020-09-12 12:18:24 +02:00
Tulio Leao 917fb77f0e Revert regressed warning on window_install_track_paint 2020-09-10 21:19:53 -03:00
Tulio Leao c2f42cd908 Fix #12901: Guest thoughts show up as guest actions or names 2020-09-10 21:18:42 -03:00
Tulio Leao 2f3d455b3a
Merge pull request #12899 from Gymnasiast/refactor/c-style-casts
Remove most remaining C-style casts
2020-09-10 20:49:15 -03:00
Aaron van Geffen c0e551056f
Fix #12900: Garbled/distorted date lines in file browser (#12902)
* Fix #12900: Garbled/distorted date lines in file browser
2020-09-10 20:47:39 -03:00
ju-pinheiro 214620951f Close #12421: Refactor NETWORK_AUTH to use strong enum
Replacing enum NETWORK_AUTH with enum class NetworkAuth.
2020-09-10 19:32:28 -03:00
ju-pinheiro 20a8bbc322 Close #12420: Refactor NETWORK_PERMISSION to use strong enum
First approach, instead of a bigger refactor to avoid the need of "static_cast".
2020-09-10 19:32:27 -03:00
Tulio Leao 55f2eeb04d
Favour constexpr function over macro on Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 720c17eea6
Cleanup c-style casts from Platform.Win32.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao e032ba091d
Cleanup c-style casts from Shared.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 2a85374c6a
Cleanup c-style casts from Windows.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao cf5f3da0df
Cleanup c-style casts from Socket.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao fc59cb55a5
Cleanup c-style casts from Path.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 9d2a9d76d3
Cleanup c-style casts from String.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5f47546392
Cleanup c-style casts from Http.WinHttp.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5afe6407a1
Cleanup c-style casts from FileWatcher.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5abbbf1357
Cleanup c-style casts from Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao cb7e190c8a
Cleanup c-style casts from File.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao de58f0f7a0
Cleanup c-style casts from FileScanner.hpp 2020-09-10 21:36:21 +02:00
Gymnasiast c83ddefe47
Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
Michał Janiszewski d8ffec0ed7
Use correct count of research items when importing park
Co-authored-by: Hielke Morsink <Broxzier@users.noreply.github.com>
Co-authored-by: Michael Steenbeek <Gymnasiast@users.noreply.github.com>
2020-09-10 21:01:14 +02:00
Duncan 353c02b596
Add visitors for all scenery placement and removes (#12886)
* Add visitors for all scenery placement and removes

This should allow greater flexibility for plugin developers

* Add CoordsXYZ visitor

* Increment plugin API version. Update changelog
2020-09-10 15:15:46 -03:00
tellovishous 96945183f5
Add stroke to lowercase 'L' to differentiate from capital 'I' (#12890)
The problem with many sans-serif fonts, such as those in RCT2, is that it can be difficult to tell between a lowercase L and an uppercase I, and can be visually ambiguous. What I've done is add a small stroke to the bottom of the lowercase L's so that it will stand out better when it's used next to capital I's.
2020-09-10 20:07:12 +02:00
Tulio Leao 4afbbed9bd
Fix #12881: Guests' favourite rides not listed in the guest window 2020-09-10 19:11:17 +02:00
Gymnasiast d140dd72c6
Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast b788a099b5
Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Tom Parsons 9a30100a81
Make all GameAction types accessible to plugins (#12708)
* add ActionType

* Make all game actions available to plugins

Includes list of game actions in the .d.ts

* Add an overload for internal game actions

This allows things like Visual Studio Code to autocomplete

* action can be a string (custom gameactions)

* Increment OPENRCT2_PLUGIN_API_VERSION

* Add #12708 to changelog and tombomp to contributors.
2020-09-10 12:30:56 +01:00
Aaron van Geffen 11ebe78328
Refactor window offset std::arrays into regular arrays (#12799) 2020-09-09 22:51:51 +02:00
Michael Steenbeek ba7b08acfc
Merge pull request #12665 from Gymnasiast/refactor/objective-struct
Create Objective struct and use it for global objective
2020-09-09 22:34:33 +02:00
Michael Steenbeek bd28b74655
Make all game actions take an ObjectEntryIndex where applicable (#12384)
* Make all game actions take an ObjectEntryIndex where applicable

* Update replays for parameter size change

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-09 17:03:20 +01:00
Gymnasiast e23089d255
Make scenario check into member functions 2020-09-09 15:39:07 +02:00
Gymnasiast 6e22eade67
Create Objective struct and use it for global objective 2020-09-09 15:38:03 +02:00
Richard Fine d2d9750a5b Fix #5753: Entertainers make themselves happy instead of the guests
After identifying guests that are near an entertainer, modify the guest's HappinessTarget and TimeInQueue values instead of the entertainer's own values.
2020-09-08 16:40:29 -04:00
Jacob Schwartz fe71ce437d
Close #12434: Refactor ENTERTAINER_COSTUME to use strong enum (#12865) 2020-09-08 16:29:18 -03:00
Michael Steenbeek 30ffced8b9
Merge pull request #12880 from richard-fine/directions
Further clean up of direction-handling code
2020-09-08 18:16:25 +02:00
Richard Fine 6e176e725c Fix formatting 2020-09-07 22:27:33 -04:00
Richard Fine 51fdf84763 Use Direction type for TrackPaint functions
Many TrackPaint functions take a direction, but they used a mixture of uint8_t and int32_t types for the parameters. To make the semantics of the code clearer, use the dedicated Direction type for all of them.

This does mean that some parameters which were previously 32 bits (int32_t) will now be 8 bits (Direction) but from what I could see none of the usages make use of anything beyond the bottom 4 bits.
2020-09-07 21:20:34 -04:00
Richard Fine 74b581c572 Remove unused 'direction' parameter
The get_track_paint_function functions have all been taking an extra 'direction' parameter, but nothing is actually using it. To simplify things, remove the parameter.
2020-09-07 21:20:34 -04:00
Richard Fine 4d3ba7a6f0 Rename PathElement::Edges for clarity
PathElement::Edges actualy stores both 'edges' (in the lower 4 bits) and 'corners' in the upper four. Rename the variable to make this dual usage easier to see.
2020-09-07 21:20:34 -04:00
Michael Steenbeek 6ac23fbabb
Make Arabic font easier to read 2020-09-07 19:21:32 +02:00
Hielke Morsink 96d1db97e0
Fix: Unused variable warning because of if constexpr (#12871)
This moves the variable in question to the scope where it gets used. Since it's a reference, this shouldn't be a performance hit.
2020-09-06 22:22:49 +02:00
Nils Caspar 4e6935f689
Consistently render various height marks when zoomed in (#12853) 2020-09-06 08:56:41 +01:00
Gymnasiast d5ff5712b9
Add drawing code for the Esperanto characters 2020-09-05 22:58:00 +02:00
chess123mate 83de5fab2a
Fix #12818 - Ride prices not ignored in free-rides parks (#12832) 2020-09-05 11:10:42 -03:00
Duncan e24c897cad
Fix #12857: Incorrect thought arguments for RCT1 import 2020-09-05 13:24:26 +02:00
Ted John c7b8a63fa9 Fix network enum 2020-09-03 22:38:42 +01:00
Ted John 858bb4045f Explicitly close sockets when plugin is stopped 2020-09-03 22:38:42 +01:00
Ted John 33ba51b763 Fix crashes and improve socket lifecycle 2020-09-03 22:38:42 +01:00
Ted John 0bddf5a5db Rename SocketServer to Listener 2020-09-03 22:38:42 +01:00
Ted John 173a42f656 Apply code review suggestions 2020-09-03 22:38:42 +01:00
Ted John 1c91404707 Add more network guards 2020-09-03 22:38:42 +01:00
Ted John fd6fddb61a Improve WSA handling 2020-09-03 22:38:42 +01:00
Ted John 7dfb748500 Add listening property 2020-09-03 22:38:42 +01:00
Ted John 5da5804f84 Add localhost limitation 2020-09-03 22:38:42 +01:00
Ted John 703dc1efa7 Add ability to connect 2020-09-03 22:38:42 +01:00
Ted John 182bcaf21a Implement setNoDelay 2020-09-03 22:38:42 +01:00
Ted John 7a5cb8a5b6 Refactor events into EventList class 2020-09-03 22:38:42 +01:00
Ted John dce547af99 Start implementing TCP API 2020-09-03 22:38:35 +01:00
Nils Caspar 359bbee9f5
Fix #12845: Cancel marketing campaigns for demolished rides (#12848) 2020-09-03 18:20:42 -03:00
Duncan c0255efeaa
Create an enum class serializer (#12810)
* Create an enum class serializer

* Make visitor work again

* Make suggested changes
2020-09-03 21:55:46 +01:00
Nils Caspar bc33ef3d43
Add Park.entranceFee to the plugin API (#12840) 2020-09-03 17:07:19 -03:00
Nils Caspar 22f29bf192
Close #12414: Refactor GUEST_LIST_FILTER_TYPE to use strong enum (#12830) 2020-09-02 12:50:16 -03:00
Simon Ellmann 5f3fe62f83
Close #12432: Refactor STAFF_MODE to use strong enum (#12752)
* Refactor STAFF_MODE to use strong enum

Closes #12432

* Change type of gStaffModes to StaffMode
2020-09-02 12:48:40 -03:00
Nils Caspar ae81ed63cc
Remove unused constant TAB_HEIGHT in Cheats.cpp (#12838) 2020-09-01 22:58:06 +02:00
Michael Steenbeek 55722a7ad4
Remove commented-out code (#12834) 2020-09-01 15:33:52 -03:00
Simon J f7acb84e42
Fix #400: unable to place some saved tracks flush to the the ground (#12721) 2020-09-01 18:26:44 +02:00
Tulio Leao 4e58eae43d
Merge pull request #12808 from gguedesaz/fix-stringbuilder
Part of #11159: Refactor on StringBuilder.hpp
2020-09-01 00:48:55 -03:00
Gabriel Guedes 95ae589750 Part of #11159: Prefer std::basic_string<utf8> over raw pointer
Usage of std::basic_string to improve readability and maintainability.
2020-08-31 21:06:02 -03:00
Julia Pinheiro dafde532af
Close #12426: Refactor NETWORK_READPACKET to use strong enum (#12807)
Replacing enum NETWORK_READPACKET with enum class NetworkReadPacket.
2020-08-31 09:13:15 -03:00
Aaron van Geffen e9803fc4b5
Fix #12820: Title menu buttons not invalidating properly (#12821)
This introduces constants for the title menu buttons to ensure this does not happen again.
2020-08-30 23:30:02 +02:00
Aaron van Geffen 5825dedd81
Rename TitleScenarioSelect to ScenarioSelect (#12822)
The scenario select window is not only available through the title screen.
2020-08-30 20:22:20 +02:00
Gabriel Guedes 332e9e76d5 Part of #11159: Removing unused functions from StringBuilder.hpp 2020-08-29 14:34:30 -03:00
ju-pinheiro e9c3f31422
Close #12423: Refactor NETWORK_SERVER_STATE to use strong enum (#12802)
#12423
2020-08-29 08:05:51 -03:00
Łukasz Pękalski bfdc1f6d2a
Close #12430: Refactor OBJ_STRING_ID to use strong enum (#12796) 2020-08-28 23:36:58 -03:00
Tulio Leao 731a93dc39
Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Cory Sanin 8d366ebaea
Add Ride.totalProfit to the plugin API (#12795)
Add Ride.totalProfit to the plugin API
2020-08-28 22:52:54 +01:00
awiebe b53c4b3625
Downgrade Mac build requirements of OpenRCT2 to macOS 10.13 (#12749)
Keep targeting macOS 10.14 for libopenrct2 target. Replace deployment target with macOS 10.13 for other targets, including the OpenRCT2 bundle.

Explicitly type std::arrays, since Xcode refuses to use C++17 array deduction.

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-08-28 22:27:25 +02:00
Ted John 3a0bff4b93 Add comment about remX, remY 2020-08-28 01:30:17 +01:00
Ted John 65e3d20156 Refactor drawing 2020-08-28 01:30:15 +01:00
Ted John a1cd02c61c Disable closer zoom levels for software rendering 2020-08-28 01:29:59 +01:00
Ted John 609cde2304 Fix drawing of money text when zoomed in 2020-08-28 01:29:59 +01:00
Ted John 7f0510e444 Fix sub pixel clip issues with OpenGL 2020-08-28 01:29:59 +01:00
Ted John f51ad862c9 Refactor window drawing 2020-08-28 01:29:59 +01:00
Ted John 2b51eaeaa1 Fix weather gloom when zoomed in 2020-08-28 01:29:59 +01:00
Ted John 25581fa4ef Share blit methods between BMP and RLE 2020-08-28 01:29:59 +01:00
Ted John f16a46b872 Refactor RLE minify 2020-08-28 01:29:59 +01:00
Ted John 1645c64e87 Implement RLE magnify 2020-08-28 01:29:59 +01:00
Ted John 247c950c60 Implement magnify for bitmap 2020-08-28 01:29:59 +01:00
Ted John cd7324262d Create ZoomLevel struct to add two new zoom levels 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
Michał Janiszewski c6b10bb051
Make GetCurrentExecutableDirectory public (#12791) 2020-08-27 21:03:41 +02:00
Michael Steenbeek db8efe20d0
Merge pull request #12785 from Gymnasiast/refactor/text-drawing
Start removal of gfx_draw_string_*()
2020-08-26 22:51:39 +02:00
Michael Steenbeek 60a35f7abb
Merge pull request #12783 from Gymnasiast/refactor/ride-status-formatter
Use Formatter in windows/Ride.cpp
2020-08-26 22:51:09 +02:00
Gymnasiast 549a771120
Use Formatter& 2020-08-26 17:13:19 +02:00
Aaron van Geffen ec6f1b5fcd
Fix #12784: Scenery tab images missing 2020-08-26 17:06:19 +02:00
Gymnasiast 17bac8c57b
Use colour_t 2020-08-26 15:38:27 +02:00
Gymnasiast 972e6e80ab
Allow passing Formatter to DrawTextBasic() and DrawTextEllipsised() 2020-08-26 15:08:42 +02:00
Gymnasiast 39bc73c394
Deprecate text draw functions with 1:1 replacements 2020-08-26 14:53:59 +02:00
Gymnasiast 9a31a94128
Use const args in DrawTextEllipsised() 2020-08-26 14:49:28 +02:00
Gymnasiast ceace1a3ad
Remove draw_string_left_underline() 2020-08-26 14:47:47 +02:00
Gymnasiast f1caddc9fe
Remove draw_string_right_underline() 2020-08-26 14:46:37 +02:00
Gymnasiast 5f468da9cf
Remove draw_string_centred_underline() 2020-08-26 14:44:57 +02:00
Gymnasiast e1b778832b
Expose DrawTextBasic() and DrawTextEllipsised() 2020-08-26 14:44:30 +02:00
Gymnasiast 10ac7954b0
Remove set_format_arg_body() 2020-08-26 14:04:44 +02:00
Gymnasiast 879ce64a86
Use Formatter in windows/Ride.cpp 2020-08-26 13:59:18 +02:00
Michael Steenbeek 8b19d943a4
Merge pull request #12676 from mwnciau/Ride-Helix-Save
Fix #7037: saving rides starting with sloped turn
2020-08-26 12:13:59 +02:00
Michael Steenbeek 56c623e549
Merge pull request #12671 from AaronVanGeffen/refactor/tabs
MakeTab wrapper for standard tab widgets
2020-08-26 12:13:36 +02:00
Gymnasiast c85960abee
Fix Junior RC booster G2 offsets 2020-08-26 11:58:15 +02:00
Tulio Leao 02d1c5afca
Merge pull request #12771 from tupaschoal/fix-12764
Fix #12764: Rides don't start aged anymore
2020-08-25 21:51:57 -03:00
Tulio Leao efdb7e1a2d Change gDateMonthsElapsed type to int32_t 2020-08-25 19:06:38 -03:00
Michał Janiszewski 30e452d76c
Fix null dereference in place_provisional_track_piece (#12777) 2020-08-25 23:20:40 +02:00
Michał Janiszewski 3d12dfec3e
Part of #11437: Refactor Win32 RemoveFileAssociations to Platform2 (#12773)
Additionally fixes missing changes from previous refactor in #12036 that
borked WinNT 5.1 support
2020-08-25 23:20:24 +02:00
Tulio Leao 10aca0fe6e Fix #12764: Rides don't start aged anymore 2020-08-25 08:21:34 -03:00
ceeac 8f8eb81326
Fix #12740: Compile error when DEBUG_LEVEL is 2 or higher in CMake (#12754)
Commit 6607bad did not fully fix this.
2020-08-24 19:56:16 -03:00
frutiemax 4165d64e60
Part of #11159: save_for_network returns unique_ptr (#12163) 2020-08-22 18:56:34 -03:00
Duncan 2660df85ed
Reset sprite spatial index on all inits (#12746) 2020-08-22 05:09:42 +01:00
Tulio Leao 4caf571c22
Followup on #12475 post-mortem comments (#12745)
* Remove using namespace OpenRCT2 from header

* Fix using wronf undefined enum for shortcut key map
2020-08-21 16:07:38 +01:00
Sidney 5330f7fb86
closes #12445 Refactor CLIMATE to use strong enum (#12551) 2020-08-21 09:43:57 +01:00
frutiemax 4cc550a364
Close #12460: Refactor KeyboardShortcut to use strong enum (#12475)
* Close #12460: Refactor KeyboardShortcut to use strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-08-20 23:54:43 -03:00
Tulio Leao 6607badad0
Fix #12740: Broken log messages on GuestPathfinding (#12743) 2020-08-20 23:35:04 -03:00
Tom Parsons 9cdae2d1e2
Fix #12401: Refactor SCALE_QUALITY to use strong enum (#12673) 2020-08-20 23:32:56 -03:00
frutiemax d61a749b70
Use CoordsXYZ for sub_98199C in MiniatureRailway.cpp (#12723) 2020-08-20 23:14:56 -03:00
Cory Sanin df5dd4f253
Fix #12737: Space Rings draw the same vehicle 4 times (#12738)
paint_space_rings_structure always used vehicle 0 for it's vehicle reference
2020-08-20 19:04:15 +02:00
Simon J b51e98215a
Fix #12728: Paths made in scenario editor don't connect to the map edge (#12730)
Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-08-19 19:51:13 -03:00
Simon Jarrett 31a1d5259c Fix #7037: Unable to save tracks starting with a sloped turn or helix 2020-08-19 00:08:14 +01:00
Simon Jarrett 9fb51c18d4 Fix: Incomplete loop collision box allowed overlap (original bug) 2020-08-18 17:03:35 +01:00
frutiemax 33f3f5cc3b
Use CoordsXYZ for sub_98199C in RiverRapids.cpp (#12289) 2020-08-18 09:27:23 -03:00
Simon J 4c2ce0f892
Remove duplicate TRACK_ELEMENT_LOCATION_IS_UNDERGROUND flag (#12714)
Renamed all instances to ELEMENT_IS_UNDERGROUND

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-08-18 09:26:03 -03:00
Aaron van Geffen 40cfadcdc5 Apply formatting suggestions from code review
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-08-18 10:13:48 +02:00
Aaron van Geffen 0f6611b6d6 Remove unused disabled tab sprite 2020-08-18 10:13:48 +02:00
Tulio Leao f2af98b3e8
Merge pull request #12690 from ryan-bello/develop
Fix #12433 Refactor STAFF_TYPE to use strong enum
2020-08-18 00:46:49 -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
frutiemax 9ab1f3b5fe
Close #12336: Remove goto from loc_6A6D7E (#12366) 2020-08-17 23:28:26 -03:00
ryan-bello 54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
Aaron van Geffen 3b97cd9b14 Refactor Staff*, Themes, and TitleEditor to use MakeTab 2020-08-17 20:59:42 +02:00
Aaron van Geffen 6b9211c8b8 Refactor Park, Player, Research, Ride* to use MakeTab 2020-08-17 20:59:42 +02:00
Aaron van Geffen 3631d75b98 Use MakeTab in Mapgen, Multiplayer, Network, NewRide, NewsOptions 2020-08-17 20:59:23 +02:00
Aaron van Geffen be626d0b7c Refactor Editor*, Finances, Guest* to use MakeTab 2020-08-17 20:59:17 +02:00
Aaron van Geffen 6602b51b8b Use MakeTab in EditorInventionsList, EditorObjectSelection, Scenery 2020-08-17 20:59:17 +02:00
Aaron van Geffen 4a55acd71e Introduce MakeTab wrapper function
The MakeTab function is only applied in two places, for the moment:
the Cheats and Options windows.
2020-08-17 20:59:13 +02:00
Aaron van Geffen 72be84caf8
Remove unused fourth tab from Staff window (#12713) 2020-08-17 20:21:46 +02:00
Duncan 55ba164dee
Fix crash when switching ride types with construct window open (#12694) 2020-08-16 18:48:21 +01:00
pizza2004 647730fcfa
Fix #12691: Tooltip at ride's graph tab is not using a proper string 2020-08-15 23:17:38 +02:00
Aaron van Geffen 135cc10b47 Release v0.3.0 2020-08-15 21:13:50 +02:00
Aaron van Geffen f95da1c99a Fix alignment for widget definitions 2020-08-14 10:18:17 +02:00
Michał Janiszewski 6dd67296a4 Merge "new version" window back to changelog 2020-08-14 10:18:17 +02:00
Michał Janiszewski ddee3c0e46 Postpone update check until the context gets fully initialised 2020-08-14 10:18:17 +02:00
Michał Janiszewski 6ae5645686 Show update information on main screen & in floppy menu 2020-08-14 10:18:17 +02:00
Michał Janiszewski 55835456a0 Pester users to update to latest release 2020-08-14 10:18:17 +02:00
Aaron van Geffen eda8e31055
Refactor widget defs in EditorObjectiveOptions window (#12672) 2020-08-13 23:07:19 -03:00
Michał Janiszewski c8fbffa0e2
Update backtrace token for upcoming release 2020-08-13 23:28:31 +02:00
Matt Thomson a8f8f06e2d
Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum (#12642)
* Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum

* Remove redundant default branches

Co-authored-by: Matt Thomson <matt-thomson@users.noreply.github.com>
2020-08-13 21:51:28 +01:00
Michael Steenbeek 5e09ecc904
Fix #12308: Cannot use cheats in editor modes (#12661)
This allows opening the cheats window while in editor mode. Some tabs and options are disabled because they are not relevant to these modes.
2020-08-13 13:03:56 +02:00
Michael Steenbeek 33d9fc2b75
Fix #10549: 'Build the best ride you can' objective missing ride name
This is implemented in a way that is compatible with RCT2 (as long as the ride type was not split).
2020-08-13 00:23:08 +02:00
Michael Steenbeek 68ce06e833
Refactor objective handling in Scenario Editor
This moves some knowledge out of the window and into the main code and also cleans up the window a bit.

This also allows setting the "x guests by the end of year y" goal for no money scenarios, which was not the case previously.
2020-08-12 22:10:47 +02:00
ζeh Matt c1076658fc
Merge pull request #12658 from ZehMatt/fix-network-hang
Fix freezes on incomplete packet transmission
2020-08-12 19:00:27 +02:00
Matt 08af1e9be6 Increase network buffer to maximum packet size of 64 KiB 2020-08-12 18:36:12 +02:00
Michael Steenbeek d1b193c06d
Fix #11968: Maze height is higher than it should be 2020-08-12 18:33:15 +02:00
Matt ebc2be4cd0 Fix freezes on incomplete packet transmission 2020-08-12 18:11:09 +02:00
ζeh Matt e464c9e522
Invert the condition (#12645) 2020-08-11 19:29:18 +01:00
Michael Steenbeek 2d56c8d2de
Merge pull request #12636 from Gymnasiast/refactor/to-member-function
Use a 16-bit integer for track type in more places
2020-08-11 17:53:20 +02:00
ζeh Matt ae25af291b
Merge pull request #12631 from ZehMatt/12474-part1
Add more guards in network code
2020-08-11 17:25:22 +02:00
Matt 2a9796f2cc Add more guards in network code 2020-08-11 15:56:09 +02:00