本文整理汇总了C#中BlamLib.ReadTagString方法的典型用法代码示例。如果您正苦于以下问题:C# BlamLib.ReadTagString方法的具体用法?C# BlamLib.ReadTagString怎么用?C# BlamLib.ReadTagString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlamLib
的用法示例。
在下文中一共展示了BlamLib.ReadTagString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public override void Read(BlamLib.IO.EndianReader s)
{
Blam.CacheFile.ValidateHeader(s, 0x800);
s.Seek(4);
version = s.ReadInt32();
if (version != 5) throw new InvalidCacheFileException(s.FileName);
fileLength = s.ReadInt32();
int xbox = s.ReadInt32(); // Xbox only field
offsetToIndex = s.ReadInt32();
s.ReadInt32(); // stream size
s.ReadInt32(); s.ReadInt32();
name = s.ReadTagString();
build = s.ReadTagString(); // Xbox only field. Always '400'
cacheType = (CacheType)s.ReadInt16();
s.ReadInt16();
s.ReadInt32(); // CRC
s.Seek((485 * sizeof(int)) + sizeof(uint), System.IO.SeekOrigin.Current);
CacheFile cf = s.Owner as CacheFile;
if (xbox != 0)
cf.EngineVersion = BlamVersion.Stubbs_Xbox;
else // no way to tell when it's mac, which just seems to use PC maps anyway (byte swaps everything when map is loaded)
cf.EngineVersion = BlamVersion.Stubbs_PC;
}
示例2: Read
public override void Read(BlamLib.IO.EndianReader s)
{
Blam.CacheFile.ValidateHeader(s, 0x800);
s.Seek(4);
s.ReadInt32(); // version, should be 5
fileLength = s.ReadInt32();
int xbox = s.ReadInt32(); // Xbox only field
offsetToIndex = s.ReadInt32();
s.ReadInt32(); // stream size
s.ReadInt32(); s.ReadInt32();
name = s.ReadTagString();
build = s.ReadTagString(); // Xbox only field. Always '400'
cacheType = (CacheType)s.ReadInt32();
s.ReadInt32(); // CRC
s.Seek((485 * sizeof(int)) + sizeof(uint), System.IO.SeekOrigin.Current);
CacheFile cf = s.Owner as CacheFile;
if (xbox != 0) cf.EngineVersion = BlamVersion.Stubbs_Xbox;
else cf.EngineVersion = BlamVersion.Stubbs_PC; // no way to tell when its mac...
}
示例3: ReadBeta
void ReadBeta(BlamLib.IO.EndianReader s)
{
s.ReadUInt32();
//s.ReadBool();
//s.ReadBool(); // false if it belongs to a untracked build
//s.ReadBool();
//s.ReadBool();
// Just read the booleans as a fucking int...
s.ReadInt32();
// Filetime.dwHighDateTime = s.ReadInt32();
// Filetime.dwLowDateTime = s.ReadInt32();
s.ReadInt32(); s.ReadInt32();
s.ReadInt32(); s.ReadInt32(); s.ReadInt32();
#region string id
// retail doesn't include the 128 byte per string id table, so nix the members
/*stringIdsBufferAlignedOffset = */s.ReadInt32();
stringIdsCount = s.ReadInt32();
stringIdsBufferSize = s.ReadInt32();
stringIdIndicesOffset = s.ReadInt32();
stringIdsBufferOffset = s.ReadInt32();
#endregion
#region filetimes?
// pretty sure this is a flags field
// used to tell which of the following 64bit values
// are used. Damn sure this are FILETIME structures, but
// hex workshop doesn't like them so I can't be for sure...
s.ReadInt32();
Filetime.dwHighDateTime = s.ReadInt32();
Filetime.dwLowDateTime = s.ReadInt32();
if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnMainMenu); s.ReadInt32();
if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnShared); s.ReadInt32();
if (s.ReadInt32() != 0) flags.Add(CacheHeaderFlags.DependsOnCampaign); s.ReadInt32();
#endregion
name = s.ReadTagString();
s.ReadInt32();
scenarioPath = s.ReadAsciiString(256);
needsShared = s.ReadInt32() == 1;
#region tag names
tagNamesCount = s.ReadInt32();
tagNamesBufferOffset = s.ReadInt32();
tagNamesBufferSize = s.ReadInt32();
tagNameIndicesOffset = s.ReadInt32();
#endregion
checksum = s.ReadUInt32(); // 0x2CC
s.Seek(32, System.IO.SeekOrigin.Current); // these bytes are always the same
baseAddress = s.ReadUInt32(); // expected base address
xdkVersion = s.ReadInt32(); // xdk version
#region memory partitions
memoryPartitions = new Partition[3];
memoryPartitions[0].BaseAddress = s.ReadUInt32(); // address
memoryPartitions[0].Size = s.ReadInt32(); // size
memoryPartitions[1].BaseAddress = s.ReadUInt32(); // address
memoryPartitions[1].Size = s.ReadInt32(); // size
memoryPartitions[2].BaseAddress = s.ReadUInt32(); // address
memoryPartitions[2].Size = s.ReadInt32(); // size
#endregion
s.Seek(256, System.IO.SeekOrigin.Current);
s.Seek(1004 + sizeof(uint), System.IO.SeekOrigin.Current);
Managers.BlamDefinition bdef = Program.GetManager(BlamVersion.Halo3_Beta);
uint base_address = (s.Owner as Blam.CacheFile).AddressMask = bdef[BlamVersion.Halo3_Beta].CacheTypes.BaseAddress - (uint)MemoryBufferOffset;
offsetToIndex = (int)(tagIndexAddress - base_address);
CalculatePartitionOffsets();
}
示例4: Read
public override void Read(BlamLib.IO.EndianReader s)
{
base.Read(s);
Unknown000 = s.ReadInt32();
BuildString = s.ReadTagString();
ExecutableType = (ExecutableType)s.ReadInt32();
ExecutableVersion = s.ReadInt32();
CompatibleVersion = s.ReadInt32();
Language = s.ReadInt32();
MapMinorVersion = s.ReadInt32();
Unknown038 = s.ReadUInt32();
Unknown03C = s.ReadUInt32();
Unknown040 = s.ReadUInt32();
SignatureLength = s.ReadInt32();
Signature = s.ReadBytes(60);
Unknown084 = s.ReadBool();
Unknown085 = s.ReadBool();
Unknown086 = s.ReadBool();
Unknown087 = s.ReadBool();
Unknown088 = s.ReadInt32();
SessionName = s.ReadAsciiString(128);
Options.Read(s);
UnknownF91C = s.ReadUInt32();
LengthInTicks = s.ReadUInt32();
SnippetStartTick = s.ReadUInt32();
UnknownF928 = s.ReadBytes(1336);
}