本文整理汇总了C#中Plasma.hsStream.Rewind方法的典型用法代码示例。如果您正苦于以下问题:C# hsStream.Rewind方法的具体用法?C# hsStream.Rewind怎么用?C# hsStream.Rewind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plasma.hsStream
的用法示例。
在下文中一共展示了hsStream.Rewind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(hsStream s)
{
// Magically figure out what version we have...
uint prpVer = s.ReadUInt();
switch (prpVer) {
case 1:
case 2:
case 3:
case 4:
case 5:
s.Version = new plVersion(2, 0, 0, 0);
break;
case 6:
s.Version = plVersion.MystOnline;
break;
default:
// Must be some sort of Myst 5 variant...
s.Rewind();
prpVer = (uint)s.ReadUShort();
switch (prpVer) {
case 6:
s.Version = plVersion.EndOfAges;
break;
case 9:
s.Version = plVersion.HexIsle;
break;
default:
throw new plVersionException(prpVer);
}
break;
}
if (s.Version.IsPlasma21)
IReadClassVersions(s);
fLocation.Read(s);
fAge = s.ReadSafeString();
if (s.Version.IsPreMystOnline) fChapter = s.ReadSafeString();
else if (s.Version.IsMystOnline) fChapter = "District";
fPage = s.ReadSafeString();
// Some more versioning stuff for Uru...
if (s.Version.IsMystOnline)
s.Version = new plVersion(2, 0, s.ReadUShort(), 0);
else if (s.Version.IsPreMystOnline)
s.Version = new plVersion(2, 0, s.ReadUShort(), s.ReadUShort());
if (prpVer < 6) {
if (prpVer < 5) // IndexChecksum -- deprecated...
s.ReadUInt();
if (prpVer >= 2)
fReleaseVersion = s.ReadInt();
if (prpVer >= 3)
fFlags = (Flags)s.ReadInt();
}
if (prpVer >= 4)
fChecksum = s.ReadUInt();
if (prpVer >= 5) {
fDataStart = s.ReadUInt();
fIndexStart = s.ReadUInt();
} else {
//prm/prx???
fDataStart = 0;
fIndexStart = s.ReadByte();
}
// Garbage
if (s.Version.IsMystOnline)
IReadClassVersions(s);
}