Commit graph

48 commits

Author SHA1 Message Date
clang-format
7eafeaa971 Apply clang-format changes to tests 2018-07-23 16:00:23 +02:00
clang-format
42fa1b0f63 clang-format tests 2018-07-23 15:58:01 +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
de3cab59bb Fix warnings reported by travis 2018-06-05 16:07:54 +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
Michał Janiszewski
f1ab13f56e Fix sorting and missed floor() usage 2018-03-18 23:29:13 +01:00
Michał Janiszewski
28391eaf5d Move cstring out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski
f3bdc431e1 Add lost headers 2018-03-18 23:29:13 +01:00
Hielke Morsink
55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Gymnasiast
5cc21fd21b Replace NULL with nullptr in C++ files 2018-01-29 21:33:21 +00:00
Michał Janiszewski
c8048df5a6 Rename header files for testpaint 2018-01-11 16:29:52 +01:00
Michał Janiszewski
5e72d7423a Update testpaint 2018-01-11 09:30:09 +01:00
Michael Steenbeek
6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Gymnasiast
23d70a4ac9 Compile ride.c as C++ 2017-12-31 20:43:17 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +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
Michał Janiszewski
5ab9f938a7 Update files missed in the great extern "C" cleanup of 2017 2017-09-28 23:29:16 +02:00
Gymnasiast
4059d9e8a7 Clean up boosters, ride_type_null, max rides per entry, formatting 2017-06-14 16:06:43 +02:00
Ted John
29f0372da8 Reduce SDL2 in headers 2017-06-12 19:56:32 +01: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
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
Michael Steenbeek
2b35986746 Add and use constant for number of ride types 2017-01-05 09:19:22 +01:00
Marijn van der Werf
24a0405345 Update testpaint 2017-01-04 18:28:40 +00:00
Michał Janiszewski
3f7fd56328 Remove trailing whitespace in sources 2016-11-13 20:32:55 +01:00
Marijn van der Werf
157d535f67 Only fallback if only one element differs 2016-10-22 02:40:35 +02:00
Marijn van der Werf
1be2dd996c Make testpaint a lot more quiet 2016-10-19 01:58:47 +02:00
Marijn van der Werf
a44745e2fa Fix General/SegmentSupportHeightCalls 2016-10-17 23:12:54 +02:00
Marijn van der Werf
a93e12b5d9 Add silent mode 2016-10-17 20:04:13 +02:00
Marijn van der Werf
455080d8b8 Fix MSVC 2016-10-17 15:36:26 +02:00
Marijn van der Werf
18d9b1e91e Don't use C for PaintIntercept functions 2016-10-17 12:45:27 +02:00
Marijn van der Werf
deb266c443 Extract SupportHeightCalls 2016-10-17 12:43:14 +02:00
Marijn van der Werf
334b8cca05 Extract all of intercept.c to C++ 2016-10-17 12:43:14 +02:00
Marijn van der Werf
3b19dc02d3 Extract utilty functions 2016-10-17 12:43:14 +02:00
Marijn van der Werf
d6772865f5 Use return codes for test results 2016-10-17 12:43:13 +02:00
Marijn van der Werf
6a902f4f92 Ignore unused variable warnings 2016-10-11 02:11:38 +02:00
LRFLEW
7dccbba8b2 Improve String Handling in PaintTest 2016-10-09 15:29:58 -05:00
Ted John
ec082b4ac8 Generate set segment support height and other fixes 2016-10-07 23:55:17 +01:00
Ted John
a0f041b43a Start initial generation of ride and general support calls 2016-10-07 21:49:23 +01:00
Michał Janiszewski
43eba72f66 Fix testpaint for GCC 2016-10-02 10:41:03 +02:00
Ted John
0070f0d057 Add listing of ride types, inc. status in testpaint 2016-09-24 11:54:45 +01:00
Ted John
0c569e6b02 Add support for passing a single ride type to testpaint 2016-09-24 11:20:12 +01:00
Ted John
9fe4a9b41f Add support for Windows coloured console 2016-09-24 11:20:12 +01:00
Marijn van der Werf
1c585e45e3 Improve Visual Studio compatibility 2016-09-16 19:45:10 +02:00
Michał Janiszewski
88ffe5f8c2 Fixes for testpaint
Test of `paint_launched_freefall_tower_section` is invalid. Do note this
function [expects another element right past the one just
passed](https://github.com/OpenRCT2/OpenRCT2/blob/d00aa2c/src/ride/thrill/launched_freefall.c#L147):

```
rct_map_element * nextMapElement = mapElement + 1;
```

but you pass only a single map element, which is not marked as last for
tile. The same prevails throughout other tests.
2016-09-16 19:44:56 +02:00
Michał Janiszewski
f354c0ec3f Fix testpaint target for Linux 2016-09-16 19:44:45 +02:00
Marijn van der Werf
df202d86a6 Change folder structure 2016-09-16 19:44:40 +02:00
Renamed from PaintTest/main.cpp (Browse further)