Commit Graph

205 Commits

Author SHA1 Message Date
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Michael Steenbeek 91589f57c6 Compile map.c as C++ 2018-01-03 20:40:51 +01:00
Hielke Morsink eb4a8924d1 Refactor and clean up footpath-related code
This commit corrects some misused defines, and gave them clearer names.
For example, the slope mask was only useful for surface elements, so now
"SURFACE" is in its name. I also replaced any hard coded values that I
could find and knew their purpose off.
2018-01-03 10:57:37 +01:00
Michael Steenbeek c4f44e5e7a Compile files in paint folder as C++ 2017-12-17 17:24:36 +01:00
platipo 789b47b7bb Refactor slope flags and path type flag 2017-11-18 12:58:27 +01:00
Enrico Paganin 8ffe7d5b43 Refactor maze flags 2017-11-17 17:03:57 +01:00
Michael Steenbeek ab3f42f1f9 Add getters and setters for ride index and maze entry 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 75685fa75d Fix #3781: Glitchy map causing crash 2017-10-30 12:03:34 +01:00
Michał Janiszewski 90a14205c8 Compile track_data.c as C++ 2017-10-25 23:53:47 +02:00
Michael Steenbeek bb01699b7d Compile track.c as C++ 2017-10-17 13:51:47 +02:00
Michael Steenbeek 7f9c25a7a9 Use constant for LOCATION_NULL, split off location stuff to Location.h 2017-10-13 22:23:07 +02:00
Michael Steenbeek 3a9dc3f491 Ensure that get_ride_entry returns NULL on invalid ride entries 2017-10-12 21:07:35 +02:00
Michał Janiszewski c4538496c5 Make sure variables are either static or declared externally 2017-10-09 22:59:40 +02:00
Michael Steenbeek e25d6b807d Fix refactor error in MiniGolf.cpp 2017-10-09 15:33:34 +02:00
Michael Steenbeek 2fd4d39456 Fix compilation in Visual Studio 2017-10-09 15:24:51 +02:00
Michał Janiszewski 7bdcc3345f Rename files to C++ convention 2017-10-09 15:24:22 +02:00
Michał Janiszewski a9dafef0f4 Apply C++ formatting 2017-10-09 15:24:21 +02:00
Michał Janiszewski a8c8f726ee Compile ride drawing code as C++ 2017-10-09 15:24:20 +02:00
Ted John 3a9cafd2f0 Remove gTrackColours macro (#6266) 2017-09-12 19:48:18 +01:00
Gymnasiast a28509e24c Split Ride and rct2_ride 2017-09-12 11:16:57 +02:00
Ted John 43c6f7fda0 Pass paint session to ps functions 2017-09-03 02:27:07 +01:00
Ted John f2b8cf181e Pass paint session to remaining support functions 2017-09-03 01:56:56 +01:00
Ted John 1cc82d1cb5 Pass paint session to tunnel functions 2017-09-03 01:51:59 +01:00
Ted John 972a3bf111 Pass paint session to track_paint helpers 2017-09-03 01:42:08 +01:00
Ted John dce007feaa Pass paint session to support functions 2017-09-03 01:04:23 +01:00
Ted John 0f9784a423 Pass paint session to many specific track helpers 2017-09-03 00:34:33 +01:00
Ted John 90f4478f48 Pass paint session to all track functions 2017-09-03 00:19:17 +01:00
Ted John 2980be0667 Pass paint session to more ps functions 2017-09-02 23:22:19 +01:00
Ted John 6a9cd63874 Pass paint session to some vehicle paint functions 2017-09-02 23:05:58 +01:00
Ted John a0f5f1243f Remove more map element paint globals 2017-09-02 17:11:59 +01:00
Ted John eb7b1e7b7e Remove global, gPaintMapPosition 2017-09-02 17:11:59 +01:00
Ted John 5730a36555 Simplify gPaintMapPosition to rct_xy16 2017-09-02 17:11:59 +01:00
Ted John 1d04f334e3 Change more paint globals to use gPaintSession 2017-09-02 17:11:58 +01:00
Philip Goto 6547116401 Fix #6193: All rings in Space Rings use the same secondary colour (#6194)
The Space Rings attraction used the secondary colour of the first ring no matter if the colours are set to all the same or different per ring. Now it uses the right colour for each ring.
2017-08-17 20:06:08 +02:00
Michael Steenbeek 367efa2020 Use remap flags, SPRITE_ID_PALETTE_COLOUR_1 and _2 in many more places 2017-07-20 20:56:29 +02:00
Michael Steenbeek bb09019d9b Name and fix vehicle entry and tertiary colour flags 2017-07-20 12:57:37 +02:00
Michael Steenbeek 7a4e7e17a1 Fix incorrect terminology 2017-07-18 18:07:43 +02:00
Michael Steenbeek 44af1653a6 Replace 'center' with 'centre' (#5745) 2017-06-30 23:11:28 +01:00
Gymnasiast 0db5bc6bd2 Define max vehicles per ride entry, use SPRITE_INDEX_NULL more 2017-06-20 13:38:23 +02:00
Michał Janiszewski 61d38511bc Expand tabs to spaces
This commit expands tabs to spaces (ts=4) in all the files under src/
and test/.

Until now we had two wildly different code styles with C using tabs and
new C++ using spaces. It is painful to maintain as none of the commonly
used tools support this kind of setup and in reality is needless, as we
can simply convert all the sources to spaces and have opened PRs do the
same, where needed.

Additionally, trailing whitespace has been removed.
2017-06-06 23:46:14 +02:00
rwjuk 325bb3e2da Name sub_88ABA4() 2017-06-06 01:16:44 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
CraigCraig 26287f5a3e More readability, grammar, spelling fixes 2017-05-15 09:28:43 +02:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Michael Steenbeek cad39c788a Remove more magic values from metal_a_supports_paint_setup 2017-02-02 21:54:19 +01:00
Broxzier 60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Ted John b79af110c7 Fix more warnings 2017-01-12 18:02:28 +00:00
Michael Steenbeek 92feea1612 Clean up metal supports 2017-01-11 20:23:47 +01:00
Ted John 25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00