Commit Graph

587 Commits

Author SHA1 Message Date
Aaron van Geffen 539bb5487e Introduce context functions and intents for progress window 2024-05-20 16:28:00 +02:00
Aaron van Geffen 2ff3295587 Report FileIndex index progress to Context
Progress is passed on to PreloaderScene and NetworkInfo window from there.
2024-05-06 14:26:00 +00:00
Aaron van Geffen 7c4be9ce92 Introduce PreloaderScene for game initialisation
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2024-04-24 18:31:00 +02:00
Aaron van Geffen 69c5e6ad9e Move money types into Money.hpp 2024-05-14 16:35:00 +02:00
Aaron van Geffen 9a4aa4bb94 Move fixed point types to FixedPoint.hpp 2024-05-14 16:25:52 +02:00
Aaron van Geffen 308219d32e
Move speed literal _mph to Speed.hpp (#22033) 2024-05-14 17:04:49 +00:00
Michał Janiszewski 3c35558f3f
Fix compilation on Arch Linux with GCC 14 (#22031)
Fixes #22029
2024-05-13 22:09:00 +00: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 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
Michał Janiszewski 7b12667ddb
Reduce `<algorithm>` include (#21947) 2024-05-01 13:47:27 +02:00
Michał Janiszewski 221877fa33 Android: Replace curl dependency with HttpAndroid Java implementation 2024-03-18 12:18:20 +01:00
Michael Steenbeek d2e7d57104
Close #21536: Replace ATOMIC_VAR_INIT() macro with constructor 2024-03-14 22:34:54 +01: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
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
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 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
Aaron van Geffen a79b062136
Refactor FormatCodes stringification 2024-03-01 19:47:23 +01:00
Julian 142c078ad1
Fix some include directives for POSIX 2024-02-24 23:56:02 +01:00
Michael Steenbeek 32aa3f56b4
Move gScenarioRand to GameState_t 2024-01-26 09:19:45 +01:00
Michael Steenbeek ba585f4474
Merge pull request #21085 from Gymnasiast/refactor/td-entrance-elements-2
TrackDesign: Refactor entrances and constants
2024-01-06 11:43:26 +01:00
Michał Janiszewski 296e8cdb16
Merge pull request #21140 from ConiKost/musl
* src/openrct2/core/FileStream.cpp: drop ftello64, fseeko64

The static usage definition of ftello64 and friends is not correct.
While this currently works on glibc, this breaks on musl, as musl
already is LFS aware. The solution is to drop this and add instead
'-D_FILE_OFFSET_BITS=64' to the build system.

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

* CMakeLists.txt: add D_FILE_OFFSET_BITS=64

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
2024-01-04 22:03:44 +01:00
Gymnasiast 01fc353cc8
Refactor in-memory track design entrance 2024-01-03 21:12:53 +01:00
Conrad Kostecki 010c19ba61
src/openrct2/core/FileStream.cpp: drop ftello64, fseeko64
The static usage definition of ftello64 and friends is not correct.
While this currently works on glibc, this breaks on musl, as musl
already is LFS aware. The solution is to drop this and add instead
'-D_FILE_OFFSET_BITS=64' to the build system.

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
2024-01-01 20:47:06 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Michael Steenbeek baf88ef490
Refactor in-memory track design element (#21010) 2023-12-02 14:43:03 -03:00
Kostadin 11c46987ae
Add #include <algorithm> to fix building with gcc 14 (#20981)
With gcc 14 some C++ Standard Library headers have been changed to no
longer include other headers that were used internally by the library.
In OpenRCT2's case it is the <algorithm> header.

Downstream Gentoo bug: https://bugs.gentoo.org/917016

GCC 14 porting guide: https://gcc.gnu.org/gcc-14/porting_to.html#header-dep-changes

Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
2023-11-16 21:26:05 +01:00
mrmbernardi e914ffedaf
Fix #20944: Add cstdint to EnumMap and EntryList (#20945) 2023-11-04 19:55:35 +00:00
Silent 6bc6b63ed4
Fix #18199: Dots in the game save's name get truncated (#20691) 2023-10-11 21:45:43 +01:00
mrmbernardi b5f7d4ee2c
Fix #20607: Unicode string not limited properly (#20623) 2023-07-18 21:10:35 +01:00
ζeh Matt 687fbef025
Use u8string and u8string_view types 2023-07-06 01:25:27 +03:00
ζeh Matt 38c57251b3
Fix code formatting 2023-07-06 00:58:22 +03:00
ζeh Matt b011b8085d
Move IEquals to String.cpp and cleanup the implementation 2023-07-06 00:41:59 +03:00
ζeh Matt 3d5e6ea932
Replace Equals with IEquals where appropriate 2023-07-05 23:14:05 +03:00
Michael Bernardi 055a532571 Fix #19822: Banners can now be copy-pasted from the tile inspector 2023-07-02 21:35:09 +02:00
Matthias Moninger 3ef6003671
Replace openrct2_assert with Guard::Assert, remove openrct2_assert 2023-07-02 16:42:46 +02:00
Matthias Moninger 379287ed0f
Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
Aaron van Geffen 627fcec7e9 Revert change in BitSet 2023-06-24 13:25:33 +02:00
Aaron van Geffen d425e0a8bb Remove const qualifier from constexpr statements 2023-06-24 11:45:26 +02:00
Silent c4b70358c8
More MAX_PATH removals (#20113)
* Refactor FileScanner to lift a MAX_PATH limit

* Replace Platform::EnsureDirectoryExists with Path::CreateDirectory

* Remove MAX_PATH from Platform.Posix.cpp
2023-05-09 20:08:46 +01:00
Ted John d471d7a4b7 Use strings for research category 2023-04-18 21:38:10 +01:00
John Mulcahy 3916221cfb
Part of #19608: improve error reporting of zip command failure (#19672) 2023-03-22 19:52:54 +00:00
icy17 75fb313e5a
Fix #19279: Memory leak in Zip.cpp upon error (#19283)
* fix memleak

* Replace deprecated functions and throw on error

---------

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-03-09 18:07:33 -03:00
ζeh Matt 1f03bc89d7
Remove unused String::Duplicate 2023-02-19 23:59:15 +02:00
ζeh Matt a0bc5d9f3f
Remove unused functions 2023-02-19 23:59:15 +02:00
Hielke Morsink 3e713e5c2f
Fix memory leak in GetFileName (#19420) 2023-02-16 19:45:48 +00:00
Gymnasiast 3dd895abf7
Rename pad_ to Pad 2023-01-21 16:39:35 +01:00
Gymnasiast fa7dd95321
Rename remaining snake in (RCT12)TileElement fields 2023-01-21 16:37:11 +01:00
Michael Steenbeek cf9aad7885
Close #19214: Use consistent casing for RC and RCT (#19230) 2023-01-20 08:19:14 +00:00
Duncan 9deed6d98a
Replace snakes in Class names OpenRCT2/N*-P* (#19227)
* Replace snakes in Class names OpenRCT2/N*-P*

* Rename PODDate (and TimeOfDay for good measure)

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-20 05:24:44 +00:00