Commit Graph

724 Commits

Author SHA1 Message Date
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