Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	TerrLauncherPackCreator/Properties/AssemblyInfo.cs
  • Loading branch information
And42 committed Mar 4, 2021
2 parents 85bc93f + 96ad2da commit 253b3b8
Show file tree
Hide file tree
Showing 138 changed files with 2,071 additions and 2,194 deletions.
86 changes: 19 additions & 67 deletions CommonLibrary/CommonLibrary.csproj
Original file line number Diff line number Diff line change
@@ -1,67 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C963037D-1C4B-4387-BF22-5E15444DF3F5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CommonLibrary</RootNamespace>
<AssemblyName>CommonLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="JetBrains.Annotations, Version=2020.1.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>..\packages\JetBrains.Annotations.2020.1.0\lib\net20\JetBrains.Annotations.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="CommonConstants.cs" />
<Compile Include="CommonUtils\ApplicationDataUtils.cs" />
<Compile Include="CommonUtils\CollectionUtils.cs" />
<Compile Include="CommonUtils\CrashUtils.cs" />
<Compile Include="CommonUtils\IOUtils.cs" />
<Compile Include="CommonUtils\MessageBoxUtils.cs" />
<Compile Include="CommonUtils\UpdateUtils.cs" />
<Compile Include="CommonUtils\WindowUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\Localizations\StringResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>StringResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Localizations\StringResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyName>CommonLibrary</AssemblyName>
<RootNamespace>CommonLibrary</RootNamespace>
<Company />
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\Localizations\StringResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
5 changes: 1 addition & 4 deletions CommonLibrary/CommonUtils/ApplicationDataUtils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.IO;
using JetBrains.Annotations;

namespace CommonLibrary.CommonUtils
{
Expand All @@ -24,8 +23,7 @@ static ApplicationDataUtils()
PathToSessionTempFolder = Path.Combine(PathToRootFolder, "SessionTemp");
}

[NotNull]
public static string GenerateNonExistentFilePath([CanBeNull] string extension = null)
public static string GenerateNonExistentFilePath(string? extension = null)
{
string filePath;
do
Expand All @@ -36,7 +34,6 @@ public static string GenerateNonExistentFilePath([CanBeNull] string extension =
return filePath;
}

[NotNull]
public static string GenerateNonExistentDirPath()
{
string dirPath;
Expand Down
15 changes: 15 additions & 0 deletions CommonLibrary/CommonUtils/ColorUtils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace CommonLibrary.CommonUtils
{
public static class ColorUtils
{
public static System.Windows.Media.Color ToMediaColor(this in System.Drawing.Color color)
{
return System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B);
}

public static System.Drawing.Color ToDrawingColor(this in System.Windows.Media.Color color)
{
return System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B);
}
}
}
35 changes: 0 additions & 35 deletions CommonLibrary/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 0 additions & 4 deletions CommonLibrary/packages.config

This file was deleted.

8 changes: 8 additions & 0 deletions CrossPlatform/Code/Enums/BonusType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace CrossPlatform.Code.Enums
{
public enum BonusType
{
OldVersionOwners = 0,
LastEnumElement
}
}
14 changes: 14 additions & 0 deletions CrossPlatform/Code/Enums/FileType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace CrossPlatform.Code.Enums
{
public enum FileType
{
Texture = 0,
Map = 1,
Character = 2,
Gui = 3,
Translation = 4,
Font = 5,
Audio = 6,
LastEnumElement
}
}
36 changes: 36 additions & 0 deletions CrossPlatform/Code/Enums/PredefinedPackTag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace CrossPlatform.Code.Enums
{
public enum PredefinedPackTag
{
TexturesAnimated = 0,
TexturesWeapons = 1,
TexturesTools = 2,
TexturesVanity = 3,
TexturesArmor = 4,
TexturesPets = 5,
TexturesBosses = 6,
TexturesMobs = 7,
TexturesNpc = 8,
TexturesBlocks = 9,
TexturesOther = 10,
MapsBuildings = 11,
MapsAdventure = 12,
MapsSurvival = 13,
MapsOther = 14,
CharactersCombat = 15,
CharactersAppearance = 16,
CharactersOther = 17,
GuiAnimated = 18,
GuiInventory = 19,
GuiHealthOrMana = 20,
GuiGeneral = 21,
GuiOther = 22,
AudioBiomsOrLocation = 23,
AudioBosses = 24,
AudioEvents = 25,
AudioSounds = 26,
AudioOther = 27,
FontsAnimated = 28,
LastEnumElement
}
}
9 changes: 9 additions & 0 deletions CrossPlatform/Code/FileInfos/AudioFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos
{

public record AudioFileInfo(
string EntryName
) : IPackFileInfo;
}
8 changes: 8 additions & 0 deletions CrossPlatform/Code/FileInfos/CharacterFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos
{
public record CharacterFileInfo(
string ResultFileName
) : IPackFileInfo;
}
8 changes: 8 additions & 0 deletions CrossPlatform/Code/FileInfos/FontFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos {

public record FontFileInfo(
string EntryName
) : IPackFileInfo;
}
30 changes: 30 additions & 0 deletions CrossPlatform/Code/FileInfos/GuiFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Diagnostics.CodeAnalysis;

namespace CrossPlatform.Code.FileInfos {

public record GuiFileInfo : TextureFileInfo
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public GuiFileInfo(
TextureType Type,
string EntryName,
int ElementId,
bool Animated,
bool AnimateInGui,
int NumberOfVerticalFrames,
int NumberOfHorizontalFrames,
int MillisecondsPerFrame,
bool ApplyOriginalSize
) : base(
Type,
EntryName,
ElementId,
Animated,
AnimateInGui,
NumberOfVerticalFrames,
NumberOfHorizontalFrames,
MillisecondsPerFrame,
ApplyOriginalSize
) { }
}
}
8 changes: 8 additions & 0 deletions CrossPlatform/Code/FileInfos/MapFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos
{
public record MapFileInfo(
string ResultFileName
) : IPackFileInfo;
}
27 changes: 27 additions & 0 deletions CrossPlatform/Code/FileInfos/TextureFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos
{
public record TextureFileInfo(
TextureFileInfo.TextureType Type,
string EntryName,
int ElementId,
bool Animated,
bool AnimateInGui,
int NumberOfVerticalFrames,
int NumberOfHorizontalFrames,
int MillisecondsPerFrame,
bool ApplyOriginalSize
) : IPackFileInfo
{
public enum TextureType
{
General = 0,
ItemDeprecated = 1,
NpcDeprecated = 2,
BuffDeprecated = 3,
ExtraDeprecated = 4,
Item = 5
}
}
}
8 changes: 8 additions & 0 deletions CrossPlatform/Code/FileInfos/TranslationFileInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CrossPlatform.Code.Interfaces;

namespace CrossPlatform.Code.FileInfos
{
public record TranslationFileInfo(
string Language
) : IPackFileInfo;
}
Loading

0 comments on commit 253b3b8

Please sign in to comment.