1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00
Commit Graph

25678 Commits

Author SHA1 Message Date
AuraSpecs
d11a82aa4f Add Ukrainian Language
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2024-02-23 20:37:48 +01:00
Matt
325a3db436 Merge pull request #21311 from zzril/fix-clearance
Fix #21310: Clearance on half loop elements is not symmetrical
2024-02-23 18:49:24 +02:00
OpenRCT2 git bot
eceea5a034 Merge Localisation/master into OpenRCT2/develop 2024-02-23 04:01:41 +00:00
Matt
9d9f0af0cd Pathfinding cleanup (#21407)
* Eliminate unnecessary abstraction for path finding

* Pass the goal to ChooseDirection instead of using globals

* Remove gPeepPathFindGoalPosition and pass it by parameter instead

* Remove _peepPathFindIsStaff and make ignoring banners explicit

* Code style and naming fixups

* Apply clang-format

* Add comment specifying to why it does not ignore banners

* Apply review comments
2024-02-22 21:52:01 +02:00
Severin Paul Höfer
3b8de13af9 Update changelog.txt 2024-02-21 17:23:45 +01:00
Severin Paul Höfer
e1631afe48 Make small Flyer half loops symmetrical 2024-02-21 17:23:45 +01:00
Severin Paul Höfer
99dfbc2661 Make ClearanceZ on small half loops symmetrical
Values now consistent to those in the small full loops.
2024-02-21 17:23:45 +01:00
Severin Paul Höfer
0ff998a071 Make ClearanceZ on Flying half loops symmetrical 2024-02-21 17:23:45 +01:00
Severin Paul Höfer
133c8a1068 Fix ClearanceZ for large half loops down 2024-02-21 17:23:45 +01:00
Severin Paul Höfer
1ce1d1b04e Add comments to PreviewTrack definitions 2024-02-21 17:23:45 +01:00
Severin Paul Höfer
aefc07c9c5 Rename var_07 to ClearanceZ in struct PreviewTrack 2024-02-21 17:23:45 +01:00
Matt
fdbdbd405f Merge pull request #21408 from ZehMatt/clang-tidy
Add clang-tidy CI step
2024-02-21 12:50:44 +02:00
ζeh Matt
3b0ff5dcc8 clang-tidy CI integration 2024-02-21 09:49:15 +02:00
OpenRCT2 git bot
6b134a05c3 Merge Localisation/master into OpenRCT2/develop 2024-02-21 04:01:40 +00:00
Michael Steenbeek
045d610391 Merge pull request #21433 from Gymnasiast/refactor/split-supports.cpp
Split Supports.{cpp,h} into two and refactor the wooden supports
2024-02-20 23:42:37 +01:00
Michael Steenbeek
724ab47a37 Merge pull request #21423 from Gymnasiast/feature/partly-above-ground
Add mechanism to allow building partly underground
2024-02-20 21:44:46 +01:00
Harry Hopkinson
b989ccbb20 Remove unused gSavedAge (#21410)
* Remove the unused SavedAge variable.
2024-02-20 16:58:46 -03:00
Gymnasiast
276b599470 Add changelog entry, bump network version 2024-02-20 19:15:37 +01:00
Gymnasiast
c2f2058fa0 Allow building heartline rolls partly underground 2024-02-20 19:14:02 +01:00
Gymnasiast
731275613a Create flag to allow building track segment partly underground 2024-02-20 19:14:01 +01:00
Harry Hopkinson
d8864e567c Close #21379: Move map base z to constant 2024-02-20 11:49:02 +01:00
OpenRCT2 git bot
5fef6d364d Merge Localisation/master into OpenRCT2/develop 2024-02-20 04:01:37 +00:00
Peter Froud
40a7fa70fc Fix empty error messages (#21351)
* Add `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE`

* Add `STR_ERR_TRACK_ON_THIS_TILE_NEEDS_WATER`

* Return existing `GameAction::Result`

* Add `STR_ERR_ACTION_INVALID_FOR_THAT_STAFF_TYPE`

I am open to suggestions for a different message!
Originally this was going to be STR_ERR_WRONG_STAFF_TYPE
but I thought that was confusing because the game
action arguments do not specify a staff type. We
want it to mean "the staff ID you specified is the
wrong StaffType for this game action".

* Refactor `StaffSetColour()` to return `Result`

* Remove unnecessary arguments when `Status` is `Ok`

* Refactor `SwapTileElements()` to return `Result`

Also add STR_ERR_CANT_SWAP_TILE_ELEMENT_WITH_ITSELF

* Format code

* Use `STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE` in title

* Format code using Github web editor

* Format indentation
2024-02-19 20:58:04 -03:00
Gymnasiast
1ed22ff58c Remove now-obsolete NumVanillaWoodenSupportTypes 2024-02-19 23:26:07 +01:00
Gymnasiast
6e3ed12f13 Refactor other fields of UnkSupportsDescriptor 2024-02-19 23:23:12 +01:00
Gymnasiast
38cfa4045d Remove UnkSupportsDescriptor::var_7 2024-02-19 23:17:03 +01:00
Gymnasiast
b482897cd8 Refactor out old support offsets 2024-02-19 23:14:03 +01:00
Gymnasiast
5e31e73d53 Refactor some usage of old support values 2024-02-19 22:15:31 +01:00
Gymnasiast
32c04305f2 Remove old wooden supports overloads 2024-02-19 22:05:36 +01:00
Gymnasiast
849af8c2d8 Split Supports.{cpp,h} into two 2024-02-19 21:59:59 +01:00
Matt
1042c428e8 Merge pull request #21429 from Martymoose98/refactor
Move gBankLoan and gBankLoanInterestRate to GameState_t
2024-02-19 17:26:37 +02:00
Martin
2f0dea0243 Merge branch 'OpenRCT2:develop' into refactor 2024-02-19 04:50:22 -05:00
Martin Mizzi
f5a9846ea2 Move gBankLoan and gBankLoanInterestRate to GameState_t 2024-02-19 04:42:44 -05:00
Romain
a3ce64c009 Add launchable to appdata 2024-02-19 07:37:46 +01:00
OpenRCT2 git bot
a0933c7020 Merge Localisation/master into OpenRCT2/develop 2024-02-19 04:01:38 +00:00
OpenRCT2 git bot
7f59e20926 Merge Localisation/master into OpenRCT2/develop 2024-02-18 04:01:35 +00:00
Ota
e9b214282d Fix #21039: Text rendering bleeds pixels through windows
Should fix [#21039 ](https://github.com/OpenRCT2/OpenRCT2/issues/21039).

As it is explained in the issue, the outline and inset code would not respect the DPI bounds in the drawing process by accessing e.g. `*(dst + 1)` to draw an outline, in this case to the right.
#### Approach
I approached this issue by creating a function `GetPixel()`  in `TTFSurface` that would return a value if the given x and y coordinates is a part of a TTF text, else 0. 

In the for loop, iterating through the TTF text, the if condition
```
if (surface->GetPixel(xx + srcX_start + 1, yy + srcY_start)
                        || surface->GetPixel(xx + srcX_start - 1, yy + srcY_start)
                        || surface->GetPixel(xx + srcX_start, yy + srcY_start + 1)
                        || surface->GetPixel(xx + srcX_start, yy + srcY_start - 1))
```
checks if the coordinates **(xx, yy)** is an outline of a text. the writing bounds. Adding `srcX_start`, which is 0 or `-skipX` if `skipX < 0`, when calling `GetPixel()`, would shift the pixel access to the correct position, where the text begins on the surface. The same is done for the Y axis. (Not having this would lead to the outlines/insets not moving with the text when the window with the TTF text moves)
2024-02-17 23:31:07 +01:00
Michael Steenbeek
ecbc523229 Merge pull request #21412 from Gymnasiast/refactor-even-more-wooden-supports
Refactor even more wooden supports
2024-02-17 22:39:51 +01:00
Gymnasiast
accfa1af61 Add WoodenSupportType::Null, replace std::nullopt with it 2024-02-17 22:26:15 +01:00
Gymnasiast
b254501b25 Refactor calls to old WoodenASupportsPaintSetupRotated() 2024-02-17 22:26:15 +01:00
Alex Parisi
efb6d48c4c Add plugin API to get registered plugin metadata (#20709)
* Added API for getAllPlugins

Added functionality to the Scripting API to allow Contexts to return a list of all registered plugins.

* Fixed naming conventions, returning list of authors

Changed function names to follow get/set convention. Removed unnecessary copies of shared pointers, now using auto instead. Changed the functionality to return an array of authors instead of a string.

* Added changelog entry

Also added myself to list of contributors

* Moved all functionality to ScPlugin

Created a ScPlugin class and moved the current getPlugins functionality there.

* Changed from method to property

Function names now match the get/set convention for properties. Also did some code cleanup.

* Update copyright

* Bump plugin version

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-02-16 05:53:48 -03:00
OpenRCT2 git bot
04603f5213 Merge Localisation/master into OpenRCT2/develop 2024-02-16 04:01:41 +00:00
Matt
d929e6a540 Allow tooltips to show up when an error window is present 2024-02-15 13:32:58 +01:00
Michael Steenbeek
1613658647 Merge pull request #21401 from Gymnasiast/refactor/track-design-save-cpp
Small cleanup in TrackDesignSave.cpp
2024-02-15 13:32:21 +01:00
Matt
d25a2e7b05 Merge pull request #21403 from Harry-Hopkinson/gNewsItems-to-GameState
Move gNewsItems to GameState
2024-02-15 09:04:16 +02:00
OpenRCT2 git bot
cb2bca7c7a Merge Localisation/master into OpenRCT2/develop 2024-02-15 04:01:47 +00:00
Harry-Hopkinson
43f13ff36c Format code 2024-02-14 14:13:17 +00:00
Harry-Hopkinson
0a8f1154ad Add OpenRCT2 as namespace. 2024-02-14 14:10:08 +00:00
Harry Hopkinson
691f5f88e5 Move gNewsItems to GameState 2024-02-14 10:54:15 +00:00
OpenRCT2 git bot
2d0a04ada9 Merge Localisation/master into OpenRCT2/develop 2024-02-14 04:01:42 +00:00