Commit Graph

694 Commits

Author SHA1 Message Date
Michael Steenbeek 1730673ca3
Merge pull request #15285 from duncanspumpkin/rct2
Move RCT2 structs into RCT2 header
2021-08-30 13:45:23 +02:00
duncanspumpkin 2f9e9e853e Move further structs into correct headers 2021-08-30 12:27:23 +01:00
spacek531 6d7fd57f5b remove var_CA 2021-08-29 14:52:43 -07:00
Gymnasiast 93c656f91d
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-29 15:39:42 +02:00
ZehMatt de364aa15a
Rename type SpriteBase to EntityBase 2021-08-26 15:37:16 +03:00
duncanspumpkin cdf1c3b1b8 Move s6 into rct2 header 2021-08-26 12:44:26 +01:00
Duncan 008f106242
Add constants for golf flags (#15072)
* Add constants for golf flags

* Reorg SubPositionData for minigolf

* Add enum for golf states

* Add golf animation enum

* Fix names of animations

* Correct spleing

* Revert stray change
2021-08-25 11:08:57 +01:00
spacek531 c49c6ca4a7
Rename animation vars 2021-08-21 19:23:27 +02:00
duncanspumpkin 0fae81c530 Merge branch 'develop' into HEAD 2021-08-17 21:55:39 +01: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
Duncan 940cab87d3
Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01:00
Kane bef853d0ab
Fix #15225: Some scenarios show incorrect name in-game
The S6Importer/SawyerChunkReader correctly decodes the scenario name and description and stores it under the rct_s6_info struct (info.name and info.details)

The problem is that on lines 369-370 the name and description are replaced with the scenario internal name and description - which is sometimes incorrect - specifically a number of scenarios by Frontier in the exapansion packs.
2021-08-16 21:01:37 +02:00
Gymnasiast 185d171940
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-07 19:13:10 +02:00
Gymnasiast 5ec2a2e471
Export gS6Info in S6Exporter 2021-08-02 20:38:02 +02:00
Ted John 5f853df1fd
Remove gS6Info 2021-08-02 20:38:02 +02:00
Michael Steenbeek 864de57877
Fix #14667: Unpurchaseable land tiles in Extreme Hawaiian Island 2021-08-01 17:26:43 +02:00
Gymnasiast d885c545d8
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-01 15:54:04 +02:00
Gymnasiast efb3f8394b
Convert to/from money64 during export; convert completed company value 2021-08-01 15:14:43 +02:00
Gymnasiast 7f4927ced6
More money64 fixes 2021-08-01 15:14:42 +02:00
Gymnasiast f3337de260
Fix weekly profit import 2021-08-01 15:14:42 +02:00
Gymnasiast 8af70cf402
Correctly import ride profits 2021-08-01 15:14:42 +02:00
Ted John 70d9c1438e
Change most things and formatting to money64 2021-08-01 15:14:42 +02:00
Gymnasiast 9f61748d95
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-07-28 11:00:36 +02:00
ZehMatt ac08049472
Adapt SV6 import and export for peep path-finding data 2021-07-27 20:40:19 +03:00
Duncan e9eb1b8304
Banner Refactor from NSF (#14788)
* Banner refactor

* Fix mistake in fix_duplicated_banners

* Reduce limit back

* Fix export

* Free banner on delete

* Increment network version

* Fix potential banner pointer crashes

Co-authored-by: Ted John <ted@brambles.org>
2021-07-27 10:25:58 +01:00
Gymnasiast b2ffbb3639
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-07-19 19:04:19 +02:00
ζeh Matt 6863da569f
Refactor ride rating to allow multiple updates (#14963)
* Refactor rating calculation to pass the state allowing multiple updates

* Rename RideRatingUpdateData to RideRatingUpdateState
2021-06-30 19:57:27 +01:00
duncanspumpkin d8eb762a19 Merge branch 'develop' into HEAD 2021-06-10 12:46:34 +01:00
Jamie Quigley 4f6d0a00fd
Refactor RIDE_STATUS to use strong enum (#14840)
* Refactor RIDE_STATUS to use strong enum

* Change platform-specific code to match RIDE_STATUS refactor

* Re-added check for valid RideStatus value

* Fixed errors in "g2" build target

* Use EnumValue instead of static_cast<uint8_t>

* Revert rct{1,2}.h to use uint8_t.

* Fix formatting

* Reverted from constexpr variable to additional enum variant

* Fix formatting
2021-06-10 07:09:58 +01:00
duncanspumpkin c7c634e825 Readd comment 2021-06-05 21:19:06 +01:00
duncanspumpkin c9777535d6 Fix export 2021-06-05 21:17:03 +01:00
Ted John 81d7c3f02b Make tile elements dynamic and resizeable 2021-06-05 21:17:03 +01:00
Ted John 051a09d2b7 Update map tile loop to support large maps. 2021-06-05 21:17:03 +01:00
Gymnasiast 4f522319d3
Re-remove S6Exporter.cpp 2021-06-05 10:35:11 +02:00
duncanspumpkin 5bac7821c9 Merge develop 2021-06-04 13:11:47 +01: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
duncanspumpkin 3199029168 Split off EntityTweener into seperate file 2021-05-29 07:47:49 +01:00
Duncan 39fcc5d078
Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Gymnasiast d3503b3433
Fix references to old railings names 2021-05-21 09:09:50 +02:00
Gymnasiast 3864281b92
Update object names 2021-05-19 15:12:50 +02:00
Ted John b6667b5b98 Update import of guests and peep thoughts
Also fix banner import from S4/S6
2021-05-17 22:38:12 +01:00
Ted John 2b2159976d Merge branch 'develop' into new-save-format 2021-05-17 21:33:29 +01:00
Hielke Morsink 693cfb2075
Correctly handle consecutive corrupt elements 2021-05-16 16:14:53 +02:00
duncanspumpkin 8282fde827
move Litter functions into class and refactor 2021-05-13 16:11:13 +02:00
ZxBiohazardZx 36b2742c19
Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Ted John 34f9d5ae8e Remove staff limit and increase patrol area to whole map 2021-05-11 22:38:03 +01:00
Ted John 0dc166a403 Fix winning scenarios 2021-05-11 20:29:02 +01:00
Ted John 0484435a91 Improve performance of S4 loading 2021-05-11 19:54:36 +01:00
Ted John acf02a628c Refactor and increase banner limit 2021-05-10 21:38:04 +01:00
Gymnasiast e0c35e3c5c
More money64 fixes 2021-05-09 20:16:40 +02:00
Gymnasiast 8063e965b8
Fix weekly profit import 2021-05-09 20:04:04 +02:00
Gymnasiast 1c5b7a7bdd
Correctly import ride profits 2021-05-09 19:44:58 +02:00
Ted John 5c8512f51c Implement S4 restricted scenery 2021-04-29 01:07:32 +01:00
Ted John 37725ae566 Reset cheats when importing S4/S6 2021-04-29 00:10:15 +01:00
Ted John 274e0f1d6f Fix research importing 2021-04-28 23:56:12 +01:00
Ted John f6b119a4df Fix some scenarios having incorrect park name 2021-04-27 19:02:40 +01:00
Gymnasiast 9f4d050d87
Add TT path mappings 2021-04-27 12:00:49 +02:00
Ted John f0ee6de5fc Use real values for gGuestsInParkHistory 2021-04-25 16:23:59 +01:00
Ted John 6db0c01fdc Merge branch 'develop' into new-save-format 2021-04-25 15:03:45 +01:00
Ted John 69ab87860c Fix saving of track designs with footpaths 2021-04-23 00:57:22 +01:00
Ted John 5cba4fe1a7 Improve track import of footpath surface 2021-04-22 21:55:18 +01:00
Gymnasiast 3f294daf23
Update path names 2021-04-21 22:13:29 +02:00
Ted John d742290794 Get old path objects working 2021-04-21 01:21:54 +01:00
Ted John 978adf541f Implement new surface objects 2021-04-20 22:04:08 +01:00
Duncan 8eabdf8c8f
Split guest and staff peep variables (#14462)
* Split guest and staff peep variables

* Move variable location

* Increment network version

* Update replays
2021-04-18 17:48:21 +01:00
Ted John 6329e8fdfe Reduce use of rct_object_entry 2021-04-14 10:36:21 +01:00
Ted John 23c709c197 Implement railing override logic 2021-04-14 01:34:07 +01:00
Ted John ef6d8a6e69 Work on RCT1 path import 2021-04-12 19:41:34 +01:00
Duncan a9e1f2e89c
Remove SpriteBase::flags (#14460)
* Remove SpriteBase::flags

* Increment network version

* update replays
2021-04-11 18:02:19 +01:00
Ted John eae2cde747 Fix S6 import of entrance style 2021-04-11 13:14:22 +01:00
Ted John 082c373d69 Fix defaulting of music and entrance 2021-04-11 02:02:05 +01:00
Ted John a0a0703055 Support large map sizes 2021-04-10 18:20:47 +01:00
Ted John c62290214c Change most things and formatting to money64 2021-04-10 16:00:50 +01:00
Ted John 8180fb9ae1 Make tile elements dynamic and resizable 2021-04-09 02:09:08 +01:00
Ted John a38154a0f3 Update map tile loop to support large maps 2021-04-08 21:05:34 +01:00
Ted John 3173a63726 Replace gScenarioTicks with gCurrentTicks 2021-04-06 00:07:13 +01:00
Ted John b45a20549e Remove gS6Info 2021-04-05 18:01:43 +01:00
Ted John 8ff525270d Remove S6Exporter 2021-04-03 04:20:51 +01:00
Ted John fce02c21c3 Implement handling of new object types 2021-04-03 00:23:15 +01:00
Ted John 638bbebe59 Write new object identifiers to park file 2021-04-03 00:23:13 +01:00
Gymnasiast 87422c2806 Replace corrupt elements with invisibility bit 2021-04-03 00:21:43 +01:00
Gymnasiast 509bc3fe90 Remove gScenarioExpansionPacks 2021-04-03 00:21:43 +01:00
Gymnasiast 8fdce563ed Remove scenario_save_old()
It seems like MSVC does not like it.
2021-04-03 00:20:45 +01:00
Ted John a3351efd49 Fix the build for GCC 2021-04-03 00:20:45 +01:00
Ted John 9919253983 Get some saving working 2021-04-03 00:20:44 +01:00
Michael Steenbeek 7344b7fbfd
Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Duncan a4a08ea8b4
Reorg entity import to follow export design (#14177)
* Add CreateEntityAt

* Reorg entity import to follow export design

* Move definitions just because gcc refuses to fix bugs

* Use CreateEntityAt

* Fix freeid allocation

* Streamline freeId reset and add statics
2021-03-26 05:48:38 +00: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
Duncan df7a284822
Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Duncan 6ec379cd0e
Split Entity Lists by Entity type (#14326)
* Make initial changes to add entity type

* Make further corrections

* Revert header changes

* Fix mistakes
2021-03-16 11:18:06 +00:00
Duncan 5474194905
Implement train view and remove linked_list_index (#13956)
* Make train manager view

* Remove linked list index field

* Remove merge mistake

* Fix further rebase errors

* Rename and add comments

* Update replays

* Fix Xcode project

* Increment network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-15 08:13:00 +00:00
Michael Steenbeek 9397feaa44
Merge pull request #14134 from duncanspumpkin/reorg_entityexport
Rework how entity export works to allow for easier changes in future
2021-02-26 13:08:56 +01:00
Michael Steenbeek 28c680f97f
Merge pull request #14163 from Gymnasiast/refactor/get-rtd
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast 44d0e77afb
Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Gymnasiast f118b2ede4
Replace ride_type_has_flag() with retrieving RTD 2021-02-26 09:49:09 +01:00
Michał Janiszewski 8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Michał Janiszewski bfdf6874ac Reduce inclusion of Vehicle.h 2021-02-25 10:56:27 +01:00
duncanspumpkin d2fdf0917b Remove static casts and use union 2021-02-24 08:08:59 +00:00