本文整理汇总了C++中FArchive::WriteName方法的典型用法代码示例。如果您正苦于以下问题:C++ FArchive::WriteName方法的具体用法?C++ FArchive::WriteName怎么用?C++ FArchive::WriteName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FArchive
的用法示例。
在下文中一共展示了FArchive::WriteName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WriteTexture
void FTextureManager::WriteTexture (FArchive &arc, int picnum)
{
FTexture *pic;
if (picnum < 0)
{
arc.WriteName(NULL);
return;
}
else if ((size_t)picnum >= Textures.Size())
{
pic = Textures[0].Texture;
}
else
{
pic = Textures[picnum].Texture;
}
if(strncmp(pic->Name, FONT_CHAR_NAME, 6) != 0)
arc.WriteName (pic->Name);
else
{
FString cname;
cname.Format("%s:%s", static_cast<FFontTexture*>(pic)->SourceFont->GetName(), pic->Name+6);
arc.WriteName (cname);
}
arc.WriteCount (pic->UseType);
}
示例2: SerializeStatistics
static void SerializeStatistics(FArchive &arc)
{
FString startlevel;
int i = LevelData.Size();
arc << i;
if (arc.IsLoading())
{
arc << startlevel;
StartEpisode = NULL;
for(unsigned int j=0;j<AllEpisodes.Size();j++)
{
if (!AllEpisodes[j].mEpisodeMap.CompareNoCase(startlevel))
{
StartEpisode = &AllEpisodes[j];
break;
}
}
LevelData.Resize(i);
}
else
{
if (StartEpisode != NULL) startlevel = StartEpisode->mEpisodeMap;
arc << startlevel;
}
for(int j = 0; j < i; j++)
{
OneLevel &l = LevelData[j];
arc << l.totalkills
<< l.killcount
<< l.totalsecrets
<< l.secretcount
<< l.leveltime;
if (arc.IsStoring()) arc.WriteName(l.levelname);
else strcpy(l.levelname, arc.ReadName());
}
}