329 Commits

Author SHA1 Message Date
Bret Curtis
14b2631527 Use Travis-CI Matrix to add more type of builds (#366) 2018-11-21 12:34:13 +01:00
Jakob Botsch Nielsen
3087e805b0 Add a matching placement delete for placement new
Even though it is a no-op this is good style and avoids a warning with
MSVC.

Fix #359
2018-11-05 14:26:08 +01:00
Jakob Botsch Nielsen
fe4d4392a6 Use SDL2.dll path relative to script file
Previously this was relative to the output file. This works around a
premake5 bug and as a bonus makes it easier if we in the future decide
to support out-of-source builds.
2018-11-05 13:34:08 +01:00
Jarrett
56dbf4c482 Allow 64 bit windows builds (#301) 2018-10-16 00:02:51 +02:00
Zeno Ahn
9f9efe943e Removed unnecessary comment 2018-09-02 15:03:41 +02:00
Roman Siromakha
05b2b8da80 CMake for Windows (#339)
* Build with cmake in appveyor

* Install content files and tests binary to bin

* Install SDL2.dll on windows

* Build RecastDemo as GUI application on Windows and Mac OS

* Copy SDL2.dll to current binary dir
2018-06-18 23:11:36 +02:00
Jakob Botsch Nielsen
6e36a351c2 Remove unused code causing warning 2018-06-16 17:04:54 +02:00
Jakob Botsch Nielsen
c2d7463a38 Add Clang to Travis and treat warnings as errors
The GCC version used by Travis is old and appears not to support all the
warnings we would like to get, so reenable Clang. Additionally make lots
of cleanups to Travis config and make the build a lot faster too.

Also change both Travis and AppVeyor builds to treat warnings as errors,
and include VS2017 in the matrix for AppVeyor. I have also removed
VS2010 because it is ancient at this point.

Updated Premake to alpha12 and fixed the premake build file
appropriately.
2018-06-16 17:04:54 +02:00
Roman Siromakha
4566d01c8f Support build by CMake (#310) 2018-04-21 00:16:52 +02:00
Jakob Botsch Nielsen
5d4186046c Mark a fall-through with a comment
Fix #283
2018-01-05 13:06:06 +01:00
Aurelien Rainone
4988ecbaf0 RecastDemo: add Load & Save buttons for SoloMesh Sample, and fix warnings (#258)
* Implement saveAll loadAll for Sample_SoloMesh

 - Solo mesh sample is loaded and saved as a tiled mesh containing
   an unique tile, so as to remain compatible with tiled mesh
 - navmesh is saved to/loaded from `solo_navmesh.bin` binary file
 - add and connect the corresponding 'Save/Load' GUI elements

* Fix `implit-fallthrough` gcc warnings

On linux with gcc 7.2.0+ and all warnings treated as errors,
implicit fallthroughs in case statements are considered as errors.
If the comment just below the next `case` or `default` matches
various strings, one of which is `falls through` the fallthrough
is then considered explicit.
2018-01-05 12:38:53 +01:00
chenshungen
bda59b7c62 Fixed load .gset file error (#293) 2018-01-05 12:33:33 +01:00
Liam Mitchell
0004bf4a23 No cast in SampleInterfaces BuildContext::doStopTimer (#299)
Removed int cast because it led to loss of time data.

Fixes #289
2018-01-05 12:20:58 +01:00
Jonathan Adamczewski
2c85309280 Suppress warning 2017-10-14 20:24:18 +02:00
Jonathan Adamczewski
7b7c941181 Disable exception handling in MS std headers 2017-10-14 20:24:18 +02:00
aymarfisherman
7cca61dc41 Renamed all instances of 'extents' to 'halfExtents' (#279) 2017-08-20 17:05:51 +02:00
Geoyeob Kim
46654531e4 Fix 'dtRandomPointInConvexPoly()' returning a garbage value if s == 1.0f. (#271) 2017-05-15 16:26:35 +02:00
Domenico Albani
ef3ea40f7a Add more camera movement key bindings (#259)
Q/E and Page up/page down to move vertically.
Arrow keys in addition to WASD to move normally.
2017-02-06 02:09:49 +01:00
Jakob Botsch Nielsen
fb49ccf83a Change ground and road colors slightly (#256)
Ground color is changed back to the previous default color, and the road
color is changed to a dark shade of brown that is a bit easier to
differentiate with normal input geometry.
2017-02-04 15:19:06 +01:00
Domenico Albani
03eb2f92f3 Make RecastDemo colors more meaningful (#254)
Implement a SampleDebugDraw which will color area types meaningfully, for example
color water as blue, grass as green and so on.
2017-02-02 20:27:43 +01:00
Jonathan Adamczewski
2bc06ef314 Change initializer list to match declaration order 2017-01-12 16:58:26 +00:00
Jonathan Adamczewski
34ab687e21 Add support for heightfield filter toggles in Sample_TempObstacles 2017-01-12 16:58:26 +00:00
Jonathan Adamczewski
12e8950bac Add toggles for heightfield filtering 2017-01-12 16:58:26 +00:00
Ben Hymers
a2e16b8e6c Set warnings as errors on Linux 2017-01-12 12:07:49 +00:00
Ben Hymers
f8c8beb3cb Fix some warnings by adding error checking to Sample_TempObstacles::loadAll (#245) 2017-01-12 12:53:39 +01:00
Jakob Botsch Nielsen
1445d05838 Use std::vector in NavMeshPruneTool 2016-07-13 05:37:37 +02:00
Jakob Botsch Nielsen
5d6312ab1e Mark start poly in NavMeshPruneTool
The start poly would not be pruned if it was the only poly on the
island.

Fix #216
2016-07-13 05:37:15 +02:00
Sander van Noort
b05e45492e Fix memory leak in LinearAllocator used by Sample_TempObstacles 2016-04-03 22:39:33 +02:00
Ben Hymers
3eb9c808c1 Fix many cases of return values from ftell and fseek being ignored
These could lead to undefined behaviour if e.g. a negative value from ftell
was used to allocate memory.

Also store result of ftell in a long;
The result may previously have been truncated on some platforms
2016-03-15 08:02:06 +00:00
Ben Hymers
632ae709d7 Fix unused parameter warning in Contrib/stb_truetype.h 2016-03-15 07:56:57 +00:00
Ben Hymers
58bd564438 Initialise BuildContext::m_messages to null pointers
Fixes warning reported by Coverity Scan
2016-03-15 07:56:56 +00:00
Ben Hymers
e4791becd5 Fix Coverity warning about odd null check in TempObstacleHilightTool
m_sample was being checked for null after being used, which looks like a
null dereference, though actually if m_sample becomes null, the tool will
be deactivated anyway. Regardless, this code looks more sensible.
2016-03-14 10:22:31 +00:00
Ben Hymers
299ed08087 Fix leaking file handles in Sample_TileMesh::loadAll after various failures
Leaks were reported by Coverity Scan
2016-03-14 10:22:31 +00:00
Ben Hymers
e1f297e4bf Fix memory leak in Contrib/stb_truetype.h, stbtt_GetGlyphBitmapSubpixel
Leak was reported by Coverity Scan

Issue reported to stb project here:
https://github.com/nothings/stb/issues/251
2016-03-14 10:22:31 +00:00
Ben Hymers
d7d58b98d9 Fix ReSharper warnings: remove unused methods 2016-02-26 08:41:17 +00:00
Ben Hymers
a2730f9fdd Fix warnings; initialise all uninitialised class members 2016-02-26 08:40:53 +00:00
Ben Hymers
f44e151556 Fix crashes and odd behaviour in RecastDemo on geometry load failure
Would crash if selecting a test with geometry then a test with missing geometry
Would use the previous sample type if selecting a sample that doesn't exist in the list
Two of the test cases had an incorrect sample name
2016-02-22 22:24:48 +00:00
Ben Hymers
7babde3103 Fix Win64 when populating input file list
As identified by @b-desconocido, _findfirst has a return type of intptr_t;
this was previously being truncated to long.

Fix #185
2016-02-20 15:46:22 +00:00
Graham Pentheny
0f8ebe285e Merge pull request #183 from hymerman/stb_truetype_upgrade
Update stb_truetype to latest version
2016-02-17 11:01:53 -05:00
Ben Hymers
13edcb54ce Update stb_truetype to latest version 2016-02-17 13:16:59 +00:00
Ben Hymers
aac9ae6e11 Remove SlideShow, and stb_image 2016-02-17 13:14:34 +00:00
Jakob Botsch Nielsen
e30a6635a2 Fix warnings and increase demo text pool size
Fix three warnings added in fc5df2c, and increase the text pool size in
the demo. This would frequently be overflowed, even just by building
with the default settings and expanding the log.
2016-02-16 10:27:18 +01:00
Graham Pentheny
b7a83e0afb Fixed rule of 3 violations in many places.
* Added virtual qualifier to a few destructors in subclasses.
* Removed a few empty destructors that didn't need to be explicitly defined.
* Fixed a few typos
* Removed unnecessary empty virtual destructors in some classes with parent's who derrived from a class with a virtual destructor
2016-01-20 11:57:32 -05:00
Jakob Botsch Nielsen
a31da928ba Add settings storage to geometry sets
This adds the ability for geometry sets to store build settings that can
be automatically applied when they are loaded. This should allow sharing
of .gset files to demonstrate problems with certain settings on certain
files. It also allows people to diagnose problems more easily by being
able to dump their own triangle meshes and settings and load them in the
demo, with all of its visualization options. .gset files can be created
from the current mesh and settings by pressing the 9 key, which will
generate it in the same folder as the input mesh.

Also converts more of the demo to use STL.
2016-01-17 20:31:09 +01:00
Ben Hymers
a25b018be9 Merge pull request #76 from grahamboree/warnings
Removed a smattering of compiler warnings
2016-01-14 15:28:02 +00:00
Graham Pentheny
66c6060e95 Fix a bunch of compiler warnings
* Removed some unused vars
* Fixed some signed/unsigned comparison mismatch warnings
* Cast some int's to size_t when appropriate
* Removed some redundant casts
* silenced warnings about implicit conversions that lose precision
* changed origMousePos to an array of ints to match mousePos
2016-01-10 22:41:38 -05:00
Jakob Botsch Nielsen
09080b5272 Fix time measuring on Windows
The demo relied on the build context returning accumulated times in
microseconds. On Windows this was using QueryPerformanceCounter directly
which has a higher resolution, thus returning wrong measured times. We
now report the accumulated times in microseconds on all platforms.
2016-01-10 18:43:34 +01:00
Graham Pentheny
e5f9f21b30 Removed FileList class and replaced it with std::vector<std::string> in RecastDemo 2016-01-07 18:34:18 -05:00
Graham Pentheny
512ec1fdfd Unit testing framework.
* Tests live in a "Tests" folder alongside the other components.  Inside the "Tests" folder, tests are split into folders by the component they test.  For example, the example unit test of "rcVdot" (which is implmemented in Recast/Recast.h) lives in "Tests/Recast/Tests_Recast.h".
* Uses the Catch testing framework
* One example test of "rcVdot"
* Tests are run on Travis and Appveyor after every build.  Failing unit tests will fail the build in both case.
* Added instructions on running unit tests to the readme
2016-01-06 18:22:39 -05:00
Jakob Botsch Nielsen
7230dea2e3 Ensure SDL2.dll is copied for paths with spaces
The generated VS project would fail to copy the SDL2.dll file
if the solution or Bin path contained spaces.
2016-01-05 12:08:27 +01:00