Commit Graph

1841 Commits

Author SHA1 Message Date
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
Duncan dcabc8451e
Fix #13250: Crash when opening parks with new ride types (#13256)
This only happens when a new ride type is added and the park is opened in the older version of the game where the ride type does not exist.

Reworked so that invalid rides are not loadable. Force reload of title if current scenario is corrupted.
2020-11-01 14:49:43 +01:00
evilclownattack 3e7ff12a72
Fix #13292: Impossible excitement rating requirements
Incorrect argument was used when drawing the minimum excitement rating in the Objective Selection window.
2020-10-28 23:55:29 +01:00
Bryan DiLaura 894be65b6d
Closes #12415: Refactor CURRENCY_TYPE to strong enum (#13276)
* closes #12415 CURRENCY_TYPE enum refactor

* reverses unintended change in Linux.cpp

* closes #12415 CurrencyType strong enum
2020-10-25 01:33:06 -03:00
Duncan 214f6992dd
Rename to TitleCase and name LastAttachedPS (#13260) 2020-10-22 18:13:54 +01:00
Simon J a017d3fa57
Fix #13215: lingering arrows after ride construction (#13245)
Co-authored-by: Simon Jarrett <mwnciau@users.noreply.github.com>
2020-10-21 23:45:53 -03:00
aw20368 c81bf7b501
Refactor variable names in window_guest_stats_bars_paint (#13214)
* Refactor variable names in window_guest_stats_bars_paint

Change the variables eax/ebp to timeInPark and barColor, respectively.

* Refactor guest stat UI calculations

Simplify guest stat calculations and move them to a new function NormalizeGuestStatValue.
2020-10-21 07:38:44 +01:00
Łukasz Pękalski 9dcbf6d4e6
Close #4865: Offer an option to disable inhibiting the monitor power (#13243)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-10-20 22:02:44 +02:00