-
Notifications
You must be signed in to change notification settings - Fork 511
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
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7295a4a
[spritekit] Update for Xcode 9 beta 1, 2 & 3
VincentDondain 1af8b71
[spritekit] Fixes based on comments
VincentDondain 07df2b2
[spritekit] Fixes based on comments (2)
VincentDondain 3e4679b
[spritekit] Fixes based on comments (3)
VincentDondain 19ae06f
[spritekit] Don't execute on watchOS
VincentDondain e0085f2
[spritekit] Fix braces new line
VincentDondain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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[] { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor: space before There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 { | ||
|
@@ -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)); | ||
} | ||
|
@@ -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)); | ||
} | ||
|
@@ -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, | ||
}; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 (:
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 😄