|
@@ -29,11 +29,12 @@
|
|
|
* 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.
|
|
|
- *****************************************************************************/
|
|
|
-
|
|
|
+ *****************************************************************************/
|
|
|
+
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
|
+using System.Reflection;
|
|
|
|
|
|
#if WINDOWS_STOREAPP
|
|
|
using System.Threading.Tasks;
|
|
@@ -64,7 +65,14 @@ namespace Spine {
|
|
|
}
|
|
|
#else
|
|
|
public Atlas (String path, TextureLoader textureLoader) {
|
|
|
- using (StreamReader reader = new StreamReader(path)) {
|
|
|
+
|
|
|
+#if WINDOWS_PHONE
|
|
|
+ Stream stream = Microsoft.Xna.Framework.TitleContainer.OpenStream(path);
|
|
|
+ using (StreamReader reader = new StreamReader(stream))
|
|
|
+ {
|
|
|
+#else
|
|
|
+ using (StreamReader reader = new StreamReader(path)) {
|
|
|
+#endif
|
|
|
try {
|
|
|
Load(reader, Path.GetDirectoryName(path), textureLoader);
|
|
|
} catch (Exception ex) {
|
|
@@ -270,4 +278,4 @@ namespace Spine {
|
|
|
void Load (AtlasPage page, String path);
|
|
|
void Unload (Object texture);
|
|
|
}
|
|
|
-}
|
|
|
+}
|