Commit Graph

20395 Commits

Author SHA1 Message Date
Gymnasiast 7b072808ee
Turn Date into struct 2024-04-04 18:12:36 +02:00
Gymnasiast fef1a27342
Remove GameState class 2024-04-04 18:12:35 +02:00
Gymnasiast 28451027b1
Move Park to GameState_t 2024-04-04 18:12:08 +02:00
Gymnasiast 1f1377a8ef
Move Date to GameState_t 2024-04-04 18:12:08 +02:00
Michael Steenbeek 26d65b37ea
Merge pull request #21645 from Gymnasiast/refactor/inverted-covered-handling-2
Refactor track paint functions and available pieces in RTDs
2024-04-03 17:30:14 +02:00
Michał Janiszewski e55d761eb7 Release v0.4.10
- Feature: [#18171] Add port of the RCT1 Stand-Up Roller Coaster.
- Feature: [#21590] [Plugin] Plugins can now read and write banner properties of tile elements.
- Feature: [#21636] Add shortcut key for sorting tile elements.
- Feature: [objects#294] Add scenery versions of wooden truss supports.
- Feature: [objects#295] Flipped version of wooden post.
- Improved: [#21424] Extra viewports can now rotate independently from the main viewport.
- Improved: [#21561, #21631] Enable more features in Android build (plugins, networking, multiplayer, audio formats).
- Improved: [#21599] Currency signs now use non-breaking spaces.
- Improved: [objects#157] Added sloped images for many walls.
- Improved: [objects#288] Better map colours and more sensible prices for RCT1 land surfaces.
- Improved: [objects#292] Vehicle colour cleanups for WW/TT vehicles.
- Improved: [objects#299] More accurate ratings modifiers for RCT1 vehicles.
- Improved: [objects#309] Updated names for dodgems and flying saucers vehicles.
- Improved: [objects#313] buildMenuPriority for dodgems and flying saucers vehicles.
- Change: [#21529] Classify “Southern Sands”, “Tiny Towers”, “Nevermore Park”, “Pacifica” as expert scenarios.
- Change: [#21545] Reorder Wacky Worlds scenarios and adjust their difficulty classification.
- Fix: [#910] Extra viewport does not preserve the location when rotating.
- Fix: [#18413] Crash when mouse over a hacked train.
- Fix: [#20338] Cannot select Scenery Picker or Scatter Tool when the scenery recolouring tool is active.
- Fix: [#21317] Track designer allows proceeding without an object selected.
- Fix: [#21360] If the object selection is missing certain types, the Object Selection window will switch to an incorrect tab.
- Fix: [#21419] Cannot place walls underground beneath sloped tiles with clearance checks disabled.
- Fix: [#21434] Number of guests overflows in objective text.
- Fix: [#21522] Supports for 3×3 turns and 45 degree turns on the Hybrid Coaster and Wooden Roller Coaster not drawn correctly.
- Fix: [#21543] Crash with creating a TrackIterator with invalid arguments.
- Fix: [#21635] Tile inspector hotkey can set wall slope for non-slopeable objects.
- Fix: [#21641] Crash when creating track iterator from an invalid tile element.
- Fix: [#21652] Dialog window to confirm overwriting files does not apply the theme colours correctly.
- Fix: [#21654] No sound effects when using RCT Classic as an asset base.
- Fix: [#21654] Extraneous reports of an object conflict between `rct2.audio.base` and `rct2.audio.base.rctc`.
- Fix: [#21664] Crash when switching between languages that use TTF.
- Fix: [#21668] Crash when on null ride in Guest::UpdateRideLeaveExit.
- Fix: [#21691] Crash when validating rides which can't contain banked track.
- Fix: [objects#290] “Haunted Mansion” cars have a non-functional third remap colour.
- Fix: [objects#296] Incorrect wall placement around large Kremlin/drab pieces.
- Fix: [objects#300] Incorrect Colosseum and volcano corner clearances.
- Fix: [objects#319] Incorrect diagonal slope images used for RCT1 corkscrew.
- Fix: [objects#320] Incorrect Mandarin Duck boats capacity.
2024-04-02 22:21:50 +02:00
Michał Janiszewski c8f91d3f35
Update backtrace token for upcoming release 2024-04-02 22:11:17 +02:00
Michael Steenbeek 3461ac38ca
Fix #21522: incorrect support drawing on Hybrid and Wooden (#21710)
* Fix #21522: incorrect support drawing on Hybrid and Wooden

* Add changelog entry
2024-04-02 22:05:48 +02:00
Michał Janiszewski 6b734fda6b
Fix #21591: Banner text colors are not working properly (#21709)
* Fix #21591: Banner text colors are not working properly
2024-04-02 19:06:58 +03:00
Michał Janiszewski dfcb527ada
Ensure TTF system is torn down in correct order (#21707)
`TTFDispose` uses `gCurrentTTFFontSet` to deallocate internal resources.
Having the function called after global variable got changed meant it
tried to deallocate incorrect font and would subsequently call
`FT_Done_Face` on a struct having internal data set to nullptr.

Reproduction is fairly easy:
1. launch the game in Korean (I made sure to have all the indexes primed
   for this language beforehand - i.e. launch it twice),
2. switch to Japanese,
3. switch back to Korean

Fixes #21664
2024-04-02 00:52:40 +02:00
John Kastner 6ea091841f
Fix memory leak loading malformed `SawyerChunk` (#21508)
* Fix memory leak loading malformed `SawyerChunk`

A temporary buffer was not free'd after failing to parse in
`SawyerChunkReader::ReadChunkTrack`. Fix this following the pattern used
in `SawyerChunkReader::ReadChunk` by wrapping the relevant code in a
`try` block with `FreeLargeTempBuffer` called when an exception is
caught.

* Use unique_ptr

* Remove `AllocateLargeTempBuffer`

---------

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2024-04-01 22:40:14 +00:00
Claudio Tiecher a94e6c54d8
Part of #21421: replace define with constexpr (#21679) 2024-04-01 07:00:32 -03:00
Michael Steenbeek 9062049be1
Fix sound effects not working with RCTC base, fix audio object conflict
Due to this overwriting of object IDs, loading the sound effects would not work on RCTC. This overwriting also caused object conflicts which weren’t always won by the RCTC one. This fixes both problems by using non-clashing names, and only renaming one to `rct2.audio.base`, the name expected by the asset packs.
2024-03-31 22:28:17 +00:00
Michał Janiszewski 06081eb23d
Fix #21691: Use correct iterator in RideCheckTrackContainsBanked (#21701) 2024-04-01 00:23:37 +02:00
Michael Steenbeek 19a65d1642
Bump network version for large scenery fix (#21699) 2024-03-31 19:25:19 +02:00
Michael Steenbeek 0668f0fb92
Fix #21695: Cannot remove large scenery 2024-03-31 17:57:14 +02:00
Michał Janiszewski d8ba574e6c
Default-initialise more members of Ride (#21694)
It seems they got omitted in https://github.com/OpenRCT2/OpenRCT2/pull/21514
2024-03-31 00:12:24 +01:00
Michael Steenbeek 8d16c0a73d
Merge pull request #21647 from Gymnasiast/refactor/image-import
Refactor image import
2024-03-31 00:08:31 +01:00
ζeh Matt 84d1f502b1
Rename NO_TRAIN to kNoTrain 2024-03-30 23:18:51 +01:00
ζeh Matt f14b86426d
Remove some unnecessary field assignments in RideCreateAction 2024-03-30 23:18:51 +01:00
ζeh Matt e3343f263f
Default initialize newly created Rides 2024-03-30 23:18:08 +01:00
ζeh Matt d969a4f80d
Default initialize all members in Ride 2024-03-30 23:18:08 +01:00
Gymnasiast 88eca0d518
Move everything in ImageImporter.cpp into namespace 2024-03-30 18:13:03 +01:00
Gymnasiast c232aa9b0c
Create import meta object, use single method for JSON parsing 2024-03-30 18:13:03 +01:00
Gymnasiast eb2cda6a56
Replace `"forceBmp": true` with `"format": "raw"` 2024-03-30 18:13:02 +01:00
Gymnasiast 18232341c8
Remove unused variables 2024-03-30 17:31:59 +01:00
Peter Froud c4b7845c26
Use `if... else if` 2024-03-30 17:15:17 +01:00
Peter Froud 869d1b398b
Assign variable in condition for documentation 2024-03-30 17:15:17 +01:00
Peter Froud 322321645b
Add `STR_ERR_INVALID_COLOUR` 2024-03-30 17:15:14 +01:00
Peter Froud 2b1d5ad9b7
Use specific error stringIDs 2024-03-30 17:12:54 +01:00
Peter Froud 276ff311cf
Add `LOG_WARNING` about bugged scenery entry 2024-03-30 17:12:54 +01:00
Peter Froud 1f698dfc76
Add `LOG_ERROR` calls 2024-03-30 17:12:54 +01:00
Peter Froud d1f740c786
Change "Could not find X" to "No X" 2024-03-30 17:12:54 +01:00
Peter Froud 40537a17fa
General cleanup of existing error messages 2024-03-30 17:12:54 +01:00
Peter Froud 226fc4cb00
Add location to error messages 2024-03-30 17:12:54 +01:00
Peter Froud 257c2d45d3
Change `if(elem!=nullptr)` to `if(elem==nullptr)` 2024-03-30 17:12:54 +01:00
Peter Froud f49fe68cc6
Improve messages for default case in switch stmt 2024-03-30 17:12:54 +01:00
Peter Froud a1517a4fcb
Use "X not found for Y" message style 2024-03-30 17:12:54 +01:00
Peter Froud 9e702d8b65
Missed an instance of `ride == nullptr` 2024-03-30 17:12:54 +01:00
Peter Froud 87ee06b7a4
Use `STR_ERR_RIDE_NOT_FOUND` when `ride==nullptr` 2024-03-30 17:12:54 +01:00
Peter Froud 13abc3441c
Change "invalid game command" messages 2024-03-30 17:12:54 +01:00
Peter Froud 125fa12d6f
Remove redundant word ("index. index = %u") 2024-03-30 17:12:53 +01:00
Peter Froud 338cca6760
Add missing `%u` in format strings 2024-03-30 17:12:53 +01:00
Peter Froud 23958186bd
Change `LOG_ERROR` to `LOG_WARNING` for errors 2024-03-30 17:12:53 +01:00
Gymnasiast e1127cde8a
Split Lay-down RC track drawer 2024-03-30 00:33:35 +01:00
Gymnasiast 96c9b7d85d
Refactor track paint functions and available pieces in RTD 2024-03-30 00:33:35 +01:00
Ryan Gudonis b5fdcf9a17
Change difficulty order for Wacky Worlds scenarios 2024-03-29 00:11:30 +01:00
mrmbernardi d48b75fb86
Refactor TTF drawing (#21621) 2024-03-28 23:28:54 +01:00
Matt b9a0dcbe2f
Merge pull request #21686 from AaronVanGeffen/android-cpp20
Move Android build fully to C++20 as well
2024-03-28 16:42:00 +02:00
Aaron van Geffen db18c712fe Remove frowny faces regarding char8_t<->char conversion 2024-03-28 14:04:54 +01:00
Aaron van Geffen 66ca0388ed Move Android build fully to C++20 as well 2024-03-28 00:38:56 +01:00
reversebottle 854d4e6fa4
Fix #21652: set correct color on save overwrite first open (#21666) 2024-03-27 23:12:55 +00:00
Aaron van Geffen cec251bb63 Take kAllObjectTypes internal as well 2024-03-27 21:26:07 +01:00
Aaron van Geffen e173564500 Add missing pragma once to TileElementsView.h 2024-03-27 20:39:37 +01:00
Aaron van Geffen 98c3c8b22c Add missing header to ObjectEntryManager.h 2024-03-27 20:39:16 +01:00
Aaron van Geffen e898e9211d Move kObjectEntryGroupCounts to ObjectList.cpp 2024-03-27 20:13:10 +01:00
Aaron van Geffen d645906003 Move kTransientObjectTypes, kIntransientObjectTypes out of header 2024-03-27 19:51:57 +01:00
Aaron van Geffen 5f4d02a6f7 Move kLegacyObjectEntryGroupEncoding to ObjectRepository.cpp 2024-03-27 19:20:05 +01:00
Michael Steenbeek 8e563edcbe
Fix #21673: Incorrect tunnels on Classic Stand-Up 2024-03-27 18:40:07 +01:00
Michael Steenbeek 03b0c1e884
Fix compilation error on 64-bit MSVC builds (#21677) 2024-03-26 16:28:51 +01:00
Harry Hopkinson bf20a6d146
Fix #21317: Track designer allows proceeding without an object selected
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2024-03-26 13:53:32 +01:00
reversebottle 7c65a372aa
Add kParkRatingHistorySize constant 2024-03-26 13:24:25 +01:00
Michał Janiszewski 43507671b5
Fix crash on null ride in Guest::UpdateRideLeaveExit (#21668) 2024-03-26 11:46:34 +00:00
Stephan Spengler 2913a0686a
Add banner properties to plugin API for large scenery, walls and banners 2024-03-26 11:42:09 +00:00
Michael Steenbeek 8e157bd709
Merge pull request #21667 from janclod/replace-define-with-constexpr-1
Part of #21421: Replace define with constexpr
2024-03-26 11:48:35 +01:00
Claudio Tiecher be6a4cf5d9 Part of #21421: make var decl consistent 2024-03-26 10:34:56 +01:00
Michael Steenbeek fb49287343
Bump network version for object changes 2024-03-26 00:34:16 +01:00
Michael Steenbeek 457d40bf2b
Merge pull request #21642 from Gymnasiast/feature/classic-standup-2024
Add Classic Stand-Up Roller Coaster
2024-03-26 00:28:19 +01:00
Claudio Tiecher 4d99fec550 Part of #21421: apply more clang-formatting 2024-03-25 16:56:04 +01:00
Claudio Tiecher 5d2ecf71e5 Part of #21421: apply clang-formatting 2024-03-25 16:46:44 +01:00
Claudio Tiecher 026e12d22e Part of #21421: refactor MPH(x) as literal 2024-03-25 16:17:32 +01:00
Claudio Tiecher eb4c64abc4 Part of #21421: improved consistency for var decl 2024-03-25 16:17:32 +01:00
Claudio Tiecher 24688ad5a3 Part of #21421: Refactor TILE_ELEMENT_DIRECTION_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher c6def2d0a9 Part of #21421: Refactor TILE_ELEMENT_TYPE_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher e5ff6b271a Part of #21421: Refactor TILE_ELEMENT_QUADRANT_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher ffb8b4d44b Part of #21421: Refactor MAXIMUM_MAP_SIZE_TECHNICAL 2024-03-25 16:17:32 +01:00
Claudio Tiecher ef81a6376e Part of #21421: Refactor MINIMUM_MAP_SIZE_TECHNICAL 2024-03-25 16:17:32 +01:00
Claudio Tiecher b60483f25d Part of #21421: Refactor VEHICLE_SEAT_NUM_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher 2c4c2da319 Part of #21421: Refactor VEHICLE_SEAT_PAIR_FLAG 2024-03-25 16:17:32 +01:00
Claudio Tiecher 13e9ff84c2
Part of #21421: Replace define with constexpr (#21626)
* Part of #21421: Refactor RIDE_INITIAL_RELIABILITY in Ride.h

* Part of #21421: Refactor STATION_DEPART_FLAG and STATION_DEPART_MASK

* Part of #21421: Refactor MAX_STATION_PLATFORM_LENGTH

* Part of #21421: Refactor RIDE_RATING_UNDEFINED

* Part of #21421: Refactor TRACK_BLOCK_END

* Part of #21421: Refactor TRACK_PREVIEW_IMAGE_SIZE

* Part of #21421: Refactor based on feedback

* Part of #21421: Fix signed/unsigned mismatch on Win

* Improved consistency kTrackPreviewImageSize

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

* Part of #21421: kMaxStationPlatformLength to int8

---------

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2024-03-24 21:49:50 +00:00
Michał Janiszewski 0581b1edd3
Fix #18413: Trying to set tooltip using null vehicle (#21662) 2024-03-24 21:21:18 +01:00
Harry Hopkinson 249c8259c1
Fix #20338: Scenery Picker Hotkey not selected with re-paint tool 2024-03-24 12:29:40 +01:00
Max bc926057eb
Fix #21419: Cannot build walls under sloped terrain
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2024-03-23 12:39:00 +01:00
Michael Steenbeek 6eb96b1b07
Fix #21604: Scenario selector shows incorrect guest objectives 2024-03-22 21:39:04 +01:00
Gymnasiast 24807932c3
Fix flat-to-diagonal supports not quite reaching the track 2024-03-22 17:30:02 +01:00
Gymnasiast c1c71003eb
Add fallback for people without RCT1 2024-03-22 17:30:02 +01:00
ZeeMaji 8614517e14
Accurate max build height for classic 2024-03-22 17:30:02 +01:00
Gymnasiast 2465694404
Fix formatting 2024-03-22 17:30:02 +01:00
Gymnasiast d6ce38185f
Consolidate support and general support height calls 2024-03-22 17:30:02 +01:00
Gymnasiast 00e1f504f5
Create rotated version of support functions 2024-03-22 17:30:02 +01:00
Gymnasiast 9982749def
Implement diagonal-sloped-straight-to-bank sections 2024-03-22 17:30:02 +01:00
Gymnasiast b66f687880
Implement diagonal flat parts 2024-03-22 17:30:02 +01:00
Gymnasiast 9b1603a37a
Implement 2×2 turns 2024-03-22 17:30:02 +01:00
Gymnasiast eb058d4fe3
Implement 45 degree banked corners 2024-03-22 17:30:02 +01:00
Gymnasiast 73441bff5d
Implement remaining orthogonal banked pieces 2024-03-22 17:30:01 +01:00
Gymnasiast 3c4b0ba36e
Consolidate PaintUtilSetGeneralSupportHeight() calls for 3×3 2024-03-22 17:30:01 +01:00
Gymnasiast 515951e667
Normalise PaintUtilRotateSegments() calls 2024-03-22 17:30:01 +01:00
Gymnasiast 6602100d22
Update for upstream changes 2024-03-22 17:30:01 +01:00
Gymnasiast 91e0f91cb0
Name segment constants in ClassicStandUpRollerCoaster.cpp 2024-03-22 17:30:01 +01:00
Gymnasiast dfa5875c5a
Implement 3×3 banked turn (pending calls to segment support height) 2024-03-22 17:30:01 +01:00
Gymnasiast 82d8167482
Fix Classic Stand Up vehicle colours 2024-03-22 17:30:01 +01:00
Gymnasiast d21b411f43
Implement flat-to-banked transitions 2024-03-22 17:30:01 +01:00
Gymnasiast 1d324247bf
Add constants 2024-03-22 17:30:01 +01:00
Gymnasiast cd5c56d811
Add Classic Stand-Up Roller Coaster 2024-03-22 17:30:01 +01:00
Andrew a972d231d7
Add shortcut key for sorting tile elements (#21636) 2024-03-22 15:24:10 +01:00
Andrew 693c422cd4
Prevent TI hotkey from setting wall slope for non-slopeable objects (#21635) 2024-03-22 11:20:48 +01:00
Michael Steenbeek 1470507d8e
Fix Object Load Error and Scenery Scatter windows looking weird
These two windows (and only these two) inherited from WindowBase, rather than Window, and as such regressed because of #21572.
2024-03-22 02:51:41 +01:00
Michael Steenbeek 74364e2afc
Fix #21641: NPE when creating track iterator from invalid tile element 2024-03-22 02:51:11 +01:00
Jan Kelemen cb3b2a77e7
Move gWidePathTileLoopPosition and gGrassSceneryTileLoopPosition to GameState_t 2024-03-21 22:50:18 +01:00
Michał Janiszewski 4484dc647c
Merge pull request #21631 from janisozaur/android-enable-more-libraries
Android: enable more libraries
2024-03-21 14:22:36 +01:00
Duncan 5a70fd97fb
Move vehicle sounds update into Ui library (#21577)
* Move vehicle sounds update into Ui library

* Add missing statics

* Apply review comments

* Sprinkle some const

* Clang format accumulate
2024-03-20 11:14:52 +00:00
Michał Janiszewski c166d69f22 Android: Compile x86_64 as well, needed for emulator 2024-03-18 12:18:20 +01:00
Michał Janiszewski 221877fa33 Android: Replace curl dependency with HttpAndroid Java implementation 2024-03-18 12:18:20 +01:00
Michał Janiszewski 723b9ed5bc Android: Update Java dependencies 2024-03-17 23:43:59 +01:00
Michał Janiszewski b07b1e29dc Android: Enable more features (networking, multiplayeri, vorbis) 2024-03-17 23:43:59 +01:00
CoryY 3f81a491b0
Close #21569: Remove 'Window' from Window Open function names (#21613)
* Close #21569: Remove 'Window' from Window Open function names

Windows are all under the OpenRCT2::Ui::Windows namespace. As such, "Window" is removed from the Open functions names.

* Update Contributors.md

* Fix formatting TrackMangeOpen

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Fix formatting TrackPlaceOpen

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-03-17 06:37:46 +00:00
Michael Steenbeek 8963234eac
Use same parameter names in g2/sprites.json and object json 2024-03-16 15:45:04 +01:00
Matt 6633509af6
Refactor peep update (#21605) 2024-03-16 06:35:55 -03:00
Claudio Tiecher 59958a6b8f
Part of #21421: replace define with constexpr in Ride.h (#21602) 2024-03-16 06:34:01 -03:00
Harry Hopkinson 25d3db0f1f
Move gParkRatingCasualtyPenalty to GameState_t (#21610) 2024-03-16 06:24:50 -03:00
Michael Steenbeek 2181f1b09e
Part of #21193: move entities to GameState_t 2024-03-15 00:22:18 +01:00
Michael Steenbeek 0f927d720b
Merge pull request #21579 from Gymnasiast/refactor/segments
Name segment constants and create a proper enum
2024-03-14 23:16:21 +01:00
Michael Steenbeek 0968d87668
Use non-breaking spaces around currency units 2024-03-14 21:43:51 +00:00
Michael Steenbeek d2e7d57104
Close #21536: Replace ATOMIC_VAR_INIT() macro with constructor 2024-03-14 22:34:54 +01:00
Harry Hopkinson 8a6de886be
Move awards to GameState_t (#21601) 2024-03-14 18:16:33 -03:00
Jan Kelemen 9bb678688e
Fix #21434: Number of guests overflows in objective text 2024-03-14 19:49:57 +01:00
Harry Hopkinson b69db13de3
Move gPeepWarningThrottle to GameState_t 2024-03-14 18:39:11 +01:00
Michał Janiszewski 5c00047bd1 Sync android project with docker build image 2024-03-11 21:06:46 +01:00
Michał Janiszewski 9524174d13 Use v14 images in CI
Fixes #19409
2024-03-11 20:55:13 +01:00
Peter Froud 1e51925968
Change "ternary" to "tertiary" (#21582) 2024-03-11 08:42:54 -03:00
Gymnasiast 7ae98f7421
Use EnumsToFlags() and create a proper enum 2024-03-11 01:12:35 +01:00
Gymnasiast 632f29e6a9
Name segment constants 2024-03-11 00:22:35 +01:00
Matt 6950a74b37
Fix #21565: Giant screenshots not working correctly 2024-03-10 21:24:40 +01:00
Michael Steenbeek 1981ca6b0b
Close #16582: Translate in-game console help text 2024-03-10 19:46:21 +01:00
Harry Hopkinson e486606189
Move gPeepSpawns to GameState_t (#21570) 2024-03-10 15:16:28 -03:00
Duncan 1d3bd31ab8
Deduplicate FormatStringID symbols 2024-03-10 18:15:49 +00:00
Michael Steenbeek b219ab1ed4
Use LanguageGetString() if there is nothing to format 2024-03-10 18:48:23 +01:00
Michael Steenbeek 24f5675cab
Remove WindowBase::IsLegacy() function (#21572) 2024-03-10 18:48:06 +01:00
Ryan Gudonis 65fa51976b
Classify some LL scenarios as expert
Adjust difficulty categories for Loopy Landscape scenarios:
- Southern Sands
- Tiny Towers
- Nevermore Park
- Pacifica
2024-03-10 15:06:43 +00:00
Harry Hopkinson 78d95fc0bd
Pass DrawPixelInfo by reference (#21563) 2024-03-10 12:00:08 -03:00
Michael Steenbeek 9ebe65b55a
Fix building sloped banked 3×3 turns when coaster also has 1×1 turns
This fixes a bug that would prevent the user from building 3×3 banked sloped turns, if the roller coaster also had 1×1 flat turns enabled.
The Spinning Roller Coaster that @RealSteel89 is working on is the first one to do so, revealing this bug.
2024-03-10 14:35:18 +00:00
Duncan 7a60e7f2e0
OpenRCT2::Ui::Windows namespace for OpenRCT2 Ui Windows (#21559)
* Move all the windows into OpenRCT2::Ui::Windows namespace

* Fix missing symbol

* Clang format

* Call the correct FormatStringID
2024-03-10 13:52:35 +00:00
Michał Janiszewski 7634dfb6a3
Android: Enable plugins (#21561) 2024-03-09 20:03:36 +01:00
Duncan 3146d463bd
Move Ui header items to OpenRCT2::Ui (#21546)
* Move ui definitions to ui project

* Enforce coding style

* Apply clang format

* Add clang tidy ignore

* Increase compiler happiness
2024-03-09 14:15:45 +00:00
Harry Hopkinson 0c1fb5fec0
Fix #21543: Game Crashing with invalid TrackIterator (#21547)
* Check if el is nullptr

Check if el is nullptr

Format

* Add changelog
2024-03-09 14:15:28 +00:00
Harry Hopkinson 048276b67a
Move gLastEntranceStyle to GameState_t 2024-03-09 11:27:05 +01:00
Duncan cb100db56e
Put a number of OpenRCT2::Ui items in the OpenRCT2::Ui namespace 2024-03-07 23:36:49 +01:00
Michael Steenbeek dec5140f20
Merge pull request #21532 from jan-kelemen/move_ride_rating_and_same_price_to_game_state
Move gSamePriceThroughoutPark and gRideRatingUpdateStates to GameState_t
2024-03-07 21:59:58 +01:00
Matt 1e8ae8ea11
Merge pull request #21542 from Harry-Hopkinson/gLandPrice-to-GameState
Move gLandPrice to GameState_t
2024-03-07 22:54:36 +02:00
Matt a2fdd600cf
Merge pull request #21424 from ZehMatt/viewport-update
Store the rotation in viewports
2024-03-07 22:42:00 +02:00
Tulio Leao 7190e7ae26
Merge pull request #21526 from Harry-Hopkinson/replace-static_cast<int32_t>-with-EnumValue 2024-03-07 17:36:00 -03:00
Harry Hopkinson 81814bd81e Move gLandPrice to GameState_t 2024-03-07 18:44:21 +00:00
ζeh Matt 2814662ea8
Remove unnecessary reset of entities spatial index, coordinates are 3D 2024-03-07 01:05:47 +02:00
ζeh Matt d3b8ad471e
Turn the error into a verbose message when there is no viewport 2024-03-07 00:54:09 +02:00
Piotr Kubaj 96be441533
Don't include alloca.h on FreeBSD (#21535)
alloca.h does not exist on FreeBSD.
2024-03-06 19:02:27 +01:00
Jan Kelemen 56df47a48d Move gRideRatingUpdateStates to GameState_t
- Move gRideRatingUpdateStates variable to GameState_t
- Remove RideRatingGetUpdateStates function
2024-03-06 17:54:40 +01:00
Jan Kelemen ee4e8d0323 Move gSamePriceThroughoutPark to GameState_t 2024-03-06 17:54:31 +01:00
Harry Hopkinson 9ab18e37a2 Cleanup static_cast's
Cleanup static_cast's

Cleanup static_casts'

Cleanup static_casts'

Format Code

Address requested changes

Address requested changes

Change uint16_t to size_t

Stop undefined behaviour

Address requested changes.
2024-03-06 10:28:45 +00:00
Harry Hopkinson 86c28693ba
Move gGuestChangeModifier to GameState_t 2024-03-06 00:06:27 +01:00
ζeh Matt a1304ef147
Fix rebase 2024-03-05 10:34:03 +02:00
ζeh Matt ae0af55a99
Make GCC happy due to non-enumerated usage 2024-03-05 10:26:00 +02:00
ζeh Matt 425c4cf04e
Allow viewports to have an independent rotation 2024-03-05 10:25:59 +02:00
ζeh Matt c87b82d75e
Add a rotate button to the extra viewport 2024-03-05 10:25:59 +02:00
ζeh Matt 8bf33a6039
Fix viewport not using the correct rotation in some cases 2024-03-05 10:25:59 +02:00
ζeh Matt f7682f6b13
Apply clang-format 2024-03-05 10:25:59 +02:00
ζeh Matt bdcfa5af8f
Add a function to invalidate viewports pre-transformed position 2024-03-05 10:25:59 +02:00
ζeh Matt 47d346ee81
Remove unused code 2024-03-05 10:25:57 +02:00
ζeh Matt 462bb33234
Refactor viewport rotation to keep it in sync with the primary viewport 2024-03-05 10:23:31 +02:00
ζeh Matt d95f14dcda
Fix ViewportPosToMapPos using the wrong rotation 2024-03-05 10:23:30 +02:00
ζeh Matt a33cc1ac86
Fix ScViewport::moveTo not using the right rotation 2024-03-05 10:23:30 +02:00
ζeh Matt 7be082cacc
Fix ViewportAdjustForMapHeight not using the correct rotation 2024-03-05 10:23:29 +02:00
ζeh Matt 1a7b873256
Fix ViewportInteractionGetClosestPeep not using the right rotation 2024-03-05 10:23:29 +02:00
ζeh Matt 87dd29f3bc
Make GetClosestPeep static 2024-03-05 10:23:29 +02:00
ζeh Matt afe266e2fe
Recalculate the screen position for entities when painting 2024-03-05 10:23:28 +02:00
ζeh Matt 98acdf3743
Use the rotation from the Viewport where applicable 2024-03-05 10:23:28 +02:00
ζeh Matt 2661cf8772
Refactor out all uses of gCurrentRotation, remove gCurrentRotation 2024-03-05 10:23:28 +02:00
ζeh Matt 8864f6cf51
Add ViewportGetMain 2024-03-05 10:23:27 +02:00
ζeh Matt 81499643db
Rename unused field to Rotation 2024-03-05 10:23:27 +02:00
ζeh Matt 1a197af715
Make ViewportPaint static, refactor TrackDesign to use ViewportRender 2024-03-05 10:23:23 +02:00
Harry-Hopkinson 3247d16ed8 Replace size_t's with EnumValue 2024-03-04 19:21:12 +00:00
Harry-Hopkinson 56df39dcb4 Replace uint8's with EnumValue
Replace uint8's with EnumValue

Replace uint8's with EnumValue

Revertl arge change

Revert large change

Format
2024-03-04 19:04:18 +00:00
Harry Hopkinson ef9840f29b Replace static_cast with EnumValue 2024-03-04 15:37:20 +00:00
Harry Hopkinson 9748038815
Move gExpenditureTable to GameState_t 2024-03-04 15:24:29 +01:00
Duncan 4b6ba80a46
Move cheats to struct in GameState_t 2024-03-03 22:44:15 +01:00
mrmbernardi 4ccecd6e68
Remove forwarding functions in Window.cpp (#21516) 2024-03-03 18:04:09 +01:00
Jan Kelemen bc149ca95c
Move gHistoricalProfit and gGuestsInParkHistory to GameState_t (#21513)
* Move gGuestsInParkHistory to GameState_t

* Move gHistoricalProfit to GameState_t
2024-03-03 16:05:48 +00:00
Matt 85f0919483
Merge pull request #21510 from jan-kelemen/gCashHistory_to_GameState_t
Move gCashHistory to GameState_t
2024-03-03 11:36:31 +02:00
mrmbernardi a0b18688ec
Merge pull request #21460 from mrmbernardi/map-layout
Fix #21289: Map window does not layout properly
2024-03-02 22:52:31 +01:00
Michał Janiszewski a17240544b Release v0.4.9
- Feature: [#20376] Add Ukrainian language.
- Feature: [#20709] [Plugin] Plugins can now check metadata from all registered plugins.
- Feature: [#21376] Add option to reload an object (for object developers).
- Feature: [#21413, OpenSFX#19] Add log flume lift sound effect (when “chainlift” is enabled).
- Feature: [#21455] Add option to control hidden scenery.
- Feature: [objects#282] Added RCT1 beta terrains.
- Improved: [#20093] Use new colours for guests’ clothing when they spawn.
- Improved: [#21356] Resize the title bar when moving between displays with different scaling factors on Windows systems.
- Improved: [#21388] Tooltips will now show even when an error message is present.
- Improved: [#21423] Add mechanism to allow building partly underground.
- Improved: [objects#272, objects#276, objects#277, objects#278, objects#279, objects#280, objects#281] Add most remaining ports of RCT1 ride and vehicle objects (for import only).
- Improved: [objects#275, objects#284, objects#286] Add remaining RCT1 walls (for import only).
- Change: [#21350] Group Dodgems and Flying Saucers vehicles.
- Change: [#21453] Reintroduce lost RCT1 Jet skis colour presets to the boat hire.
- Change: [objects#285] Mark old reversed train objects as compatibility objects.
- Fix: [#17610] Some scenery items are unavailable in RCT1 scenarios.
- Fix: [#18963] Research table in parks from Loopy Landscapes is imported incorrectly.
- Fix: [#20164] Grass and Rock terrain objects cannot be de-selected.
- Fix: [#20907] RCT1/AA scenarios use the 4-across train for the Inverted Roller Coaster.
- Fix: [#21037] Map animations in the title sequence are stuck.
- Fix: [#21208] Error message will stay open only for a brief moment when the game has been running a while.
- Fix: [#21220] When creating a new park from a SC4 file, the localised park name is not applied.
- Fix: [#21286] Cannot build unbanking turns with RCT1 vehicles.
- Fix: [#21288] Text overlaps in the “About ‘OpenRCT2’” window for Arabic, Chinese, Japanese, Korean and Vietnamese.
- Fix: [#21310] Some half loop elements require more clearance than their upward/downward counterparts.
- Fix: [#21318] Virtual Floor for building scenery is not properly invalidated.
- Fix: [#21330] Tooltips from dropdown widgets have the wrong position.
- Fix: [#21332] Mini Helicopters and Monorail Cycles ride types are swapped in research within RCT1 scenarios.
- Fix: [#21343] “Pause” and “Build Path” hotkeys do not work if top toolbar is hidden.
- Fix: [#21347] Too many options are hidden if the platform has no file picker.
- Fix: [#21350] Maze and Mini Golf track designs from RCT1 not shown in track designs list.
- Fix: [#21425] Additional missing/misplaced land & construction rights tiles in Japanese Coastal Reclaim.
- Fix: [#21484] Upkeep costs for some rides/facilities/shops are not calculated correctly.
- Fix: [#21498] Crash when the size of text can’t be determined.
- Fix: [objects#262, objects#263, objects#265, objects#266, objects#267, objects#268, objects#270, objects#271, objects#283] Various errors in expansion pack objects (original bug).
- Fix: [OpenSFX#18] B&M Roar sound effect not looping correctly.
2024-03-02 21:26:41 +01:00
Michał Janiszewski 132d45c9e2
Merge pull request #21491 from ZehMatt/fix-21484
Fix #21484: Upkeep costs for some rides/facilities/shops are not calculated correctly
2024-03-02 21:15:23 +01:00
John Kastner 05c0542d1f
Fix off-by-one error in assertions (#21509)
These should assert that the index in within the bounds of the array, but
it asserts that it is in [0, size] (inclusive). Adjust the assertion so
they fail for an access at `size`.
2024-03-02 17:00:13 -03:00
Jan Kelemen baf3d8fded Move gCashHistory to GameState_t 2024-03-02 20:41:16 +01:00
Michael Bernardi 412ca5d9c5 Correct location of Map window variables
Move local variables to top of class.
Move static constexpr variables to file scope.
2024-03-02 16:05:07 +01:00
Michael Bernardi 1cb0650cba Fix #21289: Map window does not layout properly 2024-03-02 16:00:10 +01:00
ζeh Matt 9bfc3a0a29
Zero initialize some fields in ride station 2024-03-02 15:36:27 +02:00
ζeh Matt 78406f4d67
Bump up network version 2024-03-02 15:36:26 +02:00
ζeh Matt a9870f8148
Fix #21484: Initialize drops to zero when creating a ride 2024-03-02 15:34:58 +02:00
mrmbernardi 54a4cbb1e9
Fix #21037: Animations broken in title sequence 2024-03-02 14:02:03 +01:00
Matt 9a100b82b4
Fix #21498: Crash when the size of text can’t be determined 2024-03-02 13:22:59 +01:00
Michał Janiszewski a2762ed321
Update backtrack submission token 2024-03-02 11:41:04 +01:00
ζeh Matt c9ac9784ed
Fix regression from #21474 due to use-after-free bug 2024-03-02 03:50:27 +02:00
Andrew 5aed126cac
Use new colours for peeps' clothing when they spawn 2024-03-02 02:06:47 +01:00
Michael Steenbeek 8916b3ce9d
Merge pull request #21350 from Gymnasiast/objects-1.4.0
Update to v1.4.0 objects release
2024-03-02 01:46:25 +01:00
Gymnasiast 864f0350ed
Load banner entries from research and the map 2024-03-02 01:33:52 +01:00
Gymnasiast 4d35989888
Normalise reversed RCT1 trains when importing 2024-03-02 01:33:52 +01:00
ZeeMajora a09724ad91
Change vehicle colour import table 2024-03-02 01:33:51 +01:00
ZeeMajora c7a48a37b6
Add OpenRCT2 official scenery to RCT1 scenarios 2024-03-02 01:33:51 +01:00
ZeeMajora 345f9aa27d
Use RCT1 ice cream stall object 2024-03-02 01:33:51 +01:00
Gymnasiast de0c681b80
Remove RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY from some rides
Maze, Mini Golf, Dodgems and Flying Saucers,
2024-03-02 01:33:51 +01:00
Gymnasiast 6506b1d1fa
Fix #17610: Some scenery items unavailable in RCT1 scenarios 2024-03-02 01:33:51 +01:00
Gymnasiast 12c00dedeb
Use RCT1 walls during import
Co-authored-by: ZeeMaji <ZeeMaji@users.noreply.github.com>
Fix wgw2 and restore RCT2 walls
2024-03-02 01:33:51 +01:00
Gymnasiast c1ca8f729f
Use RCT1 trains 2024-03-02 01:33:51 +01:00
Gymnasiast c2ed24b183
Make RCT1::VehicleType a strong enum 2024-03-02 01:33:51 +01:00
Katherine Norton 534ba4f339
Fix #20164: Grass and Rock terrain objects cannot be de-selected (#21399) 2024-03-01 21:33:45 -03:00
Harry Hopkinson bb743f0c88
Fix: pause and build path hotkeys not working when the toolbar is hidden
Part of #21175.
2024-03-01 23:49:26 +01:00
AuraSpecs a3659b7ca4
Add log flume lift sound effect (when “chainlift” is enabled) 2024-03-01 21:01:50 +00:00
Harry Hopkinson 701bbda164
Move gEditorStep to GameState_t (#21492)
* Move gEditorStep to GameState_t

* Fix compilation on GCC

---------

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2024-03-01 20:26:20 +00:00
Harry Hopkinson 14f0479c94
Refactor constants/macros (#21483)
* Refactor constants in AudioMixer.h

* Refactor constants in Map.h

* Rename kMinimumLandHeight_BIG to kMinimumLandZ
2024-03-01 20:23:29 +00:00
Aaron van Geffen a79b062136
Refactor FormatCodes stringification 2024-03-01 19:47:23 +01:00
Harry Hopkinson 42844d1667
Move gCurrentProfit to GameState_t (#21485) 2024-03-01 05:47:30 -03:00
Aaron van Geffen 4976d65fc3
Enable commented-out designated initialisers (#21479)
* Start using designated initialisers

* Adhere to correct order for DrawPixelInfo

* Of course gcc is stricter than clang...
2024-02-29 07:00:46 +00:00
Michael Steenbeek aa804a19ff
Replace SET_FIELD() macro with designated initialisers 2024-02-28 23:14:59 +01:00
Michael Steenbeek 01bc8cdb5e
Merge pull request #21468 from AaronVanGeffen/cpp20
Compile project as C++20
2024-02-28 22:28:36 +01:00
Michael Steenbeek 25ec1e4211
Create game actions and UI for restricted scenery 2024-02-28 20:38:43 +01:00
Aaron van Geffen 2d52f5b982 Play footpath placement sound even if footpath window is absent 2024-02-27 22:26:43 +01:00
Aaron van Geffen 6edcd6d7a0 Avoid implicit capture of `this` in Footpath window 2024-02-27 22:16:06 +01:00
Harry Hopkinson 063c4f7bce
Move gCurrentExpenditure to GameState_t 2024-02-27 22:03:40 +01:00
Harry Hopkinson 57a4c83f80
Move gConstructionRightsPrice to GameState_t (#21467)
* Move gConstructionRightsPrice to GameState_t

* Add OpenRCT2 namespace
2024-02-27 20:20:11 +00:00
Michał Janiszewski b2639add4c
CI: use docker images v13 (#21470)
This release updates mingw and android images, also comes with
clang-tidy preinstalled
2024-02-27 20:04:33 +00:00
Aaron van Geffen 989a4dddbd Mark ObjectLoadError::DownloadStatusInfo comparisons const 2024-02-27 17:22:25 +01:00
Aaron van Geffen da0bbb2019 Mark GuestList::FilterArguments comparisons const 2024-02-27 17:20:05 +01:00
Aaron van Geffen ffcb2b8c82 Fix or-ing different enumeration types warning 2024-02-27 16:55:53 +01:00
Gymnasiast f98157d4f1
Move _restrictedScenery to GameState_t 2024-02-27 16:34:26 +01:00
Gymnasiast 53b68f23fa
Move _tileElements to GameState_t 2024-02-27 16:34:26 +01:00
Gymnasiast 37a224e9b3
Move _rides to GameState_t 2024-02-27 16:34:25 +01:00
Harry Hopkinson 70ea832808
Move gCompanyValue to GameState_t 2024-02-27 16:31:38 +01:00
Aaron van Geffen 530ec9a6f7 Remove never-set COLOUR_FLAG_8 constant
The definition is also outside the boundaries of a uint8_t, so its existence is a bit odd.
2024-02-27 15:38:51 +01:00
Stephan Spengler bcff6f5a7e
Update ScTileElement.cpp: fix typos (#21463) 2024-02-26 18:10:47 -03:00
Gymnasiast 554968383c
Move global window indices to constexpr 2024-02-25 22:54:54 +01:00
Michał Janiszewski f5cd5bc15b
Merge pull request #21444 from janisozaur/android-updates
Update Android libraries
2024-02-25 22:34:23 +01:00
Harry Hopkinson 0fab1eaca8
Move gSavedView states to GameState_t (#21456)
* Move gSavedView to GameState_t

* Move gSavedViewRotation to GameState_t

* Move gSavedViewZoom to GameState_t
2024-02-25 20:46:01 +00:00
Gymnasiast d1b1e42643
Refactor defines in LandTool.h 2024-02-25 17:06:48 +01:00
Gymnasiast 6c25b79139
Refactor defines in Intro.cpp 2024-02-25 17:06:48 +01:00
Gymnasiast 8d478e78a5
Refactor FILE_TYPE_S4_CUTOFF to kFileTypeS4Cutoff 2024-02-25 17:06:48 +01:00
ZeeMaji 47a221de4e
Reintroduce lost RCT1 Jet ski color presets to boat hire (#21453) 2024-02-25 09:32:43 -03:00
HtotheTML 90ad01bc40
Fix additional park boundary errors in Japanese Coastal Reclaim (#21425) 2024-02-25 06:33:44 -03:00
Michael Steenbeek 3beeca3fe3
Merge pull request #21438 from ZehMatt/pathfinding-update-2
More refactoring around path finding
2024-02-24 23:57:54 +01:00
Julian 142c078ad1
Fix some include directives for POSIX 2024-02-24 23:56:02 +01:00
Michał Janiszewski a9f26c804a Update android libraries URL 2024-02-24 23:06:52 +01:00
Michał Janiszewski a37e83b63c Remove crypto from android libraries for now 2024-02-24 23:05:43 +01:00