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
Michael Steenbeek
8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter ( #10454 )
2019-12-27 15:26:40 +01:00
Tulio Leao
0c2e5747b8
Clarify test coords conversions
2019-12-24 11:19:06 -03:00
Tulio Leao
6c998d7b4d
Make Map::map_get_track_element_at() use CoordsXYZ
2019-12-24 11:19:03 -03:00
Gymnasiast
62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ
2019-12-23 20:08:37 +01:00
Gymnasiast
7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight()
2019-12-23 20:05:24 +01:00
Tulio Leao
a2c7ecc6e5
Make Map::map_get_first_element_at() use CoordsXY ( #10413 )
...
* Make Map::map_get_first_element_at() use CoordsXY
* Fix clang-format on ClearAction.hpp
* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction
* Use named Direction constants
* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
duncanspumpkin
b34defa907
Fix testpaint
2019-12-21 12:18:34 +00:00
Michael Steenbeek
6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
...
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Tulio Leao
7e7b4029a9
Simplified conversions from TileCoordsXYZ to CoordsXY
2019-12-19 08:12:42 -03:00
Tulio Leao
aea755bd70
Allow TileCoordsXYZD to generate CoordsXYZD equivalent
2019-12-19 00:11:26 -03:00
Tulio Leao
5c657bde9f
Remove map_get_surface_element_at operating with TileCoordsXY
2019-12-18 23:47:17 -03:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
Tulio Leao
c71c4284d0
Make map entrance/exit fetching functions use only CoordsXY objects
2019-12-17 23:55:46 -03:00
Tulio Leao
03e7e29b21
Make map entrance/exit fetching functions use Coords objects
2019-12-14 12:13:09 -03:00
Matt
6dd00787f6
Add missing static keywords
2019-10-20 14:13:59 +02:00
Matt
3d7c06f4b3
Change fopen_s to fopen and use EXPECT_EQ for COMPARE_FIELD
2019-10-20 14:13:59 +02:00
Matt
e6d520e371
Add missing include
2019-10-20 13:49:39 +02:00
Matt
8243c2b64e
Update CMakeLists.txt
2019-10-20 13:49:39 +02:00
Matt
6177255991
Add S6 Import/Export test and remove old NetworkLoadSave test
2019-10-20 13:49:35 +02:00
Michael Steenbeek
a5700a3d07
Merge pull request #9959 from richard-fine/directions
...
Convert more code to use proper Direction symbols
2019-09-22 16:59:41 +02:00
Richard Fine
0e04dbeea1
Allow SwapBE to swap non-uint types
...
If we want to have more semantically meaningful types (like Direction), it's useful to be able to support those in the DataSerializer too. Swapping bytes for entire structures is probably never going to make sense, but for types that are pure wrappers around integer types, we want to be able to swap them as if they were the integer they wrap.
2019-09-01 18:40:11 +01:00
Richard Fine
6449393d50
Use Direction type in a bunch of the pathfinding code
2019-09-01 18:38:03 +01:00
Gymnasiast
bb73dd0dfb
Refactor track element to use 16 bytes
2019-08-31 13:14:19 +02:00
Gymnasiast
abdf6e695a
Fix testpaint
2019-08-31 10:01:57 +02:00
Gymnasiast
f365bc3cb7
Create getters and setters for occupied quadrant
2019-08-27 21:12:48 +02:00
Gymnasiast
ec5ba20992
Create dedicated method for SetLastForTile()
2019-08-25 16:13:02 +02:00
Gymnasiast
6e200459d3
Refactor some accessors to tile element type and flags fields
2019-08-24 22:42:47 +02:00
Ted John
d5a1b4fc8f
Fix #9920 : Ghost pieces break maps on multiplayer for the client ( #9928 )
2019-08-23 21:05:00 +02:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
Matt
45452ad2c8
Run replay tests with network disabled
2019-08-12 18:04:08 +02:00
Ted John
cd4eb86a7c
Merge pull request #9725 from IntelOrca/refactor/ride-manager
...
Refactor ride list
2019-08-07 21:03:17 +01:00
ζeh Matt
7730b35d82
Merge pull request #9571 from ZehMatt/replay-cleanup
...
Replay cleanup
2019-08-05 18:31:03 +02:00
Ted John
f49447bed5
Fix compile errors
2019-08-04 17:47:16 +01:00
Ted John
a863c7ae50
Remove rest of FOR_ALL_RIDES instances
2019-08-04 16:44:17 +01:00
Ted John
414b53b56d
Remove ride classifications
2019-08-04 16:43:50 +01:00
Ted John
a3fe00f0a3
Refactor ride list to a manager with iterator
2019-08-04 16:43:50 +01:00
Ted John
3f8890afde
Fix remaining errors and a few bugs
2019-07-29 19:18:16 +01:00
Matt
17918d2f6b
Remove replays
2019-07-14 16:45:55 +02:00
Ted John
6f0298deb3
Refactor ride measurement storage
2019-06-09 11:55:41 +02:00
Gymnasiast
f0f09c7f6b
Fix tests
2019-05-28 16:50:08 +01:00
Tom Lankhorst
ed353faccf
Implement replace_if condition lambda
...
Fix include typo and CS
2019-05-11 13:54:16 +01:00
Tom Lankhorst
744f2225ed
Write platform tests
2019-05-11 13:54:16 +01:00
Gymnasiast
17ddd451db
Fix tests, fix formatting
2019-05-07 20:04:07 +02:00
NexGenration
e6c88a05db
Make peep generate a static member function
2019-05-07 19:34:50 +02:00
Michael Steenbeek
5a906b2378
Port more functions to Ride struct ( #9119 )
2019-04-20 22:22:39 +02:00
Michael Steenbeek
42a1a8704d
Use empty() for vectors; clean up bool comparisons ( #9118 )
2019-04-20 20:39:47 +02:00
Matt
37c3809744
Implement partial multicore rendering
2019-03-31 15:50:55 +02:00
Duncan
9c4430736d
Use get track element ( #8884 )
...
* Use get_track_element and change its return type
* Make things work
* Use helper functions where possible
2019-03-16 11:21:36 +00:00
Matt
15838861cd
Add load and save test.
2019-03-02 13:11:08 +01:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
duncanspumpkin
9d78bb0d4e
Fix compile and formating
2019-02-27 10:54:08 +00:00
duncanspumpkin
eb9ecea92e
Add IsGhost to the testpaint calls
2019-02-26 08:50:04 +00:00
Matt
c631177877
[ci skip] Add bpb.sv6 to the replays with 7000 ticks.
2019-02-16 09:09:51 +01:00
Michał Janiszewski
5e74f7487d
Merge pull request #8700 from janisozaur/icc-fixes
...
Icc fixes
2019-02-10 12:21:33 +01:00
ζeh Matt
20989ae4d8
Merge pull request #8675 from tomlankhorst/compress-replays
...
.sv6r version 2: introducing compression
2019-02-10 11:01:26 +01:00
Michał Janiszewski
5faf2d393b
Fix ride_type_has_flag signature for testpaint
2019-02-10 00:32:46 +01:00
Michał Janiszewski
2f16ad164d
Merge pull request #8671 from tomlankhorst/cmake-link-with-platform
...
Link targets with platform specific libs
2019-02-07 23:40:46 +01:00
Matt
598ea08529
Update copyright.
2019-02-07 18:50:58 +01:00
Matt
49a6ae7894
Add CircularBuffer test.
2019-02-07 18:50:58 +01:00
Tom Lankhorst
756b52186e
Normalised and upgraded all replays
2019-02-06 10:24:10 +01:00
Tom Lankhorst
94758bccf6
Link with platform libraries
2019-02-05 20:17:14 +01:00
Michał Janiszewski
6bdbe248fd
Merge pull request #8641 from tomlankhorst/use-lto
...
Detect availability of LTO, apply when available
2019-02-04 00:06:37 +01:00
Tom Lankhorst
ce6e08c633
Introduce SET_CHECK_CXX_FLAGS
2019-02-03 23:32:51 +01:00
Tom Lankhorst
6a42a95495
Refactor random engine
...
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Tom Lankhorst
22fac20907
Include ICU include dirs in testpaint ( #8622 )
...
`testpaint` uses ICU headers, so add the ICU_INCLUDE_DIR to the target.
2019-01-23 14:30:49 +01:00
Gymnasiast
74a3674e86
Replace more hardcoded instances of RIDE_ID_NULL
2019-01-12 12:38:23 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Matt
b01c93ba4c
Normalise replays.
2019-01-07 09:04:51 +01:00
Michael Steenbeek
31298bd772
Merge pull request #8543 from IntelOrca/refactor-ride
...
Refactor ride structure
2019-01-02 22:38:20 +01:00
Michał Janiszewski
37535f4642
Release ImageImporter'd buffer after the test is done
2019-01-02 20:14:28 +01:00
Richard Fine
cec457fbf1
Reformat
2019-01-02 14:12:51 +00:00
Richard Fine
315ea057fe
Verify that peeps stay on paths
...
As per PR recommendation, confirm that a peep is still on the footpath for every step of the pathfinding tests.
2019-01-02 14:12:51 +00:00
Richard Fine
bb4e79ddda
Rework tests to use ride entrances as path targets
...
It turns out that trying to just give a peep a pathfinding goal and then let them loose doesn't work, because every time they reach a junction, the pathfinder has them walk 'aimlessly' instead of pursuing their target. That's why we were seeing some very large step counts in previous tests - they were (eventually) walking onto the target square, but only after lots of wandering around in circles.
This commit reworks the test data to contain an actual ride for each test scenario, where the peep will path to the tile in front of the ride entrance. A nice side benefit of this is that the ride names must match the test names, so you can now tell from looking at the rides in the test data which one is used for which test instance.
The 'yellow marker' tiles for goal positions are also removed here, as we're deriving goal positions from the ride entrances instead.
2019-01-02 14:12:51 +00:00
Richard Fine
c8c1abd10a
Reformat
2019-01-02 14:12:51 +00:00
Richard Fine
a20c8d61be
Call core_init instead of bitcount_init
2019-01-02 14:12:51 +00:00
Richard Fine
280a0c61e4
Rename maxSteps to expectedSteps
...
To make it a little clearer what the parameter is for, rename FindPath::maxSteps to FindPath::expectedSteps, and extend the comment to describe what happens in negative test scenarios.
2019-01-02 14:12:51 +00:00
Richard Fine
357ee293f3
Remove default value for SimplePathfindingScenario steps
...
Remove the default value as it's more consistent to just always have the test case specify it explicitly.
2019-01-02 14:12:51 +00:00
Richard Fine
49e46f8940
Replace GetSurfaceStyleAtLocation with map_get_surface_element_at
...
There exists a helper function map_get_surface_element_at which already searches a tile's element list for the surface element, so we can just use that.
2019-01-02 14:12:51 +00:00
Michał Janiszewski
f4685f7b94
Add Pathfinding test to CMake
2019-01-02 14:12:51 +00:00
Richard Fine
8fb81a2d89
Initial data-driven tests for pathfinder behaviour
...
Introduce some basic scenario-style tests for the pathfinding AI. There
are two tests:
* Test that a peep can get from a given start position to a given end
position, and that it takes them an expected number of ticks to do so.
Also test that they did not walk on any 'forbidden' tiles in the process,
e.g. tiles that are completely the wrong direction from the goal etc.
* Test that a peep can *not* get from a given start position to a given
end position after a given number of ticks.
Each test is parametric, and instantiated for multiple different
start/end positions within the provided test park. If we find a new
situation that needs a test, it should just be a matter of building
that situation in the saved game and then adding a line to the code to
set it up.
Indicating 'forbidden' tiles is done using terrain surface type IDs:
tiles that the pathfinder should never send the peep into should be
painted with the red neon surface type (index 8). This means we have
no way to forbid some path elements on a tile while allowing others,
but we don't need that right now.
Similarly, to help ensure that the test data and code are kept in
sync, the tests also require that peep start tiles are painted with
the green neon surface type (index 11) and that goal tiles are
painted with the yellow neon surface type (index 9).
2019-01-02 14:12:08 +00:00
Matt
045e72e863
Add more replays to test.
2019-01-02 08:30:33 +01:00
Matt
8615690891
Fix timestamp not being stored.
2019-01-02 05:36:31 +01:00
Ted John
37f76d1687
Move station fields into new station struct
2019-01-01 02:26:14 +00:00
Matt
8721bef807
Fix TileElementWantsFootpathConnection test not releasing context.
2018-12-30 12:24:41 +01:00
Matt
f868c23077
Update replay.
2018-12-30 00:07:39 +01:00
Matt
0ba42d6899
Fix TileElementWantsFootpathConnection test not releasing context.
2018-12-29 22:58:33 +01:00
Matt
5497036f01
Add missing static keyword.
2018-12-29 19:23:28 +01:00
Matt
871a24c410
Rename replay file.
2018-12-29 19:23:28 +01:00
Matt
0a62938e42
Pretty print the test parameter.
2018-12-29 19:23:28 +01:00
Matt
711d93cb30
Update replay test.
2018-12-29 19:23:27 +01:00
Matt
5cfc06573e
Ignore replay test when network is disabled.
2018-12-29 19:23:27 +01:00
Matt
ccc3227113
Cleanup.
2018-12-29 19:23:27 +01:00
Matt
669fbd62dd
Add missing source file.
2018-12-29 19:23:27 +01:00
Matt
017f190a52
Add basic regression tests via the replay system.
2018-12-29 19:23:27 +01:00
Michał Janiszewski
05ede45b8e
Fix ICU include dirs for tests ( #8499 )
2018-12-19 23:31:24 +01:00
Ted John
06f203a7e7
Implement surfaces, edges and stations as objects
2018-12-09 23:30:40 +00:00
Matt
468d94a6ca
Remove gCurrentViewportFlags
2018-12-05 23:09:17 +01:00
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Felix Pelletier
0cd7f1e07c
Fix #8142 : Reliability of unbreakable rides can go below 100%
2018-11-02 09:04:27 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Michael Steenbeek
d89c3d9e67
Replace calls to get path edges
...
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Ted John
211bd84cc3
Merge pull request #7806 from Gymnasiast/feature/rtl-rendering
...
Fix RTL text rendering for Linux / macOS
2018-10-16 22:26:45 +01:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
Michael Steenbeek
28d302d653
Remove more direct access to TileElement->type
2018-10-03 12:31:02 +02:00
Gymnasiast
eae09ea16d
Attempt at fixing language pack test
2018-10-01 19:34:09 +02:00
Michael Steenbeek
ce13d1b961
Fix tests
2018-09-27 22:15:04 +02:00
Gymnasiast
5d22166fc3
Fix TestPaint
2018-09-25 21:57:21 +02:00
Gymnasiast
eecf465e3b
Fix formatting
2018-09-25 21:57:21 +02:00
Michael Steenbeek
5047d326a6
Copy new struct methods to TestPaint compat
2018-09-25 21:57:21 +02:00
Michael Steenbeek
3f17782692
Move direct access to maze entry to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
75b5c45a97
Remove residual direct access to most track fields
2018-09-25 21:57:21 +02:00
Michael Steenbeek
104d4f2f58
Move photo functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
897a2982a0
Move brake/booster speed functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
e6d5638815
Move inverted() functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
0cea008c18
Move cable lift functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
69f02400f9
Move GetColourScheme to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
650971bc68
Move HasChain to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
67d7d5c022
Move getting station index to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
ae4c464ce7
Move getting track sequence to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
8908f3f47e
Move getting track type to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
e20ba5d4a3
Add missing stuff to TestPaint
2018-09-16 21:34:51 +02:00
Gymnasiast
e6dd093218
Remove unused function from Testpaint compat
2018-09-16 21:34:51 +02:00
Michael Steenbeek
1d3baef9b7
Remove some C-style tile element functions
2018-09-16 21:34:04 +02:00
Michał Janiszewski
92b556352b
Allow compilation of testpaint on non-x86 targets ( #7989 )
...
This will enable compilation of testpaint on targets different than x86.
It won't function the way it does on x86, but it should provide a way of
tackling various compilation errors that can only be seen in the very
specific environment required by testpaint proper.
2018-09-15 23:37:45 +02:00
Gymnasiast
d0f4b45bd2
Fix Testpaint
2018-09-13 20:14:44 +02:00
Ted John
7faa4e06e0
Update gtest to latest snapshot ( #7950 )
...
This fixes issues when building with MSVC 15.8.
2018-08-30 10:10:36 +02:00
Hielke Morsink
0b03464186
Replace 0 and NULL with nullptr ( #7827 )
2018-07-25 22:49:20 +02:00
clang-format
7eafeaa971
Apply clang-format changes to tests
2018-07-23 16:00:23 +02:00