Skip to content

Commit

Permalink
Merge branch 'master' into gltf2
Browse files Browse the repository at this point in the history
  • Loading branch information
pzgulyas committed Jan 24, 2023
2 parents 824f96f + d19a96a commit 651f6fa
Show file tree
Hide file tree
Showing 250 changed files with 31,164 additions and 49,548 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
@@ -1,4 +1,4 @@
version: AV1.4-{build}
version: AV1.5-{build}
skip_branch_with_pr: true
image: Visual Studio 2019
cache:
Expand Down
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgfxc": {
"version": "3.8.0.1641",
"commands": [
"mgfxc"
]
}
}
}
10 changes: 0 additions & 10 deletions .gitattributes
Expand Up @@ -35,16 +35,6 @@
*.svg text
*.eps binary


# https://github.com/Danimoth/gitattributes/blob/master/VisualStudio.gitattributes
# Custom for Visual Studio
*.sln text eol=crlf merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union


# https://github.com/Danimoth/gitattributes/blob/master/CSharp.gitattributes
# Custom for C#
*.cs diff=csharp
Expand Down
32 changes: 30 additions & 2 deletions Source/.editorconfig
@@ -1,7 +1,9 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
# BEGIN COPY FROM https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options#example-editorconfig-file
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]
indent_style = space
Expand Down Expand Up @@ -58,7 +60,7 @@ dotnet_style_prefer_conditional_expression_over_return = true:silent
###############################
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Use PascalCase for constant fields
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
Expand Down Expand Up @@ -92,7 +94,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,static,exter
csharp_prefer_braces = true:silent
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
###############################
# C# Formatting Rules #
Expand Down Expand Up @@ -130,3 +132,29 @@ csharp_preserve_single_line_blocks = true
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
# END COPY

#################################
# Open Rails Coding Conventions #
#################################
[*.cs]

# .NET analyzers
dotnet_style_require_accessibility_modifiers = omit_if_default:silent
dotnet_naming_symbols.all_fields.applicable_kinds = field
dotnet_naming_symbols.all_fields.applicable_accessibilities = *
dotnet_naming_rule.all_fields_should_be_pascal_case.symbols = all_fields
dotnet_naming_rule.all_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_rule.all_fields_should_be_pascal_case.severity = warning

# StyleCop analyzers
dotnet_diagnostic.SA1101.severity = none # Readability: PrefixLocalCallsWithThis
dotnet_diagnostic.SA1200.severity = none # Ordering: UsingDirectivesMustBePlacedCorrectly
dotnet_diagnostic.SA1306.severity = none # Naming: FieldNamesMustBeginWithLowerCaseLetter
dotnet_diagnostic.SA1400.severity = none # Maintainability: AccessModifierMustBeDeclared
dotnet_diagnostic.SA1401.severity = none # Maintainability: FieldsMustBePrivate
dotnet_diagnostic.SA1402.severity = none # Maintainability: FileMayOnlyContainASingleType
dotnet_diagnostic.SA1600.severity = none # Documentation: ElementsMustBeDocumented
dotnet_diagnostic.SA1602.severity = none # Documentation: EnumerationItemsMustBeDocumented
dotnet_diagnostic.SA1633.severity = none # Documentation: FileMustHaveHeader
dotnet_diagnostic.SA1649.severity = none # Documentation: FileNameMustMatchTypeName
Binary file removed Source/3rdPartyLibs/MonoGame/CppNet.dll
Binary file not shown.
Binary file not shown.
7,294 changes: 0 additions & 7,294 deletions Source/3rdPartyLibs/MonoGame/MonoGame.Framework.Content.Pipeline.xml

This file was deleted.

Binary file removed Source/3rdPartyLibs/MonoGame/MonoGame.Framework.dll
Binary file not shown.
18,061 changes: 0 additions & 18,061 deletions Source/3rdPartyLibs/MonoGame/MonoGame.Framework.xml

This file was deleted.

Binary file removed Source/3rdPartyLibs/MonoGame/SharpDX.D3DCompiler.dll
Binary file not shown.
Binary file removed Source/3rdPartyLibs/MonoGame/SharpDX.DXGI.dll
Binary file not shown.
Binary file removed Source/3rdPartyLibs/MonoGame/SharpDX.Direct3D11.dll
Binary file not shown.
Binary file removed Source/3rdPartyLibs/MonoGame/SharpDX.XAudio2.dll
Binary file not shown.
Binary file removed Source/3rdPartyLibs/MonoGame/SharpDX.dll
Binary file not shown.
8 changes: 2 additions & 6 deletions Source/ContentChecker/ContentChecker.csproj
Expand Up @@ -12,11 +12,6 @@
<Copyright>Copyright © 2009 - 2022</Copyright>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(SolutionDir)\3rdPartyLibs\MonoGame\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ORTS.Content\ORTS.Content.csproj" />
<ProjectReference Include="..\Orts.Formats.Msts\Orts.Formats.Msts.csproj" />
Expand All @@ -27,8 +22,9 @@
<ProjectReference Include="..\RunActivity\RunActivity.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
</ItemGroup>
</Project>
26 changes: 15 additions & 11 deletions Source/ContentChecker/Program.cs
Expand Up @@ -21,7 +21,7 @@
using System.IO;
using System.Linq;
using Orts.Common;
using Orts.Parsers.Msts;
using ORTS.Common;

namespace ContentChecker
{
Expand Down Expand Up @@ -77,21 +77,25 @@ static void Main(string[] args)
/// </summary>
static void ShowHelp()
{
Console.WriteLine("Open Rails File Loader and Cross-check utility");
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
Console.WriteLine();
Console.WriteLine("{0} [<option> ...] FILE [...]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
Console.WriteLine("Usage:");
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(version.FileName));
Console.WriteLine();
Console.WriteLine("Arguments:");
Console.WriteLine(" <FILE> Data files to check; may contain wildcards");
Console.WriteLine();
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Console.WriteLine("Options:");
Console.WriteLine(" /h, /help Show help.");
Console.WriteLine(" /v, /verbose Displays all expected/valid values in addition to any errors");
Console.WriteLine(" /d, /dependent Also load dependent files.");
Console.WriteLine(" /h, /help Show help.");
Console.WriteLine(" /v, /verbose Displays all expected/valid values in addition to any errors");
Console.WriteLine(" /d, /dependent Also load dependent files");
Console.WriteLine("");
Console.WriteLine("Partially implemented options:");
Console.WriteLine(" /r, /referenced Also load files that are directly referenced");
Console.WriteLine(" This implies /d");
Console.WriteLine(" /a, /all Load all related files");
Console.WriteLine(" This implies /d and /r");
Console.WriteLine(" /r, /referenced Also load files that are directly referenced");
Console.WriteLine(" This implies /d");
Console.WriteLine(" /a, /all Load all related files");
Console.WriteLine(" This implies /d and /r");
Console.WriteLine("");
Console.WriteLine("This utility needs as input one or more files.");
Console.WriteLine("You can either give a file with a full path or with a relative path.");
Expand Down
2 changes: 1 addition & 1 deletion Source/ContentChecker/SignalScriptLoader.cs
Expand Up @@ -69,7 +69,7 @@ public override void TryLoading(string file)
// we want to load the signal scripts one by one, not as a group
var scriptFiles = new List<string>() { Path.GetFileName(file) };
var scrfile = new SIGSCRfile(new SignalScripts(_sigcfg.ScriptPath, scriptFiles,
_sigcfg.SignalTypes, _sigcfg.ORTSFunctionTypes, _sigcfg.ORTSNormalSubtypes));
_sigcfg.SignalTypes, _sigcfg.SignalFunctions, _sigcfg.ORTSNormalSubtypes));
}
}
}
Expand Down
Expand Up @@ -15,11 +15,6 @@
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<DefineConstants>TRACE;WINDOWS;ACTIVITY_EDITOR</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(SolutionDir)\3rdPartyLibs\MonoGame\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Update="Wizard\ActivityDescr.cs">
<SubType>UserControl</SubType>
Expand Down Expand Up @@ -87,8 +82,9 @@
<ProjectReference Include="..\LibAE\LibAE.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
</ItemGroup>
</Project>
10 changes: 3 additions & 7 deletions Source/Contrib/ActivityEditor/LibAE/LibAE.csproj
Expand Up @@ -12,11 +12,6 @@
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<DefineConstants>TRACE;WINDOWS;ACTIVITY_EDITOR;JSON_OR_XML</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(SolutionDir)\3rdPartyLibs\MonoGame\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon\Start.ico" />
<EmbeddedResource Include="Icon\Stop.ico" />
Expand All @@ -35,9 +30,10 @@
<ProjectReference Include="..\..\..\ORTS.Settings\ORTS.Settings.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/Contrib/ContentManager/ContentManager.csproj
Expand Up @@ -28,7 +28,7 @@
<ProjectReference Include="..\..\ORTS.Settings\ORTS.Settings.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
8 changes: 2 additions & 6 deletions Source/Contrib/DataCollector/DataCollector.csproj
Expand Up @@ -13,18 +13,14 @@
<Copyright>Copyright © 2009 - 2022</Copyright>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(SolutionDir)\3rdPartyLibs\MonoGame\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Orts.Formats.Msts\Orts.Formats.Msts.csproj" />
<ProjectReference Include="..\..\ORTS.Common\ORTS.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.0.1641" />
</ItemGroup>
</Project>
19 changes: 13 additions & 6 deletions Source/Contrib/DataCollector/Program.cs
Expand Up @@ -19,6 +19,7 @@
using ORTS.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

