diff --git a/src/tools/pcb_reader/main.cpp b/src/tools/pcb_reader/main.cpp index bb90af0f..60befa41 100644 --- a/src/tools/pcb_reader/main.cpp +++ b/src/tools/pcb_reader/main.cpp @@ -32,7 +32,7 @@ // garbage to ignore models bool noObj = false; -std::string gamePath( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" ); +std::string gamePath( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" ); std::unordered_map< uint16_t, std::string > zoneNameMap; uint32_t zoneId; @@ -325,6 +325,7 @@ int main( int argc, char* argv[] ) buildModelEntry( pPcbFile, exportedTerrainGroup, fileName, zoneName ); } exportMgr.exportGroup( zoneName, exportedTerrainGroup, ( ExportFileType )exportFileType ); + exportedZone.groups.emplace( zoneName, exportedTerrainGroup ); for( const auto& lgb : lgbList ) { @@ -393,10 +394,10 @@ int main( int argc, char* argv[] ) } } exportMgr.exportGroup( zoneName, exportedGroup, ( ExportFileType )exportFileType ); - //exportedZone.groups.emplace( group.name, exportedGroup ); + exportedZone.groups.emplace( group.name, exportedGroup ); } } - //exportMgr.exportZone( exportedZone, ( ExportFileType )exportFileType ); + exportMgr.exportZone( exportedZone, ( ExportFileType )exportFileType ); printf( "Exported %s in %lu seconds \n", @@ -416,8 +417,6 @@ int main( int argc, char* argv[] ) printf( "Finished all tasks in %lu seconds\n", std::chrono::duration_cast< std::chrono::seconds >( std::chrono::high_resolution_clock::now() - startTime ).count() ); - getchar(); - delete eData; delete data1; diff --git a/src/tools/pcb_reader/obj_exporter.h b/src/tools/pcb_reader/obj_exporter.h index e1a35747..f5c1361b 100644 --- a/src/tools/pcb_reader/obj_exporter.h +++ b/src/tools/pcb_reader/obj_exporter.h @@ -20,14 +20,14 @@ public: auto start = std::chrono::high_resolution_clock::now(); - auto dir = currPath + "/" + zone.name + "/"; - auto fileName = dir + "/" + zone.name + ".obj"; + auto dir = currPath + "/pcb_export/" + zone.name + "/"; + auto fileName = dir + zone.name + ".obj"; std::error_code e; if( !std::experimental::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directory( dir, e ) ) + if( !std::experimental::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return; @@ -61,13 +61,13 @@ public: auto start = std::chrono::high_resolution_clock::now(); - auto dir = currPath + "/" + zoneName + "/"; - auto fileName = dir + "/" + group.name + ".obj"; + auto dir = currPath + "/pcb_export/" + zoneName + "/groups/"; + auto fileName = dir + group.name + ".obj"; std::error_code e; if( !std::experimental::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directory( dir, e ) ) + if( !std::experimental::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return;