Commit Graph

32 Commits

Author SHA1 Message Date
King_DuckZ 6b3cb59bc2 Fix collision right-/downwards.
It still glitches when walking diagonally.
2018-03-05 10:35:48 +00:00
King_DuckZ 9da16ca82d Assert that tile calculation is correct. 2018-03-05 10:35:15 +00:00
King_DuckZ 6861329ab9 Rename for_each_voxel to for_each_cell. 2018-03-05 10:34:41 +00:00
King_DuckZ 5bccef1f4f Add print statements to hopefully help with debugging. 2018-03-01 23:19:42 +00:00
King_DuckZ 89f7d5c948 I think this should return 1, not 0.
Like this, I can loop over the column/row facing
the collision side, ie for z = tile; z < tile + len.
2018-03-01 23:19:27 +00:00
King_DuckZ ea5bbb8673 Update copyright to 2018 2018-02-28 10:38:37 +00:00
King_DuckZ 57bd1cfefc Temporary, just for the sake of testing collision. 2017-11-06 20:40:24 +00:00
King_DuckZ 94080546e5 Broken implementation of collision code.
I'm trying to get it working.
2017-11-06 20:40:03 +00:00
King_DuckZ 37f7964388 Fix build error about SDL_platform.h not found. 2017-10-24 20:25:01 +01:00
King_DuckZ ee3a17fd13 Make method const 2017-10-24 10:45:40 +01:00
King_DuckZ 7783cb8e5e Refactor moving logic out from Character into a new class. 2017-07-31 09:56:49 +01:00
King_DuckZ 84e7ca952e buildfix 2017-07-24 10:03:43 +01:00
King_DuckZ b3e7f3ac1c Import tmxlite. 2017-07-24 01:26:05 +01:00
King_DuckZ 64969766d9 Try to make collision work - WiP 2017-07-24 01:19:06 +01:00
King_DuckZ 40967784a3 Add parameter to skip the callback on the first tile.
For example if you are going from tile 1,1 to 1,2 you would get
two notifications if parInclFirst==true, one for 1,1 and one for
1,2. If parInclFirst==false, then you will only get a notification
for 1,2. Note that if the segment passed to to
for_each_voxel_under_segment() is too short and doesn't span over
the initial tile, passing parInclFirst==false will discard the
only callback you would normally get. Effectively this can be used
for a sort of "on tile changed" notification.
2017-07-23 16:22:04 +01:00
King_DuckZ 084c4d64da Fix the assert triggering sometimes in the raytrace grid traversal. 2017-07-23 04:37:25 +01:00
King_DuckZ 1eeb944e68 Make Debug only available in debug builds. 2017-03-17 20:08:12 +00:00
King_DuckZ 3a05564be9 Add missing include. 2017-03-17 19:52:42 +00:00
King_DuckZ d96dbb9fe8 Update vectorwrapper.
Also make the necessary changes to fix the build after the update.
2017-03-17 00:30:34 +00:00
King_DuckZ be56c55e3e Add a layer for game characters. 2017-03-15 21:58:51 +00:00
King_DuckZ b60bbf3739 Add background layer from IngameScene, not the base class. 2017-03-15 21:58:24 +00:00
King_DuckZ 9428e63fc2 Layers are now named, so code can request a layer by name. 2017-03-15 21:48:27 +00:00
King_DuckZ 7a391c5743 Character draws itself. 2017-03-15 09:14:22 +00:00
King_DuckZ 2d05fd03db Assert that raytracing is going to finish at some point. 2017-03-15 09:13:13 +00:00
King_DuckZ d9a943ee4a Add DrawingQueue class.
Big do-it-all commit. Work on this is not finished and there
are a few changes that need to be undone. A bit messy but
that's how it is :/
2017-03-15 09:12:16 +00:00
King_DuckZ 15e874f0fe Move texture-related code out from Character class. 2017-03-11 12:22:40 +00:00
King_DuckZ 0560affdf9 Import clooneljump as a subproject.
Remove manually copy-pasted files taken from cloonelgraphics and
use the up-to-date version from the submodule instead.
2017-03-11 08:22:23 +00:00
King_DuckZ c30fe3012c Remove fsgn() which is now unnecessary. 2017-02-10 19:26:46 +00:00
King_DuckZ ff91bbbc71 Fix code so raytrace test now passes. 2017-02-10 19:24:44 +00:00
King_DuckZ 80d0e1c336 Add test for intersection and fix data in raytracer test. 2017-02-10 15:40:26 +00:00
King_DuckZ 413ff4e558 Expose private functions in grid_raytrace for unit testing. 2017-02-09 19:31:38 +00:00
King_DuckZ 47aa9f2948 Move everything into a shared lib so unit test can access stuff. 2017-02-09 18:11:09 +00:00