public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.binarySize = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.binarySize; ++index) this.binaryData.Add(reader.ReadByte()); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.center = Utils.ReadVector3(reader); this.size = Utils.ReadVector3(reader); this.rotation = Utils.ReadMatrix33(reader); }
public override void Write(NiHeader header, BinaryWriter writer) { List <int> blockReferences = header.GetBlockReferences(); if (blockReferences.Count > 0) { if (this.collisionObject != -1) { this.collisionObject = blockReferences[this.collisionObject]; } } base.Write(header, writer); writer.Write(this.flags); if ((header.GetUserVersion() >= 11U) && (header.GetUserVersion2() >= 26U)) { writer.Write(this.flags2); } Utils.WriteVector3(writer, this.translation); Utils.WriteMatrix33(writer, this.rotation); writer.Write(this.scale); if ((header.GetVersion() <= 335544325U) || (header.GetUserVersion() <= 11U)) { writer.Write((uint)this.properties.Count); for (int index = 0; (long)index < this.properties.Count; ++index) { if (blockReferences.Count > 0) { this.properties[index] = blockReferences[this.properties[index]]; } writer.Write(this.properties[index]); } } writer.Write(this.collisionObject); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numTextures = reader.ReadInt32(); for (int index = 0; index < this.numTextures; ++index) this.textures.Add(Utils.ReadSizedString(reader)); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.unknownInt = reader.ReadInt32(); this.numVertices = reader.ReadUInt16(); this.keepFlags = reader.ReadByte(); this.compressFlags = reader.ReadByte(); this.hasVertices = Utils.ReadBool(reader); if (this.hasVertices) { for (int index = 0; index < (int)this.numVertices; ++index) { this.vertices.Add(Utils.ReadVector3(reader)); } } this.numUVSets = reader.ReadByte(); this.extraVectorFlags = reader.ReadByte(); if (header.GetUserVersion() == 12U) { this.skyrimMaterial = reader.ReadUInt32(); } this.hasNormals = Utils.ReadBool(reader); if (this.hasNormals) { for (int index = 0; index < (int)this.numVertices; ++index) { this.normals.Add(Utils.ReadVector3(reader)); } if ((this.extraVectorFlags & 16) == 16) { for (int index = 0; index < (int)this.numVertices; ++index) { this.tangents.Add(Utils.ReadVector3(reader)); } for (int index = 0; index < (int)this.numVertices; ++index) { this.bitangents.Add(Utils.ReadVector3(reader)); } } } this.center = Utils.ReadVector3(reader); this.radius = reader.ReadSingle(); this.hasVertexColors = Utils.ReadBool(reader); if (this.hasVertexColors) { for (int index = 0; index < (int)this.numVertices; ++index) { this.vertexColors.Add(Utils.ReadColor4(reader)); } } if (((int)this.numUVSets & 1) == 1) { for (int index = 0; index < (int)this.numVertices; ++index) { this.uvCoords.Add(Utils.ReadUVCoord(reader)); } } this.consistencyFlags = reader.ReadUInt16(); this.additionalData = reader.ReadInt32(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.shaderFlags1 = reader.ReadUInt32(); this.shaderFlags2 = reader.ReadUInt32(); this.uvOffset = Utils.ReadUVCoord(reader); this.uvScale = Utils.ReadUVCoord(reader); this.sourceTexture = Utils.ReadSizedString(reader); this.textureClampMode = reader.ReadUInt32(); this.falloffStartAngle = reader.ReadSingle(); this.falloffStopAngle = reader.ReadSingle(); this.falloffStartOpacity = reader.ReadSingle(); this.falloffStopOpacity = reader.ReadSingle(); this.emissiveColor = Utils.ReadColor4(reader); this.emissiveMultiple = reader.ReadSingle(); this.softFalloffDepth = reader.ReadSingle(); this.greyscaleTexture = Utils.ReadSizedString(reader); if (header.GetVersion() == 335675399U && header.GetUserVersion2() == 130) { this.envMapTexture = Utils.ReadSizedString(reader); this.normalTexture = Utils.ReadSizedString(reader); this.envMaskTexture = Utils.ReadSizedString(reader); this.enviromentMapScale = reader.ReadSingle(); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.data = reader.ReadInt32(); this.skinInstance = reader.ReadInt32(); if (header.GetVersion() > 335544325U) { this.numMaterials = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numMaterials; ++index) { this.materialNames.Add(reader.ReadUInt32()); } for (int index = 0; (long)index < (long)this.numMaterials; ++index) { this.materialExtraData.Add(reader.ReadInt32()); } this.activeMaterial = reader.ReadInt32(); this.dirtyFlag = Utils.ReadBool(reader); if (header.GetUserVersion() == 12) { this.bsProperties[0] = reader.ReadInt32(); this.bsProperties[1] = reader.ReadInt32(); } } else { this.hasShader = Utils.ReadBool(reader); if (!this.hasShader) { return; } this.shaderName = Utils.ReadSizedString(reader); this.unknownInt = reader.ReadInt32(); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.flags = reader.ReadUInt16(); this.vertexMode = reader.ReadUInt32(); this.lightingMode = reader.ReadUInt32(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); uint num1 = reader.ReadUInt32(); uint num2 = reader.ReadUInt32(); for (int index = 0; (long)index < (long)num1; ++index) { double num3 = (double)reader.ReadSingle(); double num4 = (double)reader.ReadSingle(); double num5 = (double)reader.ReadSingle(); double num6 = (double)reader.ReadSingle(); if ((int)num2 == 2) { double num7 = (double)reader.ReadSingle(); double num8 = (double)reader.ReadSingle(); double num9 = (double)reader.ReadSingle(); double num10 = (double)reader.ReadSingle(); double num11 = (double)reader.ReadSingle(); double num12 = (double)reader.ReadSingle(); } else if ((int)num2 == 3) { double num7 = (double)reader.ReadSingle(); double num8 = (double)reader.ReadSingle(); double num9 = (double)reader.ReadSingle(); } } }
public override void Write(NiHeader header, BinaryWriter writer) { List <int> blockReferences = header.GetBlockReferences(); if (blockReferences.Count > 0) { if (this.data != -1) { this.data = blockReferences[this.data]; } if (this.skinPartition != -1) { this.skinPartition = blockReferences[this.skinPartition]; } if (this.skeletonRoot != -1) { this.skeletonRoot = blockReferences[this.skeletonRoot]; } } base.Write(header, writer); writer.Write(this.data); writer.Write(this.skinPartition); writer.Write(this.skeletonRoot); writer.Write(this.numBones); for (int index = 0; index < this.numBones; index++) { if (this.bones[index] != -1) { this.bones[index] = blockReferences[this.bones[index]]; } writer.Write(this.bones[index]); } }
public override void Write(NiHeader header, BinaryWriter writer) { List <int> blockReferences = header.GetBlockReferences(); base.Write(header, writer); writer.Write(this.numBones); for (int index = 0; (long)index < (long)this.numBones; ++index) { if (blockReferences.Count > 0) { if (this.bones[index] != -1) { this.bones[index] = blockReferences[this.bones[index]]; } } writer.Write(this.bones[index]); } writer.Write(this.numBones2); for (int index = 0; (long)index < (long)this.numBones2; ++index) { if (blockReferences.Count > 0) { if (this.bones2[index] != -1) { this.bones2[index] = blockReferences[this.bones2[index]]; } } writer.Write(this.bones2[index]); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.level0Size = reader.ReadUInt32(); this.level1Size = reader.ReadUInt32(); this.level2Size = reader.ReadUInt32(); }
public override void Write(NiHeader header, BinaryWriter writer) { base.Write(header, writer); Utils.WriteVector3(writer, this.center); Utils.WriteVector3(writer, this.size); Utils.WriteMatrix33(writer, this.rotation); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numTrianglePoints = reader.ReadUInt32(); this.hasTriangles = Utils.ReadBool(reader); if (this.hasTriangles) { for (int index = 0; index < (int)this.GetNumTriangles(); ++index) { this.triangles.Add(Utils.ReadTriangle(reader)); } } this.numMatchGroups = reader.ReadUInt16(); for (int index1 = 0; index1 < (int)this.numMatchGroups; ++index1) { MatchGroup matchGroup = new MatchGroup(); matchGroup.numVertices = reader.ReadUInt16(); matchGroup.vertexIndices = new List <ushort>(); for (int index2 = 0; index2 < (int)matchGroup.numVertices; ++index2) { matchGroup.vertexIndices.Add(reader.ReadUInt16()); } this.matchGroups.Add(matchGroup); } }
public override void Write(NiHeader header, BinaryWriter writer) { List <int> blockReferences = header.GetBlockReferences(); base.Write(header, writer); writer.Write(this.numChildren); for (int index = 0; (long)index < (long)this.numChildren; ++index) { if (blockReferences.Count > 0) { if (this.children[index] != -1) { this.children[index] = blockReferences[this.children[index]]; } } writer.Write(this.children[index]); } if (header.GetUserVersion2() < 130) { writer.Write(this.numEffects); for (int index = 0; (long)index < (long)this.numEffects; ++index) { if (blockReferences.Count > 0) { if (this.effects[index] != -1) { this.effects[index] = blockReferences[this.effects[index]]; } } writer.Write(this.effects[index]); } } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); if (header.GetUserVersion2() == 100) { this.numSegments = reader.ReadUInt32(); for (int index = 0; index < this.numSegments; ++index) { this.BSSegments.Add(new BSSegment(0, 0) { unknownByte1 = reader.ReadByte(), startTriangle = reader.ReadUInt32(), numTriangles = reader.ReadUInt32() }); } } else { this.numTriangles2 = reader.ReadUInt32(); this.numA = reader.ReadUInt32(); this.numB = reader.ReadUInt32(); for (int index = 0; index < this.numA; ++index) { this.BSSITSSsegments.Add(new BSSITSSegment(0, 0) { triangleOffset = reader.ReadUInt32(), triangleCount = reader.ReadUInt32(), unknownHash = reader.ReadUInt32(), numSegments = reader.ReadUInt32(), }); //subSegment = reader.ReadInt32(), } } }
public override void Write(NiHeader header, BinaryWriter writer) { base.Write(header, writer); if (header.GetUserVersion2() == 100) { writer.Write(this.numSegments); for (int index = 0; index < this.numSegments; ++index) { writer.Write(this.BSSegments[index].unknownByte1); writer.Write(this.BSSegments[index].startTriangle); writer.Write(this.BSSegments[index].numTriangles); } } else { writer.Write(this.numTriangles2); writer.Write(this.numA); writer.Write(this.numB); for (int index = 0; index < this.numA; ++index) { writer.Write(this.BSSITSSsegments[index].triangleOffset); writer.Write(this.BSSITSSsegments[index].triangleCount); writer.Write(this.BSSITSSsegments[index].unknownHash); writer.Write(this.BSSITSSsegments[index].numSegments); } //writer.Write(this.segments[index].subSegment); } }
public override uint GetSize(NiHeader header) { if (header.GetUserVersion2() == 100 || header.GetUserVersion2() == 130) { return(base.GetSize(header) + 28U); } else { if (header.GetVersion() > 335544325U) { if (header.GetUserVersion() == 12) { return(base.GetSize(header) + 25U + this.numMaterials * (uint)this.materialNames.Count + this.numMaterials * (uint)this.materialExtraData.Count); } else { return(base.GetSize(header) + 17U + this.numMaterials * (uint)this.materialNames.Count + this.numMaterials * (uint)this.materialExtraData.Count); } } else { if (this.hasShader) { return(base.GetSize(header) + 13U + (uint)this.shaderName.Length); } else { return(base.GetSize(header) + 9U); } } } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.lod0Size = reader.ReadUInt32(); this.lod1Size = reader.ReadUInt32(); this.lod2Size = reader.ReadUInt32(); }
public override void Write(NiHeader header, BinaryWriter writer) { base.Write(header, writer); writer.Write(this.lod0Size); writer.Write(this.lod1Size); writer.Write(this.lod2Size); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.target = reader.ReadInt32(); this.stuff = reader.ReadBytes(48); this.data = reader.ReadInt32(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); for (int index = 0; index < 32; ++index) { this.data.Add(reader.ReadByte()); } }
public override void Write(NiHeader header, BinaryWriter writer) { base.Write(header, writer); writer.Write(this.rotationX); writer.Write(this.rotationY); writer.Write(this.rotationZ); writer.Write(this.zoom); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.rotationX = reader.ReadUInt16(); this.rotationY = reader.ReadUInt16(); this.rotationZ = reader.ReadUInt16(); this.zoom = reader.ReadSingle(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.translation = Utils.ReadVector3(reader); this.rotation = Utils.ReadVector4(reader); this.scale = reader.ReadSingle(); this.data = reader.ReadInt32(); }
public override uint GetSize(NiHeader header) { uint num = base.GetSize(header) + 68U; num += (uint)(4 + this.sourceTexture.Length); num += (uint)(4 + this.greyscaleTexture.Length); return(num); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); if (header.GetVersion() > 335544325U) this.stringDataIdx = reader.ReadInt32(); else this.stringData = Utils.ReadSizedString(reader); }
public override void Read(NiHeader header, BinaryReader reader) { this.shaderType = reader.ReadUInt32(); base.Read(header, reader); this.shaderFlags1 = reader.ReadUInt32(); this.shaderFlags2 = reader.ReadUInt32(); this.uvOffset = Utils.ReadUVCoord(reader); this.uvScale = Utils.ReadUVCoord(reader); this.textureSet = reader.ReadInt32(); this.emissiveColor = Utils.ReadColor3(reader); this.emissiveMultiplier = reader.ReadSingle(); this.textureClampMode = reader.ReadUInt32(); this.alpha = reader.ReadSingle(); this.unknownFloat2 = reader.ReadSingle(); this.glossiness = reader.ReadSingle(); this.specularColor = Utils.ReadColor3(reader); this.specularStrength = reader.ReadSingle(); this.lightingEffect1 = reader.ReadSingle(); this.lightingEffect2 = reader.ReadSingle(); if ((int)this.shaderType == 1) { this.environmentMapScale = reader.ReadSingle(); } else if ((int)this.shaderType == 5) { this.skinTintColor = Utils.ReadColor3(reader); } else if ((int)this.shaderType == 6) { this.hairTintColor = Utils.ReadColor3(reader); } else if ((int)this.shaderType == 7) { this.maxPasses = reader.ReadSingle(); this.scale = reader.ReadSingle(); } else if ((int)this.shaderType == 11) { this.parallaxInnerLayerThickness = reader.ReadSingle(); this.parallaxRefractionScale = reader.ReadSingle(); this.parallaxInnerLayerTextureScale = Utils.ReadUVCoord(reader); this.parallaxEnvmapStrength = reader.ReadSingle(); } else if ((int)this.shaderType == 14) { this.sparkleParameters = Utils.ReadVector4(reader); } else { if ((int)this.shaderType != 16) { return; } this.eyeCubemapScale = reader.ReadSingle(); this.leftEyeReflectionCenter = Utils.ReadVector3(reader); this.rightEyeReflectionCenter = Utils.ReadVector3(reader); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.shape = reader.ReadInt32(); this.stuff = reader.ReadBytes(16); this.moppSize = reader.ReadUInt32(); this.stuff2 = reader.ReadBytes(17); this.moppData = reader.ReadBytes((int)this.moppSize); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.multiBound = reader.ReadInt32(); if (header.GetUserVersion() >= 12) { this.cullMode = reader.ReadUInt32(); } }
public override void Write(NiHeader header, BinaryWriter writer) { base.Write(header, writer); writer.Write(this.numTextures); for (int index = 0; index < this.numTextures; ++index) { Utils.WriteSizedString(writer, this.textures[index]); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numTextures = reader.ReadInt32(); for (int index = 0; index < this.numTextures; ++index) { this.textures.Add(Utils.ReadSizedString(reader)); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.binarySize = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.binarySize; ++index) { this.binaryData.Add(reader.ReadByte()); } }
public override void Read(NiHeader header, BinaryReader reader) { Utils.ReadString(reader, header.GetVersion(), out this.nameIdx, out this.name); this.numExtraData = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numExtraData; ++index) { this.extraData.Add(reader.ReadInt32()); } this.controller = reader.ReadInt32(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numChildren = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numChildren; ++index) this.children.Add(reader.ReadInt32()); this.numEffects = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numEffects; ++index) this.effects.Add(reader.ReadInt32()); }
public override uint GetSize(NiHeader header) { uint num = base.GetSize(header) + 7U + 6U * (uint)this.GetNumTriangles(); for (int index = 0; index < (int)this.numMatchGroups; ++index) { num += (uint)(2 + 2 * (int)this.matchGroups[index].numVertices); } return(num); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.Flags = reader.ReadUInt16(); this.shaderType = reader.ReadUInt32(); this.shaderFlags = reader.ReadUInt32(); this.unknownInt2 = reader.ReadInt32(); this.envmapScale = reader.ReadSingle(); this.unknownInt3 = reader.ReadInt32(); this.textureSet = reader.ReadInt32(); this.unknownFloat2 = reader.ReadSingle(); this.refractionPeriod = reader.ReadInt32(); this.unknownFloat4 = reader.ReadSingle(); this.unknownFloat5 = reader.ReadSingle(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numStrips = reader.ReadUInt16(); for (int index = 0; index < (int)this.numStrips; ++index) this.stripLengths.Add(reader.ReadUInt16()); this.hasPoints = Utils.ReadBool(reader); if (!this.hasPoints) return; for (int index1 = 0; index1 < (int)this.numStrips; ++index1) { this.points.Add(new List<ushort>()); for (int index2 = 0; index2 < (int)this.stripLengths[index1]; ++index2) this.points[index1].Add(reader.ReadUInt16()); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); if (!((header.GetVersion() == 335675399U) && (header.GetUserVersion() >= 11) && (header.GetUserVersion2() > 21))) { this.ambientColor = Utils.ReadColor3(reader); this.diffuseColor = Utils.ReadColor3(reader); } this.specularColor = Utils.ReadColor3(reader); this.emissiveColor = Utils.ReadColor3(reader); this.glossiness = reader.ReadSingle(); this.alpha = reader.ReadSingle(); if ((header.GetVersion() == 335675399U) && (header.GetUserVersion() >= 11) && (header.GetUserVersion2() > 21)) { this.emitMulti = reader.ReadSingle(); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.shaderFlags1 = reader.ReadUInt32(); this.shaderFlags2 = reader.ReadUInt32(); this.uvOffset = Utils.ReadUVCoord(reader); this.uvScale = Utils.ReadUVCoord(reader); this.sourceTexture = Utils.ReadSizedString(reader); this.textureClampMode = reader.ReadUInt32(); this.falloffStartAngle = reader.ReadSingle(); this.falloffStopAngle = reader.ReadSingle(); this.falloffStartOpacity = reader.ReadSingle(); this.falloffStopOpacity = reader.ReadSingle(); this.emissiveColor = Utils.ReadColor4(reader); this.emissiveMultiple = reader.ReadSingle(); this.softFalloffDepth = reader.ReadSingle(); this.greyscaleTexture = Utils.ReadSizedString(reader); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.useExternal = reader.ReadByte(); if ((int)this.useExternal == 1) { this.fileName = Utils.ReadSizedString(reader); this.unknownLink = reader.ReadInt32(); } else { this.fileName = Utils.ReadSizedString(reader); this.pixelData = reader.ReadInt32(); } this.pixelLayout = reader.ReadUInt32(); this.useMipMaps = reader.ReadUInt32(); this.alphaFormat = reader.ReadUInt32(); this.isStatic = reader.ReadByte(); this.directRender = Utils.ReadBool(reader); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); if (header.GetVersion() <= 335544325U) { this.stencilEnabled = reader.ReadByte(); this.stencilFunction = reader.ReadUInt32(); this.stencilRef = reader.ReadUInt32(); this.stencilMask = reader.ReadUInt32(); this.failAction = reader.ReadUInt32(); this.zFailAction = reader.ReadUInt32(); this.passAction = reader.ReadUInt32(); this.drawMode = reader.ReadUInt32(); } if (header.GetVersion() >= 335609859U) { this.flags = reader.ReadUInt16(); this.stencilRef = reader.ReadUInt32(); this.stencilMask = reader.ReadUInt32(); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.data = reader.ReadInt32(); this.skinInstance = reader.ReadInt32(); if (header.GetVersion() > 335544325U) { this.numMaterials = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numMaterials; ++index) this.materialNames.Add(reader.ReadUInt32()); for (int index = 0; (long)index < (long)this.numMaterials; ++index) this.materialExtraData.Add(reader.ReadInt32()); this.activeMaterial = reader.ReadInt32(); this.dirtyFlag = Utils.ReadBool(reader); if (header.GetUserVersion() == 12) { this.bsProperties[0] = reader.ReadInt32(); this.bsProperties[1] = reader.ReadInt32(); } } else { this.hasShader = Utils.ReadBool(reader); if (!this.hasShader) return; this.shaderName = Utils.ReadSizedString(reader); this.unknownInt = reader.ReadInt32(); } }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.position = Utils.ReadVector3(reader); this.extent = Utils.ReadVector3(reader); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numTrianglePoints = reader.ReadUInt32(); this.hasTriangles = Utils.ReadBool(reader); if (this.hasTriangles) { for (int index = 0; index < (int)this.GetNumTriangles(); ++index) this.triangles.Add(Utils.ReadTriangle(reader)); } this.numMatchGroups = reader.ReadUInt16(); for (int index1 = 0; index1 < (int)this.numMatchGroups; ++index1) { MatchGroup matchGroup = new MatchGroup(); matchGroup.numVertices = reader.ReadUInt16(); matchGroup.vertexIndices = new List<ushort>(); for (int index2 = 0; index2 < (int)matchGroup.numVertices; ++index2) matchGroup.vertexIndices.Add(reader.ReadUInt16()); this.matchGroups.Add(matchGroup); } }
public override void Read(NiHeader header, BinaryReader reader) { this.shaderType = reader.ReadUInt32(); base.Read(header, reader); this.shaderFlags1 = reader.ReadUInt32(); this.shaderFlags2 = reader.ReadUInt32(); this.uvOffset = Utils.ReadUVCoord(reader); this.uvScale = Utils.ReadUVCoord(reader); this.textureSet = reader.ReadInt32(); this.emissiveColor = Utils.ReadColor3(reader); this.emissiveMultiplier = reader.ReadSingle(); this.textureClampMode = reader.ReadUInt32(); this.alpha = reader.ReadSingle(); this.unknownFloat2 = reader.ReadSingle(); this.glossiness = reader.ReadSingle(); this.specularColor = Utils.ReadColor3(reader); this.specularStrength = reader.ReadSingle(); this.lightingEffect1 = reader.ReadSingle(); this.lightingEffect2 = reader.ReadSingle(); if ((int)this.shaderType == 1) this.environmentMapScale = reader.ReadSingle(); else if ((int)this.shaderType == 5) this.skinTintColor = Utils.ReadColor3(reader); else if ((int)this.shaderType == 6) this.hairTintColor = Utils.ReadColor3(reader); else if ((int)this.shaderType == 7) { this.maxPasses = reader.ReadSingle(); this.scale = reader.ReadSingle(); } else if ((int)this.shaderType == 11) { this.parallaxInnerLayerThickness = reader.ReadSingle(); this.parallaxRefractionScale = reader.ReadSingle(); this.parallaxInnerLayerTextureScale = Utils.ReadUVCoord(reader); this.parallaxEnvmapStrength = reader.ReadSingle(); } else if ((int)this.shaderType == 14) { this.sparkleParameters = Utils.ReadVector4(reader); } else { if ((int)this.shaderType != 16) return; this.eyeCubemapScale = reader.ReadSingle(); this.leftEyeReflectionCenter = Utils.ReadVector3(reader); this.rightEyeReflectionCenter = Utils.ReadVector3(reader); } }
public virtual void Read(NiHeader header, BinaryReader reader) { }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.alphaSortBound = Utils.ReadVector4(reader); this.isStaticBound = reader.ReadByte(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); for (int index = 0; index < 16; ++index) this.data.Add(reader.ReadByte()); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.applyMode = reader.ReadUInt32(); this.textureCount = reader.ReadUInt32(); this.hasBaseTexture = Utils.ReadBool(reader); this.baseTexture = this.hasBaseTexture ? Utils.ReadTexDesc(reader) : (TexDesc)null; this.hasDarkTexture = Utils.ReadBool(reader); this.darkTexture = this.hasDarkTexture ? Utils.ReadTexDesc(reader) : (TexDesc)null; this.hasDetailTexture = Utils.ReadBool(reader); this.detailTexture = this.hasDetailTexture ? Utils.ReadTexDesc(reader) : (TexDesc)null; this.hasGlossTexture = Utils.ReadBool(reader); this.glossTexture = this.hasGlossTexture ? Utils.ReadTexDesc(reader) : (TexDesc)null; this.hasGlowTexture = Utils.ReadBool(reader); this.glowTexture = this.hasGlowTexture ? Utils.ReadTexDesc(reader) : (TexDesc)null; this.hasBumpMapTexture = Utils.ReadBool(reader); if (this.hasBumpMapTexture) { this.bumpMapTexture = Utils.ReadTexDesc(reader); this.bumpMapLumaScale = reader.ReadSingle(); this.bumpMapLumaOffset = reader.ReadSingle(); this.bumpMapMatrix = (float[][])null; } this.hasDecalTexture0 = Utils.ReadBool(reader); this.decalTexture0 = this.hasDecalTexture0 ? Utils.ReadTexDesc(reader) : (TexDesc)null; if (this.textureCount >= 8U) { this.hasDecalTexture1 = Utils.ReadBool(reader); this.decalTexture1 = this.hasDecalTexture1 ? Utils.ReadTexDesc(reader) : (TexDesc)null; if (this.textureCount >= 9U) { this.hasDecalTexture2 = Utils.ReadBool(reader); this.decalTexture2 = this.hasDecalTexture2 ? Utils.ReadTexDesc(reader) : (TexDesc)null; if (this.textureCount >= 10U) { this.hasDecalTexture3 = Utils.ReadBool(reader); this.decalTexture3 = this.hasDecalTexture3 ? Utils.ReadTexDesc(reader) : (TexDesc)null; } } } this.numShaderTextures = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numShaderTextures; ++index) this.shaderTextures.Add(new ShaderTexDesc() { isUsed = Utils.ReadBool(reader), textureData = Utils.ReadTexDesc(reader), mapIndex = reader.ReadUInt32() }); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.flags = reader.ReadUInt16(); if ((header.GetUserVersion() >= 11U) && (header.GetUserVersion2() >= 26U)) this.flags2 = reader.ReadUInt16(); this.translation = Utils.ReadVector3(reader); this.rotation = Utils.ReadMatrix33(reader); this.scale = reader.ReadSingle(); if ((header.GetVersion() <= 335544325U) || (header.GetUserVersion() <= 11U)) { this.numProperties = reader.ReadUInt32(); for (int index = 0; (long)index < (long)this.numProperties; ++index) this.properties.Add(reader.ReadInt32()); } else { } this.collisionObject = reader.ReadInt32(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numSegments = reader.ReadInt32(); for (int index = 0; index < this.numSegments; ++index) this.segments.Add(new BSSegment(0U, (ushort)0) { unknownByte1 = reader.ReadByte(), startTriangle = reader.ReadUInt32(), numTriangles = reader.ReadUInt16(), unknownShort1 = reader.ReadUInt16() }); }
public NiFile() { this.header = new NiHeader(); this.blocks = new List<NiObject>(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.flags = reader.ReadUInt16(); this.threshold = reader.ReadByte(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.numTriangles = reader.ReadUInt16(); }
public override void Read(NiHeader header, BinaryReader reader) { base.Read(header, reader); this.data = reader.ReadInt32(); }