1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00
Commit Graph

99 Commits

Author SHA1 Message Date
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Tulio Leao
c4a865384e Move Mac-only str handling functions to Platform (#10264) 2020-01-04 12:44:40 +01:00
Michał Janiszewski
8637eb6c57 Rename some bits to allow unity builds of libopenrct2 (#9944)
* Rename some bits to allow unity builds of libopenrct2

Some names are clashing when doing a unity build, renaming them solves
the problem.
2019-08-29 23:03:56 +02:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
Ted John
f9101a2d7a Fix #9476: Running simulate command on park yields Completed: (null) 2019-06-24 23:17:48 +01:00
Hielke Morsink
bffc012d16 Implement #1260: --transparent switch for screenshot command 2019-06-09 11:03:00 +02:00
Nicole
d38fb6a7a2 Fix #8800: ensure tile_element_height is used correctly (#9087)
* Changed calls to tile_element_height to tile_element_water_height

* Changes to calls to tile_element_height

* Removed tile element_height, map_get_highest_land_height, and map_get lowest_land_height

3 functions removed due to relocation.

* Added function tile_element_height back to map.cpp

Added tile_element height back to map.cpp. Was unnecessarily deleted.

* Update Map.h

* water_height changes

* Update Scenario.cpp

* Update Scenario.cpp

* Fix 8800: applied clang format

* Removed unnecessary ANDs
2019-04-23 18:26:48 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John
a6e7041f49 Fix #8769: Segmentation fault on host 2019-02-24 23:22:43 +00:00
Matt
a7f8c8aa36 Refactor utf8* use over std::string 2019-02-24 00:08:05 +01:00
Michał Janiszewski
cba2dd96ec Allow specyfing more than one input file for sprite sort benchmark 2019-01-22 19:54:12 +01:00
Michał Janiszewski
b38e600b15 Update sprite sort benchmark to accept filename 2019-01-22 19:45:56 +01:00
Michał Janiszewski
304840069d Add sprite sorting benchmark 2019-01-22 19:45:56 +01:00
ZehMatt
36f75f89a0 Add "simulate" command. 2018-11-30 20:11:10 +01:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Ted John
83ce76fb3f Do not load images when running scan-objects
This prevents CI spitting out warnings where it is unable to load any of the DAT objects.
2018-10-23 22:07:06 +01:00
Ted John
94592f50e6 Allow RCT1 path to be specified as cmdline argument 2018-09-08 22:07:44 +01:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format
d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +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
41bf62fd9c clang-format cmdline 2018-07-23 15:58:02 +02:00
Christian F. Coors
54c0eff6a6 Show command descriptions even if only -a is passed (#7780) 2018-07-13 21:02:19 +02:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek
ec3a1e575e Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +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
9c8c2a2820 Missing field initializers part 2
This commit tackles the more difficult-to-fix warnings that -Wmissing-field-initializers reported. I've compares the new tables in TrackData with the old ones through a script to make sure they are in fact the same.
2018-06-05 00:18:07 +02:00
Michał Janiszewski
6e72ac350f Remove function unused in no-network builds 2018-06-03 19:56:11 +02:00
Hielke Morsink
d0b8a0ec61 Remove spaces from screenshot options 2018-06-01 12:53:20 +02:00
Hielke Morsink
6c65c3d64d Merge pull request #6774 from janisozaur/fixes
Various code improvements
2018-05-15 14:38:43 +02:00
Ted John
529c744276 Use unique_ptr and shared_ptr for services in Context 2018-05-13 00:43:50 +01:00
Ted John
35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John
7dc170ef85 Use shared_ptr for long-life objects
Use unique_ptr and shared_ptr for IContext, IPlatformEnvironment, IUiContext, and IAudioContext.
2018-05-11 20:37:48 +01:00
Michał Janiszewski
0a92e74ced Minor fixes 2018-05-11 15:38:30 +02:00
Hielke Morsink
8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Ted John
41b3a33af4 Merge pull request #7430 from IntelOrca/fix/scan-objects
Fix scan objects and run before tests
2018-04-22 22:11:03 +01: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
4ce4101ac5 Ensure correct language is used for scan-objects 2018-04-20 00:12:40 +01:00
Ted John
6526f9f6cb Fix scan-objects CLI action
Ensure a context is available when objects are loaded.
2018-04-19 13:26:19 +01:00
Michał Janiszewski
3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Michał Janiszewski
28391eaf5d Move cstring out of common.h 2018-03-18 23:29:13 +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
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
Hielke Morsink
e1b99479a2 Make custom paths absolute
Then gCustomUserDataPath and relatant variables are set, they overwrite the gBasePath array, which uses absolute paths. This commit makes the custom paths absolute as well, to prevent issues with assumptions in the code (file dialog for example).
2018-02-08 14:23:21 +01:00
Gymnasiast
34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Richard Jenkins
9a10218275 Update official domain 2018-02-05 13:32:53 +01:00
Ted John
d9d2b2373d Rename crash.h to Crash.h 2018-01-18 21:12:41 +00:00
Michał Janiszewski
3ba0cc3dae Add missed constexprs 2018-01-14 16:13:37 +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