Commit Graph

2737 Commits

Author SHA1 Message Date
Ted John 314faa69ca Save user shortcuts after removing a binding 2021-02-27 15:51:26 +00:00
Ted John 1ee72ffd21 Fix #14184: Right and down arrow swapped
Incorrect order of legacy shortcut IDs.
2021-02-27 15:51:05 +00:00
Ted John 49b677780f
Merge pull request #14171 from IntelOrca/plugin/custom-widget
* Add API for getting network traffic statistics.
* Add API for creating custom widgets.
* Add API for drawing graphics for custom widgets.
* Add click event to spinners and allow them to be held down.
2021-02-27 01:31:00 +00:00
Michael Steenbeek 08f07e6135
Reduce usage of gCurrentFontSpriteBase (#14178) 2021-02-26 15:39:20 +01:00
Michael Steenbeek 28c680f97f
Merge pull request #14163 from Gymnasiast/refactor/get-rtd
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast 44d0e77afb
Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Gymnasiast f118b2ede4
Replace ride_type_has_flag() with retrieving RTD 2021-02-26 09:49:09 +01:00
Ted John e000f06442 Remove holdable flag from spinner widget 2021-02-25 22:30:35 +00:00
Gymnasiast b1ab20ec27
Replace loose flag checking with helper function 2021-02-25 23:04:40 +01:00
Ted John f7650fdfbc Fix CI failure 2021-02-25 18:47:54 +00:00
Michał Janiszewski ac6e4fc0d6 Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes 2021-02-25 10:56:27 +01:00
Michał Janiszewski 67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
Michał Janiszewski 6baff43f52 Reduce inclusion of Sprite.h 2021-02-25 10:56:27 +01:00
Ted John d64bd60278 Fix CI errors 2021-02-24 22:54:53 +00:00
Ted John c2183989a5 Allow spinners to be clicked and held 2021-02-24 22:37:31 +00:00
Ted John c1b0df5de6 Improve graphics plugin API 2021-02-24 22:37:31 +00:00
Ted John 081c1895ce Add box and well APIs 2021-02-24 22:37:31 +00:00
Ted John 93f17f1175 Add custom widget logic and network stats API 2021-02-24 22:37:31 +00:00
Ted John 82b1a5eb6d Convert CustomWindow into a class 2021-02-24 22:37:31 +00:00
Ted John 668ea01548
Update src/openrct2-ui/windows/ShortcutKeys.cpp
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2021-02-24 16:57:19 +00:00
Gymnasiast d63e3b1d9f
Replace RideTypeDescriptors[ride->type] with GetRideTypeDescriptor() 2021-02-24 14:10:30 +01:00
Gymnasiast 56399e7188
Use the RTD instead of ride_type_has_flag() 2021-02-24 14:10:30 +01:00
TELK 99e72dde3f Change StringIds to more generic 2021-02-24 16:50:40 +09:00
Ted John 5ba3fdf452 Fix #14161: ShortcutDesc.bindings does not work 2021-02-23 22:19:46 +00:00
Ted John 52dffb83c2 Fix #14160: Game crashs when registering shortcuts 2021-02-23 22:18:00 +00:00
Ted John aedd93ef33 Add remove button to clear a shortcut 2021-02-23 21:34:32 +00:00
Ted John 817edff4bd Fix #14149: Numpad shortcut keys are not loaded correctly 2021-02-23 20:35:24 +00:00
TELK ea5cf16924 Feature: Make ride construction shortcuts work for footpath too 2021-02-23 16:11:53 +09:00
Ted John 440c0f447f
Fix #14140: Some shortcut keys are not working 2021-02-21 21:44:53 +01:00
Michael Steenbeek 0cdbc99984
Merge pull request #13848 from IntelOrca/refactor/shortcut-engine
Introduce new shortcut engine
2021-02-21 14:01:39 +01:00
Duncan 2b26e423e4
Remove AsGuest and AsStaff duplicated functions 2021-02-21 13:23:31 +01:00
Ted John ed29c0a37b Replace std::printf with Console::* 2021-02-21 03:14:20 +00:00
Ted John e383b6f6f7 Move zoom and rotation to view tab 2021-02-21 03:14:20 +00:00
Ted John b3f6437092 Apply suggestions from code review 2021-02-21 03:14:19 +00:00
Ted John cacfb8be07 Refactor dead key handling 2021-02-21 03:14:19 +00:00
Gymnasiast d5eb1cc036 Fix dead key handling
This fixes deadkey handling on at least US International on Linux.
2021-02-21 03:14:19 +00:00
Ted John 2b14fe9d7f Update shortcut listings 2021-02-21 03:14:19 +00:00
Ted John ff86ebbfe5 Localise shortcut strings 2021-02-21 03:14:19 +00:00
Ted John acfda711f5 Use std::string_view without reference 2021-02-21 03:14:19 +00:00
Ted John 59b4be6a12 Move InputManager to UiContext 2021-02-21 03:14:19 +00:00
Ted John 80662d72a4 Cache view scroll shortcuts 2021-02-21 03:14:19 +00:00
Ted John fa1a374a04 Scale binding column in window 2021-02-21 03:14:19 +00:00
Ted John 2b197d0fb2 Fix parsing of shortcuts 2021-02-21 03:14:18 +00:00
Ted John 46c3fd4e5f Use FileStream instead of fstream 2021-02-21 03:14:18 +00:00
Ted John eda33fea20 Fix view scroll shortcuts 2021-02-21 03:14:18 +00:00
Ted John 2b3aabb8e4 Remove old shortcut code and fix issues 2021-02-21 03:14:18 +00:00
Ted John f2f658bf28 Refactor some code into more files 2021-02-21 03:14:18 +00:00
Ted John af0ed416f5 Implement loading / saving of new shortcuts 2021-02-21 03:14:18 +00:00
Ted John 18c3587d63 Rename shortcut IDs and order groups 2021-02-21 03:14:18 +00:00
Ted John afb4500c49 Add eye icon for tab 2021-02-21 03:14:18 +00:00
Ted John 7b00f9d96d Add tabs to keyboard shortcut window 2021-02-21 03:14:18 +00:00
Ted John f69c1576b3 Refactor shortcut windows to class 2021-02-21 03:14:18 +00:00
Ted John e7ae9f9f15 Read legacy shortcuts and move to constants 2021-02-21 03:14:17 +00:00
Ted John 900f3cd92b Fix gcc / clang builds 2021-02-21 03:14:17 +00:00
Ted John afc548c5a7 Add plugin API for shortcuts 2021-02-21 03:14:13 +00:00
Ted John 9964df5335 Implement gamepad support 2021-02-21 03:13:28 +00:00
Ted John e6b6403024 Refactor and fix shortcut 2021-02-21 03:13:28 +00:00
Ted John ea975f88fc Implement more InputManager 2021-02-21 03:13:28 +00:00
Ted John c8f31dea7f Process keyboard input events 2021-02-21 03:13:28 +00:00
Ted John 3339089235 Add more shortcuts 2021-02-21 03:13:28 +00:00
Ted John f009b9a804 Only handle release mouse buttons 2021-02-21 03:13:28 +00:00
Ted John ccae533978 Add input manager 2021-02-21 03:13:27 +00:00
Ted John b1eb975529 Re-add show change dialog 2021-02-21 03:13:27 +00:00
Ted John e5f263a0fc Get new manager showing in window 2021-02-21 03:13:27 +00:00
Ted John 28aead5cb5 Start work on new shortcut engine 2021-02-21 03:13:27 +00:00
Michał Janiszewski 9aef29361f
Default-initialise more fields (#14130)
Doesn't really fix any particular issue, but adds more defaults to
fields in classes where other defaults are already present
2021-02-20 19:40:32 +01:00
Ted John e7adf19f62
Merge pull request #14059 from IntelOrca/improve-viewport-filter-flags
[Plugin] Add optional filter to custom tools
2021-02-19 20:33:27 +00:00
Michael Steenbeek e11304f1df
Fix #14111, #14112: Strange behaviour when selecting a new scenario 2021-02-19 09:37:06 +01:00
Ted John 762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
Ted John 27013d147a Invalidate viewport when moving without scrolling 2021-02-18 18:10:29 +00:00
Gymnasiast 1b964c0f2e
Refactor flat ride track pieces 2021-02-18 17:50:19 +01:00
Ted John 785fb153db
Merge pull request #14088 from IntelOrca/improve-network-messages
Improve network messages and logging
2021-02-18 13:36:44 +00:00
Geoff B 0532ebab7a
Fix #14095: Holding down [-][+] buttons does not change number of circuits 2021-02-17 08:51:07 +01:00
Ted John 3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
Michael Steenbeek 962ef0c02b
Fix #14066: NPE in window_top_toolbar_invalidate() 2021-02-12 18:48:38 +01:00
Michael Steenbeek 61536eb1f6
Fix #14073: NPE in InputUpdateTooltip 2021-02-12 18:36:58 +01:00
Ted John 1cb3330779 Fix #14042: Park Crashes whilst saving 2021-02-09 23:51:31 +00:00
Michael Steenbeek 397512f4d3
Fix #14032: NPE in window_tile_inspector_scrollpaint() 2021-02-09 23:02:31 +01:00
Michael Steenbeek 0a8cfe75b0
Merge pull request #13969 from IntelOrca/plugin/title-seq
[Plugin] Add APIs for editing title sequences
2021-02-09 19:56:16 +01:00
ζeh Matt 3e675cdf04
Merge pull request #14023 from ZehMatt/refactor/peep-pickup
Move peep pickup test into Peep::CanBePickedUp
2021-02-09 01:30:11 +02:00
Matt 7d517caced
Move peep pickup test into Peep::CanBePickedUp 2021-02-09 00:31:29 +02:00
Michael Steenbeek 7862591a43
Fix #14012: 'Finish 5 coasters' goal listed incorrectly in selector 2021-02-08 23:29:59 +01:00
Ted John 099a087b18 Fix CI build errors 2021-02-08 22:27:28 +00:00
Ted John 129d85fa57 Implement title sequence playing 2021-02-08 22:27:28 +00:00
Ted John 78df831f29 Implement loading of parks 2021-02-08 22:27:28 +00:00
Ted John d2a97ab43c Implement scenario select window 2021-02-08 22:27:28 +00:00
Ted John 8cfdbd871d Improve title sequence API 2021-02-08 22:27:28 +00:00
Ted John fcb5f51c4a Allow saving of commands 2021-02-08 22:27:28 +00:00
Ted John f99c57e11d Implement getting commands 2021-02-08 22:27:28 +00:00
Ted John 3ed221f128 Add APIs for loading a saved game and adding a park 2021-02-08 22:27:28 +00:00
Ted John 41c7b04ab2 Add parks to title sequence API 2021-02-08 22:27:28 +00:00
Ted John 55ebebb869 Add title sequence API 2021-02-08 22:27:27 +00:00
Ted John e5b412fb5f Fix #14017: Text input window errors 2021-02-08 17:45:08 +00:00
Ted John 17f4f3aaf8
Refactor text input window to class 2021-02-07 22:36:31 +01:00
ζeh Matt 2a06043860
Merge pull request #13996 from ZehMatt/fix-13992
Fix #13992: Do not show empty groups in guest list
2021-02-04 20:31:15 +02:00
Matt 0427ad2914
Fix #13992: Do not show empty groups in guest list 2021-02-04 19:30:44 +02:00
Umdlye 2c408342d9
Create toggle for zoom toolbar button 2021-02-01 17:27:40 +01:00
Jaime Centeno 83fcfa6e68
Refactored water window code into WaterWindow class
Created a new WaterWindow class that inherits from Window class and overrides On methods. Added a new generic method for WindowFocusOnCreate that takes position as an argument.
2021-02-01 14:33:22 +01:00
ζeh Matt 9ff2138f3f
Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
Ted John 4a37f1479c
Merge pull request #13927 from IntelOrca/plugin/extra-ui
* Add isVisible property to widgets so that you can easily show / hide widgets.
* Add new text box widget for text input
* Allow plugin windows to be transparent
* Add `textAlign` property to label widget
2021-01-29 20:55:25 +00:00
Ted John 2fdf91874c Implement centred labels 2021-01-29 17:50:32 +00:00
Ted John 180a41686c Implement transparent windows for plugins 2021-01-29 17:50:27 +00:00
spacek531 1e3fe9b550
Separate booster track elem type (#13857)
* add data to Track.cpp

add data to TrackData.cpp

add import helper functions

fix Booster value

import booster as 256

export booster as 100

add vehicle subposition data

add SV4 import

add TD4 import

add TD6 import

use track_type_t when importing TD6

add TD6 export

change peep tracktype type to auto

fix SV4 track element import

fix import of booster speed

add None enum to TrackElemType

move _legacy RideConstruction functions to Ride.cpp

change _currentPossibleRideConfigurations to use track_type_t

fix booster track category

add booster string tto

expand _currentTrackCurve to 32 bits

expand track_curve_chain to 32 bits

update get_track_element et al. to handle 16 bit track types

run clang-format

remove unused #includes from _legacy.cpp

Revert "remove unused #includes from _legacy.cpp"

This reverts commit 4c4d4b06edb0c130314789d8fe371246be246c9f.

Revert "update get_track_element et al. to handle 16 bit track types"

This reverts commit 73920dafd4a6c9e7c9f0c7ee1098d493f8f5d262.

Revert "move _legacy RideConstruction functions to Ride.cpp"

This reverts commit 2d83a75c1477d387ad77a7a5085f37a28f72a589.

update _legacy functions for 16-bit track types

update ride_construction_reset_current_piece behavior with new enum

fix declaration of _currentTrackCurve to match other track tcurve vars

remove unused include from T4Importer.cpp

move SCT to 256 part 1: RideConstruction.cpp

move SCT to 256 part 2: TrackData.cpp

move SCT to 256 part 3: Ride.h/Ride.cpp

move SCT to 256 Part 4: revert changes to S4Importer.cpp, T4Importer.cpp

fix stations appearing as curves

fix too many initializers in TrackData.cpp

move SCT to 256 part 5: S6/T6 importing and exporting

move SCT to 256 part 6: simplify RCT12.cpp functions

fix comments in S6Exporter.cpp, S6Importer.cpp

fix clang-format on S6Importer.cpp

add missing data to TrackData.cpp

revert new functions for checking if track type is a booster

revert unused include

change trackType to auto and add comment to S6Exporter.cpp

move track type aliasing from TrackDesign.cpp to T6Import.cpp, T6Export.cpp

add comment about sv6 vehicle.track_type

static cast to uint8_t in T6Exporter.cpp`

set type to auto when setting value to _currentTrackCurve

revert moving function in S6Importer.cpp

fix value names in RideData.cpp

revert cahnge to uint16_t return for GetTrackType() in RCT12.cpp

fix GetTrackType return type for real

add changelog entry

bump network version

cast alternate track type to track_type_t

static_cast tuple input value in _legacy.cpp

change _currentTrackCurve to uint32

use TrackElemType::Count to determine length of subposition array

perform some changes

remove padding from rct_trackdefinition

fix alternative type check

remove _boosterTrackSelected

add missing condition for booster speed

add comments for TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop

add missing comments to RideData.cpp

remove extra entry

simplify some things

fix formatting

remove redundant checks todo: fix building the track piece

use TrackElemType::None more

remove git.txt

* bump network version

* make conditional more explicit w/ parentheses

* move booster check to RCT12.cpp

* implement getters and setters for vehicle track type and direction

* fix formatting

* rename RCT12TrackTypeIsBooster to RCT2TrackTypeIsBooster

* add whitespace in RCT2.h

* change the thing I thought I changed

* move booster check function to RCT2.cpp

* move function into if condition

* fix scope issues with setters
2021-01-29 15:24:53 +00:00
Ted John c2eb6d4153 Improve plugin API and type definitions 2021-01-28 20:52:17 +00:00
Ted John a9755609c2 Move ride audio into own namespace 2021-01-27 18:45:28 +00:00
Ted John 28f4ec2b43 Implement code review suggestions 2021-01-27 18:45:28 +00:00
Ted John d9b8413ec4 Use IStream for zip streaming 2021-01-27 18:45:27 +00:00
Ted John 2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
Ted John 2fcaed8165 Allow more fields to be optional 2021-01-27 00:28:59 +00:00
Ted John 136783270f Fix initial value for showTextInput 2021-01-27 00:28:59 +00:00
Ted John c0d8786af8 Add text box widget 2021-01-27 00:28:59 +00:00
Duncan 8c5cd61b69
Split free id's into seperate vector (#13924) 2021-01-26 07:42:56 +00:00
Ted John be350f7e2e Add widget visible flag 2021-01-26 00:25:59 +00:00
Ted John c1a1f8f639 Fix #13953: invalid-read in StaffListWindow::RefreshList 2021-01-26 00:17:34 +00:00
Ted John c9a07eaa84
Refactor staff window to class (#13819) 2021-01-25 21:57:06 +00:00
Duncan 3cc283adb2
Name MapFlashingFlags and split up guest/staff loop (#13865)
* Name MapFlashingFlags and split up guest/staff loop

* Use constexpr instead of macros
2021-01-23 06:45:14 +00:00
Duncan 85df2c6854
Refactor guestlist (#13899)
* Refactor GuestList groups to use more standard functions

* Remove index

* Apply review comments
2021-01-22 18:02:22 +00:00
Michael Steenbeek 20f959c833
Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Duncan 8d25e4ccd9
Split closest peep calculation into Staff and Guest (#13880) 2021-01-20 14:21:22 +01:00
Ted John 19f0d8dfe9
Fix #13842: News is imported incorrectly 2021-01-20 12:35:11 +01:00
ζeh Matt 40a23db14b
Fix #13871: Crash on banner window invalidation 2021-01-19 22:44:22 +01:00
Basssiiie 813b111710
Fix #11912: Update active palette on selection 2021-01-18 21:25:57 +01:00
Michał Janiszewski f1a5e62440
Fix #13816: Compilation failure on Launchpad (#13837) 2021-01-14 23:19:10 +01:00
LRFLEW 601fa5629b
Fix Window IDX enum names 2021-01-13 23:00:35 +01:00
Michael Steenbeek 93b7b86ad4
Merge pull request #13756 from IntelOrca/refactor/guest-list-window
Refactor guest list window to a class
2021-01-12 20:01:47 +01:00
Ted John 1723161503 Optimise guest list sort
Format all guest names in advance and store them in a list for sorting. This reduces the number of calls to format_string considerably.
2021-01-11 22:41:42 +00:00
Ted John 3e75f23970 Refactor guest list window to a class 2021-01-11 21:56:48 +00:00
skdltmxn 7ef4d7762f
Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
Ted John b58038a23f
Fix #13758: Cheat menu's No Money Error 2021-01-11 20:39:58 +01:00
Mathias Gibbens b1e5a11bf3
Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
Duncan d5ada2dca1
Remove type from SpriteBase (#13735)
* Move type field into sub structures

* Use type for misc_type

* Use type for l_type

* Rename to SubType

* Rename SpriteGeneric to MiscEntity

* Rename generic to misc

* Add extra nullptr checks for compilers that cant understand

* Make review changes

* Increment network version

* Update replays
2021-01-10 15:14:34 +00:00
Michael Steenbeek 1da6ae6b51
Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
ζeh Matt 011588b01e
Move window update out of variable frame updates (#13704) 2021-01-10 09:36:34 -03:00
Ted John d907c58a13
Start window refactor framework 2021-01-10 12:41:55 +01:00
skdltmxn b0a8ebc808
Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Berbe d49f5576a0
Fix: CMake project (#13163) 2021-01-08 19:23:51 +01:00
ζeh Matt a6080b7996
Refactor code to dynamically add and remove viewports (#13687) 2021-01-07 19:06:49 +00:00
ζeh Matt acf71315b5
Cleanup variables usage and initialize them 2021-01-06 22:29:40 +01:00
X123M3-256 deca5a3881
Add "Single Rail Roller Coaster" ride type 2021-01-06 21:10:15 +01:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Michael Steenbeek 406967c71f
Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +01:00
Gymnasiast 9058f00bfa
Strictly use int32_t for ShowMenuDialog 2021-01-03 17:53:14 +01:00
Keith Stellyes 268e39d12a
GOG installer extraction for POSIX 2021-01-03 17:53:14 +01:00
amdoku 85efe047bb
Close #12444: Refactor TILE_INSPECTOR_PAGE to use strong enum (#13134) 2021-01-03 10:30:59 -03:00
Michael Steenbeek 44d595835a
Fix #13653: Incorrect colours in Inventions List 2021-01-03 14:06:52 +01:00
Matt cb719a6e10
Add missing case statements for entity scripting 2021-01-02 15:31:26 +02:00
Matt 5f2945d238
Refactor MISC_SPRITE to strong enum 2021-01-02 15:30:44 +02:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Tulio Leao 00483df2f2 Close #13625: Refactor TOOL_IDX to use strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao 221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Tulio Leao 45cc84cfaf Remove unreachable default in list_item_sort 2020-12-23 18:02:39 -03:00
Tulio Leao f7c6e04658 Close #13622: Refactor SORT into strong enum 2020-12-23 18:02:39 -03:00
Michael Steenbeek eeacb85310
Fix #13466: 'Build 5 roller coasters' excitement corrupted 2020-12-23 21:34:04 +01:00
Michael Steenbeek 94b6723f0d
Add some comments 2020-12-21 14:53:54 +01:00
Gymnasiast 179b50358c
Add RCT1 surface styles 2020-12-20 21:45:21 +01:00
Richard Qian 157a78c8e6 Enable saving rides with scenery in track designer 2020-12-20 13:29:46 -06:00
Richard Qian 84d5fde6bb Remove the max limit of 4 rides from the Track Designer 2020-12-20 13:08:36 -06:00
Richard Qian 6ee4bec0b1 Cleanup commented code, as testing shows nothing else adversely affected 2020-12-20 13:08:36 -06:00
Richard Qian 904af2cc4f Enhance the track designer with ability to add scenery and footpaths
This brings feature parity with Rollercoaster Tycoon Classic (RCTC)

Includes:
* Re-enabled buttons: Ride List, Map, Scenery, Path, Clear Scenery
* Add all standard footpaths and core scenery objects to the object selection

The max limit of 4 rides has not changed; other object types can have more than 4
Only a minimum set of scenery is enabled, as the full set cannot be included
2020-12-20 13:08:36 -06:00
Gymnasiast bcf0e15c97 Fix formatting 2020-12-19 15:35:35 -06:00
Richard Qian 6568735fa8 Remove steep slope up access for both Splash Boats and River Rafts 2020-12-19 15:33:19 -06:00
Richard Qian 8e4dbcbba6 Fix incorrect label when using Spinning Control piece on Wild Mouse 2020-12-19 15:33:19 -06:00
Richard Qian 6a095f39a5 Enable more cheat pieces for Splash Boats and River Rafts 2020-12-19 15:33:19 -06:00
Richard Qian f293dee3d1 Fix incorrect label when using Log Bumps piece on Car Ride 2020-12-19 15:33:19 -06:00
Łukasz Pękalski 9ec61fa5d2
Close #12993: Remove hardcoded {SMALLFONT}{BLACK} from tooltips 2020-12-19 20:53:57 +01:00
Michael Steenbeek abd7babc86
Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Kevin Singh 3feefb09b1
Close #12443: Refactor TITLE_SCRIPT to use strong enum (#13540)
Close #12443: Refactor TITLE_SCRIPT to use strong enum
2020-12-10 08:01:54 -03:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

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

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

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

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

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

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

* Refactor Park actions hpp=>h/cpp

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

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

* Refactor Pause action hpp=>h/cpp

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

* Refactor Ride actions hpp=>h/cpp

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

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

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

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

* Fix various includes and other compile errors

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

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Duncan c12e1634fc
Merge LitterType into the shop item descriptor (#13513)
* Merge LitterType into the shop item descriptor

* Merge ConsumptionTime into ShopItem descriptor

* Merge in DiscardContainer into ShopItemDiscriptor

* Simplify itemOrderPreference

* Simplify guest code by using 64bit flags

* Remove operators for ShopItem

* Move PeepThoughtType TooMuch GoodValue into ShopItemDescriptor

* Reorg Get Flags and Has functions to make intention clear

* Constexpr shop item descriptors

* Constexpr shop item descriptors to compile time gen constants

* Fix formatting and spelling

* Revert operator++ removal
2020-12-09 06:55:06 +00:00
Jamie Quigley 03a9ac9f56
Close #12387: Refactored PeepThoughtType to use strong enum. (#13541) 2020-12-07 19:48:36 +00:00
Ted John 05622fd9bb
Merge pull request #13504 from IntelOrca/plugin/more-things
* Fix #13495: Add properties for park value, guests and company value
* Add more park attributes to plugin API
* Fix #13431: [Plugin] UI disabled widgets can still be interacted with.
* Fix #13078: [Plugin] Add colour picker widget
* Fix: #13509 [Plugin] Add ability to format strings
* Fix #13510: [Plugin] list view scroll resets when items is set.
* Fix #13512: [Plugin] Add item separators to list view
2020-12-06 16:13:07 +00:00
Tulio Leao 3a4ccfef37
Merge pull request #13523 from IntelOrca/fix/13517-date-format
Fix #13517: Bad formatting of dates
2020-12-06 10:17:59 -03:00
Ted John 95c3a7f5dd Fix #13512: [Plugin] Add item separators to list view 2020-12-05 18:32:24 +00:00
Ted John a7e49e41d3 Fix #13510: [Plugin] list view scroll resets when items is set. 2020-12-05 18:26:35 +00:00
Ted John 030713e126 Fix #13078: [Plugin] Add colour picker widget 2020-12-05 18:26:35 +00:00
Ted John a55bcff99c Fix #13431: [Plugin] UI disabled widgets can still be interacted with. 2020-12-05 18:26:35 +00:00
Łukasz Pękalski 4adf745237
Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Ted John d6fd4ed64b Allow formatting in in-game console 2020-12-05 14:14:09 +00:00
Ted John d58d834925
Merge pull request #13212 from IntelOrca/new-format-string
Eradicate all coded format tokens. All internal strings now contain raw tokens such as `{STRINGID}` and `{RED}`. New iterators have been created to iterate the tokens and the UTF-8 codepoints.

Formatting strings has been re-written and a new template version is available.
2020-12-04 13:56:54 +00:00
Łukasz Pękalski 3de233c796
Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
ffrogman 5994e194f4
Close #13476: Unneeded colour variables in TopToolbar.cpp 2020-12-02 12:23:38 +01:00
Margen67 f37fcad111
Add pause button to the Track Designer (#13483)
Fixes #13398
2020-11-30 13:27:36 -03:00
Ted John 8021af2c6b
Fix #13477: Plug-in widget tooltips do not work (#13486) 2020-11-29 21:11:07 -03:00
Ted John 5a90cd4163 Apply a few more code review comments 2020-11-27 18:54:58 +00:00
Ted John 517e964975 Fix title screen and object manager text issues 2020-11-27 18:54:58 +00:00
Ted John 503a383301 Do not format characters in text input 2020-11-27 18:54:57 +00:00
Ted John dfcd8a4bbc Apply code review comments 2020-11-27 18:54:57 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John 1e5d998338 Remove more instances of format codes 2020-11-27 18:54:56 +00:00
ffrogman 7ed1804e61
Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
Florian Probst 923b5f990d
Close #12438: Refactor RIDE_COMPONENT_TYPE to use strong enum (#13456)
* Part of #12438  Changed RIDE_COMPONENT_TYPE to enum class

(1/3)

Changed the enum RIDE_COMPONENT_TYPE to be enum class in RideData.h.
Shortened the enumerators.
And fixed

I split the changes I did into 3 commits because the enum is used in a total of 85 different files where I just replace the single line where they occur.

The changes in those 85 files are analogous to my change in line 328 in RideData.h in this commit.

* Part of #12438  changed all RIDE_COMPONENT_TYPE enumerators appearances

(2/3)

Changed every appearance of the old RIDE_COMPONENT_TYPE enumerators to the changed enumerators from last commit.

* Part of #12438

(3/3)

Used EnumValue() wherever a field or variable of the type RideComponentType was used as an index.

Havent checked if anything from these 3 commits on this branch got codestyle issues

* Part of #12438

used clang-format

* Closes #12438  Added Accessor function for RideComponentName

Added Accessor function GetRideComponentName to RideData.
to replace the use RideComponentNames[EnumValue(RideComponentType type)]

* Close #12438 moving GetRideComponentName to RideData Headerfile

Moved GetRideComponentName to RideData Headerfile since thats where it should be.
2020-11-26 15:23:47 -03:00
Ghlen Nagels 8c55d1ea9f
Close #12446: Refactor WEATHER to use strong enum (#13434) 2020-11-22 17:34:30 +00:00
maksimdrachov 1815a094bb
Fix #13426: Typo in "repay loan" 2020-11-19 19:45:40 +01:00
Michael Steenbeek f899a045fa
Merge pull request #13419 from Gymnasiast/refactor/ghost-scenery
Disentangle sub_6E1F34() and try_place_ghost_scenery()
2020-11-18 22:38:32 +01:00
Michael Steenbeek 23871de19f
Remove built-in explode guests cheat 2020-11-16 22:07:52 +01:00
Gymnasiast 64959b0048
Break up sub_6E1F34() 2020-11-15 14:58:36 +01:00
Gymnasiast 4746d025c3
Remove remaining direct calls to sub_6E1F34() 2020-11-15 14:24:14 +01:00
Łukasz Pękalski fc4ad82ac1 resolve: integrated changes from comments 2020-11-11 16:08:39 +01:00
Łukasz Pękalski 7648feeba2 Close #12427: Refactor OBJECT_TYPE to use strong enum 2020-11-11 16:07:01 +01:00
Łukasz Pękalski 832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00