public string ToStruct(LandTableFormat format) { StringBuilder result = new StringBuilder("{ "); result.Append(Bounds.ToStruct()); result.Append(", "); switch (format) { case LandTableFormat.SA1: case LandTableFormat.SADX: result.Append(Unknown1.ToCHex()); result.Append(", "); result.Append(Unknown2.ToCHex()); result.Append(", "); result.Append(Model != null ? "&" + Model.Name : "NULL"); result.Append(", "); result.AppendFormat(Unknown3.ToCHex()); break; case LandTableFormat.SA2: result.Append(Model != null ? "&" + Model.Name : "NULL"); result.Append(", "); result.Append(Unknown2.ToCHex()); result.Append(", "); result.Append(Unknown3.ToCHex()); break; } result.Append(", "); result.AppendFormat(Flags.ToCHex()); result.Append(" }"); return(result.ToString()); }
public void AsText(StringBuilder b, int pad) { b.Append(' ', pad); b.AppendLine("SceneCachedValues:"); b.Append(' ', pad++); b.AppendLine("{"); b.Append(' ', pad); b.AppendLine("Unknown1: 0x" + Unknown1.ToString("X8") + " (" + Unknown1 + ")"); b.Append(' ', pad); b.AppendLine("Unknown2: 0x" + Unknown2.ToString("X8") + " (" + Unknown2 + ")"); b.Append(' ', pad); b.AppendLine("Unknown3: 0x" + Unknown3.ToString("X8") + " (" + Unknown3 + ")"); AABB1.AsText(b, pad); AABB2.AsText(b, pad); b.Append(' ', pad); b.AppendLine("Unknown4:"); b.Append(' ', pad); b.AppendLine("{"); for (int i = 0; i < Unknown4.Length;) { b.Append(' ', pad + 1); for (int j = 0; j < 8 && i < Unknown4.Length; j++, i++) { b.Append("0x" + Unknown4[i].ToString("X8") + ", "); } b.AppendLine(); } b.Append(' ', pad); b.AppendLine("}"); b.AppendLine(); b.Append(' ', pad); b.AppendLine("Unknown5: 0x" + Unknown5.ToString("X8") + " (" + Unknown5 + ")"); b.Append(' ', --pad); b.AppendLine("}"); }
public override void WriteBinary(ESPWriter writer) { Marker.WriteBinary(writer); if (Unknown1 != null) { Unknown1.WriteBinary(writer); } if (AudioLocation != null) { AudioLocation.WriteBinary(writer); } if (Unknown2 != null) { Unknown2.WriteBinary(writer); } if (Unknown3 != null) { Unknown3.WriteBinary(writer); } if (Unknown4 != null) { Unknown4.WriteBinary(writer); } }
public NavigationConnectionInfo(NavigationConnectionInfo copyObject) { if (copyObject.Unknown1 != null) { Unknown1 = (FormID)copyObject.Unknown1.Clone(); } if (copyObject.Unknown2 != null) { foreach (var temp in copyObject.Unknown2) { Unknown2.Add((FormID)temp.Clone()); } } if (copyObject.Unknown3 != null) { foreach (var temp in copyObject.Unknown3) { Unknown3.Add((FormID)temp.Clone()); } } if (copyObject.Doors != null) { foreach (var temp in copyObject.Doors) { Doors.Add((FormID)temp.Clone()); } } }
/// <summary> /// Writes the data element into the given buffer (at its current position). /// </summary> /// <param name="buffer">The buffer where the data element should be deserialized into.</param> public void WriteData(RAMBuffer buffer) { buffer.WriteUShort((ushort)PlayerName.Length); buffer.WriteString(PlayerName); buffer.WriteFloat(InitialCameraX); buffer.WriteFloat(InitialCameraY); buffer.WriteShort(UnknownX); buffer.WriteShort(UnknownY); buffer.WriteByte(AlliedVictory); ScenarioDataElementTools.AssertTrue(Diplomacy1.Count == Diplomacy2.Count); buffer.WriteUShort((ushort)Diplomacy1.Count); Diplomacy1.ForEach(d => buffer.WriteByte((byte)d)); Diplomacy2.ForEach(d => buffer.WriteUInteger((uint)d)); buffer.WriteUInteger(Color); buffer.WriteFloat(Unknown1); buffer.WriteUShort(Unknown3Count); if (Unknown1 == 2) { ScenarioDataElementTools.AssertListLength(Unknown2, 8); Unknown2.ForEach(b => buffer.WriteByte(b)); } ScenarioDataElementTools.AssertListLength(Unknown3, Unknown3Count * 44); Unknown3.ForEach(b => buffer.WriteByte(b)); ScenarioDataElementTools.AssertListLength(Unknown4, 7); Unknown4.ForEach(b => buffer.WriteByte(b)); buffer.WriteInteger(Unknown5); }
public override void WriteXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Marker", true, out subEle); Marker.WriteXML(subEle, master); if (Unknown1 != null) { ele.TryPathTo("Unknown1", true, out subEle); Unknown1.WriteXML(subEle, master); } if (AudioLocation != null) { ele.TryPathTo("AudioLocation", true, out subEle); AudioLocation.WriteXML(subEle, master); } if (Unknown2 != null) { ele.TryPathTo("Unknown2", true, out subEle); Unknown2.WriteXML(subEle, master); } if (Unknown3 != null) { ele.TryPathTo("Unknown3", true, out subEle); Unknown3.WriteXML(subEle, master); } if (Unknown4 != null) { ele.TryPathTo("Unknown4", true, out subEle); Unknown4.WriteXML(subEle, master); } }
public void WriteXml(XmlWriter writer) { writer.WriteAttributeString("class", ClassName); writer.WriteAttributeString("classVersion", Version.ToString()); writer.WriteAttributeString("addr", String.Format("0x{0:X8}", Address)); writer.WriteAttributeString("unknown1", Unknown1.ToString()); writer.WriteAttributeString("unknown2", Unknown2.ToString()); writer.WriteStartElement("staticProperties"); foreach (var staticProperty in StaticProperties) { writer.WriteStartElement("property"); staticProperty.WriteXml(writer); writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("dynamicProperties"); foreach (var dynamicProperty in DynamicProperties) { writer.WriteStartElement("property"); dynamicProperty.WriteXml(writer); writer.WriteEndElement(); } writer.WriteEndElement(); }
public void WriteData(HSDWriter Writer) { Unknown1.WriteData(Writer); Unknown2.WriteData(Writer); Unknown1.WriteObject(Writer); Unknown2.WriteObject(Writer); }
public xxFrame Clone(bool mesh, bool childFrames) { xxFrame frame = new xxFrame(); frame.InitChildren(children.Count); frame.Name = Name; frame.Matrix = Matrix; frame.Unknown1 = (byte[])Unknown1.Clone(); frame.Bounds = Bounds; frame.Unknown2 = (byte[])Unknown2.Clone(); if (Name2 != null) { frame.Name2 = Name2; } if (mesh && (Mesh != null)) { frame.Mesh = Mesh.Clone(true, true, true); } if (childFrames) { for (int i = 0; i < children.Count; i++) { frame.AddChild(children[i].Clone(mesh, true)); } } return(frame); }
public override int GetHashCode() { var hash = 1; if (Unknown1 != 0) { hash ^= Unknown1.GetHashCode(); } if (Unknown2 != 0L) { hash ^= Unknown2.GetHashCode(); } if (ApiUrl.Length != 0) { hash ^= ApiUrl.GetHashCode(); } if (unknown6_ != null) { hash ^= Unknown6.GetHashCode(); } if (auth_ != null) { hash ^= Auth.GetHashCode(); } hash ^= payload_.GetHashCode(); if (ErrorMessage.Length != 0) { hash ^= ErrorMessage.GetHashCode(); } return(hash); }
public override int Serialize(byte[] codeplugContents, int address) { var contents = new byte[CONTENTS_LENGTH + (HasExtraByte ? 1 : 0)].AsSpan(); Unknown1.CopyTo(contents.Slice(UNKNOWN1, 13)); Unknown2.CopyTo(contents.Slice(UNKNOWN2, 9)); contents[RSSI] = (byte)(RssiAlignment & 0b01111111); Unknown3.CopyTo(contents.Slice(UNKNOWN3, 2)); contents[MIC_GAIN] = (byte)((InternalMicPreAmpGain & 0b111) << 5); contents[MIC_GAIN] |= (byte)((ExternalMicPreAmpGain & 0b111) << 2); contents[MIC_GAIN] |= (byte)(UnknownMicBits & 0b11); Unknown4.CopyTo(contents.Slice(UNKNOWN4, 9)); Unknown5.CopyTo(contents.Slice(UNKNOWN5, 4)); if (HasExtraByte) { contents[UNKNOWNEXTRABYTE] = UnknownExtraByte; } var nextAddress = address + contents.Length + BlockSizeAdjustment; nextAddress = SerializeChild(Block06, BLOCK_06_VECTOR, codeplugContents, nextAddress, contents); nextAddress = SerializeChild(Block03, BLOCK_03_VECTOR, codeplugContents, nextAddress, contents); nextAddress = SerializeChild(Block0C, BLOCK_0C_VECTOR, codeplugContents, nextAddress, contents); nextAddress = SerializeChild(Block0F, BLOCK_0F_VECTOR, codeplugContents, nextAddress, contents); nextAddress = SerializeChild(Block11, BLOCK_11_VECTOR, codeplugContents, nextAddress, contents); Serializer(codeplugContents, address, contents); return(nextAddress); }
public bool Equals(LoadScreenTypeData other) { if (System.Object.ReferenceEquals(this, other)) { return(true); } if (((object)this == null) || ((object)other == null)) { return(false); } return(Type == other.Type && X == other.X && Y == other.Y && Width == other.Width && Height == other.Height && Orientation == other.Orientation && Font1 == other.Font1 && Font1Red == other.Font1Red && Font1Green == other.Font1Green && Font1Blue == other.Font1Blue && Font1Alignment == other.Font1Alignment && Unknown1.SequenceEqual(other.Unknown1) && Font2 == other.Font2 && Font2Red == other.Font2Red && Font2Green == other.Font2Green && Font2Blue == other.Font2Blue && Unknown2.SequenceEqual(other.Unknown2) && Stats == other.Stats); }
public void ImportData() { BrakeParts.Import(); BrakeControllerParts.Import(); SteerParts.Import(); ChassisParts.Import(); LightweightParts.Import(); RacingModifyParts.Import(); EngineParts.Import(); PortPolishParts.Import(); EngineBalanceParts.Import(); DisplacementParts.Import(); ComputerParts.Import(); NATuneParts.Import(); TurbineKitParts.Import(); DrivetrainParts.Import(); FlywheelParts.Import(); ClutchParts.Import(); PropellerShaftParts.Import(); GearParts.Import(); SuspensionParts.Import(); IntercoolerParts.Import(); MufflerParts.Import(); LSDParts.Import(); TiresFrontParts.Import(); TiresRearParts.Import(); Unknown1.Import(); Unknown2.Import(); Unknown3.Import(); Unknown4.Import(); Unknown5.Import(); Unknown6.Import(); Unknown7.Import(); Cars.Import(); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Type", true, out subEle); subEle.Value = Type.ToString(); ele.TryPathTo("X", true, out subEle); subEle.Value = X.ToString(); ele.TryPathTo("Y", true, out subEle); subEle.Value = Y.ToString(); ele.TryPathTo("Width", true, out subEle); subEle.Value = Width.ToString(); ele.TryPathTo("Height", true, out subEle); subEle.Value = Height.ToString(); ele.TryPathTo("Orientation", true, out subEle); subEle.Value = Orientation.ToString("G15"); ele.TryPathTo("Font1/Font", true, out subEle); subEle.Value = Font1.ToString(); ele.TryPathTo("Font1/Color/Red", true, out subEle); subEle.Value = Font1Red.ToString("G15"); ele.TryPathTo("Font1/Color/Green", true, out subEle); subEle.Value = Font1Green.ToString("G15"); ele.TryPathTo("Font1/Color/Blue", true, out subEle); subEle.Value = Font1Blue.ToString("G15"); ele.TryPathTo("Font1/Alignment", true, out subEle); subEle.Value = Font1Alignment.ToString(); ele.TryPathTo("Unknown1", true, out subEle); subEle.Value = Unknown1.ToHex(); ele.TryPathTo("Font2/Font", true, out subEle); subEle.Value = Font2.ToString(); ele.TryPathTo("Font2/Color/Red", true, out subEle); subEle.Value = Font2Red.ToString("G15"); ele.TryPathTo("Font2/Color/Green", true, out subEle); subEle.Value = Font2Green.ToString("G15"); ele.TryPathTo("Font2/Color/Blue", true, out subEle); subEle.Value = Font2Blue.ToString("G15"); ele.TryPathTo("Unknown2", true, out subEle); subEle.Value = Unknown2.ToHex(); ele.TryPathTo("Stats", true, out subEle); subEle.Value = Stats.ToString(); }
public bool Equals(ImageSpaceAdapterData other) { if (System.Object.ReferenceEquals(this, other)) { return(true); } if (((object)this == null) || ((object)other == null)) { return(false); } return(IsAnimatable == other.IsAnimatable && Duration == other.Duration && HDREyeAdaptSpeedMult == other.HDREyeAdaptSpeedMult && HDREyeAdaptSpeedAdd == other.HDREyeAdaptSpeedAdd && HDRBloomBlurRadiusMult == other.HDRBloomBlurRadiusMult && HDRBloomBlurRadiusAdd == other.HDRBloomBlurRadiusAdd && HDRBloomThresholdMult == other.HDRBloomThresholdMult && HDRBloomThresholdAdd == other.HDRBloomThresholdAdd && HDRBloomScaleMult == other.HDRBloomScaleMult && HDRBloomScaleAdd == other.HDRBloomScaleAdd && HDRTargetLumMinMult == other.HDRTargetLumMinMult && HDRTargetLumMinAdd == other.HDRTargetLumMinAdd && HDRTargetLumMaxMult == other.HDRTargetLumMaxMult && HDRTargetLumMaxAdd == other.HDRTargetLumMaxAdd && HDRSunlightScaleMult == other.HDRSunlightScaleMult && HDRSunlightScaleAdd == other.HDRSunlightScaleAdd && HDRSkyScaleMult == other.HDRSkyScaleMult && HDRSkyScaleAdd == other.HDRSkyScaleAdd && Unknown1.SequenceEqual(other.Unknown1) && CinematicSaturationMult == other.CinematicSaturationMult && CinematicSaturationAdd == other.CinematicSaturationAdd && CinematicBrightnessMult == other.CinematicBrightnessMult && CinematicBrightnessAdd == other.CinematicBrightnessAdd && CinematicContrastMult == other.CinematicContrastMult && CinematicContrastAdd == other.CinematicContrastAdd && Unknown2.SequenceEqual(other.Unknown2) && TintColor == other.TintColor && BlurRadius == other.BlurRadius && DoubleVisionStrength == other.DoubleVisionStrength && RadialBlurStrength == other.RadialBlurStrength && RadialBlurRampUp == other.RadialBlurRampUp && RadialBlurStart == other.RadialBlurStart && RadialBlurUseTarget == other.RadialBlurUseTarget && RadialBlurCenterX == other.RadialBlurCenterX && RadialBlurCenterY == other.RadialBlurCenterY && DepthOfFieldStrength == other.DepthOfFieldStrength && DepthOfFieldDistance == other.DepthOfFieldDistance && DepthOfFieldRange == other.DepthOfFieldRange && DepthOfFieldUseTarget == other.DepthOfFieldUseTarget && RadialBlurRampDown == other.RadialBlurRampDown && RadialBlurDownStart == other.RadialBlurDownStart && FadeColor == other.FadeColor && MotionBlurStrength == other.MotionBlurStrength); }
public void ReadData(string filename) { using (FileStream file = new FileStream(filename, FileMode.Open, FileAccess.Read)) { var blocks = new List <DataBlock>(); for (int i = 1; i <= 34; i++) { file.Position = 8 * i; uint blockStart = file.ReadUInt(); uint blockSize = file.ReadUInt(); blocks.Add(new DataBlock { BlockStart = blockStart, BlockSize = blockSize }); } BrakeParts.Read(file, blocks[0].BlockStart, blocks[0].BlockSize); BrakeControllerParts.Read(file, blocks[1].BlockStart, blocks[1].BlockSize); SteerParts.Read(file, blocks[2].BlockStart, blocks[2].BlockSize); ChassisParts.Read(file, blocks[3].BlockStart, blocks[3].BlockSize); LightweightParts.Read(file, blocks[4].BlockStart, blocks[4].BlockSize); RacingModifyParts.Read(file, blocks[5].BlockStart, blocks[5].BlockSize); EngineParts.Read(file, blocks[6].BlockStart, blocks[6].BlockSize); PortPolishParts.Read(file, blocks[7].BlockStart, blocks[7].BlockSize); EngineBalanceParts.Read(file, blocks[8].BlockStart, blocks[8].BlockSize); DisplacementParts.Read(file, blocks[9].BlockStart, blocks[9].BlockSize); ComputerParts.Read(file, blocks[10].BlockStart, blocks[10].BlockSize); NATuneParts.Read(file, blocks[11].BlockStart, blocks[11].BlockSize); TurbineKitParts.Read(file, blocks[12].BlockStart, blocks[12].BlockSize); DrivetrainParts.Read(file, blocks[13].BlockStart, blocks[13].BlockSize); FlywheelParts.Read(file, blocks[14].BlockStart, blocks[14].BlockSize); ClutchParts.Read(file, blocks[15].BlockStart, blocks[15].BlockSize); PropellerShaftParts.Read(file, blocks[16].BlockStart, blocks[16].BlockSize); GearParts.Read(file, blocks[17].BlockStart, blocks[17].BlockSize); SuspensionParts.Read(file, blocks[18].BlockStart, blocks[18].BlockSize); IntercoolerParts.Read(file, blocks[19].BlockStart, blocks[19].BlockSize); MufflerParts.Read(file, blocks[20].BlockStart, blocks[20].BlockSize); LSDParts.Read(file, blocks[21].BlockStart, blocks[21].BlockSize); TiresFrontParts.Read(file, blocks[22].BlockStart, blocks[22].BlockSize); TiresRearParts.Read(file, blocks[23].BlockStart, blocks[23].BlockSize); Unknown1.Read(file, blocks[24].BlockStart, blocks[24].BlockSize); Unknown2.Read(file, blocks[25].BlockStart, blocks[25].BlockSize); Unknown3.Read(file, blocks[26].BlockStart, blocks[26].BlockSize); Unknown4.Read(file, blocks[27].BlockStart, blocks[27].BlockSize); Unknown5.Read(file, blocks[28].BlockStart, blocks[28].BlockSize); Unknown6.Read(file, blocks[29].BlockStart, blocks[29].BlockSize); Events.Read(file, blocks[30].BlockStart, blocks[30].BlockSize); EnemyCars.Read(file, blocks[31].BlockStart, blocks[31].BlockSize); Cars.Read(file, blocks[32].BlockStart, blocks[32].BlockSize); CarsSports.Read(file, blocks[33].BlockStart, blocks[33].BlockSize); uint stringTableStart = blocks[33].BlockStart + blocks[33].BlockSize; RaceStringTable.Read(file, stringTableStart, (uint)file.Length - stringTableStart); } }
public override void ReadXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("Marker", false, out subEle)) { Marker.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown1", false, out subEle)) { if (Unknown1 == null) { Unknown1 = new SimpleSubrecord <Byte[]>(); } Unknown1.ReadXML(subEle, master); } if (ele.TryPathTo("AudioLocation", false, out subEle)) { if (AudioLocation == null) { AudioLocation = new RecordReference(); } AudioLocation.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown2", false, out subEle)) { if (Unknown2 == null) { Unknown2 = new SimpleSubrecord <Byte[]>(); } Unknown2.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown3", false, out subEle)) { if (Unknown3 == null) { Unknown3 = new SimpleSubrecord <Single>(); } Unknown3.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown4", false, out subEle)) { if (Unknown4 == null) { Unknown4 = new SimpleSubrecord <Single>(); } Unknown4.ReadXML(subEle, master); } }
public void WriteData(string filename) { using (FileStream file = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite)) { file.Write(new byte[] { 0x47, 0x54, 0x44, 0x54, 0x6C, 0x00, 0x3E, 0x00 }, 0, 8); // The 0x3E is the number of indices file.Position = (0x3E * 8) + 7; file.WriteByte(0x00); // Data starts at 0x1F8 so position EOF uint i = 1; BrakeParts.Write(file, 8 * i++); BrakeControllerParts.Write(file, 8 * i++); SteerParts.Write(file, 8 * i++); ChassisParts.Write(file, 8 * i++); LightweightParts.Write(file, 8 * i++); RacingModifyParts.Write(file, 8 * i++); EngineParts.Write(file, 8 * i++); PortPolishParts.Write(file, 8 * i++); EngineBalanceParts.Write(file, 8 * i++); DisplacementParts.Write(file, 8 * i++); ComputerParts.Write(file, 8 * i++); NATuneParts.Write(file, 8 * i++); TurbineKitParts.Write(file, 8 * i++); DrivetrainParts.Write(file, 8 * i++); FlywheelParts.Write(file, 8 * i++); ClutchParts.Write(file, 8 * i++); PropellerShaftParts.Write(file, 8 * i++); GearParts.Write(file, 8 * i++); SuspensionParts.Write(file, 8 * i++); IntercoolerParts.Write(file, 8 * i++); MufflerParts.Write(file, 8 * i++); LSDParts.Write(file, 8 * i++); TiresFrontParts.Write(file, 8 * i++); TiresRearParts.Write(file, 8 * i++); Unknown1.Write(file, 8 * i++); Unknown2.Write(file, 8 * i++); Unknown3.Write(file, 8 * i++); Unknown4.Write(file, 8 * i++); Unknown5.Write(file, 8 * i++); Unknown6.Write(file, 8 * i++); Unknown7.Write(file, 8 * i++); Cars.Write(file, 8 * i++); file.Position = 0; using (FileStream zipFile = new FileStream(filename + ".gz", FileMode.Create, FileAccess.Write)) { using (GZipStream zip = new GZipStream(zipFile, CompressionMode.Compress)) { file.CopyTo(zip); } } } }
public override void SetListBytes(ref List <byte> listBytes) { sectionIdentifier = Section.LEDR; int previousSize = listBytes.Count; if (LevelLabel.Length > 64) { LevelLabel = new string(LevelLabel.Take(64).ToArray()); } foreach (char c in LevelLabel) { listBytes.Add((byte)c); } for (int i = LevelLabel.Length; i < 64; i++) { listBytes.Add(0); } listBytes.AddRange(GameProgress.Reverse()); listBytes.AddRange(Unknown1.Reverse()); listBytes.AddRange(Unknown2.Reverse()); listBytes.AddRange(Unknown3.Reverse()); if (ThumbnailIcon != ThumbIcon.None) { listBytes.Add((byte)ThumbnailIcon); listBytes.Add(0); listBytes.Add(0); listBytes.Add(0); } listBytes.AddRange(Unknown4.Reverse()); if (UnknownText.Length > 0xA8) { UnknownText = new string(UnknownText.Take(0xA8).ToArray()); } foreach (char c in UnknownText) { listBytes.Add((byte)c); } bytesUsed = listBytes.Count - previousSize; for (int i = bytesUsed; i < 0x100; i++) { listBytes.Add(0xBF); } blockSize = listBytes.Count - previousSize; }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { return(Timestamp.GetHashCode() ^ Second.GetHashCode() ^ DistanceMiles.GetHashCode() ^ WorkoutTime.GetHashCode() ^ SpeedMph.GetHashCode() ^ RotationsPerMinute.GetHashCode() ^ Unknown1.GetHashCode() ^ SpeedValue.GetHashCode() ^ Unknown2.GetHashCode() ^ Unknown3.GetHashCode()); }
public override int GetHashCode() { var hash = 1; if (Unknown1 != 0) { hash ^= Unknown1.GetHashCode(); } if (unknown2_ != null) { hash ^= Unknown2.GetHashCode(); } return(hash); }
public PlayerShip(byte[] byteArray, int startIndex) { if (byteArray != null) { if (_log.IsInfoEnabled) { _log.InfoFormat("{0}--bytes in: {1}", MethodBase.GetCurrentMethod().ToString(), Utility.BytesToDebugString(byteArray)); } Unknown0 = BitConverter.ToInt32(byteArray, startIndex); if (_log.IsInfoEnabled) { _log.InfoFormat("Unknown0={0}", Unknown0.ToString()); } Unknown1 = BitConverter.ToInt32(byteArray, startIndex + 4); if (_log.IsInfoEnabled) { _log.InfoFormat("Unknown1={0}", Unknown1.ToString()); } Unknown2 = BitConverter.ToInt32(byteArray, startIndex + 8); if (_log.IsInfoEnabled) { _log.InfoFormat("Unknown2={0}", Unknown2.ToString()); } Name = new ArtemisString(byteArray, startIndex + 12); if (_log.IsInfoEnabled) { _log.InfoFormat("Name={0}", Name.ToString()); } Length = 16 + Name.Length * 2; if (_log.IsInfoEnabled) { _log.InfoFormat("Length={0}", Length.ToString()); } if (_log.IsInfoEnabled) { _log.InfoFormat("{0}--Result bytes: {1}", MethodBase.GetCurrentMethod().ToString(), Utility.BytesToDebugString(this.GetBytes())); } } }
public bool Equals(PedType other) { if (other == null) { return(false); } return(Flag.Equals(other.Flag) && Unknown0.Equals(other.Unknown0) && Unknown1.Equals(other.Unknown1) && Unknown2.Equals(other.Unknown2) && Unknown3.Equals(other.Unknown3) && Unknown4.Equals(other.Unknown4) && Threats.Equals(other.Threats) && Avoid.Equals(other.Avoid)); }
public bool Equals(NavigationConnectionInfo other) { if (System.Object.ReferenceEquals(this, other)) { return(true); } if (((object)this == null) || ((object)other == null)) { return(false); } return(Unknown1 == other.Unknown1 && Unknown2.SequenceEqual(other.Unknown2) && Unknown3.SequenceEqual(other.Unknown3) && Doors.SequenceEqual(other.Doors)); }
public string ToStruct() { StringBuilder result = new StringBuilder("{ "); result.Append(Unknown1.ToCHex()); result.Append(", "); result.Append(Unknown2.ToC()); result.Append(", "); result.Append(Unknown3.ToC()); result.Append(", "); result.Append(Model != null ? "&" + Model.Name : "NULL"); result.Append(", "); result.Append(Animation != null ? "&" + ActionName : "NULL"); result.Append(", (NJS_TEXLIST *)"); result.Append(Unknown4.ToCHex()); result.Append(" }"); return(result.ToString()); }
public void MergeFrom(Unknown6 other) { if (other == null) { return; } if (other.Unknown1 != 0) { Unknown1 = other.Unknown1; } if (other.unknown2_ != null) { if (unknown2_ == null) { unknown2_ = new global::PokemonGo.RocketAPI.GeneratedCode.Response.Types.Unknown6.Types.Unknown2(); } Unknown2.MergeFrom(other.Unknown2); } }
public xxSubmesh Clone() { xxSubmesh submesh = new xxSubmesh(); submesh.Unknown1 = (byte[])Unknown1.Clone(); submesh.MaterialIndex = MaterialIndex; submesh.FaceList = new List <xxFace>(FaceList.Count); for (int i = 0; i < FaceList.Count; i++) { submesh.FaceList.Add(FaceList[i].Clone()); } submesh.VertexList = new List <xxVertex>(VertexList.Count); for (int i = 0; i < VertexList.Count; i++) { submesh.VertexList.Add(VertexList[i].Clone()); } submesh.Unknown2 = Unknown2.CloneIfNotNull(); if (Vector2Lists != null) { submesh.Vector2Lists = new List <List <Vector2> >(Vector2Lists.Count); for (int i = 0; i < Vector2Lists.Count; i++) { List <Vector2> vectorList = new List <Vector2>(Vector2Lists[i].Count); submesh.Vector2Lists.Add(vectorList); for (int j = 0; j < Vector2Lists[i].Count; j++) { vectorList.Add(Vector2Lists[i][j]); } } } submesh.Unknown3 = Unknown3.CloneIfNotNull(); submesh.Unknown4 = Unknown4.CloneIfNotNull(); submesh.Unknown5 = Unknown5.CloneIfNotNull(); submesh.Unknown6 = Unknown6.CloneIfNotNull(); return(submesh); }
protected override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("Unknown1", false, out subEle)) { Unknown1.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown2", false, out subEle)) { foreach (XElement e in subEle.Elements()) { var temp = new FormID(); temp.ReadXML(e, master); Unknown2.Add(temp); } } if (ele.TryPathTo("Unknown3", false, out subEle)) { foreach (XElement e in subEle.Elements()) { var temp = new FormID(); temp.ReadXML(e, master); Unknown3.Add(temp); } } if (ele.TryPathTo("Doors", false, out subEle)) { foreach (XElement e in subEle.Elements()) { var temp = new FormID(); temp.ReadXML(e, master); Doors.Add(temp); } } }
protected override void ReadData(ESPReader reader) { using (MemoryStream stream = new MemoryStream(reader.ReadBytes(size))) using (ESPReader subReader = new ESPReader(stream, reader.Plugin)) { try { Unknown1.ReadBinary(subReader); Int32 Unknown2Count = subReader.ReadInt32(); for (int i = 0; i < Unknown2Count; i++) { var temp = new FormID(); temp.ReadBinary(subReader); Unknown2.Add(temp); } Int32 Unknown3Count = subReader.ReadInt32(); for (int i = 0; i < Unknown3Count; i++) { var temp = new FormID(); temp.ReadBinary(subReader); Unknown3.Add(temp); } Int32 DoorsCount = subReader.ReadInt32(); for (int i = 0; i < DoorsCount; i++) { var temp = new FormID(); temp.ReadBinary(subReader); Doors.Add(temp); } } catch { return; } } }
public override int GetHashCode() { int hash = 1; if (Category != 0) { hash ^= Category.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (Bitrate != 0) { hash ^= Bitrate.GetHashCode(); } if (Fps != 0) { hash ^= Fps.GetHashCode(); } if (Unknown1 != 0) { hash ^= Unknown1.GetHashCode(); } if (Unknown2 != 0) { hash ^= Unknown2.GetHashCode(); } if (Unknown3 != 0) { hash ^= Unknown3.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }