1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00
Commit Graph

207 Commits

Author SHA1 Message Date
Ted John
b47bcabaf1 Move ui scripting API to libopenrct2ui 2020-04-26 14:34:59 +01:00
Ted John
4a575975f6 Add hook system 2020-04-26 14:34:59 +01:00
Ted John
1acf1e870a Add park API 2020-04-26 14:34:59 +01:00
Ted John
43508e0402 Add script engine and connect to std console 2020-04-26 14:34:58 +01:00
Breno Rodrigues Guimarães
a0619d04cf Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
ifimfree
aaaae16d15 Close #11209: Show a warning when the user is running OpenRCT2 in Wine (#11395) 2020-04-23 19:12:54 +02:00
Michał Janiszewski
5f97637d5e Only suggest final when using non-LTO builds
In LTO builds GCC issues the suggestion-warning from linking stage,
when pragmas are already gone and do nothing.
2020-04-21 13:31:01 +02:00
Tulio Leao
c17127f65b Use named casts on openrct2 root folder (#11139) 2020-04-17 21:36:25 +02:00
Michał Janiszewski
e19eaa6a98 Upload park recording in case of crash 2020-04-02 23:44:59 +02:00
Tulio Leao
9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Michael Steenbeek
4c2a0f279b Fix #10752: Mute button state not correctly set at startup (#10816) 2020-02-22 19:20:14 +01:00
Ted John
be9cb19df5 Replace cURL with WinHttp implementation on Windows
This reduces the number of third party dependencies for Windows builds. WinHttp is quite a nice straight forward API so doesn't involve too much extra code.
2020-02-08 17:47:03 +00:00
Lomash Gupta
36840f3fe0 fixed gExitCode 2020-01-19 18:35:24 -03:00
Tulio Leao
9d09f1b95c Use ScreenCoordsXY on context cursor operations (#10364) 2019-12-14 22:52:18 +01:00
babywashbear
86844d2a57 Context: replace 2nd std::make_unique<Context> with CreateContext call (#10139) 2019-10-29 17:41:49 +01:00
Michael Steenbeek
a11762b11a Remove old C functions that only call their equivalent
* Remove old C functions that only call their equivalent

* fix formatting
2019-09-22 14:12:49 +02: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
Ted John
adb5c3aa7f Fix assert when exiting game in scenario editor
The object selection window loads objects when it is closed which is triggered from window_close_all. We need to unload all the objects after this step on shutdown.
2019-08-23 20:15:53 +01:00
Matt
769ed255f3 Refactor game action queue out of network into GameActions 2019-08-21 00:15:39 +02:00
Ted John
c3234b1442 Refactor map animations and dynamically create on park load (#9705) 2019-08-03 22:18:33 +02:00
Ted John
3e28073981 Log path when loading / saving park 2019-07-22 22:15:01 +01:00
nhair
eb13c5a776 Fix #9245: Headless servers apply Discord Rich Presence 2019-06-19 23:02:57 +02:00
ζeh Matt
ee79c11389 Fix desync when host changes map 2019-05-19 17:44:43 +02:00
Matt
c6ea47c631 Make util_rand thread safe 2019-05-12 11:32:33 +02:00
ζeh Matt
c8f822ea70 Gamestate snapshots (#8819)
* Add initial interface.

* Implement move operator in MemoryStream

* Add pod array serialisation traits.

* Add push_back with move semantics to CircularBuffer

* Initial implementation of GameStateSnapshots

* Add GameStateSnapshots to Context.

* Add mp_desync console command.

* Compare sprite data and fill change list.

* Minor changes.

* Proof of concept.

* Calculate offset instead of using offsetof

* Implement game state difference detection

* Update mp_desync console command.

* Fix identification of sprite remove/add.

* Fix crash when only one peep in park when using mp_desync

* Output state differences into user directory desync folder.

* Add desync debugging as an option.

* Add information to network status when a desync report was created.

* Cast to proper type for %llu.

* Update xcode project

* Add more information to the diffed data.

* Remove client-only relevant fields.

* Cleanup.

* Add better name output for misc sprites

* Add srand0 and tick information to the output

* Bump up network version

* Cleanup

* Set desync_debugging to false as default

* Apply suggestions
2019-05-11 21:31:34 +02:00
Matt
65ef018e4e Move paint_session_alloc and paint_session_free into Painter. 2019-03-31 15:50:55 +02:00
Matt
db96df010f Expose Painter in Context 2019-03-31 15:50:55 +02:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt
a7f8c8aa36 Refactor utf8* use over std::string 2019-02-24 00:08:05 +01:00
ζeh Matt
a34422dc26 Fix #8591: Game loop does not run at a consistent tick rate of 40 Hz (#8594)
* Fix #8591: Run game loop at consistent tick rate of 40hz.

* Update distribution/changelog.txt

Co-Authored-By: ZehMatt <m.moninger.h@gmail.com>
2019-01-17 23:22:27 +01:00
Matt
0ba42d6899 Fix TileElementWantsFootpathConnection test not releasing context. 2018-12-29 22:58:33 +01:00
Matt
a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00
Matt
8e2e60b117 Fix #8464: Crash on game shutdown. 2018-12-17 23:51:43 +01:00
Ted John
08b02943d3 Use std::string for scenario name, details etc. 2018-12-16 19:01:14 +00:00
Michael Steenbeek
6d0f0334d7 Merge pull request #8339 from ZehMatt/realtime-ticks
Use real time ticks for UI effects.
2018-12-15 21:00:44 +01:00
roosen5
d9806305b0 Fix #8358: infinite loop when changing vehicle count on stopped ride. (#8375)
The sprite_remove in Sprite.cpp tries to find itself inside the quadrant.
It does not find itself, and because the rest of the code assumes that it will always find it
The normal code tries to set the value of the next_in_quadrant so that whoever points at it, will now point at its next sprite.
But because it didn't find whoever was pointing to it, it would set the pointer to SPRITE_INDEX_NULL to its next sprite.
This would lead to cycles in the linked list

The reason that the sprite was not found is that during the entry of a ride, the position of a peep is set to LOCATION_NULL
Exiting a ride sets it back to whatever the location is of an exit.
However stopping a ride that still has people in it would go wrong, as the people are removed from the ride through ride_remove_peeps

This function was called during the PaintWindows.
The fact that this function is called during the painting is the problem, because of the tweening:
Before painting all the positions are stored (Which would at that point be the LOCATION_NULL), during the painting
the peep would be removed from the ride, setting their location to the enrance/exit
After painting is done all the positions are restored again, so the patched position is forgotten and then it would be
removing a sprite with location LOCATION_NULL and that goes wrong

The fix is to have the window update outside of paint
2018-12-09 20:46:04 +01:00
Matt
4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
ζeh Matt
223ae74c6b Refactor code to obtain resolutions. (#8215) 2018-11-06 07:20:57 +01:00
Christian Schubert
f1d5989bc3 Implement #7930: automatically create custom user content folders 2018-09-01 20:36:18 +02:00
Matt
1ca41da2aa Unload objects from context destructor. 2018-08-31 07:18:51 +02:00
Matt
8c6f6a18ab Remove unused passing of object manager. 2018-08-31 07:18:50 +02:00
Matt
71e1b1c21a Remove unnecessary call that can cause null dereference. 2018-08-31 07:18:50 +02:00
Matt
2ac6262293 Use std::unique_ptr for LocalisationService 2018-08-31 07:18:50 +02:00
Matt
837c0a9e7f Use std::unique_ptr for ObjectManager and ObjectRepository 2018-08-31 07:18:49 +02:00
Matt
04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
Michael Steenbeek
f9d60ea106 Allow loading CSS17.DAT and MP.DAT on all three RCT1 sources
This should equalise the three in terms of supported features.
2018-08-14 15:41:51 +02: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