mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:26:43 +00:00 
			
		
		
		
	Cleaned up niftest's output
A bad file inside of a bsa archive now looks like: <game dir>/Data Files/TR_Data.bsa/meshes/tr/x/tr_act_ind_mark_alm.nif
This commit is contained in:
		
							parent
							
								
									8b48fe1cad
								
							
						
					
					
						commit
						28bc0cca6c
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		|  | @ -45,6 +45,7 @@ bool isBSA(std::string filename) | |||
| 
 | ||||
| /// Check all the nif files in a given VFS::Archive
 | ||||
| /// \note Takes ownership!
 | ||||
| /// \note Can not read a bsa file inside of a bsa file.
 | ||||
| void readVFS(VFS::Archive* anArchive,std::string archivePath = "") | ||||
| { | ||||
|     VFS::Manager myManager(true); | ||||
|  | @ -60,15 +61,15 @@ void readVFS(VFS::Archive* anArchive,std::string archivePath = "") | |||
|             if(isNIF(name)) | ||||
|             { | ||||
|             //           std::cout << "Decoding: " << name << std::endl;
 | ||||
|                 Nif::NIFFile temp_nif(myManager.get(name),name); | ||||
|                 Nif::NIFFile temp_nif(myManager.get(name),archivePath+name); | ||||
|             } | ||||
|             else if(isBSA(name)) | ||||
|             { | ||||
|                 if(!archivePath.empty()) | ||||
|                 if(!archivePath.empty() && !isBSA(archivePath)) | ||||
|                 { | ||||
|                     std::cout << "Reading BSA File: " << name << std::endl; | ||||
|                     readVFS(new VFS::BsaArchive(archivePath+name)); | ||||
|                     std::cout << "Done with BSA File: " << name << std::endl; | ||||
| //                     std::cout << "Reading BSA File: " << name << std::endl;
 | ||||
|                     readVFS(new VFS::BsaArchive(archivePath+name),archivePath+name+"/"); | ||||
| //                     std::cout << "Done with BSA File: " << name << std::endl;
 | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | @ -129,7 +130,7 @@ int main(int argc, char **argv) | |||
| { | ||||
|     std::vector<std::string> files = parseOptions (argc, argv); | ||||
| 
 | ||||
|     std::cout << "Reading Files" << std::endl; | ||||
| //     std::cout << "Reading Files" << std::endl;
 | ||||
|     for(std::vector<std::string>::const_iterator it=files.begin(); it!=files.end(); ++it) | ||||
|     { | ||||
|          std::string name = *it; | ||||
|  | @ -142,12 +143,12 @@ int main(int argc, char **argv) | |||
|              } | ||||
|              else if(isBSA(name)) | ||||
|              { | ||||
|                 std::cout << "Reading BSA File: " << name << std::endl; | ||||
| //                 std::cout << "Reading BSA File: " << name << std::endl;
 | ||||
|                 readVFS(new VFS::BsaArchive(name)); | ||||
|              } | ||||
|              else if(bfs::is_directory(bfs::path(name))) | ||||
|              { | ||||
|                 std::cout << "Reading All Files in: " << name << std::endl; | ||||
| //                 std::cout << "Reading All Files in: " << name << std::endl;
 | ||||
|                 readVFS(new VFS::FileSystemArchive(name),name); | ||||
|              } | ||||
|              else | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue