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.
This commit is contained in:
King_DuckZ 2014-12-11 23:58:52 +01:00
parent cce2da8bd7
commit 9086de8dae
8 changed files with 95 additions and 16 deletions

View file

@ -5,12 +5,12 @@
int main() {
typedef dk::Tyler<2> Tiler;
typedef std::unique_ptr<std::ifstream> ifstreamptr;
Tiler tiler(Tiler::coords(200, 150));
Tiler tiler(Tiler::coords(200, 150), Tiler::coords(64));
tiler.push_layer<int>(
dk::Layer<int, 2>::streamer_type(std::unique_ptr<std::ifstream>(new std::ifstream("test.map")))
);
tiler.push_layer<int>(dk::Layer<int, 2>::streamer_type(ifstreamptr(new std::ifstream("test.map"))));
tiler.push_layer<char>(dk::Layer<char, 2>::streamer_type(ifstreamptr(new std::ifstream("test_2.map"))));
#if !defined(NDEBUG)
std::cout << "Map size: " << tiler.map_size() << '\n';