From f16ce17bbe3c41851ad2b09fd930ed8fece0d4b5 Mon Sep 17 00:00:00 2001 From: 1987kostya Date: Wed, 6 Jan 2021 21:44:37 +0600 Subject: [PATCH] Russian localisation(beta), images transparency fixes --- CTFAK.sln | 3 + CTFAK/CTFAK.csproj | 40 +- CTFAK/GUI/MainForm.cs | 8 + CTFAK/MMFParser/EXE/ChunkList.cs | 142 ++-- .../MMFParser/EXE/Loaders/Banks/ImageBank.cs | 18 +- CTFAK/MMFParser/EXE/Loaders/Frame.cs | 2 +- CTFAK/Program.cs | 20 +- .../Properties/Locale/ChunkNames.Designer.cs | 711 ++++++++++++++++++ CTFAK/Properties/Locale/ChunkNames.en-us.resx | 50 ++ CTFAK/Properties/Locale/ChunkNames.resx | 237 ++++++ CTFAK/Properties/Locale/ChunkNames.ru-ru.resx | 47 ++ .../Locale/GlobalStrings.Designer.cs | 162 ++++ .../Locale/GlobalStrings.en-us.resx | 47 ++ CTFAK/Properties/Locale/GlobalStrings.resx | 54 ++ .../Locale/GlobalStrings.ru-ru.resx | 47 ++ CTFAK/Settings.cs | 2 +- CTFAK/Utils/Decryption.cs | 1 + 17 files changed, 1490 insertions(+), 101 deletions(-) create mode 100644 CTFAK/Properties/Locale/ChunkNames.Designer.cs create mode 100644 CTFAK/Properties/Locale/ChunkNames.en-us.resx create mode 100644 CTFAK/Properties/Locale/ChunkNames.resx create mode 100644 CTFAK/Properties/Locale/ChunkNames.ru-ru.resx create mode 100644 CTFAK/Properties/Locale/GlobalStrings.Designer.cs create mode 100644 CTFAK/Properties/Locale/GlobalStrings.en-us.resx create mode 100644 CTFAK/Properties/Locale/GlobalStrings.resx create mode 100644 CTFAK/Properties/Locale/GlobalStrings.ru-ru.resx diff --git a/CTFAK.sln b/CTFAK.sln index e2b4e8c..b555aa7 100644 --- a/CTFAK.sln +++ b/CTFAK.sln @@ -11,6 +11,7 @@ Global Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Debug|Any CPU.ActiveCfg = Debug|x64 @@ -21,6 +22,8 @@ Global {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|Any CPU.Build.0 = Release|Any CPU {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x64.ActiveCfg = Release|x64 {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x64.Build.0 = Release|x64 + {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x86.ActiveCfg = Release|x86 + {86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CTFAK/CTFAK.csproj b/CTFAK/CTFAK.csproj index 60798de..d6eded8 100644 --- a/CTFAK/CTFAK.csproj +++ b/CTFAK/CTFAK.csproj @@ -8,7 +8,7 @@ Debug AnyCPU {86D99F9E-98FB-4E50-AB68-F5C115850C33} - Exe + WinExe CTFAK CTFAK v4.7.2 @@ -75,6 +75,10 @@ true true + + bin\x86\Release\ + x86 + ..\packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll @@ -88,18 +92,6 @@ ..\packages\Joveler.DynLoader.2.0.0\lib\net451\Joveler.DynLoader.dll True - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll - True - - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll - True - - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll - True - @@ -232,6 +224,16 @@ + + True + True + ChunkNames.resx + + + True + True + GlobalStrings.resx + @@ -280,6 +282,18 @@ MainForm.cs + + + ResXFileCodeGenerator + ChunkNames.Designer.cs + + + + + ResXFileCodeGenerator + GlobalStrings.Designer.cs + + diff --git a/CTFAK/GUI/MainForm.cs b/CTFAK/GUI/MainForm.cs index 6735fb7..807ba27 100644 --- a/CTFAK/GUI/MainForm.cs +++ b/CTFAK/GUI/MainForm.cs @@ -85,7 +85,15 @@ namespace CTFAK.GUI hexBox1.ShadowSelectionColor = Color.FromArgb(150, ColorTheme.R / 4, ColorTheme.G / 4, ColorTheme.B / 4); label1.Text = Settings.DumperVersion; Text = Settings.DumperVersion; + //Locale + button1.Text = Properties.GlobalStrings.selectFile; + loadingLabel.Text = Properties.GlobalStrings.loading; + imagesButton.Text = Properties.GlobalStrings.dumpImages; + soundsButton.Text = Properties.GlobalStrings.dumpSounds; + musicsButton.Text = Properties.GlobalStrings.dumpMusics; + FolderBTN.Text=Properties.GlobalStrings.openFolder; + Pame2Mfa.OnMessage += obj => { var date = DateTime.Now; diff --git a/CTFAK/MMFParser/EXE/ChunkList.cs b/CTFAK/MMFParser/EXE/ChunkList.cs index eeed08b..c13d575 100644 --- a/CTFAK/MMFParser/EXE/ChunkList.cs +++ b/CTFAK/MMFParser/EXE/ChunkList.cs @@ -305,78 +305,78 @@ namespace CTFAK.MMFParser.EXE switch (id) { case 4386: return "PREVIEW"; - case 8738: return "Mini Header"; - case 8739: return "Header"; - case 8740: return "Title"; - case 8741: return "Author"; - case 8742: return "Menu"; - case 8743: return "Extra Path"; - case 8744: return "Extensions"; - case 8745: return "Object Bank"; - case 8746: return "Global Events"; - case 8747: return "Frame Handles"; - case 8748: return "Extra Data"; - case 8749: return "Additional Extensions"; - case 8750: return "Project Path"; - case 8751: return "Output Path"; - case 8752: return "App Doc"; - case 8753: return "Other Extensions"; - case 8754: return "Global Values"; - case 8755: return "Global Strings"; - case 8756: return "Extensions List"; - case 8757: return "Icon"; - case 8758: return "Demo Version"; - case 8759: return "Security Number"; - case 8760: return "Binary Files"; - case 8761: return "Menu Images"; - case 8762: return "About"; - case 8763: return "Copyright"; - case 8764: return "Global Value Names"; - case 8765: return "Global String Names"; + case 8738: return Properties.Locale.ChunkNames.miniHeader;//"Mini Header"; + case 8739: return Properties.Locale.ChunkNames.appHeader;//"Header"; + case 8740: return Properties.Locale.ChunkNames.title;//"Title"; + case 8741: return Properties.Locale.ChunkNames.author;//"Author"; + case 8742: return Properties.Locale.ChunkNames.menu;//"Menu"; + case 8743: return Properties.Locale.ChunkNames.extraPath;//"Extra Path"; + case 8744: return Properties.Locale.ChunkNames.extensions;//"Extensions"; + case 8745: return Properties.Locale.ChunkNames.objectBank;//"Object Bank"; + case 8746: return Properties.Locale.ChunkNames.globalEvents;//"Global Events"; + case 8747: return Properties.Locale.ChunkNames.frameHandles;//"Frame Handles"; + case 8748: return Properties.Locale.ChunkNames.extraData;//"Extra Data"; + case 8749: return Properties.Locale.ChunkNames.additionalExts;//"Additional Extensions"; + case 8750: return Properties.Locale.ChunkNames.projectPath;//"Project Path"; + case 8751: return Properties.Locale.ChunkNames.outputPath;//"Output Path"; + case 8752: return Properties.Locale.ChunkNames.appDoc;//"App Doc"; + case 8753: return Properties.Locale.ChunkNames.otherExts;//"Other Extensions"; + case 8754: return Properties.Locale.ChunkNames.globalValues;//"Global Values"; + case 8755: return Properties.Locale.ChunkNames.globalStrings;//"Global Strings"; + case 8756: return Properties.Locale.ChunkNames.extList;//"Extensions List"; + case 8757: return Properties.Locale.ChunkNames.icon;//"Icon"; + case 8758: return Properties.Locale.ChunkNames.demoVersion;//"Demo Version"; + case 8759: return Properties.Locale.ChunkNames.secNum;//"Security Number"; + case 8760: return Properties.Locale.ChunkNames.binaryFiles;//"Binary Files"; + case 8761: return Properties.Locale.ChunkNames.menuImages;//"Menu Images"; + case 8762: return Properties.Locale.ChunkNames.about;//"About"; + case 8763: return Properties.Locale.ChunkNames.copyright;//"Copyright"; + case 8764: return Properties.Locale.ChunkNames.globalValueNames;//"Global Value Names"; + case 8765: return Properties.Locale.ChunkNames.globalStringNames;//"Global String Names"; case 8766: return "Movement Extensions"; - case 8767: return "Object Bank 2"; - case 8768: return "EXE Only"; - case 8770: return "Protection"; - case 8771: return "Shaders"; - case 8773: return "Extended Header"; - case 13107:return "Frame"; - case 13108:return "Frame Header"; - case 13109:return "Frame Name"; - case 13110:return "Frame Password"; - case 13111:return "Frame Palette"; - case 13112:return "Frame Objects"; - case 13113:return "Frame Fade In Frame"; - case 13114:return "Frame Fade Out Frame"; - case 13115:return "Frame Fade In"; - case 13116:return "Frame Fade Out"; - case 13117:return "Frame Events"; - case 13118:return "Frame Play Header"; - case 13119:return "Additional Frame Item"; - case 13120:return "Additional Object Instance"; - case 13121:return "Frame Layers"; - case 13122:return "Frame Virtual Rect"; - case 13123:return "Demo File Path"; - case 13124:return "Random Seed"; - case 13125:return "Frame Layer Effects"; - case 13126:return "Bluray Options"; - case 13127:return "MVTimer Base"; - case 13128:return "Mosaic Image Table"; - case 13129:return "Frame Effects"; - case 13130:return "Frame Iphone Options"; - case 17476:return "Object Header"; - case 17477:return "Object Name"; - case 17478:return "Object Common"; - case 17479:return "Object Unknown"; - case 17480:return "Object Effects"; - case 21845:return "Image Offsets"; - case 21846:return "Font Offsets"; - case 21847:return "Sound Offsets"; - case 21848:return "Music Offsets"; - case 26214:return "Image Bank"; - case 26215:return "Font Bank"; - case 26216:return "Sound Bank"; - case 26217:return "Music Bank"; - case 32639:return "Last"; + case 8767: return Properties.Locale.ChunkNames.objectBank2;//"Object Bank 2"; + case 8768: return Properties.Locale.ChunkNames.exeOnly;//"EXE Only"; + case 8770: return Properties.Locale.ChunkNames.protection;//"Protection"; + case 8771: return Properties.Locale.ChunkNames.shaders;//"Shaders"; + case 8773: return Properties.Locale.ChunkNames.extHeader;//"Extended Header"; + case 13107:return Properties.Locale.ChunkNames.frame;//"Frame"; + case 13108:return Properties.Locale.ChunkNames.frameHeader;//"Frame Header"; + case 13109:return Properties.Locale.ChunkNames.frameName;//"Frame Name"; + case 13110:return Properties.Locale.ChunkNames.framePassword;//"Frame Password"; + case 13111:return Properties.Locale.ChunkNames.framePalette;//"Frame Palette"; + case 13112:return Properties.Locale.ChunkNames.frameObjects;//"Frame Objects"; + case 13113:return Properties.Locale.ChunkNames.frameFadeInFrame;//"Frame Fade In Frame"; + case 13114:return Properties.Locale.ChunkNames.frameFadeOutFrame;//"Frame Fade Out Frame"; + case 13115:return Properties.Locale.ChunkNames.FrameFadeIn;//"Frame Fade In"; + case 13116:return Properties.Locale.ChunkNames.frameFadeOut;//"Frame Fade Out"; + case 13117:return Properties.Locale.ChunkNames.frameEvents;//"Frame Events"; + case 13118:return Properties.Locale.ChunkNames.framePlayHeader;//"Frame Play Header"; + case 13119:return Properties.Locale.ChunkNames.additionalFrameItem;//"Additional Frame Item"; + case 13120:return Properties.Locale.ChunkNames.additionalObjectInstance;//"Additional Object Instance"; + case 13121:return Properties.Locale.ChunkNames.frameLayers;//"Frame Layers"; + case 13122:return Properties.Locale.ChunkNames.frameVirtualRect;//"Frame Virtual Rect"; + case 13123:return Properties.Locale.ChunkNames.demoFilePath;//"Demo File Path"; + case 13124:return Properties.Locale.ChunkNames.randomSeed;//"Random Seed"; + case 13125:return Properties.Locale.ChunkNames.frameLayerEffects;//"Frame Layer Effects"; + case 13126:return Properties.Locale.ChunkNames.blurayOptions;//"Bluray Options"; + case 13127:return Properties.Locale.ChunkNames.mvTimerBase;//"MVTimer Base"; + case 13128:return Properties.Locale.ChunkNames.mosaicImageTable;//"Mosaic Image Table"; + case 13129:return Properties.Locale.ChunkNames.frameEffects;//"Frame Effects"; + case 13130:return Properties.Locale.ChunkNames.frameIphoneOptions;//"Frame Iphone Options"; + case 17476:return Properties.Locale.ChunkNames.objectHeader;//"Object Header"; + case 17477:return Properties.Locale.ChunkNames.objectName;//"Object Name"; + case 17478:return Properties.Locale.ChunkNames.objectCommon;//"Object Common"; + case 17479:return Properties.Locale.ChunkNames.objectUnknown;//"Object Unknown"; + case 17480:return Properties.Locale.ChunkNames.objectEffects;//"Object Effects"; + case 21845:return Properties.Locale.ChunkNames.imagesOffsets;//"Image Offsets"; + case 21846:return Properties.Locale.ChunkNames.fontOffsets;//"Font Offsets"; + case 21847:return Properties.Locale.ChunkNames.soundOffsets;//"Sound Offsets"; + case 21848:return Properties.Locale.ChunkNames.musicOffsets;//"Music Offsets"; + case 26214:return Properties.Locale.ChunkNames.imageBank;//"Image Bank"; + case 26215:return Properties.Locale.ChunkNames.fontBank;//"Font Bank"; + case 26216:return Properties.Locale.ChunkNames.soundBank;//"Sound Bank"; + case 26217:return Properties.Locale.ChunkNames.musicBank;//"Music Bank"; + case 32639:return Properties.Locale.ChunkNames.last;//"Last"; default: return $"Unknown-{id}"; } } diff --git a/CTFAK/MMFParser/EXE/Loaders/Banks/ImageBank.cs b/CTFAK/MMFParser/EXE/Loaders/Banks/ImageBank.cs index 44d3978..4f76332 100644 --- a/CTFAK/MMFParser/EXE/Loaders/Banks/ImageBank.cs +++ b/CTFAK/MMFParser/EXE/Loaders/Banks/ImageBank.cs @@ -8,6 +8,7 @@ using CTFAK.GUI; using CTFAK.Utils; using static CTFAK.MMFParser.EXE.ChunkList; + namespace CTFAK.MMFParser.EXE.Loaders.Banks { public class ImageBank : ChunkLoader @@ -138,7 +139,7 @@ namespace CTFAK.MMFParser.EXE.Loaders.Banks public int Size; //tranparent,add later - byte[] _transparent; + Color _transparent; byte[] _colorArray; int _indexed; @@ -254,7 +255,7 @@ namespace CTFAK.MMFParser.EXE.Loaders.Banks YHotspot = imageReader.ReadInt16(); ActionX = imageReader.ReadInt16(); ActionY = imageReader.ReadInt16(); - _transparent = imageReader.ReadBytes(4); + _transparent = imageReader.ReadColor(); if(Settings.twofiveplus)Logger.Log($"Loading image {Handle.ToString(),4} Size: {_width,4}x{_height,4}"); byte[] imageData; if(Settings.twofiveplus) Flags["LZX"] = false; @@ -327,7 +328,16 @@ namespace CTFAK.MMFParser.EXE.Loaders.Banks } } } - + else if (_transparent != null) + { + for (int i = 0; i < (_height * _width * 4)-3; i++) + { + if (_colorArray[i+1]==_transparent.R&&_colorArray[i+2]==_transparent.G&&_colorArray[i+3]==_transparent.B) + { + _colorArray[i] = _transparent.A; + } + } + } return; } @@ -418,7 +428,7 @@ namespace CTFAK.MMFParser.EXE.Loaders.Banks chunk.WriteInt16((short) YHotspot); chunk.WriteInt16((short) ActionX); chunk.WriteInt16((short) ActionY); - chunk.WriteBytes(_transparent); + chunk.WriteColor(_transparent); if (Flags["LZX"]) { chunk.WriteInt32(rawImg.Length); diff --git a/CTFAK/MMFParser/EXE/Loaders/Frame.cs b/CTFAK/MMFParser/EXE/Loaders/Frame.cs index 7a38b3b..bd70fe3 100644 --- a/CTFAK/MMFParser/EXE/Loaders/Frame.cs +++ b/CTFAK/MMFParser/EXE/Loaders/Frame.cs @@ -96,7 +96,7 @@ namespace CTFAK.MMFParser.EXE.Loaders if (name != null) //Just to be sure { this.Name = name.Value; - Logger.Log("Reading Frame: "+Name,true,ConsoleColor.Green); + Logger.Log(Properties.GlobalStrings.readingFrame+" "+Name,true,ConsoleColor.Green); } var password = Chunks.GetChunk(); if (password != null) //Just to be sure diff --git a/CTFAK/Program.cs b/CTFAK/Program.cs index 03a17f6..23e2df0 100644 --- a/CTFAK/Program.cs +++ b/CTFAK/Program.cs @@ -23,13 +23,15 @@ namespace CTFAK private static void Main(string[] args) { InitNativeLibrary(); - + if (!File.Exists("settings.sav")) + { + File.Create("settings.sav"); + } LoadableSettings.FromFile("settings.sav"); // // MFAGenerator.ReadTestMFA(); // Environment.Exit(0); - AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) => { if (eventArgs.Exception is ThreadAbortException) return; @@ -50,15 +52,11 @@ namespace CTFAK } else if(args.Length==0) { - if (!File.Exists("settings.sav")) - { - MyForm = new MainForm(Color.FromArgb(223, 114, 38)); - } - else - { - MyForm = new MainForm(LoadableSettings.instance.ToActual(LoadableSettings.instance["mainColor"])); - } - + if (LoadableSettings.instance["mainColor"] == null) + MyForm = new MainForm(Color.FromArgb(223, 114, 38)); + else + MyForm = new MainForm( + LoadableSettings.instance.ToActual(LoadableSettings.instance["mainColor"])); } Application.Run(MyForm); diff --git a/CTFAK/Properties/Locale/ChunkNames.Designer.cs b/CTFAK/Properties/Locale/ChunkNames.Designer.cs new file mode 100644 index 0000000..fa97838 --- /dev/null +++ b/CTFAK/Properties/Locale/ChunkNames.Designer.cs @@ -0,0 +1,711 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CTFAK.Properties.Locale { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ChunkNames { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ChunkNames() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("CTFAK.Properties.Locale.ChunkNames", typeof(ChunkNames).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to About. + /// + internal static string about { + get { + return ResourceManager.GetString("about", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Additional Extensions. + /// + internal static string additionalExts { + get { + return ResourceManager.GetString("additionalExts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Additinal Frame Item. + /// + internal static string additionalFrameItem { + get { + return ResourceManager.GetString("additionalFrameItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string additionalObjectInstance { + get { + return ResourceManager.GetString("additionalObjectInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string appDoc { + get { + return ResourceManager.GetString("appDoc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header. + /// + internal static string appHeader { + get { + return ResourceManager.GetString("appHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Author. + /// + internal static string author { + get { + return ResourceManager.GetString("author", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string binaryFiles { + get { + return ResourceManager.GetString("binaryFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string blurayOptions { + get { + return ResourceManager.GetString("blurayOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copyright. + /// + internal static string copyright { + get { + return ResourceManager.GetString("copyright", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string demoFilePath { + get { + return ResourceManager.GetString("demoFilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string demoVersion { + get { + return ResourceManager.GetString("demoVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string exeOnly { + get { + return ResourceManager.GetString("exeOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extensions. + /// + internal static string extensions { + get { + return ResourceManager.GetString("extensions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string extHeader { + get { + return ResourceManager.GetString("extHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string extList { + get { + return ResourceManager.GetString("extList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string extraData { + get { + return ResourceManager.GetString("extraData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string extraPath { + get { + return ResourceManager.GetString("extraPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string fontBank { + get { + return ResourceManager.GetString("fontBank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string fontOffsets { + get { + return ResourceManager.GetString("fontOffsets", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame. + /// + internal static string frame { + get { + return ResourceManager.GetString("frame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Effects. + /// + internal static string frameEffects { + get { + return ResourceManager.GetString("frameEffects", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Events. + /// + internal static string frameEvents { + get { + return ResourceManager.GetString("frameEvents", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Fade In. + /// + internal static string FrameFadeIn { + get { + return ResourceManager.GetString("FrameFadeIn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Fade In Frame. + /// + internal static string frameFadeInFrame { + get { + return ResourceManager.GetString("frameFadeInFrame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Fade Out. + /// + internal static string frameFadeOut { + get { + return ResourceManager.GetString("frameFadeOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Fade Out Frame. + /// + internal static string frameFadeOutFrame { + get { + return ResourceManager.GetString("frameFadeOutFrame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Handles. + /// + internal static string frameHandles { + get { + return ResourceManager.GetString("frameHandles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Header. + /// + internal static string frameHeader { + get { + return ResourceManager.GetString("frameHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame IPhone Options. + /// + internal static string frameIphoneOptions { + get { + return ResourceManager.GetString("frameIphoneOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Layer Effects. + /// + internal static string frameLayerEffects { + get { + return ResourceManager.GetString("frameLayerEffects", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Layers. + /// + internal static string frameLayers { + get { + return ResourceManager.GetString("frameLayers", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Name. + /// + internal static string frameName { + get { + return ResourceManager.GetString("frameName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Objects. + /// + internal static string frameObjects { + get { + return ResourceManager.GetString("frameObjects", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Palette. + /// + internal static string framePalette { + get { + return ResourceManager.GetString("framePalette", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Password. + /// + internal static string framePassword { + get { + return ResourceManager.GetString("framePassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Play Header. + /// + internal static string framePlayHeader { + get { + return ResourceManager.GetString("framePlayHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frame Virtual Rect. + /// + internal static string frameVirtualRect { + get { + return ResourceManager.GetString("frameVirtualRect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Events. + /// + internal static string globalEvents { + get { + return ResourceManager.GetString("globalEvents", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global String Names. + /// + internal static string globalStringNames { + get { + return ResourceManager.GetString("globalStringNames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Strings. + /// + internal static string globalStrings { + get { + return ResourceManager.GetString("globalStrings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Value Names. + /// + internal static string globalValueNames { + get { + return ResourceManager.GetString("globalValueNames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Values. + /// + internal static string globalValues { + get { + return ResourceManager.GetString("globalValues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Icon. + /// + internal static string icon { + get { + return ResourceManager.GetString("icon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Image Bank. + /// + internal static string imageBank { + get { + return ResourceManager.GetString("imageBank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Image Offsets. + /// + internal static string imagesOffsets { + get { + return ResourceManager.GetString("imagesOffsets", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Last. + /// + internal static string last { + get { + return ResourceManager.GetString("last", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Menu. + /// + internal static string menu { + get { + return ResourceManager.GetString("menu", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Menu Images. + /// + internal static string menuImages { + get { + return ResourceManager.GetString("menuImages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mini Header. + /// + internal static string miniHeader { + get { + return ResourceManager.GetString("miniHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mosaic Image Table. + /// + internal static string mosaicImageTable { + get { + return ResourceManager.GetString("mosaicImageTable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string musicBank { + get { + return ResourceManager.GetString("musicBank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string musicOffsets { + get { + return ResourceManager.GetString("musicOffsets", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string mvTimerBase { + get { + return ResourceManager.GetString("mvTimerBase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectBank { + get { + return ResourceManager.GetString("objectBank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectBank2 { + get { + return ResourceManager.GetString("objectBank2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectCommon { + get { + return ResourceManager.GetString("objectCommon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectEffects { + get { + return ResourceManager.GetString("objectEffects", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectHeader { + get { + return ResourceManager.GetString("objectHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectName { + get { + return ResourceManager.GetString("objectName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string objectUnknown { + get { + return ResourceManager.GetString("objectUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string otherExts { + get { + return ResourceManager.GetString("otherExts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string outputPath { + get { + return ResourceManager.GetString("outputPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string projectPath { + get { + return ResourceManager.GetString("projectPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string protection { + get { + return ResourceManager.GetString("protection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string randomSeed { + get { + return ResourceManager.GetString("randomSeed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string secNum { + get { + return ResourceManager.GetString("secNum", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string shaders { + get { + return ResourceManager.GetString("shaders", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string soundBank { + get { + return ResourceManager.GetString("soundBank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string soundOffsets { + get { + return ResourceManager.GetString("soundOffsets", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Title. + /// + internal static string title { + get { + return ResourceManager.GetString("title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string unknown { + get { + return ResourceManager.GetString("unknown", resourceCulture); + } + } + } +} diff --git a/CTFAK/Properties/Locale/ChunkNames.en-us.resx b/CTFAK/Properties/Locale/ChunkNames.en-us.resx new file mode 100644 index 0000000..536cd90 --- /dev/null +++ b/CTFAK/Properties/Locale/ChunkNames.en-us.resx @@ -0,0 +1,50 @@ + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + About + + + Additional Extensions + + + Additinal Frame Item + + + Author + + + Copyright + + + Frame Name + + + Frame + + + Title + + + Header + + + Extensions + + + Frame Events + + + Frame Effects + + \ No newline at end of file diff --git a/CTFAK/Properties/Locale/ChunkNames.resx b/CTFAK/Properties/Locale/ChunkNames.resx new file mode 100644 index 0000000..26f95e8 --- /dev/null +++ b/CTFAK/Properties/Locale/ChunkNames.resx @@ -0,0 +1,237 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Header + + + Mini Header + + + Title + + + Author + + + Menu + + + + + + Extensions + + + + + + Global Events + + + Frame Handles + + + + + + Additional Extensions + + + + + + + + + + + + + + + Global Values + + + Global Strings + + + + + + Icon + + + + + + + + + + + + Menu Images + + + About + + + Copyright + + + Global Value Names + + + Global String Names + + + + + + + + + + + + + + + + + + Frame + + + Frame Header + + + Frame Name + + + Frame Password + + + Frame Palette + + + Frame Objects + + + Frame Fade In Frame + + + Frame Fade Out Frame + + + Frame Fade In + + + Frame Fade Out + + + Frame Events + + + Frame Play Header + + + Additinal Frame Item + + + + + + Frame Layers + + + Frame Virtual Rect + + + + + + + + + Frame Layer Effects + + + + + + + + + Mosaic Image Table + + + Frame Effects + + + Frame IPhone Options + + + + + + + + + + + + + + + + + + Image Offsets + + + + + + + + + + + + Image Bank + + + + + + + + + + + + Last + + + + + \ No newline at end of file diff --git a/CTFAK/Properties/Locale/ChunkNames.ru-ru.resx b/CTFAK/Properties/Locale/ChunkNames.ru-ru.resx new file mode 100644 index 0000000..626c18d --- /dev/null +++ b/CTFAK/Properties/Locale/ChunkNames.ru-ru.resx @@ -0,0 +1,47 @@ + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + О приложении + + + Дополнительные расширения + + + Дополнительный объект сцены + + + Автор + + + Copyright + + + Название Сцены + + + Сцена + + + Название + + + Заголовок + + + Расширения + + + События Сцены + + \ No newline at end of file diff --git a/CTFAK/Properties/Locale/GlobalStrings.Designer.cs b/CTFAK/Properties/Locale/GlobalStrings.Designer.cs new file mode 100644 index 0000000..a192f70 --- /dev/null +++ b/CTFAK/Properties/Locale/GlobalStrings.Designer.cs @@ -0,0 +1,162 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CTFAK.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class GlobalStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal GlobalStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("CTFAK.Properties.Locale.GlobalStrings", typeof(GlobalStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Dump Images. + /// + internal static string dumpImages { + get { + return ResourceManager.GetString("dumpImages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump MFA. + /// + internal static string dumpMfa { + get { + return ResourceManager.GetString("dumpMfa", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump Music. + /// + internal static string dumpMusics { + get { + return ResourceManager.GetString("dumpMusics", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump Sorted. + /// + internal static string dumpSorted { + get { + return ResourceManager.GetString("dumpSorted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump Sounds. + /// + internal static string dumpSounds { + get { + return ResourceManager.GetString("dumpSounds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copyright. + /// + internal static string gameCopyright { + get { + return ResourceManager.GetString("gameCopyright", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Title. + /// + internal static string gameTitle { + get { + return ResourceManager.GetString("gameTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading. + /// + internal static string loading { + get { + return ResourceManager.GetString("loading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open Dump Folder. + /// + internal static string openFolder { + get { + return ResourceManager.GetString("openFolder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading Frame:. + /// + internal static string readingFrame { + get { + return ResourceManager.GetString("readingFrame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select File. + /// + internal static string selectFile { + get { + return ResourceManager.GetString("selectFile", resourceCulture); + } + } + } +} diff --git a/CTFAK/Properties/Locale/GlobalStrings.en-us.resx b/CTFAK/Properties/Locale/GlobalStrings.en-us.resx new file mode 100644 index 0000000..ae8d66f --- /dev/null +++ b/CTFAK/Properties/Locale/GlobalStrings.en-us.resx @@ -0,0 +1,47 @@ + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Dump Images + + + Dump MFA + + + Dump Music + + + Dump Sorted + + + Dump Sounds + + + Loading... + + + Open Dump Folder + + + Select File + + + Title + + + Copyright + + + Reading Frame: + + \ No newline at end of file diff --git a/CTFAK/Properties/Locale/GlobalStrings.resx b/CTFAK/Properties/Locale/GlobalStrings.resx new file mode 100644 index 0000000..20ce339 --- /dev/null +++ b/CTFAK/Properties/Locale/GlobalStrings.resx @@ -0,0 +1,54 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Dump Images + + + Dump Sounds + + + Dump Music + + + Open Dump Folder + + + Dump MFA + + + Select File + + + Dump Sorted + + + Loading + + + Title + + + Copyright + + + Reading Frame: + + \ No newline at end of file diff --git a/CTFAK/Properties/Locale/GlobalStrings.ru-ru.resx b/CTFAK/Properties/Locale/GlobalStrings.ru-ru.resx new file mode 100644 index 0000000..f5d3e26 --- /dev/null +++ b/CTFAK/Properties/Locale/GlobalStrings.ru-ru.resx @@ -0,0 +1,47 @@ + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Сохранить Картинки + + + Сохранить MFA + + + Сохранить Музыку + + + Сохранение с сортировкой + + + Сохранить звуки + + + Загрузка... + + + Открыть Папку + + + Выбрать Файл + + + Название + + + Копирайт + + + Чтение сцены: + + \ No newline at end of file diff --git a/CTFAK/Settings.cs b/CTFAK/Settings.cs index 4bac117..501cf93 100644 --- a/CTFAK/Settings.cs +++ b/CTFAK/Settings.cs @@ -37,7 +37,7 @@ namespace CTFAK - public static string DumperVersion = true ? "CTFAK 0.2.5 Alpha" : "CTFAK 0.2.1-a Debug"; + public static string DumperVersion = true ? "CTFAK 0.3 Alpha" : "CTFAK 0.2.1-a Debug"; } public class LoadableSettings diff --git a/CTFAK/Utils/Decryption.cs b/CTFAK/Utils/Decryption.cs index e2c9036..c7fe265 100644 --- a/CTFAK/Utils/Decryption.cs +++ b/CTFAK/Utils/Decryption.cs @@ -130,6 +130,7 @@ namespace CTFAK.Utils } private const string _dllPath = "x64\\Decrypter-x64.dll"; + //private const string _dllPath = "x86\\Decrypter-x86.dll"; [DllImport(_dllPath, EntryPoint = "decode_chunk", CharSet = CharSet.Auto)] public static extern IntPtr decode_chunk(IntPtr chunkData, int chunkSize, byte magicChar, IntPtr wrapperKey);