Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spritekit] Update for Xcode 9 beta 1, 2 & 3 #2331

Merged
merged 6 commits into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MIN_MONO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/mono-2017-04/
# Minimum Visual Studio version
MIN_VISUAL_STUDIO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/monodevelop-lion-dogfood-vNext/8f/8f1c13cb983138ee63bd53e09908ea5e737988cd/VisualStudioForMac-Preview-7.0.0.2728.dmg
MIN_VISUAL_STUDIO_VERSION=7.0.0.2728
MAX_VISUAL_STUDIO_VERSION=7.2.99
MAX_VISUAL_STUDIO_VERSION=7.3.99
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required? I think we should keep the same as 15.3 unless we require this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message says that we can bump whenever we test with a more recent version and it works (:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I completely agree when you are not in a release branch but I think that message is more intended for master

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already not the same version as the d15.3 branch, I really think it doesn't matter: https://github.com/xamarin/xamarin-macios/blob/d15-3/Make.config#L63

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think you changed that in the first Xcode9 bump 24cd73a#diff-f682ea58f8badb13b9f8ed17cda4deb7R63 but yeah I think it does not matter much at this point unless we really want to be close to dev 15.3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself is fine, but should go in a different PR, it has nothing to do with sprite kit 😄


# Minimum CMake version
MIN_CMAKE_URL=https://cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.dmg
Expand Down
39 changes: 39 additions & 0 deletions runtime/bindings-generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,26 @@ static IEnumerable<FunctionData> GetFunctionData ()
}
);

data.Add (
new FunctionData {
Comment = " // Quaternion func ()",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.QuatF,
}
);

data.Add (
new FunctionData {
Comment = " // void func (Quaternion)",
Prefix = "simd__",
Variants = Variants.NonStret,
Parameters = new ParameterData[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: space before []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Copied it from code above :P

new ParameterData { TypeData = Types.QuatF },
},
}
);

// Required for ModelIO
data.Add (
new FunctionData {
Expand Down Expand Up @@ -1994,6 +2014,12 @@ static void MarshalToManaged (StringWriter writer, TypeData type, string nativeV
writer.WriteLine ("\t\t{0}.points [i].c = {1}.points [i] [2];", managedVariable, nativeVariable);
writer.WriteLine ("\t}");
break;
case "Quaternion":
writer.WriteLine ("\t{0}.vector.a = {1}.vector [0];", managedVariable, nativeVariable);
writer.WriteLine ("\t{0}.vector.b = {1}.vector [1];", managedVariable, nativeVariable);
writer.WriteLine ("\t{0}.vector.c = {1}.vector [2];", managedVariable, nativeVariable);
writer.WriteLine ("\t{0}.vector.d = {1}.vector [3];", managedVariable, nativeVariable);
break;
default:
throw new NotImplementedException (string.Format ("MarshalToManaged for: NativeType: {0} ManagedType: {1}", type.NativeType, type.ManagedType));
}
Expand Down Expand Up @@ -2081,6 +2107,12 @@ static void MarshalToNative (StringWriter writer, TypeData type, string nativeVa
writer.WriteLine ("\t\t{0}.points [i][2] = {1}.points [i].c;", nativeVariable, managedVariable);
writer.WriteLine ("\t}");
break;
case "Quaternion":
writer.WriteLine ("\t{0}.vector [0] = {1}.vector.a;", nativeVariable, managedVariable);
writer.WriteLine ("\t{0}.vector [1] = {1}.vector.b;", nativeVariable, managedVariable);
writer.WriteLine ("\t{0}.vector [2] = {1}.vector.c;", nativeVariable, managedVariable);
writer.WriteLine ("\t{0}.vector [3] = {1}.vector.d;", nativeVariable, managedVariable);
break;
default:
throw new NotImplementedException (string.Format ("MarshalToNative for: NativeType: {0} ManagedType: {1}", type.NativeType, type.ManagedType));
}
Expand Down Expand Up @@ -2658,6 +2690,13 @@ public static class Types {
NativeWrapperType = "CGSize",
RequireMarshal = false,
};

public static TypeData QuatF = new TypeData {
ManagedType = "Quaternion",
NativeType = "simd_quatf",
NativeWrapperType = "struct QuatF",
RequireMarshal = true,
};
}
}

Expand Down
6 changes: 6 additions & 0 deletions runtime/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ typedef struct { vector_float2 columns[2]; } matrix_float2x2;
typedef struct { vector_float3 columns[3]; } matrix_float3x3;
typedef struct { vector_float4 columns[4]; } matrix_float4x4;

typedef struct { vector_float4 vector; } simd_quatf;

typedef struct {
vector_float3 maxBounds;
vector_float3 minBounds;
Expand Down Expand Up @@ -149,6 +151,10 @@ struct Matrix4f {
Vector4f columns [4];
};

struct QuatF {
Vector4f vector;
};

struct MDLAxisAlignedBoundingBoxWrapper {
Vector3f maxBounds;
Vector3f minBounds;
Expand Down
11 changes: 11 additions & 0 deletions src/SpriteKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,15 @@ public enum SKTileAdjacencyMask : nuint
LowerLeftCorner = Up | Right | LowerRight | Down | LowerLeft | Left | UpperLeft,
UpperLeftCorner = Up | UpperRight | Right | Down | LowerLeft | Left | UpperLeft,
}

[NoWatch]
[NoMac]
[TV (11,0), iOS (11,0)]
[Native]
public enum SKNodeFocusBehavior : nint
{
None = 0,
Occluding,
Focusable,
}
}
Loading