mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 10:20:04 +00:00 
			
		
		
		
	Add ability to load new LDM records into preexisting Ar2vFile objects for L2 chunks
This commit is contained in:
		
							parent
							
								
									f0ef6b35dd
								
							
						
					
					
						commit
						05335fad84
					
				
					 2 changed files with 23 additions and 0 deletions
				
			
		|  | @ -53,6 +53,9 @@ public: | |||
|    bool LoadFile(const std::string& filename); | ||||
|    bool LoadData(std::istream& is); | ||||
| 
 | ||||
|    bool LoadLDMRecords(std::istream& is); | ||||
|    bool IndexFile(); | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<Ar2vFileImpl> p; | ||||
| }; | ||||
|  |  | |||
|  | @ -519,5 +519,25 @@ void Ar2vFileImpl::IndexFile() | |||
|    } | ||||
| } | ||||
| 
 | ||||
| bool Ar2vFile::LoadLDMRecords(std::istream& is) { | ||||
|    size_t decompressedRecords = p->DecompressLDMRecords(is); | ||||
|    if (decompressedRecords == 0) | ||||
|    { | ||||
|       p->ParseLDMRecord(is); | ||||
|    } | ||||
|    else | ||||
|    { | ||||
|       p->ParseLDMRecords(); | ||||
|    } | ||||
| 
 | ||||
|    return true; | ||||
| } | ||||
| 
 | ||||
| bool Ar2vFile::IndexFile() | ||||
| { | ||||
|    p->IndexFile(); | ||||
|    return true; | ||||
| } | ||||
| 
 | ||||
| } // namespace wsr88d
 | ||||
| } // namespace scwx
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak