1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00
Commit Graph

136 Commits

Author SHA1 Message Date
Duncan
472f7f55c5 Remove hard cap of 0x80 scenery items in a group (#16853)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-03-22 21:38:54 -03:00
Michael Steenbeek
f0ee220ec6 Fix messages [ci skip]
Co-authored-by: pizza2004 <chad@neejean.org>
2022-02-12 12:28:37 +01:00
Gymnasiast
5a0be004de Guard against invalid entry indices in ride_entry_is_invented() 2022-02-12 00:31:43 +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
Michael Steenbeek
2fa33983ad Close #16013: Refactor RCT12Research import (#16350)
* Remove unused symbols in Research.h

* Move RCT12ResearchItem conversion out of Research.cpp/h
2022-01-03 10:20:04 +00:00
frutiemax
adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
ζeh Matt
16635b9192 Implement custom BitSet and replace std::bitset 2021-12-12 23:47:17 +02:00
Duncan
79b12d2953 Introduce DATLimits.h for RCT2 Dat file object limits (#16034) 2021-12-01 21:55:52 +00:00
Duncan
cc22b584fd Introduce RCT2 namespace (#16037)
* Introduce RCT2 namespace

* Drop RCT2:: prefix where possible

* Drop RCT2 from structure names

* Reduce header includes
2021-11-28 16:51:38 +00:00
Duncan
275d565e52 Start splitting up ride.h (#16011)
* Start splitting up ride.h

* Use cstdint instead of common.h
2021-11-26 15:03:14 +00:00
Ted John
915e6447f9 Fix misc scenery not marked as invented 2021-11-21 22:43:23 +01:00
duncanspumpkin
f8091a462e Fix scenery group set research status import
There were a lot of small issues that compounded into making this bug occur
2021-11-21 22:43:22 +01:00
duncanspumpkin
fe2d7998b5 Use std::remove_if 2021-11-21 22:43:22 +01:00
IntelOrca
34128dc262 Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Duncan
a60f7de103 Fix #15919: Scenery groups are missing in scenario editor 2021-11-20 11:25:27 +01:00
Gymnasiast
eb14c426fd Rename research_remove() to ResearchRemove() 2021-10-15 17:01:04 +02:00
Gymnasiast
5cf4a53b66 Make research_remove take const ref 2021-10-15 16:21:14 +02:00
Duncan
5ee78213b2 Port over research == operator from NSF 2021-10-10 12:09:26 +02:00
Duncan
6cac668447 Fix incorrect staff costumes being available (#15499)
Noticed this when trying to fix an NSF scenery window issue. The previous code meant that if any single scenery item in a set was researched then the costume was available but I'm pretty sure its meant to be tied to if the whole scenery set is invented.
2021-10-06 12:32:17 +01:00
ζeh Matt
74e8988dd8 Remove scenario ticks and adjust export/import
Co-authored-by: Ted John <ted@brambles.org>
2021-09-23 21:49:09 +03:00
Hielke Morsink
4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Michael Steenbeek
6405d0246c Fix #14612: Crash in research_insert_ride_entry() 2021-07-26 22:23:03 +02:00
Duncan
21bb949322 Fix 14774: Scenery research always unlocks on load (#14777)
* Fix #14774: Incorrect import of scenery research

Mistake during a refactor caused all scenery to be imported as already researched.

* Update changelog

* Update network version
2021-05-28 18:55:19 +01:00
Michael Steenbeek
1b5c7dc1c7 Fix inverted condition 2021-03-12 23:05:30 +01:00
Ted John
87dc006b8c Apply code review suggestions 2021-03-12 21:27:23 +00:00
Ted John
4b9c704096 Log warning instead of assert in research_finish_item 2021-03-07 12:53:41 +00:00
Gymnasiast
44d0e77afb Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Gymnasiast
19d113ae86 Reduce code duplication 2021-01-15 17:34:47 +01:00
Gymnasiast
4fcc86f990 Fix #13236: New ride type appears as new vehicle type in research 2021-01-15 17:21:29 +01:00
Mathias Gibbens
b1e5a11bf3 Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
skdltmxn
b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Adam
f09b14ef2b Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Tulio Leao
6790bfe106 Use array for selecting research category strings 2020-11-07 11:40:15 -03:00
Tulio Leao
8a35f27cfc Add converter from RideCategory to ResearchCategory 2020-11-07 11:14:55 -03:00
Tulio Leao
7d96dc9958 Move category names and invention strings to ResearchItem class 2020-11-07 11:14:55 -03:00
Tulio Leao
19ab8f1211 Use ResearchCategory Enum for ResearchItem 2020-11-07 11:14:55 -03:00
Tulio Leao
f6de4b2e44 Fix #13263: SceneryGroup problems (#13270)
* Fix #13263: Scenery group research not working

* ResearchCategory::Group to SceneryGroup
2020-10-23 12:30:39 +01:00
Łukasz Pękalski
384e0ee718 Close #12418: Refactor RESEARCH_CATEGORY_* to use strong enum (#13216) 2020-10-17 22:15:46 +02:00
Matt
38e03ae45d Use the Formatter for News items 2020-09-17 22:14:36 +03:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
pizza2004
cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
Duncan
4a235e3bb6 Refactor ResearchItem Type to an enum class (#12346)
* Change type of ResearchItem.type to enum class

This is to prevent any future issues caused by confusion as to what the type is and further improves the codebase.

* Specifiy a size for the type

Also remove the static cast where not required

* Apply review comments
2020-07-22 14:25:05 +01:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast
cf664c8340 Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
Gymnasiast
f8699d1244 Apply review requests; fix error; remove debug code 2020-06-19 23:35:18 +02:00
Gymnasiast
5029f754ed Fix #7324: Research window shows vehicle name instead of ride name 2020-06-19 22:50:53 +02:00
Gymnasiast
96678a14eb Move ride naming to RTD
This also means that all unused ride types will now have the same name. I have made an exception for the 'arbitrary ride type change' dropdown only.
2020-06-16 22:52:48 +02:00
Gymnasiast
6cdee9db93 Fix #7006: Use RTDs for determining ride category 2020-04-30 12:59:18 +02:00
Gymnasiast
505ac0f1a0 Remove unused function 2020-04-30 12:59:18 +02:00
Gymnasiast
7bda0c5fd9 Create constructor for ResearchItem 2020-04-30 12:59:18 +02:00