diff --git a/VPet-Simulator.Core/Graph/GraphCore.cs b/VPet-Simulator.Core/Graph/GraphCore.cs index 4437f01..894a8dd 100644 --- a/VPet-Simulator.Core/Graph/GraphCore.cs +++ b/VPet-Simulator.Core/Graph/GraphCore.cs @@ -28,300 +28,301 @@ namespace VPet_Simulator.Core /// public enum GraphType { + // 名称 ?描述? ?动作? 大约时间(L:(1000+)M:(200-800)S:(125)) /// - /// 不被启用/使用的 不包含在GrapType + /// 不被启用/使用的 不包含在GrapType S /// Not_Able, /// - /// 被提起动态 (循环) + /// 被提起动态 (循环) L /// Raised_Dynamic, /// - /// 被提起静态 (开始) + /// 被提起静态 (开始) L /// Raised_Static_A_Start, /// - /// 被提起静态 (循环) + /// 被提起静态 (循环) L /// Raised_Static_B_Loop, /// - /// 从上向右爬 (循环) + /// 从上向右爬 (循环) M /// Climb_Top_Right, /// - /// 从上向左爬 (循环) + /// 从上向左爬 (循环) M /// Climb_Top_Left, /// - /// 爬起向右 + /// 爬起向右 M /// Climb_Up_Right, /// - /// 爬起向左 + /// 爬起向左 M /// Climb_Up_Left, /// - /// 从右边爬 (开始) + /// 从右边爬 (开始) S /// Climb_Right_A_Start, /// - /// 从左边爬 (开始) + /// 从左边爬 (开始) S /// Climb_Left_A_Start, /// - /// 从右边爬 (循环) + /// 从右边爬 (循环) M /// Climb_Right_B_Loop, /// - /// 从左边爬 (循环) + /// 从左边爬 (循环) M /// Climb_Left_B_Loop, /// - /// 呼吸 (循环) + /// 呼吸 (循环) L /// Default, /// - /// 摸头 (开始) + /// 摸头 (开始) S /// Touch_Head_A_Start, /// - /// 摸头 (循环) + /// 摸头 (循环) M /// Touch_Head_B_Loop, /// - /// 摸头 (结束) + /// 摸头 (结束) S /// Touch_Head_C_End, /// - /// 摸身体 (开始) + /// 摸身体 (开始) S /// Touch_Body_A_Start, /// - /// 摸身体 (循环) + /// 摸身体 (循环) M /// Touch_Body_B_Loop, /// - /// 摸身体 (结束) + /// 摸身体 (结束) S /// Touch_Body_C_End, /// - /// 爬行向右 (开始) + /// 爬行向右 (开始) S /// Crawl_Right_A_Start, /// - /// 爬行向右 (循环) + /// 爬行向右 (循环) M /// Crawl_Right_B_Loop, /// - /// 爬行向右 (结束) + /// 爬行向右 (结束) S /// Crawl_Right_C_End, /// - /// 爬行向左 (开始) + /// 爬行向左 (开始) S /// Crawl_Left_A_Start, /// - /// 爬行向左 (循环) + /// 爬行向左 (循环) M /// Crawl_Left_B_Loop, /// - /// 爬行向左 (结束) + /// 爬行向左 (结束) S /// Crawl_Left_C_End, /// - /// 下蹲 (开始) + /// 下蹲 (开始) S /// Squat_A_Start, /// - /// 下蹲 (循环) + /// 下蹲 (循环) M /// Squat_B_Loop, /// - /// 下蹲 (结束) + /// 下蹲 (结束) S /// Squat_C_End, /// - /// 下落向左 (开始) + /// 下落向左 (开始) S /// Fall_Left_A_Start, /// - /// 下落向左 (循环) + /// 下落向左 (循环) M /// Fall_Left_B_Loop, /// - /// 下落向左 (结束) + /// 下落向左 (结束) S /// Fall_Left_C_End, /// - /// 下落向右 (开始/循环) + /// 下落向右 (开始) S /// Fall_Right_A_Start, /// - /// 下落向右 (开始/循环) + /// 下落向右 (循环) M /// Fall_Right_B_Loop, /// - /// 下落向右 (结束) + /// 下落向右 (结束) S /// Fall_Right_C_End, /// - /// 走路向右 (开始) + /// 走路向右 (开始) S /// Walk_Right_A_Start, /// - /// 走路向右 (循环) + /// 走路向右 (循环) M /// Walk_Right_B_Loop, /// - /// 走路向右 (结束) + /// 走路向右 (结束) S /// Walk_Right_C_End, /// - /// 走路向左 (开始) + /// 走路向左 (开始) S /// Walk_Left_A_Start, /// - /// 走路向左 (循环) + /// 走路向左 (循环) M /// Walk_Left_B_Loop, /// - /// 走路向左 (结束) + /// 走路向左 (结束) S /// Walk_Left_C_End, /// - /// 无聊 (开始) + /// 无聊 (开始) S /// Boring_A_Start, /// - /// 无聊 (循环) + /// 无聊 (循环) M /// Boring_B_Loop, /// - /// 无聊 (结束) + /// 无聊 (结束) S /// Boring_C_End, /// - /// 睡觉 (开始) + /// 睡觉 (开始) S /// Sleep_A_Start, /// - /// 睡觉 (循环) + /// 睡觉 (循环) M /// Sleep_B_Loop, /// - /// 睡觉 (结束) + /// 睡觉 (结束) S /// Sleep_C_End, /// - /// 说话 (开始) + /// 说话 (开始) S /// Say_Serious_A_Start, /// - /// 说话 (循环) + /// 说话 (循环) M /// Say_Serious_B_Loop, /// - /// 说话 (结束) + /// 说话 (结束) S /// Say_Serious_C_End, /// - /// 说话 (开始) + /// 说话 (开始) S /// Say_Shining_A_Start, /// - /// 说话 (循环) + /// 说话 (循环) M /// Say_Shining_B_Loop, /// - /// 说话 (结束) + /// 说话 (结束) S /// Say_Shining_C_End, /// - /// 说话 (开始) + /// 说话 (开始) S /// Say_Self_A_Start, /// - /// 说话 (循环) + /// 说话 (循环) M /// Say_Self_B_Loop, /// - /// 说话 (结束) + /// 说话 (结束) S /// Say_Self_C_End, /// - /// 待机 模式1 (开始) + /// 待机 模式1 (开始) S /// Idel_StateONE_A_Start, /// - /// 待机 模式1 (循环) + /// 待机 模式1 (循环) M /// Idel_StateONE_B_Loop, /// - /// 待机 模式1 (结束) + /// 待机 模式1 (结束) S /// Idel_StateONE_C_End, /// - /// 待机 模式2 (开始) + /// 待机 模式2 (开始) S /// Idel_StateTWO_A_Start, /// - /// 待机 模式2 (循环) + /// 待机 模式2 (循环) M /// Idel_StateTWO_B_Loop, /// - /// 待机 模式2 (结束) + /// 待机 模式2 (结束) S /// Idel_StateTWO_C_End, /// - /// 开机 + /// 开机 M /// StartUP, /// - /// 关机 + /// 关机 M /// Shutdown, /// - /// 学习 (开始) + /// 学习 (开始) S /// Study_A_Start, /// - /// 学习 (循环) + /// 学习 (循环) M /// Study_B_Loop, /// - /// 学习 (结束) + /// 学习 (结束) S /// Study_C_End, /// - /// 工作 (开始) + /// 工作 (开始) S /// WorkONE_A_Start, /// - /// 工作 (循环) + /// 工作 (循环) M /// WorkONE_B_Loop, /// - /// 工作 (结束) + /// 工作 (结束) S /// WorkONE_C_End, /// - /// 直播 (开始) + /// 直播 (开始) S /// WorkTWO_A_Start, /// - /// 直播 (循环) + /// 直播 (循环) M /// WorkTWO_B_Loop, /// - /// 直播 (结束) + /// 直播 (结束) S /// WorkTWO_C_End, /// - /// 口渴 + /// 口渴 M /// Switch_Thirsty, /// - /// 吃东西 + /// 吃东西 M /// Eat, } diff --git a/VPet-Simulator.Tool/Program.cs b/VPet-Simulator.Tool/Program.cs index 9b01f56..c99cbf8 100644 --- a/VPet-Simulator.Tool/Program.cs +++ b/VPet-Simulator.Tool/Program.cs @@ -1,6 +1,12 @@ using System; +using System.Collections.Generic; +using System.Drawing; using System.IO; +using System.Linq; using System.Security.Cryptography; +using System.Xml.Linq; +using VPet_Simulator.Core; +using static VPet_Simulator.Core.GraphCore; namespace VPet_Simulator.Tool { @@ -17,6 +23,9 @@ namespace VPet_Simulator.Tool case "1": Animation(); break; + case "2": + FontPetNew(); + break; default: Console.WriteLine("暂无该功能"); goto start; @@ -59,14 +68,65 @@ namespace VPet_Simulator.Tool continue; } hash = filehash; - lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_', '-')[0]}_{id++:D3}_{rpt * time}.png")); + lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{GetFileName(lastf)}_{id++:D3}_{rpt * time}.png")); rpt = 1; lastf = fileInfo; } - lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_', '-')[0]}_{id++:D3}_{rpt * time}.png")); + lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{GetFileName(lastf)}_{id++:D3}_{rpt * time}.png")); Console.WriteLine("图片处理已完成"); } } + + static void FontPetNew() + { + Console.WriteLine("请输入储存位置"); + DirectoryInfo directoryInfo = new DirectoryInfo(Console.ReadLine()); + + var elist = Properties.Resources.laenum.Replace(" ", "").Replace("/// ", "") + .Replace("/// ", "").Replace("/// ", "").Replace("\r", "").Replace("\n\n", "\n") + .Replace("\n\n", "\n").Replace("\n\n", "\n").Split('\n').ToList(); + elist.RemoveAll(x => x.EndsWith(",")); + for (int i = 0; i < elist.Count; i++) + { + var paths = GraphTypeValue[i].Split('_'); + DirectoryInfo nowpath = directoryInfo; + foreach (var path in paths) + { + nowpath = nowpath.CreateSubdirectory(path); + } + foreach (string v in Enum.GetNames(typeof(GameSave.ModeType))) + { + using (Bitmap image = new Bitmap(500, 500)) + { + using (Graphics g = Graphics.FromImage(image)) + { + var strs = elist[i].Split(' '); + g.DrawString(strs[0], new Font("胡晓波男神体2.0", 66, FontStyle.Bold), new SolidBrush(Color.DarkSlateBlue), 10, 100); + g.DrawString(strs[0], new Font("胡晓波男神体2.0", 64), new SolidBrush(Color.AliceBlue), 15, 100); + for (int j = 1; j < strs.Length - 1; j++) + { + g.DrawString(strs[j], new Font("胡晓波萌萌体", 50, FontStyle.Bold), new SolidBrush(Color.LightGray), 10, 150 + 50 * j); + g.DrawString(strs[j], new Font("胡晓波萌萌体", 48, FontStyle.Bold), new SolidBrush(Color.Gray), 15, 150 + 50 * j); + } + g.DrawString(v, new Font("胡晓波润圆体35", 50, FontStyle.Bold), new SolidBrush(Color.DeepSkyBlue), 10, 350); + g.DrawString(v, new Font("胡晓波润圆体35", 48, FontStyle.Bold), new SolidBrush(Color.SkyBlue), 15, 350); + int len = 2000; + var last = strs.Last(); + if(last == "S") + { + len = 250; + } + else if (last == "M") + { + len = 1000; + } + image.Save(nowpath.CreateSubdirectory(v).FullName + $"\\{paths[0]}_{len}.png"); + } + } + } + + } + } public static string GetFileHash(FileInfo fileInfo) { //创建一个哈希算法对象 @@ -79,6 +139,19 @@ namespace VPet_Simulator.Tool } } } - + public static string GetFileName(FileInfo fileInfo) + { + var strs = fileInfo.Name.Split('_', '-'); + if (strs.Length == 1) + { + strs = fileInfo.Name.Replace("00", "_").Split('_'); + } + if (strs.Length == 1) + { + return fileInfo.Directory.Name; + } + return strs[0]; + } } + } diff --git a/VPet-Simulator.Tool/Properties/Resources.Designer.cs b/VPet-Simulator.Tool/Properties/Resources.Designer.cs new file mode 100644 index 0000000..07f2a6b --- /dev/null +++ b/VPet-Simulator.Tool/Properties/Resources.Designer.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace VPet_Simulator.Tool.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VPet_Simulator.Tool.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找类似 /// <summary> + /// /// 不被启用/使用的 不包含在GrapType + /// /// </summary> + /// Not_Able, + /// /// <summary> + /// /// 被提起动态 (循环) + /// /// </summary> + /// Raised_Dynamic, + /// /// <summary> + /// /// 被提起静态 (开始) + /// /// </summary> + /// Raised_Static_A_Start, + /// /// <summary> + /// /// 被提起静态 (循环) + /// /// </summary> + /// Raised_Static_B_Loop, + /// /// <summary> + /// /// 从上向右爬 (循环) + /// [字符串的其余部分被截断]"; 的本地化字符串。 + /// + internal static string laenum { + get { + return ResourceManager.GetString("laenum", resourceCulture); + } + } + } +} diff --git a/VPet-Simulator.Tool/Properties/Resources.resx b/VPet-Simulator.Tool/Properties/Resources.resx new file mode 100644 index 0000000..cb88373 --- /dev/null +++ b/VPet-Simulator.Tool/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\laenum.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312 + + \ No newline at end of file diff --git a/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj b/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj index f59ed15..099f6e6 100644 --- a/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj +++ b/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj @@ -75,6 +75,7 @@ + @@ -85,9 +86,29 @@ + + True + True + Resources.resx + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + {7bd4cb1d-c8f3-4349-9bf0-cd11789130ba} + VPet-Simulator.Core + + \ No newline at end of file diff --git a/VPet-Simulator.Tool/laenum.txt b/VPet-Simulator.Tool/laenum.txt new file mode 100644 index 0000000..634cf8d --- /dev/null +++ b/VPet-Simulator.Tool/laenum.txt @@ -0,0 +1,295 @@ + /// /ʹõ GrapType S + /// + Not_Able, + /// + /// ̬ (ѭ) L + /// + Raised_Dynamic, + /// + /// ̬ (ʼ) L + /// + Raised_Static_A_Start, + /// + /// ̬ (ѭ) L + /// + Raised_Static_B_Loop, + /// + /// (ѭ) M + /// + Climb_Top_Right, + /// + /// (ѭ) M + /// + Climb_Top_Left, + /// + /// M + /// + Climb_Up_Right, + /// + /// M + /// + Climb_Up_Left, + /// + /// ұ (ʼ) S + /// + Climb_Right_A_Start, + /// + /// (ʼ) S + /// + Climb_Left_A_Start, + /// + /// ұ (ѭ) M + /// + Climb_Right_B_Loop, + /// + /// (ѭ) M + /// + Climb_Left_B_Loop, + /// + /// (ѭ) L + /// + Default, + /// + /// ͷ (ʼ) S + /// + Touch_Head_A_Start, + /// + /// ͷ (ѭ) M + /// + Touch_Head_B_Loop, + /// + /// ͷ () S + /// + Touch_Head_C_End, + /// + /// (ʼ) S + /// + Touch_Body_A_Start, + /// + /// (ѭ) M + /// + Touch_Body_B_Loop, + /// + /// () S + /// + Touch_Body_C_End, + /// + /// (ʼ) S + /// + Crawl_Right_A_Start, + /// + /// (ѭ) M + /// + Crawl_Right_B_Loop, + /// + /// () S + /// + Crawl_Right_C_End, + /// + /// (ʼ) S + /// + Crawl_Left_A_Start, + /// + /// (ѭ) M + /// + Crawl_Left_B_Loop, + /// + /// () S + /// + Crawl_Left_C_End, + /// + /// ¶ (ʼ) S + /// + Squat_A_Start, + /// + /// ¶ (ѭ) M + /// + Squat_B_Loop, + /// + /// ¶ () S + /// + Squat_C_End, + /// + /// (ʼ) S + /// + Fall_Left_A_Start, + /// + /// (ѭ) M + /// + Fall_Left_B_Loop, + /// + /// () S + /// + Fall_Left_C_End, + /// + /// (ʼ) S + /// + Fall_Right_A_Start, + /// + /// (ѭ) M + /// + Fall_Right_B_Loop, + /// + /// () S + /// + Fall_Right_C_End, + /// + /// · (ʼ) S + /// + Walk_Right_A_Start, + /// + /// · (ѭ) M + /// + Walk_Right_B_Loop, + /// + /// · () S + /// + Walk_Right_C_End, + /// + /// · (ʼ) S + /// + Walk_Left_A_Start, + /// + /// · (ѭ) M + /// + Walk_Left_B_Loop, + /// + /// · () S + /// + Walk_Left_C_End, + /// + /// (ʼ) S + /// + Boring_A_Start, + /// + /// (ѭ) M + /// + Boring_B_Loop, + /// + /// () S + /// + Boring_C_End, + /// + /// ˯ (ʼ) S + /// + Sleep_A_Start, + /// + /// ˯ (ѭ) M + /// + Sleep_B_Loop, + /// + /// ˯ () S + /// + Sleep_C_End, + /// + /// ˵ (ʼ) S + /// + Say_Serious_A_Start, + /// + /// ˵ (ѭ) M + /// + Say_Serious_B_Loop, + /// + /// ˵ () S + /// + Say_Serious_C_End, + /// + /// ˵ (ʼ) S + /// + Say_Shining_A_Start, + /// + /// ˵ (ѭ) M + /// + Say_Shining_B_Loop, + /// + /// ˵ () S + /// + Say_Shining_C_End, + /// + /// ˵ (ʼ) S + /// + Say_Self_A_Start, + /// + /// ˵ (ѭ) M + /// + Say_Self_B_Loop, + /// + /// ˵ () S + /// + Say_Self_C_End, + /// + /// ģʽ1 (ʼ) S + /// + Idel_StateONE_A_Start, + /// + /// ģʽ1 (ѭ) M + /// + Idel_StateONE_B_Loop, + /// + /// ģʽ1 () S + /// + Idel_StateONE_C_End, + /// + /// ģʽ2 (ʼ) S + /// + Idel_StateTWO_A_Start, + /// + /// ģʽ2 (ѭ) M + /// + Idel_StateTWO_B_Loop, + /// + /// ģʽ2 () S + /// + Idel_StateTWO_C_End, + /// + /// M + /// + StartUP, + /// + /// ػ M + /// + Shutdown, + /// + /// ѧϰ (ʼ) S + /// + Study_A_Start, + /// + /// ѧϰ (ѭ) M + /// + Study_B_Loop, + /// + /// ѧϰ () S + /// + Study_C_End, + /// + /// (ʼ) S + /// + WorkONE_A_Start, + /// + /// (ѭ) M + /// + WorkONE_B_Loop, + /// + /// () S + /// + WorkONE_C_End, + /// + /// ֱ (ʼ) S + /// + WorkTWO_A_Start, + /// + /// ֱ (ѭ) M + /// + WorkTWO_B_Loop, + /// + /// ֱ () S + /// + WorkTWO_C_End, + /// + /// ڿ M + /// + Switch_Thirsty, + /// + /// Զ M + /// + Eat, \ No newline at end of file diff --git a/VPet-Simulator.Windows/mod/1000_FontPet/pet/font/Walk_Left/B_Nomal/走路向左_000_500.png b/VPet-Simulator.Windows/mod/1000_FontPet/pet/font/Walk_Left/B_Nomal/走路向左_000_500.png deleted file mode 100644 index 9a9811f..0000000 Binary files a/VPet-Simulator.Windows/mod/1000_FontPet/pet/font/Walk_Left/B_Nomal/走路向左_000_500.png and /dev/null differ