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

80 Commits

Author SHA1 Message Date
Łukasz Pękalski
dc93cacbee bugHunt: correcting code to compile
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Gymnasiast
eb2f40f35c Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Gymnasiast
6e22eade67 Create Objective struct and use it for global objective 2020-09-09 15:38:03 +02:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
Michael Steenbeek
cd86d3d757 Fix #7969: Loading landscape resets money, inventions and objective (#12520) 2020-07-30 21:43:46 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
f49149222e Close #12245: Use coords objects for SetLocation (Window_internal.h) 2020-07-16 23:01:42 +02:00
duncanspumpkin
904e6c6987 Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls

Further use of GetSprite

Use GetSprite in all remaining easy to use functions

Correct formatting

Rename GetSprite to GetEntity

Make suggested changes

Remove const to allow for building

Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
duncanspumpkin
5c48e5f0bb Remove AsPeep 2020-06-06 11:36:48 +01:00
Gymnasiast
cc65564521 Use (RCT12)ObjectEntryIndex in more places 2020-05-01 22:06:13 +02:00
Tulio Leao
c17127f65b Use named casts on openrct2 root folder (#11139) 2020-04-17 21:36:25 +02:00
Tulio Leao
1b3f0e9a44 Create ScreenCoordsXY gSavedView from separate x,y variables 2020-02-22 16:01:21 -03:00
Tulio Leao
47025c45b4 Make setMainView() use ScreenCoordsXY 2020-02-22 16:01:21 -03:00
Tulio Leao
6189d13b2c Use CoordsXYZD on footpath_is_connected_to_map_edge() 2020-01-11 11:13:05 -03:00
Matt
b046d45c01 Refactor window_set_location to use rct_window::SetLocation 2019-08-11 17:21:56 +02:00
Ted John
40d49b93d3 Do not use user strings for peep names 2019-07-29 19:18:16 +01:00
Ted John
6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
Ted John
0b4d989a67 Rename get_banner to GetBanner 2019-07-26 17:24:19 +01:00
Ted John
5c07c53faf Refactor get banner 2019-07-25 22:21:19 +01:00
duncanspumpkin
3ac596faf1 Implement ScenarioSetSetting game action
Further work moving game commands into the game action framework to improve design.
2019-05-14 21:46:27 +01:00
duncanspumpkin
b9a70d02a3 Make suggested changes
Implement suggestions

Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin
e9e445837f Add landset/buyrights action 2019-05-12 17:29:19 +01:00
Michael Steenbeek
42a1a8704d Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John
520b1b4819 Try out changed sprite structs for main game 2019-02-25 12:29:31 +00:00
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