From 11cf2629d29233c9c6dd53e1802c6db1978a14a9 Mon Sep 17 00:00:00 2001 From: Morrison Cole Date: Tue, 6 Aug 2013 21:07:59 +0100 Subject: [PATCH 1/2] Issue #98 Added the missing data folder to the XNA example project and set the files to copy into the output directory --- spine-xna/example/spine-xna-example.csproj | 342 +++++++++++---------- 1 file changed, 181 insertions(+), 161 deletions(-) diff --git a/spine-xna/example/spine-xna-example.csproj b/spine-xna/example/spine-xna-example.csproj index 2e68d2f91..e4e9e486c 100644 --- a/spine-xna/example/spine-xna-example.csproj +++ b/spine-xna/example/spine-xna-example.csproj @@ -1,163 +1,183 @@ - - - - {29CC4385-294A-4885-A3E8-FD4825E0CFDD} - {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - WinExe - Properties - Spine - spine-xna-example - v4.0 - Client - v4.0 - Windows - HiDef - bf3b738e-f348-48d3-b35b-94bc118edb90 - Game - Game.ico - GameThumbnail.png - false - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - true - full - false - bin\x86\Debug - DEBUG;TRACE;WINDOWS - prompt - 4 - true - false - x86 - True - - - pdbonly - true - bin\x86\Release - TRACE;WINDOWS - prompt - 4 - true - false - x86 - True - - - Spine.ExampleProgram - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - {94144E22-2431-4A8F-AC04-DEC22F7EDD8F} - spine-csharp - - - {7F8F2327-C016-49C8-BB4D-F3F77971961E} - spine-xna - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 4.0 - true - - - - + + + + {29CC4385-294A-4885-A3E8-FD4825E0CFDD} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + x86 + WinExe + Properties + Spine + spine-xna-example + v4.0 + Client + v4.0 + Windows + HiDef + bf3b738e-f348-48d3-b35b-94bc118edb90 + Game + Game.ico + GameThumbnail.png + false + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\x86\Debug + DEBUG;TRACE;WINDOWS + prompt + 4 + true + false + x86 + True + + + pdbonly + true + bin\x86\Release + TRACE;WINDOWS + prompt + 4 + true + false + x86 + True + + + Spine.ExampleProgram + + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + + {94144E22-2431-4A8F-AC04-DEC22F7EDD8F} + spine-csharp + + + {7F8F2327-C016-49C8-BB4D-F3F77971961E} + spine-xna + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + False + Microsoft XNA Framework Redistributable 4.0 + true + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + --> \ No newline at end of file From 2d869518d77d84169f372959eadd5f04a628dccb Mon Sep 17 00:00:00 2001 From: Morrison Cole Date: Tue, 6 Aug 2013 21:44:39 +0100 Subject: [PATCH 2/2] Issue #100 Used the AtlasRegion page RenderObject (rather than the incorrect RegionAttachment RenderObject) as the Texture2D to draw the skeleton with --- spine-xna/src/SkeletonRenderer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-xna/src/SkeletonRenderer.cs b/spine-xna/src/SkeletonRenderer.cs index 64f8b6780..c4578637c 100644 --- a/spine-xna/src/SkeletonRenderer.cs +++ b/spine-xna/src/SkeletonRenderer.cs @@ -77,7 +77,8 @@ namespace Spine { RegionAttachment regionAttachment = slot.Attachment as RegionAttachment; if (regionAttachment != null) { SpriteBatchItem item = batcher.CreateBatchItem(); - item.Texture = (Texture2D)regionAttachment.RendererObject; + AtlasRegion region = (AtlasRegion)regionAttachment.RendererObject; + item.Texture = (Texture2D)region.page.rendererObject; byte r = (byte)(skeleton.R * slot.R * 255); byte g = (byte)(skeleton.G * slot.G * 255);