本文整理汇总了C++中FileList::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ FileList::Release方法的具体用法?C++ FileList::Release怎么用?C++ FileList::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileList
的用法示例。
在下文中一共展示了FileList::Release方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartRecord
void Replay::StartRecord(const FilePath & dirName)
{
DVASSERT(!isRecord);
DVASSERT(!isPlayback);
isRecord = true;
pauseReplay = false;
FileSystem::Instance()->DeleteDirectoryFiles(dirName, false);
FileSystem::Instance()->CreateDirectory(dirName);
FileList * list = new FileList("~doc:/");
int32 listSize = list->GetCount();
for(int32 i = 0; i < listSize; ++i)
{
String fileName = list->GetFilename(i);
if(!list->IsNavigationDirectory(i) && !list->IsDirectory(i) && fileName != "LastReplay.rep")
{
FileSystem::Instance()->CopyFile(list->GetPathname(i), dirName + fileName);
}
}
list->Release();
FilePath filePath = dirName + "LastReplay.rep";
file = File::Create(filePath, File::CREATE | File::WRITE);
Random::Instance()->Seed();
}
示例2: StartPlayback
void Replay::StartPlayback(const FilePath & dirName)
{
DVASSERT(!isRecord);
DVASSERT(!isPlayback);
pauseReplay = false;
isPlayback = true;
FileSystem::Instance()->DeleteDirectoryFiles("~doc:/", false);
FileList * list = new FileList(dirName);
int32 listSize = list->GetCount();
for(int32 i = 0; i < listSize; ++i)
{
String fileName = list->GetFilename(i);
if(!list->IsNavigationDirectory(i) && !list->IsDirectory(i))
{
FilePath existingFile = dirName + fileName;
FilePath newFile("~doc:/" + fileName);
FileSystem::Instance()->CopyFile(existingFile, newFile);
}
}
list->Release();
skipType = false;
file = File::Create("~doc:/LastReplay.rep", File::OPEN | File::READ);
}
示例3: ParseSpriteDescriptors
void LightmapsPacker::ParseSpriteDescriptors()
{
FileList * fileList = new FileList(outputDir);
char8 buf[512];
uint32 readSize;
int32 itemsCount = fileList->GetCount();
for(int32 i = 0; i < itemsCount; ++i)
{
const FilePath & filePath = fileList->GetPathname(i);
if(fileList->IsDirectory(i) || !filePath.IsEqualToExtension(".txt"))
{
continue;
}
LightmapAtlasingData data;
data.meshInstanceName = filePath.GetBasename();
File * file = File::Create(filePath, File::OPEN | File::READ);
file->ReadLine(buf, sizeof(buf)); //textures count
readSize = file->ReadLine(buf, sizeof(buf)); //texture name
FilePath originalTextureName = outputDir + String(buf, readSize);
data.textureName = originalTextureName;
file->ReadLine(buf, sizeof(buf)); //image size
file->ReadLine(buf, sizeof(buf)); //frames count
file->ReadLine(buf, sizeof(buf)); //frame rect
int32 x, y, dx, dy, unused0, unused1, unused2;
sscanf(buf, "%d %d %d %d %d %d %d", &x, &y, &dx, &dy, &unused0, &unused1, &unused2);
dx++;//cause TexturePacker::ReduceRectToOriginalSize removed one pixel by default
dy++;
Vector2 textureSize = GetTextureSize(originalTextureName);
data.uvOffset = Vector2((float32)x/textureSize.x, (float32)y/textureSize.y);
data.uvScale = Vector2((float32)dx/textureSize.x, (float32)dy/textureSize.y);
file->Release();
atlasingData.push_back(data);
FileSystem::Instance()->DeleteFile(filePath);
}
fileList->Release();
}
示例4: CreateDescriptors
void LightmapsPacker::CreateDescriptors()
{
FileList * fileList = new FileList(outputDir);
int32 itemsCount = fileList->GetCount();
for(int32 i = 0; i < itemsCount; ++i)
{
const FilePath & filePath = fileList->GetPathname(i);
if(fileList->IsDirectory(i) || !filePath.IsEqualToExtension(".png"))
{
continue;
}
TextureDescriptor descriptor;
descriptor.Save(TextureDescriptor::GetDescriptorPathname(filePath));
}
fileList->Release();
}