Commit Graph

415 Commits

Author SHA1 Message Date
ζeh Matt 7730b35d82
Merge pull request #9571 from ZehMatt/replay-cleanup
Replay cleanup
2019-08-05 18:31:03 +02:00
Ted John 6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
Matt 8ab0ca4f8f
Fix DataSerialiser returning the wrong stream object 2019-07-27 16:06:26 +02:00
Ted John a1d9e52046 Rename ToUtf16 to ToWideChar
This is more correct as wchar_t size can differ, for example Linux typically uses 32 bits for wchar_t where as Windows uses 16 bits.
2019-07-22 23:44:03 +01:00
Ted John 6f61c94dbd Remove old widechar <-> utf-8 conversion function 2019-07-22 23:44:03 +01:00
duncanspumpkin 96ec0123ca Refactor and clean up for CI's. 2019-06-11 18:43:23 +01:00
duncanspumpkin 3162d4dc75 Implement TileModifyAction
Further work moving game commands into the game action framework
2019-06-11 18:42:52 +01:00
aw20368 df263eb1f6 Fix #5896 Fences not always removed when building a tracked ride through (#9341)
Fence removal did not account for track direction. Added the rotation for the track/fence intersection test.
2019-06-04 23:27:36 +02:00
ζeh Matt f7bd6d516a Fix #9267: Only check if a file is a directory before opening it (#9269) 2019-05-16 08:05:09 +01:00
ζeh Matt 0ff19f071f Fix #9240: crash when passing directory instead of save file 2019-05-13 21:34:58 +02:00
Ted John f8e3abcf4e Remove by-reference string_view 2019-05-12 00:51:33 +01:00
Ted John 123a8eacad Get the server list showing LAN servers 2019-05-12 00:51:33 +01:00
ζeh Matt c8f822ea70
Gamestate snapshots (#8819)
* Add initial interface.

* Implement move operator in MemoryStream

* Add pod array serialisation traits.

* Add push_back with move semantics to CircularBuffer

* Initial implementation of GameStateSnapshots

* Add GameStateSnapshots to Context.

* Add mp_desync console command.

* Compare sprite data and fill change list.

* Minor changes.

* Proof of concept.

* Calculate offset instead of using offsetof

* Implement game state difference detection

* Update mp_desync console command.

* Fix identification of sprite remove/add.

* Fix crash when only one peep in park when using mp_desync

* Output state differences into user directory desync folder.

* Add desync debugging as an option.

* Add information to network status when a desync report was created.

* Cast to proper type for %llu.

* Update xcode project

* Add more information to the diffed data.

* Remove client-only relevant fields.

* Cleanup.

* Add better name output for misc sprites

* Add srand0 and tick information to the output

* Bump up network version

* Cleanup

* Set desync_debugging to false as default

* Apply suggestions
2019-05-11 21:31:34 +02:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Tom Lankhorst 63a38412aa Add `optional` header 2019-05-02 22:53:19 +02:00
hokasha2016 6022521118 Fix #7871: String::StartsWith() returns true if source is shorter than match 2019-04-20 18:55:27 +02:00
Matt 37c3809744 Implement partial multicore rendering 2019-03-31 15:50:55 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
duncanspumpkin 540be7c7be Provide a conversion from old game command.
Note doesn't handle footpath scenery or clear direction mode
2019-03-04 16:57:21 +00:00
duncanspumpkin ef69c01da5 Create FootpathSceneryRemoveAction to split up footpath place 2019-03-04 16:57:21 +00:00
duncanspumpkin e128a78b91 Fix formating and other issues
Refactor as per comments.

Simplified some of the code as well

Use constants
2019-03-02 07:24:42 +00:00
duncanspumpkin 7f586f50e1 Move all callees to the game action framework. Fix CoordXY bug 2019-03-02 07:24:41 +00:00
duncanspumpkin 650e8291d0 Start moving track place into GameAction framework 2019-02-19 12:30:33 +00:00
Michał Janiszewski 838289abce Mark functions as static 2019-02-10 00:20:34 +01:00
duncanspumpkin 44cd8c3150 Refactor. Add CoordsXY to data serialiser 2019-02-08 14:08:26 +00:00
Matt 598ea08529 Update copyright. 2019-02-07 18:50:58 +01:00
Matt 0d1c8b8d31 Fix CircularBuffer push_back method. 2019-02-07 18:50:58 +01:00
Matt a26e9231cf Simplify CircularBuffer 2019-02-07 18:50:58 +01:00
Matt e4f1b12fa4 Add CircularBuffer. 2019-02-07 18:50:58 +01:00
Tom Lankhorst 045692993a
Make template params adhere to code style 2019-02-03 21:16:09 +01:00
Tom Lankhorst 422d5f2ef1
Replace '_N' by '_num' 2019-02-01 21:54:00 +01:00
Tom Lankhorst 1e65db371b
Use single underscore prefix for template parameters 2019-02-01 21:51:01 +01:00
Tom Lankhorst dfe7f0614c
Consistency 2019-02-01 21:00:19 +01:00
Tom Lankhorst 16691b22ba
Use state struct 2019-02-01 19:29:43 +01:00
Tom Lankhorst 2ea347f15f
MSVC SFINAE compatibility 2019-02-01 15:50:09 +01:00
Tom Lankhorst 1a81d60609
Expose gScenarioRand, add <algorithm> 2019-02-01 14:48:45 +01:00
Tom Lankhorst 6a42a95495
Refactor random engine
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Tom Lankhorst 4c015edaf6 Templatise `rorN` and `rolN` with `N` in {8, 16, 32, 64} 2019-01-28 10:55:24 +01:00
IntelOrca b9fd90ffd3 Implement ClearAction. 2019-01-07 09:04:51 +01:00
Michał Janiszewski 7e769ed662 Fix #7536: Android build fails to start (#8554)
This was a regression from #7435 which introduced threads and caused JNI
to misbehave and fail to load our expected classes. Provide a workaround
based on the description in https://stackoverflow.com/a/16302771 which
stores a main thread's class loader and uses that in neighbouring
threads.
2019-01-04 19:48:26 +01:00
Matt fc4e45562d Use stringstream to log integral values. 2019-01-02 06:39:59 +01:00
Matt a8254aa292 Add 64 bit serialisation support. 2019-01-02 05:18:36 +01:00
Matt ccc3227113 Cleanup. 2018-12-29 19:23:27 +01:00
Matt f6dbf5f1a2 Add std::array serialiser support. 2018-12-29 19:23:27 +01:00
Matt 000a9694f9 Fix DataSerialiser not accepting temporary values. 2018-12-29 19:23:27 +01:00
Matt a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
ζeh Matt 1abb31a159 Implement game action logging. (#8138) 2018-11-20 06:04:42 +01:00
Michał Janiszewski 180655dafa
Fix printf format specifiers (#8160) 2018-10-26 06:09:12 -07:00
Michał Janiszewski d5be45e27a
Add missing argument to format (#8082) 2018-10-11 06:20:01 +02:00
Ted John b9c2fdedd1 Resolve absolute path when indexing files
This ensures scenarios are displayed with their full path in the scenario select window rather than as specified in config or command line.
2018-09-08 22:17:21 +01:00
Michael Steenbeek 13c326eb50
Fix part of #7415: Korean scenario descriptions are mangled
OpenRCT2 used to incorrectly write UTF-8 to SV6 names and descriptions. This fixes reading such scenarios. It should also fix the game crashing when attempting to load such a scenario.

What this doesn't do is add support for the encoding that vanilla used for CJK, or add support for creating scenarios with Korean descriptions. That will only be feasible when switching to our own format.
2018-08-13 15:53:44 +02:00
Linus Unnebäck 2b3370228b
Remove the last usage of Math.hpp 2018-08-12 16:47:12 +01:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format 3a4a11f738 clang-format core 2018-07-23 16:00:03 +02:00
Hielke Morsink ce59ed0ba2 Fix include order and defines for Windows builds 2018-07-23 15:57:59 +02:00
Øystein Dale de464e2783 Use a better constructor in StringBuilder::GetStdString 2018-07-18 23:57:11 +02:00
Øystein Dale 934e53869c Fix memory leaks in localisation
Assigning a pointer to std::string appears to only perform a copy and
does not transfer ownership of the pointer, thus the allocated memory is
will never be freed.

Implement a method to construct an std::string from a StringBuilder to
avoid memory leaks when retreiving the contents of a StringBuilder and
storing it in a std::string.
2018-07-18 00:07:48 +02:00
Ted John f728a5074a
Fix #7765: Crash when opening ride list window on Windows Vista (#7781)
It has been reported that Windows Vista crashes in LCMapStringEx when
using LOCALE_NAME_INVARIANT even though it is documented as supported.

As a counter measure, use LOCALE_NAME_USER_DEFAULT for the time being.
2018-07-14 08:52:12 +01:00
Aaron van Geffen f963f969c1
Fix compilation on Linux, macOS. (#7732) 2018-06-26 11:16:03 +02:00
Ted John 0f2ccebfe7 Fix #7533: Screenshot is incorrectly named in CJK
For Windows, convert path to UTF-16 before passing to fstream constructor.
2018-06-25 18:14:55 +01:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 7373987f0a
Merge pull request #6978 from tobiaskohlbau/refactor/network
HTTP: Refactor into modern C++
2018-06-12 21:50:46 +01:00
pkubaj 7fbbce5712 Include cstddef
This fixes compilation on FreeBSD and LLVM 6.0.
2018-06-12 14:38:59 +02:00
Tobias Kohlbau 62c25d88fb HTTP: refactor http into modern C++
Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
2018-06-11 10:24:19 +02:00
Michał Janiszewski 1d28826b79 Fix -Wdocumentation and add it to default warnings 2018-06-11 09:52:54 +02:00
Aaron van Geffen ee4b8c11ae Prevent invoking a copy constructor in some ranged for loops. 2018-06-08 22:29:42 +02:00
Michał Janiszewski 320eee0d59
Fix -Wunreachable-code-break and add it to deafult warnings (#7634) 2018-06-06 22:30:21 +02:00
Hielke Morsink 5d0022a5cb Remove argument list from zero-initializers with zero/false/nullptr value 2018-06-04 19:50:46 +02:00
Ted John a413d43cda Fix mingw 2018-06-01 22:44:25 +01:00
Aaron van Geffen 53b66fd250 Add Crypt files to Xcode project. 2018-06-01 22:41:42 +02:00
Ted John ae81af7965 Fix Linux 2018-06-01 21:28:27 +01:00
Ted John 72293f2208 Implement new Crypt code and remove CNG for now 2018-06-01 21:27:34 +01:00
Ted John b8d37548ed Implement PEM writing for CNG implementation 2018-06-01 21:27:34 +01:00
Ted John 9467438c1c Implement PEM reading for CNG implementation 2018-06-01 21:27:34 +01:00
Ted John 3b2b15c0f3 Implement CNG implementation bar pem reading 2018-06-01 21:27:34 +01:00
Ted John 9e214258c3 Finish OpenSSL RSA implementation 2018-06-01 21:27:33 +01:00
Ted John fe7e8a17de Start implementing RSA for OpenSSL 2018-06-01 21:27:33 +01:00
Ted John 865bfb7b1b Refactor implementations to different files 2018-06-01 21:27:33 +01:00
Ted John ea22c672d0 Only reuse CNG object if Windows 8+ 2018-06-01 21:27:33 +01:00
Ted John 320b149b58 Change Windows builds to use CNG API 2018-06-01 21:27:33 +01:00
Ted John f880290b00 Create WinSSL implementation and refactor to class 2018-06-01 21:27:33 +01:00
Aaron van Geffen b836ad050d Rewrite CodePageFromUTF8 as CodePageFromUnicode. 2018-05-22 19:51:34 +02:00
Aaron van Geffen 3fd75906b6 Fix String::ToUtf8 and String::ToUtf16 on Linux.
wchar_t typically uses UTF-32 codepoints on Linux, unlike Windows, which uses UTF-16.
2018-05-22 19:51:34 +02:00
Aaron van Geffen bab66d1eaf Fix MinGW compilation. 2018-05-22 17:37:07 +02:00
Ted John 71a2cb46d2 Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
2018-05-22 17:37:07 +02:00
Aaron van Geffen 13e35285f1 Replace non-Windows versions of ToUtf8 and ToUtf16 with ICU calls. 2018-05-22 17:37:07 +02:00
Ted John 6109a9bf17 Improve Windows implementation of ToUpper 2018-05-22 17:37:07 +02:00
Ted John 085d85585a Use Windows API for utf8-utf16 conversions 2018-05-22 17:37:07 +02:00
Aaron van Geffen 8e919d2f84 Change ICU variant of String::ToUpper for string_view argument. 2018-05-22 17:37:07 +02:00
Ted John 386ab1b0fa Add windows implementation for ToUpper 2018-05-22 17:37:07 +02:00
Fusxfaranto a91dd6a356 Implement ICU support for uppercasing, with tests. 2018-05-22 17:37:07 +02:00
Aaron van Geffen f29b42cc26 Allow converting strings between code pages in both directions.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Aaron van Geffen ea80f0ea56 Split off GetIcuCodePage to its own function. 2018-05-22 17:37:07 +02:00
Aaron van Geffen ee8bf9bd4a Use ICU for converting strings to UTF-8 instead of our own tables.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Ted John 080330070b Write file index even if there are no files 2018-05-20 18:40:06 +01:00
Hielke Morsink 6c65c3d64d
Merge pull request #6774 from janisozaur/fixes
Various code improvements
2018-05-15 14:38:43 +02:00
Aaron van Geffen 8c3766288b Address clang 6.0 compilation errors. 2018-05-13 23:22:40 +02:00
Ted John 4e86d18dad Support loading images from zip 2018-05-13 12:04:45 +01:00
Aaron van Geffen 15c13137df Add missing include. 2018-05-13 01:11:56 +01:00
Ted John f212894eb0 Fix clang builds 2018-05-13 01:11:56 +01:00
Ted John bffbf5857d Refactor image importer out into new class 2018-05-13 01:11:56 +01:00
Ted John 229c50dff9 Add bitmap reading support 2018-05-13 01:11:56 +01:00
Ted John ac3233b819 Change consumers to use new imaging API 2018-05-13 01:11:56 +01:00
Ted John 766997f15c Develop new imaging code 2018-05-13 01:11:56 +01:00
Ted John 4552f6a405 Move Imaging to core 2018-05-13 01:11:56 +01:00
Hielke Morsink f9dd981234 Further fixes
- Use `= 0` for initializing types
- Add default values to some structs, instead of zero-initializing their instances with `{}`
- Use `std::make_unique` in Network.cpp
- Remove trivial constructors and destructors
- Improve readability of expression in Vehicle.cpp
2018-05-12 16:58:08 +02:00
Ted John 7075f6ca25 Use correct language for scan-objects 2018-05-11 20:39:00 +01:00
Ted John 35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John 7dc170ef85 Use shared_ptr for long-life objects
Use unique_ptr and shared_ptr for IContext, IPlatformEnvironment, IUiContext, and IAudioContext.
2018-05-11 20:37:48 +01:00
Michał Janiszewski 0a92e74ced Minor fixes 2018-05-11 15:38:30 +02:00
Michał Janiszewski d965553cae Fix Android Zip changes 2018-05-09 15:59:05 +02:00
Ted John 2ea857a10e Improve IZipArchive so that it is more C++ 2018-05-06 17:46:45 +01:00
Hielke Morsink 8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
ZehMatt 76e54dd5ec Fix dead lock due to uninitialized variables. 2018-04-28 02:38:06 +02:00
ZehMatt ee53855c62 Use emplace_back with reference as return type. 2018-04-26 21:26:30 +02:00
Ted John dd58a710ee Make Console::Write functions atomic 2018-04-26 21:26:30 +02:00
Ted John 7da60f4950 Make log functions atomic
Use only one print call to stdout in log functions so that messages are not malformed.
2018-04-26 21:26:30 +02:00
Ted John 20be1cc0a8 Small refactor and code format 2018-04-26 21:26:30 +02:00
ZehMatt b9d939b294 Show progress of processed elements instead of pending tasks. 2018-04-26 21:26:30 +02:00
ZehMatt d77f06c1ee Coding style changes. 2018-04-26 21:26:30 +02:00
ZehMatt 7be1cd3e37 Use std::list and fixed step size. 2018-04-26 21:26:30 +02:00
ZehMatt b9e0eede44 Code cleanup 2018-04-26 21:26:30 +02:00
ZehMatt 64d9109226 Add progress report back. 2018-04-26 21:26:30 +02:00
ZehMatt bee0fc25b1 Move all code into JobPool.hpp 2018-04-26 21:26:30 +02:00
ZehMatt ac6b3fb225 Change order of members. 2018-04-26 21:26:30 +02:00
ZehMatt 8c2ac904b4 Add missing vector include. 2018-04-26 21:26:30 +02:00
ZehMatt 6b649e6b29 Remove unused includes. 2018-04-26 21:26:30 +02:00
ZehMatt dfcec4d9da Refactor file indexing to use the job pool instead of threads. 2018-04-26 21:26:30 +02:00
ZehMatt 254aedefd4 Add generic job pool implementation. 2018-04-26 21:26:30 +02:00
ZehMatt e841c5b20b Use multiple threads to generate object index cache. 2018-04-26 21:26:30 +02:00
Ted John 947a0625c8 Fix mingw builds 2018-04-18 13:16:20 +02:00
Ted John deaa60f8f1 Refactor string conversion between RCT2 and UTF8
Use Win32 API for conversion on Windows for non-1252 code pages instead of built-in tables.
2018-04-18 13:16:20 +02:00
Duncan 0ab3d0955c
Merge pull request #7310 from OpenRCT2/json-objects
Add support for new JSON object format
2018-04-08 10:45:55 +01:00
Michał Janiszewski b26d484726 Fix remaining headers 2018-03-31 23:48:15 +02:00
Hielke Morsink a51462b0fd Include necessary files for compiling headers
This commits works towards #7289. It includes files that it depends on, or forward declares types when possible. It may seem like this only increases compilation time, but before this commit they depended on the other includes of the source files that use them.
2018-03-31 23:07:14 +02:00
Ted John 63e9275b60 Protect against unknown ride types 2018-03-30 16:58:12 +01:00
Hielke Morsink 44e893ab53 Fix issue in 'GetExtension' (#7337)
`Path::GetExtension` would iterate over the full path instead of just the filename, meaning a path like `C:\My.docs\file` (note the missing extension in the filename) would return `.docs\file` as the extension.
2018-03-23 07:48:13 +00:00
Michał Janiszewski 67f74119cf Fix missing headers 2018-03-20 00:27:58 +01:00
Michał Janiszewski 3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Michał Janiszewski 5c6e28284b Move cstddef out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 54cc1ebcdf Reduce includes in common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 9e1dfffee8 Remove unnecessary checks for __cplusplus 2018-03-14 22:11:30 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Michał Janiszewski c4f3643be1 Fix #7246: Android build fails with java.lang.UnsatisfiedLinkError
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with
pending exception java.lang.UnsatisfiedLinkError: No implementation
found for long website.openrct2.ZipArchive.allocBytes(byte[], int)
(tried Java_website_openrct2_ZipArchive_allocBytes and
Java_website_openrct2_ZipArchive_allocBytes___3BI)
2018-03-11 23:57:50 +01:00
ZehMatt 49d8d37748 Add serialization traits for bool. 2018-03-05 00:17:34 +01:00
Ted John 0f00659c8e Do not show file index error if it doesn't exist 2018-02-11 10:39:15 +00:00
Ted John 142facb8a3
Remove Memory::Duplicate and Memory::DuplicateArray (#7142) 2018-02-07 19:56:46 +00:00
Ted John fbf0243aa3 Fix #7136: Wrong categorisation of objects
Regression introduced in DuplicateArray when converting CopyArray to memcpy
2018-02-06 18:19:23 +00:00
Ted John 0fc0d16e85 Remove unused String::Substring 2018-02-06 18:19:23 +00:00
Gymnasiast 34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Ted John 0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Ted John bb8b6a3f68 Replace Memory::Move with std::copy 2018-02-04 12:40:24 +00:00
Ted John 7851446a6f Replace Memory::Set with std::fill or similar 2018-02-04 12:35:02 +00:00
Ted John 87cd9f88b3 Rewrite Platform::GetInstallPath 2018-02-02 12:41:26 +00:00
Gymnasiast 6c49d45266 Remove unused textinputbuffer.{c,h} 2018-02-01 12:13:11 +01:00
Ted John cb720025fa Replace platform_enumerate_directories_begin with FileScanner code
This is isn't a particularly pretty implementation but it is only temporary until we can use std::filesystem.
2018-01-18 11:38:52 +01:00
Ted John d8b3fb01a7 Fix FileScanner not taking notice of recurse flag 2018-01-18 11:38:52 +01:00
Michał Janiszewski 6a65f791b6 Add const to arguments 2018-01-10 23:58:57 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Michael Steenbeek 6450cce829 Fix compilation on Xcode 2018-01-05 19:58:05 +01:00
Ted John 02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michał Janiszewski 33a94fe1bb Use C++ headers in C++ code 2018-01-04 07:36:54 +01:00
Aaron van Geffen d768a467b7 Implement std::string variant of TrimStart; add tests.
This also makes String::TrimStart handle all-whitespace strings.
2017-12-25 00:30:21 +01:00
Aaron van Geffen 4bc2ad18c4 Trim ideographic spaces as well. 2017-12-25 00:30:21 +01:00
Aaron van Geffen 6c26009f19 Fix #6097: String::Trim wasn't taking multibyte chars into account.
Extends StringTest with multibyte tests.
NB: ストリング is a katakana transcription of 'string'.
2017-12-25 00:30:21 +01:00
Michael Steenbeek 863a71c984 Fix #6803: Symlinks to directories are not descended by FileScanner 2017-12-19 20:51:35 +01:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Ted John dcb92a466d Add new base path for user data and config
Refactor more path resolution to Platform2.cpp
2017-12-01 21:09:45 +00:00
Michał Janiszewski 0a9ee59152 Change format to use 5-wide index 2017-11-25 16:42:12 +01:00
Michał Janiszewski 39bb4bcc41 Report indexing progress 2017-11-25 16:42:12 +01:00
Michael Steenbeek c95a9e4c9b Fix typo in 'separator' 2017-11-13 16:25:31 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michał Janiszewski 8fd2266bda Refactor includes (#6512)
* Refactor Intent.h inclusion

* Use forward declaration of ITcpSocket

* Remove unused include

* Forward declare rct_ride_entry

* Remove unused headers

* Forward-declare rct_drawpixelinfo

* Remove unused headers

* Lower header include from header to source file

* Reduce included headers

* Reduce includes
2017-10-19 10:01:05 +02:00
Mark van Renswoude ce73d3a8a5 Fix #6390: Crash when renaming rides in multiplayer 2017-10-14 14:21:06 +02:00
Michał Janiszewski 7dad101f70 Include stdbool.h in Guard.hpp
C only has `bool` type when `stdbool.h` is included.
2017-10-13 08:00:32 +02:00
Michał Janiszewski b05bdf28fc Fix compilation with older clang
Older clang would expand the macros and spot that clamping unsigned
values to [0, MAX] is a tautological operation and produce an error.

As these are tautological operations, no network version change should
be needed.
2017-10-09 17:34:37 +02:00
vector-of-bool 57a8bbac23 Respect POSIX path separators on Windows (#6356) 2017-10-08 21:28:38 +02:00
Michał Janiszewski 9ff0e22aee Whitespace fixes 2017-10-05 10:42:44 +02:00
ZehMatt 995c0d0a6b Refactor SetParkEntranceFeeAction to use constructor for parameters.
Add RideSetNameAction.
Support of string serialisation.
2017-10-05 10:42:44 +02:00
Michał Janiszewski 6ddac382be Fix copyright dates 2017-10-05 10:42:44 +02:00
ZehMatt 5283804b37 Remove unnecessary type conversation.
Add override attributes.
Changed GameActionResult data storage to union, happy compilers.
2017-10-05 10:42:43 +02:00
ZehMatt c73665a003 Add deprecation warnings in old game_command functions.
Removed line that didn't belong there.
2017-10-05 10:42:43 +02:00
ZehM4tt 1b2a61c6ba Separated out byte swapping into its own header.
Simplified data serialisation of game actions.
Moved the flags away from parameters.
GameAction base now serialises mandatory data such as flags and player.
Split some functions from network in order to move command processing to the end of tick.
2017-10-05 10:42:43 +02:00
duncanspumpkin ae24ded8bf Make client work 2017-10-05 10:42:38 +02:00
Michał Janiszewski 5ab9f938a7 Update files missed in the great extern "C" cleanup of 2017 2017-09-28 23:29:16 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John 0df10cc41d Log exception messages 2017-08-31 18:02:39 +01:00
Ted John dcb78b18d9 Add HeaderSize to FileIndexHeader to increase rebuild chance when alignment changes 2017-08-31 18:02:39 +01:00
Ted John f2cd0b2f3b Refactor ObjectRepository to use FileIndex 2017-08-30 21:58:43 +01:00
Ted John 8808444562 Refactor TrackDesignRepository to use FileIndex 2017-08-30 21:01:07 +01:00
Ted John a118b09e79 Rebuild index if language has changed 2017-08-30 19:32:28 +01:00
Ted John ed8483f5c3 Time index building and handle bad files 2017-08-30 19:27:25 +01:00