mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[xna] Fixed a compile error in Atlas loading (in a non-Unity #if codebranch).
This commit is contained in:
parent
1ffab53d97
commit
8bced33fc6
@ -68,7 +68,10 @@ namespace Spine {
|
|||||||
var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
|
var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
|
||||||
using (var reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
|
using (var reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
|
||||||
try {
|
try {
|
||||||
Load(reader, Path.GetDirectoryName(path), textureLoader);
|
Atlas atlas = new Atlas(reader, Path.GetDirectoryName(path), textureLoader);
|
||||||
|
this.pages = atlas.pages;
|
||||||
|
this.regions = atlas.regions;
|
||||||
|
this.textureLoader = atlas.textureLoader;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new Exception("Error reading atlas file: " + path, ex);
|
throw new Exception("Error reading atlas file: " + path, ex);
|
||||||
}
|
}
|
||||||
@ -87,7 +90,10 @@ namespace Spine {
|
|||||||
using (StreamReader reader = new StreamReader(path)) {
|
using (StreamReader reader = new StreamReader(path)) {
|
||||||
#endif // WINDOWS_PHONE
|
#endif // WINDOWS_PHONE
|
||||||
try {
|
try {
|
||||||
Load(reader, Path.GetDirectoryName(path), textureLoader);
|
Atlas atlas = new Atlas(reader, Path.GetDirectoryName(path), textureLoader);
|
||||||
|
this.pages = atlas.pages;
|
||||||
|
this.regions = atlas.regions;
|
||||||
|
this.textureLoader = atlas.textureLoader;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new Exception("Error reading atlas file: " + path, ex);
|
throw new Exception("Error reading atlas file: " + path, ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,7 +95,7 @@ namespace Spine {
|
|||||||
skeletonDebugRenderer.DisableAll();
|
skeletonDebugRenderer.DisableAll();
|
||||||
skeletonDebugRenderer.DrawClipping = true;
|
skeletonDebugRenderer.DrawClipping = true;
|
||||||
|
|
||||||
// String name = "spineboy-pro";
|
//String name = "spineboy-pro";
|
||||||
String name = "raptor-pro";
|
String name = "raptor-pro";
|
||||||
// String name = "tank-pro";
|
// String name = "tank-pro";
|
||||||
//String name = "coin-pro";
|
//String name = "coin-pro";
|
||||||
@ -103,7 +103,7 @@ namespace Spine {
|
|||||||
name = "raptor-pro"; // we only have normalmaps for raptor
|
name = "raptor-pro"; // we only have normalmaps for raptor
|
||||||
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
|
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
|
||||||
|
|
||||||
bool binaryData = false;
|
bool binaryData = name.Contains("spineboy");
|
||||||
|
|
||||||
Atlas atlas;
|
Atlas atlas;
|
||||||
if (!useNormalmapShader) {
|
if (!useNormalmapShader) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user