you must have correct texture ids
you can accomplish this by decompiling your own textures using this simple script
Add this on top of TachyonRes as new functions
////////////////////////////////////////////////////
Code:
//CREATE DIR
void create_directory(char* Path){
char DirName[256];
char* p = Path;
char* q = DirName;
while (*p)
{
if (('\\' == *p) || ('/' == *p))
{
if (':' != *(p - 1))
{
CreateDirectory(DirName, NULL);
}
}
*q++ = *p++;
*q = '\0';
}
CreateDirectory(DirName, NULL);
}
//EXIST DIR
bool exist_directory(const string& dirName_in)
{
DWORD ftyp = GetFileAttributesA(dirName_in.c_str());
if (ftyp == INVALID_FILE_ATTRIBUTES)
return false; //spatna cesta
if (ftyp & FILE_ATTRIBUTE_DIRECTORY)
return true; //existujici dir
return false; //neexistujuci dir
}
Add that to LoadTEX function above the pTRESDATA->insert(MAPRES::value_type........)
/////////////////////////////////////////////////////////////////////////////////////////////////
Code:
string path = ".\\TESTXD\\" + strFILE;
CString csave = path.c_str();CString fsave;
fsave.Format(csave + "\\%d.png", dwSize);
if (!exist_directory(path))
{
char* file_t = new char[path.length() + 1];
strcpy(file_t, path.c_str());
create_directory(file_t);
}
pTEXSRC->SaveImageFile(fsave, D3DXIFF_PNG, pTEXSRC->GetTEX());
and finally start the client and it should decompile correct textures to your folder that you picked