1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

fix pcb_reader not exporting terrain in composite zone objects

This commit is contained in:
NotAdam 2019-01-26 15:19:54 +11:00
parent 83eeacb1ce
commit 80c06a76b4
2 changed files with 10 additions and 11 deletions

View file

@ -32,7 +32,7 @@
// garbage to ignore models // garbage to ignore models
bool noObj = false; 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; std::unordered_map< uint16_t, std::string > zoneNameMap;
uint32_t zoneId; uint32_t zoneId;
@ -325,6 +325,7 @@ int main( int argc, char* argv[] )
buildModelEntry( pPcbFile, exportedTerrainGroup, fileName, zoneName ); buildModelEntry( pPcbFile, exportedTerrainGroup, fileName, zoneName );
} }
exportMgr.exportGroup( zoneName, exportedTerrainGroup, ( ExportFileType )exportFileType ); exportMgr.exportGroup( zoneName, exportedTerrainGroup, ( ExportFileType )exportFileType );
exportedZone.groups.emplace( zoneName, exportedTerrainGroup );
for( const auto& lgb : lgbList ) for( const auto& lgb : lgbList )
{ {
@ -393,10 +394,10 @@ int main( int argc, char* argv[] )
} }
} }
exportMgr.exportGroup( zoneName, exportedGroup, ( ExportFileType )exportFileType ); 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", 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", printf( "Finished all tasks in %lu seconds\n",
std::chrono::duration_cast< std::chrono::seconds >( std::chrono::high_resolution_clock::now() - startTime ).count() ); std::chrono::duration_cast< std::chrono::seconds >( std::chrono::high_resolution_clock::now() - startTime ).count() );
getchar();
delete eData; delete eData;
delete data1; delete data1;

View file

@ -20,14 +20,14 @@ public:
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
auto dir = currPath + "/" + zone.name + "/"; auto dir = currPath + "/pcb_export/" + zone.name + "/";
auto fileName = dir + "/" + zone.name + ".obj"; auto fileName = dir + zone.name + ".obj";
std::error_code e; std::error_code e;
if( !std::experimental::filesystem::exists( dir, 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() ); printf( "Unable to create directory '%s'", ( dir ).c_str() );
return; return;
@ -61,13 +61,13 @@ public:
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
auto dir = currPath + "/" + zoneName + "/"; auto dir = currPath + "/pcb_export/" + zoneName + "/groups/";
auto fileName = dir + "/" + group.name + ".obj"; auto fileName = dir + group.name + ".obj";
std::error_code e; std::error_code e;
if( !std::experimental::filesystem::exists( dir, 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() ); printf( "Unable to create directory '%s'", ( dir ).c_str() );
return; return;