/* Copyright 2015, Michele Santullo * This file is part of DoorKeeper. * * DoorKeeper is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * DoorKeeper is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with DoorKeeper. If not, see . */ #include "doorkeeper/doorkeeper2d.hpp" #include "doorkeeper/helpers/maploader.hpp" #include "doorkeeper/helpers/asciimapsource.hpp" #include "doorkeeper/helpers/typename_native.hpp" #include "gameConfig.h" #include int main() { using dk::Tyler2d; using dk::coords2; using dk::Viewport2d; using dk::Layer2d; typedef dkh::MapLoaderPool2d> 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)); }; dkh::PushLayerMapType<2> pushers; pushers.insert(std::make_pair(dk::type_name_hash(), &Tyler2d::push_layer_void)); Tyler2d tiler(dkh::call_map_load(pool, std::string("test_level.dk"), pushers)); return 0; }