Skip to content

Commit

Permalink
Init AudioFormatter
Browse files Browse the repository at this point in the history
Lift .NET version to 4.7.2
  • Loading branch information
UlyssesWu committed May 8, 2020
1 parent 2cd8f17 commit 0ba1513
Show file tree
Hide file tree
Showing 36 changed files with 215 additions and 105 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# CS1591: 缺少对公共可见类型或成员的 XML 注释
dotnet_diagnostic.CS1591.severity = none
30 changes: 30 additions & 0 deletions FreeMote.Plugins.Audio/At9Formatter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;

namespace FreeMote.Plugins.Audio
{
public class At9Formatter : IPsbAudioFormatter
{
public List<string> Extensions => throw new NotImplementedException();

public bool CanToBytes(byte[] wave, Dictionary<string, object> context = null)
{
throw new NotImplementedException();
}

public bool CanToWave(in byte[] data, Dictionary<string, object> context = null)
{
throw new NotImplementedException();
}

public byte[] ToBytes(byte[] bitmap, Dictionary<string, object> context = null)
{
throw new NotImplementedException();
}

public byte[] ToWave(in byte[] data, Dictionary<string, object> context = null)
{
throw new NotImplementedException();
}
}
}
55 changes: 55 additions & 0 deletions FreeMote.Plugins.Audio/FreeMote.Plugins.Audio.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?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>{1796443F-EF3F-4E60-A7A1-F7807935F124}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeMote.Plugins.Audio</RootNamespace>
<AssemblyName>FreeMote.Plugins.Audio</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</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="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="At9Formatter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FreeMote\FreeMote.csproj">
<Project>{d43ca425-6476-4ae3-a3d8-bbcac0f0383c}</Project>
<Name>FreeMote</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
21 changes: 21 additions & 0 deletions FreeMote.Plugins.Audio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("FreeMote.Plugins.Audio")]
[assembly: AssemblyDescription("FreeMote Audio plugins.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Project AZUSA")]
[assembly: AssemblyProduct("FreeMote")]
[assembly: AssemblyCopyright("Copyright © Ulysses 2020")]
[assembly: AssemblyTrademark("[email protected]")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("FreeMote.Tests")]

