Commit Graph

69 Commits

Author SHA1 Message Date
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Michael Steenbeek 23871de19f
Remove built-in explode guests cheat 2020-11-16 22:07:52 +01:00
Aaron van Geffen af26a2cef0
Improve park cheats tab layout (#13186)
* Remove 'Park parameters…' button
  The scenario options are already accessible through the cheats menu

* Split off Objective group from General group
* Split off new Maintenance group from Staff group

* Shrink 'Force park rating' spinner to make room for label
* Change label 'Force weather' to 'Change weather to'
* Change label "Plants don't age" to 'Disable plants withering'
* Change some strings for consistent capitalisation
2020-10-16 21:52:27 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Kevin Strehl 5456899afc
Close #10572: Add cheat to allow building at invalid heights 2020-04-25 01:07:36 +02:00
Matt 26535862e1
Make the CI happy 2019-07-27 19:22:26 +02:00
Matt 8ab0ca4f8f
Fix DataSerialiser returning the wrong stream object 2019-07-27 16:06:26 +02:00
Matt 3d1b243d21
Add CheatsSerialise for variable count of cheats 2019-07-27 15:16:38 +02:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Michael Steenbeek b618bbdcd4
Implement GameAction for setting date 2019-03-31 19:48:51 +02:00
Michael Steenbeek 1c570c8eec
Move some ride functions to struct methods 2019-03-20 20:05:25 +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 9a1532ecc4 Add ParkSetParameterAction 2019-03-15 21:01:35 +00:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
duncanspumpkin 7840f6a7f7 Use SetIsBroken 2019-02-27 10:49:48 +00:00
Ted John 92412d4bab Store ride index inside ride struct 2019-01-18 11:46:18 +01:00
Ted John 8701286772
Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Hielke Morsink 53ae48ffca
Merge pull request #8550 from janisozaur/fallthroughs
Fix implicit fallthroughs
2019-01-04 23:27:02 +01:00
Michał Janiszewski c5e1abcfb1 Fix implicit fallthroughs 2019-01-02 22:30:57 +01:00
Ted John 37f76d1687 Move station fields into new station struct 2019-01-01 02:26:14 +00:00
Gymnasiast 958f287bb7 Fix typo, fix nullptr check notation 2018-12-22 15:31:28 +01:00
Ted John ab53c69c3c Use new CanGrow method on surface element which uses object property 2018-12-11 23:31:06 +00:00
ζeh Matt 61ef7b1c9e Fix #8345: crash with deleted surface when using "Own all land" cheat (#8347) 2018-12-03 19:43:36 +01:00
Michael Steenbeek 82aba96728 Cheats: use 'weather' instead of 'climate' (#8246) 2018-11-10 14:30:41 +01:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michael Steenbeek af2c1e69d1 Remove residual access to path addition_status field 2018-10-31 13:10:07 +01:00
Gymnasiast ecd6247462 Replace C-style functions for checking getting path additions 2018-10-04 12:13:17 +02:00
Michael Steenbeek 74ccf010e6 Port surface elements to new structure 2018-09-16 21:34:51 +02:00
Michael Steenbeek b5bb4c7fb9 Do not access old small scenery age field 2018-09-13 17:26:36 +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 c57bbca827 clang-format root 2018-07-23 16:00:14 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +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
Michael Steenbeek a14d59028f
Modify some commands to use CoordsXY 2018-06-04 19:18:52 +02:00
Ted John 9d617958cf Return date and park by reference from game state 2018-05-30 13:12:19 +01:00
Ted John 1e7560e7da Do not include GameState.h in Context.h 2018-05-30 12:50:25 +01:00
Ted John f1ee5cad83 Call Park from GameState. 2018-05-30 11:53:32 +02:00
Aaron van Geffen bfa5bf6ecc Refactor procedural park methods into Park calls. 2018-05-19 20:21:18 +02:00
duncanspumpkin 82884396f4 Update UpdateSpriteType 2018-05-05 11:42:16 +01:00
duncanspumpkin cbefe633d0 Further fixing 2018-05-05 11:06:26 +01:00
duncanspumpkin 87b3e5a823 Start the big refactor 2018-05-05 11:04:46 +01:00
Michael Steenbeek 5f9d40be7a
Replace tile_element_get_type() with struct method 2018-05-02 19:27:04 +02:00
oli414 3bff12c081 Seperate surface tile element 2018-05-01 16:33:16 +02:00
Hielke Morsink 30063984e6
Delete unused function arguments or mark them so (#7426)
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).

I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Ted John 16a7e21ffa Implement game action for park set loan 2018-03-20 09:31:39 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +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
deurklink e0c4f88295 Fix #7229: Exploding guests cheat gets rides stuck and freezes game 2018-03-12 10:23:46 +01:00