Commit Graph

149 Commits

Author SHA1 Message Date
duncanspumpkin 737c308e4e Use IsGhost() to access ghost state
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
Ted John c0e4eff9f1 Start copying sprite structures for RCT1 and RCT2 2019-02-20 23:31:14 +00:00
Michael Steenbeek 4e9d2ce764
Split footpath object into two internally 2019-01-20 21:38:38 +01:00
Gymnasiast 75d094e135 Fix another omission from #8453 2018-12-16 10:10:26 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Michał Janiszewski 23dc14b286
Improve checks for object files (#8417) 2018-12-11 19:35:27 +01:00
Michał Janiszewski cec86469f0
Improve imported object handling (#8372)
Reject and report invalid objects rather than triggering assert.
2018-12-05 23:12:22 +01:00
Michael Steenbeek de12a8dda1
Import S4 elements property-by-property 2018-11-13 21:48:20 +01:00
Michael Steenbeek b01ff01e82 Extend support for 8 cars corrupt elements 2018-11-05 12:13:26 +01:00
Michael Steenbeek 00ba0c1f51 Define RCT12TileElement fields as private 2018-11-05 12:13:26 +01:00
Michael Steenbeek d4801e139d Import tile elements from SV6 using new methods 2018-11-05 11:55:33 +01:00
Michael Steenbeek fbecfe5a88 Define tile elements in save as RCT12TileElement 2018-11-05 11:55:33 +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 506d4221d3 clang-format rct1/2/12 2018-07-23 16:00:07 +02: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
Michał Janiszewski 1d28826b79 Fix -Wdocumentation and add it to default warnings 2018-06-11 09:52:54 +02:00
Ted John c28a42d877 Optimise SawyerChunkReader for MSVC debug builds
- Change std::copy_n and std::fill_n back to std::memcpy and std::memset. They do not have the overhead of checks.
- Change std::malloc to HeapAlloc as 16 MiB allocations are very slow due to it initialising all the memory to 0xCC.
2018-05-29 18:39:13 +01:00
Richard Jenkins 41f0b181bf Display flat rides correctly in previews 2018-05-10 20:54:53 +02:00
Hielke Morsink 8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Michael Steenbeek ea0566a3f5 Split PeepSpawn and rct12_peep_spawn 2018-02-21 09:50:07 +01:00
Michael Steenbeek 3e7161650c Replace LocationXYZD8 2018-02-15 22:26:50 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Ted John 8e7a0e9110 Fix memcpy to copy_n mistake from 0c71855 2018-02-05 18:32:23 +00:00
Gymnasiast 34a6b5ef92 Remove __cplusplus ifdefs 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 7851446a6f Replace Memory::Set with std::fill or similar 2018-02-04 12:35:02 +00:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Ted John 02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Ted John 1f605db54b Extract RLE repeat to its own method 2017-10-22 16:21:13 +02:00
Ted John 8d1710d798 Fix #6460: Crash when reading corrupt object files
- Move sawyer coding functions to SawyerChunkReader.
- Replace assertions with exceptions to prevent crash on invalid chunks.
2017-10-22 16:21:13 +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
Michał Janiszewski e9e37d2aac Validate more inputs to SawyerChunk handlers 2017-08-03 00:29:56 +02:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Paweł Bylica 660373cf38
Fix unmatched memory free
Before the memory of size 1 was deleted, more allocated.
2017-02-24 00:15:56 +01:00
Ted John 2518362112 Use streams for SV6 export 2017-02-05 15:45:23 +00:00
Ted John 0dcab94411 Remove chunk code from SawyerEncoding 2017-02-05 12:26:52 +00:00
Ted John 5eee31f69a Use SawyerChunkReader instead of SawyerEncoding 2017-02-05 12:18:07 +00:00
Ted John 7ab2723936 Create a reader class for sawyer encoded chunks. 2017-02-05 02:40:50 +00:00
Ted John afc8943e34 Fix #5169: Parks containing packed objects fail to open
Regression from 3b02b05dc6. Forgot to implement reading packed objects with IStream.
2017-02-04 00:34:14 +00:00
Ted John 44120b2e7e Fix build issues 2017-02-02 22:00:01 +00:00
Ted John bb62bbebb3 Re-introduce checksum validation 2017-02-02 22:00:01 +00:00
Ted John 8998b2ae18 Refactor S6 importer to use IParkImporter interface 2017-02-02 22:00:01 +00:00
Ted John c9d7cd8216 Refactor loading of SC6 information when scanning scenarios 2017-01-31 17:54:39 +00:00