Commit graph

36 commits

Author SHA1 Message Date
4d8cbc4085 Fix test names, fix build in tilecoordinates.
I'm not sure the functions will still return the correct screen
coordinates. For now it builds, I will add tests in the next commits.
2015-08-17 13:36:47 +02:00
42da727a67 Add unit test for AsciiMapSource and fix issues. 2015-08-17 00:41:21 +02:00
b01fad0314 Buildfix in tileiterator + unit test. 2015-08-16 20:33:44 +02:00
cb9e4bce19 Add to_index() function to convert coords to scalar. 2015-08-16 20:32:58 +02:00
a1996b2d75 Add implementation for operator-= 2015-08-16 16:34:32 +02:00
28fc001540 Get += operator to work with negative numbers. 2015-08-15 23:52:37 +02:00
e3345c5cca Finish implementing operator+= for positive offsets. 2015-08-14 22:13:14 +02:00
dbdc814049 Try mplementing operator+= (broken but almost there). 2015-08-14 18:18:43 +02:00
9ea9743e95 Don't get confused with the wrong overload when passed a Vec. 2015-08-14 12:56:40 +02:00
b2095603d1 Add operators for scalar types and fix wrong operator<= 2015-08-14 12:32:52 +02:00
cab7c296f1 Replace cloonel jump vector with vectorwrapper.
It's missing operators, so the build is broken.
2015-07-30 16:12:12 +02:00
ba82a2e066 Fix operator++ 2015-07-30 02:04:02 +02:00
971cd54688 Fix vector comparison and add unit test. 2015-07-30 01:48:29 +02:00
6aa4d15381 Add tilecoords and unit test.
Disable most projects because the build is broken. A lot.
2015-07-30 01:18:19 +02:00
5c736731db Import gtest 1.7.0 2015-07-30 01:14:41 +02:00
9f9ab65ff3 Add a way to use typename without relying on __PRETTY_FUNCTION__
This is now enabled by default in doorkeeper.
2015-06-28 01:23:01 +02:00
7140ee6b38 Buildfix on gcc 4.8 2015-06-24 23:05:33 +02:00
f1bcf8674d Implement the type_name() function. Only tested on gcc 5.1
Add Sprout library.
2015-06-24 22:13:48 +02:00
6a39b82e5e Fix the build time implementation of tiger hash.
Result for "message digest", "abc" and "" are correct.
2015-06-23 01:29:40 +02:00
caa0a683fb Test to verify the correctness of the bt tiger hash - to be reverted. 2015-06-22 09:25:48 +02:00
fd8a1cbabc Add a hash mechanism to BaseMapSource.
This is needed to recognize what type of tiles a layer contains.
Client code has to fill in a map of hash => add_layer<T>() pointers.
As a layer is loaded, the correct add_layer<T>() is called based
on the hash saved with the layer itself.
2015-06-07 03:57:18 +02:00
ab6ef6c338 BaseMapSource doesn't need to know T. Only fetch() will need that. 2015-06-06 14:23:21 +02:00
72b400ac0c Warning fix on clang. 2015-05-28 00:25:06 +02:00
a82e8c16f6 Helper recursive map loader.
Recursion not tested since the file format is not ready yet, sorry.
2015-05-28 00:20:40 +02:00
ea71478948 Refactoring in the data loading classes.
Lots of junk code removed, the architecture is now much simpler.
AsciiMapSource works as before.
2015-05-25 01:37:20 +02:00
1c5cb6299c Show diamond-shaped tiles on a larger map. 2015-05-24 17:19:10 +02:00
a9630341c7 Draw tiles. 2015-05-22 14:50:10 +02:00
a6eadb9c30 Some testing tiles. 2015-05-21 18:29:25 +02:00
20a7e0450d Buildfix.
Don't use surfaces, SDL2_image lets you create a texture
directly.
This is missing the graphic files that the code seeks to
load so it will not run.
2015-05-21 18:14:07 +02:00
bb7de4f4dd Make and SDL2 window and try to load some textures, untested 2015-05-21 09:54:59 +02:00
2d61a84c13 AsciiMapReader works on raw data, so it needs to know
the map size (2D only) from the outside.
2015-05-21 09:52:45 +02:00
7a8ffe2060 Public header files moved into the doorkeeper subdirectory 2015-01-06 16:38:52 +01:00
436d738620 Refactoring in map reading code - part 1/2
Fixed a bug when iterating over a view that was smaller than the map size
Added a class to abstract map readers
2015-01-05 18:01:28 +01:00
c9381a4585 Advancing in the design of Tyler.
Iterating through tiles in viewports now works fine.
You can pass in a custom device as the data source for the tile map.
2014-12-29 16:17:59 +01:00
931acf3293 2D ascii tile loader refactored out of TileStreamer.
This also adds a static lib part to DoorKeeper that will only contain helper functions.
2014-12-22 16:59:09 +01:00
59801755cc Some reordering in the directory.
This breaks the build.
2014-12-22 16:56:17 +01:00