Subversion Repositories spk

Rev

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

Rev 248 Rev 264
Line 29... Line 29...
29
		m_iSelectedGame = -1;
29
		m_iSelectedGame = -1;
30
 
30
 
31
		this->Closing += gcnew CancelEventHandler(this, &PackageForm::PackageForm_Closing);
31
		this->Closing += gcnew CancelEventHandler(this, &PackageForm::PackageForm_Closing);
32
 
32
 
33
		_pPackages = new CPackages();
33
		_pPackages = new CPackages();
34
		_pPackages->startup(L".", L".", L".");
34
		_pPackages->startup(L".", _WS(IO::Path::GetTempPath()), _WS(Environment::GetFolderPath(Environment::SpecialFolder::Personal)));
35
		m_pPackage = NULL;
35
		m_pPackage = NULL;
36
		m_pTypeList = new Utils::WStringList;
36
		m_pTypeList = new Utils::WStringList;
37
 
37
 
38
		this->ComboShipPart->SelectedIndex = 0;
38
		this->ComboShipPart->SelectedIndex = 0;
39
 
39
 
Line 1711... Line 1711...
1711
		
1711
		
1712
		if ( String::Compare(IO::FileInfo(file).Extension, ".pck") == 0 )
1712
		if ( String::Compare(IO::FileInfo(file).Extension, ".pck") == 0 )
1713
		{
1713
		{
1714
			C_File F(_WS(file));
1714
			C_File F(_WS(file));
1715
			F.UnPCKFile();
1715
			F.UnPCKFile();
1716
			if ( F.writeToFile(CPackages::tempDirectory() + L"tmp.dat"))
1716
			if ( F.writeToFile(CPackages::tempDirectory() + L"/tmp.dat"))
1717
				return _US(CPackages::tempDirectory() + L"tmp.dat");
1717
				return _US(CPackages::tempDirectory() + L"/tmp.dat");
1718
		}
1718
		}
1719
		else if ( String::Compare(IO::FileInfo(file).Extension, ".cat") == 0 )
1719
		else if ( String::Compare(IO::FileInfo(file).Extension, ".cat") == 0 )
1720
		{
1720
		{
1721
			CCatFile cat;
1721
			CCatFile cat;
1722
			if ( cat.open(_WS(file), L"", CATREAD_CATDECRYPT, false) == CATERR_NONE )
1722
			if ( cat.open(_WS(file), L"", CATREAD_CATDECRYPT, false) == CATERR_NONE )
1723
			{
1723
			{
1724
				if ( cat.extractFile(_WS("types\\" + type + L".pck"), CPackages::tempDirectory() + L"tmp.dat"))
1724
				if ( cat.extractFile(_WS("types\\" + type + L".pck"), CPackages::tempDirectory() + L"/tmp.dat"))
1725
					return _US(CPackages::tempDirectory() + L"tmp.dat");
1725
					return _US(CPackages::tempDirectory() + L"/tmp.dat");
1726
			}
1726
			}
1727
		}
1727
		}
1728
 
1728
 
1729
		return "";
1729
		return "";
1730
	}
1730
	}