Skip to content

Commit ca6cf77

Browse files
committed
ts
1 parent daf9cb7 commit ca6cf77

14 files changed

+100
-35
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,5 @@ example_build/mpg123.dll
269269
example_build/OpenAL32.dll
270270
example_build/SDL2.dll
271271
example_build/spine-csharp.dll
272-
example_build/spine-lovecs.dll
272+
example_build/spine-lovecs.dll
273+
example_build/

example/app.config

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>

example/example.csproj

+12-13
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
<OutputType>Exe</OutputType>
99
<RootNamespace>example</RootNamespace>
1010
<AssemblyName>example</AssemblyName>
11-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<Deterministic>true</Deterministic>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -23,6 +24,7 @@
2324
<DefineConstants>DEBUG;TRACE</DefineConstants>
2425
<ErrorReport>prompt</ErrorReport>
2526
<WarningLevel>4</WarningLevel>
27+
<Prefer32Bit>false</Prefer32Bit>
2628
</PropertyGroup>
2729
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2830
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -32,6 +34,7 @@
3234
<DefineConstants>TRACE</DefineConstants>
3335
<ErrorReport>prompt</ErrorReport>
3436
<WarningLevel>4</WarningLevel>
37+
<Prefer32Bit>false</Prefer32Bit>
3538
</PropertyGroup>
3639
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
3740
<DebugSymbols>true</DebugSymbols>
@@ -41,6 +44,7 @@
4144
<PlatformTarget>x64</PlatformTarget>
4245
<ErrorReport>prompt</ErrorReport>
4346
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
47+
<Prefer32Bit>false</Prefer32Bit>
4448
</PropertyGroup>
4549
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
4650
<OutputPath>..\example_build\</OutputPath>
@@ -50,16 +54,13 @@
5054
<PlatformTarget>x64</PlatformTarget>
5155
<ErrorReport>prompt</ErrorReport>
5256
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
57+
<Prefer32Bit>false</Prefer32Bit>
5358
</PropertyGroup>
5459
<ItemGroup>
5560
<Compile Include="Program.cs" />
5661
</ItemGroup>
5762
<ItemGroup>
58-
<Reference Include="Love2dCS, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
59-
<HintPath>..\packages\Love2dCS.11.0.36\lib\net40\Love2dCS.dll</HintPath>
60-
</Reference>
61-
</ItemGroup>
62-
<ItemGroup>
63+
<None Include="app.config" />
6364
<None Include="packages.config" />
6465
</ItemGroup>
6566
<ItemGroup>
@@ -72,12 +73,10 @@
7273
<Name>spine-csharp</Name>
7374
</ProjectReference>
7475
</ItemGroup>
76+
<ItemGroup>
77+
<Reference Include="LoveSharp, Version=11.0.50.0, Culture=neutral, PublicKeyToken=e8ca05bb0fee55bf, processorArchitecture=MSIL">
78+
<HintPath>..\packages\LoveSharp.11.0.51\lib\netstandard1.2\LoveSharp.dll</HintPath>
79+
</Reference>
80+
</ItemGroup>
7581
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
76-
<Import Project="..\packages\Love2dCS.11.0.36\build\net40\Love2dCS.targets" Condition="Exists('..\packages\Love2dCS.11.0.36\build\net40\Love2dCS.targets')" />
77-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
78-
<PropertyGroup>
79-
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
80-
</PropertyGroup>
81-
<Error Condition="!Exists('..\packages\Love2dCS.11.0.36\build\net40\Love2dCS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Love2dCS.11.0.36\build\net40\Love2dCS.targets'))" />
82-
</Target>
8382
</Project>

example/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Love2dCS" version="11.0.36" targetFramework="net40" />
3+
<package id="LoveSharp" version="11.0.51" targetFramework="net461" />
44
</packages>

logo-x.png

