1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00
Commit Graph

271 Commits

Author SHA1 Message Date
Michael Steenbeek
7344b7fbfd Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Maximilian Bottin
6f28914f61 Fix #14296: Allow early scenario completion in multiplayer 2021-03-18 20:30:11 +01:00
Michael Steenbeek
bc2df33b0a Fix #14225: Desync when “allow early scenario completion” is enabled 2021-03-08 20:16:21 +01:00
Michał Janiszewski
8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Ted John
d2a97ab43c Implement scenario select window 2021-02-08 22:27:28 +00:00
skdltmxn
b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Tulio Leao
af0ec60bed Close #13626: Refactor RCT2LanguageId to strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao
221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Duncan
b59bf6d9cf Fix #13552: Incorrect value for highscore pointer (#13554)
This was causing an invalid pointer dereference
2020-12-08 16:23:51 -03:00
duncanspumpkin
60729113d9 Simplify Serialise for FileIndex 2020-12-07 07:52:12 +00:00
Ted John
9e7504fd98 Improve RCT12 UTF-8 checks 2020-11-27 18:54:58 +00:00
Ted John
b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Michael Steenbeek
b595370648 Fix #13257: Rides w/ exactly the minimum objective length not counted (#13446) 2020-11-23 19:22:16 -03:00
Ghlen Nagels
8c55d1ea9f Close #12446: Refactor WEATHER to use strong enum (#13434) 2020-11-22 17:34:30 +00:00
maksimdrachov
1815a094bb Fix #13426: Typo in "repay loan" 2020-11-19 19:45:40 +01:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Hielke Morsink
f0c1ea1d37 Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Hielke Morsink
257ada4617 Introduce constant for ticks per month (#13253) 2020-10-20 21:05:27 -03:00
Gymnasiast
84201678ca Add comment 2020-09-28 21:41:50 +02:00
Matt
213b6cc672 Use unique_ptr for GetStreamFromRCT2Scenario 2020-09-28 21:17:28 +02:00
Gymnasiast
5f0aed0929 Add .sea support to New Scenario list and extension handling 2020-09-28 21:17:28 +02:00
Richard Fine
a1222fa4ca Staff code cleanup (#12907)
* Make UpdateFixing*() methods use const where possible

To make it clearer which steps actually modify the ride being fixed and which do not, pass const Ride* instead of Ride* where possible.

* Extract maximum litter search distance to a constant

* Make peep_update_*() methods return bool

* Use Direction type and helpers where applicable

* Const correctness and other cleanup

Make many functions take a const Peep* / const Staff* to clarify that they do not modify the peep being passed in. Also use the Direction type for some return values, and simplify staff_is_location_on_patrol_edge.

* Use clearer expression of constant value

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Convert staff functions to members

* Remove AsStaff const overload

* Use As<Staff>() instead of static_cast

* Simplify direction selection code

* Clean up use of magic constants

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-27 21:07:09 -03:00
Matt
38e03ae45d Use the Formatter for News items 2020-09-17 22:14:36 +03:00
Matt
d0d5cc5179 Remove unused declarations 2020-09-16 20:23:34 +03:00
Gymnasiast
31d20cefb2 Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
Gymnasiast
e23089d255 Make scenario check into member functions 2020-09-09 15:39:07 +02:00
Gymnasiast
6e22eade67 Create Objective struct and use it for global objective 2020-09-09 15:38:03 +02:00
Tulio Leao
efdb7e1a2d Change gDateMonthsElapsed type to int32_t 2020-08-25 19:06:38 -03:00
Michael Steenbeek
68ce06e833 Refactor objective handling in Scenario Editor
This moves some knowledge out of the window and into the main code and also cleans up the window a bit.

This also allows setting the "x guests by the end of year y" goal for no money scenarios, which was not the case previously.
2020-08-12 22:10:47 +02:00
Sidney
933570fd62 Close #12442: Refactor SCENARIO_SOURCE to use strong enum (#12608) 2020-08-08 09:38:43 -03:00
Matt
0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt
30376085cf Include missing headers 2020-08-05 16:29:29 +02: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
Gymnasiast
682add27dd Change ObjectEntryIndex null value to 0xFFFF 2020-07-23 12:45:42 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Duncan
7f28d65bf9 Fix #12213: Incorrect viewport invalidation on load (#12232)
Mistake made during implementation but issue only surfaces recently when the types were increased to 32bit. Removed #12210 as this was hiding the source issue and is no longer required.
2020-07-13 18:20:16 +02:00
duncanspumpkin
e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
frutiemax
26ae2dbf04 Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03: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
Tulio Leao
2b68610473 Fix #11331: Create constant for failure on ScenarioCompletedCompanyValue (#11332) 2020-04-18 13:46:18 +02:00
Tulio Leao
116bcb5ccb Use named casts on openrct2/(util|windows|scenario|title) (#11146) 2020-04-17 19:45:19 +02:00
Michael Steenbeek
81c6bb26e9 Prepare guest counters for more than 32767 guests (#10989) 2020-03-26 20:02:15 +01:00
Aaron van Geffen
a2f8e8c72b Automatically reset speed to normal upon scenario completion. (#10998) 2020-03-22 23:22:28 +01:00
Michael Steenbeek
ef1906d452 Use constants for max sprites and spatial index (#10983) 2020-03-20 20:16:38 +01:00
Michael Steenbeek
d085a0ed20 Split OBJECT_ENTRY_COUNT into RCT2/OpenRCT2 variants (#10877) 2020-03-05 17:25:57 +01:00
Gymnasiast
1e6efa6eb4 Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
Michael Steenbeek
3fc5f75eb8 Fix #8875: RCT1 competition scenarios are classified incorrectly (#10548) 2020-01-12 14:29:02 +01:00
Matt
52ee9c6896 Use enum class for ExpenditureType 2019-12-22 20:51:55 +01:00
Tom Lankhorst
027c09553b Reformat code with clang-format 8.0. 2019-11-04 15:11:06 +01:00