Add pauses for windows and fix some small issues

develop
Jared Adams 2011-05-01 03:11:42 -06:00
parent 17bea1052a
commit 588860ce74
1 changed files with 21 additions and 8 deletions

@ -93,6 +93,9 @@ int main(int argc, char *argv[])
if (!context->Attach()) if (!context->Attach())
{ {
std::cerr << "Unable to attach to DF!" << std::endl; std::cerr << "Unable to attach to DF!" << std::endl;
#ifndef LINUX_BUILD
std::cin.ignore();
#endif
return 1; return 1;
} }
@ -101,7 +104,10 @@ int main(int argc, char *argv[])
{ {
std::cerr << "Cannot get map info!" << std::endl; std::cerr << "Cannot get map info!" << std::endl;
context->Detach(); context->Detach();
return -1; #ifndef LINUX_BUILD
std::cin.ignore();
#endif
return 1;
} }
maps->getSize(x_max, y_max, z_max); maps->getSize(x_max, y_max, z_max);
MapExtras::MapCache map(maps); MapExtras::MapCache map(maps);
@ -111,13 +117,15 @@ int main(int argc, char *argv[])
{ {
std::cerr << "Unable to read inorganic material definitons!" << std::endl; std::cerr << "Unable to read inorganic material definitons!" << std::endl;
context->Detach(); context->Detach();
return -1; #ifndef LINUX_BUILD
std::cin.ignore();
#endif
return 1;
} }
if (!mats->ReadOrganicMaterials()) if (showPlants && !mats->ReadOrganicMaterials())
{ {
std::cerr << "Unable to read organic material definitons!" << std::endl; std::cerr << "Unable to read organic material definitons; plants won't be listed!" << std::endl;
context->Detach(); showPlants = false;
return -1;
} }
FeatureList globalFeatures; FeatureList globalFeatures;
@ -345,5 +353,10 @@ int main(int argc, char *argv[])
mats->Finish(); mats->Finish();
maps->Finish(); maps->Finish();
context->Detach(); context->Detach();
#ifndef LINUX_BUILD
std::cout << " Press any key to finish.";
std::cin.ignore();
#endif
std::cout << std::endl;
return 0; return 0;
} }