TrinityCore
VMapAssembler.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include <string>
19#include <iostream>
20
21#include "TileAssembler.h"
22#include "Banner.h"
23#include "Locales.h"
24#include "Util.h"
25
26int main(int argc, char* argv[])
27{
29
31
32 Trinity::Banner::Show("VMAP assembler", [](char const* text) { std::cout << text << std::endl; }, nullptr);
33
34 std::string src = "Buildings";
35 std::string dest = "vmaps";
36
37 if (argc > 3)
38 {
39 std::cout << "usage: " << argv[0] << " <raw data dir> <vmap dest dir>" << std::endl;
40 return 1;
41 }
42 else
43 {
44 if (argc > 1)
45 src = argv[1];
46 if (argc > 2)
47 dest = argv[2];
48 }
49
50 std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl;
51
52 VMAP::TileAssembler* ta = new VMAP::TileAssembler(src, dest);
53
54 if (!ta->convertWorld2())
55 {
56 std::cout << "exit with errors" << std::endl;
57 delete ta;
58 return 1;
59 }
60
61 delete ta;
62 std::cout << "Ok, all done" << std::endl;
63 return 0;
64}
int main(int argc, char *argv[])
TC_COMMON_API void Show(char const *applicationName, void(*log)(char const *text), void(*logExtraInfo)())
Definition: Banner.cpp:22
TC_COMMON_API void Init()
Definition: Locales.cpp:28
TC_COMMON_API void VerifyOsVersion()
Definition: Util.cpp:34