Skip to content

Commit

Permalink
fixes for xbox 360
Browse files Browse the repository at this point in the history
  • Loading branch information
totallyevil committed Jun 26, 2013
1 parent 9e76345 commit 656911f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 75 deletions.
68 changes: 3 additions & 65 deletions cocos2d-xna.XBox360.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,6 @@ Global
{FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|x86.Build.0 = Release|x86
{FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Xbox 360.ActiveCfg = Release|x86
{FBE4633D-00D1-4391-8184-63B91DA28D4B}.Release|Xbox 360.Build.0 = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Any CPU.ActiveCfg = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Windows Phone.ActiveCfg = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Windows Phone.Build.0 = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|x86.ActiveCfg = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|x86.Build.0 = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Xbox 360.ActiveCfg = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Debug|Xbox 360.Build.0 = Debug|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Any CPU.ActiveCfg = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Mixed Platforms.Build.0 = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Windows Phone.ActiveCfg = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Windows Phone.Build.0 = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|x86.ActiveCfg = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|x86.Build.0 = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Xbox 360.ActiveCfg = Release|x86
{0C0AFDFF-A4E4-49F4-B6DB-A761B0DB64A8}.Release|Xbox 360.Build.0 = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Any CPU.ActiveCfg = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Mixed Platforms.Build.0 = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Windows Phone.ActiveCfg = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Windows Phone.Build.0 = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|x86.ActiveCfg = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|x86.Build.0 = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Xbox 360.ActiveCfg = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Debug|Xbox 360.Build.0 = Debug|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Any CPU.ActiveCfg = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Mixed Platforms.ActiveCfg = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Mixed Platforms.Build.0 = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Windows Phone.ActiveCfg = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Windows Phone.Build.0 = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|x86.ActiveCfg = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|x86.Build.0 = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Xbox 360.ActiveCfg = Release|x86
{8877C885-BEC4-4165-8A19-9C07FF9EC026}.Release|Xbox 360.Build.0 = Release|x86
{2CE0B38F-5C9C-4088-8FEC-D3B58EE48E35}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone
{2CE0B38F-5C9C-4088-8FEC-D3B58EE48E35}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone
{2CE0B38F-5C9C-4088-8FEC-D3B58EE48E35}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone
Expand All @@ -94,6 +58,7 @@ Global
{2CE0B38F-5C9C-4088-8FEC-D3B58EE48E35}.Release|Xbox 360.ActiveCfg = Release|Windows Phone
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|Windows Phone.Build.0 = Debug|Xbox 360
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Debug|x86.ActiveCfg = Debug|Xbox 360
Expand All @@ -109,6 +74,7 @@ Global
{D551499A-180B-40DA-BEB0-97E42B38BF95}.Release|Xbox 360.Build.0 = Release|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|Windows Phone.Build.0 = Debug|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Debug|x86.ActiveCfg = Debug|Xbox 360
Expand All @@ -125,24 +91,9 @@ Global
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Release|Xbox 360.Build.0 = Release|Xbox 360
{CABEE593-BC24-49D8-8969-0CE97D437E0F}.Release|Xbox 360.Deploy.0 = Release|Xbox 360
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Any CPU.ActiveCfg = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Mixed Platforms.Build.0 = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Windows Phone.ActiveCfg = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Windows Phone.Build.0 = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|x86.ActiveCfg = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|x86.Build.0 = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Debug|Xbox 360.ActiveCfg = Debug|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Any CPU.ActiveCfg = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Mixed Platforms.ActiveCfg = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Mixed Platforms.Build.0 = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Windows Phone.ActiveCfg = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Windows Phone.Build.0 = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|x86.ActiveCfg = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|x86.Build.0 = Release|x86
{B81B6701-7A78-4846-BF6F-04E0591F0F38}.Release|Xbox 360.ActiveCfg = Release|x86
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|Windows Phone.Build.0 = Debug|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Debug|x86.ActiveCfg = Debug|Xbox 360
Expand All @@ -156,19 +107,6 @@ Global
{2429512B-C898-49C5-84BE-E4A659FC1647}.Release|x86.ActiveCfg = Release|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
{2429512B-C898-49C5-84BE-E4A659FC1647}.Release|Xbox 360.Build.0 = Release|Xbox 360
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|Windows Phone.Build.0 = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|x86.ActiveCfg = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Debug|Xbox 360.ActiveCfg = Debug|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Any CPU.ActiveCfg = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Mixed Platforms.Build.0 = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Windows Phone.ActiveCfg = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Windows Phone.Build.0 = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|x86.ActiveCfg = Release|Windows Phone
{8165599E-6F37-41B7-91CD-C7C66232B5F2}.Release|Xbox 360.ActiveCfg = Release|Windows Phone
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/actions/CCActionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void RemoveAllActionsFromTarget(CCNode target)

public void RemoveAction(CCAction action)
{
if (action == null)
if (action == null || action.OriginalTarget == null)
{
return;
}
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/platform/CCArrayPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class ArrayPool<T>
{
private static readonly Dictionary<int, List<object>> _unused = new Dictionary<int, List<object>>();

#if WINDOWS_PHONE
#if WINDOWS_PHONE || XBOX
public static T[] Create(int length)
{
return (Create(length, true));
Expand Down Expand Up @@ -45,7 +45,7 @@ public static T[] Create(int length, bool pow = true)
return new T[length];
}

#if WINDOWS_PHONE
#if WINDOWS_PHONE || XBOX
public static void Resize(ref T[] array, int length)
{
Resize(ref array, length, true);
Expand Down
10 changes: 5 additions & 5 deletions cocos2d/platform/CCRawList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public class CCRawList<T> : IList<T>
///<summary>
/// Constructs an empty list.
///</summary>
#if WINDOWS_PHONE
#if WINDOWS_PHONE || XBOX
public CCRawList() : this(false)
{
}
public CCRawList(bool useArrayPool)
#else
#elif !XBOX
public CCRawList(bool useArrayPool = false)
#endif
{
{
UseArrayPool = useArrayPool;

if (useArrayPool)
Expand All @@ -53,7 +53,7 @@ public CCRawList(bool useArrayPool = false)
///</summary>
///<param name="initialCapacity">Initial capacity to allocate for the list.</param>
///<exception cref="ArgumentException">Thrown when the initial capacity is zero or negative.</exception>
#if WINDOWS_PHONE
#if WINDOWS_PHONE || XBOX
public CCRawList(int initialCapacity)
: this(initialCapacity, false)
{
Expand All @@ -75,7 +75,7 @@ public CCRawList(int initialCapacity, bool useArrayPool = false)
/// Constructs a raw list from another list.
///</summary>
///<param name="elements">List to copy.</param>
#if WINDOWS_PHONE
#if WINDOWS_PHONE || XBOX
public CCRawList(IList<T> elements) : this(elements, false)
{
}
Expand Down
13 changes: 13 additions & 0 deletions cocos2d/support/zip_support/ZipUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,20 @@ public static int InflateMemory(byte[] parameterin, uint inLength, byte[] parame
try
{
GZipStream gs = new GZipStream(new MemoryStream(parameterin, false)); // , CompressionMode.Decompress, false);
#if XBOX
byte[] b = new byte[8096];
while (gs.CanRead)
{
int amt = gs.Read(b, 0, b.Length);
if (amt <= 0)
{
break;
}
ms.Write(b, 0, amt);
}
#else
gs.CopyTo(ms);
#endif
return ((int)ms.Length);
}
catch (Exception)
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/textures/CCTexture2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public uint BitsPerPixelForFormat
switch (m_ePixelFormat)
{
case SurfaceFormat.Dxt1:
#if !WINDOWS && !WINDOWS_PHONE
#if !WINDOWS && !WINDOWS_PHONE && !XBOX
case SurfaceFormat.Dxt1a:
case SurfaceFormat.RgbPvrtc2Bpp:
case SurfaceFormat.RgbaPvrtc2Bpp:
Expand All @@ -152,7 +152,7 @@ public uint BitsPerPixelForFormat

case SurfaceFormat.Dxt3:
case SurfaceFormat.Dxt5:
#if !WINDOWS && !WINDOWS_PHONE
#if !WINDOWS && !WINDOWS_PHONE && !XBOX
case SurfaceFormat.RgbPvrtc4Bpp:
case SurfaceFormat.RgbaPvrtc4Bpp:
#endif
Expand Down

0 comments on commit 656911f

Please sign in to comment.