2014-12-12 20:04:48 +01:00
|
|
|
#include "doorkeeper.hpp"
|
|
|
|
#include "doorkeeperConfig.h"
|
2014-08-27 16:03:56 +02:00
|
|
|
#include <iostream>
|
2014-12-09 23:53:09 +01:00
|
|
|
#include <fstream>
|
|
|
|
#include <memory>
|
2014-08-27 16:03:56 +02:00
|
|
|
|
|
|
|
int main() {
|
2014-12-09 23:53:09 +01:00
|
|
|
typedef dk::Tyler<2> Tiler;
|
2014-12-11 23:58:52 +01:00
|
|
|
typedef std::unique_ptr<std::ifstream> ifstreamptr;
|
2014-12-09 22:30:06 +01:00
|
|
|
|
2014-12-12 20:04:48 +01:00
|
|
|
Tiler tiler(Tiler::coords(8, 6), Tiler::coords(64));
|
|
|
|
|
|
|
|
auto bottom_layer = &tiler.push_layer<int>(dk::Layer<int, 2>::streamer_type(ifstreamptr(new std::ifstream(DATA_PATH"test.map"))));
|
|
|
|
tiler.push_layer<char>(dk::Layer<char, 2>::streamer_type(ifstreamptr(new std::ifstream(DATA_PATH"test_2.map"))));
|
2014-12-09 23:53:09 +01:00
|
|
|
|
2014-12-12 20:04:48 +01:00
|
|
|
{
|
|
|
|
auto ittest = bottom_layer->begin();
|
|
|
|
for (int z = 0; z < 10; ++z) {
|
|
|
|
#if !defined(NDEBUG)
|
|
|
|
std::cout << "At tile " << ittest.position() << " value " << *ittest << '\n';
|
|
|
|
#endif
|
|
|
|
++ittest;
|
|
|
|
}
|
|
|
|
}
|
2014-12-09 23:53:09 +01:00
|
|
|
|
|
|
|
#if !defined(NDEBUG)
|
|
|
|
std::cout << "Map size: " << tiler.map_size() << '\n';
|
|
|
|
#endif
|
|
|
|
std::cout << "Total tiles: " << tiler.tiles_count() << '\n';
|
2014-08-27 16:03:56 +02:00
|
|
|
return 0;
|
|
|
|
}
|