Commit graph

36 commits

Author SHA1 Message Date
e8584d87fa Merge HalfDiamond into Diamond, store ctor parameters.
Also added unit test.
2015-08-17 23:14:08 +02:00
83963e67ea Start implementing pixel conversions as classes. WiP. 2015-08-17 17:36:45 +02:00
42da727a67 Add unit test for AsciiMapSource and fix issues. 2015-08-17 00:41:21 +02:00
78312526ac Get game to build again. 2015-08-16 22:29:34 +02:00
d815b394ea Move code that doesn't need to be templated to another class. 2015-06-28 19:11:21 +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
0dada705aa Build time implementation of tiger hash; result is wrong WiP 2015-06-21 02:42:52 +02:00
dba88117e4 Use build time strings for pretty function names if supported.
This doesn't really do much until I have build time hashing.
2015-06-09 00:00:41 +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
d21a567fb7 Progress implementing TylerMapSource. 2015-06-06 14:37:54 +02:00
f54da89531 Uneeded property. 2015-06-06 14:23:26 +02:00
ab6ef6c338 BaseMapSource doesn't need to know T. Only fetch() will need that. 2015-06-06 14:23:21 +02:00
12db1d9638 Clean up and handle endianness. 2015-06-04 20:59:07 +02:00
f1a6cac62b Start implementing the tyler map loader.
Untented and incomplete.
2015-05-29 00:15: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
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
eaca77c2de Crash fix - throw if file can't be opened 2015-01-08 12:44:36 +01:00
8ead404ee8 Support hex digits in the raw tile reader. 2015-01-07 15:07:11 +01: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
d5c199f3b9 Fix in asciimapsource 2014-12-29 16:14:36 +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
9aa245caca Detect ARM architectures better.
Also improved report, and added partial detection for endianness.
This has only been tested on ARMv7l/gcc so far.
2014-12-17 17:47:48 +01:00
a7b321feb3 Preproc symbols to detect architecture/os.
For details see: http://sourceforge.net/p/predef/wiki/Home/
Symbol SAILFISHOS is untested and likely has to be passed to the
compiler from the outside.
2014-12-15 23:24:00 +01:00
7bf96669a5 I can iterate through tiles using viewports. 2014-12-14 16:28:42 +01:00
e17f77ae05 Spirit parser to load simple 2D maps. 2014-12-13 04:50:23 +01:00
0da607ab3d Progressing with the implementation 2014-12-12 20:04:48 +01:00
9086de8dae Advancing with the implementation.
The iterator is not included anywhere yet so it's completely untested.
Next step is to define the relationship between views and layers, so iterators can be put
into the class that will be responsible to spawn them.
2014-12-11 23:58:52 +01:00
1e5f4fd2f0 Adding the concept of layers.
Deferring the data loading task to lower level classes.
test_tiler removed as Tyler won't require the user to derive from it anymore.
2014-12-09 23:53:09 +01:00
e63aebe6e1 Some changes and the build is fine again.
This is a test version, design is still in progress.
2014-12-09 22:30:06 +01:00
f9e249a972 Buildfix and reorder of files 2014-09-02 16:41:21 +02:00
4908096a44 First import 2014-08-27 16:03:56 +02:00