本文整理汇总了C++中nlmisc::IStream::serialShortEnum方法的典型用法代码示例。如果您正苦于以下问题:C++ IStream::serialShortEnum方法的具体用法?C++ IStream::serialShortEnum怎么用?C++ IStream::serialShortEnum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nlmisc::IStream
的用法示例。
在下文中一共展示了IStream::serialShortEnum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serial
void CVisualConfig::serial(NLMISC::IStream & f) throw (NLMISC::EStream) {
if (!f.isReading()) {
throw "This is only for reading";
}
uint8 ver;
f.serial(ver);
nldebug("CVisualConfig::serial version %d", ver);
if (ver < 2) {
pktFormat = (EPacketFormat) ver;
} else {
f.serialShortEnum(pktFormat);
}
f.serialShortEnum(Race);
if (ver >= 2) {
f.serial(Age);
if (Age > 2) {
Age = 2;
}
} else {
Age = 0;
}
if (pktFormat == PKT_SHORT) {
nldebug(">> short packet");
vpa.serial(f);
vpb.serial(f);
vpc.serial(f);
nlinfo("1");
} else {
nldebug(">> long packet");
// they say bitfields are compiler and platform specific - this is mainly for php
uint32 b;
f.serial(b);
vpa.PropertySubData.Sex = b;
f.serial(b);
vpa.PropertySubData.JacketModel = b;
f.serial(b);
vpa.PropertySubData.JacketColor = b;
f.serial(b);
vpa.PropertySubData.TrouserModel = b;
f.serial(b);
vpa.PropertySubData.TrouserColor = b;
f.serial(b);
vpa.PropertySubData.WeaponRightHand = b;
f.serial(b);
vpa.PropertySubData.WeaponLeftHand = b;
f.serial(b);
vpa.PropertySubData.ArmModel = b;
f.serial(b);
vpa.PropertySubData.ArmColor = b;
f.serial(b);
vpa.PropertySubData.HatModel = b;
f.serial(b);
vpa.PropertySubData.HatColor = b;
f.serial(b);
vpb.PropertySubData.Name = b;
f.serial(b);
vpb.PropertySubData.HandsModel = b;
f.serial(b);
vpb.PropertySubData.HandsColor = b;
f.serial(b);
vpb.PropertySubData.FeetModel = b;
f.serial(b);
vpb.PropertySubData.FeetColor = b;
f.serial(b);
vpb.PropertySubData.RTrail = b;
f.serial(b);
vpb.PropertySubData.LTrail = b;
f.serial(b);
vpc.PropertySubData.MorphTarget1 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget2 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget3 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget4 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget5 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget6 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget7 = b;
f.serial(b);
vpc.PropertySubData.MorphTarget8 = b;
f.serial(b);
vpc.PropertySubData.EyesColor = b;
f.serial(b);
vpc.PropertySubData.Tattoo = b;
f.serial(b);
vpc.PropertySubData.CharacterHeight = b;
f.serial(b);
vpc.PropertySubData.TorsoWidth = b;
f.serial(b);
vpc.PropertySubData.ArmsWidth = b;
//.........这里部分代码省略.........