public InstanceEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
public void UpdateSB(int Index) { Twinsanity.SurfaceBehaviour SB = (Twinsanity.SurfaceBehaviour)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[5].Nodes[Index])); Flag11.Checked = (SB.Flag[0] & 1) >> 0 != 0; Flag12.Checked = (SB.Flag[0] & 2) >> 1 != 0; Flag13.Checked = (SB.Flag[0] & 4) >> 2 != 0; Flag14.Checked = (SB.Flag[0] & 8) >> 3 != 0; Flag15.Checked = (SB.Flag[0] & 16) >> 4 != 0; Flag16.Checked = (SB.Flag[0] & 32) >> 5 != 0; Flag17.Checked = (SB.Flag[0] & 64) >> 6 != 0; Flag18.Checked = (SB.Flag[0] & 128) >> 7 != 0; Flag21.Checked = (SB.Flag[1] & 1) >> 0 != 0; Flag22.Checked = (SB.Flag[1] & 2) >> 1 != 0; Flag23.Checked = (SB.Flag[1] & 4) >> 2 != 0; Flag24.Checked = (SB.Flag[1] & 8) >> 3 != 0; Flag25.Checked = (SB.Flag[1] & 16) >> 4 != 0; Flag26.Checked = (SB.Flag[1] & 32) >> 5 != 0; Flag27.Checked = (SB.Flag[1] & 64) >> 6 != 0; Flag28.Checked = (SB.Flag[1] & 128) >> 7 != 0; Flag31.Checked = (SB.Flag[2] & 1) >> 0 != 0; Flag32.Checked = (SB.Flag[2] & 2) >> 1 != 0; Flag33.Checked = (SB.Flag[2] & 4) >> 2 != 0; Flag34.Checked = (SB.Flag[2] & 8) >> 3 != 0; Flag35.Checked = (SB.Flag[2] & 16) >> 4 != 0; Flag36.Checked = (SB.Flag[2] & 32) >> 5 != 0; Flag37.Checked = (SB.Flag[2] & 64) >> 6 != 0; Flag38.Checked = (SB.Flag[2] & 128) >> 7 != 0; Flag41.Checked = (SB.Flag[3] & 1) >> 0 != 0; Flag42.Checked = (SB.Flag[3] & 2) >> 1 != 0; Flag43.Checked = (SB.Flag[3] & 4) >> 2 != 0; Flag44.Checked = (SB.Flag[3] & 8) >> 3 != 0; Flag45.Checked = (SB.Flag[3] & 16) >> 4 != 0; Flag46.Checked = (SB.Flag[3] & 32) >> 5 != 0; Flag47.Checked = (SB.Flag[3] & 64) >> 6 != 0; Flag48.Checked = (SB.Flag[3] & 128) >> 7 != 0; ID1Val.Text = SB.IDs[0].ToString(); ID2Val.Text = SB.IDs[1].ToString(); ID3Val.Text = SB.IDs[2].ToString(); ID4Val.Text = SB.IDs[3].ToString(); ID5Val.Text = SB.IDs[4].ToString(); ID6Val.Text = SB.IDs[5].ToString(); ID7Val.Text = SB.IDs[6].ToString(); ID8Val.Text = SB.IDs[7].ToString(); ID9Val.Text = SB.IDs[8].ToString(); ID10Val.Text = SB.IDs[9].ToString(); F11Val.Text = SB.Pos[0].X.ToString(); F12Val.Text = SB.Pos[0].Y.ToString(); F13Val.Text = SB.Pos[0].Z.ToString(); F14Val.Text = SB.Pos[0].W.ToString(); F21Val.Text = SB.Pos[1].X.ToString(); F22Val.Text = SB.Pos[1].Y.ToString(); F23Val.Text = SB.Pos[1].Z.ToString(); F24Val.Text = SB.Pos[1].W.ToString(); F31Val.Text = SB.Pos[2].X.ToString(); F32Val.Text = SB.Pos[2].Y.ToString(); F33Val.Text = SB.Pos[2].Z.ToString(); F34Val.Text = SB.Pos[2].W.ToString(); F41Val.Text = SB.Pos[3].X.ToString(); F42Val.Text = SB.Pos[3].Y.ToString(); F43Val.Text = SB.Pos[3].Z.ToString(); F44Val.Text = SB.Pos[3].W.ToString(); EI1Val.Text = SB.EndIn16[0].ToString(); EI2Val.Text = SB.EndIn16[1].ToString(); EI3Val.Text = SB.EndIn16[2].ToString(); EI4Val.Text = SB.EndIn16[3].ToString(); EI5Val.Text = SB.EndIn16[4].ToString(); EI6Val.Text = SB.EndIn16[5].ToString(); EI7Val.Text = SB.EndIn16[6].ToString(); EI8Val.Text = SB.EndIn16[7].ToString(); EI9Val.Text = SB.EndIn16[8].ToString(); EI10Val.Text = SB.EndIn16[9].ToString(); EI11Val.Text = SB.EndIn16[10].ToString(); EI12Val.Text = SB.EndIn16[11].ToString(); ItemId = SB.ID; this.Text = "ID: " + SB.ID.ToString(); }
public SurfaceBehaviorEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
public void UpdateFS(int Index) { Twinsanity.FuckingShit FS = (Twinsanity.FuckingShit)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[2].Nodes[Index])); ID1Val.Text = FS.I16[0].ToString(); ID2Val.Text = FS.I16[1].ToString(); ID3Val.Text = FS.I16[2].ToString(); ID4Val.Text = FS.I16[3].ToString(); ID5Val.Text = FS.I16[4].ToString(); ItemId = FS.ID; this.Text = "ID: " + FS.ID.ToString(); }
public void ApplySB(int Index) { Twinsanity.SurfaceBehaviour SB = new Twinsanity.SurfaceBehaviour(); SB.Flag[0] = 0; SB.Flag[1] = 0; SB.Flag[2] = 0; SB.Flag[3] = 0; SB.Flag[0] += (byte)(Flag11.Checked ? 1 : 0 << 0); SB.Flag[0] += (byte)(Flag12.Checked ? 1 : 0 << 1); SB.Flag[0] += (byte)(Flag13.Checked ? 1 : 0 << 2); SB.Flag[0] += (byte)(Flag14.Checked ? 1 : 0 << 3); SB.Flag[0] += (byte)(Flag15.Checked ? 1 : 0 << 4); SB.Flag[0] += (byte)(Flag16.Checked ? 1 : 0 << 5); SB.Flag[0] += (byte)(Flag17.Checked ? 1 : 0 << 6); SB.Flag[0] += (byte)(Flag18.Checked ? 1 : 0 << 7); SB.Flag[1] += (byte)(Flag21.Checked ? 1 : 0 << 0); SB.Flag[1] += (byte)(Flag22.Checked ? 1 : 0 << 1); SB.Flag[1] += (byte)(Flag23.Checked ? 1 : 0 << 2); SB.Flag[1] += (byte)(Flag24.Checked ? 1 : 0 << 3); SB.Flag[1] += (byte)(Flag25.Checked ? 1 : 0 << 4); SB.Flag[1] += (byte)(Flag26.Checked ? 1 : 0 << 5); SB.Flag[1] += (byte)(Flag27.Checked ? 1 : 0 << 6); SB.Flag[1] += (byte)(Flag28.Checked ? 1 : 0 << 7); SB.Flag[2] += (byte)(Flag31.Checked ? 1 : 0 << 0); SB.Flag[2] += (byte)(Flag32.Checked ? 1 : 0 << 1); SB.Flag[2] += (byte)(Flag33.Checked ? 1 : 0 << 2); SB.Flag[2] += (byte)(Flag34.Checked ? 1 : 0 << 3); SB.Flag[2] += (byte)(Flag35.Checked ? 1 : 0 << 4); SB.Flag[2] += (byte)(Flag36.Checked ? 1 : 0 << 5); SB.Flag[2] += (byte)(Flag37.Checked ? 1 : 0 << 6); SB.Flag[2] += (byte)(Flag38.Checked ? 1 : 0 << 7); SB.Flag[3] += (byte)(Flag41.Checked ? 1 : 0 << 0); SB.Flag[3] += (byte)(Flag42.Checked ? 1 : 0 << 1); SB.Flag[3] += (byte)(Flag43.Checked ? 1 : 0 << 2); SB.Flag[3] += (byte)(Flag44.Checked ? 1 : 0 << 3); SB.Flag[3] += (byte)(Flag45.Checked ? 1 : 0 << 4); SB.Flag[3] += (byte)(Flag46.Checked ? 1 : 0 << 5); SB.Flag[3] += (byte)(Flag47.Checked ? 1 : 0 << 6); SB.Flag[3] += (byte)(Flag48.Checked ? 1 : 0 << 7); SB.IDs[0] = UInt16.Parse(ID1Val.Text); SB.IDs[1] = UInt16.Parse(ID2Val.Text); SB.IDs[2] = UInt16.Parse(ID3Val.Text); SB.IDs[3] = UInt16.Parse(ID4Val.Text); SB.IDs[4] = UInt16.Parse(ID5Val.Text); SB.IDs[5] = UInt16.Parse(ID6Val.Text); SB.IDs[6] = UInt16.Parse(ID7Val.Text); SB.IDs[7] = UInt16.Parse(ID8Val.Text); SB.IDs[8] = UInt16.Parse(ID9Val.Text); SB.IDs[9] = UInt16.Parse(ID10Val.Text); SB.Pos[0].X = float.Parse(F11Val.Text); SB.Pos[0].Y = float.Parse(F12Val.Text); SB.Pos[0].Z = float.Parse(F13Val.Text); SB.Pos[0].W = float.Parse(F14Val.Text); SB.Pos[1].X = float.Parse(F21Val.Text); SB.Pos[1].Y = float.Parse(F22Val.Text); SB.Pos[1].Z = float.Parse(F23Val.Text); SB.Pos[1].W = float.Parse(F24Val.Text); SB.Pos[2].X = float.Parse(F31Val.Text); SB.Pos[2].Y = float.Parse(F32Val.Text); SB.Pos[2].Z = float.Parse(F33Val.Text); SB.Pos[2].W = float.Parse(F34Val.Text); SB.Pos[3].X = float.Parse(F41Val.Text); SB.Pos[3].Y = float.Parse(F42Val.Text); SB.Pos[3].Z = float.Parse(F43Val.Text); SB.Pos[3].W = float.Parse(F44Val.Text); SB.EndIn16[0] = UInt16.Parse(EI1Val.Text); SB.EndIn16[1] = UInt16.Parse(EI2Val.Text); SB.EndIn16[2] = UInt16.Parse(EI3Val.Text); SB.EndIn16[3] = UInt16.Parse(EI4Val.Text); SB.EndIn16[4] = UInt16.Parse(EI5Val.Text); SB.EndIn16[5] = UInt16.Parse(EI6Val.Text); SB.EndIn16[6] = UInt16.Parse(EI7Val.Text); SB.EndIn16[7] = UInt16.Parse(EI8Val.Text); SB.EndIn16[8] = UInt16.Parse(EI9Val.Text); SB.EndIn16[9] = UInt16.Parse(EI10Val.Text); SB.EndIn16[10] = UInt16.Parse(EI11Val.Text); SB.EndIn16[11] = UInt16.Parse(EI12Val.Text); SB.ID = ItemId; twinsanityEditorForm.LevelData.Put_Item(SB, TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[5].Nodes[Index])); }
public PathEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
public void ApplyGO(int index) { TwinsanityEditorForm twinsanityEditorForm = (TwinsanityEditorForm)ParentForm; Twinsanity.GameObject GO = (Twinsanity.GameObject)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[1].Nodes[0].Nodes[index])); GO.UnkI32Number = UnkList.Items.Count; Array.Resize(ref GO.UnkI32, GO.UnkI32Number); GO.OGINumber = OGIList.Items.Count; Array.Resize(ref GO.OGI, GO.OGINumber); GO.AnimationNumber = AnimList.Items.Count; Array.Resize(ref GO.Animation, GO.AnimationNumber); GO.ScriptNumber = ScrList.Items.Count; Array.Resize(ref GO.Script, GO.ScriptNumber); GO.GameObjectNumber = GOList.Items.Count; Array.Resize(ref GO._GameObject, GO.GameObjectNumber); GO.SoundNumber = SoundList.Items.Count; Array.Resize(ref GO.Sound, GO.SoundNumber); GO.ParametersUnkI321Number = SomeList.Items.Count; Array.Resize(ref GO.ParametersUnkI321, GO.ParametersUnkI321Number); GO.ParametersUnkI322Number = FloatList.Items.Count; Array.Resize(ref GO.ParametersUnkI322, GO.ParametersUnkI322Number); GO.ParametersUnkI323Number = IntList.Items.Count; Array.Resize(ref GO.ParametersUnkI323, GO.ParametersUnkI323Number); for (int i = 0; i <= GO.UnkI32.Length - 1; i++) { GO.UnkI32[i] = uint.Parse(UnkList.Items[i].ToString()); } for (int i = 0; i <= GO.OGI.Length - 1; i++) { GO.OGI[i] = UInt16.Parse(OGIList.Items[i].ToString()); } for (int i = 0; i <= GO.Animation.Length - 1; i++) { GO.Animation[i] = UInt16.Parse(AnimList.Items[i].ToString()); } for (int i = 0; i <= GO.Script.Length - 1; i++) { GO.Script[i] = UInt16.Parse(ScrList.Items[i].ToString()); } for (int i = 0; i <= GO._GameObject.Length - 1; i++) { GO._GameObject[i] = UInt16.Parse(GOList.Items[i].ToString()); } for (int i = 0; i <= GO.Sound.Length - 1; i++) { GO.Sound[i] = UInt16.Parse(SoundList.Items[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI321.Length - 1; i++) { GO.ParametersUnkI321[i] = uint.Parse(SomeList.Items[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI322.Length - 1; i++) { GO.ParametersUnkI322[i] = float.Parse(FloatList.Items[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI323.Length - 1; i++) { GO.ParametersUnkI323[i] = uint.Parse(IntList.Items[i].ToString()); } GO.ID = uint.Parse(IDVal.Text); GO.Name = NameVal.Text; GOTree.SelectedNode.Text = GO.Name; this.Text = "ID: " + IDVal.Text; GO.Class1 = uint.Parse(Class1Val.Text); GO.Class2 = uint.Parse(Class2Val.Text); GO.Class3 = uint.Parse(Class3Val.Text); GO.ParametersUnkI32 = uint.Parse(ParamVal.Text); GO.ParametersHeader = (uint)((GO.ParametersUnkI323Number << 16) + (GO.ParametersUnkI322Number << 8) + (GO.ParametersUnkI321Number)); twinsanityEditorForm.LevelData.Put_Item(GO, TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[1].Nodes[0].Nodes[index])); }
public void UpdatePos(int Index) { Twinsanity.Terrain T = (Twinsanity.Terrain)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[0].Nodes[7].Nodes[Index])); NumVal.Text = T.Num.ToString(); K1Val.Text = T.K[0].ToString(); if (T.Num >= 2) { K2Val.Text = T.K[1].ToString(); } else { K2Val.Text = ""; } if (T.Num >= 3) { K3Val.Text = T.K[2].ToString(); } else { K3Val.Text = ""; } if (T.Num >= 4) { K4Val.Text = T.K[3].ToString(); } else { K4Val.Text = ""; } ID1Val.Text = T.IDS[3].ToString(); ID2Val.Text = T.IDS[2].ToString(); ID3Val.Text = T.IDS[1].ToString(); ID4Val.Text = T.IDS[0].ToString(); IDVal.Text = T.ID.ToString(); this.Text = "ID: " + T.ID.ToString(); }
public TerrainEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
private void UpdateObject(int Index) { Twinsanity.Instance INST = (Twinsanity.Instance)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[6].Nodes[Index])); Twinsanity.GameObjects Objects = (Twinsanity.GameObjects)twinsanityEditorForm.LevelData.Item[1]._Item[0]; Twinsanity.GameObject GO = null; for (int i = 0; i <= Objects._Item.Length - 1; i++) { if (Objects._Item[i].ID == INST.ObjectID) { GO = (Twinsanity.GameObject)Objects._Item[i]; break; } } if (!(GO == null)) { Label4.Text = "Instances (" + GO.Name + ")"; } else { Label4.Text = "Instances (Object is undefined)"; } }
public void UpdateBeh(int Index) { Twinsanity.Behavior Beh = (Twinsanity.Behavior)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[1].Nodes[Index])); XVal.Text = Beh.Cord.X.ToString(); YVal.Text = Beh.Cord.Y.ToString(); ZVal.Text = Beh.Cord.Z.ToString(); WVal.Text = Beh.Cord.W.ToString(); NumVal.Text = Beh.Num.ToString(); ItemId = Beh.ID; this.Text = "ID: " + Beh.ID.ToString(); }
public TriggerEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
public void UpdateTrigger(int index) { Twinsanity.Trigger TRIG = (Twinsanity.Trigger)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[7].Nodes[index])); TriggerID.Text = TRIG.ID.ToString(); Flags.Text = TRIG.SomeFlag.ToString(); SomeNumber.Text = TRIG.SomeNumber.ToString(); Value1.Text = TRIG.SomeUInt161.ToString(); Value2.Text = TRIG.SomeUInt162.ToString(); Value3.Text = TRIG.SomeUInt163.ToString(); Value4.Text = TRIG.SomeUInt164.ToString(); NumberValue.Text = TRIG.SomeUInt32.ToString(); PosX.Text = TRIG.Coordinate[1].X.ToString(); PosY.Text = TRIG.Coordinate[1].Y.ToString(); PosZ.Text = TRIG.Coordinate[1].Z.ToString(); SizeW.Text = TRIG.Coordinate[2].X.ToString(); SizeH.Text = TRIG.Coordinate[2].Y.ToString(); SizeL.Text = TRIG.Coordinate[2].Z.ToString(); VecX.Text = TRIG.Coordinate[0].X.ToString(); VecY.Text = TRIG.Coordinate[0].Y.ToString(); VecZ.Text = TRIG.Coordinate[0].Z.ToString(); Instances.Items.Clear(); for (int i = 0; i <= TRIG.SectionSize - 1; i++) { Instances.Items.Add(TRIG.SomeUInt16[i]); } if (TRIG.SectionSize > 0) { Instances.SelectedIndex = 0; } if (Instances.SelectedIndex >= 0) { UpdateObject(TRIG.SomeUInt16[Instances.SelectedIndex]); } else { Label4.Text = "Instances (Object is undefined)"; } }
public GameObjectEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
public void UpdateInstance(int index) { Twinsanity.Instance INST = (Twinsanity.Instance)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[6].Nodes[index])); Twinsanity.GameObjects Objects = (Twinsanity.GameObjects)twinsanityEditorForm.LevelData.Item[1]._Item[0]; Twinsanity.GameObject GO = null; for (int i = 0; i <= Objects._Item.Length - 1; i++) { if (Objects._Item[i].ID == INST.ObjectID) { GO = (Twinsanity.GameObject)Objects._Item[i]; break; } } if (!(GO == null)) this.Text = "Object " + GO.Name + " (ID: " + GO.ID.ToString() + ")"; else this.Text = "Object is not defined"; InstanceID.Text = INST.ID.ToString(); ObjectID.Text = INST.ObjectID.ToString(); InstanceX.Text = INST.X.ToString(); InstanceY.Text = INST.Y.ToString(); InstanceZ.Text = INST.Z.ToString(); RotationX.Value = INST.RX; RotationY.Value = INST.RY; RotationZ.Value = INST.RZ; UpdateRotations(); Flags.Text = INST.UnkI32.ToString(); Satan.Text = INST.AfterOID.ToString(); Some.Items.Clear(); Floats.Items.Clear(); Integers.Items.Clear(); for (int i = 0; i <= INST.UnkI321Number - 1; i++) Some.Items.Add(INST.UnkI321[i]); for (int i = 0; i <= INST.UnkI322Number - 1; i++) Floats.Items.Add(INST.UnkI322[i]); for (int i = 0; i <= INST.UnkI323Number - 1; i++) Integers.Items.Add(INST.UnkI323[i]); Position.Items.Clear(); Path.Items.Clear(); Instance.Items.Clear(); for (int i = 0; i <= INST.Size1 - 1; i++) Position.Items.Add(INST.Something1[i]); for (int i = 0; i <= INST.Size2 - 1; i++) Path.Items.Add(INST.Something2[i]); for (int i = 0; i <= INST.Size3 - 1; i++) Instance.Items.Add(INST.Something3[i]); }
public void UpdatePos(int Index) { Twinsanity.Position Pos = (Twinsanity.Position)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[3].Nodes[Index])); XVal.Text = Pos.Pos.X.ToString(); YVal.Text = Pos.Pos.Y.ToString(); ZVal.Text = Pos.Pos.Z.ToString(); ItemId = Pos.ID; this.Text = "ID: " + Pos.ID.ToString(); }
public void ApplyPath(int Index) { twinsanityEditorForm.LevelData.Put_Item(Path, TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[4].Nodes[Index])); }
public FuckingShitEditor(TwinsanityEditorForm TEF) { twinsanityEditorForm = TEF; InitializeComponent(); }
private void Button5_Click(object sender, EventArgs e) { if (!(Materials.SelectedIndex == -1)) { twinsanityEditorForm.context.viewerTexture.Hide(); Twinsanity.Materials MATs = (Twinsanity.Materials)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[0].Nodes[1])); Twinsanity.Material MAT = new Twinsanity.Material(); int I; for (I = 0; I <= MATs._Item.Length - 1; I++) { if (MATs._Item[I].ID == (uint)Materials.SelectedItem) { MAT = (Twinsanity.Material)MATs._Item[I]; break; } } uint TexID = MAT.Texture; twinsanityEditorForm.context.viewerTexture.Textures = (Twinsanity.Textures)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[0].Nodes[0])); twinsanityEditorForm.context.viewerTexture.Materials = MATs; twinsanityEditorForm.context.viewerTexture.Mat = true; twinsanityEditorForm.context.viewerTexture.CurTex = (uint)I; twinsanityEditorForm.context.viewerTexture.Show(); } }
public void UpdateGO(int index) { Twinsanity.GameObject GO = (Twinsanity.GameObject)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[1].Nodes[0].Nodes[index])); UnkList.Items.Clear(); OGIList.Items.Clear(); AnimList.Items.Clear(); ScrList.Items.Clear(); GOList.Items.Clear(); SoundList.Items.Clear(); SomeList.Items.Clear(); FloatList.Items.Clear(); IntList.Items.Clear(); for (int i = 0; i <= GO.UnkI32.Length - 1; i++) { UnkList.Items.Add(GO.UnkI32[i].ToString()); } for (int i = 0; i <= GO.OGI.Length - 1; i++) { OGIList.Items.Add(GO.OGI[i].ToString()); } for (int i = 0; i <= GO.Animation.Length - 1; i++) { AnimList.Items.Add(GO.Animation[i].ToString()); } for (int i = 0; i <= GO.Script.Length - 1; i++) { ScrList.Items.Add(GO.Script[i].ToString()); } for (int i = 0; i <= GO._GameObject.Length - 1; i++) { GOList.Items.Add(GO._GameObject[i].ToString()); } for (int i = 0; i <= GO.Sound.Length - 1; i++) { SoundList.Items.Add(GO.Sound[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI321.Length - 1; i++) { SomeList.Items.Add(GO.ParametersUnkI321[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI322.Length - 1; i++) { FloatList.Items.Add(GO.ParametersUnkI322[i].ToString()); } for (int i = 0; i <= GO.ParametersUnkI323.Length - 1; i++) { IntList.Items.Add(GO.ParametersUnkI323[i].ToString()); } IDVal.Text = GO.ID.ToString(); NameVal.Text = GO.Name; Class1Val.Text = GO.Class1.ToString(); Class2Val.Text = GO.Class2.ToString(); Class3Val.Text = GO.Class3.ToString(); ParamVal.Text = GO.ParametersUnkI32.ToString(); this.Text = "ID: " + IDVal.Text; }