Expand All @@ -38,14 +39,20 @@ static void Main(string[] args)

static void ShowHelp()
{
Console.WriteLine("Open Rails Data Collector utility");
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
Console.WriteLine();
Console.WriteLine("{0} [/system | /tile-terrtex PATH [...]]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
Console.WriteLine("Usage:");
Console.WriteLine(" {0} [options] [<PATH> [...]]", Path.GetFileNameWithoutExtension(version.FileName));
Console.WriteLine();
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Console.WriteLine(" /system Collects and reports on various system information.");
Console.WriteLine(" /tile-terrtex Scans the provided PATHs for MSTS tile files (.t) and");
Console.WriteLine(" produces a statistical summary of the terrtex used.");
Console.WriteLine("Arguments:");
Console.WriteLine(" <PATH> Directories to scan for specific options");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" /system Collects and reports on various system information");
Console.WriteLine(" /tile-terrtex Scans the provided PATHs for MSTS tile files (.t) and");
Console.WriteLine(" produces a statistical summary of the terrtex used");
Console.WriteLine(" /help Show help and usage information");
}

struct TileTerrtexDirectory
Expand Down
4 changes: 2 additions & 2 deletions Source/Contrib/DataConverter/DataConverter.csproj
Expand Up @@ -19,9 +19,9 @@
<ProjectReference Include="..\..\Orts.Parsers.Msts\Orts.Parsers.Msts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
</Project>
24 changes: 17 additions & 7 deletions Source/Contrib/DataConverter/Program.cs
Expand Up @@ -17,9 +17,11 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using ORTS.Common;

namespace Orts.DataConverter
{
Expand Down Expand Up @@ -85,22 +87,30 @@ static void Main(string[] args)

static void ShowHelp(List<IDataConverter> converters)
{
Console.WriteLine("Open Rails Data Converter utility");
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
Console.WriteLine();
Console.WriteLine("{0} /input INPUT [/output] [OUTPUT [...]]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
Console.WriteLine("Usage:");
Console.WriteLine(" {0} /input <INPUT> [/output] [<OUTPUT> [...]]", Path.GetFileNameWithoutExtension(version.FileName));
Console.WriteLine();
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Console.WriteLine(" INPUT Specifies the file to read.");
Console.WriteLine(" OUTPUT Specifies the file to generate.");
Console.WriteLine("Arguments:");
Console.WriteLine(" <INPUT> Specifies the file to read");
Console.WriteLine(" <OUTPUT> Specifies the file to generate");
Console.WriteLine();
Console.WriteLine(" Multiple outputs may be specified for each input.");
Console.WriteLine("Options:");
Console.WriteLine(" /input Indicate that next argument is input");
Console.WriteLine(" /output Indicate that following arguments are outputs");
Console.WriteLine(" /help Show help and usage information");
Console.WriteLine();
Console.WriteLine(" Available file format conversions");
Console.WriteLine("Multiple outputs may be specified for each input");
Console.WriteLine();
Console.WriteLine("Available file format conversions:");
Console.WriteLine(" Input Output Description");
foreach (var converter in converters)
{
converter.ShowConversions();
}
Console.WriteLine();
}

static List<DataConversion> GetConversions(string[] args)
Expand Down
2 changes: 1 addition & 1 deletion Source/Contrib/DataValidator/DataValidator.csproj
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
16 changes: 12 additions & 4 deletions Source/Contrib/DataValidator/Program.cs
Expand Up @@ -21,6 +21,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using ORTS.Common;

namespace DataValidator
{
Expand All @@ -38,12 +39,19 @@ static void Main(string[] args)

static void ShowHelp()
{
Console.WriteLine("Open Rails Data Validator utility");
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
Console.WriteLine();
Console.WriteLine("{0} [/verbose] PATH [...]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
Console.WriteLine("Usage:");
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(version.FileName));
Console.WriteLine();
Console.WriteLine("Arguments:");
Console.WriteLine(" <FILE> Data files to validate; may contain wildcards");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" /verbose Displays all expected/valid values in addition to any errors");
Console.WriteLine(" /help Show help and usage information");
Console.WriteLine();
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Console.WriteLine(" /verbose Displays all expected/valid values in addition to any errors.");
}

static void Validate(bool verbose, IEnumerable<string> files)
Expand Down

0 comments on commit 651f6fa

Please sign in to comment.