Commit Graph

16126 Commits

Author SHA1 Message Date
Matt 9c88cc7589
Collapse function template in PaintSessionArrange 2021-01-05 01:02:06 +02:00
Matt c442ef6207
Improve performance of tweening entities between ticks 2021-01-05 00:26:58 +02:00
skdltmxn 81e7e29eb5
Refactor vehicle_paint to move rideEntry to the inner scope (#13695) 2021-01-04 17:43:22 +00:00
Michael Steenbeek b21f8284ac
Merge pull request #13669 from ZehMatt/enhancements/banner-limit
Refactor logic to allow to draw 256 banners at the same time
2021-01-03 23:02:31 +01:00
Michael Steenbeek 406967c71f
Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +01:00
ζeh Matt 30aea2bb2a
Merge pull request #13667 from ZehMatt/refactor/invalidation
Simplify object invalidation automatically when possible
2021-01-03 20:10:15 +02:00
Michael Steenbeek a27ec2deb3
Merge pull request #13172 from keithstellyes/gog-extractor-posix
Part of #12307: GOG installer extraction for POSIX
2021-01-03 19:00:29 +01:00
Sadret d22c2edee5
Implement #13384: Expose all TileElement data to plugin API 2021-01-03 18:42:21 +01:00
Gymnasiast 52bc650abf
Improve feedback when selecting the wrong file 2021-01-03 18:40:02 +01:00
Gymnasiast 07c3a930e4
Apply review requests 2021-01-03 17:53:38 +01:00
Gymnasiast 09c6339bd4
Stub Execute() for Win32 2021-01-03 17:53:15 +01:00
Gymnasiast 9058f00bfa
Strictly use int32_t for ShowMenuDialog 2021-01-03 17:53:14 +01:00
Gymnasiast 72cc8df395
Stub FindApp on Windows 2021-01-03 17:53:14 +01:00
Keith Stellyes 268e39d12a
GOG installer extraction for POSIX 2021-01-03 17:53:14 +01:00
Ted John 6fb7921dbd
[Plugin] Add context.setInterval and context.setTimeout 2021-01-03 16:08:35 +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
Karthik NS ae637bf088
Close #13623: Refactor LightFXQualifier to use strong enum 2021-01-03 14:03:13 +01:00
Matt 7d4637613a
Format the integers into temporary buffer to fix inline sprites 2021-01-02 16:46:05 +02:00
Matt c2fd7708ad
Use char_traits for length 2021-01-02 16:46:05 +02:00
Matt 2ef4dd23aa
Replace std::stringstream with custom string buffer 2021-01-02 16:46:05 +02:00
Matt 5bbc07847c
Remove unused field 2021-01-02 16:43:17 +02:00
Matt 474ed67696
Initialize scrolling text sprites without a copy from original 2021-01-02 16:43:17 +02:00
Matt 95551b0504
Use correct type 2021-01-02 16:43:17 +02:00
Matt 7dfe0b02a6
Add ScrollingText.h 2021-01-02 16:43:17 +02:00
Matt 9d473bbfbe
Refactor logic to allow to draw 256 banners at the same time 2021-01-02 16:43:17 +02:00
Matt 19b63a1825
Refactor logic of MoveTo to always imply invalidation 2021-01-02 16:22:28 +02:00
Matt efa1db826e
Refactor invalidation logic to be generic to the callee 2021-01-02 16:22:28 +02:00
ζeh Matt 5ae54eb9f9
Merge pull request #13666 from ZehMatt/refactor/miscsprite-enum
Refactor MISC_SPRITE to strong enum
2021-01-02 16:12:09 +02:00
Michael Steenbeek ac6cc9d63e
Fix #13609: Crash in LargeSceneryRemoveAction.cpp (#13663) 2021-01-02 15:06:51 +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
Michael Steenbeek 1b686816db
Move tile element banner functions to methods 2021-01-02 11:28:39 +01:00
Ted John b0e57c0ca9
Do not allocate vector each time format string legacy is called 2021-01-02 11:27:50 +01:00
Michael Steenbeek ad52abf39a
Revert "Avoid unnecessary calculations when the passed DPI is the active DPI" (#13672) 2021-01-01 13:29:10 +01:00
Matt 114be0e62b
Avoid unnecessary calculations when the passed DPI is the active DPI 2021-01-01 00:13:48 +02:00
Michael Steenbeek ac2057775e
Change standard palette colours for indices 1-9 2020-12-30 20:07:14 +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
Bas 918bd015b5 Increment plugin version, update changelog 2020-12-29 15:49:26 +01:00
Bas 7848a39e6c Rename car 'move' method to 'travelBy' 2020-12-29 15:41:27 +01:00
Bas 75f0f21512 Use collision disable flag instead of update car position flag check 2020-12-29 15:41:27 +01:00
Bas 7d819c0714 Remove unnecessary Invalidates from plugin car.move() method 2020-12-29 15:41:26 +01:00
Bas 2b2efee7a8 Remove unnecessary MoveTo code from MoveRelativeDistance 2020-12-29 15:41:26 +01:00
Bas 559c327c1e Disable vehicle collision on single car position update 2020-12-29 15:41:26 +01:00
Bas e44c17957b Replace track position setter with new move method 2020-12-29 15:41:26 +01:00
Bas 32bccf4a7c Run clang-format on ScEntity.hpp 2020-12-29 15:41:25 +01:00
Bas d5a9881f91 Add track progress property to vehicles 2020-12-29 15:41:25 +01:00
Michael Steenbeek ac65864b40
Close #11859: Add on-ride photo to APVC and Reverse Freefall RC 2020-12-29 13:13:17 +01:00
csunday95 51faec5c50
Close #13637: Refactor sprite compiler for filesystem efficiency
- sprite building would save a file with just the sprite file header
   and then immediately open it again at the beginning of compilation
 - sprite file generation is now entirely in memory until the final
   output file is saved on success
 - added validation of no file activity in the failed build test case;
   failed builds will not generate a file or edit an existing one
2020-12-29 13:12:55 +01:00
Duncan 556c786b12
Paint Setup refactor (#13633)
* Simplify paint session generate

* Add template to improve performance

* Add comments and fix minor issues
2020-12-25 08:05:57 +00:00
Michael Steenbeek 7337e9d4a3
Fix #13644, #13102: Underflows in ride graph, temperature, cut-away view 2020-12-24 23:08:01 +01:00
Tulio Leao 7b2ea2aae1
Merge pull request #13632 from tupaschoal/some-enum-class
Some enum class conversions
2020-12-24 08:08:51 -03:00
Tulio Leao 8c9fa45a76 Use switch for Ride::UpdateAll 2020-12-23 20:15:39 -03:00
Tulio Leao af0ec60bed Close #13626: Refactor RCT2LanguageId to strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao 00483df2f2 Close #13625: Refactor TOOL_IDX to use strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao d6ebdded6b Close #13630: Refactor DATATYPE into strong enum 2020-12-23 20:07:53 -03:00
Tulio Leao b7f70ab20b Close #13628: Refactor MASTER_SERVER_STATUS to strong enum 2020-12-23 20:07:53 -03:00
Tulio Leao 221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Michael Steenbeek f9e90ed84c
Fix #13641: Game crashes after a while (#13642) 2020-12-23 22:37:43 +01: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
Ted John 9809df8de6
Fix #13549: Ride name is truncated/resetted in Korean
Handle multi-byte RCT2 strings when converting to string_view.
2020-12-23 20:19:25 +01:00
Michael Steenbeek 5dd0ff12c4
Fix #13550: Cut height in Cut-away view window is missing 2020-12-23 20:13:00 +01:00
Michael Steenbeek 90964b38bb
Fix #13574: Object selection crashes if 'originalId' missing 2020-12-23 20:12:25 +01:00
Mike Jones 4e991beb8d
Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
csunday95 fa5437f920
Fix #13611: Zero under decimal is not displayed (#13618)
* fix for bug #13611; handled too few sig figs fixed point case

* added unit test cases to cover modified fixed point code

* removed blank line to satistfy clang-format

* sorted includes in formatting tests for clang-format

* removed redundant static_cast

 - already a char literal and assigning to char[] so code
 is functionally equivalent
2020-12-22 09:45:45 +00:00
Hielke Morsink cc6b56f1f5
Fix: Load game / Quit to the menu are not working in multiplayer (#13619) 2020-12-21 19:55:29 +00:00
Michael Steenbeek 4ac3b27ae9
Merge pull request #13614 from Gymnasiast/feature/rct1-surfaces
Feature/rct1 surfaces
2020-12-21 18:40:45 +01:00
Michael Steenbeek 94b6723f0d
Add some comments 2020-12-21 14:53:54 +01:00
Duncan 6da4a8d6af
Add individual vehicle motion update flag (#13607)
This can be used in conjuction with #13593 to change the placement of vehicles on a track
2020-12-21 13:25:39 +00:00
Gymnasiast 179b50358c
Add RCT1 surface styles 2020-12-20 21:45:21 +01:00
Gymnasiast 31dc155e0b
Use type bit 1 on surface element to store more surface styles 2020-12-20 21:45:04 +01:00
Richard Qian 157a78c8e6 Enable saving rides with scenery in track designer 2020-12-20 13:29:46 -06:00
Richard Qian 8bdfdad26c Refactor track designer object setup function to use UpperCamelCase 2020-12-20 13:08:36 -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
Hielke Morsink 235afc4c62
Mark possibly unused variable as maybe_unused (#13612) 2020-12-20 15:35:23 +00:00
Gymnasiast d11862046c Actually make Spinning control track behave as such for Steel Wild Mouse 2020-12-19 15:35:35 -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
Richard Qian b86c28a66e Restore extra cheat track pieces for some rides; intended to fix #13324
Includes:
* Corkscrew Roller Coaster
* Hypercoaster
* Steel Wild Mouse
* Spinning Wild Mouse
* Water Coaster
* Car Ride
* Monster Trucks

Some pieces are incorrectly labelled (log bumps and rotation control toggle),
and need to be investigated further
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
Kevin Singh d0afa7947f
Close #12451: Remove enum TILE_INSPECTOR_ELEMENT_TYPE (#13604) 2020-12-19 12:46:15 -03:00
Cory Sanin c28a1fc2bc
Fix: Docker build failure (#13605) 2020-12-18 10:20:57 +01:00
Cory Sanin 82fd8506ad
Feature: Add allowed_hosts to plugin section of config 2020-12-17 22:25:05 +01:00
Duncan 7440d7eb2b
Fix #13567: Added ability for peeps to stop eating certain food constanly (#13592)
* Fix #13567: Cure guests of severe gluttony

Incorrect assumption that bitscanforward itertated over 64 bits meant that food that was previously within the ExtraItemFlags would never get removed from the peeps inventory. bitscanforward function has been replaced with a 64bit version

* Bump network version
2020-12-17 17:45:40 +00:00
Duncan 3f53961e5d
Fix incorrect formatting of input and output of g2.dat (#13599)
* Fix incorrect formatting of input and output of g2.dat

* Fix entry offsets and empty data
2020-12-16 14:34:29 +00:00
Łukasz Pękalski af6512da19
Close #13386: Show a GUI error message if en-GB.txt cannot be loaded 2020-12-16 13:21:07 +01:00
Duncan 5b24a9accc
Cmdsprite 2 (#13590)
* Merge all cmdsprite global state into single struct

* Move MakeEntries into a member function

* Use std::optional for sprite file open

* Move sprite_file_save to a member function

* Make sprite_file_close a member function and rename open

* Remove global variable

* Make Entries a vector

* Make Data a vector

* Use FileStream for Open

* Use FileStream for Save

* Renmae Image Import/Export functions and cleanup

* Extract out common item AddImage

* Simplify SpriteFile::AddImage

* Header and struct cleanup

* Make suggested changes
2020-12-16 06:07:44 +00:00
xuxf 14bc3b6359
Close #12449: Refactor DUCK_STATE to use strong enum (#13585)
* Refactor DUCK_STATE to use strong enum
2020-12-14 12:54:41 -03:00
Tulio Leao 8fc167afc3
Move some game actions logic from header to source (#13571)
* Moving all definitions from B...Actions to source

* Moving all definitions from C...Actions to source

* Moving all definitions from F...Actions to source

* Moving all definitions from G...Actions to source

* Moving all definitions from L...Actions to source

* Moving all definitions from M...Actions to source

* Moving all definitions from N...Actions to source

* Moving all definitions from P...Actions to source
2020-12-13 15:10:26 +00:00
Duncan 04b26631c0
Fix #13576: Remove unrequired code and casts from sprite export
As not all objects load images in the same order the previous code could end up with sprite index's that were incorrect. There also was no reason to make the code object specific as we can just access the image table directly.
2020-12-12 23:18:08 +01:00
Michael Steenbeek abd7babc86
Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Tulio Leao 9ef4931982
Move remaining game actions logic from header to source (#13573)
* Moving all definitions from R...Actions to source

* Moving all definitions from S...Actions to source

* Moving all definitions from T...Actions to source

* Moving all definitions from W...Actions to source
2020-12-12 07:18:38 +00: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
Ted John 5a849ededf
Fix plugin crash when nested scope occurs (#13556) 2020-12-09 22:38:15 -03:00
Michael Steenbeek 4a211278b2
Fix spelling of 'theming' 2020-12-09 11:33:33 +01:00
Duncan 9cbdae2ef1
Peep::ItemFlags merging (#13511)
* Merge standard and extra item flags for peeps

* Update replays
2020-12-09 09:21:23 +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
Duncan b59bf6d9cf
Fix #13552: Incorrect value for highscore pointer (#13554)
This was causing an invalid pointer dereference
2020-12-08 16:23:51 -03:00
Jamie Quigley 14ed1505ad
Remove unused WINDOW_EVENTS enum (#13542) 2020-12-08 15:39:38 -03:00
Michael Steenbeek f4bd903ec9
Merge pull request #13533 from duncanspumpkin/serial_2
FileIndex Serialise Cleanup
2020-12-07 20:52:25 +01:00
Jamie Quigley 03a9ac9f56
Close #12387: Refactored PeepThoughtType to use strong enum. (#13541) 2020-12-07 19:48:36 +00:00
duncanspumpkin 60729113d9 Simplify Serialise for FileIndex 2020-12-07 07:52:12 +00:00
duncanspumpkin ee9ede6c33 Use dataserialiser to simplify object repo code 2020-12-06 16:54:29 +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
Duncan a9ed5d6536
Fix ObjectEntryDescriptor (#13506) 2020-12-06 09:28:06 +00:00
Michael Steenbeek 7df4f1835f
Rename incorrectly named RCT1 peep fields (#13528)
Photo2/3/4 and item extra flags are not present in RCT1, only in RCT2.
2020-12-06 01:10:25 -03:00
Ted John 6a00c78750
Fix #13527: Read access violation in format_string (#13529) 2020-12-06 01:08:43 -03:00
Ted John 687fd6d9f4 Increment plugin API version 2020-12-05 18:32:28 +00: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 be8736ffaa Fix: #13509 [Plugin] Add ability to format strings 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
Ted John acaa72cce8 Add more park attributes to plugin API 2020-12-05 18:26:34 +00:00
Ted John b1403db509 Fix #13495: Add properties for park value, guests and company value 2020-12-05 18:26:34 +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
Adam 1b61b4b104
Fix #13489: Mechanics continue heading to inspect broken down rides (#13490)
* Fix #13489: Mechanics continue heading to inspect broken down rides
2020-12-05 15:05:55 -03:00
Ted John d6fd4ed64b Allow formatting in in-game console 2020-12-05 14:14:09 +00:00
Ted John 164f570aae Fix #13517: Bad formatting of dates 2020-12-05 13:56:08 +00:00
Ted John 9fda9b741c
Fix #13517: Bad formatting of chat messages (#13521)
* Bump network version which was the main cause of the problem.
* Ensure each chat line starts with some format codes.
2020-12-05 13:23:21 +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
Ted John 8ce924bd64 Fix Docker CI, explicit copy constructor 2020-12-03 22:05:24 +00:00
Michael Steenbeek 7ea828db02
Merge pull request #13503 from Gymnasiast/refactor/object-entry-descriptor
Create ObjectEntryDescriptor to properly handle mixed DAT and JSON
2020-12-02 19:52:30 +01:00
Gymnasiast 596aa71093
Create ObjectEntryDescriptor to properly handle mixed DAT and JSON 2020-12-02 17:17:25 +01: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 17edaae02b Improve banner formatting fix 2020-11-29 01:19:51 +00:00
Ted John 699103fe86 Fix banner text formatting, import / export 2020-11-28 16:52:19 +00:00
Ted John 55dc985c57
Fix #13469: Exception thrown from plugin in context.subscribe (#13470)
Throw a JavaScript exception, not a C++ exception when invalid parameters are passed to subscribe.
2020-11-28 14:03:15 +01:00
Ted John 5a90cd4163 Apply a few more code review comments 2020-11-27 18:54:58 +00:00
Ted John 9e7504fd98 Improve RCT12 UTF-8 checks 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 ec03ce5317 Improve handling of braces 2020-11-27 18:54:57 +00:00
Ted John 9173ec2111 Handle int64 edge cases in Format 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 086f10c183 Remove includes already in header 2020-11-27 18:54:57 +00:00
Ted John fd605d7399 Apply review comments and fix build 2020-11-27 18:54:57 +00:00
Ted John 167aaac633 Fix TTF issues 2020-11-27 18:54:57 +00:00
Ted John 2847ac556a Fix FormatString stack memory issues 2020-11-27 18:54:57 +00:00
Ted John 92fcdfbd9b Fix GCC compiler errors 2020-11-27 18:54:57 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John 157c984d4c Fix more string functions 2020-11-27 18:54:56 +00:00
Ted John 711ac76753 Fix map tooltips 2020-11-27 18:54:56 +00:00
Ted John 80537832e9 Implement MOVE_X and INLINE_SPRITE 2020-11-27 18:54:56 +00:00
Ted John c6152efa4e Fix scrolling text 2020-11-27 18:54:56 +00:00
Ted John 1e5d998338 Remove more instances of format codes 2020-11-27 18:54:56 +00:00
Ted John 2f7c1aab14 Start eradicating old format codes 2020-11-27 18:54:56 +00:00
Ted John eebababa90 Use variant instead of any 2020-11-27 18:54:56 +00:00
Ted John 644f7f07b3 Implement legacy format string 2020-11-27 18:54:56 +00:00
Ted John 6294188e93 Implement multi-level formatting for template FormatString 2020-11-27 18:54:56 +00:00
Ted John 6c23da4965 Implement multi-level formatting for any implementation 2020-11-27 18:54:56 +00:00
Ted John 43842bb668 Refactor some formatting code 2020-11-27 18:54:56 +00:00
Ted John 0e0c581258 Implement for format token types 2020-11-27 18:54:56 +00:00
Ted John b07bc6b0ab Add FmtString class 2020-11-27 18:54:56 +00:00
Ted John 8cb3103cc7 Add a dynamic format string function 2020-11-27 18:54:55 +00:00
Ted John 14377be487 Create new templated format string 2020-11-27 18:54:55 +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
Nick 67f5ce62b3
Plugins - return result from StaffHireAction (#13459)
* Added some scripting glue to StaffHireNewAction

* Update src/openrct2/scripting/ScriptEngine.cpp

Co-authored-by: Ted John <ted@brambles.org>

* Update plugin api version

Co-authored-by: Ted John <ted@brambles.org>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:37:07 -03:00
Duncan b5101d085d
Add further plugin visitors for actions (#13458)
* Add further plugin visitors for actions

* Update PLUGIN_API_VERSION

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:13:10 -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
ffrogman 1f0764be28
Fix #13427: Newly created Go-Karts show "Race won by <blank>" (#13457)
* Fix #13427. Show # of people for newly created Go-Karts

* Add changelog entry

* Reorder changelog entry
2020-11-26 18:04:35 +00:00
Duncan 9451578cad
Fix #13454. Use File class so that utf8 paths understood (#13455) 2020-11-25 13:37:07 +00:00
Michael Steenbeek b595370648
Fix #13257: Rides w/ exactly the minimum objective length not counted (#13446) 2020-11-23 19:22:16 -03:00
Richard Fine 6c4df9c54d
Fix #13409: Peeps sometimes stray too far from the path centre (#13415)
* Fix #13409: Clamp peep distances from path centers

The debunch-peeps improvement did not account for the fact that peeps may change direction when they are only at the very edge of a tile - it's not entirely clear to me why this happens, but it does. The previous code would push these peeps back towards the center line over time, but the new behaviour allows them to keep walking along these very edge-y lines, which means they sometimes appear to be walking on the wrong sides of benches, railings, etc.

To fix the problem, do not simply keep the target coordinate constant for the direction the peep is moving in, but clamp it, so that peeps in these outlier positions will get pulled back to a more acceptable position within one tile. Peeps who are already debunched within the reasonable center area of the path are unaffected.

* Update replays for change

* Add changelog entry

* Fix broken hashes

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-11-22 21:06:43 +00:00
Ghlen Nagels 8c55d1ea9f
Close #12446: Refactor WEATHER to use strong enum (#13434) 2020-11-22 17:34:30 +00:00
Ted John 3d1c1b7e65
Fix writing of objects.idx (#13438)
Use WriteString instead of WriteValue for std::string.
2020-11-22 16:35:02 +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
rpstester e2de490259
Refactor goto loc_6D7A97 (#13298)
* Refactor GoTo loc_6D7A97
2020-11-16 08:14:53 -03:00
Michael Steenbeek 8b27f7cdf8
Implement ToUpper for WinNT 5.1 (#13422) 2020-11-16 08:12:28 -03: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
adam-bloom d79308ef40
Fix #12895: Prevent Mechanics from fixing just fixed rides (#13389)
* Fix #12895: only update ride mechanic status when advancing state

* add changelog message

* Change changelog wording

* Bump network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-13 20:13:13 -03:00
Michael Steenbeek 1f55720bb5
Remove obsolete object fixes
These fixes have since been incorporated into JSON objects.
2020-11-13 10:44:28 +01:00
rpstester dcc5e0b0f9
Close #12337: Remove goto from DecideAndBuyItem (#13063) 2020-11-11 23:17:00 -03: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 dc93cacbee bugHunt: correcting code to compile
code does not compile yet
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
Michael Steenbeek 1ab3f4b250
Introduce constant for max sequences (#13405) 2020-11-10 21:24:02 -03:00
Gymnasiast 75de0790bc
Improve message when asking for a game_path with no filepicker available 2020-11-08 14:32:58 +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 b8f56fd980
Merge pull request #13312 from Gymnasiast/refactor/ride-id-it
Use ride_id_t in more places
2020-11-07 13:03:29 -03:00
Tulio Leao 6790bfe106 Use array for selecting research category strings 2020-11-07 11:40:15 -03:00
duncanspumpkin b89e0240ca Fix AddAsParent overload 2020-11-07 14:15:26 +00:00
duncanspumpkin ae87d81fe8 Adjust names further 2020-11-07 14:15:26 +00:00
duncanspumpkin 6882ddaf12 Clang format the relevant files 2020-11-07 14:15:25 +00:00
duncanspumpkin f6d2db48dc Name 98196C 2020-11-07 14:15:25 +00:00
duncanspumpkin a6a95bd28e Add overload for function 2020-11-07 14:15:25 +00:00
duncanspumpkin 99d4e8a10b Simplify functions further 2020-11-07 14:15:25 +00:00
duncanspumpkin 533a845b0f Name further functions 2020-11-07 14:15:25 +00:00
duncanspumpkin d6669be939 Rename main paint add image functions 2020-11-07 14:15:24 +00:00
duncanspumpkin 6abeeae4b7 Create helper function for calculating position hash 2020-11-07 14:15:24 +00:00
duncanspumpkin 4adcde42f6 Refactor to add allocators to paint session 2020-11-07 14:15:24 +00:00
Tulio Leao 8a35f27cfc Add converter from RideCategory to ResearchCategory 2020-11-07 11:14:55 -03: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 7ef8082185
Bump network version 2020-11-07 13:49:15 +01:00
Gymnasiast 802285fd92
Autoconvert ride id between RCT2 and OpenRCT2 2020-11-07 13:49:15 +01:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Gymnasiast 2846663533
Use ride_id_t for remaining peep ride fields 2020-11-07 12:58:32 +01: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 92a5f1aa24
Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
Michael Steenbeek 3c1aaa97d7
Merge pull request #13379 from Gymnasiast/json-id-in-repo
Allow object lookup using new JSON id
2020-11-06 14:48:56 +01:00
Gymnasiast 880a267252
Implement @ZehMatt's suggestions 2020-11-06 14:33:16 +01:00
Gymnasiast ce15e20c94
Use plain std::string_view instead of const & 2020-11-06 11:40:52 +01:00
Sadret 4ff412dfe1
Close #13359: Make GameAction flags optional in plugin API. (#13381) 2020-11-06 09:40:15 +00:00
Gymnasiast 53aef4e549
Replace old edge style names in Tables.cpp 2020-11-05 21:36:28 +01:00
Gymnasiast 6df36127b4
Replace calls to LoadObjectLegacy() with new IDs 2020-11-05 21:33:13 +01:00
Gymnasiast bafafa6805
Create functions to load objects by JSON id 2020-11-05 21:24:43 +01:00
Gymnasiast 656cdda399
Add JSON identifier to object repository 2020-11-05 20:56:58 +01:00
Manuel Vögele 4a6db953f7
Convert a register to a variable 2020-11-05 17:43:51 +01:00
Sadret 2f4b1b9e3f
Close #13376: Open custom window at specified tab 2020-11-05 17:43:23 +01:00
Michael Steenbeek eea57f2bfe
Create calls for min/max cars per train 2020-11-05 17:42:02 +01:00
Manuel Vögele 69b07904c1
Make TileElement conversion preserve the const qualifier
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
Sadret 0b99943a3f
Fix address comments in TileElement.h 2020-11-04 17:41:38 +01:00
Manuel Vögele ef51cfb29c
Refactor loc_6DDF9C (#13369)
* Move ride_create_vehicles into Ride

* Refactor loc_6DDF9C
2020-11-04 15:58:24 +00:00
Duncan 88b73d8716
Refactor add 3d light follow on from #13281 (#13333)
Close #12406

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>
2020-11-04 11:24:56 +00:00
Manuel Vögele 96ff1894ee
Remove unnecessary parameter from Ride::Open (#13368)
Ride::Open is only ever called with RIDE_STATUS_OPEN,
so the parameter is redundant.
2020-11-04 11:24:32 +00:00
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
Manuel Vögele b40ea0169d
Rename sub_6B5952 to ChainQueues (#13357)
Also remove unreachable call to it
2020-11-03 22:43:26 -03:00
Richard Fine 438b197b80
Debunch peeps (#12917)
* Stop guests from being forced to the center line of a path over time

Change the way we apply randomness to peep destinations when moving from one tile to the next, to allow peeps that are moving along a straight path to maintain their perpendicular offset relative to the path direction, instead of being (eventually) forced back to the center line.

* Update test expectations

The changes to guest movement mean that the number of steps taken for these expected paths are now slightly different to before.
2020-11-03 22:30:36 -03:00
Tulio Leao faf10568bb
Rename VEHICLE_UPDATE_FLAG_1 to COLLISION_DISABLED (#13363)
Rename VEHICLE_UPDATE_FLAG_1
2020-11-03 19:23:22 -03:00
Łukasz Pękalski 88a6a085e4
Close #12455: Refactor MOUSE_STATE to use strong enum (#13361)
* Close #12455: Refactor MOUSE_STATE to use strong enum

refactor: MouseState to strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-03 18:41:19 -03:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Manuel Vögele 47419b8ba1 Rename vehicle_unset_update_flag_b1 and move it into Vehicle 2020-11-03 21:36:26 +01:00
Manuel Vögele 6517757df7 Rename VEHICLE_UPDATE_FLAG_1 2020-11-03 20:08:10 +01:00
Manuel Vögele 1b55914c96
Rename ride_set_block_points to RideOpenBlockBrakes (#13360) 2020-11-03 17:24:54 +00:00
Manuel Vögele 15dc5e004e
Rename VEHICLE_UPDATE_MOTION_TRACK_FLAG_10 (#13362) 2020-11-03 17:24:18 +00:00
Sadret c602db27fd
Close #13057: Make GameAction flags accessible by plugins. (#13359) 2020-11-03 15:43:43 +00: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