Commit Graph

1948 Commits

Author SHA1 Message Date
Ted John 3ed221f128 Add APIs for loading a saved game and adding a park 2021-02-08 22:27:28 +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
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 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 2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
Duncan 8c5cd61b69
Split free id's into seperate vector (#13924) 2021-01-26 07:42:56 +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
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
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
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
ζ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
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
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
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
Ł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 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 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
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Gymnasiast d963438c4f
Check if platform has a file picker 2020-11-08 14:06:42 +01:00
Michael Steenbeek d8a7219c86
Use new identifier for default objects 2020-11-07 20:28:01 +01:00
Michael Steenbeek 58f099a644
Merge pull request #13286 from tupaschoal/research-refactor
Small research releated refactor
2020-11-07 20:18:18 +01:00
Tulio Leao 7d96dc9958 Move category names and invention strings to ResearchItem class 2020-11-07 11:14:55 -03:00
Tulio Leao 19ab8f1211 Use ResearchCategory Enum for ResearchItem 2020-11-07 11:14:55 -03:00
Gymnasiast a3aef90637
Replace loose usages of 0xFF 2020-11-07 12:58:32 +01:00
Gymnasiast 9e17081ee8
Use 16 bits for gTrackDesignSaveRideIndex throughout 2020-11-07 12:58:32 +01:00
Gymnasiast d58a8d1184
Change tile_element_get_ride_index() to method 2020-11-07 12:58:32 +01:00
Michael Steenbeek eea57f2bfe
Create calls for min/max cars per train 2020-11-05 17:42:02 +01:00
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
pizza2004 b0fd5f93d7
Refactor UI/Interface misc to TitleCase (#13354)
* Refactor LandTool to Namespace

* Refactor Theme to TitleCase

* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
pizza2004 6cc3f2f4a8
Refactor Graph to TitleCase (#13353) 2020-11-03 08:21:20 +00:00
Sadret c2d309af38
Close #13346: Change FootpathScenery to FootpathAddition (#13350) 2020-11-03 08:17:29 +00:00
pizza2004 68bd035f12
Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
pizza2004 1643c62939 Refactor UI/Input MouseInput to Title Case 2020-11-02 07:05:33 -07:00
pizza2004 34f362b86e Refactor UI/Input KeyboardShortcuts to Title Case 2020-11-02 06:55:16 -07:00