[assembly: Guid("1796443f-ef3f-4e60-a7a1-f7807935f124")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
4 changes: 2 additions & 2 deletions FreeMote.Plugins/FreeMote.Plugins.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeMote.Plugins</RootNamespace>
<AssemblyName>FreeMote.Plugins</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down Expand Up @@ -55,7 +55,7 @@
<Compile Include="Shells\Lz4Shell.cs" />
<Compile Include="Shells\MdfShell.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Images\TlgImageFormatter.cs" />
<Compile Include="Images\TlgFormatter.cs" />
<Compile Include="Shells\PsdShell.cs" />
<Compile Include="Shells\PspShell.cs" />
<Compile Include="Shells\PszShell.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace FreeMote.Plugins
[ExportMetadata("Name", "FreeMote.Tlg")]
[ExportMetadata("Author", "Ulysses")]
[ExportMetadata("Comment", "TLG support via TlgLib.")]
public class TlgImageFormatter : IPsbImageFormatter
public class TlgFormatter : IPsbImageFormatter
{
private const string TlgVersion = "TlgVersion";
/// <summary>
Expand Down
17 changes: 2 additions & 15 deletions FreeMote.Plugins/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,11 @@
[assembly: AssemblyTrademark("[email protected]")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("FreeMote.Tests")]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("f37472b9-6501-440e-8898-7774304f7fec")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.*")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
2 changes: 1 addition & 1 deletion FreeMote.Plugins/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion FreeMote.PsBuild/FreeMote.PsBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeMote.PsBuild</RootNamespace>
<AssemblyName>FreeMote.PsBuild</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -31,6 +31,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>7.2</LangVersion>
<DocumentationFile>bin\Release\FreeMote.PsBuild.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
17 changes: 2 additions & 15 deletions FreeMote.PsBuild/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,12 @@
[assembly: AssemblyTrademark("[email protected]")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("717a63de-e599-4134-92ab-40a17c326da3")]
[assembly: InternalsVisibleTo("FreeMote.Tests")]
[assembly: InternalsVisibleTo("FreeMote.Editor")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.*")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
8 changes: 7 additions & 1 deletion FreeMote.Psb/FreeMote.Psb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeMote.Psb</RootNamespace>
<AssemblyName>FreeMote.Psb</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -33,6 +33,7 @@
<WarningLevel>4</WarningLevel>
<LangVersion>7.2</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\FreeMote.Psb.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -73,5 +74,10 @@
<Version>4.5.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig">
<Link>.editorconfig</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
17 changes: 2 additions & 15 deletions FreeMote.Psb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,15 @@
[assembly: AssemblyTrademark("[email protected]")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("c0b2c2ff-d8f4-497e-8312-c2af1bb6e7f7")]
[assembly: InternalsVisibleTo("FreeMote.PsBuild")]
[assembly: InternalsVisibleTo("FreeMote.Purify")]
[assembly: InternalsVisibleTo("FreeMote.Plugins")]
[assembly: InternalsVisibleTo("FreeMote.Tests")]
[assembly: InternalsVisibleTo("FreeMote.Editor")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.*")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
4 changes: 2 additions & 2 deletions FreeMote.Tests/FreeMoteTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ public void TestTlgNative()
var resPath = Path.Combine(Environment.CurrentDirectory, @"..\..\Res");
//var path = Path.Combine(resPath, "title-pimg");
var path = Path.Combine(resPath, "title-pimg", "566.tlg");
var bmp = TlgImageFormatter.LoadTlg(File.ReadAllBytes(path), out int ver);
var bmp = TlgFormatter.LoadTlg(File.ReadAllBytes(path), out int ver);
var width = bmp.Width;
var height = bmp.Height;
bmp.Save("tlg.png", ImageFormat.Png);

path = Path.Combine(resPath, "emote_test.pure", "tex#000-texture.png");
Bitmap bmp2 = new Bitmap(path);
var bts = TlgImageFormatter.SaveTlg(bmp2);
var bts = TlgFormatter.SaveTlg(bmp2);
TlgImageConverter converter = new TlgImageConverter();
using (var ms = new MemoryStream(bts))
{
Expand Down
4 changes: 2 additions & 2 deletions FreeMote.Tools.EmtConvert/App.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" />
<probing privatePath="lib"/>
</assemblyBinding>
</runtime>
</configuration>
2 changes: 1 addition & 1 deletion FreeMote.Tools.EmtConvert/FreeMote.Tools.EmtConvert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>FreeMote.Tools.EmtConvert</RootNamespace>
<AssemblyName>EmtConvert</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down
4 changes: 2 additions & 2 deletions FreeMote.Tools.EmtConvert/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

[assembly: Guid("44270712-4acb-447d-835e-9982bd515dbb")]

[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
4 changes: 2 additions & 2 deletions FreeMote.Tools.EmtMake/App.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" />
<probing privatePath="lib"/>
</assemblyBinding>
</runtime>
</configuration>
2 changes: 1 addition & 1 deletion FreeMote.Tools.EmtMake/FreeMote.Tools.EmtMake.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>FreeMote.Tools.EmtMake</RootNamespace>
<AssemblyName>EmtMake</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
Expand Down
4 changes: 2 additions & 2 deletions FreeMote.Tools.EmtMake/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
7 changes: 3 additions & 4 deletions FreeMote.Tools.PsBuild/App.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" />
<probing privatePath="lib"/>
</assemblyBinding>
</runtime>
</configuration>
</configuration>
2 changes: 1 addition & 1 deletion FreeMote.Tools.PsBuild/FreeMote.Tools.PsBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>FreeMote.Tools.PsBuild</RootNamespace>
<AssemblyName>PsBuild</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down
4 changes: 2 additions & 2 deletions FreeMote.Tools.PsBuild/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

[assembly: Guid("d877dbdb-41d7-4c6f-9a46-957cecdaefa8")]

[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
Loading

0 comments on commit 0ba1513

Please sign in to comment.