Oh my, sorry...
I have to put that project on pause so I didnt come here for a while :/
What I did was to comment the part where the engine looks for any dcp file and register the package myself. It's just a patch...
The file is BFileManager.cpp, I changed the method HRESULT CBFileManager::RegisterPackages() for this thing :
//////////////////////////////////////////////////////////////////////////
HRESULT CBFileManager::RegisterPackages()
{
RestoreCurrentDir();
Game->LOG(0, "Scanning packages...");
/*AnsiString extension = AnsiString(".") + AnsiString(PACKAGE_EXTENSION);
Game->LOG(0, "Total Paths: %i", m_PackagePaths.GetSize());
for(int i=0; i<m_PackagePaths.GetSize(); i++)
{
path absPath = system_complete(m_PackagePaths[i]);
Game->LOG(0, "Paths: %s", absPath.string().c_str());
}
for(int i=0; i<m_PackagePaths.GetSize(); i++)
{
path absPath = system_complete(m_PackagePaths[i]);
//path auxpath = system_complete(m_PackagePaths[i]);
Game->LOG(0, "Scanning: %s", absPath.string().c_str());
//printf("Scanning: %s\n", absPath.string().c_str());
if (!exists(absPath)) continue;
// scan files
directory_iterator endIter;
//directory_iterator aux(absPath);
for (directory_iterator dit(absPath); dit != endIter; ++dit)
{
if (!is_directory((*dit).status()))
{
AnsiString fileName = (*dit).path().string();
Game->LOG(0, fileName.c_str());
if (!IsValidPackage(fileName)) continue;
//printf("%s\n", fileName.c_str());
if (!StringUtil::CompareNoCase(extension, PathUtil::GetExtension(fileName))) continue;
Game->LOG(0, "REGISTRANDO: %s -> %s",absPath.string().c_str(),dit->path().filename().string().c_str());
RegisterPackage(absPath.string().c_str(), dit->path().filename().string().c_str());
}
}
}*/
path absPath = system_complete(m_PackagePaths[0]);
RegisterPackage(absPath.string().c_str(), "data.dcp");
Game->LOG(0, " Registered %d files in %d package(s)", m_Files.size(), m_Packages.GetSize());
return S_OK;
}
As you see, everything is commented and I just did a
path absPath = system_complete(m_PackagePaths[0]);
RegisterPackage(absPath.string().c_str(), "data.dcp");
... And the file data.dcp is inside the resource folder of the project. I hope this helps and it's not too late
