1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00
Commit Graph

52 Commits

Author SHA1 Message Date
Richard Fine
e90e9dd73f Introduce many uses of direction_reverse
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Ted John
08b02943d3 Use std::string for scenario name, details etc. 2018-12-16 19:01:14 +00:00
Ted John
4195f0d9c9 Change gPeepSpawns to a vector so we can now have more than 2 2018-12-16 19:00:16 +00:00
Ted John
19a687f2fa Change gParkEntrance to a vector so we can now have more than 4 2018-12-16 19:00:16 +00:00
Ted John
06f203a7e7 Implement surfaces, edges and stations as objects 2018-12-09 23:30:40 +00:00
Matt
a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +02:00
Michael Steenbeek
9f891bfdcc Allow opening SV7 files 2018-08-16 16:16:56 +02:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01: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
c57bbca827 clang-format root 2018-07-23 16:00:14 +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
Ted John
85dc161c5a Add SetMainView to WindowManager 2018-06-10 23:33:52 +01:00
Ted John
1e7560e7da Do not include GameState.h in Context.h 2018-05-30 12:50:25 +01:00
Aaron van Geffen
dcff6895b5 Refactor game_init_all into GameState::InitAll. 2018-05-30 11:53:32 +02:00
Ted John
96a0a22cd1 Make start on loading objects only once 2018-05-29 18:39:12 +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
Michał Janiszewski
cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +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
Gymnasiast
7a2a73b418 Fix #7205: Park entrance fee cannot be set higher than £100 2018-02-21 22:37:54 +01:00
Ted John
d905dde070 Simplify selected object flags 2018-02-12 12:48:41 +00:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Marijn van der Werf
7d0417a366 Import private headers in remaining files 2018-01-18 22:57:55 +01:00
Marijn van der Werf
430bf482f2 Add viewport getter 2018-01-18 22:57:55 +01:00
Michael Steenbeek
0ae5d7d476 Remove research_remove_non_separate_vehicle_types()
This removes more usages of the SEPARATE_RIDE flag.
2018-01-09 21:35:10 +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
347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Hielke Morsink
628039dd8a Use range-based for loops in libopenrct2 2017-12-21 23:47:30 +01:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek
3868b100df Stop encrypting money
It serves no purpose any more. Of course, we still need the ENCRYPT_MONEY() and DECRYPT_MONEY() functions for importing and exporting S6 files.
2017-12-07 23:22:24 +01:00
Marijn van der Werf
34e27a2408 Sort includes 2017-12-07 17:52:03 +01:00
Marijn van der Werf
2d776de772 Extract functions from EditorObjectSelection 2017-12-07 17:52:03 +01:00
Marijn van der Werf
862ab26cc1 Move object selection window to UI module 2017-12-07 17:52:03 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Michael Steenbeek
3f8556c85a Fix #6294: Refactor Editor::SelectedObjects 2017-11-28 13:38:54 +01:00
Marijn van der Werf
f19344aea6 Move tile inspector to UI module 2017-11-23 23:12:25 +01:00
Marijn van der Werf
67ebf40f83 Move main editor window to UI project 2017-11-18 21:07:21 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michał Janiszewski
8fd2266bda Refactor includes (#6512)
* Refactor Intent.h inclusion

* Use forward declaration of ITcpSocket

* Remove unused include

* Forward declare rct_ride_entry

* Remove unused headers

* Forward-declare rct_drawpixelinfo

* Remove unused headers

* Lower header include from header to source file

* Reduce included headers

* Reduce includes
2017-10-19 10:01:05 +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
Michał Janiszewski
ab3835719a Compile peep and staff logic as C++ 2017-10-13 10:06:36 +02:00
Michael Steenbeek
42d6a10952 Compile management as C++ 2017-10-11 21:38:26 +02:00
Michael Steenbeek
17557569d0 Turn 'unlock all prices' into a regular option
This uses a previously unused S6 flag to save this option persistently.
This should not make S6 import much harder, but should reduce the amount of questions about S4 import.

Also refactor the checks whether the user can ask money for rides or entry. This should make it a lot easier
when our own save format comes around.
2017-10-11 08:33:17 +02:00
Michał Janiszewski
c4538496c5 Make sure variables are either static or declared externally 2017-10-09 22:59:40 +02:00
Marijn van der Werf
d02976695d Move new ride and research windows 2017-10-07 22:24:14 +02:00
Marijn van der Werf
b7164c5eac Rename intent extra keys 2017-09-24 22:41:49 +02:00