Veinlook only needs base maps now.

develop
Petr Mrázek 2011-02-15 01:14:44 +01:00
parent 2d28d1aaf9
commit 4ead59e698
1 changed files with 35 additions and 19 deletions

@ -549,7 +549,6 @@ main(int argc, char *argv[])
{ {
pDF = DF = DFMgr.getSingleContext(); pDF = DF = DFMgr.getSingleContext();
DF->Attach(); DF->Attach();
Mats = DF->getMaterials();
Maps = DF->getMaps(); Maps = DF->getMaps();
} }
catch (exception& e) catch (exception& e)
@ -560,6 +559,15 @@ main(int argc, char *argv[])
#endif #endif
finish(0); finish(0);
} }
bool hasmats = true;
try
{
Mats = DF->getMaterials();
}
catch (exception& e)
{
hasmats = false;
}
Process* p = DF->getProcess(); Process* p = DF->getProcess();
// init the map // init the map
@ -568,23 +576,28 @@ main(int argc, char *argv[])
error = "Can't find a map to look at."; error = "Can't find a map to look at.";
finish(0); finish(0);
} }
Maps->getSize(x_max_a,y_max_a,z_max_a); Maps->getSize(x_max_a,y_max_a,z_max_a);
x_max = x_max_a; x_max = x_max_a;
y_max = y_max_a; y_max = y_max_a;
z_max = z_max_a; z_max = z_max_a;
bool hasimats = 1; bool hasimats = false;
bool hascmats = 1; bool hascmats = false;
// get stone matgloss mapping if(hasmats)
if(!Mats->ReadInorganicMaterials())
{
hasimats = 0;
}
if(!Mats->ReadCreatureTypes())
{ {
hascmats = 0;
hascmats = true;
// get stone matgloss mapping
if(Mats->ReadInorganicMaterials())
{
hasimats = true;
}
if(Mats->ReadCreatureTypes())
{
hascmats = true;
}
} }
/* /*
// get region geology // get region geology
@ -726,14 +739,17 @@ main(int argc, char *argv[])
DF->Suspend(); DF->Suspend();
// restart cleared modules // restart cleared modules
Maps->Start(); Maps->Start();
Mats->Start(); if(hasmats)
if(hasimats)
{ {
Mats->ReadInorganicMaterials(); Mats->Start();
} if(hasimats)
if(hascmats) {
{ Mats->ReadInorganicMaterials();
Mats->ReadCreatureTypes(); }
if(hascmats)
{
Mats->ReadCreatureTypes();
}
} }
uint32_t effectnum; uint32_t effectnum;
/* /*