Some more modification of texture dumping and loading.
They now use gameID instead of game name for the folders. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3247 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
14beb0ce7f
commit
254edc3813
|
@ -30,14 +30,14 @@ namespace HiresTextures
|
|||
|
||||
std::map<std::string, std::string> textureMap;
|
||||
|
||||
void Init(const char *gameCode,const char *gameName)
|
||||
void Init(const char *gameCode)
|
||||
{
|
||||
static bool bCheckedDir;
|
||||
|
||||
CFileSearch::XStringVector Directories;
|
||||
//Directories.push_back(std::string(FULL_HIRES_TEXTURES_DIR));
|
||||
char szDir[MAX_PATH];
|
||||
sprintf(szDir,"%s/%s",FULL_HIRES_TEXTURES_DIR,gameName);
|
||||
sprintf(szDir,"%s/%s",FULL_HIRES_TEXTURES_DIR,gameCode);
|
||||
Directories.push_back(std::string(szDir));
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace HiresTextures
|
||||
{
|
||||
void Init(const char *gameCode,const char *gameName);
|
||||
void Init(const char *gameCode);
|
||||
void Shutdown();
|
||||
PC_TexFormat GetHiresTex(const char *fileName, int *pWidth, int *pHeight, int texformat, u8 *data);
|
||||
};
|
||||
|
|
|
@ -160,7 +160,7 @@ void TextureMngr::Init()
|
|||
{
|
||||
temp = (u8*)AllocateMemoryPages(TEMP_SIZE);
|
||||
TexDecoder_SetTexFmtOverlayOptions(g_Config.bTexFmtOverlayEnable, g_Config.bTexFmtOverlayCenter);
|
||||
HiresTextures::Init(((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID().c_str(),((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.m_strName.c_str());
|
||||
HiresTextures::Init(((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID().c_str());
|
||||
}
|
||||
|
||||
void TextureMngr::Invalidate(bool shutdown)
|
||||
|
@ -463,15 +463,16 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
|||
|
||||
char szTemp[MAX_PATH];
|
||||
char szDir[MAX_PATH];
|
||||
bool bCheckedDir = false;
|
||||
bool bCheckedDumpDir = false;
|
||||
|
||||
sprintf(szDir,"%s/%s",FULL_DUMP_TEXTURES_DIR,((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.m_strName.c_str());
|
||||
sprintf(szDir,"%s/%s",FULL_DUMP_TEXTURES_DIR,((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID().c_str());
|
||||
|
||||
if(!bCheckedDir)
|
||||
if(!bCheckedDumpDir)
|
||||
{
|
||||
File::CreateDir(szDir);
|
||||
bCheckedDir = true;
|
||||
if (!File::Exists(szDir) || !File::IsDirectory(szDir))
|
||||
File::CreateDir(szDir);
|
||||
|
||||
bCheckedDumpDir = true;
|
||||
}
|
||||
|
||||
sprintf(szTemp, "%s/%s_%08x_%i.tga",szDir, ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID().c_str(), texHash, tex_format);
|
||||
|
|
Loading…
Reference in New Issue