Commit graph

6058 commits

Author SHA1 Message Date
hdpoliveira
b696c0829a Replace 8 by COORDS_Z_STEP 2020-04-26 16:13:01 -03:00
hdpoliveira
3b70b43449 snake_case to camelCase 2020-04-26 16:13:01 -03:00
hdpoliveira
cd02e28b31 Part of #9473: Create Vehicle::UpdateMeasurements
Converted from vehicle_update_measurements
2020-04-26 16:13:00 -03:00
Ted John
3c02861c63 Increment network version 2020-04-26 16:01:40 +01:00
Ted John
c0aa5bdcc8 Create plugin directory automatically 2020-04-26 14:52:57 +01:00
Breno Rodrigues Guimarães
305b4d4957
Fix #11469: Clear memory but dont increment buffer position (#11472)
Fix a regression from #11412 that did:

set_format_arg(0, rct_string_id, ...)
set_format_arg(4, uint32_t, 0)

ride->FormatNameTo(gCommonFormatArgs + 2)

Notice it continues from byte 2, and not 8.
So the `set_format_arg(4, uint32_t... )` was just
for clearing memory, not for adding a new argument
2020-04-26 10:48:35 -03:00
Ted John
7041b0793e Fix tile type literals 2020-04-26 14:42:13 +01:00
Ted John
51ed760409 Fix FileWatcher header file 2020-04-26 14:35:09 +01:00
Ted John
2d43ac5936 Try using int32_t instead of size_t 2020-04-26 14:35:09 +01:00
Ted John
2c4cf49fb1 Add more const 2020-04-26 14:35:08 +01:00
Ted John
a6eeb8c7c4 Add const to ticksElapsed_get 2020-04-26 14:35:08 +01:00
Ted John
c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John
4ebd8da630 Revert change to RemoveCustomGameActions 2020-04-26 14:35:08 +01:00
Ted John
ad75cb0754 Update src/openrct2/scripting/ScriptEngine.cpp
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
4e1fa6a944 Update src/openrct2/scripting/ScriptEngine.h
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
3fe49ca2a3 Apply suggestions from code review
Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-Authored-By: Aaron van Geffen <aaron@aaronweb.net>
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
127dd1543e Disable FileWatcher for macOS 2020-04-26 14:35:08 +01:00
Ted John
c1ab8b0b31 Apply suggestions from code review
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:07 +01:00
Ted John
6cbea2fd37 Change baseZ / clearanceZ to baseHeight / clearanceHeight 2020-04-26 14:35:07 +01:00
Ted John
2f525e0539 Apply more code review comments 2020-04-26 14:35:07 +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
d9cbdf29ad Ensure all paths return a value regardless of duk_error 2020-04-26 14:35:07 +01:00
Ted John
ea632a8eed Rename thing to entity 2020-04-26 14:35:07 +01:00
Ted John
62d15e44db Fix mingw build 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
3c424be180 Use correct thing type for getThing 2020-04-26 14:35:06 +01:00
Ted John
f12f439309 Fix errors after rebase 2020-04-26 14:35:06 +01:00
Ted John
b9f3886ca8 Implement more footpath APIs 2020-04-26 14:35:06 +01:00
Ted John
b7b1920a79 Fix build 2020-04-26 14:35:06 +01:00
Ted John
098e6839e2 Fix build after rebase 2020-04-26 14:35:06 +01:00
Ted John
76ebef10e3 Add APIs for getting info about loaded objects 2020-04-26 14:35:06 +01:00
Ted John
7a62d55c5f Clean up and remove unused APIs 2020-04-26 14:35:06 +01:00
Ted John
ea8890aaaa Improve shared storage read / write 2020-04-26 14:35:06 +01:00
Ted John
0c71886941 Implement shared storage 2020-04-26 14:35:06 +01:00
Ted John
61da82c711 Add random number generator 2020-04-26 14:35:05 +01:00
Ted John
fa997006ba Allow console.log to take variable args 2020-04-26 14:35:05 +01:00
Ted John
a16cacff3a Add special properties for ride action 2020-04-26 14:35:05 +01:00
Ted John
efcf9fd22a Implement hooking game actions 2020-04-26 14:35:05 +01:00
Ted John
49b155d178 Fix Linux build 2020-04-26 14:35:05 +01:00
Ted John
83fe0cf5c5 Implement strings for GameAction errors 2020-04-26 14:35:05 +01:00
Ted John
2ad37db817 Implement registering game actions 2020-04-26 14:35:05 +01:00
Ted John
4e4379e6ef Start work on custom game actions 2020-04-26 14:35:05 +01:00
Ted John
07ed0f5c0e Implement query and execute of game actions 2020-04-26 14:35:05 +01:00
Ted John
f8394953aa Get thing inhertiance working 2020-04-26 14:35:05 +01:00
Ted John
971c6e201d Improve some of the map APIs 2020-04-26 14:35:05 +01:00
Ted John
4e12c9541e Implement more tile element APIs 2020-04-26 14:35:05 +01:00
Ted John
82639bae1b Implement more tile element APIs 2020-04-26 14:35:04 +01:00
Ted John
63b10166ac Add more surface element APIs 2020-04-26 14:35:04 +01:00
Ted John
4d5e7f19ca Implement surface style API and improve plugin calling 2020-04-26 14:35:04 +01:00
Ted John
32d72471b8 Add more tile APIs 2020-04-26 14:35:04 +01:00
Ted John
a4be43eaa9 Fix clients starting remote scripts 2020-04-26 14:35:04 +01:00
Ted John
7628289eb3 Implement reverse of string processing 2020-04-26 14:35:04 +01:00
Ted John
4d221341da Improve string handling and allow window update 2020-04-26 14:35:04 +01:00
Ted John
00293d20e8 Fix compile 2020-04-26 14:35:04 +01:00
Ted John
e6ca727b4b Improve dumping of expressions 2020-04-26 14:35:04 +01:00
Ted John
dfd45651dc Improve stringify of expressions 2020-04-26 14:35:04 +01:00
Ted John
177c1a16a7 Always allow game state to be mutated in single player 2020-04-26 14:35:03 +01:00
Ted John
2890faee0a Change plugin type to just local and remote 2020-04-26 14:35:03 +01:00
Ted John
e6341f0a42 Get scripting compiling on clang 2020-04-26 14:35:03 +01:00
Ted John
bac91cd563 Allow scripting to be compile-disabled 2020-04-26 14:35:03 +01:00
Ted John
34078124cd Fix formatting 2020-04-26 14:35:03 +01:00
Ted John
a5c8ff920f Add game mutable protection 2020-04-26 14:35:03 +01:00
Ted John
dc64d3541d Transfer server-client scripts over network 2020-04-26 14:35:03 +01:00
Ted John
639faa2085 Fix GCC issues 2020-04-26 14:35:03 +01:00
Ted John
facd557355 Fix formatting 2020-04-26 14:35:02 +01:00
Ted John
412c838a07 Fix warnings 2020-04-26 14:35:02 +01:00
Ted John
057155e5ab Use a function to register plugin rather than return value 2020-04-26 14:35:02 +01:00
Ted John
d8b0b24c43 Implement date API 2020-04-26 14:35:02 +01:00
Ted John
e0f66fe3cd Implement viewport widgets 2020-04-26 14:35:02 +01:00
Ted John
da98ef63d3 Implement checkboxes and disabling widgets 2020-04-26 14:35:02 +01:00
Ted John
d7d880dc23 Restart plugins when starting new game from a game 2020-04-26 14:35:02 +01:00
Ted John
0ec4475d62 Implement tile x, y coordinates 2020-04-26 14:35:02 +01:00
Ted John
560be19cdf Implement Ride and RideObject API 2020-04-26 14:35:02 +01:00
Ted John
ab5bfffde0 Fix tile element scripting 2020-04-26 14:35:01 +01:00
Ted John
4b95a3a9d0 Implement custom menu items 2020-04-26 14:35:01 +01:00
Ted John
c8fbc2e529 Improve chat subscription 2020-04-26 14:35:01 +01:00
Ted John
0e8c627324 Add config option for hot reload and refactor 2020-04-26 14:35:01 +01:00
Ted John
3ac22476c6 Implement basic send message 2020-04-26 14:35:01 +01:00
Ted John
3f58a0d9f8 Implement network mode 2020-04-26 14:35:01 +01:00
Ted John
e6915e8799 Do not load plugins on title screen 2020-04-26 14:35:01 +01:00
Ted John
2e62078c30 Exclude node_modules directory 2020-04-26 14:35:01 +01:00
Ted John
4109b2c55a Fix build errors 2020-04-26 14:35:01 +01:00
Ted John
098348d3c3 Add hooking for chat message 2020-04-26 14:35:01 +01:00
Ted John
082eaf7c9c Add more network API 2020-04-26 14:35:00 +01:00
Ted John
5d78a1f2bf Add initial network API 2020-04-26 14:35:00 +01:00
Ted John
5bd58118b5 Get the plugin branch building again 2020-04-26 14:35:00 +01:00
Hielke Morsink
d7123834df Expose more footpath and footpath-adition properties 2020-04-26 14:35:00 +01:00
Hielke Morsink
9b2ed0d641 Expose properties for path scenery 2020-04-26 14:35:00 +01:00
Hielke Morsink
bec9c4da65 Expose surface element properties 2020-04-26 14:35:00 +01:00
Hielke Morsink
e8bdb95f13 format new files
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Hielke Morsink
c37d7d859e Use C++ types 2020-04-26 14:35:00 +01:00
Hielke Morsink
c064614280 Use new copyright/license notice 2020-04-26 14:35:00 +01:00
Hielke Morsink
d6b4064794 Use variant argument type for console.log 2020-04-26 14:35:00 +01:00
Hielke Morsink
34b5aab6c0 Add new tile element classes for each type
This introduces some template code  to get around the problem of properties not being available for child-elements. I've tried to make clear what it's for by adding a comment.

