Commit Graph
16432 Commits
Author SHA1 Message Date
Ted John 9d43eaf0e0 Merge pull request #4867 from IntelOrca/refactor/openrct2-c
Refactor openrct2.c
2016-12-11 20:57:49 +00:00
Marijn van der Werf eb87baa5d8 Update Xcode project 2016-12-11 21:05:52 +01:00
Giles Wells fe2085e0ed Fix spelling error
[ci skip]
2016-12-11 19:24:40 +00:00
Hielke Morsink c3b054e795 Fix typo in msbuild command 2016-12-11 13:44:09 +00:00
Ted John cef2587119 Move RCT2 file copy into rct2.c 2016-12-11 12:16:47 +00:00
Ted John 0019827d6c Refactor sprite tween logic out openrct2.c 2016-12-11 12:16:47 +00:00
Ted John e9bafc2973 Refactor RCT2 interop code to new source 2016-12-11 12:16:43 +00:00
Ted John c6dda4e614 Fix #4863: Build fails when using VS 2017 RC 2016-12-10 00:36:59 +00:00
wolfreak99 d1d6be0b93 Clip all scenery images in scenery window to prevent overflow/overlap 2016-12-08 20:10:16 +01:00
n42k bd02f14699 Fix platform_get_locale_temperature_format() in windows.c 2016-12-08 12:09:21 +00:00
Ted John 1513b88af7 Resolve #4856: Mention Dump File Location in Readme 2016-12-08 11:31:21 +00:00
Yaroslav Tretyakov 51fcfe3379 Fix #4852: Clicking on the hook icon for a person does not return it to the original location (#4854) 2016-12-07 22:28:55 +01:00
OpenRCT2 git bot 1dd2751f4a Merge Localisation/master into OpenRCT2/develop. 2016-12-07 04:00:19 +00:00
OpenRCT2 git bot c462a6dd23 Merge Localisation/master into OpenRCT2/develop. 2016-12-06 04:00:17 +00:00
Michał Janiszewski cbd64af113 Merge pull request #4835 from janisozaur/tests
Add tests
2016-12-04 18:55:02 +01:00
Ted John db39e66c5b Fix machine not specified warning 2016-12-04 15:24:48 +00:00
Ted John f130567554 Define subsystem for release configuration 2016-12-04 14:32:05 +00:00
Michał Janiszewski d2e1857733 Fix #4793: Inventions list broken
This reverts commit 3f767ed8ff and replaces it with exact check that
doesn't trigger array-bounds GCC warning with `-O3`
2016-12-04 12:03:32 +01:00
OpenRCT2 git bot a5de893439 Merge Localisation/master into OpenRCT2/develop. 2016-12-04 04:00:22 +00:00
Ted John 8892a5e17c Fix AppVeyor for testing 2016-12-04 00:27:25 +00:00
duncanspumpkin 7917d189cb Readd addresses header to allow RCT2 builds 2016-12-03 07:19:43 +00:00
Ted John 3a3e3c76d1 Rollback AppVeyor platform update 2016-12-02 22:09:52 +00:00
Michał Janiszewski f9424455e7 Merge pull request janisozaur/OpenRCT2#23
Add msbuild / msvc / windows support for tests
2016-12-02 22:52:07 +01:00
Ted John 7557d9ca07 Abort if assert is hit in tests 2016-12-02 21:49:44 +00:00
Michał Janiszewski 3253ef7cae Verify decoded chunk length 2016-12-02 22:12:55 +01:00
Michał Janiszewski 28098776b2 Convert tests to class + fixtures
This makes test data not require `extern`
2016-12-02 22:00:02 +01:00
Ted John 433207dc81 Do not assert when testing 2016-12-02 17:18:45 +00:00
Ted John 756e26ad45 Fix main function 2016-12-02 17:16:12 +00:00
Ted John 9c973e20cd Run tests on AppVeyor 2016-12-02 14:54:18 +00:00
Ted John 05737fdd74 Add test target 2016-12-02 14:42:40 +00:00
Ted John d26e1df21e Automatically download googletest 2016-12-02 13:36:03 +00:00
zaxcav 1df30e55d2 Fix CI errors
Missing #if on some debug code.
2016-12-02 13:18:20 +01:00
Ted John 872976bff4 Force UTF-8 compile and fix manifest DPI 2016-12-02 10:49:58 +00:00
zaxcav 11174af00b Increment network version for pathfinding fixes. 2016-12-02 11:00:57 +01:00
zaxcav 5ff6199ba1 Changes/additions to the pathfinding logging messages.
Refactored some code into functions for enabling/disabling pathfinding debugging for a specific peep.

