本文整理汇总了C++中FArchive::Engine方法的典型用法代码示例。如果您正苦于以下问题:C++ FArchive::Engine方法的具体用法?C++ FArchive::Engine怎么用?C++ FArchive::Engine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FArchive
的用法示例。
在下文中一共展示了FArchive::Engine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GameUsesFCompactIndex
static bool GameUsesFCompactIndex(FArchive &Ar)
{
#if UC2
if (Ar.Engine() == GAME_UE2X && Ar.ArVer >= 145) return false;
#endif
#if VANGUARD
if (Ar.Game == GAME_Vanguard && Ar.ArVer >= 128 && Ar.ArLicenseeVer >= 25) return false;
#endif
#if UNREAL3
if (Ar.Engine() >= GAME_UE3) return false;
#endif
return true;
}
示例2: Serialize
void UVertMesh::Serialize(FArchive &Ar)
{
guard(UVertMesh::Serialize);
#if UNREAL1
if (Ar.Engine() == GAME_UE1)
{
SerializeVertMesh1(Ar);
RotOrigin.Roll = -RotOrigin.Roll; //??
return;
}
#endif // UNREAL1
Super::Serialize(Ar);
RotOrigin.Roll = -RotOrigin.Roll; //??
Ar << AnimMeshVerts << StreamVersion; // FAnimMeshVertexStream: may skip this (simply seek archive)
Ar << Verts2 << f150;
Ar << AnimSeqs << Normals;
Ar << VertexCount << FrameCount;
Ar << BoundingBoxes << BoundingSpheres;
unguard;
}
示例3: Serialize
void UTexture::Serialize(FArchive &Ar)
{
guard(UTexture::Serialize);
Super::Serialize(Ar);
#if BIOSHOCK
TRIBES_HDR(Ar, 0x2E);
if (Ar.Game == GAME_Bioshock && t3_hdrSV >= 1)
Ar << CachedBulkDataSize;
if (Ar.Game == GAME_Bioshock && Format == 12) // remap format; note: Bioshock used 3DC name, but real format is DXT5N
Format = TEXF_DXT5N;
#endif // BIOSHOCK
#if SWRC
if (Ar.Game == GAME_RepCommando)
{
if (Format == 14) Format = TEXF_CxV8U8; //?? not verified
}
#endif // SWRC
#if VANGUARD
if (Ar.Game == GAME_Vanguard && Ar.ArVer >= 128 && Ar.ArLicenseeVer >= 25)
{
// has some table for fast mipmap lookups
Ar.Seek(Ar.Tell() + 142); // skip that table
// serialize mips using AR_INDEX count (this game uses int for array counts in all other places)
int Count;
Ar << AR_INDEX(Count);
Mips.AddDefaulted(Count);
for (int i = 0; i < Count; i++)
Ar << Mips[i];
return;
}
#endif // VANGUARD
#if AA2
if (Ar.Game == GAME_AA2 && Ar.ArLicenseeVer >= 8)
{
int unk; // always 10619
Ar << unk;
}
#endif // AA2
Ar << Mips;
if (Ar.Engine() == GAME_UE1)
{
// UE1
bMasked = false; // ignored by UE1, used surface.PolyFlags instead (but UE2 ignores PolyFlags ...)
if (bHasComp) // skip compressed mipmaps
{
TArray<FMipmap> CompMips;
Ar << CompMips;
}
}
#if XIII
if (Ar.Game == GAME_XIII)
{
if (Ar.ArLicenseeVer >= 42)
{
// serialize palette
if (Format == TEXF_P8 || Format == 13) // 13 == TEXF_P4
{
assert(!Palette);
Palette = new UPalette;
Ar << Palette->Colors;
}
}
if (Ar.ArLicenseeVer >= 55)
Ar.Seek(Ar.Tell() + 3);
}
#endif // XIII
#if EXTEEL
if (Ar.Game == GAME_Exteel)
{
// note: this property is serialized as UObject's property too
byte MaterialType; // enum GFMaterialType
Ar << MaterialType;
}
#endif // EXTEEL
unguard;
}