1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00
Commit Graph

97 Commits

Author SHA1 Message Date
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
7c6002cb26 Correct formatting in remaining files in libopenrct2 2018-07-23 16:00:17 +02:00
clang-format
e8310d079d clang-format ride 2018-07-23 16:00:09 +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
b043428cf0 Merge pull request #6998 from JeroenDStout/railway-crossings-wait
Railway crossing behaviour for peeps and vehicles
2018-06-11 09:09:07 +01:00
Ted John
bc1d2252aa Remove window dependency from Ride.cpp 2018-06-10 23:34:36 +01:00
Ted John
b4d3806614 Unblock tiles when vehicles are removed from ride 2018-06-10 22:59:58 +01:00
Hielke Morsink
5d0022a5cb Remove argument list from zero-initializers with zero/false/nullptr value 2018-06-04 19:50:46 +02:00
Michael Steenbeek
a14d59028f Modify some commands to use CoordsXY 2018-06-04 19:18:52 +02:00
jensj12
b94f5ea9d8 Fix #7568: Demolish button causes hang
Fixed by adding the standard infinite loop check. Also makes the save button save the entire track again. Affects cost of refurbishing.
2018-06-01 10:34:32 +02:00
Hielke Morsink
2fed57d792 Check for ghost flag when removing track blocks (#7596) 2018-05-31 22:36:45 +02:00
Michael Steenbeek
b573bd49b3 Replace all occurrences of tile_element_is_last_for_tile() 2018-05-24 11:44:53 +02:00
jensj12
b6b3486a3d Fix cost being shown as 0 while paused 2018-05-23 16:33:37 +02:00
jensj12
56fcd2ec94 Use ride_get_start_of_track in TrackDesignSave 2018-05-23 16:33:37 +02:00
jensj12
23dc6bb9d3 Add button to refurbish ride
Add a button to refurbish the selected ride. The cost for this is 35% of the
build price and may only be done if the ride is closed and empty.
2018-05-23 16:33:37 +02:00
Ted John
29fb1b7692 Fix #7534: Train/No.cars/Vehicles quantities frozen on custom or pre existing rides 2018-05-17 19:05:45 +01:00
Ted John
34531f7afb Fix signed/unsigned mismatch warnings (#7529)
Unignore MSVC warning: C4245:
'conversion_type': conversion from 'type1' to 'type2', signed/unsigned mismatch
2018-05-16 21:22:17 +01:00
Michael Steenbeek
fcf507e051 Spin off shop item stuff to separate files 2018-05-14 19:21:43 +02:00
Ted John
d7e93cec27 Prevent use of Context during ~Context 2018-05-13 00:43:56 +01:00
Hielke Morsink
afac7f6557 Make more global functions part of rct_peep 2018-05-05 11:42:43 +01:00
duncanspumpkin
fcb66b7449 Start refactoring pathfinding to use tileCoords 2018-05-05 11:42:34 +01:00
duncanspumpkin
ddbcae801e Use correct remove function 2018-05-05 11:42:27 +01:00
duncanspumpkin
5d7da79702 Label next_var_29. Add accessor functions.
Removed unused flag (1<<4). Not set in any save. Possibly left over from RCT1
2018-05-05 11:42:15 +01:00
duncanspumpkin
a94fb2fa2e Use Invalidate 2018-05-05 11:35:54 +01:00
duncanspumpkin
8d37502c7a Further use of SetState 2018-05-05 11:08:17 +01:00
duncanspumpkin
cbefe633d0 Further fixing 2018-05-05 11:06:26 +01:00
duncanspumpkin
f245d049f1 Further fixing 2018-05-05 11:04:49 +01:00
Michael Steenbeek
5f9d40be7a Replace tile_element_get_type() with struct method 2018-05-02 19:27:04 +02:00
Michael Steenbeek
b725916808 Use TitleCase 2018-05-02 13:27:53 +02:00
Michael Steenbeek
ef433df26a Clean up tile element usage, introduce struct methods 2018-05-02 11:58:12 +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
duncanspumpkin
e4e514c743 Fix travis errors. Revert mistaken rename.
Use enum where known

Remove unused cases
2018-04-11 18:16:23 +01:00
duncanspumpkin
765500adfa Label offsets and functions
Actually save before commiting

Label more peep vars.

Remove unread var

Further refactoring

Fix mistake in map element type
2018-04-11 18:16:09 +01:00
duncanspumpkin
a24c2672fd Label all peep ride sub states
Add additional notes to function.

Perform exorcism on code base

Use vector for carArray
2018-04-11 18:15:47 +01:00
duncanspumpkin
fc14f6e635 Refactor peep update ride sub state 0 2018-04-11 18:13:17 +01:00
Hielke Morsink
dc673a64d8 Give context the ownership of repositories and the object manager (#7340)
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Michael Steenbeek
cfb5a6b39d Correct spelling of 'sujonkwa' 2018-03-29 13:00:01 +02:00
zaxcav
9d3e1fbedf Fix #7176 pending breakdown interfering with mechanic heading to inspection (#7201)
* Fix pending breakdown interfering with mechanic heading to inspection

* Rename peep_fixing sub states per suggestions.

Reset ride->mechanic_status to UNDEFINED in sub-state finish fix/inspect (previously sub_state_13).

* Increment network version. Fix tabs/spaces
2018-03-20 21:55:30 +00:00
Michał Janiszewski
cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski
9b0fe5f09e Don't use registers struct where not strictly required
The only advantage of `struct registers` is the union hierarchy. If this
is not being actively exploited, it is detrimental to use this struct.
2018-03-14 22:11:30 +01:00
Ted John
42490b64fc Show entrance / exit fix messages as verbose only
This is because some title sequences have parks which need fixes and they end up showing on stdout every game launch.
2018-03-10 15:18:25 +01:00
Hielke Morsink
4bfeaf0c72 Fix #6870 Crash when loading groena lund
This crash only occurs when the option "no test crashes" was enable. With this commit the sprite index will be checked before the vehicle gets checked.
2018-03-10 06:50:45 +00:00
Michael Steenbeek
88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Michael Steenbeek
1fa2fa8f80 Refactor ride->entrances and ride->exits 2018-03-07 19:10:50 +01:00
ZehMatt
e3708c0593 Split special direction to new parameter. 2018-03-05 00:17:34 +01:00
ZehMatt
bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
Aaron van Geffen
ba1d269227 Move all Virtual Floor code from Map to its own file. 2018-03-04 19:28:56 +01:00
ZehMatt
fdf7adecd9 Fix #7002: Always invalidate virtual floor regardless of selection. 2018-03-04 19:28:56 +01:00