1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00
Commit Graph

109 Commits

Author SHA1 Message Date
Michael Steenbeek
5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
ζeh Matt
993b168bfd Implement profiler (#16194)
* Implement profiling API

* Add console commands for the profiler

* Remove accidental line

* Correct csv output

* Add copyright notice

* Add missing override

* Add default virtual destructor

* Explicitly pass template argument

* Use static

* Add plugin API for profiler

* Add more profile calls

* Workaround for GCC hopefully

* Add missing static keyword

* Use uint64 for call count

* Reduce name length see if CI passes

* Improve handling of function names

* Work around (broken) static inline variables

* Fix missing include

* Disable profiler for clang 5 and older

* Update copyright date

* Profile UpdateAllMiscEntities

* Apply review suggestions

Co-authored-by: Ted John <ted@brambles.org>
2022-01-18 20:21:20 +02:00
frutiemax
adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
ζeh Matt
56e78d5733 Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
ζeh Matt
7c726e2a0c Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt
83b911b193 #15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
ζeh Matt
c7fa1b44e9 Pass name during registration and minor cleanup 2021-11-11 15:50:01 +02:00
ζeh Matt
96e2641d0d Remove macro for registration and cleanup 2021-11-10 19:42:23 +02:00
ζeh Matt
2d78a5efc3 Move GameActionResult into its own unit (#15588) 2021-10-19 17:50:24 -03:00
Hielke Morsink
53c22c9b4b Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
Hielke Morsink
4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Michael Steenbeek
624a32e93b Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
Matt
2b4b204ad8 Fix #14724: Money was ignored for ride creation 2021-05-23 19:58:47 +03:00
ζeh Matt
38c7a70025 Fix #14710: Preview not shown without enough money (#14711)
* Fix #14710: Preview not shown without enough money

* Bump up network version

* Add changelog.txt entry
2021-05-23 09:45:48 -03:00
Duncan
816bf827ab Split off a number of entity files into separate headers (#14629)
* Split off a number of entity files into seperate headers

* Get compiling

* Update copyright date
2021-05-13 07:56:24 +01:00
Michał Janiszewski
8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Mike Jones
4e991beb8d Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Tulio Leao
0981b49e99 Fix #8957: Error title missing when building w/ insufficient funds (#13020) 2020-10-01 23:19:34 -03:00
Matt
2a9796f2cc Add more guards in network code 2020-08-11 15:56:09 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Duncan
50d22ededd Create a hookable location checking function for actions (#11860)
* Create a hookable location checking function for actions

* Add location valid to a number of game actions

Actually pass the coordinates to the script

Use LocationValid on further game actions

Add further actions to the LocationValid. Update api

Update remaining actions to use LocationValid

* Fix bug with peep pickup

Adjust api
2020-06-16 20:57:11 +01:00
Duncan
3c89d5ec12 Fix #11490. Crash with error message titles (#11502)
Error message titles for rides are composed from the ride name string id and therefore require passing the error message args.
2020-04-27 15:22:33 +02:00
Ted John
c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John
d480fb8daa Apply suggestions from code review
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
Co-Authored-By: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-04-26 14:35:07 +01:00
Ted John
e1c08defc8 Remove use of std::variant 2020-04-26 14:35:07 +01:00
Ted John
efcf9fd22a Implement hooking game actions 2020-04-26 14:35:05 +01:00
Ted John
83fe0cf5c5 Implement strings for GameAction errors 2020-04-26 14:35:05 +01:00
Michał Janiszewski
2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Breno Rodrigues Guimarães
2479256bc1 Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Breno Rodrigues Guimarães
d4a2a98e20 Replacing set_format_arg_on macro in favor of a more C++zy solution (#11350) 2020-04-20 07:10:33 +02:00
ζeh Matt
b86854a259 Fix #10587: Update last action coordinates on correct player (#10845) 2020-02-28 16:23:41 +01:00
duncanspumpkin
164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Matt
ef4a3d0528 Fix #10489: Hosts last action not being synchronized 2019-12-31 10:34:33 +01:00
Duncan
d486ac4d3b Reduce direct usage of LOCATION_NULL (#10480)
* Reduce direct usage of Location_Null

Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.

* Remove incorrect AND with LOCATION_NULL

In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Matt
52ee9c6896 Use enum class for ExpenditureType 2019-12-22 20:51:55 +01:00
Duncan
3be7d824ac Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
Matt
fbe0506ca8 Add game action type to the assert in GameActions::ProcessQueue 2019-10-31 17:27:55 +01:00
Matt
0c11bbd4e7 Fix #9994: Game action tick collision during server connect and map load 2019-10-05 13:09:21 +02:00
Matt
d6d480a31b Fix desyncs because of GameActions ignoring the tick on client 2019-08-23 23:06:27 +02:00
Matt
769ed255f3 Refactor game action queue out of network into GameActions 2019-08-21 00:15:39 +02:00
Matt
8ab0ca4f8f Fix DataSerialiser returning the wrong stream object 2019-07-27 16:06:26 +02:00
aw20368
8c20b635bd Fix #9270: Refactor money effect
Changed static functions to rct_money_effect member functions. GetStringId now returns std::pair.
2019-05-21 21:22:47 +02:00
Filip Gawin
6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
ζeh Matt
181a722c3b Fix game action errors not showing if no round trip was done (#9175) 2019-05-01 22:53:10 +02:00
Michael Steenbeek
42a1a8704d Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
duncanspumpkin
356a0e5e91 Rework flags 2019-04-04 19:23:44 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt
2090cbefae Fix #8851: Show only game action errors to the issuer. 2019-03-15 21:27:51 +01:00
Matt
6350a3b0b4 Fix nested query not working in paused game state. 2019-03-01 08:26:03 +01:00