2015-05-25 01:38:00 +02:00
|
|
|
#include "doorkeeper/doorkeeper2d.hpp"
|
2015-05-28 00:20:40 +02:00
|
|
|
#include "doorkeeper/helpers/maploader.hpp"
|
|
|
|
#include "doorkeeper/helpers/asciimapsource.hpp"
|
2015-06-28 01:23:01 +02:00
|
|
|
#include "doorkeeper/helpers/typename_native.hpp"
|
2015-05-25 01:38:00 +02:00
|
|
|
#include "gameConfig.h"
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
using dk::Tyler2d;
|
|
|
|
using dk::coords2;
|
|
|
|
using dk::Viewport2d;
|
|
|
|
using dk::Layer2d;
|
2015-06-07 03:57:18 +02:00
|
|
|
typedef dkh::MapLoaderPool2d<std::function<dk::BaseMapSource2d*(const std::string&)>> IntPoolType;
|
2015-05-25 01:38:00 +02:00
|
|
|
|
|
|
|
std::cout << "Welcome to " GAME_NAME " v" << GAME_VER_MAJOR << '.' << GAME_VER_MINOR << '.' << GAME_VER_PATCH << '\n';
|
|
|
|
|
2015-05-28 00:20:40 +02:00
|
|
|
IntPoolType pool;
|
|
|
|
pool.opener = [](const std::string& parName) { std::cout << "Opening " << parName << std::endl; return new dkh::AsciiMapSource(parName, coords2(10, 8), dk::MapType_IsometricStaggered, coords2(64, 64)); };
|
2015-06-07 03:57:18 +02:00
|
|
|
dkh::PushLayerMapType<2> pushers;
|
2015-06-24 22:13:48 +02:00
|
|
|
pushers.insert(std::make_pair(dk::type_name_hash<int>(), &Tyler2d::push_layer_void<int>));
|
2015-06-07 03:57:18 +02:00
|
|
|
Tyler2d tiler(dkh::call_map_load(pool, std::string("test_level.dk"), pushers));
|
2015-05-28 00:20:40 +02:00
|
|
|
|
2015-05-25 01:38:00 +02:00
|
|
|
return 0;
|
|
|
|
}
|