Commit graph

157 commits

Author SHA1 Message Date
706f1aaa0a Fix drawing of vertically clipped surfaces.
Also fix bottom platforms disappearing and wrong coordinates being
sent to the function that draws debug lines. Obviously debug lines
drawing is still messed up... but at least you see the two lines!
2016-11-17 01:17:20 +01:00
10f830809b Add unit test for the deferred virtual call implementation in SizeNotifiable.
Fix the build as necessary.
Change DeferredRegister() to take no construction parameters.
2016-11-14 00:29:49 +01:00
0a3897f60a Refactor cmake file so the main part of the code is a lib. 2016-11-11 21:18:39 +01:00
7f49ef36d6 Import Catch and make a unit test program that uses it. 2016-11-11 20:37:35 +01:00
ce9eff82f1 Update PhysicsFSWrapper and print version on startup. 2016-11-11 02:36:10 +01:00
b5f7e30471 Update description for the bug fixed in the previous commit. 2016-11-10 23:26:41 +01:00
5e76b49cae Use the deferred virtual call mechanism to avoid the virtual
call bug in the constructor.

See docs/wrong_virtual_call.md for a description.
2016-11-10 23:19:55 +01:00
0b6cdeb5f5 Warning and assert fixes. 2016-11-09 23:35:41 +01:00
72bfb64795 NotifyResChanged() should not be virtual itself.
Make an OnResChanged() virtual method instead.
2016-11-09 23:35:19 +01:00
a87255ef66 Fix texture clipping 2016-11-09 22:25:57 +01:00
68d179975e Cast vectors explicitly using vector_cast. 2016-11-02 18:37:45 +01:00
650f8d6de1 Replace vector.hpp with vectorwrapper 2016-11-02 18:37:45 +01:00
e64b53f8d0 Warning fix on clang. 2016-11-02 02:53:29 +01:00
d12b7f777a Update gitignore with YouCompleteMe files 2016-10-31 21:07:24 +01:00
19dc6759df Don't use -std=c++11 explicitly and update cmake version requirement. 2016-10-31 20:47:47 +01:00
7985ba2bc4 Add old code that is presumably made to display debug collision lines. 2016-10-31 20:10:33 +01:00
a7bd060452 Fix memory leak when loading png files. 2016-10-31 20:09:44 +01:00
09299595fe Fix wrong increment of deleted iterator.
This fixes the invalid access spotted by valgrind.
2016-10-31 19:51:52 +01:00
09b41f6d0c Update tree to 3.1
see http://tree.phi-sci.com/download.html
2016-10-31 19:41:50 +01:00
8d2f7085c4 Ignore cscope's files. 2016-10-31 19:27:47 +01:00
1ef3dc86ac Remove unused inclusion. 2014-09-04 12:14:57 +02:00
c27055f8d0 Ignore offscreen segments. 2014-09-04 12:14:31 +02:00
efb0f93062 Draw collision lines for the platforms as well.
This highlits the issue with the broken collision and bouncing.
2014-08-25 19:28:10 +02:00
cc0f174be5 Round instead of truncating. 2014-08-25 18:06:55 +02:00
af4f16a6d6 New files merged from dev weren't using the new a_pure macro yet. 2014-08-25 17:44:13 +02:00
5a71b943b2 Merge branch 'dev'
Conflicts:
	src/line.hpp
	src/platformset.cpp
	src/vector.hpp
2014-08-25 17:41:06 +02:00
04690b947c Add target architecture detection in cmake and pass -msse3 to the compiler for x86_64 targets.
See: https://github.com/petroules/solar-cmake/blob/master/TargetArch.cmake
Also added some C flags, though likely they were implicitly passed to the compiler already.
2014-08-25 17:32:48 +02:00
488c31c57e Implement clipping for DrawableLine. 2014-08-23 00:32:33 +02:00
634503bf00 Add a line to the character to mark the collision bar. 2014-08-23 00:32:24 +02:00
5026ce2c53 Bugfix in operator!= 2014-08-22 11:01:01 +02:00
c4fbdd8e16 Add a constructor to make a Line from x1,y1-x2,y2 coordinates.
Also allow to retrieve the internal points using the [] operator.
2014-08-22 10:50:50 +02:00
78734f6ad3 Add assertions for out-of-bounds indices. 2014-08-22 10:49:22 +02:00
105020b5c1 Added a DrawableLine class for debug builds. 2014-08-19 21:49:08 +02:00
f300c94924 Allow scaling lines by a 2D vector ie: non-homogeneous scaling. 2014-08-19 21:48:41 +02:00
c70d2ad423 Allow more flexibility when performing operations on Vectors of
different types.
2014-08-19 21:44:26 +02:00
ec665cc24c Fix the remaining warnings on the intel compiler. 2014-08-14 13:12:25 +02:00
704cfa4051 Some fixes for the intel compiler.
A few warnings are still there, but it should be safe to ignore them.
2014-08-14 12:54:18 +02:00
08f217e22c Warning fix on clang 2014-08-14 12:09:44 +02:00
4e89878eb4 Replace __attribute__ keywords with a macro to improve compiler compatibility. 2014-08-14 12:00:04 +02:00
dff58a98ef Merge branch 'dev'
Conflicts:
	CMakeLists.txt
2014-08-14 11:30:05 +02:00
727345fbe9 Unused function. 2014-08-14 10:57:33 +02:00
d30a93bb5b Don't register platforms that have gone out from the bottom.
This fixes the assert occurring after a few seconds playing.
2014-08-14 10:56:01 +02:00
e9253fae1f Silence a warning in Release. 2014-08-13 22:54:30 +02:00
c59a4573f4 Rename PlatformSystem to PlatformSpawner. 2014-08-13 22:51:08 +02:00
896b368cbe Refactoring to split the PlatformSystem into a PlatformSet subpart.
Also introduces the same concept for Drawables, with DrawableSet.
Single drawables can't be registered anymore.
2014-08-13 22:45:37 +02:00
3c0e460a23 Fixes for the Raspberry Pi build.
The slowness problem is still there.
2014-08-07 11:29:04 +02:00
6cf749c82c Add the call to bcm_host_init/deinit() on raspberry pi. 2014-08-06 21:04:57 +02:00
0d2f584229 Print the video driver name. 2014-08-06 18:04:15 +02:00
5941e0af56 Chose the renderer driver instead of passing -1 (default). 2014-08-06 17:44:28 +02:00
d5d75b034e Generate new platforms as you climb.
This is actually broken as platforms never unregister themselves. An upcoming
refactoring will change things, so registering/unregistering will not be
necessary anymore.
2014-08-06 16:04:17 +02:00