9.99 KB
Loading
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
4+
<metadata>
5+
<!-- Required elements-->
6+
<id>LoveSharp.Spine</id>
7+
<version>1.0.1</version>
8+
<description>imgui for LoveSharp LÖVE </description>
9+
<authors>endlesstravel</authors>
10+
11+
<!-- Optional elements -->
12+
<title>LoveSharp.Spine</title>
13+
<projectUrl>https://github.com/endlesstravel/spine-lovecs</projectUrl>
14+
<iconUrl>https://gitee.com/endlesstravel/spine-lovecs/raw/master/logo-x.png</iconUrl>
15+
16+
<releaseNotes>
17+
1.0.1 release
18+
</releaseNotes>
19+
<tags>LÖVE game-engine gui LoveSharp</tags>
20+
21+
22+
23+
<dependencies>
24+
<dependency id="LoveSharp" version="11.0.51" />
25+
</dependencies>
26+
27+
</metadata>
28+
29+
30+
<!-- Optional 'files' node -->
31+
<files>
32+
33+
<file src="..\example_build\spine-csharp.dll" target="lib\net461" />
34+
<file src="..\example_build\spine-csharp.xml" target="lib\net461" /> <!-- 注释文档 -->
35+
<file src="..\example_build\spine-lovecs.dll" target="lib\net461" />
36+
<file src="..\example_build\spine-lovecs.xml" target="lib\net461" /> <!-- 注释文档 -->
37+
38+
39+
<file src="..\example_build\spine-csharp.dll" target="lib\netstandard1.0" /> <!-- dotcore 1.0 / net45 / Mono 4.6 / Unity 2018.1 -->
40+
<file src="..\example_build\spine-csharp.xml" target="lib\netstandard1.0" /> <!-- 注释文档 -->
41+
<file src="..\example_build\spine-lovecs.dll" target="lib\netstandard1.0" /> <!-- dotcore 1.0 / net45 / Mono 4.6 / Unity 2018.1 -->
42+
<file src="..\example_build\spine-lovecs.xml" target="lib\netstandard1.0" /> <!-- 注释文档 -->
43+
44+
</files>
45+
46+
</package>

nuget_published/build

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 打包
2+
nuget pack LoveSharp.Imgui.nuspec

