Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
504
GameTools/WORLDCREATOR/DlgMapFileInfo.cpp
Normal file
504
GameTools/WORLDCREATOR/DlgMapFileInfo.cpp
Normal file
@@ -0,0 +1,504 @@
|
||||
// DlgMapFileInfo.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "worldcreator.h"
|
||||
#include "DlgMapFileInfo.h"
|
||||
#include "BaseDataDefine.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgMapFileInfo dialog
|
||||
|
||||
|
||||
CDlgMapFileInfo::CDlgMapFileInfo(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgMapFileInfo::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgMapFileInfo)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CDlgMapFileInfo::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgMapFileInfo)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgMapFileInfo, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgMapFileInfo)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DELFILE, OnButtonDelfile)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgMapFileInfo message handlers
|
||||
|
||||
void CDlgMapFileInfo::OnButtonDelfile()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
char strPath[256];
|
||||
GetCurrentDirectory(256,strPath);
|
||||
sprintf(strPath,"%s\\Zone_01.z3s",strPath);
|
||||
|
||||
FindUsedFileList(strPath);
|
||||
|
||||
}
|
||||
|
||||
void CDlgMapFileInfo::FindUsedFileList(char *strFilename)
|
||||
{
|
||||
FILE *fp=fopen(strFilename,"rb");
|
||||
|
||||
if(fp==NULL)
|
||||
return;
|
||||
char strRead[256];
|
||||
fread(strRead,sizeof(char)*256,1,fp);
|
||||
long ReadTemp;
|
||||
fread(&ReadTemp,sizeof(long),1,fp);
|
||||
fread(&ReadTemp,sizeof(long),1,fp);
|
||||
fread(&ReadTemp,sizeof(long),1,fp);
|
||||
fread(&ReadTemp,sizeof(long),1,fp);
|
||||
|
||||
int cSavedHeightData=0;
|
||||
fread(&cSavedHeightData,sizeof(int),1,fp);
|
||||
for(int cHeightData=0;cHeightData<cSavedHeightData;cHeightData++)
|
||||
{
|
||||
int ReadIndex;
|
||||
float ReadHeight[SECTORSX*SECTORSY];
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(ReadHeight,sizeof(float)*SECTORSX*SECTORSY,1,fp);
|
||||
}
|
||||
int cSavedWaterData=0;
|
||||
fread(&cSavedWaterData,sizeof(int),1,fp);
|
||||
for(int cWaterData=0;cWaterData<cSavedWaterData;cWaterData++)
|
||||
{
|
||||
int ReadIndex;
|
||||
float fReadPos;
|
||||
bool bReadBool;
|
||||
color cRead;
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&bReadBool,sizeof(bool),1,fp);
|
||||
fread(&cRead,sizeof(color),1,fp);
|
||||
|
||||
}
|
||||
int cSavedWideData=0;
|
||||
fread(&cSavedWideData,sizeof(int),1,fp);
|
||||
|
||||
for(int cWideData=0;cWideData<cSavedWideData;cWideData++)
|
||||
{
|
||||
int ReadIndex;
|
||||
char ReadName[256];
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(ReadName,sizeof(char)*256,1,fp);//¿©±â
|
||||
CString strUsedFilename;
|
||||
strUsedFilename.Format("%s\\%s",WIDETEXTUREPATH,ReadName);
|
||||
m_UsedTextureFileList.AddUnique(strUsedFilename);
|
||||
}
|
||||
int cSavedFallData=0;
|
||||
fread(&cSavedFallData,sizeof(int),1,fp);
|
||||
|
||||
for(int cFallData=0;cFallData<cSavedFallData;cFallData++)
|
||||
{
|
||||
int ReadIndex;
|
||||
int fReadPos;
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
fread(&fReadPos,sizeof(float),1,fp);
|
||||
|
||||
int cSavedFallList;
|
||||
fread(&cSavedFallList,sizeof(int),1,fp);
|
||||
for(int cFallList=0;cFallList<cSavedFallList;cFallList++)
|
||||
{
|
||||
float ReadFallData;
|
||||
color ReadFallColor;
|
||||
fread(&ReadFallData,sizeof(float),1,fp);
|
||||
fread(&ReadFallData,sizeof(float),1,fp);
|
||||
fread(&ReadFallData,sizeof(float),1,fp);
|
||||
fread(&ReadFallData,sizeof(float),1,fp);
|
||||
fread(&ReadFallColor,sizeof(color),1,fp);
|
||||
}
|
||||
}
|
||||
int cSavedHouseData=0;
|
||||
fread(&cSavedHouseData,sizeof(int),1,fp);
|
||||
|
||||
for(int cHouseData=0;cHouseData<cSavedHouseData;cHouseData++)
|
||||
{
|
||||
int ReadIndex;
|
||||
int fReadPos;
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
fread(&ReadIndex,sizeof(int),1,fp);
|
||||
int cSavedHouseList=0;
|
||||
|
||||
fread(&cSavedHouseList,sizeof(int),1,fp);
|
||||
|
||||
for(int cHouseList=0;cHouseList<cSavedHouseList;cHouseList++)
|
||||
{
|
||||
int ReadHouseID;
|
||||
char ReadHouseName[256];
|
||||
matrix ReadHouseTM;
|
||||
fread(&ReadHouseTM,sizeof(matrix),1,fp);
|
||||
fread(&ReadHouseID,sizeof(int),1,fp);
|
||||
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
CString strUsedFilename;
|
||||
|
||||
strUsedFilename.Format("%s%s",HOUSEOBJECTPATH,ReadHouseName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
|
||||
CString strLightmapFile;
|
||||
strLightmapFile.Format("%s\\%s",LIGHTMAPTEXTUREPATH,ReadHouseName);
|
||||
int nPos=strLightmapFile.Find(".",0);
|
||||
strLightmapFile=strLightmapFile.Left(nPos);
|
||||
strLightmapFile+=".dds";
|
||||
FILE *fpLightmap=fopen(strLightmapFile.LockBuffer(),"r");
|
||||
if(fpLightmap)
|
||||
{
|
||||
m_UsedTextureFileList.AddUnique(strLightmapFile);
|
||||
fclose(fpLightmap);
|
||||
}
|
||||
|
||||
|
||||
CString strLodUsedFile;
|
||||
strLodUsedFile=strUsedFilename;
|
||||
nPos=strLodUsedFile.Find(".",0);
|
||||
strLodUsedFile=strLodUsedFile.Left(nPos);
|
||||
strLodUsedFile+="_lod.r3s";
|
||||
FILE *fpLod=fopen(strLodUsedFile.LockBuffer(),"r");
|
||||
if(fpLod)
|
||||
{
|
||||
m_UsedR3SFileList.AddUnique(strLodUsedFile);
|
||||
fclose(fpLod);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
if(strcmp(ReadHouseName,"")!=0)
|
||||
{
|
||||
strUsedFilename.Format("%s%s",HOUSEOBJECTPATH,ReadHouseName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
}
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
if(strcmp(ReadHouseName,"")!=0)
|
||||
{
|
||||
strUsedFilename.Format("%s%s",HOUSEOBJECTPATH,ReadHouseName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int cSavedInHouseData=0;
|
||||
fread(&cSavedInHouseData,sizeof(int),1,fp);
|
||||
for(int cInHouseData=0;cInHouseData<cSavedInHouseData;cInHouseData++)
|
||||
{
|
||||
char ReadHouseName[256];
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
fread(ReadHouseName,sizeof(char)*256,1,fp);
|
||||
|
||||
int cSavedObject,cSavedLight;
|
||||
fread(&cSavedObject,sizeof(int),1,fp);
|
||||
for(int cObject=0;cObject<cSavedObject;cObject++)
|
||||
{
|
||||
matrix ReadObjectTM;
|
||||
bool ReadAlpha,ReadLight;
|
||||
long ReadObjectID;
|
||||
char ReadObjectName[256];
|
||||
fread(ReadObjectName,sizeof(char)*256,1,fp);
|
||||
CString strUsedFilename;
|
||||
strUsedFilename.Format("%s%s",OBJECTPATH,ReadObjectName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
|
||||
fread(&ReadObjectID,sizeof(long),1,fp);
|
||||
fread(&ReadObjectTM,sizeof(matrix),1,fp);
|
||||
fread(&ReadAlpha,sizeof(bool),1,fp);
|
||||
fread(&ReadLight,sizeof(bool),1,fp);
|
||||
}
|
||||
fread(&cSavedLight,sizeof(int),1,fp);
|
||||
for(int cLight=0;cLight<cSavedLight;cLight++)
|
||||
{
|
||||
matrix ReadLightTM;
|
||||
float ReadLightRange;
|
||||
color ReadLightColor;
|
||||
long ReadLightID;
|
||||
char ReadLightName[256];
|
||||
fread(ReadLightName,sizeof(char)*256,1,fp);
|
||||
|
||||
CString strUsedFilename;
|
||||
strUsedFilename.Format("%s%s",OBJECTPATH,ReadLightName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
|
||||
fread(&ReadLightID,sizeof(long),1,fp);
|
||||
fread(&ReadLightTM,sizeof(matrix),1,fp);
|
||||
fread(&ReadLightRange,sizeof(float),1,fp);
|
||||
fread(&ReadLightColor,sizeof(color),1,fp);
|
||||
}
|
||||
}
|
||||
int cSavedPlantData=0;
|
||||
fread(&cSavedPlantData,sizeof(int),1,fp);
|
||||
for(int cPlantData=0;cPlantData<cSavedPlantData;cPlantData++)
|
||||
{
|
||||
int Index;
|
||||
fread(&Index,sizeof(int),1,fp);
|
||||
fread(&Index,sizeof(int),1,fp);
|
||||
int cSavedSubPlant;
|
||||
int ReadKind;
|
||||
unsigned char ReadPosX,ReadPosZ;
|
||||
|
||||
fread(&cSavedSubPlant,sizeof(int),1,fp);
|
||||
for(int cSubPlant=0;cSubPlant<cSavedSubPlant;cSubPlant++)
|
||||
{
|
||||
fread(&ReadKind,sizeof(unsigned char),1,fp);
|
||||
fread(&ReadPosX,sizeof(unsigned char),1,fp);
|
||||
fread(&ReadPosZ,sizeof(unsigned char),1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
int cSavedMeshData=0;
|
||||
fread(&cSavedMeshData,sizeof(int),1,fp);
|
||||
for(int cMeshData=0;cMeshData<cSavedMeshData;cMeshData++)
|
||||
{
|
||||
int Index;
|
||||
fread(&Index,sizeof(int),1,fp);
|
||||
fread(&Index,sizeof(int),1,fp);
|
||||
int cSavedObject=0;
|
||||
fread(&cSavedObject,sizeof(int),1,fp);
|
||||
|
||||
int ReadObjectSceneID;
|
||||
matrix ReadMatrixTM;
|
||||
bool ReadAlpha,ReadLight;
|
||||
for(int cObject=0;cObject<cSavedObject;cObject++)
|
||||
{
|
||||
fread(&ReadObjectSceneID,sizeof(long),1,fp);
|
||||
char ReadObjectName[256];
|
||||
fread(ReadObjectName,sizeof(char)*256,1,fp);
|
||||
|
||||
CString strUsedFilename;
|
||||
strUsedFilename.Format("%s%s",OBJECTPATH,ReadObjectName);
|
||||
m_UsedR3SFileList.AddUnique(strUsedFilename);
|
||||
fread(&ReadMatrixTM,sizeof(matrix),1,fp);
|
||||
fread(&ReadAlpha,sizeof(bool),1,fp);
|
||||
fread(&ReadLight,sizeof(bool),1,fp);
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
char strPath[256];
|
||||
GetCurrentDirectory(256,strPath);
|
||||
|
||||
char strFileName[256];
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree1.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree2.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree3.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree4.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree5.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree6.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree7.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree8.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree9.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree10.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree11.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree12.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree13.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree14.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree15.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\NormalTree16.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\grass_group01.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\grass_group02.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
sprintf(strFileName,"%s\\Objects\\NatureObject\\grass01.R3S",strPath);
|
||||
m_UsedR3SFileList.AddUnique(strFileName);
|
||||
|
||||
MakeObjectUsedTextureFileList();
|
||||
DeleteFile();
|
||||
}
|
||||
|
||||
void CDlgMapFileInfo::MakeObjectUsedTextureFileList()
|
||||
{
|
||||
/*
|
||||
char ORIGINALTEXUTREINTERFACEPATH[256]="c:\\MP-Project\\RawTexture\\Interface";
|
||||
char ORIGINALTEXUTRELIGHTMAPPATH[256]="c:\\MP-Project\\RawTexture\\Lightmap";
|
||||
char ORIGINALTEXUTRENATUREPATH[256]="c:\\MP-Project\\RawTexture\\NatureObject";
|
||||
char ORIGINALTEXTUREOBJECTPATH[256]="c:\\MP-Project\\RawTexture\\Object";
|
||||
char ORIGINALTEXTURETERRAINPATH[256]="c:\\MP-Project\\RawTexture\\Terrain";
|
||||
char ORIGINALTEXTUREWIDEPATH[256]="c:\\MP-Project\\RawTexture\\WideTexture";
|
||||
char ORIGINALTEXTUREFXPATH[256]="c:\\MP-Project\\Texture\\FX";
|
||||
|
||||
/*
|
||||
char TERRAINTEXTUREPATH[256]="c:\\MP-project\\Texture\\Terrain";
|
||||
char OBJECTTEXTUREPATH[256]="c:\\MP-Project\\Texture\\Object";
|
||||
char NATURETEXTUREPATH[256]="c:\\MP-project\\Texture\\NatureObject";
|
||||
char WIDETEXTUREPATH[256]="C:\\MP-Project\\Texture\\WideTexture";
|
||||
char INTERFACETEXTUREPATH[256]="c:\\MP-Project\\Texture\\Interface";
|
||||
char FXTEXTUREPATH[256]="c:\\MP-Project\\Texture\\FX";
|
||||
char BSPTEXTUREPATH[256]="c:\\MP-Project\\Texture\\BSP";
|
||||
DeleteFile
|
||||
*/
|
||||
for(int i=0;i<m_UsedR3SFileList.num;i++)
|
||||
{
|
||||
FILE *fp=fopen(m_UsedR3SFileList[i].LockBuffer(),"rb");
|
||||
|
||||
int nObject,nMat,nTextureSize;
|
||||
fread(&nObject,sizeof(float),1,fp);
|
||||
fread(&nMat,sizeof(float),1,fp);
|
||||
fread(&nTextureSize,sizeof(float),1,fp);
|
||||
|
||||
char strTextureName[256];
|
||||
|
||||
for(int cTexture=0;cTexture<nMat;cTexture++)
|
||||
{
|
||||
fread(strTextureName,sizeof(char)*256,1,fp);
|
||||
if(strcmp(strTextureName,"")==0)
|
||||
continue;
|
||||
CString strFilename;
|
||||
strFilename.Format("%s\\%s",OBJECTTEXTUREPATH,strTextureName);
|
||||
int nPos=strFilename.Find(".",0);
|
||||
strFilename=strFilename.Left(nPos);
|
||||
strFilename+=".dds";
|
||||
m_UsedTextureFileList.AddUnique(strFilename);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
void CDlgMapFileInfo::DeleteFile()
|
||||
{
|
||||
List<CString> FileList;
|
||||
List<CString> TextureList;
|
||||
WIN32_FIND_DATA wfd = {0};
|
||||
|
||||
|
||||
char strPath[256];
|
||||
GetCurrentDirectory(256,strPath);
|
||||
|
||||
char filename[256];
|
||||
sprintf(filename,"%s\\Objects\\House\\*.*",strPath);
|
||||
|
||||
HANDLE hFind = FindFirstFile(filename, &wfd);
|
||||
if(INVALID_HANDLE_VALUE == hFind)
|
||||
return;
|
||||
|
||||
CString strFilePathname;
|
||||
while(1)
|
||||
{
|
||||
strFilePathname.Format("%s%s",filename,wfd.cFileName);
|
||||
FileList.Add(strFilePathname);
|
||||
if(FindNextFile(hFind, &wfd)==FALSE)
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(filename,"%s\\Objects\\Object\\*.*",strPath);
|
||||
hFind = FindFirstFile(filename, &wfd);
|
||||
while(1)
|
||||
{
|
||||
strFilePathname.Format("%s%s",filename,wfd.cFileName);
|
||||
FileList.Add(strFilePathname);
|
||||
if(FindNextFile(hFind, &wfd)==FALSE)
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(filename,"%s\\Texture\\WideTexture\\*.*",strPath);
|
||||
hFind = FindFirstFile(filename, &wfd);
|
||||
while(1)
|
||||
{
|
||||
strFilePathname.Format("%s%s",filename,wfd.cFileName);
|
||||
FileList.Add(strFilePathname);
|
||||
if(FindNextFile(hFind, &wfd)==FALSE)
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(filename,"%s\\Texture\\Lightmap\\*.*",strPath);
|
||||
hFind = FindFirstFile(filename, &wfd);
|
||||
while(1)
|
||||
{
|
||||
strFilePathname.Format("%s%s",filename,wfd.cFileName);
|
||||
FileList.Add(strFilePathname);
|
||||
if(FindNextFile(hFind, &wfd)==FALSE)
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(filename,"%s\\Texture\\Object\\*.*",strPath);
|
||||
hFind = FindFirstFile(filename, &wfd);
|
||||
while(1)
|
||||
{
|
||||
strFilePathname.Format("%s%s",filename,wfd.cFileName);
|
||||
FileList.Add(strFilePathname);
|
||||
if(FindNextFile(hFind, &wfd)==FALSE)
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i=0;i<FileList.num;i++)
|
||||
FileList[i].MakeLower();
|
||||
for(i=0;i<m_UsedR3SFileList.num;i++)
|
||||
m_UsedR3SFileList[i].MakeLower();
|
||||
for(i=0;i<m_UsedTextureFileList.num;i++)
|
||||
m_UsedTextureFileList[i].MakeLower();
|
||||
|
||||
int cDel=0;
|
||||
int c=0;
|
||||
for(i=0;i<FileList.num;i++)
|
||||
{
|
||||
bool bFound=false;
|
||||
for(int cObject=0;cObject<m_UsedR3SFileList.num && !bFound;cObject++)
|
||||
{
|
||||
if(m_UsedR3SFileList[cObject]==FileList[i])
|
||||
{
|
||||
bFound=true;
|
||||
}
|
||||
}
|
||||
|
||||
for(int cTexture=0;cTexture<m_UsedTextureFileList.num && !bFound;cTexture++)
|
||||
{
|
||||
if(m_UsedTextureFileList[cTexture]==FileList[i])
|
||||
bFound=true;
|
||||
}
|
||||
if(!bFound)
|
||||
{
|
||||
remove(FileList[i].LockBuffer());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user