Commit Graph

883 Commits

Author SHA1 Message Date
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
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
Tulio Leao af0ec60bed Close #13626: Refactor RCT2LanguageId to strong enum 2020-12-23 20:07:54 -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
Michael Steenbeek abd7babc86
Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01: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 9cbdae2ef1
Peep::ItemFlags merging (#13511)
* Merge standard and extra item flags for peeps

* Update replays
2020-12-09 09:21:23 +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 fd605d7399 Apply review comments and fix build 2020-11-27 18:54:57 +00:00
Ted John c7fea71db5 Add test for codepoint view 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 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
Łukasz Pękalski d287d71624 refactor: enum class ObjectType is casted to int for test to pass 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
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
duncanspumpkin 2b1c53a512 Fix test paint 2020-11-07 14:20:08 +00: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 9e17081ee8
Use 16 bits for gTrackDesignSaveRideIndex throughout 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
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
ju-pinheiro a31c958004 Adding missing SpriteIdentifier enumerations to switch statements 2020-10-27 18:52:56 -03:00
ju-pinheiro bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Duncan 214f6992dd
Rename to TitleCase and name LastAttachedPS (#13260) 2020-10-22 18:13:54 +01:00
aw20368 0c195d14b9
Close #8848 Refactor TimeInPark (#13146)
Split TimeInPark into a union: ParkEntryTime for guests, HireDate for staff
2020-10-12 21:36:38 -03:00
X123M3-256 9681ea4cea
Add "Hybrid Coaster" ride type (#12110)
* Add "Hybrid coaster" ride type

* Add turns

* Add diagonal slopes

* Add bank transitions

* Add diagonal bank transitions

* Add banked turns

* Add sloped turns

* Add sloped bank transitions

* Add sloped banked turns

* Add s bends

* Add helices

* Add barrel rolls

* Add half loops

* Start changing supports to wooden

* Switch diagonals and banked turns to wooden supports

* Finish switching supports to wooden

* Alter default supports for small turns and steep turns

* Split track sprites that were glitching

* Fix incorrect sprite indices on small helices

* Add supports for large flat to steep pieces

* Fix bug with b supports

* Add supports for quarter loops

* Finalize set of track elements

* Fix strange colors when track piece is highlighted

* Update sprites.json

* Add support for corkscrews

* Fix incorrect remap colors and default supports

* Add slope to banked turn transitions

* Add support for preview image in color selection window

* Fix static glitches

* Correct Z offset

* Set segment heights (and fix more static glitches)

* Improve sloped curve supports

* Fix slope to banked turn transitions

* Fix dynamic glitches

* Fix boosters

* Remove corkscrews

* Set ride data and implement ride rating function

* Fix glitches on steep turns and gentle to steep

* Format code

* Add sprites

* Add track color preview image

* Fix formatting

* Add files to MSVC project

* Fix Testpaint

* Revert removal of RIDE_TYPE_50 from GetClassification

* Introduce constant instead of hard coded number

* Fix stray change

* Improve legibility of ride_ratings_calculate_hybrid_coaster()

* Fix comments on byte_97B23C

* Fix two other stray changes

* Fix Xcode project

* Adjust bounding boxes to make clipping behaviour more consistent

* Fix two glitches on medium and large turns

* Address comments from DuncansPumpkin

* Fix incorrect ride ID

* Fix steep turn sprites

* Run PNG images through OptiPNG

* Update changelog

* Fix namespace error

* Use arrays for supports to handle additional elements

* Rename functions to TitleCase and add namespace

* Increment network version

Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
Co-authored-by: tylerleamon <59478575+tylerleamon@users.noreply.github.com>
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-10-10 20:27:12 +01:00
Duncan 1207434afa
Add test cases for updated logical sort (#13143) 2020-10-10 13:37:56 +01:00
Tulio Leao bace4d62f8 Specify SYSTEM includes on CMAKE builds 2020-10-09 01:28:34 -03:00
Michał Janiszewski 16f9a2d494 Enable -Wold-style-cast
Now that casts have been changed to new style, prevent adding more
old-style cast
2020-10-09 01:02:03 -03:00
Tulio Leao 29955f28e0
Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum
Refactor TRACK_ELEM_* enum
2020-10-01 22:05:44 -03:00
Simon Jarrett 52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Łukasz Pękalski d1cd2e08b5
Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
Michael Steenbeek 6b9f83a5a4
Fix compilation on Linux and macOS 2020-09-18 19:46:12 +02:00
Gymnasiast 4ff77ebc35
Split RTL implementations to files; add preprocessor guards 2020-09-18 19:46:12 +02:00
Tulio Leao c72f547606
Merge pull request #12916 from richard-fine/pathfinding
Pathfinding cleanup
2020-09-17 17:58:31 -03:00
Matt 16fc41e6bf
Always return unique_ptr for the IniReader/IniWriter interface 2020-09-16 20:23:39 +03:00
Richard Fine 542eb873fc Consolidate pathfinding code
Consolidate all the guest pathfinding code from Peep.cpp into GuestPathfinding.cpp, and make a dedicated header for GuestPathfinding to help make it easier to see what the actual public interface is to the pathfinding system.
2020-09-12 14:59:40 -04:00
Gymnasiast c83ddefe47
Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
Richard Fine dc297e90c0 Fix compile errors in TestPaint project 2020-09-07 22:42:42 -04:00
Simon J d3d5cfbdc4
Add test for #12728: map edge footpath connections in scenario editor (#12736)
Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-08-20 20:32:23 +02:00
frutiemax 33f3f5cc3b
Use CoordsXYZ for sub_98199C in RiverRapids.cpp (#12289) 2020-08-18 09:27:23 -03:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Duncan 6d11825e1a
Reduce the use of rct_sprite (#12530)
* Reduce the use of rct_sprite

* Pass the correct types in S4 importer

* Add additional nullptr checks

* Simplify the viewport interaction

* Apply review comments

* Small cleanup of GetEntity

* Fix test paint
2020-08-01 11:29:54 +01:00
Duncan c6e26267a4
Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
Duncan 8a378ad236
Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
Duncan 3de2de9814
Reduce use of get_sprite (#12382)
* Reduce use of get_sprite

* Update src/openrct2/world/Sprite.cpp

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-07-25 18:03:14 +01:00
Michał Janiszewski 3b60740128
Add int64_t support to INI parser (#12374) 2020-07-25 09:37:35 +02:00
Michał Janiszewski 13842198fa
Disable HTTP for targets that don't need it (#12375) 2020-07-25 09:09:15 +02:00
Gymnasiast bc3ad044f8
Consistently use 'Circus' 2020-07-21 13:55:48 +02:00
Gymnasiast c2153ae797
Consistenly use 'Swinging Ship' 2020-07-21 13:55:48 +02:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
frutiemax c8b66dd289
Fix #12257: Fix refactoring of is_sprite_interacted_with_palette_set (#12258)
* Fix #12257: Change type of paint x/y to int32_t

This corrects an issue with integer conversions due to signness.

* Change types to 16bit and correct functions parameters

* Fix test paint.

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-14 12:20:53 +01:00
Ted John 06f1b58004 Add test case for DecryptSea 2020-07-11 11:40:34 +01:00
Gymnasiast e8d6383f57
Clean up voucher arguments 2020-07-07 21:13:40 +02:00
Duncan 94b3598102
Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising

* Fix null deref issues
2020-07-06 22:02:25 +01:00
frutiemax 67a8d833ea
Part of #11159: ImageImporter::ImportResult uses std::vector (#12076) 2020-07-02 14:04:49 -03:00
TomasZilinek f08206a5d0
Fix #11963 - Refactor Peep::OutsideOfPark (#12060)
* Fix #11963 - Refactor Peep::OutsideOfPark

Changed the definition of Peep::OutsideOfPark from uint8_t to bool and refactored all its occurences in code accordingly.

* Fix #11963 - Refactor Peep::OutsideOfPark

One forgotten instance of Peep::OutsideOfPark occurrence

* Fix #11963 - Refactor Peep::OutsideOfPark

Fix code according to a review suggestion.
2020-06-28 08:39:30 +01:00
Hudson Oliveira ef5f117373
Part of #9473: Create Vehicle::GetRide (#12002)
* Part of #9473: Create Vehicle::GetRide

* Redefine Vehicle::GetRide in Compat.cpp
2020-06-21 08:38:53 +01:00
frutiemax 57b50e46df
Part of #11964: Move RideTypeEnumNames to RideTypeDescriptors 2020-06-19 23:03:24 +02:00
Michael Steenbeek ab9b8cd57e
Merge pull request #11983 from frutiemax/11964_RatingsCalculate 2020-06-18 18:22:11 +02:00
Gymnasiast 22166db30d
Fix compilation on TestPaint 2020-06-18 18:10:18 +02:00
Michael Steenbeek 2013e1a36f
Merge pull request #11974 from Gymnasiast/refactor/ride-type-misc
Refactor/ride type misc
2020-06-17 23:15:30 +02:00
frutiemax f6eb9f1cc5
Merge RideRatings in RideTypeDescriptor structure (#11975) 2020-06-17 22:22:52 +02:00
Michael Steenbeek e2b187c24a
Merge pull request #11921 from duncanspumpkin/CreateSprite6
Entity List Iterator
2020-06-17 21:28:36 +02:00
Gymnasiast 682b15343b
Create RCT2_RIDE_TYPE_COUNT 2020-06-17 19:10:39 +02:00
Michael Steenbeek 5e3a99a9ac
Move RideTypeTrackPaintFunctionsOld declaration to TestPaint (#11969) 2020-06-17 13:52:10 +02:00
duncanspumpkin 9c2f545225 Fix building of testpaint 2020-06-16 20:27:44 +01:00
Tulio Leao e54a3d89f2
Rename some Peep member variables to use TitleCase (#11931)
* Rename Peep::destination_tolerance to use TitleCase

* Rename Peep::destination_y to use TitleCase

* Rename Peep::destination_x to use TitleCase

* Rename Peep::trousers_colour to use Title Case

* Rename Peep::tshirt_colour to use TitleCase

* Rename Peep::no_of_rides to use Title Case

* Rename Peep::staff_type to use TitleCase

* Rename Peep::type to use TitleCase

* Rename Peep::sprite_type to use TitleCase

* Rename Peep::sub_state to use TitleCase

* Rename Peep::state to use TitleCase

* Rename Peep::outside_of_park to use TitleCase

* Rename Peep::next_flags to use TitleCase

* Rename Peep::name to use TitleCase

* Rename Peep::NoOfRides to GuestNoOfRides

* Rename Peep::Type to AssignedPeepType

* Rename Peep::GuestNoOfRides to GuestNumRides
2020-06-14 06:31:08 +01:00
Tulio Leao 5d57012390 Rename Peep::var_37 to Var37 2020-06-08 23:47:45 -03:00
Tulio Leao a993ad8408 Rename Peep::energy to Energy 2020-06-08 23:34:35 -03:00
Tulio Leao 1c59cc2aae Rename Peep::energy_target to EnergyTarget 2020-06-08 23:32:22 -03:00
Tulio Leao 92fbb9fc04 Rename Peep::happiness to Happiness 2020-06-08 23:30:27 -03:00
Tulio Leao 1b7223462f Rename Peep::happiness_target to use TitleCase 2020-06-08 23:27:47 -03:00
Tulio Leao e387539802 Rename Peep::nausea to Nausea 2020-06-08 23:25:37 -03:00
Tulio Leao 71dc82e79a Rename Peep::nausea_target to NauseaTarget 2020-06-08 23:21:17 -03:00
Tulio Leao 533695cbe6 Rename Peep::hunger to Hunger 2020-06-08 23:18:12 -03:00
Tulio Leao aad80d3390 Rename Peep::thirst to Thirst 2020-06-08 23:12:38 -03:00
Tulio Leao 3dd4adeb81 Rename Peep::toilet to Toilet 2020-06-08 23:10:18 -03:00
Tulio Leao 05cc016132 Rename Peep::mass to Mass 2020-06-08 23:07:31 -03:00
Tulio Leao 2fdf38a0a9 Rename Peep::time_to_consume to use TitleCase 2020-06-08 23:04:04 -03:00
Tulio Leao 4f9227fd83 Rename Peep::intensity to Intensity 2020-06-08 22:55:07 -03:00
Tulio Leao f1337768f5 Rename Peep::nausea_tolerance to use TitleCase 2020-06-08 22:41:15 -03:00
Tulio Leao f732c2f1cd Rename Peep::window_invalidate_flags to use TitleCase 2020-06-08 22:25:54 -03:00
Tulio Leao 1c566eebcb Rename Peep::paid_on_drink to PaidOnDrink 2020-06-08 20:23:14 -03:00
Tulio Leao 61a598edba Rename Peep::ride_types_been_on to use TitleCase 2020-06-08 20:10:15 -03:00
Tulio Leao 958ffabf15 Rename Peep::item_extra_flags to use TitleCase 2020-06-08 20:07:44 -03:00
Tulio Leao c2322d79c8
Merge pull request #11901 from tupaschoal/prevent-shadow-peep-5
Rename some Peep member variables to use TitleCase
2020-06-08 18:08:56 -03:00
Tulio Leao 1ee5653c8c Rename Peep::photo2_ride_ref to use TitleCase 2020-06-08 17:36:35 -03:00
Tulio Leao 397c1137db Rename Peep::photo3_ride_ref to use TitleCase 2020-06-08 17:36:35 -03:00
Tulio Leao df87daaa6e Rename Peep::photo4_ride_ref to use TitleCase 2020-06-08 17:36:35 -03:00
Tulio Leao ccd76f8fc4 Rename Peep::current_ride to CurrentRide 2020-06-08 17:36:35 -03:00
Tulio Leao c302b16386 Rename Peep::current_ride_station to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao 1ac3b3d2dc Rename Peep::current_train to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao 7d25480a4d Rename Peep::time_to_sitdown to TimeToSitdown 2020-06-08 17:36:34 -03:00
Tulio Leao 3ad2471a24 Rename Peep::special_sprite to SpecialSprite 2020-06-08 17:36:34 -03:00
Tulio Leao 89a084cbc9 Rename Peep::action_sprite_type to use TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao 0d84779763 Rename Peep::next_action_sprite_type to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao d9e36e5592 Rename Peep::action_sprite_image_offset to TitleCase 2020-06-08 17:36:34 -03:00
Tulio Leao e98cea3615 Rename Peep::action* to Action* 2020-06-08 17:36:33 -03:00
Michael Steenbeek e83b86df4d
Replace occurrences of OpenRCT with OpenRCT2 (#11898) 2020-06-08 15:11:07 +02:00
Tulio Leao c953da800a Rename Peep::step_progress to StepProgress 2020-06-07 20:00:07 -03:00
Tulio Leao 95624c748e Prefix Peep::NextInQueue with Guest 2020-06-07 10:46:18 -03:00
Tulio Leao d195c9fb1d Rename Peep::next_in_queue to NextInQueue 2020-06-06 11:53:51 -03:00
Tulio Leao f1f915b540 Rename Peep::maze_last_edge to MazeLastEdge 2020-06-06 11:53:51 -03:00
Tulio Leao 1a3f8490ad Rename Peep::direction to PeepDirection 2020-06-06 11:53:51 -03:00
Tulio Leao 8a50fafdc8 Rename Peep::interaction_ride_index to use TitleCase 2020-06-06 11:53:51 -03:00
Tulio Leao 8400a7f54d Rename Peep::time_in_queue to TimeInQueue 2020-06-06 11:53:51 -03:00
Tulio Leao 3748cdb194 Rename Peep::rides_been_on to RidesBeenOn 2020-06-06 11:53:51 -03:00
Tulio Leao 4cdfccb338 Rename Peep::id to Id 2020-06-06 11:53:51 -03:00
Tulio Leao 77af2326ff Rename Peep::cash_in_pocket to CashInPocket 2020-06-06 11:53:50 -03:00
Tulio Leao 0fc7bd1afd Rename Peep::cash_spent to CashSpent 2020-06-06 11:26:04 -03:00
Tulio Leao cf4b052cd4 Rename Peep::time_in_park to TimeInPark 2020-06-06 11:26:04 -03:00
Tulio Leao 4c459fada3 Rename Peep::rejoin_queue_timeout to use TitleCase 2020-06-06 11:26:00 -03:00
Tulio Leao 3dad0fd500 Rename Peep::previous_ride to PreviousRide 2020-06-06 11:26:00 -03:00
Tulio Leao 7701b1827d Rename Peep::previous_ride_time_out to use TitleCase 2020-06-06 11:25:47 -03:00
Tulio Leao e08c1b44b2 Rename Peep::thoughts to Thoughts 2020-06-06 10:03:58 -03:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
Tulio Leao 57a2dab064
Rename Peep::NoActionFrameNum to WalkingFrameNum 2020-06-04 19:16:25 +02:00
Tulio Leao c9f071a766
Rename Peep::TimeOnRide to GuestTimeOnRide 2020-06-04 19:16:25 +02:00
Tulio Leao fabdb8cdef
Rename Peep::path_check_optimisation to PathCheckOptimisation 2020-06-04 19:16:24 +02:00
Tulio Leao d05e5f8dc7
Rename Peep::guest_heading_to_ride_id to GuestHeadingToRideId 2020-06-04 19:16:12 +02:00
Tulio Leao 9fbaf61e07
Rename Peep::staff_orders to StaffOrders 2020-06-04 19:16:12 +02:00
Tulio Leao 7357eeca60
Rename Peep::photo1_ride_ref to Photo1RideRef 2020-06-04 19:16:11 +02:00
Tulio Leao a2a0fad886
Rename Peep::peep_flags to PeepFlags 2020-06-04 19:16:11 +02:00
Tulio Leao 53bff03a3f
Rename Peep::pathfind_goal to PathfindGoal 2020-06-04 19:16:11 +02:00
Tulio Leao cad809275e
Rename Peep::pathfind_history to PathfindHistory 2020-06-04 19:16:11 +02:00
Tulio Leao f2808eecbe
Rename Peep:no_action_frame_num to NoActionFrameNum 2020-06-04 19:16:11 +02:00
Tulio Leao 0933cd4e57
Rename Peep::litter_count to LitterCount 2020-06-04 19:16:11 +02:00
Tulio Leao 7665d1386f
Rename Peep:time_on_ride to TimeOnRide 2020-06-04 19:16:11 +02:00
Tulio Leao e1d0d21b5e
Merge pull request #11849 from hdpoliveira/swing_vars
Rename swing-related variables in Vehicle
2020-06-01 08:27:57 -03:00
hdpoliveira 86550dad20 Rename swing-related variables in Vehicle 2020-05-31 16:37:09 -03:00
Tulio Leao e18abc7e3d Rename NoOf... to AmountOf... on Peep 2020-05-31 09:13:56 -03:00
Tulio Leao 0c502988ef Rename Peep::disgusting_count to DisgustingCount 2020-05-30 20:35:06 -03:00
Tulio Leao a987a9ee5e Rename Peep::paid_to_enter to PaidToEnter 2020-05-30 20:35:06 -03:00
Tulio Leao 3f091d33e2 Rename Peep::paid_on_rides to PaidOnRides 2020-05-30 20:35:05 -03:00
Tulio Leao 414cff9b91 Rename Peep::paid_on_food to PaidOnFood 2020-05-30 20:35:05 -03:00
Tulio Leao c2f7efa328 Rename Peep::paid_on_souvenirs to PaidOnSouvenirs 2020-05-30 20:35:05 -03:00
Tulio Leao a729ac1589 Rename Peep::no_of_food to NoOfFood 2020-05-30 20:35:04 -03:00
Tulio Leao bc7ea40c4b Rename Peep::no_of_drinks to NoOfDrinks 2020-05-30 20:35:04 -03:00
Tulio Leao 625f7859a4 Rename Peep::no_of_souvenirs to NoOfSouvenirs 2020-05-30 20:35:04 -03:00
Tulio Leao fc1ba40dc8 Rename Peep::vandalism_seen to VandalismSeen 2020-05-30 20:35:04 -03:00
Tulio Leao fd71b1b009 Rename Peep::voucher_type to VoucherType 2020-05-30 20:35:04 -03:00
Tulio Leao bf228abf55 Rename Peep::voucher_arguments to VoucherArguments 2020-05-30 20:35:03 -03:00
Michał Janiszewski 7f8a65c095 Make strlogicalcmp case insensitive 2020-05-20 08:35:41 +02:00
Michał Janiszewski 16d8c64cea Improve strlogicalcmp for strings of unequal lengths
This version actually works and doesn't overrun provided buffers
2020-05-20 08:33:25 +02:00
Tulio Leao e87343f9c6
Rename MoneyEffect member variables to prevent shadowing (#11748) 2020-05-16 17:04:31 -03:00
Tulio Leao c17aa095d5 Rename Peep::surrounding_thought_timeout > SurroundingsThoughtTimeout 2020-05-13 23:28:16 -03:00
Tulio Leao 32c8e5614f Rename Peep::angriness to Angriness 2020-05-13 23:25:09 -03:00
Tulio Leao 589a7a48be Rename Peep::time_lost to TimeLost 2020-05-13 23:22:08 -03:00
Tulio Leao a216cb9930 Rename Peep::days_in_queue to DaysInQueue 2020-05-13 23:19:41 -03:00
Tulio Leao 128c1993c1 Rename Peep::balloon_colour to BalloonColour 2020-05-13 23:16:43 -03:00
Tulio Leao 6c57f33dc9 Rename Peep::umbrella_colour to UmbrellaColour 2020-05-13 23:14:45 -03:00
Tulio Leao 222f8df6cb Rename Peep::hat_colour to HatColour 2020-05-13 23:11:28 -03:00
Tulio Leao 3b632fcf95 Rename Peep::favourite_ride to FavouriteRide 2020-05-13 23:06:40 -03:00
Tulio Leao 7a6de648fe Rename Peep::favourite_ride_rating to FavouriteRideRating 2020-05-13 23:03:58 -03:00
Tulio Leao 14e0cc5e4a Rename Peep::item_standard_flags to ItemStandardFlags 2020-05-13 23:01:03 -03:00
Michael Steenbeek d7637cd70f
Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Gymnasiast 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Michael Steenbeek 8127437de1
Reduce direct ride type checking; move available piece lookup to RTD (#11353) 2020-04-19 13:32:43 +02:00
Gymnasiast 9044d0a263
Fix failing tests 2020-04-17 17:03:33 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Gymnasiast 8a8eba0829
Clean up station functions and construction markers in TestPaint 2020-04-16 12:44:56 +02:00
duncanspumpkin bc04fb29c2 Remove all replay tests from 32bit builds 2020-04-12 11:18:23 +01:00
Gymnasiast 2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +01:00
Gymnasiast 6b9b60aa94
Fix compilation error in pathfinding test 2020-03-13 20:30:23 +01:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Gymnasiast c9afcaa5b3
Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast 38e7aafd07
Remove unused TestPaint defines (including one LocationXY16 occurrence) 2020-03-01 22:15:28 +01:00
Michael Steenbeek d5c4d78d49
Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Gymnasiast 63430412be
Move TrackDataOld.cpp to Testpaint project 2020-02-22 20:29:35 +01:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
Ted John 5dbd3c7c0c Allow tests to work with CRLF test data 2020-02-02 15:47:50 +00:00
duncanspumpkin 85f2b0b21d Fix testpaint 2020-01-19 17:37:24 +00:00
duncanspumpkin 28565b370d Fix clang format 2020-01-19 17:19:45 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Michael Steenbeek b1e8caa575
Merge pull request #10570 from tupaschoal/use-more-coords-6
Prefer CoordsXY* on more places
2020-01-19 18:06:20 +01:00
Gymnasiast af12421f2d
Apply fixes 2020-01-19 17:34:11 +01:00
Tulio Leao b7e9b36a27 Prefer std::array and COORDS defines on Map::CoordsDirectionDelta 2020-01-19 13:30:29 -03:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Gymnasiast 0d09a645fc
Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +01:00
Michael Steenbeek 97b1c888b3 Also change gClipSelectionA/B in TestPaint (#10485) 2019-12-31 07:12:17 +00:00
Tulio Leao 06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek 64f7cac6d6
Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00