diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 4ea988a0..9bd2ccec 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 5e54191b..09c90705 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index bc24e95f..96749626 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Base/PathPoint.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Base/PathPoint.cs index 37ece005..3fdf813f 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Base/PathPoint.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Base/PathPoint.cs @@ -53,7 +53,15 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs [Category("Transform")] public Vector3 Rotate { - get { return new Vector3(this[N_Rotate]["X"], this[N_Rotate]["Y"], this[N_Rotate]["Z"]); ; } + get { + if (this[N_Rotate] == null) + return new Vector3(0, 0, 0); + + return new Vector3( + this[N_Rotate]["X"] != null ? this[N_Rotate]["X"] : 0, + this[N_Rotate]["Y"] != null ? this[N_Rotate]["Y"] : 0, + this[N_Rotate]["Z"] != null ? this[N_Rotate]["Z"] : 0); + } set { this[N_Rotate]["X"] = value.X; @@ -65,7 +73,16 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs [Category("Transform")] public Vector3 Scale { - get { return new Vector3(this[N_Scale]["X"], this[N_Scale]["Y"], this[N_Scale]["Z"]); ; } + get + { + if (this[N_Scale] == null) + return new Vector3(1, 1, 1); + + return new Vector3( + this[N_Scale]["X"] != null ? this[N_Scale]["X"] : 1, + this[N_Scale]["Y"] != null ? this[N_Scale]["Y"] : 1, + this[N_Scale]["Z"] != null ? this[N_Scale]["Z"] : 1); + } set { if (this[N_Scale] != null) @@ -80,7 +97,16 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs [Category("Transform")] public Vector3 Translate { - get { return new Vector3(this[N_Translate]["X"], this[N_Translate]["Y"], this[N_Translate]["Z"]); ; } + get + { + if (this[N_Translate] == null) + return new Vector3(0, 0, 0); + + return new Vector3( + this[N_Translate]["X"] != null ? this[N_Translate]["X"] : 0, + this[N_Translate]["Y"] != null ? this[N_Translate]["Y"] : 0, + this[N_Translate]["Z"] != null ? this[N_Translate]["Z"] : 0); + } set { this[N_Translate]["X"] = value.X; diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/EnemyPaths.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/EnemyPaths.cs index fd607df3..0cdaa013 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/EnemyPaths.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/EnemyPaths.cs @@ -32,13 +32,13 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs public int EnemyPathGroupId { - get { return this[N_EnemyPathGroup]; } + get { return this[N_EnemyPathGroup] != null ? this[N_EnemyPathGroup] : -1; } set { this[N_EnemyPathGroup] = value; } } public int UnitIdNum { - get { return this[N_UnitIdNum]; } + get { return this[N_UnitIdNum] != null ? this[N_UnitIdNum] : -1; } set { this[N_UnitIdNum] = value; } } @@ -75,14 +75,14 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs [Category("Properties")] public int BattleFlag { - get { return this["BattleFlag"]; } + get { return this["BattleFlag"] != null ? this["BattleFlag"] : -1; } set { this["BattleFlag"] = value; } } [Category("Properties")] public int Priority { - get { return this["Priority"]; } + get { return this["Priority"] != null ? this["Priority"] : -1; } set { this["Priority"] = value; } } diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/GliderPaths.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/GliderPaths.cs index e8c2292d..94e8768f 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/GliderPaths.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/GliderPaths.cs @@ -24,7 +24,7 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs foreach (var point in this["PathPt"]) { - PathPoints.Add(new EnemyPathPoint(point)); + PathPoints.Add(new GlidePathPoint(point)); } ConnectGroups = false; @@ -78,28 +78,28 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs [Category("Properties")] public int GlideType { - get { return this["GlideType"]; } + get { return (this["GlideType"] != null) ? this["GlideType"] : -1; } set { this["GlideType"] = value; } } [Category("Properties")] public bool IsUp { - get { return this["IsUp"]; } + get { return (this["IsUp"] != null) ? this["IsUp"] : false; } set { this["IsUp"] = value; } } [Category("Properties")] public int Ascend { - get { return this["Ascend"]; } + get { return (this["Ascend"] != null) ? this["Ascend"] : -1; } set { this["Ascend"] = value; } } [Category("Properties")] public bool Cannon { - get { return this["Cannon"]; } + get { return (this["Cannon"] != null) ? this["Cannon"] : false; } set { this["Cannon"] = value; } } diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/ItemPaths.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/ItemPaths.cs index f13a394d..a000ef0a 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/ItemPaths.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/ItemPaths.cs @@ -23,7 +23,7 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs foreach (var point in this["PathPt"]) { - PathPoints.Add(new EnemyPathPoint(point)); + PathPoints.Add(new ItemPathPoint(point)); } } diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/SteerAssistPath.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/SteerAssistPath.cs index 93ed87de..cfdd7eee 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/SteerAssistPath.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/SteerAssistPath.cs @@ -23,7 +23,7 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs foreach (var point in this["PathPt"]) { - PathPoints.Add(new EnemyPathPoint(point)); + PathPoints.Add(new SteerAssistPathPoint(point)); } } diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.Designer.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.Designer.cs index 657d54f0..55a8bf34 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.Designer.cs @@ -29,19 +29,20 @@ private void InitializeComponent() { this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.splitter1 = new System.Windows.Forms.Splitter(); this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPropertyGrid1 = new Switch_Toolbox.Library.Forms.STPropertyGrid(); + this.splitter1 = new System.Windows.Forms.Splitter(); this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel(); + this.treeView1 = new System.Windows.Forms.TreeView(); this.stButton2 = new Switch_Toolbox.Library.Forms.STButton(); this.stButton1 = new Switch_Toolbox.Library.Forms.STButton(); this.stTabControl1 = new Switch_Toolbox.Library.Forms.STTabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.stMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip(); this.viewIntroCameraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel(); - this.treeView1 = new System.Windows.Forms.TreeView(); + this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -50,6 +51,7 @@ this.stPanel1.SuspendLayout(); this.stTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); this.stMenuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -73,15 +75,6 @@ this.splitContainer1.SplitterDistance = 209; this.splitContainer1.TabIndex = 1; // - // splitter1 - // - this.splitter1.Dock = System.Windows.Forms.DockStyle.Top; - this.splitter1.Location = new System.Drawing.Point(0, 419); - this.splitter1.Name = "splitter1"; - this.splitter1.Size = new System.Drawing.Size(209, 3); - this.splitter1.TabIndex = 1; - this.splitter1.TabStop = false; - // // stPanel2 // this.stPanel2.Controls.Add(this.stPropertyGrid1); @@ -101,6 +94,15 @@ this.stPropertyGrid1.Size = new System.Drawing.Size(209, 296); this.stPropertyGrid1.TabIndex = 0; // + // splitter1 + // + this.splitter1.Dock = System.Windows.Forms.DockStyle.Top; + this.splitter1.Location = new System.Drawing.Point(0, 419); + this.splitter1.Name = "splitter1"; + this.splitter1.Size = new System.Drawing.Size(209, 3); + this.splitter1.TabIndex = 1; + this.splitter1.TabStop = false; + // // stPanel1 // this.stPanel1.Controls.Add(this.treeView1); @@ -112,6 +114,20 @@ this.stPanel1.Size = new System.Drawing.Size(209, 419); this.stPanel1.TabIndex = 0; // + // treeView1 + // + this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.treeView1.CheckBoxes = true; + this.treeView1.Location = new System.Drawing.Point(3, 3); + this.treeView1.Name = "treeView1"; + this.treeView1.Size = new System.Drawing.Size(203, 381); + this.treeView1.TabIndex = 3; + this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); + this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + // // stButton2 // this.stButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -159,12 +175,21 @@ this.tabPage1.Text = "3D View"; this.tabPage1.UseVisualStyleBackColor = true; // + // stPanel4 + // + this.stPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.stPanel4.Location = new System.Drawing.Point(3, 3); + this.stPanel4.Name = "stPanel4"; + this.stPanel4.Size = new System.Drawing.Size(726, 653); + this.stPanel4.TabIndex = 0; + // // tabPage2 // + this.tabPage2.Controls.Add(this.stPanel3); this.tabPage2.Location = new System.Drawing.Point(4, 25); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(592, 433); + this.tabPage2.Size = new System.Drawing.Size(732, 659); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "2D View"; this.tabPage2.UseVisualStyleBackColor = true; @@ -186,27 +211,13 @@ this.viewIntroCameraToolStripMenuItem.Text = "View Intro Camera"; this.viewIntroCameraToolStripMenuItem.Click += new System.EventHandler(this.viewIntroCameraToolStripMenuItem_Click); // - // stPanel4 + // stPanel3 // - this.stPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.stPanel4.Location = new System.Drawing.Point(3, 3); - this.stPanel4.Name = "stPanel4"; - this.stPanel4.Size = new System.Drawing.Size(726, 653); - this.stPanel4.TabIndex = 0; - // - // treeView1 - // - this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.treeView1.CheckBoxes = true; - this.treeView1.Location = new System.Drawing.Point(3, 3); - this.treeView1.Name = "treeView1"; - this.treeView1.Size = new System.Drawing.Size(203, 381); - this.treeView1.TabIndex = 3; - this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); - this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + this.stPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.stPanel3.Location = new System.Drawing.Point(3, 3); + this.stPanel3.Name = "stPanel3"; + this.stPanel3.Size = new System.Drawing.Size(726, 653); + this.stPanel3.TabIndex = 0; // // TurboMunntEditor // @@ -224,6 +235,7 @@ this.stPanel1.ResumeLayout(false); this.stTabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); this.stMenuStrip1.ResumeLayout(false); this.stMenuStrip1.PerformLayout(); this.ResumeLayout(false); @@ -246,5 +258,6 @@ private System.Windows.Forms.TabPage tabPage2; private Switch_Toolbox.Library.Forms.STPanel stPanel4; private System.Windows.Forms.TreeView treeView1; + private Switch_Toolbox.Library.Forms.STPanel stPanel3; } } diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs index 063fba49..4db77cc6 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs @@ -16,6 +16,8 @@ namespace FirstPlugin.Forms public partial class TurboMunntEditor : UserControl, IViewportContainer { Viewport viewport; + GLControl2D viewport2D; + bool IsLoaded = false; public TurboMunntEditor() @@ -31,6 +33,10 @@ namespace FirstPlugin.Forms viewport.Dock = DockStyle.Fill; viewport.scene.SelectionChanged += Scene_SelectionChanged; stPanel4.Controls.Add(viewport); + + // viewport2D = new GLControl2D(); + // viewport2D.Dock = DockStyle.Fill; + // stPanel3.Controls.Add(viewport2D); } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 7436ef5b..7dadfd91 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index 2d6e8cf1..a8429df2 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb index eb3df072..17a35a4e 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index e8f95c16..87cfbdf8 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