| Line 2013... |
Line 2013... |
| 2013 |
data = f->BobDecompile(&size);
|
2013 |
data = f->BobDecompile(&size);
|
| 2014 |
if ( !data || !size ) {
|
2014 |
if ( !data || !size ) {
|
| 2015 |
// search for the pbd or bod files that match and use them instead
|
2015 |
// search for the pbd or bod files that match and use them instead
|
| 2016 |
Utils::String file;
|
2016 |
Utils::String file;
|
| 2017 |
|
2017 |
|
| 2018 |
file = CFileIO(f->GetNameDirectory(NULL)).ChangeFileExtension("pbd").ToString();
|
2018 |
file = CFileIO(f->getNameDirectory(NULL)).changeFileExtension("pbd");
|
| 2019 |
file = pVfs->ExtractGameFile(file, CPackages::tempDirectory() + "tmp.tmp");
|
2019 |
file = pVfs->ExtractGameFile(file, CPackages::tempDirectory() + "tmp.tmp");
|
| 2020 |
|
2020 |
|
| 2021 |
if ( file.empty() ) {
|
2021 |
if ( file.empty() ) {
|
| 2022 |
file = CFileIO(f->GetNameDirectory(NULL)).ChangeFileExtension("bod").ToString();
|
2022 |
file = CFileIO(f->getNameDirectory(NULL)).changeFileExtension("bod");
|
| 2023 |
file = pVfs->ExtractGameFile(file, CPackages::tempDirectory() + "tmp.tmp");
|
2023 |
file = pVfs->ExtractGameFile(file, CPackages::tempDirectory() + "tmp.tmp");
|
| 2024 |
}
|
2024 |
}
|
| 2025 |
|
2025 |
|
| 2026 |
if ( !file.empty() ) {
|
2026 |
if ( !file.empty() ) {
|
| 2027 |
CFileIO File(file);
|
2027 |
CFileIO File(file);
|
| Line 2061... |
Line 2061... |
| 2061 |
}
|
2061 |
}
|
| 2062 |
|
2062 |
|
| 2063 |
for ( SStringList *node = lTextures.Head(); node; node = node->next )
|
2063 |
for ( SStringList *node = lTextures.Head(); node; node = node->next )
|
| 2064 |
{
|
2064 |
{
|
| 2065 |
CFileIO F(node->str);
|
2065 |
CFileIO F(node->str);
|
| 2066 |
if ( F.CheckFileExtension("fx") ) {
|
2066 |
if ( F.isFileExtension("fx") ) {
|
| 2067 |
/*
|
2067 |
/*
|
| 2068 |
if ( !pVfs->extractGameFileToPackage(this, "shader\\1_1\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
2068 |
if ( !pVfs->extractGameFileToPackage(this, "shader\\1_1\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
| 2069 |
pVfs->extractGameFileToPackage(this, "shader\\1_1\\" + CFileIO(node->str.ToString()).ChangeFileExtension("fb").ToString(), FILETYPE_SHIPOTHER);
|
2069 |
pVfs->extractGameFileToPackage(this, "shader\\1_1\\" + CFileIO(node->str.ToString()).ChangeFileExtension("fb").ToString(), FILETYPE_SHIPOTHER);
|
| 2070 |
if ( !pVfs->extractGameFileToPackage(this, "shader\\1_4\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
2070 |
if ( !pVfs->extractGameFileToPackage(this, "shader\\1_4\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
| 2071 |
pVfs->extractGameFileToPackage(this, "shader\\1_4\\" + CFileIO(node->str.ToString()).ChangeFileExtension("fb").ToString(), FILETYPE_SHIPOTHER);
|
2071 |
pVfs->extractGameFileToPackage(this, "shader\\1_4\\" + CFileIO(node->str.ToString()).ChangeFileExtension("fb").ToString(), FILETYPE_SHIPOTHER);
|
| Line 2087... |
Line 2087... |
| 2087 |
continue;
|
2087 |
continue;
|
| 2088 |
|
2088 |
|
| 2089 |
if ( pVfs->extractGameFileToPackage(this, "dds\\" + Utils::String(node->str.ToString()) + ".dds", FILETYPE_SHIPOTHER) )
|
2089 |
if ( pVfs->extractGameFileToPackage(this, "dds\\" + Utils::String(node->str.ToString()) + ".dds", FILETYPE_SHIPOTHER) )
|
| 2090 |
continue;
|
2090 |
continue;
|
| 2091 |
|
2091 |
|
| 2092 |
if ( pVfs->extractGameFileToPackage(this, "dds\\" + Utils::String(F.ChangeFileExtension("dds").ToString()), FILETYPE_SHIPOTHER) )
|
2092 |
if ( pVfs->extractGameFileToPackage(this, "dds\\" + Utils::String(F.changeFileExtension("dds")), FILETYPE_SHIPOTHER) )
|
| 2093 |
continue;
|
2093 |
continue;
|
| 2094 |
|
2094 |
|
| 2095 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
2095 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(node->str.ToString()), FILETYPE_SHIPOTHER) )
|
| 2096 |
continue;
|
2096 |
continue;
|
| 2097 |
|
2097 |
|
| Line 2099... |
Line 2099... |
| 2099 |
continue;
|
2099 |
continue;
|
| 2100 |
|
2100 |
|
| 2101 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(node->str.ToString()) + ".jpg", FILETYPE_SHIPOTHER) )
|
2101 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(node->str.ToString()) + ".jpg", FILETYPE_SHIPOTHER) )
|
| 2102 |
continue;
|
2102 |
continue;
|
| 2103 |
|
2103 |
|
| 2104 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(F.ChangeFileExtension("jpg").ToString()), FILETYPE_SHIPOTHER) )
|
2104 |
if ( pVfs->extractGameFileToPackage(this, "textures\\" + Utils::String(F.changeFileExtension("jpg")), FILETYPE_SHIPOTHER) )
|
| 2105 |
continue;
|
2105 |
continue;
|
| 2106 |
}
|
2106 |
}
|
| 2107 |
}
|
2107 |
}
|
| 2108 |
}
|
2108 |
}
|
| 2109 |
|
2109 |
|
| 2110 |
bool CXspFile::AddTextFromFile(const Utils::String &sFile, int textId)
|
2110 |
bool CXspFile::AddTextFromFile(const Utils::String &sFile, int textId)
|
| 2111 |
{
|
2111 |
{
|
| 2112 |
Utils::String file = sFile;
|
2112 |
Utils::String file = sFile;
|
| 2113 |
|
2113 |
|
| 2114 |
bool remove = false;
|
2114 |
bool remove = false;
|
| 2115 |
if ( CFileIO(file).CheckFileExtension("pck") )
|
2115 |
if ( CFileIO(file).isFileExtension("pck") )
|
| 2116 |
{
|
2116 |
{
|
| 2117 |
C_File F;
|
2117 |
C_File F;
|
| 2118 |
F.SetFilename(CyString(file));
|
2118 |
F.SetFilename(CyString(file));
|
| 2119 |
F.UnPCKFile();
|
2119 |
F.UnPCKFile();
|
| 2120 |
if (F.writeToFile(CPackages::tempDirectory() + "tmp.dat"))
|
2120 |
if (F.writeToFile(CPackages::tempDirectory() + "tmp.dat"))
|