-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIGNMapper.cpp
46 lines (35 loc) · 947 Bytes
/
IGNMapper.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <GL/glut.h>
#include <QApplication>
#include "argstream.h"
#include "config.h"
#include "MapGUIWindow.h"
#include "ScreenshotCollectionMapDB.h"
#include "QctMapDB.h"
#include "MapAccessor.h"
int main(int argc,char *argv[])
{
argstream as(argc,argv);
std::string qct_file;
as >> parameter('q',"qct",qct_file,"Qct IGN file",false)
>> help();
as.defaultErrorHandling();
glutInit(&argc,argv);
QApplication IGNMapperApp(argc,argv);
MapGUIWindow map_gui_win;
map_gui_win.show();
// now create the map
if(!qct_file.empty())
{
QctMapDB mapdb(QString::fromStdString(qct_file)) ;
MapAccessor ma(mapdb) ;
map_gui_win.setMapAccessor(ma);
return IGNMapperApp.exec();
}
else
{
ScreenshotCollectionMapDB mapdb(MAP_ROOT_DIRECTORY) ;
MapAccessor ma(mapdb) ;
map_gui_win.setMapAccessor(ma);
return IGNMapperApp.exec();
}
}