Commit Graph

20395 Commits

Author SHA1 Message Date
Harry Hopkinson 613d60b446
Refactor more constants in TrackPaint.h (#21942) 2024-05-09 06:41:47 -03:00
Aaron van Geffen 47d0996b4f
Merge pull request #21981 from AaronVanGeffen/map-window
Rework map window to take map size into account
2024-05-09 10:54:22 +02:00
Aaron van Geffen 81e068c7b2
Merge pull request #21990 from AaronVanGeffen/config-include
Remove Config.h include (and therefore Drawing.h) from many places
2024-05-09 00:00:42 +02:00
Aaron van Geffen a61a561d01 Remove Currency.h include from Localisation.h 2024-05-08 23:41:42 +02:00
Aaron van Geffen a627cf7a1e Remove Drawing.h include from Config.h 2024-05-08 23:18:53 +02:00
Aaron van Geffen ca6f142a97 Remove Config.h include from many places 2024-05-08 22:29:32 +02:00
Aaron van Geffen 8dd22e90b4 Offset small maps to centre of scrollview 2024-05-08 17:40:28 +02:00
Aaron van Geffen 58aa5e0106 Limit map window dimensions based on map size 2024-05-08 16:36:48 +02:00
Aaron van Geffen 779e65d8b2 GameBottomToolbar: use constants for balloon/umbrella/hat sprites 2024-05-07 23:00:46 +02:00
Aaron van Geffen 73c592b137 Guest window: use constants for balloon/umbrella/hat sprites 2024-05-07 23:00:36 +02:00
Aaron van Geffen aeef004710 Prevent map corners from being cut off (original bug) 2024-05-07 13:56:06 +02:00
Aaron van Geffen 0d3c9909b6 Map window: rework to use current map sizes 2024-05-07 13:50:44 +02:00
Michał Janiszewski 11510a0e0b
Guard against possible nullptr dereference when prefetching BBox (#21978) 2024-05-07 06:21:27 +02:00
Michał Janiszewski a611244b31
Fix #21976: Add algorithm include to fix gcc14 compile (#21977)
Co-authored-by: H3o66 <chris.h3o66@gmail.com>
2024-05-06 20:40:36 +00:00
Aaron van Geffen d6ce62e74f
JSON: allow/ignore comments in parser 2024-05-06 16:15:00 +02:00
Aaron van Geffen 893392d987
Scripting: allow precise and safe control of peep animations 2024-05-05 21:09:41 +00:00
Michael Steenbeek bf74dfba7b
Merge pull request #21965 from AaronVanGeffen/fix-cli-editor
Fix loading editor from command line
2024-05-05 22:42:24 +02:00
Aaron van Geffen 831c7651bb
Scripting: tailor costume assignment to each staff type
In order to transition staff costumes to objects, we must further disentangle staff from regular peeps. This has many advantages, such as making custom entertainers or even handymen costumes. However, this means putting some restrictions on what costumes can be assigned to staff in the mean while.

We are aware of plug-ins allowing staff to be decorated like normal peeps, though, e.g. using @Manticore-007's Peep Editor. Splitting staff from peeps will mean breaking such functionality. We can do our very best to reverting 'invalid' staff to their normal outfits instead of them outright disappearing. However, in the mean time, we should disallow peep costumes from being assigned to staff to prevent further disappointment down the line.

Once we get to actually adding custom staff costumes, I plan to add a new plug-in API to get available costumes for a particular staff type. This would apply to entertainers, but also other staff types. This should make it easier for plug-in authors to tap into custom costumes in the future.
2024-05-05 22:41:52 +02:00
Michael Steenbeek 46b356047c
Merge pull request #21889 from Gymnasiast/refactor/segments
Refactor blocked segments
2024-05-05 21:54:34 +02:00
Michał Janiszewski 18d2b5ef6e Release v0.4.11
- Feature: [#11512] Coloured usernames by group on multiplayer servers.
- Feature: [#21734] Park admittance price can now be set via text input.
- Feature: [#21957] [Plugin] Expose whether the game is paused to the plugin API.
- Improved: [#21728] “Fix all rides” cheat now also works if a mechanic is already fixing the ride.
- Improved: [#21769] Expose “animation is backwards” wall property in Tile Inspector.
- Improved: [#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting.
- Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible.
- Change: [#21855] Cheats menu dropdown no longer requires dragging.
- Change: [#21866] Hide the FPS Counter when the top toolbar/widgets have been toggled off.
- Change: [#21950] Construction and removal buttons can now be held down for repeated placement.
- Fix: [#866] Boat Hire boats get stuck entering track (original bug).
- Fix: [#10701] No reason specified when placing door over unsuitable track.
- Fix: [#18723, #21870] Attempting to demolish a flat ride in pause mode allows you to place multiple copies.
- Fix: [#19559] Custom rides with long descriptions extend into lower widgets.
- Fix: [#21696] Fullscreen window option not correctly applied on macOS.
- Fix: [#21749] Crash when loading park bigger than current limits.
- Fix: [#21787] Map generator heightmap should respect increased height limits.
- Fix: [#21829] When creating a new scenario, the default name contains formatting codes.
- Fix: [#21937] Build errors with the ORIGINAL_RATINGS flag.
- Fix: [objects#324] Cannot build Colosseum inside a turn or helix.
- Fix: [objects#325] Sloped castle walls are vertically offset by one pixel (original bug).
2024-05-05 20:01:29 +02:00
Michał Janiszewski 80ee864f37
Update backtrace.io token for upcoming release 2024-05-05 19:47:35 +02:00
Aaron van Geffen fa90a84d22
Make construction and removal buttons holdable (#21950)
* Footpath: make construction button holdable

* RideConstruction: make construction button holdable

* Allow repeated removal as well

* Amend changelog
2024-05-05 11:38:49 +00:00
mrmbernardi 489ae58c5c
Close #21825: Only lock OpenGL texture cache when using multi-threading (#21952)
Fixes #21825 by making 'DrawingLocks' which lock only if multi threaded drawing is enabled. Refactors TTF.cpp to use this.

Also cleans up some header files, modernises constants, and removes code to avoid using shared_mutex on MacOS builds. This was originally added because older versions of MacOS didn't support this in the STL.
2024-05-05 10:54:50 +00:00
Harry Hopkinson bbc5a109ef
Close #20157: Hide FPS Counter if top toolbar is hidden 2024-05-05 00:16:23 +02:00
Aaron van Geffen c92d3bf018 Fix loading editor from command line 2024-05-03 19:31:06 +02:00
Aaron van Geffen 770277ab95 Refactor Context::DetermineStartUpScene into its own method 2024-05-03 19:30:58 +02:00
Katherine Norton cd528665e6
Expose whether the game is paused to the plugin API 2024-05-03 15:59:57 +00:00
Mathias Gibbens accbd799ee
Fix GGC 12 compile error
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
2024-05-03 16:05:57 +02:00
Gymnasiast 5319c0e8bd
Use TrackPaintUtilDiagTilesPaint() for broken drawers 2024-05-02 20:56:52 +02:00
Gymnasiast 3641e78341
Remove parameter from TrackPaintUtilDiagTilesPaint() 2024-05-02 20:42:12 +02:00
Michał Janiszewski a088f7615b
Fix #21748: TileElement out of bounds (#21749)
* Fix #21748: TileElement out of bounds

This fixes crashes observed and allows the park to load. The park is
overlarge and breaks some assumptions we have in our code.

* Use ternaries for checking conditions
2024-05-02 18:14:22 +02:00
Gymnasiast 332ba3244e
Consolidate segment+support calls for diagonal straight flat pieces 2024-05-02 18:12:53 +02:00
Gymnasiast dfd958b855
Fix Metal{A,B}SupportsPaintSetupRotated() to rotate type 2024-05-02 18:12:52 +02:00
Gymnasiast 369996809c
Add PaintSegment header, add constant for straight flat track 2024-05-02 18:12:51 +02:00
Michał Janiszewski 4e8f578075
Update Steam path detection for Linux (#21948)
* Update Steam path detection for Linux

As Steam now uses Proton to install Windows version natively, update
paths so they get found automatically

* Use new Steam path detection on Linux only

This restores Steam path detection on macOS as it doesn't have Proton
2024-05-02 15:05:22 +02:00
Aaron van Geffen 17920b6039
Script: when changing staff type, reset state to walking
Reset state to walking to prevent invalid actions from carrying over
2024-05-01 23:10:25 +02:00
Michał Janiszewski 7b12667ddb
Reduce `<algorithm>` include (#21947) 2024-05-01 13:47:27 +02:00
Aaron van Geffen 8973e35ba1
Stabilize scenario and track editors\ 2024-05-01 12:34:10 +02:00
Michał Janiszewski ad79699b21
Reduce transient inclusion of `<future>` (#21944) 2024-05-01 12:27:51 +02:00
Matt 409da62fe8
Merge pull request #21924 from Harry-Hopkinson/refactor-constants-TrackPaint.h
Refactor constants in TrackPaint.cpp
2024-04-30 16:51:18 +03:00
Big-Blue-1 e31bebbedf
Fix build errors with the ORIGINAL_RATINGS flag (#21937) 2024-04-30 10:15:11 -03:00
Michael Steenbeek 921860729b
Merge pull request #21850 from Gymnasiast/backport/brake-stuff
Small backport of changes for #15314
2024-04-30 13:57:37 +02:00
Harry-Hopkinson dda8c3ecb2 Rename DiagBlockedSegments to kDiagBlockedSegments 2024-04-30 11:54:05 +00:00
Michael Steenbeek 44c442f832
Fix #21870: Demolishing flat ride in pause mode allows copies 2024-04-30 13:50:04 +02:00
Gymnasiast 938f3cd783
Bump network version 2024-04-30 13:41:24 +02:00
Gymnasiast 00618c79d2
Rename _currentBrakeSpeed2 to _currentBrakeSpeed 2024-04-30 13:39:49 +02:00
Gymnasiast 22e7ad598b
Default-initialise all fields of RideTypeDescriptor 2024-04-30 13:39:49 +02:00
Gymnasiast dbbfc2f1d1
Create kMaximumBrakeSpeed 2024-04-30 13:39:49 +02:00
Michael Steenbeek 575cd756b3
Merge pull request #21930 from AaronVanGeffen/move-palette
Move remap palette internally
2024-04-29 22:55:15 +02:00
Aaron van Geffen 95239d75c9 Move UpdatePaletteEffects to Drawing.cpp 2024-04-29 18:14:09 +02:00
Aaron van Geffen 66cb4a1d81 Mark GlassPaletteIds static constexpr 2024-04-29 18:05:25 +02:00
Aaron van Geffen 25faa361ad Rename to secondaryRemapPalette, tertiaryRemapPalette 2024-04-29 18:04:17 +02:00
Aaron van Geffen dcc1a0627d Move gPeepPalette, gOtherPalette to Drawing.Sprite.cpp 2024-04-29 18:01:39 +02:00
duncanspumpkin f6c34ddd59
Simplify map flashing flags and move into map 2024-04-29 14:10:53 +02:00
duncanspumpkin 4810a72232
Move a number of ui only updates into UiContext tick 2024-04-29 14:10:52 +02:00
Gymnasiast de0ca4ded4
No reason specified when placing door off edge of map 2024-04-28 22:53:01 +02:00
Gymnasiast 6335906d03
Fix #10701: No explanation when placing door over unsuitable track 2024-04-28 22:53:01 +02:00
JDCustard fe6da02718
Close #21728: Apply "Fix all rides" even if mechanic is already working
Added checks for mechanic fixing plus handles inspecting and calling.
2024-04-28 22:07:07 +02:00
Michael Steenbeek 21001be23d
Merge pull request #21922 from AaronVanGeffen/peep-refactor
Peep: split off UpdateWalkingAction, ThrowUp from UpdateAction
2024-04-28 21:45:24 +02:00
Aaron van Geffen 2d74287b4b Guard for nullptr 2024-04-28 20:03:16 +02:00
Harry-Hopkinson 52ad6861af Rename track_map_1x4 to kTrackMap1x4 2024-04-28 14:33:41 +00:00
Harry-Hopkinson d6efe4cd53 Rename edges_4x4 to kEdges4x4 2024-04-28 14:31:29 +00:00
Harry-Hopkinson b9003d6e60 Rename track_map_4x4 to kTrackMap4x4 2024-04-28 14:26:12 +00:00
Harry-Hopkinson 8eebcc5486 Rename edges_3x3 to kEdges3x3 2024-04-28 14:19:19 +00:00
Harry-Hopkinson a3e685bf1f Rename track_map_3x3 to kTrackMap3x3 2024-04-28 14:14:58 +00:00
Harry-Hopkinson 97e9634a61 Rename edges_2x2 to kEdges2x2 2024-04-28 14:08:02 +00:00
Harry-Hopkinson b795d4ba8a Rename track_map_2x2 to kTrackMap2x2 2024-04-28 14:04:26 +00:00
Aaron van Geffen f5f31496db Peep: split off UpdateWalkingAction, ThrowUp from UpdateAction 2024-04-28 15:57:50 +02:00
Aaron van Geffen d35d08e86a Use named constants in Peep::Paint 2024-04-28 14:40:19 +02:00
Harry Hopkinson 9266a6f0d3
Remove duplicate sprite_map in TrackPaint.cpp 2024-04-27 21:13:22 +02:00
Aaron van Geffen 56cbc0eb8a Refactor intro into IntroScene 2024-04-26 20:35:16 +02:00
Aaron van Geffen 255e89ec37 Refactor TitleScreen to TitleScene; introduce GameScene
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2024-04-23 21:31:05 +02:00
Aaron van Geffen 49b75e6606 Introduce Scene class and handling
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2024-04-23 20:42:16 +02:00
Michael Steenbeek be9f1a2072
Merge pull request #21711 from AaronVanGeffen/peep-data
Refactor peep animation data
2024-04-26 20:06:31 +02:00
Harry-Hopkinson 74513374d1 Rename MAX_SERVER_DESCRIPTION_LENGTH to kMaxServerDescriptionLength 2024-04-26 17:56:20 +01:00
Harry-Hopkinson 7aed4d18f2 Rename NETWORK_LAN_BROADCAST_MSG to kNetworkLanBroadcastMsg 2024-04-26 17:55:23 +01:00
Harry-Hopkinson 82c31b80d4 Rename NETWORK_LAN_BROADCAST_PORT to kNetworkLanBroadcastPort 2024-04-26 17:55:23 +01:00
Harry-Hopkinson 5ef115941d Rename NETWORK_DEFAULT_PORT to kNetworkDefaultPort 2024-04-26 17:55:23 +01:00
Harry-Hopkinson ef7d7575de Rename PALETTE_TOTAL_OFFSETS to kPaletteTotalOffsets 2024-04-26 17:55:23 +01:00
Harry-Hopkinson 8ce6ba7606 Rename WINDOW_LIMIT_RESERVED to kWindowLimitReserved 2024-04-26 17:55:23 +01:00
Harry-Hopkinson 9e2b45fab3 Rename WINDOW_LIMIT_MAX to kWindowLimitMax 2024-04-26 17:55:23 +01:00
Harry-Hopkinson 343b10c172 Rename WINDOW_LIMIT_MIN to kWindowLimitMin 2024-04-26 17:55:23 +01:00
duncanspumpkin 34fa06cd29
Address review comments 2024-04-26 18:27:15 +02:00
duncanspumpkin c8a5af02a5
Fix formatting 2024-04-26 18:27:15 +02:00
duncanspumpkin 788878e7fc
Add missing statics 2024-04-26 18:27:15 +02:00
duncanspumpkin bd3ae5cbb9
Simplify setting existing text 2024-04-26 18:27:14 +02:00
duncanspumpkin 3448926251
Move text input widget code from game lib to ui lib 2024-04-26 18:25:44 +02:00
mrmbernardi f4cebb11df
Speed up TerrainSurfaceObject::GetImageId() 2024-04-26 09:52:19 +02:00
Gustav Burkhardt 5837a33a60
Part of #21421: rename MAX_VIEWPORT_COUNT to kMaxViewportCount 2024-04-26 09:11:19 +02:00
Michael Steenbeek af46ff5f0a
Merge pull request #21855 from Gymnasiast/fix/small-usability
Small usability fixes
2024-04-25 16:25:12 +02:00
Michał Janiszewski 49b28f1757
Prefetch paint struct bounds (#21894)
With restored `benchspritesort` this yields around 5% better results.
2024-04-25 14:14:17 +00:00
Gymnasiast 8beb50da61
Add a separator between “Load Game” and “Save Game” 2024-04-25 15:27:04 +02:00
Gymnasiast a00f478104
Create TopToolbar::InitFileMenu() 2024-04-25 15:27:04 +02:00
Gymnasiast 9e236d1b5a
Fix #19559: Vehicle descriptions spill over into preview 2024-04-25 15:27:04 +02:00
Gymnasiast 4db5d62476
Add methods to move a widget 2024-04-25 14:10:07 +02:00
Gymnasiast 9906a18bc7
Cheats menu: do not autoclose 2024-04-25 14:10:07 +02:00
Kaavya Ramachandhran 1b4defbae9
Fix #21696: Fullscreen window option not correctly applied on macOS 2024-04-23 23:20:16 +02:00
Aaron van Geffen ddc386b186
Refactor Context constructor 2024-04-23 19:52:52 +02:00
Aaron van Geffen 17af7db195 Force sprite update after invoking Staff::SetCostume 2024-04-21 22:54:10 +02:00
Aaron van Geffen 2799d96145 Rename PeepData to PeepAnimationData 2024-04-21 22:54:10 +02:00