Michael Steenbeek
9466e27c68
Fix a typo
2022-02-08 18:27:08 +01:00
Michael Steenbeek
4e17bb54b4
Remove now-unused RCT2 export functions
2022-01-08 20:00:30 +01:00
Michael Steenbeek
2fa33983ad
Close #16013 : Refactor RCT12Research import ( #16350 )
...
* Remove unused symbols in Research.h
* Move RCT12ResearchItem conversion out of Research.cpp/h
2022-01-03 10:20:04 +00:00
Michael Steenbeek
6d19c983e8
Normalise RCT12TileElementType
2021-12-18 19:43:30 +01:00
Gymnasiast
fc3ce3294c
Move over switches to normalised tile element types
2021-12-11 00:30:59 +01:00
Duncan
c01049a500
Only add RCT1 land objects to imported SV6 if they are used
2021-12-05 17:08:33 +01:00
Michael Steenbeek
66bf0aa1a6
Remove now-unused RCT12 setters ( #16109 )
2021-12-04 10:56:49 +01:00
Duncan
eba42a9584
Introduce Limits headers. ( #15329 )
...
* Move RCT12 limits to seperate file and namespace
* Remove prefix from constants
* Add rct1 limits file
* Rename constants to remove prefix
* Add RCT2 limits file
* Remove RCT2 prefix from constants
* Move constant to correct header
* Fix rebase mistakes
* Drop prefix
2021-11-27 16:20:05 +00:00
IntelOrca
34128dc262
Add new .park save format
...
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Hielke Morsink
9dd20ec619
Improve array formatting
...
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
ζeh Matt
6f8e017a32
Backport track design changes
...
Co-authored-by: Ted John <ted@brambles.org>
2021-10-11 20:28:13 +03:00
Hielke Morsink
77141f57b0
Merge pull request #15416 from Broxzier/refactor/unnecessary-else
...
Remove unnecessary else blocks
2021-09-17 14:56:30 +02:00
Hielke Morsink
fc8e0cf9d7
A couple more nullopt returns ( #15422 )
2021-09-16 23:05:50 +02:00
Hielke Morsink
4b4b3333d6
Remove unnecessary else blocks
2021-09-16 18:31:12 +02:00
ζeh Matt
b733e97bfa
Remove numerics from common.h and use it as needed
2021-09-11 20:21:08 +03:00
ζeh Matt
eda3188ecf
Fix rebase
2021-09-10 19:10:13 +03:00
ZehMatt
3ad72baaae
Cast fixes
2021-09-10 19:10:12 +03:00
Michael Steenbeek
624a32e93b
Make Coords isNull/setNull functions TitleCase ( #15382 )
2021-09-08 20:48:53 -03:00
IntelOrca
600ce959d7
Use real values for gGuestsInParkHistory
2021-09-03 23:43:43 +02:00
Ted John
3c451a4af4
Use music objects instead of IDs
2021-09-01 10:26:23 +02:00
ζeh Matt
bab646de6e
Add RCT12PeepThoughtItemNone constant
2021-08-30 21:13:34 +03:00
Hielke Morsink
f9c4bb2757
Remove unused persistentChunks argument ( #15290 )
2021-08-26 23:00:12 +02:00
Hielke Morsink
956e77f4c3
Use [[nodiscard]] for allocator and RAII functions ( #15244 )
2021-08-23 20:09:43 +02:00
Hielke Morsink
cef26400cf
Use std::make_unique instead of new for arrays
2021-08-21 00:28:21 +02:00
Duncan
223b926f8c
Use std::vector for ride use memory ( #14884 )
...
* Use std::vector for ride use memory
* Use new system for import/export
* Remove legacy field
* Add replay entity size protection to prevent crash
* Increment network version
* Update replays
* Move function to header
* Move constant to RCT12 header as used for both 1 and 2
* Align naming with nsf
2021-08-17 21:29:35 +01:00
Gymnasiast
efb3f8394b
Convert to/from money64 during export; convert completed company value
2021-08-01 15:14:43 +02:00
Duncan
c34079acee
Refactor LargeSceneryEntry and remove rct_scenery_entry ( #14816 )
2021-06-04 12:41:23 +01:00
Duncan
425f968a67
Rearrange WallSceneryEntry to enforce types ( #14808 )
...
* Rearrange WallSceneryEntry to enforce types
* Clang format
Correct inverted nullptr check
2021-06-03 13:26:00 +01:00
Silent
66abc69690
Add a persistentChunks flag to SawyerChunkReader
...
New behaviour of SawyerChunkReader is to skip shrinking the chunk
memory unless persistentChunks is set to true. At the moment all uses
of SawyerChunks created by the reader are temporary and shrinking memory
right before freeing them is a waste of time.
Speeds up loading times and index building
2021-05-23 15:04:50 +02:00
Silent
fb602ec0c9
Fix allocator mismatch in SawyerChunk on Windows with Debug
...
This change allows to use HeapReAlloc in FinaliseLargeTempBuffer
when running Debug builds.
2021-05-23 15:04:02 +02:00
Duncan
a9e1f2e89c
Remove SpriteBase::flags ( #14460 )
...
* Remove SpriteBase::flags
* Increment network version
* update replays
2021-04-11 18:02:19 +01:00
Duncan
977d05ba29
Entity type5: Remove peep assigned type ( #14380 )
...
* Remove users of AssignedPeepType
* Remove AssignedPeepType
Field no longer required due to changes to EntityType
* Move enum to the RCT12 header
* Increment network version
* Update replays
2021-03-24 08:54:05 +00:00
Duncan
ccfa22c230
Entity type4: Remove MiscEntityType and add FountainType ( #14344 )
...
* Move jumpingfountain type out of misc entity type
* Remove SubType for MiscEntities as it is no longer required
* Update replays
* Apply review comments
* Increment network version
2021-03-22 21:24:50 +00:00
Michał Janiszewski
29a1cf018d
Add negative tests for SawyerChunkReader
2021-03-03 21:55:05 +01:00
Michał Janiszewski
bf95260f37
Fix issues found in SawyerChunk decoder
2021-03-03 21:29:39 +01:00
Gymnasiast
1b964c0f2e
Refactor flat ride track pieces
2021-02-18 17:50:19 +01:00
Matt
c30bd1266f
Refactor IStream::ReadArray to return unique_ptr
2021-02-12 19:30:53 +02:00
Michael Steenbeek
e3a1af3d05
Use getters/setters for track type and direction
2021-01-30 15:16:17 +01:00
Duncan
f80531070b
Implement EntityLists ( #13853 )
...
* Implement EntityLists
* Remove dead code
* Use alternative name for iterator
* Add comments
* Increment network version
* Update replays
* Remove further dead code
* Update replays again
2021-01-21 18:36:34 +00:00
Ted John
19f0d8dfe9
Fix #13842 : News is imported incorrectly
2021-01-20 12:35:11 +01:00
Michael Steenbeek
830d2426bd
Import RCT1 tile elements by x/y ( #13740 )
...
* Import RCT1 tile elements by x/y
* Clean up wall import
* Move tile pointers creation to a separate function and to heap
* Create class for tile pointer index
2021-01-12 17:53:58 +00:00
Michael Steenbeek
60d1e94046
Close #7059 : Implement landscape doors on Ghost Train ( #13636 )
...
* Implement landscape door updating
* Implement door drawing for Ghost Train
* Amend changelog and bump network version
* Apply review requests
* Always return default seat rotation for ride types with landscape doors
* Fix comment
* Update replays
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-01-10 21:38:02 +00:00
Mathias Gibbens
b1e5a11bf3
Several more spelling fixes ( #13752 )
...
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>
Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
Gymnasiast
31dc155e0b
Use type bit 1 on surface element to store more surface styles
2020-12-20 21:45:04 +01:00
Ted John
699103fe86
Fix banner text formatting, import / export
2020-11-28 16:52:19 +00:00
Ted John
9e7504fd98
Improve RCT12 UTF-8 checks
2020-11-27 18:54:58 +00:00
Gymnasiast
802285fd92
Autoconvert ride id between RCT2 and OpenRCT2
2020-11-07 13:49:15 +01:00
Michael Steenbeek
92a5f1aa24
Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
...
Close #12450 : Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
Manuel Vögele
69b07904c1
Make TileElement conversion preserve the const qualifier
...
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
ju-pinheiro
bb16ca075b
Close #12450 : Refactor SPRITE_IDENTIFIER to use strong enum
2020-10-27 13:26:27 -03:00
Vinicius Sa
d583911997
Avoid variable shadowing in derived struct RCT12BannerElement
...
Give a more meaningful name to its private member that caused the
shadowing, as well as in the struct BannerElement.
Reported by PVS-Studio (Warning: V703).
Fix 3/7.
Issue: 12523
2020-10-06 18:21:19 -03:00
Simon Jarrett
52209af94d
Rename TRACK_ELEM_* enums to TrackElemType::*
...
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Gymnasiast
89f04c4fb3
Fix names of two track type functions
2020-08-10 23:48:18 +02:00
Matt
97d14feaa6
Rebase fixes
2020-08-05 16:35:40 +02:00
Matt
0dc43d66e4
Remove the use of INTERFACE macro and macro its self
2020-08-05 16:30:44 +02:00
Matt
83355e35cc
Move IStream, MemoryStream, FileStream into OpenRCT2 namespace
2020-08-05 16:29:36 +02:00
Matt
30376085cf
Include missing headers
2020-08-05 16:29:29 +02:00
Gymnasiast
682add27dd
Change ObjectEntryIndex null value to 0xFFFF
2020-07-23 12:45:42 +02:00
Gymnasiast
3060c2d8cb
Add const to conversion functions
2020-07-23 12:05:00 +02:00
Aaron van Geffen
7b5087f057
Update copyright year to 2020
2020-07-21 15:04:34 +02:00
Gymnasiast
3c4721d014
Move some constants to RCT12.h
2020-07-13 22:04:50 +02:00
Thamara Andrade
8ce799a72e
Close #12118 : Prefer foward declaration of *Coords* in headers ( #12142 )
...
* Removing unnecessary world/Location includes in headers
* Prefer foward declaration of *Coords* in header files
Closes #12118
2020-07-06 10:10:39 -03:00
Michael Steenbeek
aff920c874
Add support for importing RCT Modified ride entrances ( #11938 )
2020-06-13 20:10:43 +02:00
Michael Steenbeek
1ea1d24f00
Use constant for 255 tile element height ( #11928 )
2020-06-10 23:18:26 +02:00
Michael Steenbeek
9ef8d6da42
Convert most remaining C-style casts to C++-style ones ( #11867 )
2020-06-07 23:18:11 +02:00
Michael Steenbeek
f21ddb0723
Refactor checks for station pieces ( #11876 )
2020-06-05 17:55:15 -03:00
Gymnasiast
cc65564521
Use (RCT12)ObjectEntryIndex in more places
2020-05-01 22:06:13 +02:00
Gymnasiast
99626e4fbb
Convert RCT12 research marker defines to constexpr
2020-04-28 08:38:16 +02:00
Gymnasiast
38748fc869
Create conversion functions for entry indices
2020-04-28 08:38:04 +02:00
Michael Steenbeek
b89130e0f3
Use ObjectEntryIndex in more places ( #11440 )
2020-04-25 00:10:47 +02:00
Michał Janiszewski
2323cc1596
Use named casts instead of old-style casts
...
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Michał Janiszewski
eeef01f34b
Remove redundant function declaration
2020-04-21 13:31:01 +02:00
Tulio Leao
a4e4040a0c
Use named casts on openrct2/rct* ( #11169 )
2020-04-18 12:37:34 +02:00
Breno Rodrigues Guimarães
174a480870
Use utf8_remove_format_codes to remove format codes from user strings ( #11289 )
...
The previous code used RCT12::RemoveFormatCodes to remove format codes from RCT strings. But that function uses utf8 methods to identify format codes. In this new version, rct2_to_utf8 is called first to obtain an utf8 string, and then utf8_remove_format_codes can be used.
2020-04-15 07:17:43 +02:00
duncanspumpkin
d4998a0ade
Fix #10372 , #10509 , #10806 . Lift base sections did not export correctly
...
Mistake made whilst refactoring that assumed that station indexes are set on only station pieces.
2020-04-11 08:16:53 +01:00
Michael Steenbeek
8a12ad8f6b
Fix #9719 : Hacked walls in RCT1 saves are imported incorrectly ( #11222 )
2020-04-05 13:49:36 +02:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Michael Steenbeek
4f86d0115c
Merge pull request #10866 from Gymnasiast/refactor/more-tile-element-prep
...
Refactor/more tile element prep
2020-03-06 09:25:32 +01:00
Michael Steenbeek
d64b73c29a
Clean up RCT1/2 constants ( #10855 )
2020-03-05 22:49:16 +01:00
Gymnasiast
c9afcaa5b3
Fix errors
2020-03-05 00:09:39 +01:00
Gymnasiast
3ed7694495
Move tile element-specific flags
2020-03-04 22:01:09 +01:00
Gymnasiast
57a40c0657
Extend PathElement
2020-03-04 21:57:42 +01:00
Michael Steenbeek
61175a4fbf
Confine use of LocationXY8 to RCT12 load/save code ( #10698 )
2020-03-01 21:16:10 +01:00
Gymnasiast
8c776dd61e
Use C++ way for max uint8 value
2020-02-15 14:18:58 +01:00
Gymnasiast
1e6efa6eb4
Extend BannerIndex to 16 bits
2020-02-15 10:37:34 +01:00
Gymnasiast
e6c32230bc
Convert rawValue to uint32
2020-01-26 14:12:57 +01:00
Michael Steenbeek
d798811c4a
Make GetWaterHeight return big Z ( #10579 )
...
* Make GetWaterHeight return big Z
* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Michael Steenbeek
0c9b1cec96
Correct max vehicles per ride value ( #10504 )
...
* Correct max vehicles per ride value
* Fix formatting
* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
ζeh Matt
a39bd39268
Fix #10036 : Do not allocate large chunks of memory for save file classification ( #10040 )
2019-10-03 17:36:58 +02:00
Duncan
b94b8880aa
Fix ride station index related bugs
2019-09-19 22:56:54 +02:00
Gymnasiast
bb73dd0dfb
Refactor track element to use 16 bytes
2019-08-31 13:14:19 +02:00
Gymnasiast
f365bc3cb7
Create getters and setters for occupied quadrant
2019-08-27 21:12:48 +02:00
Gymnasiast
abe721b308
Fix rebase errors and formatting
2019-08-23 22:41:50 +02:00
Gymnasiast
daa00147d5
Split off RCT12ResearchItem
2019-08-23 22:41:43 +02:00
Gymnasiast
169d2980ca
Properly export tile elements to S6
2019-08-18 18:20:56 +02:00
Gymnasiast
18844f9244
Fix formatting [ci skip]
2019-08-18 14:36:16 +02:00
Gymnasiast
255ce3f62b
Extend tile element size to 16 bytes
2019-08-18 14:03:36 +02:00
duncanspumpkin
e9b59064e0
Fix code and clang format. Delete dead code.
...
Use correct TD4 checksum for vanilla TD4's.
Simplified the code for version detection since checksum numbers do not match up to a version
Fix TD4 imports.
Oh yeah TD4 doesn't have scenery or entrances
Move track related structs to correct files
2019-08-09 20:43:02 +01:00
duncanspumpkin
af92dcba3e
Creating t6 exporter
2019-08-09 20:39:54 +01:00
duncanspumpkin
e3c63b762e
Create new TrackDesign format
2019-08-09 20:39:53 +01:00