diff --git a/.gitignore b/.gitignore index 0ecf4d690..dbf43f577 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,10 @@ spine-monogame/xamarinstudio-ios/src/obj spine-monogame/windows8-store/src/bin spine-monogame/windows8-store/src/obj +spine-monogame/windows8-store/example/spine-monogame-example_TemporaryKey.pfx +spine-monogame/windows8-store/example/obj/* +spine-monogame/windows8-store/example/bin/* + spine-xna/bin spine-xna/obj spine-xna/example/bin diff --git a/spine-monogame/windows8-store/example/Assets/Logo.png b/spine-monogame/windows8-store/example/Assets/Logo.png new file mode 100644 index 000000000..e26771cb3 Binary files /dev/null and b/spine-monogame/windows8-store/example/Assets/Logo.png differ diff --git a/spine-monogame/windows8-store/example/Assets/SmallLogo.png b/spine-monogame/windows8-store/example/Assets/SmallLogo.png new file mode 100644 index 000000000..1eb0d9d52 Binary files /dev/null and b/spine-monogame/windows8-store/example/Assets/SmallLogo.png differ diff --git a/spine-monogame/windows8-store/example/Assets/SplashScreen.png b/spine-monogame/windows8-store/example/Assets/SplashScreen.png new file mode 100644 index 000000000..c951e031b Binary files /dev/null and b/spine-monogame/windows8-store/example/Assets/SplashScreen.png differ diff --git a/spine-monogame/windows8-store/example/Assets/StoreLogo.png b/spine-monogame/windows8-store/example/Assets/StoreLogo.png new file mode 100644 index 000000000..dcb672712 Binary files /dev/null and b/spine-monogame/windows8-store/example/Assets/StoreLogo.png differ diff --git a/spine-monogame/windows8-store/example/Package.appxmanifest b/spine-monogame/windows8-store/example/Package.appxmanifest new file mode 100644 index 000000000..ce9413d58 --- /dev/null +++ b/spine-monogame/windows8-store/example/Package.appxmanifest @@ -0,0 +1,27 @@ + + + + + spine-monogame-example + Spine + Assets\StoreLogo.png + + + 6.2.1 + 6.2.1 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spine-monogame/windows8-store/example/Properties/AssemblyInfo.cs b/spine-monogame/windows8-store/example/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..82df9295a --- /dev/null +++ b/spine-monogame/windows8-store/example/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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("spine-monogame-example")] +[assembly: AssemblyProduct("spine-monogame-example")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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)] + +// 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")] diff --git a/spine-monogame/windows8-store/example/spine-monogame-example.csproj b/spine-monogame/windows8-store/example/spine-monogame-example.csproj new file mode 100644 index 000000000..7d50a13bb --- /dev/null +++ b/spine-monogame/windows8-store/example/spine-monogame-example.csproj @@ -0,0 +1,187 @@ + + + + + Debug + AnyCPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F} + AppContainerExe + Properties + Spine + spine-monogame-example + en-US + 512 + {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + spine-monogame-example_TemporaryKey.pfx + + + AnyCPU + true + full + false + bin\Windows8\Debug\ + TRACE;DEBUG;NETFX_CORE;WINDOWS_STOREAPP + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Windows8\Release\ + TRACE;NETFX_CORE;WINDOWS_STOREAPP + prompt + 4 + + + true + bin\Windows8\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + ARM + false + prompt + true + + + bin\Windows8\ARM\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + ARM + false + prompt + true + + + true + bin\Windows8\x64\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x64 + false + prompt + true + + + bin\Windows8\x64\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + x64 + false + prompt + true + + + true + bin\Windows8\x86\Debug\ + DEBUG;TRACE;NETFX_CORE + ;2008 + full + x86 + false + prompt + true + + + bin\Windows8\x86\Release\ + TRACE;NETFX_CORE + true + ;2008 + pdbonly + x86 + false + prompt + true + + + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\MonoGame.Framework.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.XInput.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.Direct2D1.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.Direct3D11.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.DXGI.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.MediaFoundation.dll + + + $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\Windows8\SharpDX.XAudio2.dll + + + + + ExampleGame.cs + + + ExampleProgram.cs + + + + + + Designer + + + Assets\goblins-ffd.atlas + + + Assets\goblins-ffd.json + + + Assets\spineboy.atlas + + + Assets\spineboy.json + + + + + Assets\goblins-ffd.png + + + Assets\spineboy.png + + + + + + + + + + + + {8e5baee2-8ccc-4a32-8bcf-5ff438056c0e} + SpineMonogameWindows8Store + + + + 11.0 + + + + \ No newline at end of file diff --git a/spine-monogame/windows8-store/example/spine-monogame-example.sln b/spine-monogame/windows8-store/example/spine-monogame-example.sln new file mode 100644 index 000000000..62fb47d4f --- /dev/null +++ b/spine-monogame/windows8-store/example/spine-monogame-example.sln @@ -0,0 +1,64 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-monogame-example", "spine-monogame-example.csproj", "{0A121D95-0803-47DC-B839-FF76AE8F7E7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpineMonogameWindows8Store", "..\src\SpineMonogameWindows8Store.csproj", "{8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|ARM.ActiveCfg = Debug|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|ARM.Build.0 = Debug|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|ARM.Deploy.0 = Debug|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x64.ActiveCfg = Debug|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x64.Build.0 = Debug|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x64.Deploy.0 = Debug|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x86.ActiveCfg = Debug|x86 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x86.Build.0 = Debug|x86 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Debug|x86.Deploy.0 = Debug|x86 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|Any CPU.Build.0 = Release|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|Any CPU.Deploy.0 = Release|Any CPU + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|ARM.ActiveCfg = Release|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|ARM.Build.0 = Release|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|ARM.Deploy.0 = Release|ARM + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x64.ActiveCfg = Release|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x64.Build.0 = Release|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x64.Deploy.0 = Release|x64 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x86.ActiveCfg = Release|x86 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x86.Build.0 = Release|x86 + {0A121D95-0803-47DC-B839-FF76AE8F7E7F}.Release|x86.Deploy.0 = Release|x86 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|ARM.ActiveCfg = Debug|ARM + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|ARM.Build.0 = Debug|ARM + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|x64.ActiveCfg = Debug|x64 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|x64.Build.0 = Debug|x64 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|x86.ActiveCfg = Debug|x86 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Debug|x86.Build.0 = Debug|x86 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|Any CPU.Build.0 = Release|Any CPU + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|ARM.ActiveCfg = Release|ARM + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|ARM.Build.0 = Release|ARM + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|x64.ActiveCfg = Release|x64 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|x64.Build.0 = Release|x64 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|x86.ActiveCfg = Release|x86 + {8E5BAEE2-8CCC-4A32-8BCF-5FF438056C0E}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/spine-xna/example/src/ExampleGame.cs b/spine-xna/example/src/ExampleGame.cs index 97140d5cd..9fa8ae3dd 100644 --- a/spine-xna/example/src/ExampleGame.cs +++ b/spine-xna/example/src/ExampleGame.cs @@ -49,6 +49,12 @@ namespace Spine { AnimationState state; SkeletonBounds bounds = new SkeletonBounds(); +#if WINDOWS_STOREAPP + private string assetsFolder = @"Assets\"; +#else + private string assetsFolder = "data/"; +#endif + public Example () { IsMouseVisible = true; @@ -71,10 +77,10 @@ namespace Spine { // String name = "spineboy"; String name = "goblins-ffd"; - Atlas atlas = new Atlas("data/" + name + ".atlas", new XnaTextureLoader(GraphicsDevice)); + Atlas atlas = new Atlas(assetsFolder + name + ".atlas", new XnaTextureLoader(GraphicsDevice)); SkeletonJson json = new SkeletonJson(atlas); if (name == "spineboy") json.Scale = 0.6f; - skeleton = new Skeleton(json.ReadSkeletonData("data/" + name + ".json")); + skeleton = new Skeleton(json.ReadSkeletonData(assetsFolder + name + ".json")); if (name == "goblins-ffd") skeleton.SetSkin("goblin"); // Define mixing between animations. @@ -146,19 +152,27 @@ namespace Spine { } public void Start (AnimationState state, int trackIndex) { +#if !WINDOWS_STOREAPP Console.WriteLine(trackIndex + " " + state.GetCurrent(trackIndex) + ": start"); +#endif } public void End (AnimationState state, int trackIndex) { +#if !WINDOWS_STOREAPP Console.WriteLine(trackIndex + " " + state.GetCurrent(trackIndex) + ": end"); +#endif } public void Complete (AnimationState state, int trackIndex, int loopCount) { +#if !WINDOWS_STOREAPP Console.WriteLine(trackIndex + " " + state.GetCurrent(trackIndex) + ": complete " + loopCount); +#endif } public void Event (AnimationState state, int trackIndex, Event e) { +#if !WINDOWS_STOREAPP Console.WriteLine(trackIndex + " " + state.GetCurrent(trackIndex) + ": event " + e); +#endif } } } diff --git a/spine-xna/example/src/ExampleProgram.cs b/spine-xna/example/src/ExampleProgram.cs index 88f805fc8..4ee5042cf 100644 --- a/spine-xna/example/src/ExampleProgram.cs +++ b/spine-xna/example/src/ExampleProgram.cs @@ -11,5 +11,17 @@ namespace Spine { } } } +#elif WINDOWS_STOREAPP + public static class Program + { + /// + /// The main entry point for the application. + /// + static void Main() + { + var factory = new MonoGame.Framework.GameFrameworkViewSource(); + Windows.ApplicationModel.Core.CoreApplication.Run(factory); + } + } #endif } \ No newline at end of file