nuget_published/cpfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 复制文件
2+
rm workspace/lib/*
3+
cp /d/GameWorkSpace/DeploySquare/ViewSharp/FlexLayoutSharp/FlexLayoutSharp/bin/Release/FlexLayoutSharp.dll workspace/lib/
4+
cp /d/GameWorkSpace/DeploySquare/ViewSharp/FlexLayoutSharp/FlexLayoutSharp/bin/Release/FlexLayoutSharp.xml workspace/lib/

nuget_published/distribute

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# nuget 发布
2+
nuget push LoveSharp.Imgui.1.0.1.nupkg -ApiKey oy2ga7o4zn3uf6mx6bqahzxiz56mnxou5o25p67eb227dy -Source https://www.nuget.org

spine-lovecs/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Love2dCS" version="11.0.40" targetFramework="net461" />
3+
<package id="LoveSharp" version="11.0.51" targetFramework="net461" />
44
</packages>

spine-lovecs/spine-lovecs-key.snk

596 Bytes
Binary file not shown.

spine-lovecs/spine-lovecs.csproj

+12-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
4343
<DebugSymbols>true</DebugSymbols>
44-
<OutputPath>bin\x64\Debug\</OutputPath>
44+
<OutputPath>..\example_build\</OutputPath>
4545
<DefineConstants>DEBUG;TRACE</DefineConstants>
4646
<DebugType>full</DebugType>
4747
<PlatformTarget>x64</PlatformTarget>
@@ -51,14 +51,21 @@
5151
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
5252
</PropertyGroup>
5353
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
54-
<OutputPath>bin\x64\Release\</OutputPath>
54+
<OutputPath>..\example_build\</OutputPath>
5555
<DefineConstants>TRACE</DefineConstants>
5656
<Optimize>true</Optimize>
5757
<DebugType>pdbonly</DebugType>
5858
<PlatformTarget>x64</PlatformTarget>
5959
<ErrorReport>prompt</ErrorReport>
6060
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
6161
<Prefer32Bit>false</Prefer32Bit>
62+
<DocumentationFile>..\example_build\spine-lovecs.xml</DocumentationFile>
63+
</PropertyGroup>
64+
<PropertyGroup>
65+
<SignAssembly>true</SignAssembly>
66+
</PropertyGroup>
67+
<PropertyGroup>
68+
<AssemblyOriginatorKeyFile>spine-lovecs-key.snk</AssemblyOriginatorKeyFile>
6269
</PropertyGroup>
6370
<ItemGroup>
6471
<ProjectReference Include="..\spine-runtimes\spine-csharp\spine-csharp.csproj">
@@ -87,12 +94,13 @@
8794
</Compile>
8895
</ItemGroup>
8996
<ItemGroup>
90-
<Reference Include="Love2dCS, Version=11.0.40.0, Culture=neutral, processorArchitecture=MSIL">
91-
<HintPath>..\..\..\GameWorkSpace\PoarOfEngine\PoarOfEngine\packages\Love2dCS.11.0.40\lib\netstandard1.0\Love2dCS.dll</HintPath>
97+
<Reference Include="LoveSharp, Version=11.0.50.0, Culture=neutral, PublicKeyToken=e8ca05bb0fee55bf, processorArchitecture=MSIL">
98+
<HintPath>..\packages\LoveSharp.11.0.51\lib\netstandard1.2\LoveSharp.dll</HintPath>
9299
</Reference>
93100
</ItemGroup>
94101
<ItemGroup>
95102
<None Include="packages.config" />
103+
<None Include="spine-lovecs-key.snk" />
96104
</ItemGroup>
97105
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
98106
</Project>

src/LoveTextureLoader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static public Image LoadTexture(String path)
3030
{
3131
try
3232
{
33-
return Resource.NewImage(path);
33+
return Graphics.NewImage(path);
3434
}
3535
catch (Exception ex)
3636
{

src/PolygonBatcher.cs

+14-14
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords)
8484

8585
public PolygonBatcher(int vertexCount)
8686
{
87-
mesh = Graphics.NewMesh(VertexPositionColorTextureColor.VertexInfo.formatList, vertexCount, MeshDrawMode.Trangles, SpriteBatchUsage.Dynamic);
87+
mesh = Graphics.NewMesh(VertexPositionColorTextureColor.VertexFormatDescribute, vertexCount, MeshDrawMode.Trangles, SpriteBatchUsage.Dynamic);
8888
//mesh = Graphics.NewMesh(Love.Misc.MeshUtils.GetVertexFormat(), vertexCount, MeshDrawMode.Trangles, SpriteBatchUsage.Dynamic);
8989
maxVerticesLength = vertexCount;
9090
maxIndicesLength = vertexCount * 3;
@@ -264,21 +264,21 @@ public void Stop()
264264
[StructLayout(LayoutKind.Explicit)]
265265
public struct VertexPositionColorTextureColor
266266
{
267-
[FieldOffset(0), Name("VertexPosition")] public float X;
268-
[FieldOffset(4), Name("VertexPosition")] public float Y;
267+
[FieldOffset(0), MeshAttributeName("VertexPosition")] public float X;
268+
[FieldOffset(4), MeshAttributeName("VertexPosition")] public float Y;
269269

270-
[FieldOffset(8), Name("VertexTexCoord")] public float U;
271-
[FieldOffset(12), Name("VertexTexCoord")] public float V;
270+
[FieldOffset(8), MeshAttributeName("VertexTexCoord")] public float U;
271+
[FieldOffset(12), MeshAttributeName("VertexTexCoord")] public float V;
272272

273-
[FieldOffset(16), Name("VertexColor")] public byte R;
274-
[FieldOffset(17), Name("VertexColor")] public byte G;
275-
[FieldOffset(18), Name("VertexColor")] public byte B;
276-
[FieldOffset(19), Name("VertexColor")] public byte A;
273+
[FieldOffset(16), MeshAttributeName("VertexColor")] public byte R;
274+
[FieldOffset(17), MeshAttributeName("VertexColor")] public byte G;
275+
[FieldOffset(18), MeshAttributeName("VertexColor")] public byte B;
276+
[FieldOffset(19), MeshAttributeName("VertexColor")] public byte A;
277277

278-
[FieldOffset(20), Name("VertexColor2")] public byte R2;
279-
[FieldOffset(21), Name("VertexColor2")] public byte G2;
280-
[FieldOffset(22), Name("VertexColor2")] public byte B2;
281-
[FieldOffset(23), Name("VertexColor2")] public byte A2;
278+
[FieldOffset(20), MeshAttributeName("VertexColor2")] public byte R2;
279+
[FieldOffset(21), MeshAttributeName("VertexColor2")] public byte G2;
280+
[FieldOffset(22), MeshAttributeName("VertexColor2")] public byte B2;
281+
[FieldOffset(23), MeshAttributeName("VertexColor2")] public byte A2;
282282

283283

284284
[FieldOffset(0)] byte b_x1;
@@ -298,7 +298,7 @@ public struct VertexPositionColorTextureColor
298298
[FieldOffset(14)] byte b_v3;
299299
[FieldOffset(15)] byte b_v4;
300300

301-
public readonly static Info<VertexPositionColorTextureColor> VertexInfo = Parse<VertexPositionColorTextureColor>();
301+
public readonly static MeshFormatDescribe<VertexPositionColorTextureColor> VertexFormatDescribute = MeshFormatDescribe.New<VertexPositionColorTextureColor>();
302302

303303

304304
//public static byte[] TransformToBytesByCopy(ref VertexPositionColorTextureColor vpcc)

0 commit comments

Comments
 (0)