diff --git a/Source/AtlusScriptCompiler/AtlusScriptCompiler.csproj b/Source/AtlusScriptCompiler/AtlusScriptCompiler.csproj index 519e3363..0c8705c8 100644 --- a/Source/AtlusScriptCompiler/AtlusScriptCompiler.csproj +++ b/Source/AtlusScriptCompiler/AtlusScriptCompiler.csproj @@ -1,79 +1,21 @@ - - - - - Debug - AnyCPU - {58E13E8A-EA32-4627-A798-58E4648D812E} - Exe - AtlusScriptCompiler - AtlusScriptCompiler - v4.8 - 512 - true - - - - - AnyCPU - true - full - false - ..\..\Build\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\Build\Release\ - TRACE - prompt - 4 - - - - - - - - - - - + + - - - - + + - - PreserveNewest - - - - - - {62ee486f-ae33-4dbb-ac4c-409a22cb04ad} - AtlusScriptLibrary - - - - - 2.3.0 - - - 1.5.0.235 + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - + Exe + net8.0 + enable + enable - \ No newline at end of file + + diff --git a/Source/AtlusScriptCompiler/Properties/AssemblyInfo.cs b/Source/AtlusScriptCompiler/Properties/AssemblyInfo.cs deleted file mode 100644 index eda10b7e..00000000 --- a/Source/AtlusScriptCompiler/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AtlusScriptCompiler")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AtlusScriptCompiler")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("58e13e8a-ea32-4627-a798-58e4648d812e")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] diff --git a/Source/AtlusScriptLibrary/AtlusScriptLibrary.csproj b/Source/AtlusScriptLibrary/AtlusScriptLibrary.csproj index 1b3f8c62..c1ecc50c 100644 --- a/Source/AtlusScriptLibrary/AtlusScriptLibrary.csproj +++ b/Source/AtlusScriptLibrary/AtlusScriptLibrary.csproj @@ -342,6 +342,7 @@ 3.3.2 + diff --git a/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryReader.cs b/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryReader.cs index 3d05f5ba..e9892541 100644 --- a/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryReader.cs +++ b/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryReader.cs @@ -17,6 +17,7 @@ public sealed class FlowScriptBinaryReader : IDisposable public FlowScriptBinaryReader(Stream stream, BinaryFormatVersion version, bool leaveOpen = false) { mPositionBase = stream.Position; + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); mReader = new EndianBinaryReader(stream, Encoding.GetEncoding(932), leaveOpen, version.HasFlag(BinaryFormatVersion.BigEndian) ? Endianness.BigEndian : Endianness.LittleEndian); mVersion = version; } diff --git a/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryWriter.cs b/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryWriter.cs index b0a08791..d0293e9e 100644 --- a/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryWriter.cs +++ b/Source/AtlusScriptLibrary/FlowScriptLanguage/BinaryModel/IO/FlowScriptBinaryWriter.cs @@ -17,6 +17,7 @@ public sealed class FlowScriptBinaryWriter : IDisposable public FlowScriptBinaryWriter(Stream stream, BinaryFormatVersion version, bool leaveOpen = false) { mPositionBase = stream.Position; + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); mWriter = new EndianBinaryWriter(stream, Encoding.GetEncoding(932), leaveOpen, version.HasFlag(BinaryFormatVersion.BigEndian) ? Endianness.BigEndian : Endianness.LittleEndian); mVersion = version; } diff --git a/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga.json b/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga.json index 368bfecb..ebb9bf61 100644 --- a/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga.json +++ b/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga.json @@ -1,6 +1,6 @@ { "Name": "Digital Devil Saga", "ShortName": "dds", - "FlowScriptModulesPath": "DigitalDevilSaga\\FlowScriptModules.json", - "MessageScriptLibraryPath": "DigitalDevilSaga\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "DigitalDevilSaga/FlowScriptModules.json", + "MessageScriptLibraryPath": "DigitalDevilSaga/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga/FlowScriptModules.json index b20a6e90..2f56999a 100644 --- a/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/DigitalDevilSaga/FlowScriptModules.json @@ -4,7 +4,7 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "DigitalDevilSaga\\Modules\\Common\\Enums.json", - "FunctionsPath": "DigitalDevilSaga\\Modules\\Common\\Functions.json" + "EnumsPath": "DigitalDevilSaga/Modules/Common/Enums.json", + "FunctionsPath": "DigitalDevilSaga/Modules/Common/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Nocturne.json b/Source/AtlusScriptLibrary/Libraries/Nocturne.json index 8d752627..7ed22c05 100644 --- a/Source/AtlusScriptLibrary/Libraries/Nocturne.json +++ b/Source/AtlusScriptLibrary/Libraries/Nocturne.json @@ -1,6 +1,6 @@ { "Name": "Shin Megami Tensei III: Nocturne", "ShortName": "smt3", - "FlowScriptModulesPath": "Nocturne\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Nocturne\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Nocturne/FlowScriptModules.json", + "MessageScriptLibraryPath": "Nocturne/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Nocturne/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Nocturne/FlowScriptModules.json index 3a683449..181e3d97 100644 --- a/Source/AtlusScriptLibrary/Libraries/Nocturne/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Nocturne/FlowScriptModules.json @@ -4,7 +4,7 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "Nocturne\\Modules\\Common\\Enums.json", - "FunctionsPath": "Nocturne\\Modules\\Common\\Functions.json" + "EnumsPath": "Nocturne/Modules/Common/Enums.json", + "FunctionsPath": "Nocturne/Modules/Common/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3.json b/Source/AtlusScriptLibrary/Libraries/Persona3.json index e0d7921f..a98cd079 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3.json @@ -1,6 +1,6 @@ { "Name": "Persona 3", "ShortName": "p3", - "FlowScriptModulesPath": "Persona3\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona3\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona3/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona3/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona3/FlowScriptModules.json index f105d9ec..4f91d2fa 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3/FlowScriptModules.json @@ -5,6 +5,6 @@ "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3\\Modules\\Common\\Functions.json" + "FunctionsPath": "Persona3/Modules/Common/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3FES.json b/Source/AtlusScriptLibrary/Libraries/Persona3FES.json index a3c9fe5e..3554d5c9 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3FES.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3FES.json @@ -1,6 +1,6 @@ { "Name": "Persona 3 FES", "ShortName": "p3f", - "FlowScriptModulesPath": "Persona3FES\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona3FES\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona3FES/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona3FES/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3FES/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona3FES/FlowScriptModules.json index d971a011..036302fc 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3FES/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3FES/FlowScriptModules.json @@ -4,7 +4,7 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "Persona3FES\\Modules\\Common\\Enums.json", - "FunctionsPath": "Persona3FES\\Modules\\Common\\Functions.json" + "EnumsPath": "Persona3FES/Modules/Common/Enums.json", + "FunctionsPath": "Persona3FES/Modules/Common/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3Portable.json b/Source/AtlusScriptLibrary/Libraries/Persona3Portable.json index 374039c7..7b8210cf 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3Portable.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3Portable.json @@ -1,6 +1,6 @@ { "Name": "Persona 3 Portable", "ShortName": "p3p", - "FlowScriptModulesPath": "Persona3Portable\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona3Portable\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona3Portable/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona3Portable/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3Portable/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona3Portable/FlowScriptModules.json index 91c567bd..3f4ecf9d 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3Portable/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3Portable/FlowScriptModules.json @@ -4,24 +4,24 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "Persona3Portable\\Enums.json", - "FunctionsPath": "Persona3Portable\\Modules\\Common\\Functions.json" + "EnumsPath": "Persona3Portable/Enums.json", + "FunctionsPath": "Persona3Portable/Modules/Common/Functions.json" }, { "Name": "Field", "ShortName": "Field", "Description": "Field related functions.", "ConstantsPath": "", - "EnumsPath": "Persona3Portable\\Enums.json", - "FunctionsPath": "Persona3Portable\\Modules\\Field\\Functions.json" + "EnumsPath": "Persona3Portable/Enums.json", + "FunctionsPath": "Persona3Portable/Modules/Field/Functions.json" }, { "Name": "AI", "ShortName": "AI", "Description": "AI related functions.", "ConstantsPath": "", - "EnumsPath": "Persona3Portable\\Enums.json", - "FunctionsPath": "Persona3Portable\\Modules\\AI\\Functions.json" + "EnumsPath": "Persona3Portable/Enums.json", + "FunctionsPath": "Persona3Portable/Modules/AI/Functions.json" }, { "Name": "Event", @@ -29,22 +29,22 @@ "Description": "Event related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Portable\\Modules\\Event\\Functions.json" + "FunctionsPath": "Persona3Portable/Modules/Event/Functions.json" }, { "Name": "Facility", "ShortName": "Facility", "Description": "Facility/Call related functions.", "ConstantsPath": "", - "EnumsPath": "Persona3Portable\\Enums.json", - "FunctionsPath": "Persona3Portable\\Modules\\Facility\\Functions.json" + "EnumsPath": "Persona3Portable/Enums.json", + "FunctionsPath": "Persona3Portable/Modules/Facility/Functions.json" }, { "Name": "Shared", "ShortName": "Shared data", "Description": "", "ConstantsPath": "", - "EnumsPath": "Persona3Portable\\Enums.json", - "FunctionsPath": "Persona3Portable\\Modules\\Shared\\Functions.json" + "EnumsPath": "Persona3Portable/Enums.json", + "FunctionsPath": "Persona3Portable/Modules/Shared/Functions.json" } ] \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3Reload.json b/Source/AtlusScriptLibrary/Libraries/Persona3Reload.json index c87b7127..4c625702 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3Reload.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3Reload.json @@ -1,6 +1,6 @@ { "Name": "Persona 3 Reload", "ShortName": "p3re", - "FlowScriptModulesPath": "Persona3Reload\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona3Reload\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona3Reload/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona3Reload/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona3Reload/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona3Reload/FlowScriptModules.json index f3e08d7a..41b0b5f0 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona3Reload/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona3Reload/FlowScriptModules.json @@ -5,7 +5,7 @@ "Description": "Battle related functions (AI + BTL)", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Battle\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Battle/Functions.json" }, { "Name": "Common", @@ -13,7 +13,7 @@ "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Common\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Common/Functions.json" }, { "Name": "Community", @@ -21,7 +21,7 @@ "Description": "Social Link related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Community\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Community/Functions.json" }, { "Name": "Event", @@ -29,7 +29,7 @@ "Description": "Event related functions", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Event\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Event/Functions.json" }, { "Name": "Facility", @@ -37,7 +37,7 @@ "Description": "Facility related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Facility\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Facility/Functions.json" }, { "Name": "Field", @@ -45,6 +45,6 @@ "Description": "Field related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona3Reload\\Modules\\Field\\Functions.json" + "FunctionsPath": "Persona3Reload/Modules/Field/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona4.json b/Source/AtlusScriptLibrary/Libraries/Persona4.json index 979f6ece..b265229a 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona4.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona4.json @@ -1,6 +1,6 @@ { "Name": "Persona 4", "ShortName": "p4", - "FlowScriptModulesPath": "Persona4\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona4\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona4/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona4/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona4/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona4/FlowScriptModules.json index f46ffba0..15a8fffa 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona4/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona4/FlowScriptModules.json @@ -5,7 +5,7 @@ "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4\\Modules\\Common\\Functions.json" + "FunctionsPath": "Persona4/Modules/Common/Functions.json" }, { "Name": "Field", @@ -13,15 +13,15 @@ "Description": "Field related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4\\Modules\\Field\\Functions.json" + "FunctionsPath": "Persona4/Modules/Field/Functions.json" }, { "Name": "AI", "ShortName": "AI", "Description": "AI related functions.", "ConstantsPath": "", - "EnumsPath": "Persona4\\Modules\\AI\\Enums.json", - "FunctionsPath": "Persona4\\Modules\\AI\\Functions.json" + "EnumsPath": "Persona4/Modules/AI/Enums.json", + "FunctionsPath": "Persona4/Modules/AI/Functions.json" }, { "Name": "Event", @@ -29,6 +29,6 @@ "Description": "Event related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4\\Modules\\Event\\Functions.json" + "FunctionsPath": "Persona4/Modules/Event/Functions.json" }, ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona4Golden.json b/Source/AtlusScriptLibrary/Libraries/Persona4Golden.json index 7302901d..82ee7e64 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona4Golden.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona4Golden.json @@ -1,6 +1,6 @@ { "Name": "Persona 4 Golden", "ShortName": "p4g", - "FlowScriptModulesPath": "Persona4Golden\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona4Golden\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona4Golden/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona4Golden/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona4Golden/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona4Golden/FlowScriptModules.json index b46ed745..d65a52a4 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona4Golden/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona4Golden/FlowScriptModules.json @@ -4,8 +4,8 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "Persona4Golden\\Modules\\Common\\Enums.json", - "FunctionsPath": "Persona4Golden\\Modules\\Common\\Functions.json" + "EnumsPath": "Persona4Golden/Modules/Common/Enums.json", + "FunctionsPath": "Persona4Golden/Modules/Common/Functions.json" }, { "Name": "Field", @@ -13,15 +13,15 @@ "Description": "Field related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4Golden\\Modules\\Field\\Functions.json" + "FunctionsPath": "Persona4Golden/Modules/Field/Functions.json" }, { "Name": "AI", "ShortName": "AI", "Description": "AI related functions.", "ConstantsPath": "", - "EnumsPath": "Persona4Golden\\Modules\\AI\\Enums.json", - "FunctionsPath": "Persona4Golden\\Modules\\AI\\Functions.json" + "EnumsPath": "Persona4Golden/Modules/AI/Enums.json", + "FunctionsPath": "Persona4Golden/Modules/AI/Functions.json" }, { "Name": "Event", @@ -29,7 +29,7 @@ "Description": "Event related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4Golden\\Modules\\Event\\Functions.json" + "FunctionsPath": "Persona4Golden/Modules/Event/Functions.json" }, { "Name": "Facility", @@ -37,7 +37,7 @@ "Description": "Facility based scene transition related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4Golden\\Modules\\Facility\\Functions.json" + "FunctionsPath": "Persona4Golden/Modules/Facility/Functions.json" }, { "Name": "Net", @@ -45,6 +45,6 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona4Golden\\Modules\\Net\\Functions.json" + "FunctionsPath": "Persona4Golden/Modules/Net/Functions.json" }, ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona5.json b/Source/AtlusScriptLibrary/Libraries/Persona5.json index 0dd66d3e..24e033db 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona5.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona5.json @@ -1,6 +1,6 @@ { "Name": "Persona 5", "ShortName": "p5", - "FlowScriptModulesPath": "Persona5\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona5\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona5/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona5/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona5/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona5/FlowScriptModules.json index b2ac0153..1ae7c6dd 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona5/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona5/FlowScriptModules.json @@ -4,24 +4,24 @@ "ShortName": "Common", "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", - "EnumsPath": "Persona5\\Modules\\Common\\Enums.json", - "FunctionsPath": "Persona5\\Modules\\Common\\Functions.json" + "EnumsPath": "Persona5/Modules/Common/Enums.json", + "FunctionsPath": "Persona5/Modules/Common/Functions.json" }, { "Name": "Field", "ShortName": "Field", "Description": "Field related functions.", "ConstantsPath": "", - "EnumsPath": "Persona5\\Modules\\Field\\Enums.json", - "FunctionsPath": "Persona5\\Modules\\Field\\Functions.json" + "EnumsPath": "Persona5/Modules/Field/Enums.json", + "FunctionsPath": "Persona5/Modules/Field/Functions.json" }, { "Name": "AI", "ShortName": "AI", "Description": "AI related functions.", "ConstantsPath": "", - "EnumsPath": "Persona5\\Modules\\AI\\Enums.json", - "FunctionsPath": "Persona5\\Modules\\AI\\Functions.json" + "EnumsPath": "Persona5/Modules/AI/Enums.json", + "FunctionsPath": "Persona5/Modules/AI/Functions.json" }, { "Name": "Social event", @@ -29,7 +29,7 @@ "Description": "Social event related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5\\Modules\\Social\\Functions.json" + "FunctionsPath": "Persona5/Modules/Social/Functions.json" }, { "Name": "Facility", @@ -37,7 +37,7 @@ "Description": "Facility related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5\\Modules\\Facility\\Functions.json" + "FunctionsPath": "Persona5/Modules/Facility/Functions.json" }, { "Name": "Net", @@ -45,6 +45,6 @@ "Description": "Net related functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5\\Modules\\Net\\Functions.json" + "FunctionsPath": "Persona5/Modules/Net/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/Persona5Royal.json b/Source/AtlusScriptLibrary/Libraries/Persona5Royal.json index f6b90344..e67064d2 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona5Royal.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona5Royal.json @@ -1,6 +1,6 @@ { "Name": "Persona 5 Royal", "ShortName": "p5r", - "FlowScriptModulesPath": "Persona5Royal\\FlowScriptModules.json", - "MessageScriptLibraryPath": "Persona5Royal\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "Persona5Royal/FlowScriptModules.json", + "MessageScriptLibraryPath": "Persona5Royal/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/Persona5Royal/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/Persona5Royal/FlowScriptModules.json index e40603a1..d3307b5e 100644 --- a/Source/AtlusScriptLibrary/Libraries/Persona5Royal/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/Persona5Royal/FlowScriptModules.json @@ -4,8 +4,8 @@ "ShortName": "Common", "Description": "", "ConstantsPath": "", - "EnumsPath": "Persona5Royal\\Modules\\Common\\Enums.json", - "FunctionsPath": "Persona5Royal\\Modules\\Common\\Functions.json" + "EnumsPath": "Persona5Royal/Modules/Common/Enums.json", + "FunctionsPath": "Persona5Royal/Modules/Common/Functions.json" }, { "Name": "Field", @@ -13,7 +13,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5Royal\\Modules\\Field\\Functions.json" + "FunctionsPath": "Persona5Royal/Modules/Field/Functions.json" }, { "Name": "AI", @@ -21,7 +21,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5Royal\\Modules\\AI\\Functions.json" + "FunctionsPath": "Persona5Royal/Modules/AI/Functions.json" }, { "Name": "Social", @@ -29,7 +29,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5Royal\\Modules\\Social\\Functions.json" + "FunctionsPath": "Persona5Royal/Modules/Social/Functions.json" }, { "Name": "Facility", @@ -37,7 +37,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5Royal\\Modules\\Facility\\Functions.json" + "FunctionsPath": "Persona5Royal/Modules/Facility/Functions.json" }, { "Name": "Net", @@ -45,6 +45,6 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "Persona5Royal\\Modules\\Net\\Functions.json" + "FunctionsPath": "Persona5Royal/Modules/Net/Functions.json" } ] diff --git a/Source/AtlusScriptLibrary/Libraries/PersonaQ2.json b/Source/AtlusScriptLibrary/Libraries/PersonaQ2.json index f54c2d43..940eb29b 100644 --- a/Source/AtlusScriptLibrary/Libraries/PersonaQ2.json +++ b/Source/AtlusScriptLibrary/Libraries/PersonaQ2.json @@ -1,6 +1,6 @@ { "Name": "Persona Q2", "ShortName": "pq2", - "FlowScriptModulesPath": "PersonaQ2\\FlowScriptModules.json", - "MessageScriptLibraryPath": "PersonaQ2\\MessageScriptLibrary.json" + "FlowScriptModulesPath": "PersonaQ2/FlowScriptModules.json", + "MessageScriptLibraryPath": "PersonaQ2/MessageScriptLibrary.json" } \ No newline at end of file diff --git a/Source/AtlusScriptLibrary/Libraries/PersonaQ2/FlowScriptModules.json b/Source/AtlusScriptLibrary/Libraries/PersonaQ2/FlowScriptModules.json index 168e7bc3..70741858 100644 --- a/Source/AtlusScriptLibrary/Libraries/PersonaQ2/FlowScriptModules.json +++ b/Source/AtlusScriptLibrary/Libraries/PersonaQ2/FlowScriptModules.json @@ -5,7 +5,7 @@ "Description": "Non-domain specific commonly used functions.", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Common\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Common/Functions.json" }, { "Name": "Window", @@ -13,7 +13,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Window\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Window/Functions.json" }, { "Name": "Dungeon", @@ -21,7 +21,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Dungeon\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Dungeon/Functions.json" }, { "Name": "Battle", @@ -29,7 +29,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Battle\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Battle/Functions.json" }, { "Name": "Event", @@ -37,7 +37,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Event\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Event/Functions.json" }, { "Name": "Script", @@ -45,7 +45,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Script\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Script/Functions.json" }, { "Name": "Facility", @@ -53,7 +53,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Facility\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Facility/Functions.json" }, { "Name": "Map", @@ -61,7 +61,7 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Map\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Map/Functions.json" }, { "Name": "Camp", @@ -69,6 +69,6 @@ "Description": "", "ConstantsPath": "", "EnumsPath": "", - "FunctionsPath": "PersonaQ2\\Modules\\Camp\\Functions.json" + "FunctionsPath": "PersonaQ2/Modules/Camp/Functions.json" }, ] diff --git a/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryReader.cs b/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryReader.cs index b8385ef8..f629f6e9 100644 --- a/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryReader.cs +++ b/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryReader.cs @@ -18,6 +18,7 @@ public sealed class MessageScriptBinaryReader : IDisposable public MessageScriptBinaryReader(Stream stream, BinaryFormatVersion version, bool leaveOpen = false) { mPositionBase = stream.Position; + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); mReader = new EndianBinaryReader(stream, Encoding.GetEncoding(932), leaveOpen, version.HasFlag(BinaryFormatVersion.BigEndian) ? Endianness.BigEndian : Endianness.LittleEndian); mVersion = version; } diff --git a/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryWriter.cs b/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryWriter.cs index bd13a2cd..340a4bfb 100644 --- a/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryWriter.cs +++ b/Source/AtlusScriptLibrary/MessageScriptLanguage/BinaryModel/IO/MessageScriptBinaryWriter.cs @@ -14,6 +14,7 @@ public sealed class MessageScriptBinaryWriter : IDisposable public MessageScriptBinaryWriter(Stream stream, BinaryFormatVersion version, bool leaveOpen = false) { mPositionBase = stream.Position; + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); mWriter = new EndianBinaryWriter(stream, Encoding.GetEncoding(932), leaveOpen, version.HasFlag(BinaryFormatVersion.BigEndian) ? Endianness.BigEndian : Endianness.LittleEndian); } diff --git a/Source/AtlusScriptLibrary/MessageScriptLanguage/Decompiler/MessageScriptDecompiler.cs b/Source/AtlusScriptLibrary/MessageScriptLanguage/Decompiler/MessageScriptDecompiler.cs index 44a7fa83..2d1eb61b 100644 --- a/Source/AtlusScriptLibrary/MessageScriptLanguage/Decompiler/MessageScriptDecompiler.cs +++ b/Source/AtlusScriptLibrary/MessageScriptLanguage/Decompiler/MessageScriptDecompiler.cs @@ -26,6 +26,10 @@ public MessageScriptDecompiler(TextWriter writer, TextWriter headerWriter = null { headerWriter = new FileTextWriter(fileTextWriter.Path + ".h"); } + if (headerWriter == null && writer is StringWriter stringWriter) + { + headerWriter = new StringWriter(); + } mHeaderWriter = headerWriter; } diff --git a/Source/AtlusScriptLibraryTests/AtlusScriptLibraryTests.csproj b/Source/AtlusScriptLibraryTests/AtlusScriptLibraryTests.csproj index cfe01c58..de1d938e 100644 --- a/Source/AtlusScriptLibraryTests/AtlusScriptLibraryTests.csproj +++ b/Source/AtlusScriptLibraryTests/AtlusScriptLibraryTests.csproj @@ -1,130 +1,27 @@ - - + + - Debug - AnyCPU - {0A43F5ED-1628-43E8-9572-511A7E4AC5BC} - Library - Properties - AtlusScriptLibraryTests - AtlusScriptLibraryTests - v4.8 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - + net8.0 + enable + enable + + false + true - - true - full - false - ..\..\Build\Tests\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Build\Tests\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - + - - - - - - - - - + + + + + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - + + - - {62ee486f-ae33-4dbb-ac4c-409a22cb04ad} - AtlusScriptLibrary - + - - - 3.0.1 - - - 3.0.2 - - - - - - - False - - - False - - - False - - - False - - - - - - - - - - - - \ No newline at end of file + + diff --git a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/BinaryModel/FlowScriptBinaryTests.cs b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/BinaryModel/FlowScriptBinaryTests.cs index 176ff61b..dca784e6 100644 --- a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/BinaryModel/FlowScriptBinaryTests.cs +++ b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/BinaryModel/FlowScriptBinaryTests.cs @@ -8,7 +8,7 @@ public class FlowScriptBinaryTests { private void FromFile_ResultNotNullAndFormatIsEqualToParameter(BinaryFormatVersion version, BinaryFormatVersion actualVersion) { - var script = FlowScriptBinary.FromFile($"TestResources\\{actualVersion}.bf", version); + var script = FlowScriptBinary.FromFile($"TestResources/{actualVersion}.bf", version); Assert.IsNotNull(script, "Script object should not be null"); Assert.AreEqual(actualVersion, script.FormatVersion); @@ -71,20 +71,20 @@ public void FromFile_ResultNotNullAndFormatIsEqualToParameter_Version3BigEndianW [TestMethod] public void FromFileTest_InvalidFileFormat_Small() { - Assert.ThrowsException(() => FlowScriptBinary.FromFile("TestResources\\dummy_small.bin", BinaryFormatVersion.Unknown)); + Assert.ThrowsException(() => FlowScriptBinary.FromFile("TestResources/dummy_small.bin", BinaryFormatVersion.Unknown)); } [TestMethod] public void FromFileTest_InvalidFileFormat_Big() { - Assert.ThrowsException(() => FlowScriptBinary.FromFile("TestResources\\dummy_big.bin", BinaryFormatVersion.Unknown)); + Assert.ThrowsException(() => FlowScriptBinary.FromFile("TestResources/dummy_big.bin", BinaryFormatVersion.Unknown)); } [TestMethod] [Ignore] public void FromFileTest_Batch() { - foreach (var path in Directory.EnumerateFiles("TestResources\\Batch\\", "*.bf")) + foreach (var path in Directory.EnumerateFiles("TestResources/Batch/", "*.bf")) { var script = FlowScriptBinary.FromFile(path, BinaryFormatVersion.Version3BigEndian); @@ -95,7 +95,7 @@ public void FromFileTest_Batch() [TestMethod] public void FromStreamTest() { - using (var fileStream = File.OpenRead("TestResources\\Version3BigEndian.bf")) + using (var fileStream = File.OpenRead("TestResources/Version3BigEndian.bf")) { var script = FlowScriptBinary.FromStream(fileStream, BinaryFormatVersion.Version3BigEndian); diff --git a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Compiler/FlowScriptCompilerTests.cs b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Compiler/FlowScriptCompilerTests.cs index f9633fa7..b3e790c5 100644 --- a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Compiler/FlowScriptCompilerTests.cs +++ b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Compiler/FlowScriptCompilerTests.cs @@ -24,6 +24,18 @@ private void RunTest(string source, IEnumerable instructions) } var compiledInstructions = script.EnumerateInstructions().ToList(); + + Console.WriteLine("Compiled Instructions:"); + Console.WriteLine(); + Console.WriteLine(string.Join('\n', compiledInstructions.Select(z => z.ToString()))); + + Console.WriteLine(); + Console.WriteLine(); + + Console.WriteLine("Expected Instructions:"); + Console.WriteLine(); + Console.WriteLine(string.Join('\n', instructions.Select(z => z.ToString()))); + Assert.IsTrue(compiledInstructions.SequenceEqual(instructions)); } diff --git a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Disassembler/FlowScriptDisassemblerTests.cs b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Disassembler/FlowScriptDisassemblerTests.cs index 503f70d8..9c94d1cf 100644 --- a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Disassembler/FlowScriptDisassemblerTests.cs +++ b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/Disassembler/FlowScriptDisassemblerTests.cs @@ -19,26 +19,26 @@ private void DisassembleToFileTestBase(string path) [TestMethod] public void DisassembleToFileTest_V1() { - DisassembleToFileTestBase("TestResources\\Version1.bf"); + DisassembleToFileTestBase("TestResources/Version1.bf"); } [TestMethod] public void DisassembleToFileTest_V2() { - DisassembleToFileTestBase("TestResources\\Version2.bf"); + DisassembleToFileTestBase("TestResources/Version2.bf"); } [TestMethod] public void DisassembleToFileTest_V3_BE() { - DisassembleToFileTestBase("TestResources\\Version3BigEndian.bf"); + DisassembleToFileTestBase("TestResources/Version3BigEndian.bf"); } [TestMethod] [Ignore] public void DisassembleToFileTest_Batch() { - foreach (var path in Directory.EnumerateFiles("TestResources\\Batch\\", "*.bf")) + foreach (var path in Directory.EnumerateFiles("TestResources/Batch/", "*.bf")) { DisassembleToFileTestBase(path); } @@ -47,7 +47,7 @@ public void DisassembleToFileTest_Batch() [TestMethod] public void DisassembleTest() { - var script = FlowScriptBinary.FromFile("TestResources\\Version1.bf"); + var script = FlowScriptBinary.FromFile("TestResources/Version1.bf"); using (var disassembler = new FlowScriptBinaryDisassembler(new StringWriter())) disassembler.Disassemble(script); } diff --git a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/FlowScriptTests.cs b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/FlowScriptTests.cs index 90fd7a67..af10c2f8 100644 --- a/Source/AtlusScriptLibraryTests/FlowScriptLanguage/FlowScriptTests.cs +++ b/Source/AtlusScriptLibraryTests/FlowScriptLanguage/FlowScriptTests.cs @@ -11,7 +11,7 @@ public class FlowScriptTests { private FlowScript FromFile_ResultNotNullAndFormatIsEqualToParameter(FormatVersion version, FormatVersion actualVersion) { - var script = FlowScript.FromFile($"TestResources\\{actualVersion}.bf", null, version); + var script = FlowScript.FromFile($"TestResources/{actualVersion}.bf", null, version); Assert.IsNotNull(script, "Script object should not be null"); Assert.AreEqual((FormatVersion)actualVersion, script.FormatVersion); @@ -91,20 +91,20 @@ public void FromFile_ResultNotNullAndFormatIsEqualToParameter_Version3WithWrongV [TestMethod] public void FromFile_ShouldThrowInvalidDataException_InvalidFileFormatSmall() { - Assert.ThrowsException(() => FlowScript.FromFile("TestResources\\dummy_small.bin", null, FormatVersion.Unknown)); + Assert.ThrowsException(() => FlowScript.FromFile("TestResources/dummy_small.bin", null, FormatVersion.Unknown)); } [TestMethod] public void FromFile_ShouldThrowInvalidDataException_InvalidFileFormatBig() { - Assert.ThrowsException(() => FlowScript.FromFile("TestResources\\dummy_big.bin", null, FormatVersion.Unknown)); + Assert.ThrowsException(() => FlowScript.FromFile("TestResources/dummy_big.bin", null, FormatVersion.Unknown)); } [TestMethod] [Ignore] public void FromFile_ShouldNotThrow_Batch() { - foreach (var path in Directory.EnumerateFiles("TestResources\\Batch\\", "*.bf")) + foreach (var path in Directory.EnumerateFiles("TestResources/Batch/", "*.bf")) { var script = FlowScript.FromFile(path); } @@ -113,7 +113,7 @@ public void FromFile_ShouldNotThrow_Batch() [TestMethod] public void FromStream_ShouldNotBeNullAndIsSameVersion_Version3BigEndian() { - using (var fileStream = File.OpenRead("TestResources\\Version3BigEndian.bf")) + using (var fileStream = File.OpenRead("TestResources/Version3BigEndian.bf")) { var script = FlowScript.FromStream(fileStream, null, FormatVersion.Version3BigEndian, false); @@ -125,7 +125,7 @@ public void FromStream_ShouldNotBeNullAndIsSameVersion_Version3BigEndian() [TestMethod] public void FromBinary_ContentsShouldMatchThatOfBinary_Version3BigEndian() { - var binary = FlowScriptBinary.FromFile("TestResources\\Version3BigEndian.bf", BinaryFormatVersion.Version3BigEndian); + var binary = FlowScriptBinary.FromFile("TestResources/Version3BigEndian.bf", BinaryFormatVersion.Version3BigEndian); var script = FlowScript.FromBinary(binary); Assert.AreEqual(script.UserId, binary.Header.UserId); @@ -175,7 +175,7 @@ public void FromBinary_ContentsShouldMatchThatOfBinary_Version3BigEndian() [Ignore] public void ToBinary_ContentsShouldMatchThatOfSourceBinary_Version3BigEndian() { - var binaryIn = FlowScriptBinary.FromFile("TestResources\\Version3BigEndian.bf"); + var binaryIn = FlowScriptBinary.FromFile("TestResources/Version3BigEndian.bf"); var script = FlowScript.FromBinary(binaryIn); var binaryOut = script.ToBinary(); diff --git a/Source/AtlusScriptLibraryTests/GlobalUsings.cs b/Source/AtlusScriptLibraryTests/GlobalUsings.cs new file mode 100644 index 00000000..ab67c7ea --- /dev/null +++ b/Source/AtlusScriptLibraryTests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/Source/AtlusScriptLibraryTests/MessageScriptLanguage/BinaryModel/MessageScriptBinaryTests.cs b/Source/AtlusScriptLibraryTests/MessageScriptLanguage/BinaryModel/MessageScriptBinaryTests.cs index 28176e60..8de6d1ab 100644 --- a/Source/AtlusScriptLibraryTests/MessageScriptLanguage/BinaryModel/MessageScriptBinaryTests.cs +++ b/Source/AtlusScriptLibraryTests/MessageScriptLanguage/BinaryModel/MessageScriptBinaryTests.cs @@ -12,42 +12,42 @@ public class MessageScriptBinaryTests [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1WithUnknownVersionArgument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); PerformIntegrityCheckForVersion1(script); } [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1WithVersion1Argument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd", BinaryFormatVersion.Version1); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd", BinaryFormatVersion.Version1); PerformIntegrityCheckForVersion1(script); } [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1WithVersion1BigEndianArgument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd", BinaryFormatVersion.Version1BigEndian); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd", BinaryFormatVersion.Version1BigEndian); PerformIntegrityCheckForVersion1(script); } [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1BigEndianWithUnknownVersionArgument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd"); PerformIntegrityCheckForVersion1BigEndian(script); } [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1BigEndianWithVersion1BigEndianArgument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd", BinaryFormatVersion.Version1BigEndian); + var script = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd", BinaryFormatVersion.Version1BigEndian); PerformIntegrityCheckForVersion1BigEndian(script); } [TestMethod] public void FromFile_ShouldPassIntegrityCheck_Version1BigEndianWithVersion1Argument() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd", BinaryFormatVersion.Version1); + var script = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd", BinaryFormatVersion.Version1); PerformIntegrityCheckForVersion1BigEndian(script); } @@ -66,14 +66,14 @@ public void FromFile_ShouldThrowException_EmptyStringArgument() [TestMethod] public void FromFile_ShouldThrowException_InvalidFileFormat() { - Assert.ThrowsException(() => MessageScriptBinary.FromFile("TestResources\\dummy_big.bin")); + Assert.ThrowsException(() => MessageScriptBinary.FromFile("TestResources/dummy_big.bin")); } [TestMethod] [Ignore] public void FromFile_NoException_Batch() { - foreach (var path in Directory.EnumerateFiles("TestResources\\Batch\\", "*.bmd")) + foreach (var path in Directory.EnumerateFiles("TestResources/Batch/", "*.bmd")) { var script = MessageScriptBinary.FromFile(path); @@ -90,14 +90,14 @@ public void FromFile_NoException_Batch() [TestMethod] public void FromStream_ShouldPassIntegrityCheck_Version1() { - var script = MessageScriptBinary.FromStream(File.OpenRead("TestResources\\Version1.bmd")); + var script = MessageScriptBinary.FromStream(File.OpenRead("TestResources/Version1.bmd")); PerformIntegrityCheckForVersion1(script); } [TestMethod] public void FromStream_ShouldPassIntegrityCheck_Version1BigEndian() { - var script = MessageScriptBinary.FromStream(File.OpenRead("TestResources\\Version1BigEndian.bmd")); + var script = MessageScriptBinary.FromStream(File.OpenRead("TestResources/Version1BigEndian.bmd")); PerformIntegrityCheckForVersion1BigEndian(script); } @@ -106,14 +106,14 @@ public void ToFile_ResultShouldPassIntegrityCheck_Version1() { try { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); - script.ToFile("TestResources\\Version1_ToFile.bmd"); - script = MessageScriptBinary.FromFile("TestResources\\Version1_ToFile.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); + script.ToFile("TestResources/Version1_ToFile.bmd"); + script = MessageScriptBinary.FromFile("TestResources/Version1_ToFile.bmd"); PerformIntegrityCheckForVersion1(script); } finally { - File.Delete("TestResources\\Version1_ToFileTest.bmd"); + File.Delete("TestResources/Version1_ToFileTest.bmd"); } } @@ -122,21 +122,21 @@ public void ToFile_ResultShouldPassIntegrityCheck_Version1BigEndian() { try { - var script = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd"); - script.ToFile("TestResources\\Version1BigEndian_ToFile.bmd"); - script = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian_ToFile.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd"); + script.ToFile("TestResources/Version1BigEndian_ToFile.bmd"); + script = MessageScriptBinary.FromFile("TestResources/Version1BigEndian_ToFile.bmd"); PerformIntegrityCheckForVersion1BigEndian(script); } finally { - File.Delete("TestResources\\Version1BigEndian_ToFile.bmd"); + File.Delete("TestResources/Version1BigEndian_ToFile.bmd"); } } [TestMethod] public void ToStream_StreamNotNullOrEmptyAndLengthEqualToFileSize_Version1() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); var stream = script.ToStream(); Assert.IsNotNull(stream); Assert.AreNotEqual(0, stream.Length); @@ -146,7 +146,7 @@ public void ToStream_StreamNotNullOrEmptyAndLengthEqualToFileSize_Version1() [TestMethod] public void ToStream_StreamNotNullOrEmptyAndLengthEqualToFileSize_Version1_TakesStreamParam() { - var script = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); + var script = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); var stream = new MemoryStream(); script.ToStream(stream, true); Assert.IsNotNull(stream); diff --git a/Source/AtlusScriptLibraryTests/MessageScriptLanguage/MessageScriptTests.cs b/Source/AtlusScriptLibraryTests/MessageScriptLanguage/MessageScriptTests.cs index 83ba3da8..806dc11b 100644 --- a/Source/AtlusScriptLibraryTests/MessageScriptLanguage/MessageScriptTests.cs +++ b/Source/AtlusScriptLibraryTests/MessageScriptLanguage/MessageScriptTests.cs @@ -11,33 +11,33 @@ public class MessageScriptTests [TestMethod] public void FromBinary_ShouldNotThrow_Version1() { - var binary = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); + var binary = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); var script = MessageScript.FromBinary(binary); } [TestMethod] public void FromBinary_ShouldNotThrow_Version1BigEndian() { - var binary = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd"); + var binary = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd"); var script = MessageScript.FromBinary(binary); } [TestMethod] public void FromFile_ShouldNotThrow_Version1() { - var script = MessageScript.FromFile("TestResources\\Version1.bmd"); + var script = MessageScript.FromFile("TestResources/Version1.bmd"); } [TestMethod] public void FromFile_ShouldNotThrow_Version1BigEndian() { - var script = MessageScript.FromFile("TestResources\\Version1BigEndian.bmd"); + var script = MessageScript.FromFile("TestResources/Version1BigEndian.bmd"); } [TestMethod] public void FromStream_ShouldNotThrow_Version1() { - using (var fileStream = File.OpenRead("TestResources\\Version1.bmd")) + using (var fileStream = File.OpenRead("TestResources/Version1.bmd")) { var script = MessageScript.FromStream(fileStream); } @@ -46,7 +46,7 @@ public void FromStream_ShouldNotThrow_Version1() [TestMethod] public void FromStream_ShouldNotThrow_Version1BigEndian() { - using (var fileStream = File.OpenRead("TestResources\\Version1BigEndian.bmd")) + using (var fileStream = File.OpenRead("TestResources/Version1BigEndian.bmd")) { var script = MessageScript.FromStream(fileStream); } @@ -65,7 +65,7 @@ public void Constructor_ShouldNotFailDefaultValueCheck() [TestMethod] public void ToBinary_ShouldMatchSourceBinary_Version1() { - var binary = MessageScriptBinary.FromFile("TestResources\\Version1.bmd"); + var binary = MessageScriptBinary.FromFile("TestResources/Version1.bmd"); var script = MessageScript.FromBinary(binary); var newBinary = script.ToBinary(); @@ -75,7 +75,7 @@ public void ToBinary_ShouldMatchSourceBinary_Version1() [TestMethod] public void ToBinary_ShouldMatchSourceBinary_Version1BigEndian() { - var binary = MessageScriptBinary.FromFile("TestResources\\Version1BigEndian.bmd"); + var binary = MessageScriptBinary.FromFile("TestResources/Version1BigEndian.bmd"); var script = MessageScript.FromBinary(binary); var newBinary = script.ToBinary(); diff --git a/Source/AtlusScriptLibraryTests/Properties/AssemblyInfo.cs b/Source/AtlusScriptLibraryTests/Properties/AssemblyInfo.cs deleted file mode 100644 index d1cc4438..00000000 --- a/Source/AtlusScriptLibraryTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AtlusScriptLibTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AtlusScriptLibTests")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0a43f5ed-1628-43e8-9572-511a7e4ac5bc")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")]