Commit Graph

102 Commits

Author SHA1 Message Date
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
Hielke Morsink 73a7e935c3 Correct formatting for files in the project root 2018-07-23 16:00:17 +02:00
clang-format 16720f0182 clang-format UI drawing 2018-07-23 16:00:13 +02:00
Hielke Morsink ce59ed0ba2 Fix include order and defines for Windows builds 2018-07-23 15:57:59 +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
Ted John f0348dafb7 Fix MSVC warning 2018-05-13 01:11:56 +01:00
Ted John 7eb1703f36 Remove old bitmap code via UiContext 2018-05-13 01:11:56 +01:00
Ted John 229c50dff9 Add bitmap reading support 2018-05-13 01:11:56 +01:00
Ted John 302fe00805 Always pass shared_ptr by reference 2018-05-11 20:39:00 +01:00
Ted John 466c465d44 Use unique_ptr and shared_ptr for IDrawingEngine 2018-05-11 20:37:48 +01:00
Ted John 7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00
Michał Janiszewski b26d484726 Fix remaining headers 2018-03-31 23:48:15 +02:00
Hielke Morsink b62017657b Fix header dependencies for openrct2-ui 2018-03-31 23:07:14 +02: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
Ted John 39a38dc193 Include SDL2 using sub directory 2018-03-09 16:28:47 +01:00
Ted John e318e0948a Fix a few assertions that were found when using debug CRT 2018-03-09 16:28:47 +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
Michał Janiszewski 8b72c4f1ad Fix mismatched deleter in TextureCache (#7138) 2018-02-06 20:51:40 +00:00
Ted John df26354376 Fix drawing glyphs in OpenGL 2018-01-24 18:49:30 +00:00
Ted John 02d783a993 Fix build 2018-01-21 12:41:42 +00:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John 131286f758 Refactor memory handling in OpenGLShaderProgram.cpp 2018-01-21 11:17:41 +00:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Michał Janiszewski 6a65f791b6 Add const to arguments 2018-01-10 23:58:57 +01:00
Michał Janiszewski 9c84ae30fb Hide colliding "struct VDStruct" definitions to anon namespaces 2018-01-09 11:01:03 +00:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
ZehMatt d25c46ef93 Refactor image cache to fixed size. 2018-01-07 02:18:12 +00:00
Ted John 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Ted John 0c3c998177 Refactor lightfx.c to C++ 2018-01-05 22:57:55 +01:00
Ted John 02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Michał Janiszewski 4d0c88fb94 Mark constructors explicit (#6928) 2018-01-04 01:12:34 +00:00
Michael Steenbeek c4f44e5e7a Compile files in paint folder as C++ 2017-12-17 17:24:36 +01:00
LRFLEW eed00ea363 Add Vsync Toggle to Options 2017-12-14 11:18:28 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Ted John b5137b0e37
Merge pull request #6574 from IntelOrca/protect-g1-access
Refactor g1 access
2017-11-16 18:51:32 +00:00
kitsunenokenja 04f0048430 Add missing header include for std::ceil call (#6655)
OpenGLDrawingEngine::ConfigureCanvas calls std::ceil which is defined by
the cmath include. Adding the include directive resolves a compilation
failure to due std::ceil being otherwise undefined.
2017-11-12 14:02:30 +00:00
Michał Janiszewski cabed0cef5 Remove unused field 2017-11-08 06:53:17 +01:00
Philip Goto 19abb62586 Add Smooth NN scaling to OpenGL renderer 2017-11-06 23:05:21 +01:00
Philip Goto 360cd813b7 include cmath in HardwareDisplayDrawingEngine 2017-11-06 23:05:21 +01:00
Philip Goto 36bece4cf1 Destroy _scaledScreenTexture on destroying hardware engine 2017-11-06 23:05:21 +01:00
Philip Goto 6377ac7bfb Create enum for scale quality 2017-11-06 23:05:21 +01:00
Philip Goto b66df2d6db Add smooth nearest neighbor scaling
This commit implements smooth nearest neighbor scaling, this scaling method looks sharper than linear scaling and not deformed like NN scaling.
2017-11-06 23:05:21 +01:00
Ted John 444a8c1602 Const protect get_g1_element 2017-11-03 22:18:10 +00:00
Ted John 5a05bd51e5 Use get_g1_element and add null checks 2017-11-03 22:18:10 +00:00