本文整理汇总了C#中EndianBinaryReader.ReadColor8方法的典型用法代码示例。如果您正苦于以下问题:C# EndianBinaryReader.ReadColor8方法的具体用法?C# EndianBinaryReader.ReadColor8怎么用?C# EndianBinaryReader.ReadColor8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EndianBinaryReader
的用法示例。
在下文中一共展示了EndianBinaryReader.ReadColor8方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: pic1
public pic1(EndianBinaryReader er)
: base(er)
{
VertexColorLT = er.ReadColor8();
VertexColorRT = er.ReadColor8();
VertexColorLB = er.ReadColor8();
VertexColorRB = er.ReadColor8();
MaterialId = er.ReadUInt16();
NrTexCoordEntries = er.ReadUInt16();
TexCoordEntries = new TexCoord[NrTexCoordEntries];
for (int i = 0; i < NrTexCoordEntries; i++)
{
TexCoordEntries[i] = new TexCoord(er);
}
}
示例2: txt1
public txt1(EndianBinaryReader er)
: base(er)
{
long baseoffset = er.BaseStream.Position - 0x4C;
NrCharacters = er.ReadUInt16();
NrCharacters2 = er.ReadUInt16();
MaterialId = er.ReadUInt16();
FontId = er.ReadUInt16();
PositionType = er.ReadByte();
TextAlignment = er.ReadByte();
TextFlags = er.ReadByte();
Padding = er.ReadByte();
StringOffset = er.ReadUInt32();
TopColor = er.ReadColor8();
BottomColor = er.ReadColor8();
FontSize = er.ReadVector2();
CharSpace = er.ReadSingle();
LineSpace = er.ReadSingle();
er.BaseStream.Position = baseoffset + StringOffset;
Text = er.ReadStringNT(Encoding.Unicode);
er.BaseStream.Position = baseoffset + SectionSize;
}
示例3: MaterialEntry
public MaterialEntry(EndianBinaryReader er)
{
Name = er.ReadString(Encoding.ASCII, 20).Replace("\0", "");
BufferColor = er.ReadColor8();
ConstColors = new Color[6];
ConstColors[0] = er.ReadColor8();
ConstColors[1] = er.ReadColor8();
ConstColors[2] = er.ReadColor8();
ConstColors[3] = er.ReadColor8();
ConstColors[4] = er.ReadColor8();
ConstColors[5] = er.ReadColor8();
Flags = er.ReadUInt32();
//Material Flag:
// 0-1: Nr texMap
// 2-3: Nr texMatrix
// 4-5: Nr texCoordGen
// 6-8: Nr tevStage
// 9: Has alphaCompare
// 10: Has blendMode
// 11: Use Texture Only
// 12: Separate Blend Mode
// 14: Has Indirect Parameter
//15-16: Nr projectionTexGenParameter
// 17: Has Font Shadow Parameter
TexMaps = new TexMap[Flags & 3];
for (int i = 0; i < (Flags & 3); i++)
{
TexMaps[i] = new TexMap(er);
}
TexMatrices = new TexMatrix[(Flags >> 2) & 3];
for (int i = 0; i < ((Flags >> 2) & 3); i++)
{
TexMatrices[i] = new TexMatrix(er);
}
TexCoordGens = new TexCoordGen[(Flags >> 4) & 3];
for (int i = 0; i < ((Flags >> 4) & 3); i++)
{
TexCoordGens[i] = new TexCoordGen(er);
}
TevStages = new TevStage[(Flags >> 6) & 7];
for (int i = 0; i < ((Flags >> 6) & 7); i++)
{
TevStages[i] = new TevStage(er);
}
if (((Flags >> 9) & 1) == 1) AlphaTest = new AlphaCompare(er);
if (((Flags >> 10) & 1) == 1) ColorBlendMode = new BlendMode(er);
if (((Flags >> 12) & 1) == 1) AlphaBlendMode = new BlendMode(er);
//Some more things
}
示例4: MaterialColorCtr
public MaterialColorCtr(EndianBinaryReader er)
{
Emission = er.ReadVector4();
Ambient = er.ReadVector4();
Diffuse = er.ReadVector4();
Specular0 = er.ReadVector4();
Specular1 = er.ReadVector4();
Constant0 = er.ReadVector4();
Constant1 = er.ReadVector4();
Constant2 = er.ReadVector4();
Constant3 = er.ReadVector4();
Constant4 = er.ReadVector4();
Constant5 = er.ReadVector4();
EmissionU32 = er.ReadColor8();
AmbientU32 = er.ReadColor8();
DiffuseU32 = er.ReadColor8();
Specular0U32 = er.ReadColor8();
Specular1U32 = er.ReadColor8();
Constant0U32 = er.ReadColor8();
Constant1U32 = er.ReadColor8();
Constant2U32 = er.ReadColor8();
Constant3U32 = er.ReadColor8();
Constant4U32 = er.ReadColor8();
Constant5U32 = er.ReadColor8();
CommandCache = er.ReadUInt32();
}
示例5: TextureCombinerCtr
public TextureCombinerCtr(EndianBinaryReader er)
{
Constant = er.ReadUInt32();
SrcRgb = er.ReadUInt16();
SrcAlpha = er.ReadUInt16();
Address = er.ReadUInt32();
Operands = er.ReadUInt32();
CombineRgb = er.ReadUInt16();
CombineAlpha = er.ReadUInt16();
ConstRgba = er.ReadColor8();
ScaleRgb = er.ReadUInt16();
ScaleAlpha = er.ReadUInt16();
}