So far only the Track element has an extra property (rideIndex), but it's fairly easy to add new ones.
2020-04-26 14:35:00 +01:00
Ted John
24eafb0a86 Do not crash if plugins directory is missing 2020-04-26 14:35:00 +01:00
Ted John
5ba96a34ac Fix FileWatcher for Windows 2020-04-26 14:35:00 +01:00
Ted John
26eb91016e Remove old hot reload code 2020-04-26 14:35:00 +01:00
Ted John
1fd33dd86a Use new FileWatcher class 2020-04-26 14:35:00 +01:00
Ted John
834cfad502 Create new FileWatcher class 2020-04-26 14:34:59 +01:00
Ted John
7047dec1d9 Get custom drop downs working
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-04-26 14:34:59 +01:00
Ted John
918022da3e Get custom buttons working 2020-04-26 14:34:59 +01:00
Ted John
291143c3cd Add opening of a custom window 2020-04-26 14:34:59 +01:00
Ted John
b47bcabaf1 Move ui scripting API to libopenrct2ui 2020-04-26 14:34:59 +01:00
Ted John
237e0be7ef Add basic window API 2020-04-26 14:34:59 +01:00
Ted John
c340c2abec Fix segfault on exit
By ensuring duk_context is disposed last in ScriptEngine
2020-04-26 14:34:59 +01:00
Ted John
d445cfc125 Refactor plugin scope 2020-04-26 14:34:59 +01:00
Ted John
f54b3efe9e Use shared_ptr for Plugin 2020-04-26 14:34:59 +01:00
Ted John
a6bb9a9b64 Add tile element support 2020-04-26 14:34:59 +01:00
Ted John
5697bcf0bd Add basic map and thing support 2020-04-26 14:34:59 +01:00
Ted John
4a575975f6 Add hook system 2020-04-26 14:34:59 +01:00
Ted John
3556dead74 Add hot reloading support 2020-04-26 14:34:59 +01:00
Ted John
de527b3ff7 Add load and start plugin scripts 2020-04-26 14:34:59 +01:00
Ted John
1acf1e870a Add park API 2020-04-26 14:34:59 +01:00
Ted John
839dd6842b Add console API using dukglue 2020-04-26 14:34:59 +01:00
Ted John
f0de6533a0 Add dukglue 2020-04-26 14:34:58 +01:00
Ted John
43508e0402 Add script engine and connect to std console 2020-04-26 14:34:58 +01:00
Ted John
a1ebcdea5c Add duktape library 2020-04-26 14:34:58 +01:00
Fred-1044276
a3e7f0958c
Allow Air Powered Vertical Coaster without complete circuit
This changes the Air Powered Vertical Coaster so that it can be tested and opened without the need for a complete circuit (mirroring RCT1 and RCT3 behaviour). There appears to be no technical reason for RCT2's requirement for having a complete circuit.
2020-04-26 11:25:08 +02:00
Gymnasiast
e67ebed697
Remove some Americanisms 2020-04-26 11:07:19 +02:00
Gymnasiast
100236c2d2
Move available ride modes to RTD; ride mode cleanup 2020-04-26 11:07:19 +02:00
Gymnasiast
2e3a4d41ce
Clean up some ride construction variables 2020-04-26 11:07:19 +02:00
Breno Rodrigues Guimarães
a0619d04cf
Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Breno Rodrigues Guimarães
ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Breno Guimaraes
38ffc4f577 Use a pointer instead of reference as a member.
This allows the assignment operator for the iterator to be generated
automatically by the compiler.
2020-04-25 17:51:26 -03:00
Michael Steenbeek
0ecc64f781
Fix #11407: Setting an RCT1 path needs better error messages (#11418) 2020-04-25 15:36:44 +02:00
Michael Steenbeek
b417da7905
Fix drawing of walls with incorrect scrolling modes (#11453) 2020-04-25 10:19:13 +01:00
Kevin Strehl
5456899afc
Close #10572: Add cheat to allow building at invalid heights 2020-04-25 01:07:36 +02:00
Michael Steenbeek
b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Michael Stowe
f281aa1a80
Fix #8571: Redundant comparison in Station.cpp 2020-04-25 00:08:04 +02:00
WantDiscussion
37e9270c00
Close #6024: Closing object selection now advances to next step
In the scenario editor and track designer X button in object selector
will now close the object selector window and advance to the next stage
instead of closing the scenario editor and track editor entirely and
returning to the main menu.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-04-24 17:19:06 +02:00
Michał Janiszewski
295a98028e
Disable warnings around incompatible function pointer cast (#9543)
This addresses a compilation issue with newer (8+) mingw.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-04-24 16:03:03 +02:00
FlukiestEmperor
23d295924d
Fix Android filesystem compilation error when using NDK revision 19+
When attemping to build with ndk 19+ I get the following error: error: undefined reference to 'std::__ndk1::__fs::filesystem::path::__extension() const'

Looking at this issue here https://github.com/android/ndk/issues/609 and https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md#package-management it's stated that the ndk does not support std::filesystem.
2020-04-24 13:08:44 +02:00
Michael Steenbeek
44f62a97c2
Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +02:00
Michael Steenbeek
144d312ead
Fix RCT1 import importing too many vehicle types (#11419) 2020-04-24 04:00:41 +02:00
Michael Steenbeek
f5e2efac77
Close #11390: Write OpenRCT2 build hash to screenshot metadata (#11423) 2020-04-24 04:00:17 +02: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
Michael Steenbeek
62482312fb
Bump network version 2020-04-23 14:44:23 +02:00
Michael Steenbeek
d0f2ade778
Fix #11405: Building path through walls does not always remove them (#11416) 2020-04-23 14:35:54 +02:00
Tulio Leao
dd64295ba7
Rename and improve documentation on MAX_STR_COUNT (#11409) 2020-04-23 12:29:02 +02:00
Breno Rodrigues Guimarães
c0d0c7de16
Part of #11389: Replace set_format_arg by Formatter::Common() (#11388) 2020-04-22 21:41:20 -03:00
Breno Rodrigues Guimarães
ef8fd20c99
Let Ride::FormatStatusTo return the number of written bytes (#11411) 2020-04-22 21:24:51 -03:00
Mustapha Elghoul
b138cb46ba
Name Flags in PeepThoughtToActionMap 2020-04-22 18:50:53 +02: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
Duncan
cfd94d4fa5
Merge pull request #11382 from mustaphaelghoul/eecs481
Create 5 Vehicle::CableLiftUpdate... member functions from cable_lift_update_... (#9473)
2020-04-21 22:10:16 +01:00
Mustapha Elghoul
38630eeb59 Update dist_x and dist_y to camelCase. (1 >> 1) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_1, and (1 >> 0) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION 2020-04-21 16:51:00 -04:00
Breno Rodrigues Guimarães
568e60b13c
Remove duplicated code due to merge issue (#11392) 2020-04-21 17:10:05 +02:00
Michał Janiszewski
c4b6897635 Address possible nullptr dereferences 2020-04-21 13:31:01 +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
Michał Janiszewski
eeef01f34b Remove redundant function declaration 2020-04-21 13:31:01 +02:00
Michał Janiszewski
de51d97f70 Remove redundant unreachable breaks 2020-04-21 13:31:01 +02:00
Michał Janiszewski
cb74c5bbb6 Fix globals that really aren't 2020-04-21 13:30:55 +02:00
Breno Rodrigues Guimarães
374b744477
Use Formatter to handle argument formatting for tooltips (#11379) 2020-04-21 12:38:59 +02:00
Michael Steenbeek
b94dfab7d0
Merge pull request #11383 from tupaschoal/followup-11163
Simplify logic in ride_ratings_score_close_proximity_in_direction()
2020-04-21 12:36:39 +02:00
Tulio Leao
12beb78377
Use enum for PeepState instead of raw Number on NewsItem (#11384) 2020-04-21 12:33:53 +02:00
Mustapha Elghoul
b38bf7a438 Grouped Alike Functions in Vehicle.h 2020-04-20 22:52:22 -04:00
Tulio Leao
dedd0cd54f Use CoordsXY on ride_ratings_score_close_proximity_in_direction() 2020-04-20 23:33:56 -03:00
Tulio Leao
a7c103261a Use BaseZ and ClearanceZ on ride_ratings_score_close_proximity_in_direction() 2020-04-20 23:28:59 -03:00
Mustapha Elghoul
e627b1680c Part of #9473: Create 5 Vehicle::CableLiftUpdate... from cable_lift_update_... 2020-04-20 22:12:42 -04:00
Breno Rodrigues Guimarães
2479256bc1
Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Michael Steenbeek
e1e58423fc
Replace RideTypeHasRideGroups with flag (#11375) 2020-04-20 21:50:35 +02:00
Olivier Wervers
fc5a5fe320
Fix #11370: Copy and paste shortcuts switched (#11373) 2020-04-20 12:16:50 +02:00
ifimfree
fb6dd4bfad
Create constants for a few flags 2020-04-20 10:39:26 +02: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
Gymnasiast
d2b71392cf
Move upkeep costs to RTD 2020-04-19 21:27:22 +02:00
Gymnasiast
f17014877a
Put all upkeep costs together (as an intermediate step) 2020-04-19 21:27:22 +02:00
Gymnasiast
7d50a2d186
Move alternate ride type to RTD 2020-04-19 18:44:38 +02:00
Gymnasiast
25f363625c
Rename field in RideData5 to something more descriptive 2020-04-19 18:20:20 +02:00
Gymnasiast
9503672730
Remove unused bits from rct_ride_data_5 2020-04-19 18:10:50 +02:00
Gymnasiast
02d3be4d4f
Remove unused variable 2020-04-19 18:06:52 +02:00
Gymnasiast
99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Breno Rodrigues Guimarães
3c1bdcd201
Create a compile-time table for converting color codepoints to utf8 (#11349)
For this to be possible, the function to convert a codepoint to urf8 was
moved to the header and made constexpr.

Now it's not necessary to store a std::string just to serve as a buffer
for holding this string. All the computation is done at compile time.
2020-04-19 15:51:01 +02:00
Michael Steenbeek
deb56c2a72
Move LiftData to RTDs (#11347) 2020-04-19 14:41:26 +02:00
Tulio Leao
629181b88d
Fix mistake in #11345: Remove all Peeps also removing staff (#11352) 2020-04-19 14:40:25 +02:00
Ted John
b9e85f6b90
Fix #11259: Custom JSON object breaks saves (#11356)
Do not attempt to pack JSON objects into S6 files.
2020-04-19 14:18:12 +02:00
Michael Steenbeek
d3a5446114
Create ride type flag for suspended rides (#11355) 2020-04-19 13:53:51 +02:00
Michael Steenbeek
957294568f
Use constants in ride_entry_get_supported_track_pieces() (#11337) 2020-04-19 13:33:01 +02:00
Michael Steenbeek
8127437de1
Reduce direct ride type checking; move available piece lookup to RTD (#11353) 2020-04-19 13:32:43 +02:00
frutiemax
d3b702603d
Fix #10483: Changing footpath type won't remove the elements on it. (#11306)
Changing footpath type for an existing footpath does not remove elements on it, such as benches, lamps, etc. Also handles changes from and to queue paths properly.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2020-04-19 07:11:15 -03:00
Duncan
6a2b4a0a27
Merge pull request #11257 from hdpoliveira/vehicle_update_9473
Part of #9473: Convert cable_lift_update to Vehicle private method Ca…
2020-04-19 08:03:09 +01:00
Duncan
6570741a1c
Fix #11343, 11344. Remove all peeps cheat causes a crash/hang (#11345)
* Fix #11343, 11344. Remove all peeps cheat causes a crash/hang

Caused by a refactor.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-18 15:43:05 -03:00
hdpoliveira
fd111403f1 Part of #9473: vehicle_update_track_motion to Vehicle::UpdateTrackMotion 2020-04-18 14:41:47 -03:00
hdpoliveira
bbdd70395f Part of #9473: vehicle_current_tower_element_is_top to Vehicle::CurrentTowerElementIsTop 2020-04-18 14:41:47 -03:00
hdpoliveira
49b37aafe8 Part of #9473: vehicle_check_if_missing to Vehicle::CheckIfMissing 2020-04-18 14:41:35 -03:00
hdpoliveira
05b9957527 Part of #9473: vehicle_update_additional_animation to Vehicle::UpdateAdditionalAnimation 2020-04-18 14:40:13 -03:00
hdpoliveira
f6624f3b94 Part of #9473: vehicle_update_motion_dodgems to Vehicle::UpdateMotionDodgems 2020-04-18 14:39:14 -03:00
hdpoliveira
ed60a4996d Part of #9473: vehicle_update_crash_setup and vehicle_update_collision_setup 2020-04-18 14:39:14 -03:00
hdpoliveira
276e0c5691 Part of #9473: vehicle_update_boat_location to Vehicle::UpdateBoatLocation 2020-04-18 14:39:13 -03:00
hdpoliveira
fe9d19bff6 Part of #9473: vehicle_finish_departing to Vehicle::FinishDeparting 2020-04-18 14:39:12 -03:00
hdpoliveira
d35591959a Part of #9473: vehicle_update_crossings to Vehicle::UpdateCrossings 2020-04-18 14:39:12 -03:00
hdpoliveira
3a8a2a85c7 Part of #9473: vehicle_update_travelling_boat_hire_setup to Vehicle::UpdateTravellingBoatHireSetup 2020-04-18 14:39:11 -03:00
hdpoliveira
886901b873 Part of #9473: vehicle_update_departing_boat_hire to Vehicle::UpdateDepartingBoatHire 2020-04-18 14:39:11 -03:00
hdpoliveira
b69b434c1e Part of #9473: vehicle_update_motion_boat_hire to Vehicle::UpdateMotionBoatHire 2020-04-18 14:39:10 -03:00
hdpoliveira
15b3136c75 Part of #9473: vehicle_update_scream_sound to Vehicle::UpdateScreamSound 2020-04-18 14:39:10 -03:00
hdpoliveira
16d00bd204 Part of #9473: vehicle_update_sound to Vehicle::UpdateSound 2020-04-18 14:39:09 -03:00
hdpoliveira
32b3448b92 Part of #9473: vehicle_update_doing_circus_show to Vehicle::UpdateDoingCircusShow 2020-04-18 14:39:09 -03:00
hdpoliveira
3d673e7d5d Part of #9473: vehicle_update_showing_film to Vehicle::UpdateShowingFilm 2020-04-18 14:39:08 -03:00
hdpoliveira
a789241a73 Part of #9473: vehicle_update_waiting_for_cable_lift to Vehicle::UpdateWaitingForCableLift 2020-04-18 14:39:07 -03:00
hdpoliveira
ac040a6ed1 Part of #9473: vehicle_update_unloading_passengers to Vehicle::UpdateUnloadingPassengers 2020-04-18 14:39:07 -03:00
hdpoliveira
1fceefbbc8 Part of #9473: vehicle_update_arriving to Vehicle::UpdateArriving 2020-04-18 14:39:03 -03:00
hdpoliveira
e901d71efd Part of #9473: vehicle_update_travelling_boat to Vehicle::UpdateTravellingBoat 2020-04-18 14:37:12 -03:00
hdpoliveira
d7f3d3f463 Part of #9473: vehicle_update_travelling_cable_lift to Vehicle::UpdateTravellingCableLift 2020-04-18 14:37:12 -03:00
hdpoliveira
f6af166f34 Part of #9473: vehicle_update_travelling to Vehicle::UpdateTravelling 2020-04-18 14:37:11 -03:00
hdpoliveira
8e3d9c6f8a Part of #9473: vehicle_update_departing to Vehicle::UpdateDeparting 2020-04-18 14:37:11 -03:00
hdpoliveira
0547f1c500 Part of #9473: vehicle_update_rotating to Vehicle::UpdateRotating 2020-04-18 14:37:03 -03:00
hdpoliveira
da4146d72b Part of #9473: vehicle_update_crooked_house_operating to Vehicle::UpdateCrookedHouseOperating 2020-04-18 14:35:31 -03:00
hdpoliveira
960aca09f1 Part of #9473: vehicle_update_haunted_house_operating to Vehicle::UpdateHauntedHouseOperating 2020-04-18 14:33:47 -03:00
hdpoliveira
a4a2106d28 Part of #9473: vehicle_update_space_rings_operating to Vehicle::UpdateSpaceRingsOperating 2020-04-18 14:33:46 -03:00
hdpoliveira
20ddfda72c Part of #9473: vehicle_update_ferris_wheel_rotating to Vehicle::UpdateFerrisWheelRotating 2020-04-18 14:33:46 -03:00
hdpoliveira
a1cfa63d4f Part of #9473: vehicle_update_top_spin_operating to Vehicle::UpdateTopSpinOperating 2020-04-18 14:33:45 -03:00
hdpoliveira
a01d05ccf8 Part of #9473: vehicle_update_simulator_operating to Vehicle::UpdateSimulatorOperating 2020-04-18 14:33:45 -03:00
hdpoliveira
da52e69b26 Part of #9473: vehicle_update_swinging to Vehicle::UpdateSwinging 2020-04-18 14:33:34 -03:00
hdpoliveira
e214a7e40e Part of #9473: vehicle_update_dodgems_mode to Vehicle::UpdateDodgemsMode 2020-04-18 14:29:21 -03:00
hdpoliveira
fe3befcda6 Part of #9473: vehicle_update_crash to Vehicle::UpdateCrash 2020-04-18 14:29:20 -03:00
hdpoliveira
d39b4e9400 Part of #9473: vehicle_update_waiting_to_depart to Vehicle::UpdateWaitingToDepart 2020-04-18 14:29:20 -03:00
hdpoliveira
3b5f9a372f Part of #9473: Convert vehicle_update_moving_to_end_of_station to Vehicle::UpdateMovingToEndOfStation 2020-04-18 14:29:19 -03:00
hdpoliveira
857db2925c Part of #9473: Convert cable_lift_update to Vehicle private method CableLiftUpdate 2020-04-18 14:29:19 -03:00
Michael Steenbeek
3bf316ee8c
Merge pull request #11336 from Gymnasiast/refactor/available-breakdowns-to-rtd
Move available breakdowns, category and independent listing flag to RTD
2020-04-18 18:31:39 +02:00
Michael Steenbeek
20a0cea903
Fix #11325: Space rings change colours and show incorrect sprites (#11338) 2020-04-18 18:19:01 +02:00
Tulio Leao
e2be89648e
Fix #6119: Advertising campaign for ride window not updated properly (#11335) 2020-04-18 16:15:04 +02:00
Eyal Minsky-Fenick
2ef77414d5
Ensure ride->inspection_station is set in ride_prepare_breakdown (#10245) 2020-04-18 15:30:25 +02:00
Gymnasiast
5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag 2020-04-18 15:22:41 +02:00
Gymnasiast
c41fb64535
Move available breakdowns to RTD 2020-04-18 15:22:41 +02:00
Tulio Leao
95b43684d0
Change advertise campaign variable type to avoid casts (#11333) 2020-04-18 14:34:07 +02:00
Tulio Leao
2b68610473
Fix #11331: Create constant for failure on ScenarioCompletedCompanyValue (#11332) 2020-04-18 13:46:18 +02:00
Olivier Wervers
b71062ce1b
Fix #6530: Make land tools work consistently on park borders (#11181)
Makes all land tools behave the same
2020-04-18 08:19:03 -03:00
Duncan
8e178ef0ac
Merge pull request #11274 from TomasZilinek/issue11075fix
Fix #11075 SpriteListHead Refactor
2020-04-18 11:55:10 +01:00
Olivier Wervers
bb72fd6021
Fix #9029: Set animation frame on doors using the tile inspector (#11206) 2020-04-18 07:43:46 -03:00
duncanspumpkin
b81f6d0bed Fix crash caused by bad pointers 2020-04-18 11:41:05 +01:00
Tulio Leao
a4e4040a0c
Use named casts on openrct2/rct* (#11169) 2020-04-18 12:37:34 +02:00
Michael Steenbeek
b4a763c751
Move naming convention to RTD (#11319) 2020-04-18 12:12:07 +02:00
duncanspumpkin
f9ae3dd980 Make review changes 2020-04-18 10:34:41 +01:00
ThomasZ
401504aff9 Fix #11075: SpriteListHead Refactor
Refactor "for (spriteIndex = gSpriteListHead[SPRITE_LIST_PEEP]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex)" like for loops across files with replacing them by FOR_ALL_PEEPS(sprite_index, peep). The same for FOR_ALL_STAFF, FOR_ALL_GUESTS where necessary.

modify incorrect codestyle

modifying incorrect codestyle of the first attempted PR of issue 11075 (missing space after FOR_ALL_GUEST, FOR_ALL_STUFF ...)

modify codestyle further

Forgot to add one more space, correcting it.

another codestyle correction

apparently there is someting wrong with src/openrct2/peep/Peeps.cpp adding a newline after i = 0;

event further modifying codestyle

changing i = 0; to int i = 0;

another codestyle modification, at this point just trying to pass CI clang

adding another newline

another modification
2020-04-18 10:31:02 +01:00
duncanspumpkin
d75fc6945e Increment network version 2020-04-18 08:16:26 +01:00
Gymnasiast
a295f3c003 Fix #11315: Never opened ride shown as favourite ride of 74 guests 2020-04-18 07:39:24 +01:00
Tulio Leao
c17127f65b
Use named casts on openrct2 root folder (#11139) 2020-04-17 21:36:25 +02:00
Tulio Leao
64e4a8420e
Use named casts on openrct2/world (#11141) 2020-04-17 21:08:22 +02:00
Michael Steenbeek
ffa9996336
Reimplement landscape door drawing (#11233) 2020-04-17 19:59:38 +02:00
Tulio Leao
b449e445f7
Use named casts on openrct2/ride (#11163)
Excluding subfolders
2020-04-17 19:53:33 +02:00
Tulio Leao
116bcb5ccb
Use named casts on openrct2/(util|windows|scenario|title) (#11146) 2020-04-17 19:45:19 +02:00
Tulio Leao
fd69886350
Use named casts on openrct2/ride/* (#11168) 2020-04-17 19:39:18 +02:00
Michael Steenbeek
777201c7fd
Return false for non-existing ride types
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-17 17:05:16 +02:00
Gymnasiast
20fd115d8d
Group some common flag combination into constexprs 2020-04-17 17:03:34 +02:00
Gymnasiast
9044d0a263
Fix failing tests 2020-04-17 17:03:33 +02:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Gymnasiast
6c3c857dfa
Release v0.2.6
- Feature: [#10925] Show hovered values on finance charts.
- Feature: [#11013] Ctrl+C copies input dialog text to clipboard.
- Feature: [#11218] load_park command for console
- Feature: [#11272] Option for toggling notifications for 'Ride casualties' and 'Stuck or stalled vehicles'.
- Feature: [#11281] add_news_item command for console
- Feature: [#11300] Add powered launch and reverse incline launched shuttle mode to the Stand-Up Roller Coaster (for RCT1 parity).
- Fix: [#475] Water sides drawn incorrectly (original bug).
- Fix: [#6123, #7907, #9472, #11028] Cannot build some track designs with 4 stations (original bug).
- Fix: [#6238] Invalid tile elem iteration in Guest::UpdateUsingBin
- Fix: [#7094] Back wall edge texture in water missing.
- Fix: [#9719] Hacked walls in RCT1 saves are imported incorrectly.
- Fix: [#10372, #10509, #10806] Lift base sections incorrectly exporting, causing various lift related bugs.
- Fix: [#10928] File browser's date column is too narrow.
- Fix: [#10951, #11160] Attempting to place park entrances creates ghost entrances in random locations.
- Fix: [#11005] Company value overflows.
- Fix: [#11027] Third color on walls becomes black when saving.
- Fix: [#11063] Scrolling position persists when switching tabs in the scenery window.
- Fix: [#11106] Crash on getting invalid vehicle index.
- Fix: [#11126] Cannot place Frightmare track design.
- Fix: [#11208] Cannot export parks with RCT2 DLC objects.
- Fix: [#11230] Seat Rotation not imported correctly for hacked rides.
- Fix: [#11225] Replay manager cannot handle track designs.
- Fix: [#11246] Fix Various Import/Export issues with Boat locations, balloon frame number.
- Fix: [#11258] Properly remove format codes from imported strings.
- Fix: [#11286] Fix banner tooltip colour.
- Fix: Small red gardens in RCT1 saves are imported in the wrong colour.
- Improved: [#11157] Slimmer virtual floor lines.
2020-04-17 16:13:30 +02:00
Tulio Leao
d342423b24
Address string ids skipped in #11273 (#11310) 2020-04-17 10:06:15 +02:00
Michael Stowe
163119ea3b
Fix #11275: Crashes that kill only 1 peep create grammatically incorrect messages (#11278)
Fix #11275: Crashes that kill only 1 peep create grammatically incorrect messages (#11278)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-16 21:04:12 -03:00
Duncan
4a81219521
Merge pull request #11291 from brenoguim/fix_banner_string_coloring
Fix coloring of Banners on tooltip
2020-04-16 22:27:27 +01:00
Duncan
92449773c5
Fix #11106: Crash on getting invalid vehicle index (#11305)
* Fix #11106: Fix crash on bad value prev_vehicle

This allows Thorpe Park to be loaded again. This is ultimately not a great fix. In the future it should be made so that the vehicle pointers are validated on load to ensure there are no loops or bad values.
2020-04-16 18:24:07 -03:00
Julian
a6684603d8
Load_Park feature for headless server (#11218)
* Load_Park feature

New feature "load_park name" from "save" folder.

* Fix codestyle

-

* Fix codestyle

-

* Fixed typo for load_park 

load_park is now <name> instead of [name]

* improve load_park command

allow to specify park via absolute path
make .sv6 filename extension optional
support .sc6 filename extension, but default to .sv6

* report success or failure of load_park to console

Co-authored-by: quadratrund <56112624+quadratrund@users.noreply.github.com>
2020-04-16 16:36:00 +02:00
Michał Janiszewski
46f8c1458e
Add add_news_item to the console (#11281) 2020-04-16 16:27:48 +02:00
Aaron van Geffen
a81488d704
Fix #11272: Make casualty and stalled vehicle notifications optional 2020-04-16 14:41:39 +02:00
Breno Rodrigues Guimarães
10ab9e4528
Make ParkLoadResult move friendly (#11297)
This patch changes the member of ParkLoadResult to not be const. Const members cannot be moved so trying to move ParkLoadResult actually causes a copy.
It also adds std::move to move the parameter to the member, otherwise a copy happens.

See: https://godbolt.org/z/L4Wakb
2020-04-16 13:13:13 +02:00
Fred-1044276
a80905e30d
Implement #11300: Add RCT1 operating modes to Stand-up Roller Coaster 2020-04-16 13:12:43 +02:00
Breno Guimaraes
347c402984 Fix #11286: Fix coloring of banners on tooltip
This patch moves the function that adds coloring to the buffer text into the Buffer struct with a flag.
It also changes both Banner printing and Banner tooltip to use the colored version
2020-04-16 08:06:07 -03:00
Gymnasiast
10f43766ef
Rename i to stationIndex 2020-04-16 12:44:25 +02:00
Breno Rodrigues Guimarães
174a480870
Use utf8_remove_format_codes to remove format codes from user strings (#11289)
The previous code used RCT12::RemoveFormatCodes to remove format codes from RCT strings. But that function uses utf8 methods to identify format codes. In this new version, rct2_to_utf8 is called first to obtain an utf8 string, and then utf8_remove_format_codes can be used.
2020-04-15 07:17:43 +02:00
Michał Janiszewski
1ffd92839e
Merge pull request #11228 from duncanspumpkin/fix_replay
Fix replay manager checksums
2020-04-14 23:01:34 +02:00
duncanspumpkin
9c5a4b8561 Add exception handler to prevent 32bit OS read problems 2020-04-12 10:56:19 +01:00
duncanspumpkin
501e5e2b34 Fix formatting 2020-04-12 10:54:17 +01:00
duncanspumpkin
59723cc7c3 Rework game state snapshots for variable amounts
Added a check that ensures that the log is not created unless there is a difference
2020-04-12 10:54:17 +01:00
duncanspumpkin
e5d68cacc9 Make snapshots at start and end of replay 2020-04-12 10:54:17 +01:00
duncanspumpkin
1395b9a9c1 Fix normalisation writing files to unknown location 2020-04-12 10:54:17 +01:00
duncanspumpkin
4f0d9a6363 Remove SpriteSpatialData from replays 2020-04-12 10:54:17 +01:00
duncanspumpkin
53672c0519 Introduce a GameStateSnapshot to the replay file 2020-04-12 10:54:17 +01:00
duncanspumpkin
5b0015bbf3 Fix replay manager checksums 2020-04-12 10:54:17 +01:00
Aaron van Geffen
0cbd700290
Warn to console if no autosave could be saved (#11255)
* Warn to console if no autosave could be saved.

* Use std::fprintf as suggested.

* Update src/openrct2/Game.cpp

Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>

Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
2020-04-12 11:32:39 +02:00
duncanspumpkin
b01e9381f7 Update network version. Add changelog entry 2020-04-11 09:07:02 +01:00
duncanspumpkin
d4998a0ade Fix #10372, #10509, #10806. Lift base sections did not export correctly
Mistake made whilst refactoring that assumed that station indexes are set on only station pieces.
2020-04-11 08:16:53 +01:00
Duncan
fdf98060cf
Change the spatial insert to make it ordered (#11252)
* Change the spatial insert to make it ordered

This is so that the spatial index can be rebuilt and gauranteed to be in the correct order

* Increment Network Version

* Make review changes

* Remove the gSpriteSpatialIndex from the network

* Use safer get function

* Final little tweak
2020-04-09 10:46:26 +01:00
Hielke Morsink
c0486e250e
Fix: config and park files not selected on crash (#11251) 2020-04-08 20:00:02 +02:00
Michał Janiszewski
a197e529e8
Fix #6238: Invalid tile elem iteration in Guest::UpdateUsingBin (#11248) 2020-04-08 01:03:02 +02:00
duncanspumpkin
d9ebec6690 Increment network version 2020-04-07 20:19:35 +01:00
duncanspumpkin
54a058ca6c Fix boat location import/export/update.
After a refactoring to split off the boat location the import/export functions meant incorrect information could be loaded into the s6 file for boats that had not left the station. Boats that had left the station had other fields clobbered for the same reason
2020-04-07 20:19:26 +01:00
duncanspumpkin
18a21a73ab Fix balloons import/export issue 2020-04-07 20:08:47 +01:00
Michał Janiszewski
328856a933 Add MISC spirtes to comparison as well 2020-04-07 20:07:37 +01:00
Michał Janiszewski
50541a2cc7 Fix GameStateSnapshot comparators 2020-04-07 20:07:37 +01:00
duncanspumpkin
b857792f23 Fix vehicles changing state on export/import 2020-04-07 20:07:37 +01:00
Michał Janiszewski
914f68dcef Bump network version after fixes reverted in #11190 are reintroduced 2020-04-06 22:32:27 +02:00
Michał Janiszewski
94f6d70ac7 Fix #11084: null broken vehicle (#11090) 2020-04-06 22:32:27 +02:00
Michael Steenbeek
3a47e3b309 Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182) 2020-04-06 22:32:27 +02:00
Michał Janiszewski
63c11ab8fd Fix #11128: null tile element in track_block_get_previous (#11144) 2020-04-06 22:32:27 +02:00
Duncan
a613ec39c8
Merge pull request #11187 from duncanspumpkin/fix_11174
Fix format string
2020-04-06 07:43:40 +01:00
Duncan
919a70361b
Fix incorrect saves in backtrace (#11229) 2020-04-05 21:54:11 +02:00
Duncan
53b948299a
Merge pull request #11226 from duncanspumpkin/fix_trackdesign
Fix track design replays.
2020-04-05 13:08:27 +01:00
Michael Steenbeek
8a12ad8f6b
Fix #9719: Hacked walls in RCT1 saves are imported incorrectly (#11222) 2020-04-05 13:49:36 +02:00
duncanspumpkin
4fcecba5fe Increment Network Version 2020-04-05 12:49:14 +01:00
duncanspumpkin
de7051d940 Fix #11225: Track design replays.
The replay state was not being passed to all sub actions this prevented the replay from working. Note replays made before this still work its just they couldn't be replayed.

name the flag

Update changelog
2020-04-05 12:48:42 +01:00
Gymnasiast
cfdc8567f7
Fix #11230: Seat Rotation not imported correctly for hacked rides 2020-04-05 12:29:07 +02:00
Michał Janiszewski
12ab701a0f
Add missing Expenditure type setting in LargeSceneryPlaceAction (#11224)
Claiming first bounty of #11190
2020-04-05 06:45:00 +02:00
Michael Steenbeek
13a2f67400
Fix #11208: Cannot export parks with RCT2 DLC objects (#11212)
* Do not try to export official objects

* Do not override legacy object's source games

* Amend changelog
2020-04-04 07:06:34 +01:00
Michał Janiszewski
89ae2b51d6
Update error message for unsuccessful crash uploads (#11217)
The upload will be rejected to a disabled submission token, which we sometimes do.
2020-04-03 22:48:27 +02:00
Michael Steenbeek
87dd126e2a
Fix small red gardens getting imported incorrectly from S4 (#11215) 2020-04-03 19:55:39 +02:00
Michał Janiszewski
15a532725a
Change backtrace.io submission token (#11216)
This is to cut off v0.2.5 traces of which we have plenty and collect
ones that have #11190 in them.
2020-04-03 19:44:11 +02:00
Duncan
38e82800be
Merge pull request #11190 from janisozaur/silent-record
Upload park recording in case of crash
2020-04-03 15:29:33 +01:00
Tulio Leao
6cf113ae6f
Improve bound checking on scenery invention (#11171) 2020-04-03 13:31:13 +02:00
Michał Janiszewski
54ae98af68 Increase network version 2020-04-03 09:58:24 +02:00
Michał Janiszewski
27da48336a Revert "Fix #11084: null broken vehicle (#11090)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit 24edada2d8.
2020-04-03 09:53:36 +02:00
Michał Janiszewski
971db142a5 Revert "Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit 598b85d0ca.
2020-04-03 09:51:32 +02:00
Michał Janiszewski
620be75285 Revert "Fix #11128: null tile element in track_block_get_previous (#11144)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit d1faa228c5.
2020-04-03 09:49:58 +02:00
Michał Janiszewski
e19eaa6a98 Upload park recording in case of crash 2020-04-02 23:44:59 +02:00
Michael Steenbeek
1e70c4806e
Fix #11126: Cannot place Frightmare track design (#11186) 2020-04-01 17:37:09 +02:00
Michael Steenbeek
e1e8e2bec0
Add drawing code for ō (#11201) 2020-04-01 14:31:53 +02:00
Michael Steenbeek
598b85d0ca
Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182) 2020-04-01 12:45:08 +02:00
Michael Steenbeek
c1e2c7cc5a
Fix mistake made in #10579 (#11184) 2020-03-31 20:56:47 +02:00
duncanspumpkin
0fd793504e Additional validation 2020-03-31 19:13:13 +01:00
duncanspumpkin
6560de0705 Potential fix #11174, #11175. Use Strnlen
Unsure if this will fix the issue as not reproducable. It is possible
that the pointer passed to this function is bad
2020-03-31 19:11:17 +01:00
Michał Janiszewski
4be3050e74
Update network version after #11180 2020-03-31 16:05:50 +02:00
Michael Steenbeek
41bf6def69
Fix #10951, #11160: Placing park entrances creates bugged ghosts (#11180) 2020-03-31 13:47:37 +01:00
Aaron van Geffen
28d14517e1
Introduce a constant for scrollbar width and height (#11152) 2020-03-30 22:41:49 +02:00
Tulio Leao
3d223b0843
Fix dereference on null iterator (#11154) 2020-03-30 18:05:38 +01:00
pkubaj
c8f9324e41
Fix build on FreeBSD (#11145)
FreeBSD doesn't use libstdc++, but libc++. stdc++fs doesn't exist in libc++.
2020-03-29 23:36:50 +02:00
Michał Janiszewski
d1faa228c5
Fix #11128: null tile element in track_block_get_previous (#11144) 2020-03-29 22:01:13 +01:00
Michał Janiszewski
920150b06d
Fix #11140: exclude thirdparty headers from headers-check target (#11142) 2020-03-29 22:43:37 +02:00
Duncan
f64ea65d03
Rename SPRITE_LIST_TRAIN_HEAD to reduce car head confusion (#11105)
A single car on a coaster can comprise of multiple vehicles. One of those vehicles will be the car head vehicle. The train can comprise of multiple cars. Therefore not all vehicle->IsHead 's will be in SPRITE_LIST_TRAIN_HEAD. This rename makes that slightly more clear
2020-03-29 09:23:24 +01:00
Duncan
2806104db0
Remove peep sort (#11088)
* Remove peep sort. No longer required.

Peeps are now only sorted in a temporary vector when the staff or guest list is open. This allows for simpler allocation of sprites

* Increment Network Version
2020-03-28 12:37:01 +00:00
Tulio Leao
fc645180be
Ammend #11090 for consistency on nullptr check (#11104) 2020-03-28 11:39:59 +00:00
Michał Janiszewski
24edada2d8
Fix #11084: null broken vehicle (#11090) 2020-03-28 10:21:24 +00:00
Peter Ryszkiewicz
fa1ddbd9e3
Show hovered values on finance charts (#10925) 2020-03-28 11:03:10 +01:00
Thijs Versfelt
3613c660a0
Fix #11005: Company value overflows (#11012)
* Clamp park value to prevent integer overflow.

* Replace casting with built-in clamping.

* Add changlog entry for #11005.

* Modify casting to prevent skewed company value.

* Increment network version

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2020-03-27 13:25:16 +01:00
Michael Steenbeek
c6e42ac313
Avoid assertion getting hit in scenery_is_invented() (#11079) 2020-03-27 12:53:18 +01:00
Michael Steenbeek
b70c5cefd6
Use station index in a few more places (#11066) 2020-03-27 11:13:02 +01:00
Michał Janiszewski
5276ce767a
Add missing check for valid scenery type (#11067) 2020-03-26 22:44:41 +01:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Michael Steenbeek
357044171d
Merge pull request #11061 from Gymnasiast/fix/7094
Fix #7094: Back wall edge texture in water missing
2020-03-26 21:04:32 +01:00
Michael Steenbeek
81c6bb26e9
Prepare guest counters for more than 32767 guests (#10989) 2020-03-26 20:02:15 +01:00
Gymnasiast
905ba0c47b
Fix #475: GFX water sides drawn incorrectly 2020-03-26 20:01:25 +01:00
Gymnasiast
aeb1b32078
Fix #7094: Back wall edge texture in water missing 2020-03-26 20:00:53 +01:00
Gymnasiast
6c0de27d54
Change calls to tile side drawing to use big Z 2020-03-26 20:00:53 +01:00
Daan de Heij
9035ba2827
Simple implementation of copy input to clipboard (Ctrl+C) (#11013)
This is a simple implementation of copying all current input text to the clipboard using ctrl+c. A simple dialog acknowledges that text is copied. This commit includes a new string ID for the text in this dialog.
2020-03-26 17:53:34 +01:00
Gymnasiast
da2ba0b023
snake_case to camelCase
This is mostly to trigger a rebuild for openrct2.org
2020-03-26 14:12:01 +01:00
Daan de Heij
9eee58622e
Docs: Add missing directories in readme.md (#11006)
Add missing directories in the source directory structure readme, with a short description to each. Additionally, change the order of 'management' and 'order' such that they are now in alphabetical order.
2020-03-26 12:23:57 +01:00
Duncan
40160892a9
Rework GuestList to use a vector. (#11014)
* Rework GuestList to use a vector.

This is part of a chain of refactors that will be used to rework peep order in the sprite list

* Apply comments. Remove setting var_492 as no longer required
2020-03-26 07:23:30 +00:00
Michael Steenbeek
9dfe5af851
Add remark about track designs with 5 stations (#11051) 2020-03-26 05:53:49 +00:00
Michał Janiszewski
95e2590207
Fix #11043: Null banner object had method called on itself (#11049) 2020-03-25 22:57:15 +01:00
Michael Steenbeek
268e81c21b
Fix mistake in #11029 (#11044) 2020-03-25 20:52:08 +00:00
Michael Steenbeek
3f473ec3f0
Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Michael Steenbeek
766339d771
Fix #11027: Third color on walls becomes black when saving (#11029) 2020-03-25 13:57:15 +01:00
Aaron van Geffen
302fe1cb2b
Merge pull request #10926 from IntelOrca/zoom-refactor
Zoom refactor
2020-03-24 23:28:32 +01:00
Michał Janiszewski
4f6e77e30a Release 0.2.5
- Feature: [#3154] Use a random title sequence each time it is shown.
- Feature: [#6553] Android version now runs in full screen.
- Feature: [#7865] Transport rides can now be synchronised.
- Feature: [#9073] Shortcut keys for the Tile Inspector.
- Feature: [#10305] Add two shortcuts for increasing and decreasing the scaling factor.
- Feature: [#10189] Make Track Designs work in multiplayer.
- Feature: [#10357] Added window for scenery scatter tool, allowing for area and density selection.
- Feature: [#10637] Console command to remove all floating objects.
- Change: [#1164] Use available translations for shortcut key bindings.
- Change: [#10997] Speed is automatically reset to normal upon scenario completion.
- Fix: [#2485] Hide Vertical Faces not applied to the edges of water.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#6766] Changelog window doesn't open on some platforms.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.
- Fix: [#7854] Empty entries in spiral roller coaster designs list.
- Fix: [#8151] Game freezes upon demolishing mazes at odd heights.
- Fix: [#8875] RCT1 competition scenarios are classified incorrectly.
- Fix: [#10176] Mistake in the sprite for the land tool's 6x6 grid.
- Fix: [#10196] Doors unable to be placed at end of track corners.
- Fix: [#10228] Can't import RCT1 Deluxe from Steam.
- Fix: [#10313] Path furniture can be placed on level crossings.
- Fix: [#10325] Crash when banners have no text.
- Fix: [#10376] No ratings generated when a shop and track intersect.
- Fix: [#10420] Money effect causing false positive desync.
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.
- Fix: [#10489] Hosts last player action not being synchronized.
- Fix: [#10543] Secondary shop item prices are not imported correctly from RCT1 saves.
- Fix: [#10547] RCT1 parks have too many rides available.
- Fix: [#10587] Update last action coordinates on correct player.
- Fix: [#10631] Game bugs out and crashes if you get too many stations via copying stations with the tile inspector.
- Fix: [#10662] Duck cheat tooltips look odd and do not explain anything.
- Fix: [#10694] The lift hill speed of the flying roller coaster cannot be changed (original bug).
- Fix: [#10705] Apply multithreaded rendering to all viewports.
- Fix: [#10739] Mountain tool overlay for even-numbered selections.
- Fix: [#10752] Mute button state not correctly set at startup.
- Fix: [#10822] Can place too many peep spawns.
- Fix: [#10898] Banner text has an offset in tile inspector window.
- Fix: [#10904] RCT1/LL-scenarios with red water won't open.
- Fix: [#10941] The Clear Scenery tool gives refunds for ghost elements.
- Fix: [#10963] Light effects are drawn off-centre in some rotations.
- Fix: [#10993] Bottom toolbar not refreshing when a guest leaves the park.
- Fix: [#11001] Rides list does not use natural sorting.
- Fix: [objects#54] Stage Coach cars are not considered covered by the game.
- Fix: [objects#56] Handymen cut grass incorrectly.
- Improved: [#682] The staff patrol area is now drawn on the water, instead of on the surface under water.
- Improved: [#10858] Added horizontal grid lines to finance charts.
- Improved: [#10884] Added y-axes and labels to park window charts.
- Improved: [#10970] Introduced optional light effects for vehicles at night.
- Removed: [#6898] LOADMM and LOADRCT1 title sequence commands (use LOADSC instead).
2020-03-24 21:46:30 +01:00
Michael Steenbeek
e66a6754f5
Remove some hardcoded numbers (#11004) 2020-03-23 19:12:57 +01:00
Aaron van Geffen
34d8572d85 Patch GCC9 in more places. 2020-03-23 17:42:16 +01:00
Ted John
bd0265f1bc Fix GCC9 2020-03-23 16:37:18 +00:00
Ted John
b5c6b968df Remove printf comment 2020-03-23 15:54:04 +00:00
Ted John
c93edb9749 Update min zoom 2020-03-23 15:54:04 +00:00
Ted John
0e539fffe0 Make constructor default 2020-03-23 15:54:04 +00:00
Ted John
1af2720518 Create stub magnify versions of software blitters 2020-03-23 15:54:04 +00:00
Ted John
6e7a7c23c9 Fix odd issues at certain positions of the map 2020-03-23 15:54:03 +00:00
Ted John
d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Aaron van Geffen
a2f8e8c72b
Automatically reset speed to normal upon scenario completion. (#10998) 2020-03-22 23:22:28 +01:00
Gymnasiast
0f8fec1413
Fix #10631: Assertion fails when modifying copied station pieces 2020-03-21 18:43:34 +01:00
Gymnasiast
2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +01:00
Michael Steenbeek
ab50c888ff
Merge pull request #10981 from Gymnasiast/fix/8151
Fix #8151: Game freezes upon demolishing mazes at odd heights
2020-03-20 21:38:12 +01:00
Gymnasiast
cd18697d31
Bump network version 2020-03-20 21:37:57 +01:00
Michael Steenbeek
5d87ea3a43
Convert objects limits to constexpr (#10984) 2020-03-20 21:10:07 +01:00
Duncan
7c03e0b589
Merge pull request #10974 from Gymnasiast/refactor/replace-some-register-usage
Replace some register usage
2020-03-20 20:08:28 +00:00
Michael Steenbeek
ef1906d452
Use constants for max sprites and spatial index (#10983) 2020-03-20 20:16:38 +01:00
Michael Steenbeek
c519512cfe
Create ObjectEntryIndex (#10980) 2020-03-20 19:28:39 +01:00
Ted John
c89cecb2b5
Refactor the ride type to entry map (#10967)
Use C++ vectors and allow larger ride entry indices (> 256)
2020-03-20 18:07:31 +01:00
Gymnasiast
e433ed7d7c
Fix #8151: Game freezes upon demolishing mazes at odd heights
Co-Authored-By: Felix Pelletier <felixpelletier@users.noreply.github.com>
2020-03-20 16:06:12 +01:00
Michael Steenbeek
4cc2bc469a
Fix station number check (#10979) 2020-03-20 13:10:40 +01:00
WantDiscussion
828eef7411
Introduced optional light effects for vehicles at night. (#10970) 2020-03-20 11:47:31 +01:00
Michael Steenbeek
ba8a4e6183
Fix date display for non-American locales on *nix (#10949) 2020-03-20 00:10:15 +01:00
Gymnasiast
ff28654af0
Replace registers in surface paint 2020-03-19 17:21:06 +01:00
Gymnasiast
04a6eaea3f
Replace registers in vehicle_update_track_motion_forwards_get_new_track() 2020-03-19 17:20:44 +01:00
Aaron van Geffen
91301eb0d0
Add Noto Sans as a TTF font alternative for Japanese. (#10971) 2020-03-19 12:36:33 +01:00
Michael Steenbeek
cb40a726ad
Bump network version 2020-03-19 10:49:18 +01:00
Michael Steenbeek
b73098ba21
Fix #10902: Resetting ride let guest out in the air (#10968) 2020-03-18 22:22:25 +01:00
Michael Steenbeek
d86dce17e8
Prepare object indices for uint16_t (part 2) (#10966) 2020-03-18 21:27:53 +01:00
Michael Steenbeek
ae6e53153b
Merge pull request #10922 from Gymnasiast/cleanup-scenery
Cleanup scenery
2020-03-18 18:44:27 +01:00
Gymnasiast
459a0318cf
Implement review requests 2020-03-18 16:22:08 +01:00
WantDiscussion
d6c7aaf69c
Fix: Light effects are drawn off-centre in some rotations 2020-03-18 15:04:57 +01:00
Aaron van Geffen
e27a1a230a
Fix regression in boat hire pathfinding (#10958)
This doesn't fix the guests falling into the water (#10902), but it does fix the spotty pathfinding.
2020-03-18 10:52:27 +01:00
Aaron van Geffen
a56a3fb804
Fix #6766: Changelog window won't open (#10954) 2020-03-17 21:38:15 +01:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags (#10947) 2020-03-16 22:52:06 +01:00
Aaron van Geffen
dbeef78778
Fix #10914: Missing sounds, including guest purchase sound (#10948)
Regression from 09fad0ef7f (part of #10854).
2020-03-16 22:51:32 +01:00
Michael Steenbeek
9fda7762e5
Fix #10942: Cut-away view is broken (#10945) 2020-03-16 21:47:38 +01:00
Michael Steenbeek
25358374b2
Bump network version 2020-03-16 19:45:39 +01:00
Gymnasiast
be4f723287
Avoid writing outside _researchedSceneryItems bounds 2020-03-16 14:04:02 +01:00
jeysbach
568b19e7b3
Feature #10637: Console command for removing floating objects 2020-03-16 09:48:26 +01:00
Michael Steenbeek
e32518208f
Fix Clear Scenery refunding ghost tile elements (#10941) 2020-03-15 23:26:32 +01:00
Gymnasiast
2d5e2bb149
Fix copyright date 2020-03-15 18:04:39 +01:00
X123M3-256
7219c880e2
Allow opening rides with unsuitable track when "Enable all drawable track pieces" cheat is on. (#10923)
Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
2020-03-15 14:11:04 +01:00
Aaron van Geffen
1331283f9a
Update third-party ghc::filesystem to version 1.3.0. (#10939) 2020-03-15 13:50:56 +01:00
Gymnasiast
567e70bfb6
Pass ScenerySelection as const & 2020-03-15 13:28:20 +01:00
Gymnasiast
5ba5daca42
Make ScenerySelection implementation a bit cleaner 2020-03-15 13:19:26 +01:00
Gymnasiast
70e287b076
Clean up scenery handling 2020-03-15 12:15:12 +01:00
Michael Steenbeek
18ebe73dfa
Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Michael Steenbeek
c31ef8e635
Extract vehicle subposition data to its own file (#10912) 2020-03-15 11:27:45 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Gymnasiast
3412c47a9e
Convert some Guest functions to methods 2020-03-13 10:50:22 +01:00
Gymnasiast
cf945f7656
Clean up collide coords 2020-03-13 10:36:45 +01:00
Michael Steenbeek
9b5e8140f9
Fix #10919: Crash when assertion fails in heavily damaged park (#10921) 2020-03-13 10:35:03 +01:00
Duncan
3003e1de75
Fix #10602: Error adding track scenery additions far from station start
Issue caused due to stuffing a temporary unsigned variable in a signed variable. This fix is not a permanent fix and this field in the future should be split up into two separate fields: tile position and relative tile position.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-03-13 09:32:05 +01:00
Michael Steenbeek
de6e6e9d8f
Bump network version 2020-03-12 22:45:40 +01:00
Michael Steenbeek
5d5284cc22
Merge pull request #10886 from Gymnasiast/refactor/more-big-coords
Refactor/more big coords
2020-03-12 15:39:53 +01:00
Gymnasiast
9fd2b883a8
Apply review request 2020-03-12 15:27:58 +01:00
Michael Steenbeek
e29149e455
Deduplicate flat/regular ride track blocks (#10911) 2020-03-12 11:04:52 +01:00
Aaron van Geffen
7be46934ea Add y-axis labels and guides to park rating chart. 2020-03-11 19:24:36 +01:00
Michael Steenbeek
8113c89f9b
Fix #10904: RCT1/LL-scenarios with red water won't open (#10905)
Co-authored-by: Ted John <ted@brambles.org>
2020-03-11 19:21:02 +01:00