Commit Graph

2061 Commits

Author SHA1 Message Date
Gymnasiast 6cdee9db93
Fix #7006: Use RTDs for determining ride category 2020-04-30 12:59:18 +02:00
Gymnasiast 73671bbeeb
Make ResearchItem use ObjectEntryIndex 2020-04-30 12:59:18 +02:00
Duncan 96222ebace
Merge pull request #11509 from duncanspumpkin/entity_cleanup
Entity cleanup
2020-04-28 10:44:28 +01:00
duncanspumpkin fed148648c Use IsPeep in more places 2020-04-28 07:57:47 +01:00
Gymnasiast a1cbaf9a46
Use OBJECT_ENTRY_INDEX_NULL in more places 2020-04-28 08:38:37 +02:00
Michael Steenbeek 2e50cd44ba
Refactor ride_list_item to RideSelection (#11505) 2020-04-27 16:26:35 +02:00
Michael Steenbeek bcabc1d807
Merge pull request #11457 from Gymnasiast/refactor/rtd-forever
More RTD + cleanup
2020-04-27 15:11:54 +02:00
Ted John ca98ffc697 Implement onClose event for custom windows 2020-04-26 16:01:03 +01:00
Ted John 2c4cf49fb1 Add more const 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 4162ad0eb6 Remove unused getWindow parameter 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 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 4c45e0ceb0 Remove use of .value() 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 7f9ff121b1 Fix rebase 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 f12f439309 Fix errors after rebase 2020-04-26 14:35:06 +01:00
Ted John b7b1920a79 Fix build 2020-04-26 14:35:06 +01:00
Ted John 119b24a6ff Show selected index on custom dropdowns 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 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 4d5e7f19ca Implement surface style API and improve plugin calling 2020-04-26 14:35:04 +01:00
Ted John cf9478eb76 Fix build 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 09c8c6d508 Implement window colours API 2020-04-26 14:35:04 +01:00
Ted John 5c1fabec56 Implement API for spinners 2020-04-26 14:35:04 +01:00
Ted John 9dd9e600b5 Implement API for image buttons 2020-04-26 14:35:04 +01:00
Ted John c73bb63f0e Implement window classification and number 2020-04-26 14:35:04 +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 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 0c1ed7b509 Implement APIs for bringToFront, findWidget etc. 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 a9a67a7a7e Implement group boxes 2020-04-26 14:35:02 +01:00
Ted John b1cf6fcf63 Implement Widget API 2020-04-26 14:35:02 +01:00
Ted John 7274e45c93 Implement main viewport API 2020-04-26 14:35:02 +01:00
Ted John d3af46ad9f Implement label widget 2020-04-26 14:35:02 +01:00
Ted John 4b95a3a9d0 Implement custom menu items 2020-04-26 14:35:01 +01:00
Ted John 4109b2c55a Fix build errors 2020-04-26 14:35:01 +01:00
Ted John 5bd58118b5 Get the plugin branch building again 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 5befd39063 Construct ScWindow properly 2020-04-26 14:35:00 +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
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
Gymnasiast 8d0854804e
Replace missed check for coasters with vertical towers 2020-04-26 11:05:11 +02:00
Breno Guimaraes 2019fa4655 Replay set_format_arg calls in favor of using Formatter 2020-04-25 19:35:49 -03:00
Breno Rodrigues Guimarães a0619d04cf
Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Michael Steenbeek 0ecc64f781
Fix #11407: Setting an RCT1 path needs better error messages (#11418) 2020-04-25 15:36:44 +02:00
Kevin Strehl 5456899afc
Close #10572: Add cheat to allow building at invalid heights 2020-04-25 01:07:36 +02:00
Tom Lankhorst da0c586fad
Mark getters in audio layer as [[nodiscard]] 2020-04-24 18:38:11 +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
Michael Steenbeek 44f62a97c2
Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +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 64e9e8aeb9 Add missing override specifier 2020-04-21 13:31:01 +02:00
Breno Rodrigues Guimarães 374b744477
Use Formatter to handle argument formatting for tooltips (#11379) 2020-04-21 12:38:59 +02: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
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
Olivier Wervers 3830347294
Switch tile inspector copy paste button placement (#11358) 2020-04-19 22:41:45 +02:00
Tulio Leao 4d679b7e3e
Fix #11361: rct_object_filters leak in EditorObjectSelection.cpp (#11364) 2020-04-19 16:28:01 -03:00
Gymnasiast 19646a29a5
Remove duplicated code with function call 2020-04-19 21:13:20 +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 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Duncan a2efc49bcd
Merge pull request #11357 from Gymnasiast/fix/1148
Fix #1148: Research funding dropdown not shown in finances window
2020-04-19 16:06:49 +01:00
Michael Steenbeek deb56c2a72
Move LiftData to RTDs (#11347) 2020-04-19 14:41:26 +02:00
Gymnasiast 860924dfb0
Fix #1148: Research funding dropdown not shown in finances window 2020-04-19 14:29:56 +02:00
Michał Janiszewski 5bfc41f49e
openrct2-ui cast fixes (#11348) 2020-04-19 14:08:22 +02:00
Michael Steenbeek d3a5446114
Create ride type flag for suspended rides (#11355) 2020-04-19 13:53:51 +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
Tulio Leao 523e6ca4a0
Fix #11340: Sound bar only working when maxed out (#11341)
The changesets replacing c-style casts with named casts mistakenly added some parentheses in the wrong place, changing the evauluation order.
2020-04-18 20:21:30 +02: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
Tulio Leao e2be89648e
Fix #6119: Advertising campaign for ride window not updated properly (#11335) 2020-04-18 16:15:04 +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
Michael Steenbeek 35bbf6a166
Fix refactor mistake that prevents compilation (#11334) 2020-04-18 14:56:38 +02:00
Tulio Leao 2b68610473
Fix #11331: Create constant for failure on ScenarioCompletedCompanyValue (#11332) 2020-04-18 13:46:18 +02:00
Tulio Leao 935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Olivier Wervers bb72fd6021
Fix #9029: Set animation frame on doors using the tile inspector (#11206) 2020-04-18 07:43:46 -03:00
Tulio Leao b948d65c33
Use named casts on openrct2-ui root folder (#11137) 2020-04-18 12:15:07 +02:00
Michael Steenbeek b4a763c751
Move naming convention to RTD (#11319) 2020-04-18 12:12:07 +02:00
Olivier Wervers 506b06bd73
Fix #11072: Land and water tools work out of bounds (#11179)
Tool tried to act out of bounds, where it shouldn't do anything
2020-04-17 19:34:32 -03:00
Aaron van Geffen fe24a84dc4 Make use of extra horizontal space when shortcut window is resized. 2020-04-17 18:35:06 +02:00
Aaron van Geffen 2e55b621f0 Reorder keyboard shortcuts per Umdlye's suggestions. 2020-04-17 18:35:06 +02:00
Aaron van Geffen 77776cd6c8 Allow adding separators between listed shortcuts. 2020-04-17 18:35:06 +02:00
Aaron van Geffen d1a314b0f7 Decouple shortcut window order from internal order. 2020-04-17 18:35:06 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02: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
Aaron van Geffen a81488d704
Fix #11272: Make casualty and stalled vehicle notifications optional 2020-04-16 14:41:39 +02:00
Aaron van Geffen 2d0f62e903
Open about window when clicking the title screen logo 2020-04-16 13:18:09 +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
Michael Steenbeek d91173060a Guard against null banners (#11078) 2020-04-06 22:32:27 +02:00
Michał Janiszewski 85d6fa8c8b Revert "Guard against null banners (#11078)"
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 47b6139546.
2020-04-03 09:56:51 +02:00
jeysbach e9611ffaff
Fix #11063: Exchange hack for call to update_scroll (#11178) 2020-03-31 16:03:14 +02:00
Aaron van Geffen 503fbefbeb Harmonise date and time gaps / anchors.
Introduces the DATE_TIME_GAP constant.
2020-03-30 22:44:08 +02:00
Aaron van Geffen 56216fd026 Add an additional check for locales that do not use leading zeros for dates. 2020-03-30 22:42:58 +02:00
Aaron van Geffen 484956e006 Fix #10928: File browser's date column is too narrow. 2020-03-30 22:42:58 +02:00
Aaron van Geffen 28d14517e1
Introduce a constant for scrollbar width and height (#11152) 2020-03-30 22:41:49 +02:00
Duncan 87b90f2304
Fix #11109. Incorrect drawing of staff list after refactor. (#11134)
Looks like I just completely forgot to implement the required changes to the drawing code. Drawing code now uses the new StaffList.
2020-03-29 22:00:28 +01: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
Michael Steenbeek b5bcd0c2aa
Merge pull request #11122 from tupaschoal/reduce-c-casts
Reduce c-style cast
2020-03-28 22:47:14 +01:00
Michael Steenbeek 09cd6a82ee
Merge pull request #11123 from tupaschoal/reduce-c-casts-2
Reduce c-style cast on openrct2-ui/(input/interface/title)
2020-03-28 22:40:33 +01:00
Tulio Leao abfd41c35f Use named casts in openrct2-ui/drawing 2020-03-28 17:18:21 -03:00
Tulio Leao 57886ad0c7 Use named casts in openrct2-ui/audio/ 2020-03-28 17:18:15 -03:00
Tulio Leao fe6ff2ac94 Use named casts in openrct2-ui/audio/AudioChannel.cpp 2020-03-28 17:18:07 -03:00
Tulio Leao bb052a784a Use named casts in openrct2-ui/audio/AudioMixer 2020-03-28 17:17:57 -03:00
Tulio Leao b0e12ebc8f Use named casts on openrct2-ui/title 2020-03-28 17:04:33 -03:00
Tulio Leao b579771364 Use named casts on openrct2-ui/interface 2020-03-28 17:04:33 -03:00
Tulio Leao 8823658972 Use named casts on openrct2-ui/input 2020-03-28 17:04:29 -03:00
Aaron van Geffen a028bcbb64
Fix #11111: Finance graph hover values are glitchy with software renderer 2020-03-28 20:42:45 +01:00
Tulio Leao 2bb3a34274 Convert C-style pointer casts to named casts 2020-03-28 16:41:23 -03:00
Duncan 8920c36170
Fix #11107. Guestlist refresh issues after refactor (#11108)
Another little oversite on the guestlist preventing full functionality of the guestlist. Also fixed the map flashing
2020-03-28 16:21:01 +00:00
Duncan e7d0043756
Rework StaffList to use a vector (#11059)
* Rework StaffList to use a vector

This is a part of a reworking that removes the need for the peep list to be sorted by name/number order. Ultimately simplifying the sprite create code

* Remove unused variable setting
2020-03-28 12:12:53 +00:00
Peter Ryszkiewicz fa1ddbd9e3
Show hovered values on finance charts (#10925) 2020-03-28 11:03:10 +01:00
Duncan a33fbfa234
Fix guest list when in filtered mode. (#11102)
Mistake during refactor didn't consider that find_groups resets global vars.
2020-03-28 11:02:26 +01:00
Michael Steenbeek 47b6139546
Guard against null banners (#11078) 2020-03-27 13:04:45 +01:00
Michał Janiszewski 56e6ec2c23
Fix #11068: segfault when trying to clear empty list (#11069)
The report in #11068 was using track designs manager with "Boat hire"
ride, for which there were no designs and selecting "Clear" button on
the list accessed empty vector in `_filteredTrackIds`.
2020-03-26 23:49:10 +01:00
Michael Steenbeek cfb405f0ed
Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Michael Steenbeek 81c6bb26e9
Prepare guest counters for more than 32767 guests (#10989) 2020-03-26 20:02:15 +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
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 3f473ec3f0
Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Aaron van Geffen 302fe1cb2b
Merge pull request #10926 from IntelOrca/zoom-refactor
Zoom refactor
2020-03-24 23:28:32 +01:00
Daan de Heij 3dc0110fe1
Fix #10993: Guest Count Intent Not Listened To (#11008)
* Fix #10993: Guest Count Intent Not Listened To

Because of a missing intent case, the guest count did not redraw whenever a guest leaves.

* Update changelog.

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-03-24 18:35:00 +00:00
Tulio Leao 3e2533ac50
Fix #11001: Rides list does not use natural sorting (#11007) 2020-03-23 22:33:57 +01:00
Ted John 1af2720518 Create stub magnify versions of software blitters 2020-03-23 15:54:04 +00:00
Ted John d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Michael Steenbeek 32e589efbe
Make _appropriateImageDropdownItemsPerRow a constexpr (#10990) 2020-03-21 15:22:18 +01:00
Gymnasiast ceec430ae1
Raise max size of dropdowns to 512 items 2020-03-20 21:48:27 +01:00
Gymnasiast 416dc22f35
Guard access to appriopriate image items per row 2020-03-20 21:48:27 +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
WantDiscussion 828eef7411
Introduced optional light effects for vehicles at night. (#10970) 2020-03-20 11:47:31 +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
Aaron van Geffen 2f05033f14 Position dropdown and spinner label texts vertically, too. 2020-03-17 00:35:25 +01:00
Aaron van Geffen 340f6522dd Increase the height of various price/loan/duration spinner widgets. 2020-03-16 23:46:33 +01:00
Aaron van Geffen f3765646c5 Increase height for button heights in text input window.
Also fixes the formatting for the widgets array.
2020-03-16 23:46:17 +01:00
Aaron van Geffen 8c0186d9a4 Make file window button captions fit in more languages.
The window is made 10px wider to accommodate button captions in languages like Japanese.
2020-03-16 22:56:04 +01:00
Aaron van Geffen fc70d6c851 Increase research dropdown heights. 2020-03-16 22:56:04 +01:00
Michael Steenbeek fd91c41a76
Name remaining ride type flags (#10947) 2020-03-16 22:52:06 +01:00
Michael Steenbeek 9fda7762e5
Fix #10942: Cut-away view is broken (#10945) 2020-03-16 21:47:38 +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
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +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
Aaron van Geffen dfe1c8dea8 Use COMMA32 instead of UINT16 for future-proofing; amend changelog. 2020-03-11 19:25:32 +01:00
Aaron van Geffen 64e2edd285 Add y-axis labels and guides to park guests chart. 2020-03-11 19:24:37 +01:00
Aaron van Geffen 7be46934ea Add y-axis labels and guides to park rating chart. 2020-03-11 19:24:36 +01:00
Aaron van Geffen 9c5f1248d5 Resize park rating and guests' tabs to accomodate y axis labels. 2020-03-11 19:24:36 +01:00
Michael Steenbeek e441019b04
Refactor rct_track_preview flags (#10906)
* Refactor rct_track_preview flags

* Zero-index rct_track_preview flags
2020-03-11 15:53:16 +00:00
Gymnasiast a0e14a66d9
Prepare guest window for more than 5 pages 2020-03-09 11:54:49 +01:00
Hielke Morsink 8737d3c2f0
Fix #10898: banner text has an offset in tile inspector window (#10900)
Interesting how this only gets reported now, it has been broken for 8 months already. It's likely a copy-paste error from 61d64ab8c5.
2020-03-08 23:02:55 +01:00
Gymnasiast 02c135e4fa
Clean up many staff functions 2020-03-07 23:07:47 +01:00
Gymnasiast 5f96a121ae
Apply ScreenCoordsXY to some functions 2020-03-07 22:25:42 +01:00
Gymnasiast 7759b54c2f
Make PeepPickupAction *actually* take a CoordsXYZ 2020-03-07 21:34:04 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Michael Steenbeek 4f86d0115c
Merge pull request #10866 from Gymnasiast/refactor/more-tile-element-prep
Refactor/more tile element prep
2020-03-06 09:25:32 +01:00
Michael Steenbeek ae3ca0b2b0
Merge pull request #10880 from Gymnasiast/refactor/some-define
Replace some hard coded numbers with constants
2020-03-05 20:53:16 +01:00
Michał Janiszewski 92e5958ab6
Improve WinNT 5.1/MinGW support (#10869) 2020-03-05 19:35:23 +01:00
Gymnasiast dcf4301559
Use constant for invalid direction 2020-03-05 18:27:36 +01:00
Gymnasiast 33d2155529
Use define for some remapping instructions 2020-03-05 18:15:03 +01:00
Michael Steenbeek 0782692d58
Replace hardcoded scenery offsets (#10879) 2020-03-05 17:54:10 +01:00
Michael Steenbeek 8351a0477d
Merge pull request #10854 from tupaschoal/coords-3
Increase usage of ScreenCoordsXY on viewport functions and structs
2020-03-05 12:21:04 +01:00
Gymnasiast 8883f428ba Clean up window vars 2020-03-05 08:03:38 -03:00
Tulio Leao 8056d050c9 Remove unused variables from rct_window 2020-03-05 08:03:38 -03:00
Gymnasiast 57a40c0657
Extend PathElement 2020-03-04 21:57:42 +01:00
Daan de Heij 88fcba35ec
Fix #10662: Improve duck cheat tooltips
Co-authored-by: Thijs Versfelt <40113382+thversfelt@users.noreply.github.com>
2020-03-03 23:25:22 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 8b36cce37c Make _lastMainViewport use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Tulio Leao 87f724d038 Use Coords objects for viewport_create() 2020-03-02 20:49:59 -03:00
Peter Ryszkiewicz e322519025
Added horizontal grid lines to finance charts (#10851)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-03-02 21:59:05 +01:00
Michael Steenbeek 88a3185715
Make draw_mini_preview_get_pixel_position() take const 2020-03-02 12:36:49 +01:00
Gymnasiast cded8313d7
Replace many occurrences of LocationXY16 2020-03-01 22:15:28 +01:00
Michael Steenbeek e3f5eb7275
Merge pull request #10847 from tupaschoal/const-ref-coords
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Michael Steenbeek d395d67b95
Merge pull request #10846 from tupaschoal/const-ref-screencoords
Prefer const ref to send ScreenCoordsXY over
2020-03-01 14:17:51 +01:00
Tulio Leao 2da96e8cfc Revert to copy instead of const-ref for functions that edit content 2020-03-01 09:57:03 -03:00
Tulio Leao 91c4735917 Revert to copy instead of const-ref for functions that edit content 2020-03-01 00:49:00 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao 475eed0a56 Receive CoordsXY by const ref instead of copy 2020-02-29 01:16:19 -03:00
Michael Steenbeek e36d8f03e6
Implement #10666: ShowMessageBox on Android (#10817) 2020-02-24 13:48:32 +01:00
Michael Steenbeek 18f60fa987
Merge pull request #10821 from Gymnasiast/refactor/special-pieces-for-track
Refactor custom track piece handling
2020-02-23 21:29:12 +01:00
Michael Steenbeek 6d7a2bea69
Merge pull request #10818 from tupaschoal/coords-xy-2
Use ScreenCoordsXY for some window interactions
2020-02-23 13:23:50 +01:00
Aaron van Geffen 423ed90112
Fix #10815: Vertical alignment of scatter tool area size label. (#10823) 2020-02-23 10:57:38 +01:00
Gymnasiast 93926d5e5d
Move all the ride type-specific track categories to regular ones 2020-02-22 23:20:12 +01:00
Gymnasiast dc04c5ec95
Refactor custom track piece handling 2020-02-22 23:01:34 +01:00
Tulio Leao 1b3f0e9a44 Create ScreenCoordsXY gSavedView from separate x,y variables 2020-02-22 16:01:21 -03:00
Tulio Leao 47025c45b4 Make setMainView() use ScreenCoordsXY 2020-02-22 16:01:21 -03:00
Tulio Leao 826478a8ef Use ScreenCoordsXY on UiContext.cpp 2020-02-22 16:01:20 -03:00
Michael Steenbeek 86c7dbf1d5
Fix #7854: Cannot build custom Spiral RC; dummy entries in track designs list (#10814) 2020-02-22 19:06:57 +01:00
Michael Steenbeek e16a53df1d
Fix #10694: Lift hill speed of the Flying RC cannot be changed 2020-02-22 18:47:33 +01:00
Aaron van Geffen 9278ef7c61 Move ownership of scatter globals; delegate cleanup to close event. 2020-02-22 17:25:29 +01:00
Aaron van Geffen 5d9bcc083c Remove unused update event. 2020-02-22 17:25:29 +01:00
Aaron van Geffen aa6d6efe99 Refactor common parts of branched code.
Change shifts to COORDS_XY_STEP multiplication.
2020-02-22 17:25:29 +01:00
Aaron van Geffen 2528e94b48 Introduce low, medium, and high density buttons to the scatter tool.
Change window lay-out to more closely resemble others by introducing
density buttons, along with new sprites.

The amount of elements varies by density as follows:
* Low: number of elements equal to tool size
* Medium: twice as many elements as the tool size
* High: three times as many elements as the tool size.

Remove extraneous 'retry' clause.
2020-02-22 17:25:19 +01:00
Aaron van Geffen 642de8d11a Change gWindowSceneryScatterEnabled to bool, remove hack. 2020-02-22 17:20:46 +01:00
Aaron van Geffen cc9498e9a6 Revert changes to default scatter/cluster size. 2020-02-22 16:18:35 +01:00
Aaron van Geffen 6f029055a3 Make scatter window themeable; default to scenario window style. 2020-02-22 16:18:35 +01:00
Anton Scharnowski e6e48363de Introduce Scenery-Scatter Tool Window. 2020-02-22 16:18:19 +01:00
Tulio Leao 1ea9015315
Use CoordsXY(Z) in more places 2020-02-22 14:20:28 +01:00
Michael Steenbeek 08ca829ac2
Create RideTypeDescriptors (#10707) 2020-02-20 11:00:03 +01:00
Aaron van Geffen 947903fefb
Mountain tool overlay in land tool window (#10739) 2020-02-19 11:17:11 +01:00
Aaron van Geffen dd869c8c0a
Fix #10176: Mistake in sprite for the land tool's 6x6 grid. (#10735) 2020-02-19 09:45:00 +01:00
Michael Steenbeek f41f878581
Replace some usages of LocationXY(Z)16 (#10699) 2020-02-18 22:42:38 +01:00
Tulio Leao 0c4623a39f
Replace typedef aliasing by using (#10712) 2020-02-17 11:43:47 +01:00
Matt d6c3373b5e
Remove unused parameter and minor cleanup 2020-02-15 21:28:28 +01:00
Gymnasiast 1e6efa6eb4
Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
Michael Steenbeek a0fb955102
Merge pull request #10590 from tupaschoal/pr-9432
Fix #8064 Ride construction errors shown as (undefined string)
2020-02-14 11:31:43 +01:00
Tulio Leao 60e2546b2d Improve legibility of ride placement # attempt calculation 2020-02-13 23:10:33 -03:00
Michael Steenbeek dbb89b96fb
Clean up scenery window variables (#10697) 2020-02-13 21:24:37 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
Tulio Leao d0b255d98b Start zAttemps from 0 2020-02-10 21:55:21 -03:00
Tulio Leao e79584fe24 Remove superflous if 2020-02-10 21:55:21 -03:00
Tulio Leao 6522b10dfa Make Z attempts crescent 2020-02-10 21:55:21 -03:00
Tulio Leao fabef9b050 Modify height search to also affect maze construction 2020-02-10 21:55:19 -03:00
aw20368 d2e5c29ce0 review changes (squash) 2020-02-10 21:54:41 -03:00
aw20368 c76378bc8b Fix #8064 Ride construction errors shown as (undefined string)
The search for height to build track ended at a half-height, leading to (undefined string) error. Changed to always end at whole height and search as high as possible.
2020-02-10 21:54:26 -03:00
Ted John be9cb19df5 Replace cURL with WinHttp implementation on Windows
This reduces the number of third party dependencies for Windows builds. WinHttp is quite a nice straight forward API so doesn't involve too much extra code.
2020-02-08 17:47:03 +00:00
Michael Steenbeek d16fbb0cd2
Change ride->overall_view to CoordsXY (#10673) 2020-02-08 17:19:59 +01:00
Gymnasiast 66dbb5e166
Refactor access to ResearchItem's rawValue 2020-01-26 15:17:37 +01:00
Gymnasiast e6c32230bc
Convert rawValue to uint32 2020-01-26 14:12:57 +01:00
Gymnasiast 63fddee603
Convert gResearchLast/NextItem to std::optional 2020-01-26 10:07:16 +01:00
ζeh Matt 32d6ed2bc2
Merge pull request #10593 from tupaschoal/pr-10048
Fix #9477: Process exit code is always 0
2020-01-24 22:38:22 +01:00
Duncan 171e255981 Fix #10598. Mistake made when fixing #7784. (#10606) 2020-01-23 22:43:29 +01:00
Michael Steenbeek 3192bfb7c6
Move research functions to method; remove unused function (#10609) 2020-01-22 22:51:11 +01:00
Aaron van Geffen d1eb041958 Increase height of track save buttons. (#10604) 2020-01-22 13:30:33 +01:00
Aaron van Geffen acc6cffad3 Apply clang-format. 2020-01-22 11:41:34 +01:00
Michael Berk 914c07a711 Added Random Title Sequence 2020-01-22 11:41:34 +01:00
Tulio Leao c87e1ff9b6 Use EXITCODE enum on game startup 2020-01-19 19:37:27 -03:00
Lomash Gupta 0165261ac0 Fix #9477: Fix process exit code always being zero
- Replaced gExitCode occurences with EXIT_SUCCESS and EXIT_FAILURE
- Removed global declaration of gExitCode
2020-01-19 18:35:24 -03:00
Lomash Gupta 36840f3fe0 fixed gExitCode 2020-01-19 18:35:24 -03:00
duncanspumpkin 272e4f29a3 Further minor refactors 2020-01-19 17:16:42 +00:00
duncanspumpkin 08ea5585ee Small refactors and cleanups 2020-01-19 17:16:42 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Tulio Leao 893086440c Use CoordsXYZ on park_entrance_get_index() 2020-01-19 13:30:28 -03:00
Tulio Leao d34321fdaa Use CoordsXY on ride_entrance_exit_place_ghost() 2020-01-19 13:30:28 -03:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Tulio Leao 89edde6a3c Use CoordsXY on footpath_bridge_get_info_from_pos() 2020-01-12 22:27:30 -03:00
Tulio Leao 201d13577e Use CoordsXY for footpath_get_coordinates_from_pos() 2020-01-12 22:20:29 -03:00
Michael Steenbeek d7f23bc5bf
Close #6898: Remove LOADMM and LOADRCT1 commands (#10546) 2020-01-12 14:26:33 +01:00
Michael Steenbeek c5297dfcdd
Fix #10550: Hovering the mouse cursor with path on a certain height level works weird (#10552) 2020-01-12 14:26:15 +01:00
Michael Steenbeek f05aeb1fcd
Fix #7784: Vehicle tab takes 1st car colour instead of tab_vehicle's colour (#10544) 2020-01-12 10:32:11 +01:00
Tom Lankhorst 2ff8a467c6 Find Jansson with pkg-config on non-MSVC. (#10521) 2020-01-09 19:56:25 +01:00
Michael Steenbeek 0c9b1cec96
Correct max vehicles per ride value (#10504)
* Correct max vehicles per ride value

* Fix formatting

* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Tulio Leao c4a865384e Move Mac-only str handling functions to Platform (#10264) 2020-01-04 12:44:40 +01:00
Kevin Laframboise 13e946a239 Fix #10464: Incorrect error messages for track placement (#10494) 2020-01-02 08:11:24 +00:00
Duncan f4440b57b7
Merge pull request #10488 from Gymnasiast/refactor/map_get_footpath_element
Refactor map_get_footpath_element() and fix #10486
2020-01-02 07:45:15 +00:00
Gymnasiast 5c0a62c31a
Implement review requests 2020-01-01 23:03:41 +01:00
Michael Steenbeek 29922da871
Refactor calls to staff_is_patrol_area_set() 2019-12-31 10:10:40 +01:00
Gymnasiast 0d09a645fc
Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +01:00
Kevin Strehl 37110f386d Add Keyboard Shortcuts to the Tile Inspector (#10430) 2019-12-31 09:34:38 +01:00
Duncan c170926200 Refactor to prefer baseZ instead of height for big Z (#10478) 2019-12-31 09:33:27 +01:00
Duncan c74339fed9 Fix #10477. Fix upper max height limit being very low for large scenery
Mistake made while improving mouse control when zoomed out caused the upper limit for multi tile scenery to be limited by the sum of all clearance z values instead of the greatest clearance z value.
2019-12-31 09:15:46 +01:00
Duncan d486ac4d3b Reduce direct usage of LOCATION_NULL (#10480)
* Reduce direct usage of Location_Null

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

* Remove incorrect AND with LOCATION_NULL

In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Duncan 2c359736ee
Refactor to reduce usage of LocationXY8 and sLocationXY8 (#10479)
* Refactor to reduce LocationXY8 usage

* Further reduction of LocationXY usage and sLocationXY usage

* Reduce sLocationXY8 usage
2019-12-30 19:03:34 +00:00
Tulio Leao 06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek 77494bbc73 Create definitions for some coords related stuff (#10456)
* Create definitions for some coords related stuff

* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Michael Steenbeek bad5e326d1
Merge pull request #10103 from tupaschoal/compilation-warnings
Fix some compilation warnings
2019-12-28 23:09:14 +01:00
Tulio Leao 98110c0544 Make Map::map_invalidate*() use CoordsXY (#10437)
* Make Map::map_invalidate_element() use CoordsXY

* Make Map::map_invalidate_tile_full() use CoordsXY

* Make Map::map_invalidate_tile_zoom0() use CoordsXY

* Make Map::map_invalidate_tile_zoom1() use CoordsXY

* Make Map::map_invalidate_tile() use CoordsXY

* Use CoordsXYRangedZ for map invalidation

* Fix vehicle tile invalidation use Z instead of Y coord

* Fix BannerRemoveAction sending Z TileCoords to invalidate tile

* Fix wrong tile invalidation on peep_update_walking_break_scenery

* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Tulio Leao 84928cb4ef Comment why GetOrLoadImageTexture returns BasicTextureInfo 2019-12-27 15:05:28 -03:00
Tulio Leao d4feed81e6 Fix C6031: return value ignored 2019-12-27 15:05:28 -03:00
Tulio Leao 28812760e7 Fix some compilation warnings 2019-12-27 15:05:27 -03:00
Michael Steenbeek d0744df22f
Merge pull request #10443 from tupaschoal/reduce-locationxy
Remove LocationXY usage on windows and actions
2019-12-27 15:58:26 +01:00
Michael Steenbeek 64f7cac6d6
Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00
Michael Steenbeek 8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01:00
Tulio Leao 109a90269c Prefer setNull/isNull on TopToolbar over LOCATION_NULL 2019-12-27 09:52:31 -03:00
Tulio Leao 15f873c018 Remove LocationXY usage on openrct2-ui\windows\ViewClipping.cpp 2019-12-27 09:52:27 -03:00
Tulio Leao 05ef277cbd Remove LocationXY usage on openrct2-ui\windows\TopToolbar.cpp 2019-12-27 09:22:51 -03:00
Tulio Leao 3c3e179e7f Remove LocationXY usage on openrct2-ui\windows\RideConstruction.cpp 2019-12-27 09:22:51 -03:00
ζeh Matt 518780c3e8
Merge pull request #10422 from ZehMatt/refactor/gCommandExpenditure
Refactor out gCommandExpenditureType
2019-12-25 01:49:46 +01:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 85ecb52e7c
Manually replace more Z occurrences 2019-12-23 20:05:26 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
Matt 52ee9c6896
Use enum class for ExpenditureType 2019-12-22 20:51:55 +01:00
Matt 79acb6a073
Move staff wage data to Staff.cpp/h 2019-12-22 20:51:55 +01:00
nia addd27d4dc Support NetBSD and simplify platform ifdefs. (#10271)
For files intended to support unixy freedesktopy systems,
reduce the ifdef down to __unix__ && !__APPLE__ && !__ANDROID__,
rather than naming linux and all the BSDs and so on by hand.

Should simplify adding support for systems like illumos in the
future.

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2019-12-22 17:07:39 +01:00
Duncan e61401e48c Fix #10410: Tile Inspector does not hightlight tile correctly
Mistake made when refactoring not passing the error up through the chain and silently working.
2019-12-22 13:59:24 +01:00
Tulio Leao 0416c2eaa3 Merge pull request #10427 from tupaschoal/fix-10426
Fix #10426: Deleting path moves preview in opposite direction
2019-12-22 12:45:23 +00:00
Tulio Leao 461095ab6c Fix #10417: Ride preview incorrectly centered 2019-12-22 01:48:28 -03:00