diff --git a/Editor/Editable/EnumDisplayNameEnumConverter.cs b/Editor/Editable/EnumDisplayNameEnumConverter.cs index 0b9d871..d756ab3 100644 --- a/Editor/Editable/EnumDisplayNameEnumConverter.cs +++ b/Editor/Editable/EnumDisplayNameEnumConverter.cs @@ -9,11 +9,11 @@ namespace GS_PatEditor.Editor.Editable { - class EnumDisplayNameEnumConverterEnumConverter : EnumConverter + class EnumDisplayNameEnumConverter : EnumConverter { private Type enumType; - public EnumDisplayNameEnumConverterEnumConverter(Type type) + public EnumDisplayNameEnumConverter(Type type) : base(type) { enumType = type; diff --git a/Editor/Editor.cs b/Editor/Editor.cs index 6dc19e3..d545f4c 100644 --- a/Editor/Editor.cs +++ b/Editor/Editor.cs @@ -246,23 +246,6 @@ public void ShowActionEditForm() { if (CurrentAction != null) { - //if (CurrentAction.ContainsLowLevelEffects) - //{ - // //advanced mode - // if (CurrentAction.Behaviors.Count > 0) - // { - // MessageBox.Show("Advanced mode. Behaviors is neglated. " + - // "Remove all the effects to edit behaviors."); - // } - // var dialog = new ActionEditForm(Project, CurrentAction); - // dialog.ShowDialog(); - //} - //else - //{ - // //normal mode - // var dialog = new ActionBehaviorEditForm(Project, CurrentAction); - // dialog.ShowDialog(); - //} var dialog = new ActionBehaviorEditForm(Project, CurrentAction); dialog.ShowDialog(); } diff --git a/Editor/Exporters/Player/PlayerExporter.cs b/Editor/Exporters/Player/PlayerExporter.cs index ec69139..c7c58b6 100644 --- a/Editor/Exporters/Player/PlayerExporter.cs +++ b/Editor/Exporters/Player/PlayerExporter.cs @@ -156,7 +156,7 @@ public override void Export(Pat.Project proj) this.GenEnv = SkillGenerator.CreateEnv(this, playerScript); SkillGenerator.GenerateSkills(this, playerScript); SkillGenerator.GenerateAliasAssignment(this); - this.GenEnv = null; + this.GenEnv = null; //TODO handle exception SkillGenerator.GenerateStartMotionFunction(_SSERecorder, playerScript); diff --git a/Editor/Exporters/Player/Skill.cs b/Editor/Exporters/Player/Skill.cs index beaffce..f6ab108 100644 --- a/Editor/Exporters/Player/Skill.cs +++ b/Editor/Exporters/Player/Skill.cs @@ -11,37 +11,6 @@ namespace GS_PatEditor.Editor.Exporters.Player { - //[EditorSelector(typeof(Skill))] - //class SelectEffect : Skill, IHideFromEditor, IEditableEnvironment - //{ - // private readonly Action _OnNewSkill; - - // public SelectEffect(Action onNewSkill) - // { - // _OnNewSkill = onNewSkill; - // } - - // [TypeConverter(typeof(GenericEditorSelectorTypeConverter))] - // public SelectType Type - // { - // get - // { - // return null; - // } - // set - // { - // if (value == null || value.Value == null) - // { - // return; - // } - // _OnNewSkill(SelectHelper.Create(value.Value, Environment)); - // } - // } - - // [Browsable(false)] - // public EditableEnvironment Environment { get; set; } - //} - public enum SkillKey { KeyA, diff --git a/Editor/Exporters/PostExportScriptForm.Designer.cs b/Editor/Exporters/PostExportScriptForm.Designer.cs index f98645a..9de6220 100644 --- a/Editor/Exporters/PostExportScriptForm.Designer.cs +++ b/Editor/Exporters/PostExportScriptForm.Designer.cs @@ -51,8 +51,8 @@ private void InitializeComponent() // // textBox1 // - this.textBox1.BackColor = System.Drawing.SystemColors.Window; resources.ApplyResources(this.textBox1, "textBox1"); + this.textBox1.BackColor = System.Drawing.SystemColors.Window; this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; // @@ -63,15 +63,15 @@ private void InitializeComponent() // // buttonCancel // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; resources.ApplyResources(this.buttonCancel, "buttonCancel"); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.UseVisualStyleBackColor = true; // // buttonOK // - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; resources.ApplyResources(this.buttonOK, "buttonOK"); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.Name = "buttonOK"; this.buttonOK.UseVisualStyleBackColor = true; // @@ -93,8 +93,8 @@ private void InitializeComponent() // // textBox2 // - this.textBox2.BackColor = System.Drawing.SystemColors.Window; resources.ApplyResources(this.textBox2, "textBox2"); + this.textBox2.BackColor = System.Drawing.SystemColors.Window; this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; // @@ -107,6 +107,7 @@ private void InitializeComponent() // // folderBrowserDialog1 // + resources.ApplyResources(this.folderBrowserDialog1, "folderBrowserDialog1"); this.folderBrowserDialog1.ShowNewFolderButton = false; // // PostExportScriptForm diff --git a/Editor/Exporters/PostExportScriptForm.resx b/Editor/Exporters/PostExportScriptForm.resx index 5f832f2..9664983 100644 --- a/Editor/Exporters/PostExportScriptForm.resx +++ b/Editor/Exporters/PostExportScriptForm.resx @@ -117,263 +117,251 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Browse... + + + Bat File: + - + NoControl - - 330, 10 + + 417, 101 - - 75, 23 + + 77, 12 + + + $this + + + 3 + + + 330, 68 + + + BAT File(*.bat)|*.bat - - 21 + + True Browse... - - button1 + + label1 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 66, 16 - + + 17 + + + System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + + $this - - 3 + + 6, 12 - - 77, 12 + + 1 - - 247, 21 + + Enabled - - 20 + + 77, 41 + + + $this textBox1 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + $this - - 5 + + 75, 23 - - True + + 19 - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 12, 17 + + 19 59, 12 - - 19 - - - Bat File: - - - label1 + + 247, 21 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - $this + + checkBox1 - - 6 + + 21 - - NoControl + + 20 - - 330, 68 + + buttonCancel - - 75, 23 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17 + + 330, 10 - - Cancel + + 4 - - buttonCancel + + 65, 12 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - - - 7 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + $this - - 249, 68 + + 21 - - 75, 23 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 18 - - OK + + 75, 23 - - buttonOK + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Cancel - - $this + + folderBrowserDialog1 - - 8 + + $this - - 17, 17 - - - BAT File(*.bat)|*.bat + + 75, 23 - - True + + $this - - 77, 72 + + NoControl - - 66, 16 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 22 + + 6 - - Enabled + + $this - - checkBox1 + + NoControl System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + NoControl - - 0 + + button1 True - - NoControl + + textBox2 - - 12, 46 + + 330, 39 - - 65, 12 + + 22 - - 19 + + $this - - Directory: + + True label2 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - 77, 41 + + NoControl - - 247, 21 + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 20 - - textBox2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 + + 249, 68 - - NoControl + + 12, 17 - - 330, 39 + + OK - - 75, 23 + + Directory: - - 21 + + 0 - - Browse... + + 12, 46 button2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this + + System.Windows.Forms.FolderBrowserDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + 247, 21 - - 165, 17 - - - True - - - 6, 12 + + 7 - - 417, 101 + + buttonOK Post Export Script @@ -381,19 +369,31 @@ openFileDialog1 - - System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - folderBrowserDialog1 + + 77, 72 - - System.Windows.Forms.FolderBrowserDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 75, 23 PostExportScriptForm - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 8 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + True + + + 165, 17 + \ No newline at end of file diff --git a/GS_PatEditor.csproj b/GS_PatEditor.csproj index d8f7b8c..8a8f3b9 100644 --- a/GS_PatEditor.csproj +++ b/GS_PatEditor.csproj @@ -269,7 +269,6 @@ - diff --git a/Pat/Effects/CommonEffect.cs b/Pat/Effects/CommonEffect.cs index d8c2dc2..884b612 100644 --- a/Pat/Effects/CommonEffect.cs +++ b/Pat/Effects/CommonEffect.cs @@ -59,7 +59,7 @@ public override ILineObject Generate(GenerationEnvironment env) } } - [TypeConverter(typeof(EnumDisplayNameEnumConverterEnumConverter))] + [TypeConverter(typeof(EnumDisplayNameEnumConverter))] public enum CreateBulletDirection { [LocalizedEnumDisplayName(typeof(CreateBulletDirection), "Same")] diff --git a/Pat/Effects/ResetHitEffect.cs b/Pat/Effects/ResetHitEffect.cs deleted file mode 100644 index 93e9aaf..0000000 --- a/Pat/Effects/ResetHitEffect.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GS_PatEditor.Pat.Effects -{ -} diff --git a/Pat/ResourceReference.cs b/Pat/ResourceReference.cs index 74270e2..cf86805 100644 --- a/Pat/ResourceReference.cs +++ b/Pat/ResourceReference.cs @@ -10,7 +10,6 @@ namespace GS_PatEditor.Pat [Serializable] public class ResourceReference { - //[XmlAttribute(AttributeName = "ID")] [XmlText] public string ResourceID; } diff --git a/ProjectGenerater.cs b/ProjectGenerater.cs index 483d478..8dbb440 100644 --- a/ProjectGenerater.cs +++ b/ProjectGenerater.cs @@ -37,17 +37,7 @@ public static Project GenerateEmpty(string path) proj.ImageList.SelectedPalette = 0; return proj; } - - public static Project Generate() - { - var patfile = OpenKyoukoPat(); - if (patfile == null) - { - return null; - } - - return Generate(patfile); - } + public static Project Generate(string patfile) { GSPatFile gspat; @@ -134,24 +124,6 @@ private static void CheckImageResources(Project proj, string dir) //TODO warning } } - private static string OpenKyoukoPat() - { - var defaultPath = @"E:\Games\[game]GRIEFSYNDROME\griefsyndrome\gs00\data\actor\kyouko\kyouko.pat"; - OpenFileDialog dialog = new OpenFileDialog() - { - Filter = "kyouko.pat|kyouko.pat", - - }; - if (File.Exists(defaultPath)) - { - dialog.InitialDirectory = Path.GetDirectoryName(defaultPath); - } - if (dialog.ShowDialog() == DialogResult.Cancel) - { - return null; - } - return dialog.FileName; - } private static List ImportAnimationSegments(Pat.Project proj, GSPat.GSPatFile pat, int index) { var start = pat.Animations.FindLastIndex(a => a.AnimationID == index + pat.Animations[0].AnimationID); diff --git a/Render/RenderEngine.cs b/Render/RenderEngine.cs index ab3b187..44c8a1e 100644 --- a/Render/RenderEngine.cs +++ b/Render/RenderEngine.cs @@ -143,7 +143,6 @@ public void RenderAll() _Sprite.Begin(); - //_Font.DrawText(_Sprite, "Hello World!", 300, 300, new RawColorBGRA(0, 0, 0, 255)); _Sprite.End(); _Device.EndScene(); diff --git a/Render/Sprite.cs b/Render/Sprite.cs index 300321f..2dd8401 100644 --- a/Render/Sprite.cs +++ b/Render/Sprite.cs @@ -390,7 +390,7 @@ private void FlushBuffer() private Vector4 MakePosition(float x, float y, float tx, float ty) { - var r = _Rotation; //TODO should reverse? (also check import) + var r = _Rotation; var r0 = _Rotation0; var px = x + tx * (float)Math.Cos(r) - ty * (float)Math.Sin(r); var py = y + tx * (float)Math.Sin(r) + ty * (float)Math.Cos(r);