Some new log messages for improved clarity when debugging pathfinding.

Added a #define to independently enable/disable pathfinding debugging to be friendly to others using debugging builds.
2016-12-02 10:55:40 +01:00
zaxcav 2f4c5c4a06 Reset pathfind_goal when choose direction fails.
Currently pathfinding falls back to aimless movement in this case.

Resetting the pathfind_goal (which in turn will cause the pathfind_history to be reset) makes the pathfinding try again afresh the next time around.

Potentially useful for adjusting to path changes by the player and recovering from a stuck position due to earlier bad pathfinding.
2016-12-02 10:49:15 +01:00
zaxcav f0cf7c2763 Fix loop detection in heuristic search based on pathfind_history.
In the existing version, returning to a junction in the pathfind history is considered a loop.  This is not useful as it prevents the pathfinding from backtracking, which is what the pathfind_history is intended to allow.

Updated to consider it a loop only when returning to a junction with no more edges left to try.
2016-12-02 10:23:56 +01:00
zaxcav dd89a32016 Reset pathfind_history[i].direction when all directions have been tried.
When choosing a direction at a junction in pathfind_history (with no untried directions) the existing path finding falls back to aimless movement.

This change makes the pathfinding try again.

Useful for adjusting to path changes by the player and recovering from a stuck position in a savegame due to earlier bad pathfinding.
2016-12-02 10:20:49 +01:00
zaxcav b83ab8d6e7 Reset pathfind_history before the heuristic search function is called.
Now that the heuristic search uses the pathfind_history for loop detection it is important that when the pathfind_goal is reset the pathfind_history gets reset before calling the heuristic search.
2016-12-02 10:15:33 +01:00
zaxcav afcf48080c When choosing a direction, repair pathfind_history[i].direction.
Remove directions that are not permitted by the path element(s) at that location.
2016-12-02 10:10:23 +01:00
zaxcav 307ebc38be Fix initialisation of junctions added to pathfind_history.
Fix initialisation of junctions added to pathfind_history.
2016-12-02 09:57:19 +01:00
zaxcav c2d9c7a6d4 Make path finding aware of ALL path elements when choosing a direction.
This is applicable for overlaid paths placed with zero clearance.

Previously the pathfinding only used the first path element.

Notes:

1. Logic related to path slope still only uses the the first path element.  Overlaying path elements with the same base height but different slopes may cause pathfinding glitches.

2. The heuristic search already uses a similar approach - the inconsistency could have caused pathfinding glitches.
2016-12-02 09:50:39 +01:00
Ted John 4ccb50409b Add test configurations 2016-12-02 02:49:50 +00:00
Ted John fab8dce9cc Move file listing to the bottom of openrct2.vcxproj 2016-12-02 01:00:57 +00:00
Ted John 91e19c7d48 Move a lot of the common properties to a shared props file 2016-12-02 00:59:52 +00:00
Ted John a08af1a253 Get tests to build for Windows and VS 2016-12-02 00:34:14 +00:00
Michał Janiszewski 86a336dd3d Extend LanguagePack test with negative tests 2016-12-01 23:28:01 +01:00
Michał Janiszewski a2d30ac405 Add multibyte LanguagePack test 2016-12-01 23:21:35 +01:00
Michał Janiszewski e3a3cf375d Add LanguagePackTest 2016-12-01 23:04:10 +01:00
Michał Janiszewski 729934193c Improve tests' CMakeLists.txt 2016-12-01 16:03:27 +01:00