DoorKeeper/game/main.cpp
King_DuckZ 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

21 lines
816 B
C++

#include "doorkeeper/doorkeeper2d.hpp"
#include "doorkeeper/helpers/maploader.hpp"
#include "doorkeeper/helpers/asciimapsource.hpp"
#include "gameConfig.h"
#include <iostream>
int main() {
using dk::Tyler2d;
using dk::coords2;
using dk::Viewport2d;
using dk::Layer2d;
typedef dkh::MapLoaderPool2d<int, std::function<dk::BaseMapSource2d<int>*(const std::string&)>> IntPoolType;
std::cout << "Welcome to " GAME_NAME " v" << GAME_VER_MAJOR << '.' << GAME_VER_MINOR << '.' << GAME_VER_PATCH << '\n';
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)); };
Tyler2d tiler(dkh::call_map_load(pool, std::string("test_level.dk")));
return 0;
}