Subversion Repositories spk

Rev

Rev 52 | Rev 68 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52 Rev 58
Line 1505... Line 1505...
1505
		}
1505
		}
1506
	}
1506
	}
1507
 
1507
 
1508
	if ( cuts.empty() ) return;
1508
	if ( cuts.empty() ) return;
1509
 
1509
 
1510
	if ( !pVfs->ExtractGameFile("types/CutData.pck", "tmp") ) return;
1510
	if ( pVfs->ExtractGameFile("types/CutData.pck", "tmp").empty() ) return;
1511
	
1511
	
1512
	CFileIO File("tmp");
1512
	CFileIO File("tmp");
1513
	if ( !File.exists() ) return;
1513
	if ( !File.exists() ) return;
1514
	
1514
	
1515
	CyStringList *lines = File.ReadLinesStr();
1515
	CyStringList *lines = File.ReadLinesStr();
Line 1547... Line 1547...
1547
void CXspFile::extractDummies(CVirtualFileSystem *pVfs, CyStringList *sceneModels, bool add)
1547
void CXspFile::extractDummies(CVirtualFileSystem *pVfs, CyStringList *sceneModels, bool add)
1548
{
1548
{
1549
	if ( !sceneModels ) return;
1549
	if ( !sceneModels ) return;
1550
 
1550
 
1551
	bool extracted = false;
1551
	bool extracted = false;
1552
	if ( pVfs->ExtractGameFile("types/dummies.pck", "tmp") ) {
1552
	if ( !pVfs->ExtractGameFile("types/dummies.pck", "tmp").empty() ) {
1553
		CFileIO File("tmp");
1553
		CFileIO File("tmp");
1554
		if ( File.exists() )
1554
		if ( File.exists() )
1555
		{
1555
		{
1556
			Utils::String section;
1556
			Utils::String section;
1557
			int secCount = 0;
1557
			int secCount = 0;
Line 1606... Line 1606...
1606
}
1606
}
1607
 
1607
 
1608
void CXspFile::extractComponants(CVirtualFileSystem *pVfs, CyStringList *sceneModels)
1608
void CXspFile::extractComponants(CVirtualFileSystem *pVfs, CyStringList *sceneModels)
1609
{
1609
{
1610
	if ( !sceneModels ) return;
1610
	if ( !sceneModels ) return;
1611
	if ( pVfs->ExtractGameFile("types/components.pck", "tmp") )
1611
	if ( !pVfs->ExtractGameFile("types/components.pck", "tmp").empty() )
1612
	{
1612
	{
1613
		CFileIO File("tmp");
1613
		CFileIO File("tmp");
1614
		if ( File.exists() )
1614
		if ( File.exists() )
1615
		{
1615
		{
1616
			Utils::String file;
1616
			Utils::String file;
Line 1882... Line 1882...
1882
	return false;
1882
	return false;
1883
}
1883
}
1884
 
1884
 
1885
bool CXspFile::extractCockpits(CVirtualFileSystem *pVfs)
1885
bool CXspFile::extractCockpits(CVirtualFileSystem *pVfs)
1886
{
1886
{
1887
	if ( pVfs->ExtractGameFile("types/TCockpits.pck", "tmp") ) {
1887
	if ( !pVfs->ExtractGameFile("types/TCockpits.pck", "tmp").empty() ) {
1888
		bool ret = this->ImportCockpits("tmp");
1888
		bool ret = this->ImportCockpits("tmp");
1889
		CFileIO::Remove("tmp");
1889
		CFileIO::Remove("tmp");
1890
 
1890
 
1891
		return ret;
1891
		return ret;
1892
	}
1892
	}
Line 1896... Line 1896...
1896
 
1896
 
1897
bool CXspFile::extractBodies(CVirtualFileSystem *pVfs, CyStringList *sceneModels)
1897
bool CXspFile::extractBodies(CVirtualFileSystem *pVfs, CyStringList *sceneModels)
1898
{
1898
{
1899
	if ( !sceneModels ) return false;
1899
	if ( !sceneModels ) return false;
1900
 
1900
 
1901
	if ( pVfs->ExtractGameFile("types/Bodies.pck", "tmp") ) {
1901
	if ( !pVfs->ExtractGameFile("types/Bodies.pck", "tmp").empty() ) {
1902
		bool ret = this->ImportBodies(sceneModels, "tmp");
1902
		bool ret = this->ImportBodies(sceneModels, "tmp");
1903
		CFileIO::Remove("tmp");
1903
		CFileIO::Remove("tmp");
1904
 
1904
 
1905
		return ret;
1905
		return ret;
1906
	}
1906
	}