Commit Graph

337 Commits

Author SHA1 Message Date
duncanspumpkin a5ad2f9a87 Change overall view and boat hire return type to TileCoordsXY 2019-12-24 08:51:48 +00:00
duncanspumpkin 58339cff2b Prepare overall_view for type change 2019-12-24 08:39:20 +00:00
duncanspumpkin 0a5d094785 Change type of ChairLiftBullwheel to TileCoordsXYZ 2019-12-24 08:28:10 +00:00
duncanspumpkin 64656cdc0e Fix mistake made by auto complete 2019-12-21 12:43:13 +00:00
duncanspumpkin df2393c3f0 Fix clang format 2019-12-21 12:17:57 +00:00
duncanspumpkin 45403ac2d3 Move station_starts to TileCoordsXY 2019-12-21 11:48:13 +00:00
duncanspumpkin 7297125cae Refactor stations ready for TileCoordsXY 2019-12-21 11:26:37 +00:00
Michael Steenbeek a2b9598341
Modify code using Location8 to use isNull()/setNull() (#10403) 2019-12-21 11:34:46 +01:00
duncanspumpkin cfb4bba721 Remove todo and clang format where required
Change array type to avoid additional code

Make CI's happier
2019-12-15 08:21:32 +00:00
Duncan 0f659794d0 Fix #10108. Import/Export smoke particles correctly to stop desync (#10113)
Mistake made whilst refactoring import/export caused steam particiles to have the wrong information for each of its fields. This manifestied on multiplayer games causing an immediate desync.
2019-10-19 18:11:20 +02:00
Denis Khabenkov 4e111c66a3
Fix #10074: Refactor TrackDesignEntranceElement 2019-10-11 00:25:13 +03:00
duncanspumpkin bb042213fd Fix #10069. Actually pass the track element flags to the new element.
Mistake made whilst refactoring #10058. Flags were incorrectly been taken from the destination and not the source.

Refactored names to use the correct t number
2019-10-10 18:48:05 +01:00
Denis Khabenkov 57a208d560 Fix #10064: Refactor TrackDesignEntranceElement (#10066)
* Fix #10064: Refactor TrackDesignEntranceElement
2019-10-10 18:23:29 +01:00
Tulio Leao 121585578e Remove implicit conversion constructor 2019-10-08 18:22:02 -03:00
Tulio Leao 6be7c42a3d Close #10051: Create TrackDesignSceneryElement 2019-10-08 17:13:34 +02:00
Tulio Leao 68ce43308e Remove implicit conversion constructor 2019-10-08 07:48:03 -03:00
Denis Khabenkov de53ac84b8
Fix #10052: Create a TrackDesignEntranceElement struct to replace rct_td6_entrance_element 2019-10-07 21:59:07 +03:00
Michael Steenbeek a63395eb1c
Fix #10028: Saved park--brakes all set to 0mph 2019-09-29 22:53:41 +02:00
Duncan b94b8880aa Fix ride station index related bugs 2019-09-19 22:56:54 +02:00
Gymnasiast 0aca04256b
Fix #9978: Mazes are imported incorrectly 2019-09-12 23:12:54 +02:00
Gymnasiast bb73dd0dfb
Refactor track element to use 16 bytes 2019-08-31 13:14:19 +02:00
Gymnasiast b1fb75e496
Move everything to research vectors 2019-08-23 22:41:43 +02:00
Hielke Morsink 371f1fd016 Fix #9926: Africa - Oasis park has wrong peep spawn (#9927) 2019-08-23 21:54:54 +02:00
Gymnasiast bf1f14b441
Correct memcpy usage 2019-08-18 19:46:44 +02:00
Gymnasiast 169d2980ca
Properly export tile elements to S6 2019-08-18 18:20:56 +02:00
Ted John a094c5b0ce Create RCT2 version of ride rating calc data (#9751) 2019-08-18 12:53:56 +02:00
duncanspumpkin 748a6338a9 Fix #9885. Catch exceptions in track design writing 2019-08-17 10:59:36 +01:00
kennycastro007 9708e3a043 Fixed issue #8376 (#9866)
#8376: Added static function show_error in S6Importer.cpp
2019-08-15 16:02:03 +02:00
Ted John 132a1916d6
Fix #9832: Access violation in ride_measurement_update (#9842)
We can not store a ride pointer in ride measurement as rides are now stored in a vector which means their addresses can change when rides are constructed / removed.
2019-08-10 15:14:22 +01:00
duncanspumpkin 996cbdec02 Correctly input num_holes, inversions 2019-08-09 20:43:03 +01:00
duncanspumpkin af31404472 Use std::string and cleanup unused functions
Use CoordsXY for save pop scenery functions

Use CoordsXY for push save scenery functions

Further refactoring to use coordsxy and standard functions
2019-08-09 20:43:03 +01: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 54d6722bf2 Link everything together 2019-08-09 20:40:35 +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
Duncan 659b4d8f9f
Clean up some litter in the codebase (#9753)
13CA740 and 141F568 have been doing mostly nothing since the game action refacotr. Before that they didn't do much as I've never found any instance where the code was hit.
2019-08-08 06:05:58 +01:00
Ted John b17e9b1b18 Fix #9755: Crash when importing ride measurement for null ride 2019-08-07 23:11:11 +01:00
Ted John cd4eb86a7c
Merge pull request #9725 from IntelOrca/refactor/ride-manager
Refactor ride list
2019-08-07 21:03:17 +01:00
Ted John 16a2046032 Fix #9745: CJK characters are broken in ride names 2019-08-07 12:34:05 +01:00
Ted John 414b53b56d Remove ride classifications 2019-08-04 16:43:50 +01:00
Ted John a3fe00f0a3 Refactor ride list to a manager with iterator 2019-08-04 16:43:50 +01:00
Ted John c3234b1442 Refactor map animations and dynamically create on park load (#9705) 2019-08-03 22:18:33 +02:00
Ted John b3531624a1 Fix saving of banner frame colour 2019-07-30 18:27:50 +01:00
Ted John af5daaec70 Fix importing and exporting of banner strings containing colour 2019-07-29 21:20:22 +01:00
Ted John 7287b8cf1a Fix formatting 2019-07-29 20:40:25 +01:00
Ted John f539fdd79c Convert user strings to RCT2 encoding when exporting to S6 2019-07-29 20:01:49 +01:00
Ted John 7ce2f38c92 Fix formatting 2019-07-29 20:01:49 +01:00
Ted John d28799ef18 Remove user strings 2019-07-29 20:01:37 +01:00
Ted John 767b3c8328 Build up the user string list and export in one go 2019-07-29 19:18:16 +01:00
Ted John 40d49b93d3 Do not use user strings for peep names 2019-07-29 19:18:16 +01:00
Ted John 61d64ab8c5 Do not use user strings for banners 2019-07-29 19:18:16 +01:00
Ted John 3f8890afde Fix remaining errors and a few bugs 2019-07-29 19:18:16 +01:00
Ted John 3ee7824df4
Fix #9678: Korean scenario name is not saved (#9679) 2019-07-29 19:17:49 +01:00
Ted John 0b4d989a67 Rename get_banner to GetBanner 2019-07-26 17:24:19 +01:00
Ted John 3bff25ab22 Use TileCoordsXY 2019-07-26 17:14:09 +01:00
Ted John 5c07c53faf Refactor get banner 2019-07-25 22:21:19 +01:00
Ted John 85543bd1c8 Separate RCT2 and OpenRCT2 banner struct 2019-07-25 22:21:19 +01:00
Matt 3395079737
Remove NUM_SPRITE_LISTS macro and replace with SPRITE_LIST_COUNT for consistency 2019-07-24 17:53:54 +02:00
Ted John 3e28073981 Log path when loading / saving park 2019-07-22 22:15:01 +01:00
Duncan ab5f5b20cd
Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Ted John 5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Duncan 4e44818a04
Merge pull request #9449 from ZehMatt/refactor/sprite-list-pow2
Remove unnecessary multiplication and division for sprite lists
2019-07-13 09:37:35 +01:00
duncanspumpkin fc657e2571 Revert name change in RCT12 struct to reflect its use.
The new linked_list_index is only for the internal sprite base struct. When importing we are referring to the old linked_list_type_offset. If the names were the same it would not provide any information as to why one was a factor of two different.
2019-07-13 07:20:15 +01:00
Jim Armstrong 9c976daa51 Refactor #9474: Refactor jumping fountain code (#9475)
* Refactor jumping_fountain_update to Update

* Refactor jumping_fountain_get_type to GetType

* Refactor jumping_fountain_continue to Continue

Fix typos and misc refactoring

* Refactor begin and create functions into static member functions

Move jumping_fountain_begin and jumping_fountain_create into the rct_jumping_fountain struct and make them static

* Refactor remaining fountain functionality into member functions

* Rename JumpingFountain struct and move to proper header file

JumpingFountain code was refactored to conform to variable naming conventions and moved into the Fountain.h file.

rct_sprite_generic struct was moved to SpriteBase.h - this was done to get around a circular header dependency between Fountain.h and Sprite.h

* Set access modifier for private functions

* Change JumpingFountain variable names to TitleCase

* Refactor #9474: Clarify where auto is being used with pointers

* Refactor #9474: Change function names for clarity

* Refactor #9474: Fix incorrect function names
2019-07-11 20:38:30 +01:00
Matt fc3afb3349
Remove unnecessary multiplication and division for sprite lists 2019-06-22 17:38:28 +02:00
Matt df30d5d9bc
Fix MarketingCampaignFlags::FIRST_WEEK not being imported/exported with sv6 2019-06-19 03:20:19 +02:00
Gymnasiast 3933e2ffc6 Fix #9402: Ad campaigns disappear when you save and load the game 2019-06-12 22:20:00 +02:00
Peter dd948f99c4 #9295 Refactor rct_vehcile->status to rct_vehicle::SetState() (#9329)
Fix #9295. Refactor rct_vehicle->status to rct_vehicle::SetState()

Created rct_vehicle::SetState() and refactored all assignments to
rct_vehcile->status. SetState also includes a call to
vehicle_invalidate_window(), so it cannot be forgotten.
2019-06-09 15:45:56 +01:00
Ted John 6f0298deb3 Refactor ride measurement storage 2019-06-09 11:55:41 +02:00
Greg Hennis 1fcedae3bc Fix #9258: Rename SPRITE_LIST_NULL to ..._FREE (#9260) 2019-05-15 19:07:01 +02:00
Ted John 15cb3e1889 Remove unnecessary new line characters from log calls (#9237) 2019-05-12 13:48:56 +02:00
Gymnasiast 731af74732 Cast after std::min 2019-03-27 21:49:10 +01:00
Gymnasiast a27e04e5a3 Limit inversions and holes to 31 (for now) 2019-03-27 19:44:46 +01:00
Gymnasiast 921e426605 Increase size of inversions and holes to uint16_t 2019-03-27 15:55:34 +01:00
Gymnasiast ba404338cc Max out inversions value instead of truncating 2019-03-27 14:02:32 +01:00
Gymnasiast 64e51cd34b Close #8965: Refactor ride->inversions 2019-03-27 11:30:18 +01:00
Gymnasiast 8b1330ec57 Add comment [ci skip] 2019-03-19 22:13:02 +01:00
Gymnasiast 14c2925ae5 Add import code to make Ice Cream Stalls light blue 2019-03-19 22:11:18 +01:00
duncanspumpkin f28be1ae30 Merge #8881 branch 'set_park_open' into game_actions 2019-03-18 19:57:50 +00:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
duncanspumpkin cb087e3b4e Fix formatting. Initialise to bad value 2019-03-16 16:41:18 +00:00
duncanspumpkin 24e9428731 Use 64bit values to simplify code 2019-03-16 07:33:21 +00:00
Phillip Walters 0e50d438d7 Added console logging for failed map saves 2019-03-15 20:35:41 -07:00
ζeh Matt e776faee97
Merge pull request #8812 from ZehMatt/import-export-fixes
Fix #8811: Import export fields not copied correctly.
2019-03-02 07:47:36 +01:00
Matt 8b6012a44b Add missing field "no_of_food" to importer/exporter. 2019-03-02 04:46:31 +01:00
Matt 5f6ae6ac8c Fix copying the wrong field. 2019-03-02 04:45:47 +01:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Ted John 3b7b46706c Export sprites field by field 2019-02-20 23:51:43 +00:00
Ted John b77bc56a52 Copy vehicle structure for S6 2019-02-20 23:31:14 +00:00
Ted John c0e4eff9f1 Start copying sprite structures for RCT1 and RCT2 2019-02-20 23:31:14 +00:00
Ted John ddaddf59c6 Import misc sprites field by field 2019-02-20 23:31:14 +00:00
Ted John 67ae973ac8 Import peep field by field 2019-02-20 23:31:14 +00:00
Ted John 1b83b9881b Import vehicle field by field 2019-02-20 23:31:14 +00:00
Ted John 9960397f2c Import litter field by field 2019-02-20 23:31:14 +00:00
Ted John 4013479094 Refactor marketing to be a single vector 2019-02-20 16:49:02 +00:00
Michał Janiszewski 604da7ce01
Merge pull request #8661 from tomlankhorst/refactor-random
Refactor random engine
2019-02-03 23:29:10 +01:00
Tom Lankhorst 16691b22ba
Use state struct 2019-02-01 19:29:43 +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
ζeh Matt 6668a1fa86 Refactor remaining number values to RideStation::NO_TRAIN (#8655) 2019-01-30 13:49:46 +00:00
Ted John 92412d4bab Store ride index inside ride struct 2019-01-18 11:46:18 +01:00