hdpoliveira
d93edf77d6
Part of #9473 : Create Vehicle::KillPassengers() ( #11714 )
...
* Part of #9473 : Create Vehicle::KillPassengers()
Converted from vehicle_kill_all_passengers
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-05-17 23:11:19 -03:00
TusharSariya
2cf95adc4b
Fix #11565 : gfx_draw_string_left_clipped to use ScreenCoordsXY ( #11765 )
...
* Issue #11565 , created overload for gfx_draw_string_left_clipped
Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
TomasZilinek
4c88630070
Fix #11567 - create draw_string_centred_underline() overload ( #11771 )
...
Created the overload and deleted the old function (there were no calls)
2020-05-17 17:10:36 -03:00
TomasZilinek
7582ed849a
Fix #11568 - create draw_string_left_underline() overload ( #11770 )
...
* Fix #11568 - create draw_string_left_underline() overload
created the overload, changed all calls from the old function to the new (just 1 call) and deleted the old function
2020-05-17 16:18:15 -03:00
TomasZilinek
277080de74
Fix #11570 - create gfx_draw_string_centered() overload ( #11760 )
...
* Fix #11570 - create gfx_draw_string_centered() overload
I created the overload, updated all calls from the old function to the new and deleted the old one
2020-05-17 15:29:56 -03:00
Tulio Leao
e87343f9c6
Rename MoneyEffect member variables to prevent shadowing ( #11748 )
2020-05-16 17:04:31 -03:00
Ted John
da0ef7d3a4
Fix #11753 : Listview with header does not display last item in the list ( #11754 )
2020-05-15 22:05:00 -03:00
Tulio Leao
b7b5a26a57
Rename ServerList member variables to prevent shadowing
2020-05-15 12:06:41 +02:00
Ted John
f5f8f5bd8e
Use named flags for Peep instead of number
2020-05-15 00:24:24 +01:00
Ted John
b710e417df
Split peep into guest and staff and add more fields
2020-05-14 18:35:21 +01:00
Ted John
7c0da8a32d
Add peep flags and destination
2020-05-14 18:34:25 +01:00
Ted John
41d41df3a5
Add ability to get current language
2020-05-14 18:34:25 +01:00
Tulio Leao
c17aa095d5
Rename Peep::surrounding_thought_timeout > SurroundingsThoughtTimeout
2020-05-13 23:28:16 -03:00
Tulio Leao
32c8e5614f
Rename Peep::angriness to Angriness
2020-05-13 23:25:09 -03:00
Tulio Leao
589a7a48be
Rename Peep::time_lost to TimeLost
2020-05-13 23:22:08 -03:00
Tulio Leao
a216cb9930
Rename Peep::days_in_queue to DaysInQueue
2020-05-13 23:19:41 -03:00
Tulio Leao
128c1993c1
Rename Peep::balloon_colour to BalloonColour
2020-05-13 23:16:43 -03:00
Tulio Leao
6c57f33dc9
Rename Peep::umbrella_colour to UmbrellaColour
2020-05-13 23:14:45 -03:00
Tulio Leao
222f8df6cb
Rename Peep::hat_colour to HatColour
2020-05-13 23:11:28 -03:00
Tulio Leao
3b632fcf95
Rename Peep::favourite_ride to FavouriteRide
2020-05-13 23:06:40 -03:00
Tulio Leao
7a6de648fe
Rename Peep::favourite_ride_rating to FavouriteRideRating
2020-05-13 23:03:58 -03:00
Tulio Leao
14e0cc5e4a
Rename Peep::item_standard_flags to ItemStandardFlags
2020-05-13 23:01:03 -03:00
Michael Steenbeek
620fb5e5c4
Migrate many set_format_arg calls to Formatter ( #11744 )
2020-05-13 21:29:39 -03:00
Michael Steenbeek
f0bd05cf6d
Part of #11158 : Remove more C-style casts ( #11743 )
2020-05-13 21:22:50 -03:00
Michael Steenbeek
32609791de
Merge pull request #11719 from Gymnasiast/random-cleanup
...
Convert sprite_move to method
2020-05-13 11:52:18 +02:00
Michael Steenbeek
511a300251
Some cleanup in Vehicle.cpp ( #11742 )
2020-05-13 11:51:38 +02:00
Gymnasiast
b5b563c2a8
Apply review requests
2020-05-13 10:53:30 +02:00
Gymnasiast
ae194192d6
Clean up calls to MoveTo
2020-05-13 10:47:33 +02:00
Gymnasiast
11472f909d
Convert sprite_move to method
2020-05-13 10:47:32 +02:00
Duncan
f04f62305d
Merge pull request #11718 from MegaMech/patch-1
...
Added check to prevent overflow assertion error
2020-05-13 07:58:02 +01:00
Ted John
0d0349fc09
Allow plugins to update dropdown items ( #11735 )
2020-05-12 21:10:07 -03:00
Michael Steenbeek
666d39cee5
Fix log_warning statement
2020-05-13 00:37:44 +02:00
MegaMech
1f2eec13dd
Added check to prevent overflow assertion error
2020-05-13 00:35:09 +02:00
Michael Steenbeek
1b242d825c
Fix Text Input window colours ( #11736 )
...
Text Input uses one colour, specifically the body colour of the calling window. This was previously handles by a modified window shim, but https://github.com/OpenRCT2/OpenRCT2/pull/11653 changed this and this window now uses the standard window shim. This is why it now needs to change the colour assignment.
2020-05-13 00:31:24 +02:00
Ted John
b3c4dd4844
Fix invalidation of list view widget
2020-05-12 21:03:21 +01:00
Ted John
86fa2f3714
Fix #11730 : invalid write in CustomListView::SortItems
2020-05-12 20:57:26 +01:00
Ted John
c4502df947
Fix #11731 : invalid read in ScWindow::x_get
2020-05-12 18:53:37 +01:00
Duncan
53b627432d
Merge pull request #11596 from AaronVanGeffen/cmake/duktape
...
Fix #11576 : Add duktapeConfig.cmake
2020-05-12 16:45:59 +01:00
Michael Steenbeek
e9fc50d435
Remove NEW_BLOCK_BRAKES define ( #11727 )
...
This define was never enabled, because this "new block brake" behaviour (i.e. not braking at all if the brake was open) was too different from the old behaviour to be useful.
Its intended purpose will be handled by adding actual speed settings on block brakes in the future.
This commit removes the define, and also removes the second parameter to apply_non_stop_block_brake(), which is now always true.
2020-05-12 16:29:15 +02:00
Aaron van Geffen
6edf9b03e0
Add duktapeConfig.cmake to ease configuration.
...
Used for reference:
https://github.com/microsoft/vcpkg/blob/master/ports/duktape/duktapeConfig.cmake.in
2020-05-12 15:13:14 +02:00
stalefishies
9c26c9776b
Fix plugin dropdown widget items not appearing ( #11729 )
...
Commit e182791
(mistakenly?) removed the code to populate the custom
dropdown widget's items from the list of strings passed in from the
plugin. This replaces that code.
2020-05-12 08:21:43 -03:00
Michael Steenbeek
451af76fb6
Remove nonfunctional "guest is lost" notification ( #11722 )
2020-05-11 21:31:02 +02:00
Duncan
79dda7260a
Fix #11695 . Mechanics walking to 0,0 on entrance only ( #11704 )
...
Mistake made when refactoring that meant that null locations were converted into tile 0, 0. I've fixed the general case but it is preferred to try avoid using null states for coordinates if at all possible.
2020-05-11 20:28:40 +02:00
Gymnasiast
b46437ccde
Make common price functions take const
2020-05-11 19:22:25 +02:00
Gymnasiast
af1180a484
Make ShopItemDescriptor::HasFlag take const
2020-05-11 19:21:25 +02:00
Gymnasiast
15b5d97795
Refactor shop items
2020-05-11 19:16:23 +02:00
Michael Steenbeek
d7637cd70f
Replace many C-style casts ( #11720 )
2020-05-11 14:32:56 +02:00
Michael Steenbeek
a261b4ce33
Remove commented out code ( #11721 )
2020-05-11 13:54:15 +02:00
relic-automaton
3e39e2d0db
[Plugin] Add a script hook for ride ratings calculation ( #11698 )
...
The hook is called after ride rating calculation is complete and allows
scripts to override the ratings.
2020-05-10 23:26:10 -03:00
Ted John
35e039c65d
Call tick and day plugin hook at the end of the update routine ( #11713 )
2020-05-10 23:24:15 -03:00
stalefishies
8aaf8d0156
Fix error on windows due to upkeep narrowing ( #11711 )
...
Running msbuild openrct2.proj /t:build /p:platform=x64 gave warning
C4309, which is to do with narrowing on a type conversion. This replaces
static_cast<money16>(0xFFFF) with MONEY16_UNDEFINED (which is
static_cast<money16>(static_cast<uint16_t>(0xFFFF)) ).
2020-05-10 19:58:01 -03:00
Ted John
e182791a6b
Merge pull request #11685 from IntelOrca/plugin/listview-widget
...
[Plugin] Implement the list view widget
2020-05-10 22:36:44 +01:00
hdpoliveira
46d856a723
Extract function news_item_first_open_queue_slot ( #11594 )
2020-05-10 23:19:56 +02:00
Tulio Leao
ed84c2dab0
Fix #11705 : Drawing tooltips out of box ( #11707 )
2020-05-10 15:22:47 -03:00
Ted John
b96fdee531
Add plugin API to remove entities ( #11702 )
2020-05-10 14:07:27 -03:00
Ted John
ec06a9ca4b
Add plugin API for showing an error message ( #11706 )
2020-05-10 14:06:31 -03:00
Ted John
5288caec02
[Plugin] Add support for SetCheatAction and cheat retrieval ( #11700 )
...
* Add cheats interface API
* Add plugin support for SetCheatAction
* Remove ctx from ScCheats
2020-05-10 13:02:10 -03:00
Tom Lankhorst
2d0e7bdfd8
openrct2-ui Audio clean-up and style/usage fixes ( #10115 )
...
* openrct2-ui Audio clean-up and style/usage fixes
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-10 10:05:26 -03:00
TomasZilinek
9fde6a74c3
Close #11561 : Use ScreenCoordsXY in gfx_draw_string()
...
* Fix #11572 create gfx_draw_string() overload
created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)
...
2020-05-10 09:49:15 -03:00
Michael Steenbeek
783494df68
Use rotated calls in GhostTrain.cpp ( #11691 )
2020-05-10 12:49:02 +02:00
Michael Steenbeek
d5f2168b22
Merge pull request #11653 from Gymnasiast/refactor/window-skeleton
...
Introduce WINDOW_SHIM define
2020-05-10 11:34:21 +02:00
frutiemax
c447cde63c
Close #11561 : Use ScreenCoordsXY in gfx_draw_string_centred_wrapped()
...
* Add gfx_draw_string_centred_wrapped overload using ScreenCoordsXY
* Update calls to gfx_draw_string_centred_wrapped
* Remove old signature of gfx_draw_string_centred_wrapped
* Meaningful coordinate variable names and constructor calls
2020-05-10 01:00:26 -03:00
Michael Steenbeek
fa91b4091f
Name tunnel constants ( #11694 )
2020-05-09 23:54:47 +02:00
Gymnasiast
b942d24bcf
Fix WW and WH for some windows
2020-05-09 19:08:00 +02:00
Ted John
cc759e0bce
Improve selected highlight on list view
2020-05-09 17:24:16 +01:00
Ted John
f492827c8a
Implement horizontal scrollbars and fix resizing
2020-05-09 17:24:16 +01:00
Ted John
41950d75f0
Implement scrollbars field on list view
2020-05-09 17:24:16 +01:00
Ted John
5e7cf3bf96
Fix rebase
2020-05-09 17:24:15 +01:00
Ted John
c4f6dbe1ca
Allow items and columns get / set
2020-05-09 17:24:15 +01:00
Ted John
12fb6411b1
Fix 32-bit errors
2020-05-09 17:24:15 +01:00
Ted John
0941620991
Add a few more properties
2020-05-09 17:24:15 +01:00
Ted John
e63fcd010f
Add name get / set to widget
2020-05-09 17:24:15 +01:00
Ted John
4701dd3b9b
Add get / set highlighted cell / selected cell
2020-05-09 17:24:15 +01:00
Ted John
5e427413a6
Refactor list view so we can access it from ScWidget
2020-05-09 17:24:15 +01:00
Ted John
faf59598e5
Start working on exposing ListViewWidget
2020-05-09 17:24:15 +01:00
Ted John
45a1184b0e
Implement selection
2020-05-09 17:24:15 +01:00
Ted John
928bba9795
Implement sorting
2020-05-09 17:24:15 +01:00
Ted John
096de3ccc8
Implement list view
2020-05-09 17:24:15 +01:00
Gymnasiast
6fd83fd006
Make WW and WH static
2020-05-09 18:07:16 +02:00
Gymnasiast
f8aeb70398
Apply review requests
2020-05-09 18:07:16 +02:00
Gymnasiast
00461aedf3
Fix formatting and errors
2020-05-09 18:07:16 +02:00
Gymnasiast
43556d2dec
Remove ifdefs for LEFT_CLOSEBOX - for now
2020-05-09 18:07:16 +02:00
Gymnasiast
9e4c664944
Replace defines with constexpr
2020-05-09 18:07:16 +02:00
Gymnasiast
96fe3d3b3c
Make WINDOW_SKELETON take a title, height and width
2020-05-09 18:07:16 +02:00
tassaron2
559ede5d14
Add compile option to move close box to the left
2020-05-09 18:07:16 +02:00
Ted John
1e2cf9f77b
Fix first widget being pressed on tabless plugin windows
2020-05-09 16:07:04 +01:00
Hummel95
aac55d2cc0
Fix #10876 : Peeps spawns can stack and are not removable ( #11155 )
2020-05-09 16:17:08 +02:00
Ted John
be9f3e1f66
[Plugin] Ensure modified entities and tile elements are invalidated ( #11682 )
2020-05-09 16:13:56 +02:00
Tulio Leao
16c5960e99
Merge pull request #11635 from IntelOrca/plugin/ride-game-actions
...
[Plugin] Add named parameters for ride related game actions
2020-05-09 10:46:41 -03:00
Ted John
e7a028b3b8
Add TODO for Visit track design
2020-05-09 14:31:27 +01:00
Ted John
6db16ffcad
Implement showTextInput plugin API ( #11678 )
2020-05-09 14:18:50 +01:00
Ted John
45d32bec68
[Plugin] Add API for taking captures and giant captures of the park
2020-05-09 13:55:24 +02:00
Michael Steenbeek
3d3dbde642
Merge pull request #11668 from IntelOrca/plugin/peep-stats
...
[Plugin] Add more stats to Peep interface
2020-05-09 13:53:36 +02:00
Ted John
7b8ffdb865
Refactor peep.intensity into new strict struct
2020-05-09 12:37:51 +01:00
Ted John
fa0dd4e0d6
Add more peep stats for plugins
2020-05-09 12:37:51 +01:00
hdpoliveira
650af7d943
Part of #9473 : Create Vehicle::TryReconnectBoatToTrack() ( #11619 )
...
Converted from loc_6DA9F9
2020-05-09 13:32:22 +02:00
Michael Steenbeek
3ceecb33f0
Fix #11676 : Spiral Roller Coaster has regular lift hill available ( #11681 )
2020-05-09 13:23:55 +02:00
Tulio Leao
373776f3db
Address review comments on #11598
2020-05-09 12:35:36 +02:00
Ted John
49e062ae5d
Merge pull request #11665 from IntelOrca/plugin/more-object-fields
...
[Plugin] Split object identifier and add more ride object fields
2020-05-08 20:45:30 +01:00
Ted John
0ebdd93e00
Fix #11667 : Memory dumps being generated every time the game is closed
2020-05-08 15:55:19 +01:00
Ted John
59ab39178f
Add most fields from RideObject struct
2020-05-08 15:28:48 +01:00
Ted John
21f55eaeeb
Handle no object for context.getObject correctly
2020-05-08 15:28:48 +01:00
Ted John
46d69126ea
Split identifier and legacyIdentifier on Object
2020-05-08 15:28:48 +01:00
Aryaman Singh
3417c10a61
Part of #11569 : gfx_draw_string_right() w/ ScreenCoordsXY ( #11654 )
...
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-07 22:27:53 -03:00
Michael Steenbeek
8660bbe9d7
Fix #1013 : negative length in Ride window ( #11651 )
2020-05-06 11:32:10 +02:00
Tulio Leao
5271e06abf
Merge pull request #11621 from Gymnasiast/feature/7648-bis
...
Add drawing code for more APVC, Water Coaster and B&M pieces
2020-05-05 23:14:53 -03:00
Michael Steenbeek
d10f9ebf2a
Use named flags in calls to sub_6C683D() ( #11650 )
2020-05-05 23:11:38 -03:00
Ted John
ec7b52d555
Add action and args to GameActionResult
2020-05-05 18:00:56 +01:00
Ted John
6c8d199831
Add parameter visitors to ride related actions
2020-05-05 18:00:56 +01:00
Michael Steenbeek
4f6f3feeb2
Merge pull request #11601 from Broxzier/bugfix/corrupt-elem-type-typescript
...
Add missing "openrct2_corrupt" element type
2020-05-05 18:53:08 +02:00
Michael Steenbeek
097b90a3db
Fix #11640 : Object shows with blank description ( #11641 )
2020-05-05 18:49:58 +02:00
Michael Steenbeek
362ea7bbc0
Fix #11455 : Object Selection window cuts off scenery names ( #11639 )
2020-05-05 18:19:30 +02:00
Michael Steenbeek
5832b43228
Fix illegal access in window_scenery_tab_entries ( #11643 )
2020-05-05 18:19:01 +02:00
Michael Steenbeek
4c01a308f3
Fix #11644 : Powered launch with blocks not available ( #11646 )
2020-05-05 18:18:42 +02:00
Gymnasiast
cab9fdbe9c
Fix parameter name to apply_non_stop_block_brake()
2020-05-05 17:46:46 +02:00
blackhand1001
7fab48e2eb
Create constant for BLOCK_BRAKE_BASE_SPEED
2020-05-05 17:35:34 +02:00
Michael Steenbeek
f3c0476673
Create constants for both tile element limits ( #11645 )
2020-05-05 15:40:33 +02:00
Hielke Morsink
b39c673456
Introduce constant MAX_ELEMENT_HEIGHT
2020-05-05 11:35:42 +02:00
Fred-1044276
b03fbc086d
Fix #11450 : Can't open rides, even with "Enable all track pieces"
2020-05-05 11:16:24 +02:00
Tulio Leao
b1b103b961
Add missing 'y' in "TrainReadyToDepart" ( #11636 )
2020-05-04 22:39:14 -03:00
hdpoliveira
bb07d84314
Implement Train class with iterators ( #11486 )
2020-05-04 19:43:25 -03:00
Michael Steenbeek
d3448a7a40
Convert STR_NONE and STR_VIEWPORT to constexpr, remove C cast ( #11629 )
2020-05-04 19:41:25 -03:00
Michael Steenbeek
80933dc0cc
Fix #11002 : Rides list shows both red and green light activated ( #11622 )
2020-05-04 19:38:48 -03:00
Hielke Morsink
f88951eb33
Add isHidden field to plug-in TileElements
...
With this field, plug-in creators are encouraged to use `isHidden` rather than spawning corrupt elements to hide other tile elements, and their scripts won't need updating when `isHidden` becomes a real field that does not alter anything other than the element itself.
2020-05-05 00:16:09 +02:00
Michael Steenbeek
ff46481453
Merge pull request #11628 from Gymnasiast/fix/11624
...
Fix #11624 and clean up loc_6B4F6B()
2020-05-04 23:27:46 +02:00
Michael Steenbeek
dfc2512dd5
Merge pull request #11631 from Gymnasiast/refactor/regs2
...
Remove usage of regs.(e)bp
2020-05-04 23:26:41 +02:00
Michael Steenbeek
2911d01185
Remove usage of regs.eax from UpdateTrackMotion() ( #11630 )
2020-05-04 23:22:17 +02:00
Gymnasiast
4ad38f14fc
Replace regs.(e)bp in vehicle_update_track_motion_mini_golf()
2020-05-04 18:46:35 +02:00
Gymnasiast
09955a0114
Remove regs.bp from UpdateTrackMotionForwards/Backwards
2020-05-04 18:46:35 +02:00
Gymnasiast
f88e1c03a0
Fix #11624 : Crash when testing ride with a ghost end-of-station
2020-05-04 17:46:12 +02:00
Gymnasiast
50c750e176
Clean up GetOriginElement()
2020-05-04 17:10:57 +02:00
Gymnasiast
923701e16b
Clean up metal supports in Junior RC drawing
2020-05-04 14:59:29 +02:00
Gymnasiast
3dc0ab3ea6
Water Coaster: allow drawing downward water slopes
2020-05-04 12:47:38 +02:00
Gymnasiast
a5f6725ef3
Extend 'Show all Track pieces' for B&M
2020-05-04 12:35:12 +02:00
Gymnasiast
4d76e8c619
Add booster drawing support to the APVC
2020-05-04 12:30:03 +02:00
Michael Steenbeek
b5fed0d592
Fix #11548 : Operating mode cheat does not allow changing modes ( #11610 )
2020-05-03 12:04:46 -03:00
Tulio Leao
282c7ff6d6
Merge pull request #11598 from tupaschoal/more-coordz-2
...
Favour CoordsXYZ for ride related functions
2020-05-03 10:20:55 -03:00
Ted John
2c153477a6
Add network.currentPlayer plugin API ( #11607 )
2020-05-03 13:53:36 +01:00
Hielke Morsink
e5b1508694
Rename openrct2_corrupt to openrct2_corrupt_deprecated
2020-05-03 13:47:48 +02:00
Hielke Morsink
ec0a734511
Fix: Silent replay record message gets overwritten ( #11600 )
2020-05-02 11:40:21 -03:00
Tulio Leao
a808ded45a
Favour usage of CoordsXY objects instead of individual variables
2020-05-02 11:07:18 -03:00
Tulio Leao
1872152df9
Make window_ride_construction_update_state() use CoordsXYZ*
2020-05-02 11:07:18 -03:00
Tulio Leao
02a5c10a58
Make place_provisional_track_piece() use CoordsXYZ
2020-05-02 11:07:18 -03:00
Tulio Leao
7c82daec25
Use CoordsXYZD in window_ride_construction_mouseup_demolish_next_piece()
2020-05-02 11:07:18 -03:00
Tulio Leao
28b3ac1693
Make track_block_get_previous() use CoordsXYE
2020-05-02 11:07:18 -03:00
Tulio Leao
d58f3ec0b6
Make track_block_get_previous_from_zero() use CoordsXYZ
2020-05-02 11:07:17 -03:00
Tulio Leao
6203a5a20d
Make track_block_get_next_from_zero() use CoordsXYZ
2020-05-02 11:07:15 -03:00
Tulio Leao
1f7ef019fc
Merge pull request #11580 from IntelOrca/plugin/custom-tool
...
[Plugin] Implement custom tool API
2020-05-02 08:28:59 -03:00
Ted John
e3016cdc03
Fix plugin game action hook player and result ( #11587 )
...
- Player was not being attached to the game action event args.
- OpenRCT2 was looking for error on the event args object rather than the result sub object.
2020-05-02 11:45:05 +01:00
Ted John
e5b05747d3
Apply code review refactors
2020-05-02 11:38:33 +01:00