Merge branch '4.1-beta' into 4.1-beta-physics
14
.gitignore
vendored
@ -60,13 +60,6 @@ spine-monogame/example/obj
|
||||
spine-monogame/example/Content/bin/
|
||||
spine-monogame/example/Content/obj/
|
||||
|
||||
spine-xna/bin
|
||||
spine-xna/obj
|
||||
spine-xna/example/bin
|
||||
spine-xna/example/obj
|
||||
spine-xna/example-content/obj/
|
||||
spine-xna/.vs/
|
||||
|
||||
spine-unity/Assets/spine-csharp*
|
||||
!spine-unity/Assets/spine-csharp/Place spine-csharp src here.*
|
||||
!spine-unity/Assets/spine-csharp/add spine-csharp src here.*
|
||||
@ -155,3 +148,10 @@ spine-ts/spine-threejs/dist
|
||||
spine-libgdx/gradle
|
||||
spine-libgdx/gradlew
|
||||
spine-libgdx/gradlew.bat
|
||||
spine-monogame/packages
|
||||
spine-monogame/spine-monogame/bin
|
||||
spine-monogame/spine-monogame/obj
|
||||
spine-monogame/spine-monogame-example/Content/bin
|
||||
spine-monogame/spine-monogame-example/Content/obj
|
||||
spine-monogame/spine-monogame-example/bin
|
||||
spine-monogame/spine-monogame-example/obj
|
||||
|
||||
@ -60,6 +60,8 @@
|
||||
* **Restructuring (Non-Breaking)**
|
||||
|
||||
### XNA/MonoGame
|
||||
* **Breaking change**: Removed spine-xna in favor of spine-monogame. See https://github.com/EsotericSoftware/spine-runtimes/issues/1949
|
||||
* Added new spine-monogame solution. See [spine-monogame/README.md](spine-monogame/README.md) for updated instructions on how to use spine-monogame.
|
||||
|
||||
## Java
|
||||
* **Breaking change**: `AttachmentLoader#newRegionAttachment()` and `AttachmentLoader#newMeshAttachment()` take an additional `Sequence` parameter.
|
||||
|
||||
@ -264,31 +264,31 @@ cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-player/example/
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-player/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-player/example/assets/"
|
||||
|
||||
echo "spine-xna"
|
||||
rm "$ROOT/spine-xna/example/data/"*
|
||||
cp -f ../coin/export/coin-pro.json "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../coin/export/coin.atlas "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../coin/export/coin.png "$ROOT/spine-xna/example/data/"
|
||||
echo "spine-monogame"
|
||||
rm "$ROOT/spine-monogame/spine-monogame-example/data/"*
|
||||
cp -f ../coin/export/coin-pro.json "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../coin/export/coin.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../coin/export/coin.png "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
# Note: normalmap need to be created manually. Thus we use a separately prepared atlas and
|
||||
# diffuse map so that the maps always match. These atlas textures are copied to the target dir.
|
||||
cp -f ../raptor/manual-maps/raptor.atlas "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../raptor/manual-maps/raptor.png "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../raptor/manual-maps/raptor-normals.png "$ROOT/spine-xna/example/data/raptor_normals.png"
|
||||
cp -f ../raptor/manual-maps/raptor.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../raptor/manual-maps/raptor.png "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../raptor/manual-maps/raptor-normals.png "$ROOT/spine-monogame/spine-monogame-example/data/raptor_normals.png"
|
||||
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
|
||||
cp -f ../tank/export/tank-pro.json "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../tank/export/tank.atlas "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../tank/export/tank.png "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../tank/export/tank-pro.json "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../tank/export/tank.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../tank/export/tank.png "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
|
||||
cp -f ../mix-and-match/export/mix-and-match-pro.json "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-xna/example/data/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pro.json "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-monogame/spine-monogame-example/data/"
|
||||
|
||||
echo "spine-ue4"
|
||||
rm "$ROOT/spine-ue4/Content/GettingStarted/Assets/Raptor/raptor.json"
|
||||
|
||||
@ -8,8 +8,7 @@ setup() {
|
||||
cp $dir/.clang-format $dir/..
|
||||
cp $dir/build.gradle $dir/..
|
||||
cp $dir/settings.gradle $dir/..
|
||||
cp $dir/.editorconfig $dir/../spine-csharp
|
||||
cp $dir/.editorconfig $dir/../spine-xna
|
||||
cp $dir/.editorconfig $dir/../spine-csharp
|
||||
cp $dir/.editorconfig $dir/../spine-monogame
|
||||
cp $dir/.editorconfig $dir/../spine-unity
|
||||
}
|
||||
@ -18,8 +17,7 @@ cleanup() {
|
||||
rm $dir/../.clang-format
|
||||
rm $dir/../build.gradle
|
||||
rm $dir/../settings.gradle
|
||||
rm $dir/../spine-csharp/.editorconfig
|
||||
rm $dir/../spine-xna/.editorconfig
|
||||
rm $dir/../spine-csharp/.editorconfig
|
||||
rm $dir/../spine-monogame/.editorconfig
|
||||
rm $dir/../spine-unity/.editorconfig
|
||||
}
|
||||
@ -31,7 +29,6 @@ setup
|
||||
pushd $dir/..
|
||||
./formatters/gradlew spotlessApply
|
||||
dotnet-format spine-csharp/spine-csharp.sln
|
||||
dotnet-format -f spine-xna
|
||||
dotnet-format -f spine-monogame
|
||||
dotnet-format -f spine-unity
|
||||
popd
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) {
|
||||
spTextureRegionArray *regions = sequence->regions;
|
||||
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1);
|
||||
int i ;
|
||||
int i;
|
||||
for (i = 0; i < regions->size; i++) {
|
||||
spSequence_getPath(basePath, i, path);
|
||||
regions->items[i] = SUPER(spAtlas_findRegion(atlas, path));
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include <spine/Sequence.h>
|
||||
#include <spine/extension.h>
|
||||
|
||||
_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion*)
|
||||
_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion *)
|
||||
|
||||
static int nextSequenceId = 0;
|
||||
|
||||
@ -69,7 +69,7 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
||||
region = self->regions->items[index];
|
||||
|
||||
if (attachment->type == SP_ATTACHMENT_REGION) {
|
||||
spRegionAttachment *regionAttachment = (spRegionAttachment*)attachment;
|
||||
spRegionAttachment *regionAttachment = (spRegionAttachment *) attachment;
|
||||
if (regionAttachment->region != region) {
|
||||
regionAttachment->rendererObject = region;
|
||||
regionAttachment->region = region;
|
||||
@ -78,7 +78,7 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
||||
}
|
||||
|
||||
if (attachment->type == SP_ATTACHMENT_MESH) {
|
||||
spMeshAttachment *meshAttachment = (spMeshAttachment*)attachment;
|
||||
spMeshAttachment *meshAttachment = (spMeshAttachment *) attachment;
|
||||
if (meshAttachment->region != region) {
|
||||
meshAttachment->rendererObject = region;
|
||||
meshAttachment->region = region;
|
||||
@ -87,6 +87,6 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
||||
}
|
||||
}
|
||||
|
||||
void spSequence_getPath(const char* basePath, int index, char* path) {
|
||||
void spSequence_getPath(const char *basePath, int index, char *path) {
|
||||
fix me
|
||||
}
|
||||
|
||||
@ -161,8 +161,7 @@ static void _addToUpdateCache(_spSkeleton *const internal, _spUpdateType type, v
|
||||
_spUpdate *update;
|
||||
if (internal->updateCacheCount == internal->updateCacheCapacity) {
|
||||
internal->updateCacheCapacity *= 2;
|
||||
internal->updateCache = (_spUpdate *) realloc(internal->updateCache,
|
||||
sizeof(_spUpdate) * internal->updateCacheCapacity);
|
||||
internal->updateCache = (_spUpdate *) REALLOC(internal->updateCache, _spUpdate, internal->updateCacheCapacity);
|
||||
}
|
||||
update = internal->updateCache + internal->updateCacheCount;
|
||||
update->type = type;
|
||||
|
||||
@ -656,7 +656,7 @@ namespace spine {
|
||||
|
||||
RegionAttachment *attachment = (RegionAttachment *) slot->getAttachment();
|
||||
float worldVertices[8];
|
||||
attachment->computeWorldVertices(*slot, worldVertices, 0, 2);
|
||||
attachment->computeWorldVertices(*slot, worldVertices, 0, 2);
|
||||
const Vec2 points[4] =
|
||||
{
|
||||
{worldVertices[0], worldVertices[1]},
|
||||
@ -911,13 +911,17 @@ namespace spine {
|
||||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment ||
|
||||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
||||
!slot.getBone().isActive() ||
|
||||
slot.getColor().a == 0)
|
||||
!slot.getBone().isActive())
|
||||
return true;
|
||||
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
||||
const auto &attachmentRTTI = attachment->getRTTI();
|
||||
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||
return false;
|
||||
if (slot.getColor().a == 0)
|
||||
return true;
|
||||
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||
if (static_cast<RegionAttachment *>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
||||
} else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||
if (static_cast<MeshAttachment *>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -268,7 +268,8 @@ namespace Spine {
|
||||
} else {
|
||||
int[] timelineMode = current.timelineMode.Items;
|
||||
|
||||
bool firstFrame = current.timelinesRotation.Count != timelineCount << 1;
|
||||
bool shortestRotation = current.shortestRotation;
|
||||
bool firstFrame = !shortestRotation && current.timelinesRotation.Count != timelineCount << 1;
|
||||
if (firstFrame) current.timelinesRotation.Resize(timelineCount << 1);
|
||||
float[] timelinesRotation = current.timelinesRotation.Items;
|
||||
|
||||
@ -276,7 +277,7 @@ namespace Spine {
|
||||
Timeline timeline = timelines[ii];
|
||||
MixBlend timelineBlend = timelineMode[ii] == AnimationState.Subsequent ? blend : MixBlend.Setup;
|
||||
var rotateTimeline = timeline as RotateTimeline;
|
||||
if (rotateTimeline != null)
|
||||
if (!shortestRotation && rotateTimeline != null)
|
||||
ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, mix, timelineBlend, timelinesRotation,
|
||||
ii << 1, firstFrame);
|
||||
else if (timeline is AttachmentTimeline)
|
||||
@ -383,7 +384,8 @@ namespace Spine {
|
||||
int[] timelineMode = from.timelineMode.Items;
|
||||
TrackEntry[] timelineHoldMix = from.timelineHoldMix.Items;
|
||||
|
||||
bool firstFrame = from.timelinesRotation.Count != timelineCount << 1;
|
||||
bool shortestRotation = from.shortestRotation;
|
||||
bool firstFrame = !shortestRotation && from.timelinesRotation.Count != timelineCount << 1;
|
||||
if (firstFrame) from.timelinesRotation.Resize(timelineCount << 1);
|
||||
float[] timelinesRotation = from.timelinesRotation.Items;
|
||||
|
||||
@ -419,7 +421,7 @@ namespace Spine {
|
||||
}
|
||||
from.totalAlpha += alpha;
|
||||
var rotateTimeline = timeline as RotateTimeline;
|
||||
if (rotateTimeline != null) {
|
||||
if (!shortestRotation && rotateTimeline != null) {
|
||||
ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1,
|
||||
firstFrame);
|
||||
} else if (timeline is AttachmentTimeline) {
|
||||
@ -990,7 +992,7 @@ namespace Spine {
|
||||
|
||||
internal int trackIndex;
|
||||
|
||||
internal bool loop, holdPrevious, reverse;
|
||||
internal bool loop, holdPrevious, reverse, shortestRotation;
|
||||
internal float eventThreshold, attachmentThreshold, drawOrderThreshold;
|
||||
internal float animationStart, animationEnd, animationLast, nextAnimationLast;
|
||||
internal float delay, trackTime, trackLast, nextTrackLast, trackEnd, timeScale = 1f;
|
||||
@ -1257,6 +1259,14 @@ namespace Spine {
|
||||
/// If true, the animation will be applied in reverse. Events are not fired when an animation is applied in reverse.</summary>
|
||||
public bool Reverse { get { return reverse; } set { reverse = value; } }
|
||||
|
||||
/// <summary><para>
|
||||
/// If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, the
|
||||
/// shortest rotation direction may change during the mix.
|
||||
/// </para><para>
|
||||
/// If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the rest
|
||||
/// of the mix. Defaults to false.</para></summary>
|
||||
public bool ShortestRotation { get { return shortestRotation; } set { shortestRotation = value; } }
|
||||
|
||||
/// <summary>Returns true if this entry is for the empty animation. See <see cref="AnimationState.SetEmptyAnimation(int, float)"/>,
|
||||
/// <see cref="AnimationState.AddEmptyAnimation(int, float, float)"/>, and <see cref="AnimationState.SetEmptyAnimations(float)"/>.
|
||||
public bool IsEmptyAnimation { get { return animation == AnimationState.EmptyAnimation; } }
|
||||
|
||||
1
spine-monogame/.mgstats
Normal file
@ -0,0 +1 @@
|
||||
Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds
|
||||
@ -21,11 +21,14 @@ spine-monogame supports all Spine features.
|
||||
## Setup
|
||||
|
||||
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
|
||||
1. Copy the contents of the `spine-csharp/src` and `spine-xna/src` directories into your project.
|
||||
1. Let your MonoGame project reference the project `spine-monogame/spine-monogame/spine-monogame.csproj`.
|
||||
1. Optionally add `spine-monogame/spine-monogame-example/Content/shaders/SpineEffect.fx` to your content pipeline build if you require two color tinting support. See the `spine-monogame-example/ExampleGame.cs` on how to use it.
|
||||
|
||||
Note: `spine-monogame` references source files from `spine-csharp/src`.
|
||||
|
||||
## Example
|
||||
|
||||
1. Follow the [MonoGame Getting Started Guide](https://docs.monogame.net/articles/getting_started/0_getting_started.html) on how to setup your development environment for MonoGame. Make sure to also install the optional dependencies allowing compilation of shaders.
|
||||
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip via the download button above.
|
||||
1. Open the `spine-monogame-example.sln` Solution in either Visual Studio 2015 or Xamarin Studio
|
||||
1. Right click the `spine-monogame-example` project in the solution explorer and select `Properties`
|
||||
1. Select `Debug` and set the working directory to point to `spine-runtimes/spine-xna/example`
|
||||
1. Open the `spine-monogame.sln` Solution in the IDE you choose based on the `Monogame Getting Started Guide`.
|
||||
1. Set the `spine-monogame-example` project as the startup project, and ensure the working directory is set to `spine-runtimes/spine-monogame/spine-monogame-example` when running or debugging the project.
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-monogame-example", "example\spine-monogame-example.csproj", "{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-csharp", "..\spine-csharp\spine-csharp.csproj", "{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,65 +0,0 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated September 24, 2021. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2021, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
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 © 2017")]
|
||||
[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)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f47bbbe2-ac55-4263-b224-1c8fcef4714b")]
|
||||
|
||||
// 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")]
|
||||
@ -1,146 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0A7474EC-4DF9-40E7-B920-D1D1601F20A7}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>spine_monogame_example</RootNamespace>
|
||||
<AssemblyName>spine-monogame-example</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MonoGamePlatform>DesktopGL</MonoGamePlatform>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;LINUX</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<DefineConstants>TRACE;LINUX</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\spine-xna\src\ShapeRenderer.cs">
|
||||
<Link>spine-xna\ShapeRenderer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\SkeletonDebugRenderer.cs">
|
||||
<Link>spine-xna\SkeletonDebugRenderer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\VertexEffect.cs">
|
||||
<Link>spine-xna\VertexEffect.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\MeshBatcher.cs">
|
||||
<Link>spine-xna\MeshBatcher.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\SkeletonRenderer.cs">
|
||||
<Link>spine-xna\SkeletonRenderer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\Util.cs">
|
||||
<Link>spine-xna\Util.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-xna\src\XnaTextureLoader.cs">
|
||||
<Link>spine-xna\XnaTextureLoader.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ExampleGame.cs" />
|
||||
<Compile Include="ExampleProgram.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
<EmbeddedResource Include="Icon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MonoGameContentReference Include="Content\Content.mgcb">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</MonoGameContentReference>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x86\SDL2.dll">
|
||||
<Link>x86\SDL2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x64\SDL2.dll">
|
||||
<Link>x64\SDL2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x86\soft_oal.dll">
|
||||
<Link>x86\soft_oal.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x64\soft_oal.dll">
|
||||
<Link>x64\soft_oal.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x86\libSDL2-2.0.so.0">
|
||||
<Link>x86\libSDL2-2.0.so.0</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x64\libSDL2-2.0.so.0">
|
||||
<Link>x64\libSDL2-2.0.so.0</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x86\libopenal.so.1">
|
||||
<Link>x86\libopenal.so.1</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\x64\libopenal.so.1">
|
||||
<Link>x64\libopenal.so.1</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll.config">
|
||||
<Link>MonoGame.Framework.dll.config</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="app.manifest" />
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\libopenal.1.dylib">
|
||||
<Link>x64\libopenal.1.dylib</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\libSDL2-2.0.0.dylib">
|
||||
<Link>x64\libSDL2-2.0.0.dylib</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\spine-csharp\spine-csharp.csproj">
|
||||
<Project>{94144e22-2431-4a8f-ac04-dec22f7edd8f}</Project>
|
||||
<Name>spine-csharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
33
spine-monogame/spine-monogame-example/Content/Content.mgcb
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
#----------------------------- Global Properties ----------------------------#
|
||||
|
||||
/outputDir:bin/$(Platform)
|
||||
/intermediateDir:obj/$(Platform)
|
||||
/platform:DesktopGL
|
||||
/config:
|
||||
/profile:Reach
|
||||
/compress:False
|
||||
|
||||
#-------------------------------- References --------------------------------#
|
||||
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
#begin SpineEffect.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:shaders\\SpineEffect.fx
|
||||
|
||||
#begin SpineEffectNormalMap.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:shaders\\SpineEffectNormalMap.fx
|
||||
|
||||
#begin SpineEffectOutline.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:shaders\\SpineEffectOutline.fx
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
#if OPENGL
|
||||
#define SV_POSITION POSITION
|
||||
#define VS_SHADERMODEL vs_3_0
|
||||
#define PS_SHADERMODEL ps_3_0
|
||||
#else
|
||||
#define VS_SHADERMODEL vs_4_0_level_9_1
|
||||
#define PS_SHADERMODEL ps_4_0_level_9_1
|
||||
#endif
|
||||
|
||||
float4x4 World;
|
||||
float4x4 View;
|
||||
float4x4 Projection;
|
||||
@ -1,3 +1,13 @@
|
||||
#if OPENGL
|
||||
#define SV_POSITION POSITION
|
||||
#define VS_SHADERMODEL vs_3_0
|
||||
#define PS_SHADERMODEL ps_3_0
|
||||
#else
|
||||
#define VS_SHADERMODEL vs_4_0_level_9_1
|
||||
#define PS_SHADERMODEL ps_4_0_level_9_1
|
||||
#endif
|
||||
|
||||
|
||||
float4x4 World;
|
||||
float4x4 View;
|
||||
float4x4 Projection;
|
||||
@ -119,7 +119,7 @@ namespace Spine {
|
||||
public TankScreen (Example game) : base(game) {
|
||||
// Instantiate and configure the two color tinting effect and
|
||||
// assign it to the skeleton renderer
|
||||
var twoColorTintEffect = game.Content.Load<Effect>("Content\\SpineEffect");
|
||||
var twoColorTintEffect = game.Content.Load<Effect>("Content\\shaders\\SpineEffect");
|
||||
twoColorTintEffect.Parameters["World"].SetValue(Matrix.Identity);
|
||||
twoColorTintEffect.Parameters["View"].SetValue(Matrix.CreateLookAt(new Vector3(0.0f, 0.0f, 1.0f), Vector3.Zero, Vector3.Up));
|
||||
skeletonRenderer.Effect = twoColorTintEffect;
|
||||
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
@ -36,6 +36,7 @@
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 340 KiB |
|
Before Width: | Height: | Size: 412 KiB After Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 518 KiB After Width: | Height: | Size: 518 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 418 KiB |
@ -0,0 +1,58 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<TieredCompilation>false</TieredCompilation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Icon.ico" />
|
||||
<None Remove="Icon.bmp" />
|
||||
<None Remove="Content\skeletons\coin-pro.json" />
|
||||
<None Remove="Content\skeletons\coin-pro.skel" />
|
||||
<None Remove="Content\skeletons\coin.atlas" />
|
||||
<None Remove="Content\skeletons\coin.png" />
|
||||
<None Remove="Content\skeletons\mix-and-match-pro.json" />
|
||||
<None Remove="Content\skeletons\mix-and-match.atlas" />
|
||||
<None Remove="Content\skeletons\mix-and-match.png" />
|
||||
<None Remove="Content\skeletons\raptor_normals.png" />
|
||||
<None Remove="Content\skeletons\raptor-pro.json" />
|
||||
<None Remove="Content\skeletons\raptor.atlas" />
|
||||
<None Remove="Content\skeletons\raptor.png" />
|
||||
<None Remove="Content\skeletons\spineboy-pro.skel" />
|
||||
<None Remove="Content\skeletons\spineboy.atlas" />
|
||||
<None Remove="Content\skeletons\spineboy.png" />
|
||||
<None Remove="Content\skeletons\tank-pro.json" />
|
||||
<None Remove="Content\skeletons\tank.atlas" />
|
||||
<None Remove="Content\skeletons\tank.png" />
|
||||
<None Remove="Content\shaders\SpineEffect.fx" />
|
||||
<None Remove="Content\shaders\SpineEffectOutline.fx" />
|
||||
<None Remove="Content\shaders\SpineEffectNormalmap.fx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
<EmbeddedResource Include="Icon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MonoGameContentReference Include="Content\Content.mgcb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
|
||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\spine-monogame\spine-monogame.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\shaders\SpineEffect.fx" />
|
||||
<Content Include="Content\shaders\SpineEffectOutline.fx" />
|
||||
<Content Include="Content\shaders\SpineEffectNormalmap.fx" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
31
spine-monogame/spine-monogame.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.810.17
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-monogame-example", "spine-monogame-example\spine-monogame-example.csproj", "{B6A0B6D0-1186-46A6-89C5-4CD15CA6C18D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-monogame", "spine-monogame\spine-monogame.csproj", "{82271611-1E77-4E5F-B78A-18F8CDBFDF84}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B6A0B6D0-1186-46A6-89C5-4CD15CA6C18D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A0B6D0-1186-46A6-89C5-4CD15CA6C18D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A0B6D0-1186-46A6-89C5-4CD15CA6C18D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B6A0B6D0-1186-46A6-89C5-4CD15CA6C18D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{82271611-1E77-4E5F-B78A-18F8CDBFDF84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{82271611-1E77-4E5F-B78A-18F8CDBFDF84}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{82271611-1E77-4E5F-B78A-18F8CDBFDF84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{82271611-1E77-4E5F-B78A-18F8CDBFDF84}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1D10CEBB-7A36-4BCD-A598-BF9A61769961}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -13,9 +13,3 @@
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
#begin SpineEffect.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:SpineEffect.fx
|
||||
|
||||
318
spine-monogame/spine-monogame/spine-monogame.csproj
Normal file
@ -0,0 +1,318 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="spine-csharp\" />
|
||||
<None Remove="spine-csharp\Attachments\" />
|
||||
<None Remove="src\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="spine-csharp\" />
|
||||
<Folder Include="spine-csharp\Attachments\" />
|
||||
<Folder Include="src\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\spine-csharp\src\Animation.cs">
|
||||
<Link>spine-csharp\Animation.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\AnimationState.cs">
|
||||
<Link>spine-csharp\AnimationState.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\AnimationStateData.cs">
|
||||
<Link>spine-csharp\AnimationStateData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Atlas.cs">
|
||||
<Link>spine-csharp\Atlas.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\BlendMode.cs">
|
||||
<Link>spine-csharp\BlendMode.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Bone.cs">
|
||||
<Link>spine-csharp\Bone.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\BoneData.cs">
|
||||
<Link>spine-csharp\BoneData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\ConstraintData.cs">
|
||||
<Link>spine-csharp\ConstraintData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Event.cs">
|
||||
<Link>spine-csharp\Event.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\EventData.cs">
|
||||
<Link>spine-csharp\EventData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\ExposedList.cs">
|
||||
<Link>spine-csharp\ExposedList.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\IkConstraint.cs">
|
||||
<Link>spine-csharp\IkConstraint.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\IkConstraintData.cs">
|
||||
<Link>spine-csharp\IkConstraintData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\IUpdatable.cs">
|
||||
<Link>spine-csharp\IUpdatable.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Json.cs">
|
||||
<Link>spine-csharp\Json.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\MathUtils.cs">
|
||||
<Link>spine-csharp\MathUtils.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\PathConstraint.cs">
|
||||
<Link>spine-csharp\PathConstraint.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\PathConstraintData.cs">
|
||||
<Link>spine-csharp\PathConstraintData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Skeleton.cs">
|
||||
<Link>spine-csharp\Skeleton.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonBinary.cs">
|
||||
<Link>spine-csharp\SkeletonBinary.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonBounds.cs">
|
||||
<Link>spine-csharp\SkeletonBounds.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonClipping.cs">
|
||||
<Link>spine-csharp\SkeletonClipping.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonData.cs">
|
||||
<Link>spine-csharp\SkeletonData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonJson.cs">
|
||||
<Link>spine-csharp\SkeletonJson.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SkeletonLoader.cs">
|
||||
<Link>spine-csharp\SkeletonLoader.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Skin.cs">
|
||||
<Link>spine-csharp\Skin.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Slot.cs">
|
||||
<Link>spine-csharp\Slot.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SlotData.cs">
|
||||
<Link>spine-csharp\SlotData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SpringConstraint.cs">
|
||||
<Link>spine-csharp\SpringConstraint.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\SpringConstraintData.cs">
|
||||
<Link>spine-csharp\SpringConstraintData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\TextureRegion.cs">
|
||||
<Link>spine-csharp\TextureRegion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\TransformConstraint.cs">
|
||||
<Link>spine-csharp\TransformConstraint.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\TransformConstraintData.cs">
|
||||
<Link>spine-csharp\TransformConstraintData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Triangulator.cs">
|
||||
<Link>spine-csharp\Triangulator.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\AtlasAttachmentLoader.cs">
|
||||
<Link>spine-csharp\Attachments\AtlasAttachmentLoader.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\Attachment.cs">
|
||||
<Link>spine-csharp\Attachments\Attachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\AttachmentLoader.cs">
|
||||
<Link>spine-csharp\Attachments\AttachmentLoader.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\AttachmentType.cs">
|
||||
<Link>spine-csharp\Attachments\AttachmentType.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\BoundingBoxAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\BoundingBoxAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\ClippingAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\ClippingAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\IHasTextureRegion.cs">
|
||||
<Link>spine-csharp\Attachments\IHasTextureRegion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\MeshAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\MeshAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\PathAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\PathAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\PointAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\PointAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\RegionAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\RegionAttachment.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\Sequence.cs">
|
||||
<Link>spine-csharp\Attachments\Sequence.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\spine-csharp\src\Attachments\VertexAttachment.cs">
|
||||
<Link>spine-csharp\Attachments\VertexAttachment.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\spine-csharp\src\Animation.cs.meta">
|
||||
<Link>spine-csharp\Animation.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\AnimationState.cs.meta">
|
||||
<Link>spine-csharp\AnimationState.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\AnimationStateData.cs.meta">
|
||||
<Link>spine-csharp\AnimationStateData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Atlas.cs.meta">
|
||||
<Link>spine-csharp\Atlas.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments.meta">
|
||||
<Link>spine-csharp\Attachments.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\BlendMode.cs.meta">
|
||||
<Link>spine-csharp\BlendMode.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Bone.cs.meta">
|
||||
<Link>spine-csharp\Bone.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\BoneData.cs.meta">
|
||||
<Link>spine-csharp\BoneData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\ConstraintData.cs.meta">
|
||||
<Link>spine-csharp\ConstraintData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Event.cs.meta">
|
||||
<Link>spine-csharp\Event.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\EventData.cs.meta">
|
||||
<Link>spine-csharp\EventData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\ExposedList.cs.meta">
|
||||
<Link>spine-csharp\ExposedList.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\IkConstraint.cs.meta">
|
||||
<Link>spine-csharp\IkConstraint.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\IkConstraintData.cs.meta">
|
||||
<Link>spine-csharp\IkConstraintData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\IUpdatable.cs.meta">
|
||||
<Link>spine-csharp\IUpdatable.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Json.cs.meta">
|
||||
<Link>spine-csharp\Json.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\MathUtils.cs.meta">
|
||||
<Link>spine-csharp\MathUtils.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\package.json">
|
||||
<Link>spine-csharp\package.json</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\package.json.meta">
|
||||
<Link>spine-csharp\package.json.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\PathConstraint.cs.meta">
|
||||
<Link>spine-csharp\PathConstraint.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\PathConstraintData.cs.meta">
|
||||
<Link>spine-csharp\PathConstraintData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Skeleton.cs.meta">
|
||||
<Link>spine-csharp\Skeleton.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonBinary.cs.meta">
|
||||
<Link>spine-csharp\SkeletonBinary.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonBounds.cs.meta">
|
||||
<Link>spine-csharp\SkeletonBounds.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonClipping.cs.meta">
|
||||
<Link>spine-csharp\SkeletonClipping.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonData.cs.meta">
|
||||
<Link>spine-csharp\SkeletonData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonJson.cs.meta">
|
||||
<Link>spine-csharp\SkeletonJson.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SkeletonLoader.cs.meta">
|
||||
<Link>spine-csharp\SkeletonLoader.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Skin.cs.meta">
|
||||
<Link>spine-csharp\Skin.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Slot.cs.meta">
|
||||
<Link>spine-csharp\Slot.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SlotData.cs.meta">
|
||||
<Link>spine-csharp\SlotData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\spine-csharp.asmdef">
|
||||
<Link>spine-csharp\spine-csharp.asmdef</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\spine-csharp.asmdef.meta">
|
||||
<Link>spine-csharp\spine-csharp.asmdef.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SpringConstraint.cs.meta">
|
||||
<Link>spine-csharp\SpringConstraint.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\SpringConstraintData.cs.meta">
|
||||
<Link>spine-csharp\SpringConstraintData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\TransformConstraint.cs.meta">
|
||||
<Link>spine-csharp\TransformConstraint.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\TransformConstraintData.cs.meta">
|
||||
<Link>spine-csharp\TransformConstraintData.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Triangulator.cs.meta">
|
||||
<Link>spine-csharp\Triangulator.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\AtlasAttachmentLoader.cs.meta">
|
||||
<Link>spine-csharp\Attachments\AtlasAttachmentLoader.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\Attachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\Attachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\AttachmentLoader.cs.meta">
|
||||
<Link>spine-csharp\Attachments\AttachmentLoader.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\AttachmentType.cs.meta">
|
||||
<Link>spine-csharp\Attachments\AttachmentType.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\BoundingBoxAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\BoundingBoxAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\ClippingAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\ClippingAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\IHasTextureRegion.cs.meta">
|
||||
<Link>spine-csharp\Attachments\IHasTextureRegion.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\MeshAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\MeshAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\PathAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\PathAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\PointAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\PointAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\RegionAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\RegionAttachment.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\Sequence.cs.meta">
|
||||
<Link>spine-csharp\Attachments\Sequence.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\spine-csharp\src\Attachments\VertexAttachment.cs.meta">
|
||||
<Link>spine-csharp\Attachments\VertexAttachment.cs.meta</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -118,7 +118,7 @@ namespace Spine {
|
||||
if (attachment is RegionAttachment) {
|
||||
var regionAttachment = (RegionAttachment)attachment;
|
||||
var vertices = this.vertices;
|
||||
regionAttachment.ComputeWorldVertices(slot.Bone, vertices, 0, 2);
|
||||
regionAttachment.ComputeWorldVertices(slot, vertices, 0, 2);
|
||||
renderer.Line(vertices[0], vertices[1], vertices[2], vertices[3]);
|
||||
renderer.Line(vertices[2], vertices[3], vertices[4], vertices[5]);
|
||||
renderer.Line(vertices[4], vertices[5], vertices[6], vertices[7]);
|
||||
@ -123,17 +123,17 @@ namespace Spine {
|
||||
if (attachment is RegionAttachment) {
|
||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||
attachmentColorR = regionAttachment.R; attachmentColorG = regionAttachment.G; attachmentColorB = regionAttachment.B; attachmentColorA = regionAttachment.A;
|
||||
AtlasRegion region = (AtlasRegion)regionAttachment.RendererObject;
|
||||
AtlasRegion region = (AtlasRegion)regionAttachment.Region;
|
||||
textureObject = region.page.rendererObject;
|
||||
verticesCount = 4;
|
||||
regionAttachment.ComputeWorldVertices(slot.Bone, vertices, 0, 2);
|
||||
regionAttachment.ComputeWorldVertices(slot, vertices, 0, 2);
|
||||
indicesCount = 6;
|
||||
indices = quadTriangles;
|
||||
uvs = regionAttachment.UVs;
|
||||
} else if (attachment is MeshAttachment) {
|
||||
MeshAttachment mesh = (MeshAttachment)attachment;
|
||||
attachmentColorR = mesh.R; attachmentColorG = mesh.G; attachmentColorB = mesh.B; attachmentColorA = mesh.A;
|
||||
AtlasRegion region = (AtlasRegion)mesh.RendererObject;
|
||||
AtlasRegion region = (AtlasRegion)mesh.Region;
|
||||
textureObject = region.page.rendererObject;
|
||||
int vertexCount = mesh.WorldVerticesLength;
|
||||
if (vertices.Length < vertexCount) vertices = new float[vertexCount];
|
||||
@ -94,13 +94,7 @@ export class SkeletonRenderer {
|
||||
ctx.scale(1, -1);
|
||||
ctx.translate(-w / 2, -h / 2);
|
||||
|
||||
if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
|
||||
ctx.globalAlpha = color.a;
|
||||
// experimental tinting via compositing, doesn't work
|
||||
// ctx.globalCompositeOperation = "source-atop";
|
||||
// ctx.fillStyle = "rgba(" + (color.r * 255 | 0) + ", " + (color.g * 255 | 0) + ", " + (color.b * 255 | 0) + ", " + color.a + ")";
|
||||
// ctx.fillRect(0, 0, w, h);
|
||||
}
|
||||
ctx.globalAlpha = color.a;
|
||||
ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);
|
||||
if (this.debugRendering) ctx.strokeRect(0, 0, w, h);
|
||||
ctx.restore();
|
||||
@ -147,13 +141,7 @@ export class SkeletonRenderer {
|
||||
skeletonColor.b * slotColor.b * attachmentColor.b,
|
||||
skeletonColor.a * slotColor.a * attachmentColor.a);
|
||||
|
||||
if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
|
||||
ctx.globalAlpha = color.a;
|
||||
// experimental tinting via compositing, doesn't work
|
||||
// ctx.globalCompositeOperation = "source-atop";
|
||||
// ctx.fillStyle = "rgba(" + (color.r * 255 | 0) + ", " + (color.g * 255 | 0) + ", " + (color.b * 255 | 0) + ", " + color.a + ")";
|
||||
// ctx.fillRect(0, 0, w, h);
|
||||
}
|
||||
ctx.globalAlpha = color.a;
|
||||
|
||||
for (var j = 0; j < triangles.length; j += 3) {
|
||||
let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;
|
||||
|
||||
@ -138,7 +138,8 @@ export class AssetManagerBase implements Disposable {
|
||||
|
||||
loadTextureAtlas (path: string,
|
||||
success: (path: string, atlas: TextureAtlas) => void = null,
|
||||
error: (path: string, message: string) => void = null
|
||||
error: (path: string, message: string) => void = null,
|
||||
fileAlias: { [keyword: string]: string } = null
|
||||
) {
|
||||
let index = path.lastIndexOf("/");
|
||||
let parent = index >= 0 ? path.substring(0, index + 1) : "";
|
||||
@ -149,7 +150,7 @@ export class AssetManagerBase implements Disposable {
|
||||
let atlas = new TextureAtlas(atlasText);
|
||||
let toLoad = atlas.pages.length, abort = false;
|
||||
for (let page of atlas.pages) {
|
||||
this.loadTexture(parent + page.name,
|
||||
this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name],
|
||||
(imagePath: string, texture: Texture) => {
|
||||
if (!abort) {
|
||||
page.setTexture(texture);
|
||||
|
||||
@ -956,7 +956,8 @@ namespace Spine.Unity.Editor {
|
||||
skeletonDataAsset.Clear();
|
||||
}
|
||||
var skeletonData = skeletonDataAsset.GetSkeletonData(true);
|
||||
BlendModeMaterialsUtility.UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData);
|
||||
if (skeletonData != null)
|
||||
BlendModeMaterialsUtility.UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData);
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
return skeletonDataAsset;
|
||||
@ -1006,9 +1007,9 @@ namespace Spine.Unity.Editor {
|
||||
);
|
||||
|
||||
switch (result) {
|
||||
case -1:
|
||||
//Debug.Log("Select Atlas");
|
||||
AtlasAssetBase selectedAtlas = BrowseAtlasDialog(Path.GetDirectoryName(skeletonPath).Replace('\\', '/'));
|
||||
case -1: { // Select Atlas
|
||||
string pathForwardSlash = Path.GetDirectoryName(skeletonPath).Replace('\\', '/');
|
||||
AtlasAssetBase selectedAtlas = BrowseAtlasDialog(pathForwardSlash, localAtlases);
|
||||
if (selectedAtlas != null) {
|
||||
localAtlases.Clear();
|
||||
localAtlases.Add(selectedAtlas);
|
||||
@ -1019,14 +1020,17 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0: // Resolve AtlasAssets...
|
||||
var atlasList = MultiAtlasDialog(requiredPaths, Path.GetDirectoryName(skeletonPath).Replace('\\', '/'),
|
||||
Path.GetFileNameWithoutExtension(skeletonPath));
|
||||
}
|
||||
case 0: { // Resolve AtlasAssets...
|
||||
string pathForwardSlash = Path.GetDirectoryName(skeletonPath).Replace('\\', '/');
|
||||
var atlasList = MultiAtlasDialog(requiredPaths, pathForwardSlash,
|
||||
localAtlases, filename);
|
||||
if (atlasList != null)
|
||||
AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasList.ToArray());
|
||||
|
||||
resolved = true;
|
||||
break;
|
||||
}
|
||||
case 1: // Import without atlas
|
||||
Debug.LogWarning("Imported with missing atlases. Skeleton will not render: " + Path.GetFileName(skeletonPath));
|
||||
AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), new AtlasAssetBase[] { });
|
||||
@ -1040,7 +1044,9 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<AtlasAssetBase> MultiAtlasDialog (List<string> requiredPaths, string initialDirectory, string filename = "") {
|
||||
public static List<AtlasAssetBase> MultiAtlasDialog (List<string> requiredPaths, string initialDirectory,
|
||||
List<AtlasAssetBase> localAtlases, string filename = "") {
|
||||
|
||||
List<AtlasAssetBase> atlasAssets = new List<AtlasAssetBase>();
|
||||
bool resolved = false;
|
||||
string lastAtlasPath = initialDirectory;
|
||||
@ -1095,7 +1101,7 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
switch (result) {
|
||||
case 0: // Browse...
|
||||
AtlasAssetBase selectedAtlasAsset = BrowseAtlasDialog(lastAtlasPath);
|
||||
AtlasAssetBase selectedAtlasAsset = BrowseAtlasDialog(lastAtlasPath, localAtlases);
|
||||
if (selectedAtlasAsset != null) {
|
||||
if (!atlasAssets.Contains(selectedAtlasAsset)) {
|
||||
var atlas = selectedAtlasAsset.GetAtlas();
|
||||
@ -1123,7 +1129,7 @@ namespace Spine.Unity.Editor {
|
||||
return atlasAssets;
|
||||
}
|
||||
|
||||
public static AtlasAssetBase BrowseAtlasDialog (string dirPath) {
|
||||
public static AtlasAssetBase BrowseAtlasDialog (string dirPath, List<AtlasAssetBase> localAtlases) {
|
||||
string path = EditorUtility.OpenFilePanel("Select AtlasAsset...", dirPath, "asset");
|
||||
if (path == "")
|
||||
return null; // Canceled or closed by user.
|
||||
@ -1131,12 +1137,20 @@ namespace Spine.Unity.Editor {
|
||||
int subLen = Application.dataPath.Length - 6;
|
||||
string assetRelativePath = path.Substring(subLen, path.Length - subLen).Replace("\\", "/");
|
||||
|
||||
var obj = AssetDatabase.LoadAssetAtPath(assetRelativePath, typeof(AtlasAssetBase));
|
||||
UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(assetRelativePath, typeof(AtlasAssetBase));
|
||||
if (obj == null) {
|
||||
// atlas assets that were just created fail to load, search localAtlases
|
||||
foreach (AtlasAssetBase localAtlas in localAtlases) {
|
||||
string newAtlasPath = AssetDatabase.GetAssetPath(localAtlas);
|
||||
if (newAtlasPath == assetRelativePath)
|
||||
return localAtlas;
|
||||
}
|
||||
}
|
||||
|
||||
if (obj == null || !(obj is AtlasAssetBase)) {
|
||||
Debug.Log("Chosen asset was not of type AtlasAssetBase");
|
||||
return null;
|
||||
}
|
||||
|
||||
return (AtlasAssetBase)obj;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -262,8 +262,7 @@ namespace Spine.Unity {
|
||||
if (lastRendererMaterial != material) {
|
||||
if (lastRendererMaterial != null)
|
||||
return true;
|
||||
else
|
||||
lastRendererMaterial = material;
|
||||
lastRendererMaterial = material;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
Spine Runtimes License Agreement
|
||||
Last updated May 1, 2019. Replaces all prior versions.
|
||||
|
||||
Copyright (c) 2013-2019, Esoteric Software LLC
|
||||
|
||||
Integration of the Spine Runtimes into software or otherwise creating
|
||||
derivative works of the Spine Runtimes is permitted under the terms and
|
||||
conditions of Section 2 of the Spine Editor License Agreement:
|
||||
http://esotericsoftware.com/spine-editor-license
|
||||
|
||||
Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
"Products"), provided that each user of the Products must obtain their own
|
||||
Spine Editor license and redistribution of the Products in any form must
|
||||
include this license and copyright notice.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
|
||||
INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -1,34 +0,0 @@
|
||||
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-xna")]
|
||||
[assembly: AssemblyProduct("spine-xna")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyCompany("Esoteric Software")]
|
||||
[assembly: AssemblyCopyright("Copyright © Esoteric Software 2013-2016")]
|
||||
[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. Only Windows
|
||||
// assemblies support COM.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// On Windows, the following GUID is for the ID of the typelib if this
|
||||
// project is exposed to COM. On other platforms, it unique identifies the
|
||||
// title storage container when deploying this assembly to the device.
|
||||
[assembly: Guid("bce68f54-1e09-449a-90a2-b7ca28f491a5")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
@ -1,30 +1,3 @@
|
||||
# spine-xna
|
||||
|
||||
The spine-xna runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [XNA](http://msdn.microsoft.com/xna/). spine-xna is based on [spine-csharp](../spine-csharp).
|
||||
|
||||
## Licensing
|
||||
|
||||
You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.
|
||||
|
||||
You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own [Spine license](https://esotericsoftware.com/spine-purchase). Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.
|
||||
|
||||
In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a [Spine license](https://esotericsoftware.com/spine-purchase) at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.
|
||||
|
||||
For the official legal terms governing the Spine Runtimes, please read the [Spine Runtimes License Agreement](http://esotericsoftware.com/spine-runtimes-license) and Section 2 of the [Spine Editor License Agreement](http://esotericsoftware.com/spine-editor-license#s2).
|
||||
|
||||
## Spine version
|
||||
|
||||
spine-xna works with data exported from Spine 4.1.xx.
|
||||
|
||||
spine-xna supports all Spine features.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
|
||||
1. For XNA with Visual Studio 2015, download [XNA 4.0 refresh for Visual Studio 2015](https://mxa.codeplex.com/releases/view/618279). Install each subfolder as per the README file.
|
||||
1. Open the `spine-xna.sln` project file with Visual Studio.
|
||||
1. Set `spine-xna-example` as the startup project
|
||||
1. Set the working directory of `spine-xna-example` to `spine-runtimes/spine-xna/example`
|
||||
1. Run the example!
|
||||
|
||||
Alternatively, the contents of the `spine-csharp/src` and `spine-xna/src` directories can be copied into your project.
|
||||
spine-xna has been discontinued in favor of spine-monogame. Microsoft no longer offers the old XNA tools for download. Projects still relying on Microsoft's XNA implementation can use the sources from spine-monogame.
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
float4x4 World;
|
||||
float4x4 View;
|
||||
float4x4 Projection;
|
||||
|
||||
sampler TextureSampler : register(s0);
|
||||
|
||||
// TODO: add effect parameters here.
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float4 TextureCoordinate : TEXCOORD0;
|
||||
float4 Color2 : COLOR1;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float4 TextureCoordinate : TEXCOORD0;
|
||||
float4 Color2 : COLOR1;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output;
|
||||
|
||||
float4 worldPosition = mul(input.Position, World);
|
||||
float4 viewPosition = mul(worldPosition, View);
|
||||
output.Position = mul(viewPosition, Projection);
|
||||
output.TextureCoordinate = input.TextureCoordinate;
|
||||
output.Color = input.Color;
|
||||
output.Color2 = input.Color2;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 texColor = tex2D(TextureSampler, input.TextureCoordinate);
|
||||
float alpha = texColor.a * input.Color.a;
|
||||
float4 output;
|
||||
output.a = alpha;
|
||||
output.rgb = ((texColor.a - 1.0) * input.Color2.a + 1.0 - texColor.rgb) * input.Color2.rgb + texColor.rgb * input.Color.rgb;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass Pass1
|
||||
{
|
||||
// TODO: set renderstates here.
|
||||
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{D0632D20-BC92-4A73-896B-30BB687732B8}</ProjectGuid>
|
||||
<ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="SpineEffect.fx">
|
||||
<Name>SpineEffect</Name>
|
||||
<Importer>EffectImporter</Importer>
|
||||
<Processor>EffectProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="SpineEffectNormalmap.fx">
|
||||
<Name>SpineEffectNormalmap</Name>
|
||||
<Importer>EffectImporter</Importer>
|
||||
<Processor>EffectProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="SpineEffectOutline.fx">
|
||||
<Name>SpineEffectOutline</Name>
|
||||
<Importer>EffectImporter</Importer>
|
||||
<Processor>EffectProcessor</Processor>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
@ -1,34 +0,0 @@
|
||||
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-xna-example")]
|
||||
[assembly: AssemblyProduct("spine-xna-example")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyCompany("Esoteric Software")]
|
||||
[assembly: AssemblyCopyright("Copyright © Esoteric Software 2013-2016")]
|
||||
[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. Only Windows
|
||||
// assemblies support COM.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// On Windows, the following GUID is for the ID of the typelib if this
|
||||
// project is exposed to COM. On other platforms, it unique identifies the
|
||||
// title storage container when deploying this assembly to the device.
|
||||
[assembly: Guid("078eb4ac-3a70-4ab4-b103-a048c6a15898")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
@ -1,218 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{29CC4385-294A-4885-A3E8-FD4825E0CFDD}</ProjectGuid>
|
||||
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spine</RootNamespace>
|
||||
<AssemblyName>spine-xna-example</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
|
||||
<XnaPlatform>Windows</XnaPlatform>
|
||||
<XnaProfile>HiDef</XnaProfile>
|
||||
<XnaCrossPlatformGroupID>bf3b738e-f348-48d3-b35b-94bc118edb90</XnaCrossPlatformGroupID>
|
||||
<XnaOutputType>Game</XnaOutputType>
|
||||
<ApplicationIcon>Game.ico</ApplicationIcon>
|
||||
<Thumbnail>GameThumbnail.png</Thumbnail>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<XnaUpgrade />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<XnaCompressContent>True</XnaCompressContent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<XnaCompressContent>True</XnaCompressContent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Spine.ExampleProgram</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Video, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Avatar, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="src\ExampleGame.cs" />
|
||||
<Compile Include="src\ExampleProgram.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="data\coin.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\coin-pro.skel">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\raptor.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\spineboy-pro.skel">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\spineboy.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\raptor_normals.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Include="data\tank.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Game.ico" />
|
||||
<Content Include="GameThumbnail.png" />
|
||||
<None Include="data\tank.atlas">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\tank-pro.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\spine-csharp\spine-csharp.csproj">
|
||||
<Project>{94144e22-2431-4a8f-ac04-dec22f7edd8f}</Project>
|
||||
<Name>spine-csharp</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\example-content\spine-xna-example-content.contentproj">
|
||||
<Project>{D0632D20-BC92-4A73-896B-30BB687732B8}</Project>
|
||||
<Name>spine-xna-example-content</Name>
|
||||
<XnaReferenceType>Content</XnaReferenceType>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\spine-xna.csproj">
|
||||
<Project>{7F8F2327-C016-49C8-BB4D-F3F77971961E}</Project>
|
||||
<Name>spine-xna</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="data\coin.atlas">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\coin-pro.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\raptor.atlas">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\raptor-pro.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="data\spineboy.atlas">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,246 +0,0 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated September 24, 2021. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2021, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
using Spine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Spine {
|
||||
public class Example : Microsoft.Xna.Framework.Game {
|
||||
GraphicsDeviceManager graphics;
|
||||
SkeletonRenderer skeletonRenderer;
|
||||
SkeletonDebugRenderer skeletonDebugRenderer;
|
||||
Skeleton skeleton;
|
||||
Slot headSlot;
|
||||
AnimationState state;
|
||||
SkeletonBounds bounds = new SkeletonBounds();
|
||||
|
||||
#if WINDOWS_STOREAPP
|
||||
private string assetsFolder = @"Assets\";
|
||||
#else
|
||||
private string assetsFolder = "data/";
|
||||
#endif
|
||||
|
||||
public Example () {
|
||||
IsMouseVisible = true;
|
||||
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
graphics.IsFullScreen = false;
|
||||
graphics.PreferredBackBufferWidth = 800;
|
||||
graphics.PreferredBackBufferHeight = 600;
|
||||
}
|
||||
|
||||
protected override void Initialize () {
|
||||
// TODO: Add your initialization logic here
|
||||
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
protected override void LoadContent () {
|
||||
|
||||
bool useNormalmapShader = false;
|
||||
Effect spineEffect;
|
||||
if (!useNormalmapShader) {
|
||||
// Two color tint effect. Note that you can also use the default BasicEffect instead.
|
||||
spineEffect = Content.Load<Effect>("spine-xna-example-content\\SpineEffect");
|
||||
} else {
|
||||
spineEffect = Content.Load<Effect>("spine-xna-example-content\\SpineEffectNormalmap");
|
||||
spineEffect.Parameters["Light0_Direction"].SetValue(new Vector3(-0.5265408f, 0.5735765f, -0.6275069f));
|
||||
spineEffect.Parameters["Light0_Diffuse"].SetValue(new Vector3(1, 0.9607844f, 0.8078432f));
|
||||
spineEffect.Parameters["Light0_Specular"].SetValue(new Vector3(1, 0.9607844f, 0.8078432f));
|
||||
spineEffect.Parameters["Light0_SpecularExponent"].SetValue(2.0f);
|
||||
}
|
||||
spineEffect.Parameters["World"].SetValue(Matrix.Identity);
|
||||
spineEffect.Parameters["View"].SetValue(Matrix.CreateLookAt(new Vector3(0.0f, 0.0f, 1.0f), Vector3.Zero, Vector3.Up));
|
||||
|
||||
skeletonRenderer = new SkeletonRenderer(GraphicsDevice);
|
||||
skeletonRenderer.PremultipliedAlpha = false;
|
||||
skeletonRenderer.Effect = spineEffect;
|
||||
|
||||
skeletonDebugRenderer = new SkeletonDebugRenderer(GraphicsDevice);
|
||||
skeletonDebugRenderer.DisableAll();
|
||||
skeletonDebugRenderer.DrawClipping = true;
|
||||
|
||||
//String name = "spineboy-pro";
|
||||
String name = "raptor-pro";
|
||||
// String name = "tank-pro";
|
||||
//String name = "coin-pro";
|
||||
if (useNormalmapShader)
|
||||
name = "raptor-pro"; // we only have normalmaps for raptor
|
||||
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
|
||||
|
||||
bool binaryData = name.Contains("spineboy");
|
||||
|
||||
Atlas atlas;
|
||||
if (!useNormalmapShader) {
|
||||
atlas = new Atlas(assetsFolder + atlasName + ".atlas", new XnaTextureLoader(GraphicsDevice));
|
||||
} else {
|
||||
atlas = new Atlas(assetsFolder + atlasName + ".atlas", new XnaTextureLoader(GraphicsDevice,
|
||||
loadMultipleTextureLayers: true, textureSuffixes: new string[] { "", "_normals" }));
|
||||
}
|
||||
float scale = 1;
|
||||
if (name == "spineboy-pro") scale = 0.6f;
|
||||
if (name == "raptor-pro") scale = 0.5f;
|
||||
if (name == "tank-pro") scale = 0.3f;
|
||||
if (name == "coin-pro") scale = 1;
|
||||
|
||||
SkeletonData skeletonData;
|
||||
if (binaryData) {
|
||||
SkeletonBinary binary = new SkeletonBinary(atlas);
|
||||
binary.Scale = scale;
|
||||
skeletonData = binary.ReadSkeletonData(assetsFolder + name + ".skel");
|
||||
} else {
|
||||
SkeletonJson json = new SkeletonJson(atlas);
|
||||
json.Scale = scale;
|
||||
skeletonData = json.ReadSkeletonData(assetsFolder + name + ".json");
|
||||
}
|
||||
skeleton = new Skeleton(skeletonData);
|
||||
if (name == "goblins-pro") skeleton.SetSkin("goblin");
|
||||
|
||||
// Define mixing between animations.
|
||||
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
|
||||
state = new AnimationState(stateData);
|
||||
|
||||
if (name == "spineboy-pro") {
|
||||
skeleton.SetAttachment("head-bb", "head");
|
||||
|
||||
stateData.SetMix("run", "jump", 0.2f);
|
||||
stateData.SetMix("jump", "run", 0.4f);
|
||||
|
||||
// Event handling for all animations.
|
||||
state.Start += Start;
|
||||
state.End += End;
|
||||
state.Complete += Complete;
|
||||
state.Event += Event;
|
||||
|
||||
state.SetAnimation(0, "run", true);
|
||||
TrackEntry entry = state.AddAnimation(0, "jump", false, 0);
|
||||
entry.End += End; // Event handling for queued animations.
|
||||
state.AddAnimation(0, "run", true, 0);
|
||||
} else if (name == "raptor-pro") {
|
||||
state.SetAnimation(0, "walk", true);
|
||||
state.AddAnimation(1, "gun-grab", false, 2);
|
||||
} else if (name == "coin-pro") {
|
||||
state.SetAnimation(0, "animation", true);
|
||||
} else if (name == "tank-pro") {
|
||||
skeleton.X += 300;
|
||||
state.SetAnimation(0, "drive", true);
|
||||
} else {
|
||||
state.SetAnimation(0, "walk", true);
|
||||
}
|
||||
|
||||
skeleton.X += 400;
|
||||
skeleton.Y += GraphicsDevice.Viewport.Height;
|
||||
skeleton.UpdateWorldTransform();
|
||||
|
||||
headSlot = skeleton.FindSlot("head");
|
||||
}
|
||||
|
||||
protected override void UnloadContent () {
|
||||
// TODO: Unload any non ContentManager content here
|
||||
}
|
||||
|
||||
protected override void Update (GameTime gameTime) {
|
||||
// TODO: Add your update logic here
|
||||
#if (!WINDOWS_STOREAPP || WINDOWS_PHONE81) && !IOS
|
||||
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
|
||||
this.Exit();
|
||||
#endif
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
protected override void Draw (GameTime gameTime) {
|
||||
GraphicsDevice.Clear(Color.Black);
|
||||
|
||||
state.Update((float)(gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0));
|
||||
state.Apply(skeleton);
|
||||
skeleton.UpdateWorldTransform();
|
||||
if (skeletonRenderer.Effect is BasicEffect) {
|
||||
((BasicEffect)skeletonRenderer.Effect).Projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 1, 0);
|
||||
} else {
|
||||
skeletonRenderer.Effect.Parameters["Projection"].SetValue(Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 1, 0));
|
||||
}
|
||||
skeletonRenderer.Begin();
|
||||
skeletonRenderer.Draw(skeleton);
|
||||
skeletonRenderer.End();
|
||||
|
||||
skeletonDebugRenderer.Effect.Projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 1, 0);
|
||||
skeletonDebugRenderer.Begin();
|
||||
skeletonDebugRenderer.Draw(skeleton);
|
||||
skeletonDebugRenderer.End();
|
||||
|
||||
bounds.Update(skeleton, true);
|
||||
MouseState mouse = Mouse.GetState();
|
||||
if (headSlot != null) {
|
||||
headSlot.G = 1;
|
||||
headSlot.B = 1;
|
||||
if (bounds.AabbContainsPoint(mouse.X, mouse.Y)) {
|
||||
BoundingBoxAttachment hit = bounds.ContainsPoint(mouse.X, mouse.Y);
|
||||
if (hit != null) {
|
||||
headSlot.G = 0;
|
||||
headSlot.B = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
|
||||
public void Start (TrackEntry entry) {
|
||||
#if !WINDOWS_STOREAPP
|
||||
Console.WriteLine(entry + ": start");
|
||||
#endif
|
||||
}
|
||||
|
||||
public void End (TrackEntry entry) {
|
||||
#if !WINDOWS_STOREAPP
|
||||
Console.WriteLine(entry + ": end");
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Complete (TrackEntry entry) {
|
||||
#if !WINDOWS_STOREAPP
|
||||
Console.WriteLine(entry + ": complete ");
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Event (TrackEntry entry, Event e) {
|
||||
#if !WINDOWS_STOREAPP
|
||||
Console.WriteLine(entry + ": event " + e);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Spine {
|
||||
#if WINDOWS || XBOX
|
||||
static class ExampleProgram {
|
||||
static void Main (string[] args) {
|
||||
using (Example game = new Example()) {
|
||||
game.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
#elif WINDOWS_STOREAPP
|
||||
public static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
static void Main()
|
||||
{
|
||||
var factory = new MonoGame.Framework.GameFrameworkViewSource<Example>();
|
||||
Windows.ApplicationModel.Core.CoreApplication.Run(factory);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -1,160 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{7F8F2327-C016-49C8-BB4D-F3F77971961E}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spine</RootNamespace>
|
||||
<AssemblyName>spine-xna</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
|
||||
<XnaPlatform>Windows</XnaPlatform>
|
||||
<XnaProfile>HiDef</XnaProfile>
|
||||
<XnaCrossPlatformGroupID>f1fc4580-2d86-4a03-bd33-44b1703f36a1</XnaCrossPlatformGroupID>
|
||||
<XnaOutputType>Library</XnaOutputType>
|
||||
<XnaUpgrade />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<XnaCompressContent>false</XnaCompressContent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<XnaCompressContent>true</XnaCompressContent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Video, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Avatar, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="src\MeshBatcher.cs" />
|
||||
<Compile Include="src\VertexEffect.cs" />
|
||||
<Compile Include="src\ShapeRenderer.cs" />
|
||||
<Compile Include="src\SkeletonDebugRenderer.cs" />
|
||||
<Compile Include="src\XnaTextureLoader.cs" />
|
||||
<Compile Include="src\Util.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="src\SkeletonRenderer.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\spine-csharp\spine-csharp.csproj">
|
||||
<Project>{94144e22-2431-4a8f-ac04-dec22f7edd8f}</Project>
|
||||
<Name>spine-csharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,71 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-xna", "spine-xna.csproj", "{7F8F2327-C016-49C8-BB4D-F3F77971961E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F} = {94144E22-2431-4A8F-AC04-DEC22F7EDD8F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-xna-example", "example\spine-xna-example.csproj", "{29CC4385-294A-4885-A3E8-FD4825E0CFDD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-csharp", "..\spine-csharp\spine-csharp.csproj", "{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spine-xna-example-content", "example-content\spine-xna-example-content.contentproj", "{D0632D20-BC92-4A73-896B-30BB687732B8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Debug|x86.Build.0 = Debug|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|Any CPU.Build.0 = Release|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|x86.ActiveCfg = Release|x86
|
||||
{7F8F2327-C016-49C8-BB4D-F3F77971961E}.Release|x86.Build.0 = Release|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Debug|x86.Build.0 = Debug|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Release|x86.ActiveCfg = Release|x86
|
||||
{29CC4385-294A-4885-A3E8-FD4825E0CFDD}.Release|x86.Build.0 = Release|x86
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{94144E22-2431-4A8F-AC04-DEC22F7EDD8F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D0632D20-BC92-4A73-896B-30BB687732B8}.Release|x86.ActiveCfg = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||