Commit Graph

160 Commits

Author SHA1 Message Date
Gymnasiast 0f08128657 Fix formatting 2018-09-16 21:34:51 +02:00
Michael Steenbeek 74ccf010e6 Port surface elements to new structure 2018-09-16 21:34:51 +02:00
Michael Steenbeek 1d3baef9b7 Remove some C-style tile element functions 2018-09-16 21:34:04 +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 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format e8310d079d clang-format ride 2018-07-23 16:00:09 +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
Hielke Morsink 2fed57d792
Check for ghost flag when removing track blocks (#7596) 2018-05-31 22:36:45 +02:00
Michael Steenbeek b573bd49b3 Replace all occurrences of tile_element_is_last_for_tile() 2018-05-24 11:44:53 +02:00
Michał Janiszewski 0a92e74ced Minor fixes 2018-05-11 15:38:30 +02:00
Michael Steenbeek 83b4bcb068
Prepare tunnel door support 2018-05-10 09:39:33 +02:00
duncanspumpkin fcb66b7449 Start refactoring pathfinding to use tileCoords 2018-05-05 11:42:34 +01:00
Michael Steenbeek 5f9d40be7a
Replace tile_element_get_type() with struct method 2018-05-02 19:27:04 +02:00
Michael Steenbeek ef433df26a Clean up tile element usage, introduce struct methods 2018-05-02 11:58:12 +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
Gymnasiast 566af0c4f7 Remove residual usages of rideEntry->enabledTrackPieces 2018-03-27 20:40:50 +02:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
Michael Steenbeek bde913ee16 Rename SmallCoords and BigCoords 2018-02-15 22:26:50 +01:00
Michael Steenbeek 45e892e5b5 Allow passing BigCoordsXY into map_get_surface_element_at() 2018-02-15 22:26:50 +01:00
Michael Steenbeek a2260929dd Replace rct_xy_element with BigCoordsXYE 2018-02-15 22:26:50 +01:00
Michał Janiszewski 3f76bd214f Const all the painted tile elements
Extracted from https://github.com/OpenRCT2/OpenRCT2/pull/7036
2018-02-12 16:03:20 +01:00
Richard Jenkins c76b075348 Fix #7052: Infinite loops occur in track circuit iteration 2018-01-20 21:51:26 +00:00
Ted John aa0d7645da Refactor ride_ratings.c to C++ 2018-01-18 22:33:06 +00:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Michael Steenbeek cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Michał Janiszewski 5a8cfb16c8 Clang-format guards for static data
This guards most of the hardcoded data from clang-format.

[ci skip]
2018-01-11 09:19:56 +01:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Michael Steenbeek 91589f57c6 Compile map.c as C++ 2018-01-03 20:40:51 +01:00
Gymnasiast 1626f86acc Compile park.c as C++ 2018-01-01 01:18:12 +01:00
Gymnasiast 23d70a4ac9 Compile ride.c as C++ 2017-12-31 20:43:17 +01:00
Hielke Morsink 4ec213f680 Allow building through water with clearance disabled 2017-12-26 16:16:06 +01:00
Michael Steenbeek 282e70a806
Allow building level crossings without cheats 2017-12-20 18:20:31 +01:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Hielke Morsink 5fa292207f Replace character \U3000 with simple space 2017-12-13 17:53:06 +01:00
Michael Steenbeek e3c52360db Remove most usages of separate flag
This removes most usages of the separate flag, instead relying on ride groups to do its job.
Research is more complicated and will follow in another commit.
2017-12-08 10:28:29 +01:00
Michael Steenbeek 171271215e Change some ride type names for clarity, fix Americanism 2017-12-08 07:59:44 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
platipo 789b47b7bb Refactor slope flags and path type flag 2017-11-18 12:58:27 +01:00
Michael Steenbeek 8027af56b6 Fix multi-dim coasters freezing and crashing 2017-11-17 23:23:45 +01:00
Michael Steenbeek 9a4021996f Remove unnecessary comment
[ci skip]
2017-11-17 12:54:47 +01:00
Michael Steenbeek dd6257af1e Tackle the two residual usages of the colour property 2017-11-17 12:54:47 +01:00
Michael Steenbeek 60d5d5ca1e Cleanup 2017-11-17 12:54:47 +01:00
Michael Steenbeek f448d16707 Add methods for getting and setting track element type 2017-11-17 12:54:47 +01:00
Michael Steenbeek ab3f42f1f9 Add getters and setters for ride index and maze entry 2017-11-17 12:54:47 +01:00
Michael Steenbeek 74209c7282 Move track tile element functions to Track.cpp 2017-11-17 12:54:47 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michael Steenbeek af845beb61 Replace mapElement with tileElement 2017-10-31 19:59:06 +01:00
Michael Steenbeek ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +01:00
Michał Janiszewski 90a14205c8 Compile track_data.c as C++ 2017-10-25 23:53:47 +02:00
Michael Steenbeek ce4899c60c Compile station.c as C++ 2017-10-23 14:47:12 +02:00
Michael Steenbeek a23a40b447 Fix alignment and include order 2017-10-17 16:16:20 +02:00
Michael Steenbeek 0cb1e57cc6 Fix preview Z offset table entries 2017-10-17 13:59:57 +02:00
Michael Steenbeek a1621e4eb1 Track.cpp and Track.h: fix formatting 2017-10-17 13:55:53 +02:00
Michael Steenbeek bb01699b7d Compile track.c as C++ 2017-10-17 13:51:47 +02:00
Renamed from src/openrct2/ride/track.c (Browse further)