// // Author: Michael Cameron // Email: chronokun@hotmail.com // // Libraries Include #include "libraries.h" // Local Includes #include "mapparser.h" #include "planes.h" int main(const int _kiArgC, const char** _kppcArgv) { // Check we have correct number of parameters if(_kiArgC < 3) { return(3); } CMapParser Parser; const bool kbSuccess = Parser.LoadMap(_kppcArgv[1]); if(!kbSuccess) { return(1); } else { // Open output file std::ofstream OutFile; OutFile.open(_kppcArgv[2]); if(!OutFile.is_open()) { return(2); } OutFile << "{" << std::endl << "\"classname\" \"worldspawn\"" << std::endl; for(const TBrush& krBrush : Parser.m_WorldSpawn.m_Brushes) { OutFile << GetBrushString(krBrush); } OutFile << "}" << std::endl; } return(0); }