[libgdx] Updated to Java 16 with libgdx's Eclipse null analysis settings.

This commit is contained in:
Nathan Sweet 2025-03-29 17:56:45 -04:00
parent 073f4d3ec4
commit a68a509076
27 changed files with 459 additions and 593 deletions

View File

@ -1,18 +1,22 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.builder.annotationPath.allLocations=enabled
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.annotation.Null.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.utils.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.annotation.Null.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.utils.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.annotation.Null org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=com.esotericsoftware.spine.launcher.utils.Null,com.esotericsoftware.spine.server.utils.Null,com.esotericsoftware.spine.editor.utils.Null org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.utils.Null
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning
org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -21,14 +25,15 @@ org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=ignore org.eclipse.jdt.core.compiler.problem.deadCode=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@ -40,8 +45,10 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
@ -52,12 +59,13 @@ org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=info
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
@ -81,9 +89,9 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=info
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=info
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=info
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
@ -98,7 +106,7 @@ org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=info
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
@ -113,22 +121,22 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExcepti
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=info
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=16
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@ -136,20 +144,17 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@ -235,12 +240,11 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@ -271,8 +275,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@ -297,17 +299,13 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@ -355,8 +353,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@ -393,12 +389,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@ -424,10 +417,6 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=3 org.eclipse.jdt.core.formatter.tabulation.size=3
org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

View File

@ -1,18 +1,22 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.builder.annotationPath.allLocations=enabled
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.annotation.Null.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.utils.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.annotation.Null.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.utils.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.annotation.Null org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=com.esotericsoftware.spine.launcher.utils.Null,com.esotericsoftware.spine.server.utils.Null,com.esotericsoftware.spine.editor.utils.Null org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.utils.Null
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning
org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -21,14 +25,15 @@ org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=ignore org.eclipse.jdt.core.compiler.problem.deadCode=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@ -40,8 +45,10 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
@ -52,12 +59,13 @@ org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=info
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
@ -81,9 +89,9 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=info
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=info
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=info
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
@ -98,7 +106,7 @@ org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=info
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
@ -113,22 +121,22 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExcepti
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=info
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=16
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@ -136,20 +144,17 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@ -235,12 +240,11 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@ -271,8 +275,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@ -297,17 +299,13 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@ -355,8 +353,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@ -393,12 +389,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@ -424,10 +417,6 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=3 org.eclipse.jdt.core.formatter.tabulation.size=3
org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

View File

@ -186,7 +186,7 @@ public class Animation {
} }
/** The base class for all timelines. */ /** The base class for all timelines. */
static public abstract class Timeline { static abstract public class Timeline {
private final String[] propertyIds; private final String[] propertyIds;
final float[] frames; final float[] frames;
@ -277,7 +277,7 @@ public class Animation {
} }
/** The base class for timelines that interpolate between frame values using stepped, linear, or a Bezier curve. */ /** The base class for timelines that interpolate between frame values using stepped, linear, or a Bezier curve. */
static public abstract class CurveTimeline extends Timeline { static abstract public class CurveTimeline extends Timeline {
static public final int LINEAR = 0, STEPPED = 1, BEZIER = 2, BEZIER_SIZE = 18; static public final int LINEAR = 0, STEPPED = 1, BEZIER = 2, BEZIER_SIZE = 18;
float[] curves; float[] curves;
@ -314,7 +314,7 @@ public class Animation {
public void shrink (int bezierCount) { public void shrink (int bezierCount) {
int size = getFrameCount() + bezierCount * BEZIER_SIZE; int size = getFrameCount() + bezierCount * BEZIER_SIZE;
if (curves.length > size) { if (curves.length > size) {
float[] newCurves = new float[size]; var newCurves = new float[size];
arraycopy(curves, 0, newCurves, 0, size); arraycopy(curves, 0, newCurves, 0, size);
curves = newCurves; curves = newCurves;
} }
@ -380,7 +380,7 @@ public class Animation {
} }
/** The base class for a {@link CurveTimeline} that sets one property. */ /** The base class for a {@link CurveTimeline} that sets one property. */
static public abstract class CurveTimeline1 extends CurveTimeline { static abstract public class CurveTimeline1 extends CurveTimeline {
static public final int ENTRIES = 2; static public final int ENTRIES = 2;
static final int VALUE = 1; static final int VALUE = 1;
@ -517,7 +517,7 @@ public class Animation {
} }
/** The base class for a {@link CurveTimeline} which sets two properties. */ /** The base class for a {@link CurveTimeline} which sets two properties. */
static public abstract class CurveTimeline2 extends CurveTimeline { static abstract public class CurveTimeline2 extends CurveTimeline {
static public final int ENTRIES = 3; static public final int ENTRIES = 3;
static final int VALUE1 = 1, VALUE2 = 2; static final int VALUE1 = 1, VALUE2 = 2;
@ -1639,10 +1639,8 @@ public class Animation {
MixDirection direction) { MixDirection direction) {
Slot slot = skeleton.slots.get(slotIndex); Slot slot = skeleton.slots.get(slotIndex);
if (!slot.bone.active) return; if (!slot.bone.active || !(slot.attachment instanceof VertexAttachment vertexAttachment)
Attachment slotAttachment = slot.attachment; || vertexAttachment.getTimelineAttachment() != attachment) return;
if (!(slotAttachment instanceof VertexAttachment)
|| ((VertexAttachment)slotAttachment).getTimelineAttachment() != attachment) return;
FloatArray deformArray = slot.deform; FloatArray deformArray = slot.deform;
if (deformArray.size == 0) blend = setup; if (deformArray.size == 0) blend = setup;
@ -1662,7 +1660,6 @@ public class Animation {
return; return;
} }
float[] deform = deformArray.setSize(vertexCount); float[] deform = deformArray.setSize(vertexCount);
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions. // Unweighted vertex positions.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1684,7 +1681,6 @@ public class Animation {
float[] lastVertices = vertices[frames.length - 1]; float[] lastVertices = vertices[frames.length - 1];
if (alpha == 1) { if (alpha == 1) {
if (blend == add) { if (blend == add) {
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, no alpha. // Unweighted vertex positions, no alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1702,7 +1698,6 @@ public class Animation {
} else { } else {
switch (blend) { switch (blend) {
case setup: { case setup: {
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, with alpha. // Unweighted vertex positions, with alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1724,7 +1719,6 @@ public class Animation {
deform[i] += (lastVertices[i] - deform[i]) * alpha; deform[i] += (lastVertices[i] - deform[i]) * alpha;
break; break;
case add: case add:
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, no alpha. // Unweighted vertex positions, no alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1747,7 +1741,6 @@ public class Animation {
if (alpha == 1) { if (alpha == 1) {
if (blend == add) { if (blend == add) {
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, no alpha. // Unweighted vertex positions, no alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1772,7 +1765,6 @@ public class Animation {
} else { } else {
switch (blend) { switch (blend) {
case setup: { case setup: {
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, with alpha. // Unweighted vertex positions, with alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -1798,7 +1790,6 @@ public class Animation {
} }
break; break;
case add: case add:
VertexAttachment vertexAttachment = (VertexAttachment)slotAttachment;
if (vertexAttachment.getBones() == null) { if (vertexAttachment.getBones() == null) {
// Unweighted vertex positions, with alpha. // Unweighted vertex positions, with alpha.
float[] setupVertices = vertexAttachment.getVertices(); float[] setupVertices = vertexAttachment.getVertices();
@ -2307,7 +2298,7 @@ public class Animation {
} }
/** The base class for most {@link PhysicsConstraint} timelines. */ /** The base class for most {@link PhysicsConstraint} timelines. */
static public abstract class PhysicsConstraintTimeline extends CurveTimeline1 { static abstract public class PhysicsConstraintTimeline extends CurveTimeline1 {
final int constraintIndex; final int constraintIndex;
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */ /** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
@ -2616,8 +2607,8 @@ public class Animation {
if (!slot.bone.active) return; if (!slot.bone.active) return;
Attachment slotAttachment = slot.attachment; Attachment slotAttachment = slot.attachment;
if (slotAttachment != attachment) { if (slotAttachment != attachment) {
if (!(slotAttachment instanceof VertexAttachment) if (!(slotAttachment instanceof VertexAttachment vertexAttachment)
|| ((VertexAttachment)slotAttachment).getTimelineAttachment() != attachment) return; || vertexAttachment.getTimelineAttachment() != attachment) return;
} }
Sequence sequence = ((HasTextureRegion)slotAttachment).getSequence(); Sequence sequence = ((HasTextureRegion)slotAttachment).getSequence();
if (sequence == null) return; if (sequence == null) return;

View File

@ -116,7 +116,7 @@ public class AnimationState {
delta *= timeScale; delta *= timeScale;
Object[] tracks = this.tracks.items; Object[] tracks = this.tracks.items;
for (int i = 0, n = this.tracks.size; i < n; i++) { for (int i = 0, n = this.tracks.size; i < n; i++) {
TrackEntry current = (TrackEntry)tracks[i]; var current = (TrackEntry)tracks[i];
if (current == null) continue; if (current == null) continue;
current.animationLast = current.nextAnimationLast; current.animationLast = current.nextAnimationLast;
@ -208,7 +208,7 @@ public class AnimationState {
boolean applied = false; boolean applied = false;
Object[] tracks = this.tracks.items; Object[] tracks = this.tracks.items;
for (int i = 0, n = this.tracks.size; i < n; i++) { for (int i = 0, n = this.tracks.size; i < n; i++) {
TrackEntry current = (TrackEntry)tracks[i]; var current = (TrackEntry)tracks[i];
if (current == null || current.delay > 0) continue; if (current == null || current.delay > 0) continue;
applied = true; applied = true;
@ -236,8 +236,8 @@ public class AnimationState {
if (i == 0) attachments = true; if (i == 0) attachments = true;
for (int ii = 0; ii < timelineCount; ii++) { for (int ii = 0; ii < timelineCount; ii++) {
Object timeline = timelines[ii]; Object timeline = timelines[ii];
if (timeline instanceof AttachmentTimeline) if (timeline instanceof AttachmentTimeline attachmentTimeline)
applyAttachmentTimeline((AttachmentTimeline)timeline, skeleton, applyTime, blend, attachments); applyAttachmentTimeline(attachmentTimeline, skeleton, applyTime, blend, attachments);
else else
((Timeline)timeline).apply(skeleton, animationLast, applyTime, applyEvents, alpha, blend, MixDirection.in); ((Timeline)timeline).apply(skeleton, animationLast, applyTime, applyEvents, alpha, blend, MixDirection.in);
} }
@ -250,13 +250,13 @@ public class AnimationState {
float[] timelinesRotation = current.timelinesRotation.items; float[] timelinesRotation = current.timelinesRotation.items;
for (int ii = 0; ii < timelineCount; ii++) { for (int ii = 0; ii < timelineCount; ii++) {
Timeline timeline = (Timeline)timelines[ii]; var timeline = (Timeline)timelines[ii];
MixBlend timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup; MixBlend timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
if (!shortestRotation && timeline instanceof RotateTimeline) { if (!shortestRotation && timeline instanceof RotateTimeline rotateTimeline) {
applyRotateTimeline((RotateTimeline)timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, applyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, ii << 1,
ii << 1, firstFrame); firstFrame);
} else if (timeline instanceof AttachmentTimeline) } else if (timeline instanceof AttachmentTimeline attachmentTimeline)
applyAttachmentTimeline((AttachmentTimeline)timeline, skeleton, applyTime, blend, attachments); applyAttachmentTimeline(attachmentTimeline, skeleton, applyTime, blend, attachments);
else else
timeline.apply(skeleton, animationLast, applyTime, applyEvents, alpha, timelineBlend, MixDirection.in); timeline.apply(skeleton, animationLast, applyTime, applyEvents, alpha, timelineBlend, MixDirection.in);
} }
@ -273,7 +273,7 @@ public class AnimationState {
int setupState = unkeyedState + SETUP; int setupState = unkeyedState + SETUP;
Object[] slots = skeleton.slots.items; Object[] slots = skeleton.slots.items;
for (int i = 0, n = skeleton.slots.size; i < n; i++) { for (int i = 0, n = skeleton.slots.size; i < n; i++) {
Slot slot = (Slot)slots[i]; var slot = (Slot)slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
String attachmentName = slot.data.attachmentName; String attachmentName = slot.data.attachmentName;
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
@ -325,7 +325,7 @@ public class AnimationState {
from.totalAlpha = 0; from.totalAlpha = 0;
for (int i = 0; i < timelineCount; i++) { for (int i = 0; i < timelineCount; i++) {
Timeline timeline = (Timeline)timelines[i]; var timeline = (Timeline)timelines[i];
MixDirection direction = MixDirection.out; MixDirection direction = MixDirection.out;
MixBlend timelineBlend; MixBlend timelineBlend;
float alpha; float alpha;
@ -349,16 +349,16 @@ public class AnimationState {
break; break;
default: // HOLD_MIX default: // HOLD_MIX
timelineBlend = MixBlend.setup; timelineBlend = MixBlend.setup;
TrackEntry holdMix = (TrackEntry)timelineHoldMix[i]; var holdMix = (TrackEntry)timelineHoldMix[i];
alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration); alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);
break; break;
} }
from.totalAlpha += alpha; from.totalAlpha += alpha;
if (!shortestRotation && timeline instanceof RotateTimeline) { if (!shortestRotation && timeline instanceof RotateTimeline rotateTimeline) {
applyRotateTimeline((RotateTimeline)timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, applyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1,
firstFrame); firstFrame);
} else if (timeline instanceof AttachmentTimeline) } else if (timeline instanceof AttachmentTimeline attachmentTimeline)
applyAttachmentTimeline((AttachmentTimeline)timeline, skeleton, applyTime, timelineBlend, applyAttachmentTimeline(attachmentTimeline, skeleton, applyTime, timelineBlend,
attachments && alpha >= from.alphaAttachmentThreshold); attachments && alpha >= from.alphaAttachmentThreshold);
else { else {
if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup) if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)
@ -475,7 +475,7 @@ public class AnimationState {
Object[] events = this.events.items; Object[] events = this.events.items;
int i = 0, n = this.events.size; int i = 0, n = this.events.size;
for (; i < n; i++) { for (; i < n; i++) {
Event event = (Event)events[i]; var event = (Event)events[i];
if (event.time < trackLastWrapped) break; if (event.time < trackLastWrapped) break;
if (event.time > animationEnd) continue; // Discard events outside animation start/end. if (event.time > animationEnd) continue; // Discard events outside animation start/end.
queue.event(entry, event); queue.event(entry, event);
@ -496,7 +496,7 @@ public class AnimationState {
// Queue events after complete. // Queue events after complete.
for (; i < n; i++) { for (; i < n; i++) {
Event event = (Event)events[i]; var event = (Event)events[i];
if (event.time < animationStart) continue; // Discard events outside animation start/end. if (event.time < animationStart) continue; // Discard events outside animation start/end.
queue.event(entry, event); queue.event(entry, event);
} }
@ -694,7 +694,7 @@ public class AnimationState {
queue.drainDisabled = true; queue.drainDisabled = true;
Object[] tracks = this.tracks.items; Object[] tracks = this.tracks.items;
for (int i = 0, n = this.tracks.size; i < n; i++) { for (int i = 0, n = this.tracks.size; i < n; i++) {
TrackEntry current = (TrackEntry)tracks[i]; var current = (TrackEntry)tracks[i];
if (current != null) setEmptyAnimation(current.trackIndex, mixDuration); if (current != null) setEmptyAnimation(current.trackIndex, mixDuration);
} }
queue.drainDisabled = oldDrainDisabled; queue.drainDisabled = oldDrainDisabled;
@ -762,7 +762,7 @@ public class AnimationState {
int n = tracks.size; int n = tracks.size;
Object[] tracks = this.tracks.items; Object[] tracks = this.tracks.items;
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
TrackEntry entry = (TrackEntry)tracks[i]; var entry = (TrackEntry)tracks[i];
if (entry == null) continue; if (entry == null) continue;
while (entry.mixingFrom != null) // Move to last entry, then iterate in reverse. while (entry.mixingFrom != null) // Move to last entry, then iterate in reverse.
entry = entry.mixingFrom; entry = entry.mixingFrom;
@ -790,7 +790,7 @@ public class AnimationState {
outer: outer:
for (int i = 0; i < timelinesCount; i++) { for (int i = 0; i < timelinesCount; i++) {
Timeline timeline = (Timeline)timelines[i]; var timeline = (Timeline)timelines[i];
String[] ids = timeline.getPropertyIds(); String[] ids = timeline.getPropertyIds();
if (!propertyIds.addAll(ids)) if (!propertyIds.addAll(ids))
timelineMode[i] = SUBSEQUENT; timelineMode[i] = SUBSEQUENT;
@ -870,10 +870,10 @@ public class AnimationState {
} }
public String toString () { public String toString () {
StringBuilder buffer = new StringBuilder(64); var buffer = new StringBuilder(64);
Object[] tracks = this.tracks.items; Object[] tracks = this.tracks.items;
for (int i = 0, n = this.tracks.size; i < n; i++) { for (int i = 0, n = this.tracks.size; i < n; i++) {
TrackEntry entry = (TrackEntry)tracks[i]; var entry = (TrackEntry)tracks[i];
if (entry == null) continue; if (entry == null) continue;
if (buffer.length() > 0) buffer.append(", "); if (buffer.length() > 0) buffer.append(", ");
buffer.append(entry.toString()); buffer.append(entry.toString());
@ -1348,8 +1348,8 @@ public class AnimationState {
SnapshotArray<AnimationStateListener> listenersArray = AnimationState.this.listeners; SnapshotArray<AnimationStateListener> listenersArray = AnimationState.this.listeners;
for (int i = 0; i < this.objects.size; i += 2) { for (int i = 0; i < this.objects.size; i += 2) {
EventType type = (EventType)objects.get(i); var type = (EventType)objects.get(i);
TrackEntry entry = (TrackEntry)objects.get(i + 1); var entry = (TrackEntry)objects.get(i + 1);
int listenersCount = listenersArray.size; int listenersCount = listenersArray.size;
Object[] listeners = listenersArray.begin(); Object[] listeners = listenersArray.begin();
switch (type) { switch (type) {
@ -1380,7 +1380,7 @@ public class AnimationState {
((AnimationStateListener)listeners[ii]).complete(entry); ((AnimationStateListener)listeners[ii]).complete(entry);
break; break;
case event: case event:
Event event = (Event)objects.get(i++ + 2); var event = (Event)objects.get(i++ + 2);
if (entry.listener != null) entry.listener.event(entry, event); if (entry.listener != null) entry.listener.event(entry, event);
for (int ii = 0; ii < listenersCount; ii++) for (int ii = 0; ii < listenersCount; ii++)
((AnimationStateListener)listeners[ii]).event(entry, event); ((AnimationStateListener)listeners[ii]).event(entry, event);
@ -1448,7 +1448,7 @@ public class AnimationState {
public void event (TrackEntry entry, Event event); public void event (TrackEntry entry, Event event);
} }
static public abstract class AnimationStateAdapter implements AnimationStateListener { static abstract public class AnimationStateAdapter implements AnimationStateListener {
public void start (TrackEntry entry) { public void start (TrackEntry entry) {
} }

View File

@ -67,7 +67,7 @@ public class AnimationStateData {
public void setMix (Animation from, Animation to, float duration) { public void setMix (Animation from, Animation to, float duration) {
if (from == null) throw new IllegalArgumentException("from cannot be null."); if (from == null) throw new IllegalArgumentException("from cannot be null.");
if (to == null) throw new IllegalArgumentException("to cannot be null."); if (to == null) throw new IllegalArgumentException("to cannot be null.");
Key key = new Key(); var key = new Key();
key.a1 = from; key.a1 = from;
key.a2 = to; key.a2 = to;
animationToMixTime.put(key, duration); animationToMixTime.put(key, duration);
@ -102,7 +102,7 @@ public class AnimationStateData {
public boolean equals (Object obj) { public boolean equals (Object obj) {
if (this == obj) return true; if (this == obj) return true;
if (obj == null) return false; if (obj == null) return false;
Key other = (Key)obj; var other = (Key)obj;
if (a1 == null) { if (a1 == null) {
if (other.a1 != null) return false; if (other.a1 != null) return false;
} else if (!a1.equals(other.a1)) return false; } else if (!a1.equals(other.a1)) return false;

View File

@ -130,7 +130,7 @@ public class Bone implements Updatable {
worldY = pc * x + pd * y + parent.worldY; worldY = pc * x + pd * y + parent.worldY;
switch (inherit) { switch (inherit) {
case normal: { case normal -> {
float rx = (rotation + shearX) * degRad; float rx = (rotation + shearX) * degRad;
float ry = (rotation + 90 + shearY) * degRad; float ry = (rotation + 90 + shearY) * degRad;
float la = cos(rx) * scaleX; float la = cos(rx) * scaleX;
@ -143,16 +143,15 @@ public class Bone implements Updatable {
d = pc * lb + pd * ld; d = pc * lb + pd * ld;
return; return;
} }
case onlyTranslation: { case onlyTranslation -> {
float rx = (rotation + shearX) * degRad; float rx = (rotation + shearX) * degRad;
float ry = (rotation + 90 + shearY) * degRad; float ry = (rotation + 90 + shearY) * degRad;
a = cos(rx) * scaleX; a = cos(rx) * scaleX;
b = cos(ry) * scaleY; b = cos(ry) * scaleY;
c = sin(rx) * scaleX; c = sin(rx) * scaleX;
d = sin(ry) * scaleY; d = sin(ry) * scaleY;
break;
} }
case noRotationOrReflection: { case noRotationOrReflection -> {
float sx = 1 / skeleton.scaleX, sy = 1 / skeleton.scaleY; float sx = 1 / skeleton.scaleX, sy = 1 / skeleton.scaleY;
pa *= sx; pa *= sx;
pc *= sy; pc *= sy;
@ -177,10 +176,8 @@ public class Bone implements Updatable {
b = pa * lb - pb * ld; b = pa * lb - pb * ld;
c = pc * la + pd * lc; c = pc * la + pd * lc;
d = pc * lb + pd * ld; d = pc * lb + pd * ld;
break;
} }
case noScale: case noScale, noScaleOrReflection -> {
case noScaleOrReflection:
rotation *= degRad; rotation *= degRad;
float cos = cos(rotation), sin = sin(rotation); float cos = cos(rotation), sin = sin(rotation);
float za = (pa * cos + pb * sin) / skeleton.scaleX; float za = (pa * cos + pb * sin) / skeleton.scaleX;
@ -205,6 +202,7 @@ public class Bone implements Updatable {
c = zc * la + zd * lc; c = zc * la + zd * lc;
d = zc * lb + zd * ld; d = zc * lb + zd * ld;
} }
}
a *= skeleton.scaleX; a *= skeleton.scaleX;
b *= skeleton.scaleX; b *= skeleton.scaleX;
c *= skeleton.scaleY; c *= skeleton.scaleY;
@ -440,17 +438,15 @@ public class Bone implements Updatable {
rd = d; rd = d;
} else { } else {
switch (inherit) { switch (inherit) {
case noRotationOrReflection: { case noRotationOrReflection -> {
float s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); float s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);
pb = -pc * skeleton.scaleX * s / skeleton.scaleY; pb = -pc * skeleton.scaleX * s / skeleton.scaleY;
pd = pa * skeleton.scaleY * s / skeleton.scaleX; pd = pa * skeleton.scaleY * s / skeleton.scaleX;
pid = 1 / (pa * pd - pb * pc); pid = 1 / (pa * pd - pb * pc);
ia = pd * pid; ia = pd * pid;
ib = pb * pid; ib = pb * pid;
break;
} }
case noScale: case noScale, noScaleOrReflection -> {
case noScaleOrReflection:
float r = rotation * degRad, cos = cos(r), sin = sin(r); float r = rotation * degRad, cos = cos(r), sin = sin(r);
pa = (pa * cos + pb * sin) / skeleton.scaleX; pa = (pa * cos + pb * sin) / skeleton.scaleX;
pc = (pc * cos + pd * sin) / skeleton.scaleY; pc = (pc * cos + pd * sin) / skeleton.scaleY;
@ -469,6 +465,7 @@ public class Bone implements Updatable {
ic = pc * pid; ic = pc * pid;
id = pa * pid; id = pa * pid;
} }
}
ra = ia * a - ib * c; ra = ia * a - ib * c;
rb = ia * b - ib * d; rb = ia * b - ib * d;
rc = id * c - ic * a; rc = id * c - ic * a;

View File

@ -94,12 +94,9 @@ public class IkConstraint implements Updatable {
Bone target = this.target; Bone target = this.target;
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
switch (this.bones.size) { switch (this.bones.size) {
case 1: case 1 -> apply((Bone)bones[0], target.worldX, target.worldY, compress, stretch, data.uniform, mix);
apply((Bone)bones[0], target.worldX, target.worldY, compress, stretch, data.uniform, mix); case 2 -> //
break;
case 2:
apply((Bone)bones[0], (Bone)bones[1], target.worldX, target.worldY, bendDirection, stretch, data.uniform, softness, mix); apply((Bone)bones[0], (Bone)bones[1], target.worldX, target.worldY, bendDirection, stretch, data.uniform, softness, mix);
break;
} }
} }
@ -222,11 +219,11 @@ public class IkConstraint implements Updatable {
float sx = bone.ascaleX, sy = bone.ascaleY; float sx = bone.ascaleX, sy = bone.ascaleY;
if (compress || stretch) { if (compress || stretch) {
switch (bone.inherit) { switch (bone.inherit) {
case noScale: case noScale, noScaleOrReflection -> {
case noScaleOrReflection:
tx = targetX - bone.worldX; tx = targetX - bone.worldX;
ty = targetY - bone.worldY; ty = targetY - bone.worldY;
} }
}
float b = bone.data.length * sx; float b = bone.data.length * sx;
if (b > 0.0001f) { if (b > 0.0001f) {
float dd = tx * tx + ty * ty; float dd = tx * tx + ty * ty;

View File

@ -40,7 +40,6 @@ import com.esotericsoftware.spine.PathConstraintData.PositionMode;
import com.esotericsoftware.spine.PathConstraintData.RotateMode; import com.esotericsoftware.spine.PathConstraintData.RotateMode;
import com.esotericsoftware.spine.PathConstraintData.SpacingMode; import com.esotericsoftware.spine.PathConstraintData.SpacingMode;
import com.esotericsoftware.spine.Skeleton.Physics; import com.esotericsoftware.spine.Skeleton.Physics;
import com.esotericsoftware.spine.attachments.Attachment;
import com.esotericsoftware.spine.attachments.PathAttachment; import com.esotericsoftware.spine.attachments.PathAttachment;
/** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the /** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the
@ -102,8 +101,7 @@ public class PathConstraint implements Updatable {
/** Applies the constraint to the constrained bones. */ /** Applies the constraint to the constrained bones. */
public void update (Physics physics) { public void update (Physics physics) {
Attachment attachment = target.attachment; if (!(target.attachment instanceof PathAttachment pathAttachment)) return;
if (!(attachment instanceof PathAttachment)) return;
float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY; float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;
if (mixRotate == 0 && mixX == 0 && mixY == 0) return; if (mixRotate == 0 && mixX == 0 && mixY == 0) return;
@ -116,21 +114,21 @@ public class PathConstraint implements Updatable {
float spacing = this.spacing; float spacing = this.spacing;
switch (data.spacingMode) { switch (data.spacingMode) {
case percent: case percent -> {
if (scale) { if (scale) {
for (int i = 0, n = spacesCount - 1; i < n; i++) { for (int i = 0, n = spacesCount - 1; i < n; i++) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
float setupLength = bone.data.length; float setupLength = bone.data.length;
float x = setupLength * bone.a, y = setupLength * bone.c; float x = setupLength * bone.a, y = setupLength * bone.c;
lengths[i] = (float)Math.sqrt(x * x + y * y); lengths[i] = (float)Math.sqrt(x * x + y * y);
} }
} }
Arrays.fill(spaces, 1, spacesCount, spacing); Arrays.fill(spaces, 1, spacesCount, spacing);
break; }
case proportional: case proportional -> {
float sum = 0; float sum = 0;
for (int i = 0, n = spacesCount - 1; i < n;) { for (int i = 0, n = spacesCount - 1; i < n;) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
float setupLength = bone.data.length; float setupLength = bone.data.length;
if (setupLength < epsilon) { if (setupLength < epsilon) {
if (scale) lengths[i] = 0; if (scale) lengths[i] = 0;
@ -148,11 +146,11 @@ public class PathConstraint implements Updatable {
for (int i = 1; i < spacesCount; i++) for (int i = 1; i < spacesCount; i++)
spaces[i] *= sum; spaces[i] *= sum;
} }
break; }
default: default -> {
boolean lengthSpacing = data.spacingMode == SpacingMode.length; boolean lengthSpacing = data.spacingMode == SpacingMode.length;
for (int i = 0, n = spacesCount - 1; i < n;) { for (int i = 0, n = spacesCount - 1; i < n;) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
float setupLength = bone.data.length; float setupLength = bone.data.length;
if (setupLength < epsilon) { if (setupLength < epsilon) {
if (scale) lengths[i] = 0; if (scale) lengths[i] = 0;
@ -165,8 +163,9 @@ public class PathConstraint implements Updatable {
} }
} }
} }
}
float[] positions = computeWorldPositions((PathAttachment)attachment, spacesCount, tangents); float[] positions = computeWorldPositions(pathAttachment, spacesCount, tangents);
float boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; float boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;
boolean tip; boolean tip;
if (offsetRotation == 0) if (offsetRotation == 0)
@ -177,7 +176,7 @@ public class PathConstraint implements Updatable {
offsetRotation *= p.a * p.d - p.b * p.c > 0 ? degRad : -degRad; offsetRotation *= p.a * p.d - p.b * p.c > 0 ? degRad : -degRad;
} }
for (int i = 0, p = 3; i < boneCount; i++, p += 3) { for (int i = 0, p = 3; i < boneCount; i++, p += 3) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
bone.worldX += (boneX - bone.worldX) * mixX; bone.worldX += (boneX - bone.worldX) * mixX;
bone.worldY += (boneY - bone.worldY) * mixY; bone.worldY += (boneY - bone.worldY) * mixY;
float x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY; float x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;
@ -238,17 +237,11 @@ public class PathConstraint implements Updatable {
if (data.positionMode == PositionMode.percent) position *= pathLength; if (data.positionMode == PositionMode.percent) position *= pathLength;
float multiplier; float multiplier = switch (data.spacingMode) {
switch (data.spacingMode) { case percent -> pathLength;
case percent: case proportional -> pathLength / spacesCount;
multiplier = pathLength; default -> 1;
break; };
case proportional:
multiplier = pathLength / spacesCount;
break;
default:
multiplier = 1;
}
world = this.world.setSize(8); world = this.world.setSize(8);
for (int i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) { for (int i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {
@ -356,17 +349,11 @@ public class PathConstraint implements Updatable {
if (data.positionMode == PositionMode.percent) position *= pathLength; if (data.positionMode == PositionMode.percent) position *= pathLength;
float multiplier; float multiplier = switch (data.spacingMode) {
switch (data.spacingMode) { case percent -> pathLength;
case percent: case proportional -> pathLength / spacesCount;
multiplier = pathLength; default -> 1;
break; };
case proportional:
multiplier = pathLength / spacesCount;
break;
default:
multiplier = 1;
}
float[] segments = this.segments; float[] segments = this.segments;
float curveLength = 0; float curveLength = 0;

View File

@ -38,7 +38,11 @@ import com.badlogic.gdx.utils.FloatArray;
import com.badlogic.gdx.utils.Null; import com.badlogic.gdx.utils.Null;
import com.esotericsoftware.spine.Skin.SkinEntry; import com.esotericsoftware.spine.Skin.SkinEntry;
import com.esotericsoftware.spine.attachments.*; import com.esotericsoftware.spine.attachments.Attachment;
import com.esotericsoftware.spine.attachments.ClippingAttachment;
import com.esotericsoftware.spine.attachments.MeshAttachment;
import com.esotericsoftware.spine.attachments.PathAttachment;
import com.esotericsoftware.spine.attachments.RegionAttachment;
import com.esotericsoftware.spine.utils.SkeletonClipping; import com.esotericsoftware.spine.utils.SkeletonClipping;
/** Stores the current pose for a skeleton. /** Stores the current pose for a skeleton.
@ -71,7 +75,7 @@ public class Skeleton {
if (boneData.parent == null) if (boneData.parent == null)
bone = new Bone(boneData, this, null); bone = new Bone(boneData, this, null);
else { else {
Bone parent = (Bone)bones[boneData.parent.index]; var parent = (Bone)bones[boneData.parent.index];
bone = new Bone(boneData, this, parent); bone = new Bone(boneData, this, parent);
parent.children.add(bone); parent.children.add(bone);
} }
@ -81,8 +85,8 @@ public class Skeleton {
slots = new Array(data.slots.size); slots = new Array(data.slots.size);
drawOrder = new Array(data.slots.size); drawOrder = new Array(data.slots.size);
for (SlotData slotData : data.slots) { for (SlotData slotData : data.slots) {
Bone bone = (Bone)bones[slotData.boneData.index]; var bone = (Bone)bones[slotData.boneData.index];
Slot slot = new Slot(slotData, bone); var slot = new Slot(slotData, bone);
slots.add(slot); slots.add(slot);
drawOrder.add(slot); drawOrder.add(slot);
} }
@ -172,14 +176,14 @@ public class Skeleton {
int boneCount = bones.size; int boneCount = bones.size;
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
for (int i = 0; i < boneCount; i++) { for (int i = 0; i < boneCount; i++) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
bone.sorted = bone.data.skinRequired; bone.sorted = bone.data.skinRequired;
bone.active = !bone.sorted; bone.active = !bone.sorted;
} }
if (skin != null) { if (skin != null) {
Object[] skinBones = skin.bones.items; Object[] skinBones = skin.bones.items;
for (int i = 0, n = skin.bones.size; i < n; i++) { for (int i = 0, n = skin.bones.size; i < n; i++) {
Bone bone = (Bone)bones[((BoneData)skinBones[i]).index]; var bone = (Bone)bones[((BoneData)skinBones[i]).index];
do { do {
bone.sorted = false; bone.sorted = false;
bone.active = true; bone.active = true;
@ -196,28 +200,28 @@ public class Skeleton {
outer: outer:
for (int i = 0; i < constraintCount; i++) { for (int i = 0; i < constraintCount; i++) {
for (int ii = 0; ii < ikCount; ii++) { for (int ii = 0; ii < ikCount; ii++) {
IkConstraint constraint = (IkConstraint)ikConstraints[ii]; var constraint = (IkConstraint)ikConstraints[ii];
if (constraint.data.order == i) { if (constraint.data.order == i) {
sortIkConstraint(constraint); sortIkConstraint(constraint);
continue outer; continue outer;
} }
} }
for (int ii = 0; ii < transformCount; ii++) { for (int ii = 0; ii < transformCount; ii++) {
TransformConstraint constraint = (TransformConstraint)transformConstraints[ii]; var constraint = (TransformConstraint)transformConstraints[ii];
if (constraint.data.order == i) { if (constraint.data.order == i) {
sortTransformConstraint(constraint); sortTransformConstraint(constraint);
continue outer; continue outer;
} }
} }
for (int ii = 0; ii < pathCount; ii++) { for (int ii = 0; ii < pathCount; ii++) {
PathConstraint constraint = (PathConstraint)pathConstraints[ii]; var constraint = (PathConstraint)pathConstraints[ii];
if (constraint.data.order == i) { if (constraint.data.order == i) {
sortPathConstraint(constraint); sortPathConstraint(constraint);
continue outer; continue outer;
} }
} }
for (int ii = 0; ii < physicsCount; ii++) { for (int ii = 0; ii < physicsCount; ii++) {
PhysicsConstraint constraint = (PhysicsConstraint)physicsConstraints[ii]; var constraint = (PhysicsConstraint)physicsConstraints[ii];
if (constraint.data.order == i) { if (constraint.data.order == i) {
sortPhysicsConstraint(constraint); sortPhysicsConstraint(constraint);
continue outer; continue outer;
@ -265,7 +269,7 @@ public class Skeleton {
int boneCount = constraint.bones.size; int boneCount = constraint.bones.size;
if (constraint.data.local) { if (constraint.data.local) {
for (int i = 0; i < boneCount; i++) { for (int i = 0; i < boneCount; i++) {
Bone child = (Bone)constrained[i]; var child = (Bone)constrained[i];
sortBone(child.parent); sortBone(child.parent);
sortBone(child); sortBone(child);
} }
@ -294,8 +298,7 @@ public class Skeleton {
if (data.defaultSkin != null && data.defaultSkin != skin) if (data.defaultSkin != null && data.defaultSkin != skin)
sortPathConstraintAttachment(data.defaultSkin, slotIndex, slotBone); sortPathConstraintAttachment(data.defaultSkin, slotIndex, slotBone);
Attachment attachment = slot.attachment; sortPathConstraintAttachment(slot.attachment, slotBone);
if (attachment instanceof PathAttachment) sortPathConstraintAttachment(attachment, slotBone);
Object[] constrained = constraint.bones.items; Object[] constrained = constraint.bones.items;
int boneCount = constraint.bones.size; int boneCount = constraint.bones.size;
@ -313,14 +316,14 @@ public class Skeleton {
private void sortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) { private void sortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) {
Object[] entries = skin.attachments.orderedItems().items; Object[] entries = skin.attachments.orderedItems().items;
for (int i = 0, n = skin.attachments.size; i < n; i++) { for (int i = 0, n = skin.attachments.size; i < n; i++) {
SkinEntry entry = (SkinEntry)entries[i]; var entry = (SkinEntry)entries[i];
if (entry.slotIndex == slotIndex) sortPathConstraintAttachment(entry.attachment, slotBone); if (entry.slotIndex == slotIndex) sortPathConstraintAttachment(entry.attachment, slotBone);
} }
} }
private void sortPathConstraintAttachment (Attachment attachment, Bone slotBone) { private void sortPathConstraintAttachment (Attachment attachment, Bone slotBone) {
if (!(attachment instanceof PathAttachment)) return; if (!(attachment instanceof PathAttachment pathAttachment)) return;
int[] pathBones = ((PathAttachment)attachment).getBones(); int[] pathBones = pathAttachment.getBones();
if (pathBones == null) if (pathBones == null)
sortBone(slotBone); sortBone(slotBone);
else { else {
@ -359,7 +362,7 @@ public class Skeleton {
private void sortReset (Array<Bone> bones) { private void sortReset (Array<Bone> bones) {
Object[] items = bones.items; Object[] items = bones.items;
for (int i = 0, n = bones.size; i < n; i++) { for (int i = 0, n = bones.size; i < n; i++) {
Bone bone = (Bone)items[i]; var bone = (Bone)items[i];
if (!bone.active) continue; if (!bone.active) continue;
if (bone.sorted) sortReset(bone.children); if (bone.sorted) sortReset(bone.children);
bone.sorted = false; bone.sorted = false;
@ -373,7 +376,7 @@ public class Skeleton {
public void updateWorldTransform (Physics physics) { public void updateWorldTransform (Physics physics) {
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
for (int i = 0, n = this.bones.size; i < n; i++) { for (int i = 0, n = this.bones.size; i < n; i++) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
bone.ax = bone.x; bone.ax = bone.x;
bone.ay = bone.y; bone.ay = bone.y;
bone.arotation = bone.rotation; bone.arotation = bone.rotation;
@ -398,7 +401,7 @@ public class Skeleton {
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
for (int i = 1, n = this.bones.size; i < n; i++) { // Skip root bone. for (int i = 1, n = this.bones.size; i < n; i++) { // Skip root bone.
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
bone.ax = bone.x; bone.ax = bone.x;
bone.ay = bone.y; bone.ay = bone.y;
bone.arotation = bone.rotation; bone.arotation = bone.rotation;
@ -428,7 +431,7 @@ public class Skeleton {
// Update everything except root bone. // Update everything except root bone.
Object[] updateCache = this.updateCache.items; Object[] updateCache = this.updateCache.items;
for (int i = 0, n = this.updateCache.size; i < n; i++) { for (int i = 0, n = this.updateCache.size; i < n; i++) {
Updatable updatable = (Updatable)updateCache[i]; var updatable = (Updatable)updateCache[i];
if (updatable != rootBone) updatable.update(physics); if (updatable != rootBone) updatable.update(physics);
} }
} }
@ -497,7 +500,7 @@ public class Skeleton {
if (boneName == null) throw new IllegalArgumentException("boneName cannot be null."); if (boneName == null) throw new IllegalArgumentException("boneName cannot be null.");
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
for (int i = 0, n = this.bones.size; i < n; i++) { for (int i = 0, n = this.bones.size; i < n; i++) {
Bone bone = (Bone)bones[i]; var bone = (Bone)bones[i];
if (bone.data.name.equals(boneName)) return bone; if (bone.data.name.equals(boneName)) return bone;
} }
return null; return null;
@ -514,7 +517,7 @@ public class Skeleton {
if (slotName == null) throw new IllegalArgumentException("slotName cannot be null."); if (slotName == null) throw new IllegalArgumentException("slotName cannot be null.");
Object[] slots = this.slots.items; Object[] slots = this.slots.items;
for (int i = 0, n = this.slots.size; i < n; i++) { for (int i = 0, n = this.slots.size; i < n; i++) {
Slot slot = (Slot)slots[i]; var slot = (Slot)slots[i];
if (slot.data.name.equals(slotName)) return slot; if (slot.data.name.equals(slotName)) return slot;
} }
return null; return null;
@ -562,7 +565,7 @@ public class Skeleton {
else { else {
Object[] slots = this.slots.items; Object[] slots = this.slots.items;
for (int i = 0, n = this.slots.size; i < n; i++) { for (int i = 0, n = this.slots.size; i < n; i++) {
Slot slot = (Slot)slots[i]; var slot = (Slot)slots[i];
String name = slot.data.attachmentName; String name = slot.data.attachmentName;
if (name != null) { if (name != null) {
Attachment attachment = newSkin.getAttachment(i, name); Attachment attachment = newSkin.getAttachment(i, name);
@ -626,7 +629,7 @@ public class Skeleton {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] ikConstraints = this.ikConstraints.items; Object[] ikConstraints = this.ikConstraints.items;
for (int i = 0, n = this.ikConstraints.size; i < n; i++) { for (int i = 0, n = this.ikConstraints.size; i < n; i++) {
IkConstraint ikConstraint = (IkConstraint)ikConstraints[i]; var ikConstraint = (IkConstraint)ikConstraints[i];
if (ikConstraint.data.name.equals(constraintName)) return ikConstraint; if (ikConstraint.data.name.equals(constraintName)) return ikConstraint;
} }
return null; return null;
@ -643,7 +646,7 @@ public class Skeleton {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] transformConstraints = this.transformConstraints.items; Object[] transformConstraints = this.transformConstraints.items;
for (int i = 0, n = this.transformConstraints.size; i < n; i++) { for (int i = 0, n = this.transformConstraints.size; i < n; i++) {
TransformConstraint constraint = (TransformConstraint)transformConstraints[i]; var constraint = (TransformConstraint)transformConstraints[i];
if (constraint.data.name.equals(constraintName)) return constraint; if (constraint.data.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -660,7 +663,7 @@ public class Skeleton {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] pathConstraints = this.pathConstraints.items; Object[] pathConstraints = this.pathConstraints.items;
for (int i = 0, n = this.pathConstraints.size; i < n; i++) { for (int i = 0, n = this.pathConstraints.size; i < n; i++) {
PathConstraint constraint = (PathConstraint)pathConstraints[i]; var constraint = (PathConstraint)pathConstraints[i];
if (constraint.data.name.equals(constraintName)) return constraint; if (constraint.data.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -677,7 +680,7 @@ public class Skeleton {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] physicsConstraints = this.physicsConstraints.items; Object[] physicsConstraints = this.physicsConstraints.items;
for (int i = 0, n = this.physicsConstraints.size; i < n; i++) { for (int i = 0, n = this.physicsConstraints.size; i < n; i++) {
PhysicsConstraint constraint = (PhysicsConstraint)physicsConstraints[i]; var constraint = (PhysicsConstraint)physicsConstraints[i];
if (constraint.data.name.equals(constraintName)) return constraint; if (constraint.data.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -704,26 +707,23 @@ public class Skeleton {
Object[] drawOrder = this.drawOrder.items; Object[] drawOrder = this.drawOrder.items;
float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE; float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE;
for (int i = 0, n = this.drawOrder.size; i < n; i++) { for (int i = 0, n = this.drawOrder.size; i < n; i++) {
Slot slot = (Slot)drawOrder[i]; var slot = (Slot)drawOrder[i];
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
int verticesLength = 0; int verticesLength = 0;
float[] vertices = null; float[] vertices = null;
short[] triangles = null; short[] triangles = null;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) { if (attachment instanceof RegionAttachment region) {
RegionAttachment region = (RegionAttachment)attachment;
verticesLength = 8; verticesLength = 8;
vertices = temp.setSize(8); vertices = temp.setSize(8);
region.computeWorldVertices(slot, vertices, 0, 2); region.computeWorldVertices(slot, vertices, 0, 2);
triangles = quadTriangles; triangles = quadTriangles;
} else if (attachment instanceof MeshAttachment) { } else if (attachment instanceof MeshAttachment mesh) {
MeshAttachment mesh = (MeshAttachment)attachment;
verticesLength = mesh.getWorldVerticesLength(); verticesLength = mesh.getWorldVerticesLength();
vertices = temp.setSize(verticesLength); vertices = temp.setSize(verticesLength);
mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2); mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);
triangles = mesh.getTriangles(); triangles = mesh.getTriangles();
} else if (attachment instanceof ClippingAttachment && clipper != null) { } else if (attachment instanceof ClippingAttachment clip && clipper != null) {
ClippingAttachment clip = (ClippingAttachment)attachment;
clipper.clipStart(slot, clip); clipper.clipStart(slot, clip);
continue; continue;
} }

View File

@ -165,8 +165,8 @@ public class SkeletonBinary extends SkeletonLoader {
float scale = this.scale; float scale = this.scale;
SkeletonInput input = new SkeletonInput(dataInput); var input = new SkeletonInput(dataInput);
SkeletonData skeletonData = new SkeletonData(); var skeletonData = new SkeletonData();
try { try {
long hash = input.readLong(); long hash = input.readLong();
skeletonData.hash = hash == 0 ? null : Long.toString(hash); skeletonData.hash = hash == 0 ? null : Long.toString(hash);
@ -202,7 +202,7 @@ public class SkeletonBinary extends SkeletonLoader {
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
String name = input.readString(); String name = input.readString();
BoneData parent = i == 0 ? null : (BoneData)bones[input.readInt(true)]; BoneData parent = i == 0 ? null : (BoneData)bones[input.readInt(true)];
BoneData data = new BoneData(i, name, parent); var data = new BoneData(i, name, parent);
data.rotation = input.readFloat(); data.rotation = input.readFloat();
data.x = input.readFloat() * scale; data.x = input.readFloat() * scale;
data.y = input.readFloat() * scale; data.y = input.readFloat() * scale;
@ -225,8 +225,8 @@ public class SkeletonBinary extends SkeletonLoader {
Object[] slots = skeletonData.slots.setSize(n = input.readInt(true)); Object[] slots = skeletonData.slots.setSize(n = input.readInt(true));
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
String slotName = input.readString(); String slotName = input.readString();
BoneData boneData = (BoneData)bones[input.readInt(true)]; var boneData = (BoneData)bones[input.readInt(true)];
SlotData data = new SlotData(i, slotName, boneData); var data = new SlotData(i, slotName, boneData);
Color.rgba8888ToColor(data.color, input.readInt()); Color.rgba8888ToColor(data.color, input.readInt());
int darkColor = input.readInt(); int darkColor = input.readInt();
@ -241,7 +241,7 @@ public class SkeletonBinary extends SkeletonLoader {
// IK constraints. // IK constraints.
o = skeletonData.ikConstraints.setSize(n = input.readInt(true)); o = skeletonData.ikConstraints.setSize(n = input.readInt(true));
for (int i = 0, nn; i < n; i++) { for (int i = 0, nn; i < n; i++) {
IkConstraintData data = new IkConstraintData(input.readString()); var data = new IkConstraintData(input.readString());
data.order = input.readInt(true); data.order = input.readInt(true);
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true)); Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
for (int ii = 0; ii < nn; ii++) for (int ii = 0; ii < nn; ii++)
@ -261,7 +261,7 @@ public class SkeletonBinary extends SkeletonLoader {
// Transform constraints. // Transform constraints.
o = skeletonData.transformConstraints.setSize(n = input.readInt(true)); o = skeletonData.transformConstraints.setSize(n = input.readInt(true));
for (int i = 0, nn; i < n; i++) { for (int i = 0, nn; i < n; i++) {
TransformConstraintData data = new TransformConstraintData(input.readString()); var data = new TransformConstraintData(input.readString());
data.order = input.readInt(true); data.order = input.readInt(true);
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true)); Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
for (int ii = 0; ii < nn; ii++) for (int ii = 0; ii < nn; ii++)
@ -290,7 +290,7 @@ public class SkeletonBinary extends SkeletonLoader {
// Path constraints. // Path constraints.
o = skeletonData.pathConstraints.setSize(n = input.readInt(true)); o = skeletonData.pathConstraints.setSize(n = input.readInt(true));
for (int i = 0, nn; i < n; i++) { for (int i = 0, nn; i < n; i++) {
PathConstraintData data = new PathConstraintData(input.readString()); var data = new PathConstraintData(input.readString());
data.order = input.readInt(true); data.order = input.readInt(true);
data.skinRequired = input.readBoolean(); data.skinRequired = input.readBoolean();
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true)); Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
@ -315,7 +315,7 @@ public class SkeletonBinary extends SkeletonLoader {
// Physics constraints. // Physics constraints.
o = skeletonData.physicsConstraints.setSize(n = input.readInt(true)); o = skeletonData.physicsConstraints.setSize(n = input.readInt(true));
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
PhysicsConstraintData data = new PhysicsConstraintData(input.readString()); var data = new PhysicsConstraintData(input.readString());
data.order = input.readInt(true); data.order = input.readInt(true);
data.bone = (BoneData)bones[input.readInt(true)]; data.bone = (BoneData)bones[input.readInt(true)];
int flags = input.read(); int flags = input.read();
@ -364,7 +364,7 @@ public class SkeletonBinary extends SkeletonLoader {
n = linkedMeshes.size; n = linkedMeshes.size;
Object[] items = linkedMeshes.items; Object[] items = linkedMeshes.items;
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
LinkedMesh linkedMesh = (LinkedMesh)items[i]; var linkedMesh = (LinkedMesh)items[i];
Skin skin = skeletonData.skins.get(linkedMesh.skinIndex); Skin skin = skeletonData.skins.get(linkedMesh.skinIndex);
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent); if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
@ -377,7 +377,7 @@ public class SkeletonBinary extends SkeletonLoader {
// Events. // Events.
o = skeletonData.events.setSize(n = input.readInt(true)); o = skeletonData.events.setSize(n = input.readInt(true));
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
EventData data = new EventData(input.readString()); var data = new EventData(input.readString());
data.intValue = input.readInt(false); data.intValue = input.readInt(false);
data.floatValue = input.readFloat(); data.floatValue = input.readFloat();
data.stringValue = input.readString(); data.stringValue = input.readString();
@ -563,7 +563,7 @@ public class SkeletonBinary extends SkeletonLoader {
boolean closed = (flags & 16) != 0; boolean closed = (flags & 16) != 0;
boolean constantSpeed = (flags & 32) != 0; boolean constantSpeed = (flags & 32) != 0;
Vertices vertices = readVertices(input, (flags & 64) != 0); Vertices vertices = readVertices(input, (flags & 64) != 0);
float[] lengths = new float[vertices.length / 6]; var lengths = new float[vertices.length / 6];
for (int i = 0, n = lengths.length; i < n; i++) for (int i = 0, n = lengths.length; i < n; i++)
lengths[i] = input.readFloat() * scale; lengths[i] = input.readFloat() * scale;
int color = nonessential ? input.readInt() : 0; int color = nonessential ? input.readInt() : 0;
@ -611,7 +611,7 @@ public class SkeletonBinary extends SkeletonLoader {
} }
private Sequence readSequence (SkeletonInput input) throws IOException { private Sequence readSequence (SkeletonInput input) throws IOException {
Sequence sequence = new Sequence(input.readInt(true)); var sequence = new Sequence(input.readInt(true));
sequence.setStart(input.readInt(true)); sequence.setStart(input.readInt(true));
sequence.setDigits(input.readInt(true)); sequence.setDigits(input.readInt(true));
sequence.setSetupIndex(input.readInt(true)); sequence.setSetupIndex(input.readInt(true));
@ -621,14 +621,14 @@ public class SkeletonBinary extends SkeletonLoader {
private Vertices readVertices (SkeletonInput input, boolean weighted) throws IOException { private Vertices readVertices (SkeletonInput input, boolean weighted) throws IOException {
float scale = this.scale; float scale = this.scale;
int vertexCount = input.readInt(true); int vertexCount = input.readInt(true);
Vertices vertices = new Vertices(); var vertices = new Vertices();
vertices.length = vertexCount << 1; vertices.length = vertexCount << 1;
if (!weighted) { if (!weighted) {
vertices.vertices = readFloatArray(input, vertices.length, scale); vertices.vertices = readFloatArray(input, vertices.length, scale);
return vertices; return vertices;
} }
FloatArray weights = new FloatArray(vertices.length * 3 * 3); var weights = new FloatArray(vertices.length * 3 * 3);
IntArray bonesArray = new IntArray(vertices.length * 3); var bonesArray = new IntArray(vertices.length * 3);
for (int i = 0; i < vertexCount; i++) { for (int i = 0; i < vertexCount; i++) {
int boneCount = input.readInt(true); int boneCount = input.readInt(true);
bonesArray.add(boneCount); bonesArray.add(boneCount);
@ -645,7 +645,7 @@ public class SkeletonBinary extends SkeletonLoader {
} }
private float[] readFloatArray (SkeletonInput input, int n, float scale) throws IOException { private float[] readFloatArray (SkeletonInput input, int n, float scale) throws IOException {
float[] array = new float[n]; var array = new float[n];
if (scale == 1) { if (scale == 1) {
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
array[i] = input.readFloat(); array[i] = input.readFloat();
@ -657,14 +657,14 @@ public class SkeletonBinary extends SkeletonLoader {
} }
private short[] readShortArray (SkeletonInput input, int n) throws IOException { private short[] readShortArray (SkeletonInput input, int n) throws IOException {
short[] array = new short[n]; var array = new short[n];
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
array[i] = (short)input.readInt(true); array[i] = (short)input.readInt(true);
return array; return array;
} }
private Animation readAnimation (SkeletonInput input, String name, SkeletonData skeletonData) throws IOException { private Animation readAnimation (SkeletonInput input, String name, SkeletonData skeletonData) throws IOException {
Array<Timeline> timelines = new Array(input.readInt(true)); var timelines = new Array<Timeline>(input.readInt(true));
float scale = this.scale; float scale = this.scale;
// Slot timelines. // Slot timelines.
@ -673,15 +673,14 @@ public class SkeletonBinary extends SkeletonLoader {
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
int timelineType = input.readByte(), frameCount = input.readInt(true), frameLast = frameCount - 1; int timelineType = input.readByte(), frameCount = input.readInt(true), frameLast = frameCount - 1;
switch (timelineType) { switch (timelineType) {
case SLOT_ATTACHMENT: { case SLOT_ATTACHMENT -> {
AttachmentTimeline timeline = new AttachmentTimeline(frameCount, slotIndex); var timeline = new AttachmentTimeline(frameCount, slotIndex);
for (int frame = 0; frame < frameCount; frame++) for (int frame = 0; frame < frameCount; frame++)
timeline.setFrame(frame, input.readFloat(), input.readStringRef()); timeline.setFrame(frame, input.readFloat(), input.readStringRef());
timelines.add(timeline); timelines.add(timeline);
break;
} }
case SLOT_RGBA: { case SLOT_RGBA -> {
RGBATimeline timeline = new RGBATimeline(frameCount, input.readInt(true), slotIndex); var timeline = new RGBATimeline(frameCount, input.readInt(true), slotIndex);
float time = input.readFloat(); float time = input.readFloat();
float r = input.read() / 255f, g = input.read() / 255f; float r = input.read() / 255f, g = input.read() / 255f;
float b = input.read() / 255f, a = input.read() / 255f; float b = input.read() / 255f, a = input.read() / 255f;
@ -692,15 +691,14 @@ public class SkeletonBinary extends SkeletonLoader {
float r2 = input.read() / 255f, g2 = input.read() / 255f; float r2 = input.read() / 255f, g2 = input.read() / 255f;
float b2 = input.read() / 255f, a2 = input.read() / 255f; float b2 = input.read() / 255f, a2 = input.read() / 255f;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);
setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1); setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);
} }
}
time = time2; time = time2;
r = r2; r = r2;
g = g2; g = g2;
@ -708,10 +706,9 @@ public class SkeletonBinary extends SkeletonLoader {
a = a2; a = a2;
} }
timelines.add(timeline); timelines.add(timeline);
break;
} }
case SLOT_RGB: { case SLOT_RGB -> {
RGBTimeline timeline = new RGBTimeline(frameCount, input.readInt(true), slotIndex); var timeline = new RGBTimeline(frameCount, input.readInt(true), slotIndex);
float time = input.readFloat(); float time = input.readFloat();
float r = input.read() / 255f, g = input.read() / 255f, b = input.read() / 255f; float r = input.read() / 255f, g = input.read() / 255f, b = input.read() / 255f;
for (int frame = 0, bezier = 0;; frame++) { for (int frame = 0, bezier = 0;; frame++) {
@ -720,24 +717,22 @@ public class SkeletonBinary extends SkeletonLoader {
float time2 = input.readFloat(); float time2 = input.readFloat();
float r2 = input.read() / 255f, g2 = input.read() / 255f, b2 = input.read() / 255f; float r2 = input.read() / 255f, g2 = input.read() / 255f, b2 = input.read() / 255f;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);
} }
}
time = time2; time = time2;
r = r2; r = r2;
g = g2; g = g2;
b = b2; b = b2;
} }
timelines.add(timeline); timelines.add(timeline);
break;
} }
case SLOT_RGBA2: { case SLOT_RGBA2 -> {
RGBA2Timeline timeline = new RGBA2Timeline(frameCount, input.readInt(true), slotIndex); var timeline = new RGBA2Timeline(frameCount, input.readInt(true), slotIndex);
float time = input.readFloat(); float time = input.readFloat();
float r = input.read() / 255f, g = input.read() / 255f; float r = input.read() / 255f, g = input.read() / 255f;
float b = input.read() / 255f, a = input.read() / 255f; float b = input.read() / 255f, a = input.read() / 255f;
@ -750,10 +745,8 @@ public class SkeletonBinary extends SkeletonLoader {
float nb = input.read() / 255f, na = input.read() / 255f; float nb = input.read() / 255f, na = input.read() / 255f;
float nr2 = input.read() / 255f, ng2 = input.read() / 255f, nb2 = input.read() / 255f; float nr2 = input.read() / 255f, ng2 = input.read() / 255f, nb2 = input.read() / 255f;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);
@ -762,6 +755,7 @@ public class SkeletonBinary extends SkeletonLoader {
setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1); setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);
setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1); setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);
} }
}
time = time2; time = time2;
r = nr; r = nr;
g = ng; g = ng;
@ -772,10 +766,9 @@ public class SkeletonBinary extends SkeletonLoader {
b2 = nb2; b2 = nb2;
} }
timelines.add(timeline); timelines.add(timeline);
break;
} }
case SLOT_RGB2: { case SLOT_RGB2 -> {
RGB2Timeline timeline = new RGB2Timeline(frameCount, input.readInt(true), slotIndex); var timeline = new RGB2Timeline(frameCount, input.readInt(true), slotIndex);
float time = input.readFloat(); float time = input.readFloat();
float r = input.read() / 255f, g = input.read() / 255f, b = input.read() / 255f; float r = input.read() / 255f, g = input.read() / 255f, b = input.read() / 255f;
float r2 = input.read() / 255f, g2 = input.read() / 255f, b2 = input.read() / 255f; float r2 = input.read() / 255f, g2 = input.read() / 255f, b2 = input.read() / 255f;
@ -786,10 +779,8 @@ public class SkeletonBinary extends SkeletonLoader {
float nr = input.read() / 255f, ng = input.read() / 255f, nb = input.read() / 255f; float nr = input.read() / 255f, ng = input.read() / 255f, nb = input.read() / 255f;
float nr2 = input.read() / 255f, ng2 = input.read() / 255f, nb2 = input.read() / 255f; float nr2 = input.read() / 255f, ng2 = input.read() / 255f, nb2 = input.read() / 255f;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);
@ -797,6 +788,7 @@ public class SkeletonBinary extends SkeletonLoader {
setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1); setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);
setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1); setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);
} }
}
time = time2; time = time2;
r = nr; r = nr;
g = ng; g = ng;
@ -806,10 +798,9 @@ public class SkeletonBinary extends SkeletonLoader {
b2 = nb2; b2 = nb2;
} }
timelines.add(timeline); timelines.add(timeline);
break;
} }
case SLOT_ALPHA: case SLOT_ALPHA -> {
AlphaTimeline timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex); var timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);
float time = input.readFloat(), a = input.read() / 255f; float time = input.readFloat(), a = input.read() / 255f;
for (int frame = 0, bezier = 0;; frame++) { for (int frame = 0, bezier = 0;; frame++) {
timeline.setFrame(frame, time, a); timeline.setFrame(frame, time, a);
@ -817,17 +808,15 @@ public class SkeletonBinary extends SkeletonLoader {
float time2 = input.readFloat(); float time2 = input.readFloat();
float a2 = input.read() / 255f; float a2 = input.read() / 255f;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);
} }
time = time2; time = time2;
a = a2; a = a2;
} }
timelines.add(timeline); timelines.add(timeline);
} }
}
} }
} }
@ -837,7 +826,7 @@ public class SkeletonBinary extends SkeletonLoader {
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
int type = input.readByte(), frameCount = input.readInt(true); int type = input.readByte(), frameCount = input.readInt(true);
if (type == BONE_INHERIT) { if (type == BONE_INHERIT) {
InheritTimeline timeline = new InheritTimeline(frameCount, boneIndex); var timeline = new InheritTimeline(frameCount, boneIndex);
for (int frame = 0; frame < frameCount; frame++) for (int frame = 0; frame < frameCount; frame++)
timeline.setFrame(frame, input.readFloat(), Inherit.values[input.readByte()]); timeline.setFrame(frame, input.readFloat(), Inherit.values[input.readByte()]);
timelines.add(timeline); timelines.add(timeline);
@ -845,35 +834,19 @@ public class SkeletonBinary extends SkeletonLoader {
} }
int bezierCount = input.readInt(true); int bezierCount = input.readInt(true);
switch (type) { switch (type) {
case BONE_ROTATE: case BONE_ROTATE -> readTimeline(input, timelines, new RotateTimeline(frameCount, bezierCount, boneIndex), 1);
readTimeline(input, timelines, new RotateTimeline(frameCount, bezierCount, boneIndex), 1); case BONE_TRANSLATE -> //
break;
case BONE_TRANSLATE:
readTimeline(input, timelines, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale); readTimeline(input, timelines, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale);
break; case BONE_TRANSLATEX -> //
case BONE_TRANSLATEX:
readTimeline(input, timelines, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale); readTimeline(input, timelines, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale);
break; case BONE_TRANSLATEY -> //
case BONE_TRANSLATEY:
readTimeline(input, timelines, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale); readTimeline(input, timelines, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale);
break; case BONE_SCALE -> readTimeline(input, timelines, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1);
case BONE_SCALE: case BONE_SCALEX -> readTimeline(input, timelines, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1);
readTimeline(input, timelines, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1); case BONE_SCALEY -> readTimeline(input, timelines, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1);
break; case BONE_SHEAR -> readTimeline(input, timelines, new ShearTimeline(frameCount, bezierCount, boneIndex), 1);
case BONE_SCALEX: case BONE_SHEARX -> readTimeline(input, timelines, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1);
readTimeline(input, timelines, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1); case BONE_SHEARY -> readTimeline(input, timelines, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1);
break;
case BONE_SCALEY:
readTimeline(input, timelines, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1);
break;
case BONE_SHEAR:
readTimeline(input, timelines, new ShearTimeline(frameCount, bezierCount, boneIndex), 1);
break;
case BONE_SHEARX:
readTimeline(input, timelines, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1);
break;
case BONE_SHEARY:
readTimeline(input, timelines, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1);
} }
} }
} }
@ -881,7 +854,7 @@ public class SkeletonBinary extends SkeletonLoader {
// IK constraint timelines. // IK constraint timelines.
for (int i = 0, n = input.readInt(true); i < n; i++) { for (int i = 0, n = input.readInt(true); i < n; i++) {
int index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1; int index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;
IkConstraintTimeline timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index); var timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);
int flags = input.read(); int flags = input.read();
float time = input.readFloat(), mix = (flags & 1) != 0 ? ((flags & 2) != 0 ? input.readFloat() : 1) : 0; float time = input.readFloat(), mix = (flags & 1) != 0 ? ((flags & 2) != 0 ? input.readFloat() : 1) : 0;
float softness = (flags & 4) != 0 ? input.readFloat() * scale : 0; float softness = (flags & 4) != 0 ? input.readFloat() * scale : 0;
@ -907,7 +880,7 @@ public class SkeletonBinary extends SkeletonLoader {
// Transform constraint timelines. // Transform constraint timelines.
for (int i = 0, n = input.readInt(true); i < n; i++) { for (int i = 0, n = input.readInt(true); i < n; i++) {
int index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1; int index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;
TransformConstraintTimeline timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index); var timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);
float time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), float time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(),
mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat(); mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();
for (int frame = 0, bezier = 0;; frame++) { for (int frame = 0, bezier = 0;; frame++) {
@ -916,10 +889,8 @@ public class SkeletonBinary extends SkeletonLoader {
float time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), float time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(),
mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat(); mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);
@ -927,6 +898,7 @@ public class SkeletonBinary extends SkeletonLoader {
setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1); setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);
setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1); setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);
} }
}
time = time2; time = time2;
mixRotate = mixRotate2; mixRotate = mixRotate2;
mixX = mixX2; mixX = mixX2;
@ -945,16 +917,16 @@ public class SkeletonBinary extends SkeletonLoader {
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
int type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true); int type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);
switch (type) { switch (type) {
case PATH_POSITION: case PATH_POSITION -> {
readTimeline(input, timelines, new PathConstraintPositionTimeline(frameCount, bezierCount, index), readTimeline(input, timelines, new PathConstraintPositionTimeline(frameCount, bezierCount, index),
data.positionMode == PositionMode.fixed ? scale : 1); data.positionMode == PositionMode.fixed ? scale : 1);
break; }
case PATH_SPACING: case PATH_SPACING -> {
readTimeline(input, timelines, new PathConstraintSpacingTimeline(frameCount, bezierCount, index), readTimeline(input, timelines, new PathConstraintSpacingTimeline(frameCount, bezierCount, index),
data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed ? scale : 1); data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed ? scale : 1);
break; }
case PATH_MIX: case PATH_MIX -> {
PathConstraintMixTimeline timeline = new PathConstraintMixTimeline(frameCount, bezierCount, index); var timeline = new PathConstraintMixTimeline(frameCount, bezierCount, index);
float time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(); float time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();
for (int frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) { for (int frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) {
timeline.setFrame(frame, time, mixRotate, mixX, mixY); timeline.setFrame(frame, time, mixRotate, mixX, mixY);
@ -962,14 +934,13 @@ public class SkeletonBinary extends SkeletonLoader {
float time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), float time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(),
mixY2 = input.readFloat(); mixY2 = input.readFloat();
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1); setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);
setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1); setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);
setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1); setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);
} }
}
time = time2; time = time2;
mixRotate = mixRotate2; mixRotate = mixRotate2;
mixX = mixX2; mixX = mixX2;
@ -977,6 +948,7 @@ public class SkeletonBinary extends SkeletonLoader {
} }
timelines.add(timeline); timelines.add(timeline);
} }
}
} }
} }
@ -986,35 +958,23 @@ public class SkeletonBinary extends SkeletonLoader {
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
int type = input.readByte(), frameCount = input.readInt(true); int type = input.readByte(), frameCount = input.readInt(true);
if (type == PHYSICS_RESET) { if (type == PHYSICS_RESET) {
PhysicsConstraintResetTimeline timeline = new PhysicsConstraintResetTimeline(frameCount, index); var timeline = new PhysicsConstraintResetTimeline(frameCount, index);
for (int frame = 0; frame < frameCount; frame++) for (int frame = 0; frame < frameCount; frame++)
timeline.setFrame(frame, input.readFloat()); timeline.setFrame(frame, input.readFloat());
timelines.add(timeline); timelines.add(timeline);
continue; continue;
} }
int bezierCount = input.readInt(true); int bezierCount = input.readInt(true);
switch (type) { readTimeline(input, timelines, switch (type) {
case PHYSICS_INERTIA: case PHYSICS_INERTIA -> new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index);
readTimeline(input, timelines, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1); case PHYSICS_STRENGTH -> new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index);
break; case PHYSICS_DAMPING -> new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index);
case PHYSICS_STRENGTH: case PHYSICS_MASS -> new PhysicsConstraintMassTimeline(frameCount, bezierCount, index);
readTimeline(input, timelines, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1); case PHYSICS_WIND -> new PhysicsConstraintWindTimeline(frameCount, bezierCount, index);
break; case PHYSICS_GRAVITY -> new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index);
case PHYSICS_DAMPING: case PHYSICS_MIX -> new PhysicsConstraintMixTimeline(frameCount, bezierCount, index);
readTimeline(input, timelines, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1); default -> throw new SerializationException();
break; }, 1);
case PHYSICS_MASS:
readTimeline(input, timelines, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1);
break;
case PHYSICS_WIND:
readTimeline(input, timelines, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1);
break;
case PHYSICS_GRAVITY:
readTimeline(input, timelines, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1);
break;
case PHYSICS_MIX:
readTimeline(input, timelines, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1);
}
} }
} }
@ -1030,13 +990,13 @@ public class SkeletonBinary extends SkeletonLoader {
int timelineType = input.readByte(), frameCount = input.readInt(true), frameLast = frameCount - 1; int timelineType = input.readByte(), frameCount = input.readInt(true), frameLast = frameCount - 1;
switch (timelineType) { switch (timelineType) {
case ATTACHMENT_DEFORM: { case ATTACHMENT_DEFORM -> {
VertexAttachment vertexAttachment = (VertexAttachment)attachment; var vertexAttachment = (VertexAttachment)attachment;
boolean weighted = vertexAttachment.getBones() != null; boolean weighted = vertexAttachment.getBones() != null;
float[] vertices = vertexAttachment.getVertices(); float[] vertices = vertexAttachment.getVertices();
int deformLength = weighted ? (vertices.length / 3) << 1 : vertices.length; int deformLength = weighted ? (vertices.length / 3) << 1 : vertices.length;
DeformTimeline timeline = new DeformTimeline(frameCount, input.readInt(true), slotIndex, vertexAttachment); var timeline = new DeformTimeline(frameCount, input.readInt(true), slotIndex, vertexAttachment);
float time = input.readFloat(); float time = input.readFloat();
for (int frame = 0, bezier = 0;; frame++) { for (int frame = 0, bezier = 0;; frame++) {
@ -1064,19 +1024,15 @@ public class SkeletonBinary extends SkeletonLoader {
if (frame == frameLast) break; if (frame == frameLast) break;
float time2 = input.readFloat(); float time2 = input.readFloat();
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);
} }
time = time2; time = time2;
} }
timelines.add(timeline); timelines.add(timeline);
break;
} }
case ATTACHMENT_SEQUENCE: case ATTACHMENT_SEQUENCE -> {
SequenceTimeline timeline = new SequenceTimeline(frameCount, slotIndex, attachment); var timeline = new SequenceTimeline(frameCount, slotIndex, attachment);
for (int frame = 0; frame < frameCount; frame++) { for (int frame = 0; frame < frameCount; frame++) {
float time = input.readFloat(); float time = input.readFloat();
int modeAndIndex = input.readInt(); int modeAndIndex = input.readInt();
@ -1085,6 +1041,7 @@ public class SkeletonBinary extends SkeletonLoader {
} }
timelines.add(timeline); timelines.add(timeline);
} }
}
} }
} }
} }
@ -1092,15 +1049,15 @@ public class SkeletonBinary extends SkeletonLoader {
// Draw order timeline. // Draw order timeline.
int drawOrderCount = input.readInt(true); int drawOrderCount = input.readInt(true);
if (drawOrderCount > 0) { if (drawOrderCount > 0) {
DrawOrderTimeline timeline = new DrawOrderTimeline(drawOrderCount); var timeline = new DrawOrderTimeline(drawOrderCount);
int slotCount = skeletonData.slots.size; int slotCount = skeletonData.slots.size;
for (int i = 0; i < drawOrderCount; i++) { for (int i = 0; i < drawOrderCount; i++) {
float time = input.readFloat(); float time = input.readFloat();
int offsetCount = input.readInt(true); int offsetCount = input.readInt(true);
int[] drawOrder = new int[slotCount]; var drawOrder = new int[slotCount];
for (int ii = slotCount - 1; ii >= 0; ii--) for (int ii = slotCount - 1; ii >= 0; ii--)
drawOrder[ii] = -1; drawOrder[ii] = -1;
int[] unchanged = new int[slotCount - offsetCount]; var unchanged = new int[slotCount - offsetCount];
int originalIndex = 0, unchangedIndex = 0; int originalIndex = 0, unchangedIndex = 0;
for (int ii = 0; ii < offsetCount; ii++) { for (int ii = 0; ii < offsetCount; ii++) {
int slotIndex = input.readInt(true); int slotIndex = input.readInt(true);
@ -1124,11 +1081,11 @@ public class SkeletonBinary extends SkeletonLoader {
// Event timeline. // Event timeline.
int eventCount = input.readInt(true); int eventCount = input.readInt(true);
if (eventCount > 0) { if (eventCount > 0) {
EventTimeline timeline = new EventTimeline(eventCount); var timeline = new EventTimeline(eventCount);
for (int i = 0; i < eventCount; i++) { for (int i = 0; i < eventCount; i++) {
float time = input.readFloat(); float time = input.readFloat();
EventData eventData = skeletonData.events.get(input.readInt(true)); EventData eventData = skeletonData.events.get(input.readInt(true));
Event event = new Event(time, eventData); var event = new Event(time, eventData);
event.intValue = input.readInt(false); event.intValue = input.readInt(false);
event.floatValue = input.readFloat(); event.floatValue = input.readFloat();
event.stringValue = input.readString(); event.stringValue = input.readString();
@ -1157,11 +1114,8 @@ public class SkeletonBinary extends SkeletonLoader {
if (frame == frameLast) break; if (frame == frameLast) break;
float time2 = input.readFloat(), value2 = input.readFloat() * scale; float time2 = input.readFloat(), value2 = input.readFloat() * scale;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);
} }
time = time2; time = time2;
value = value2; value = value2;
@ -1177,13 +1131,12 @@ public class SkeletonBinary extends SkeletonLoader {
if (frame == frameLast) break; if (frame == frameLast) break;
float time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale; float time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;
switch (input.readByte()) { switch (input.readByte()) {
case CURVE_STEPPED: case CURVE_STEPPED -> timeline.setStepped(frame);
timeline.setStepped(frame); case CURVE_BEZIER -> {
break;
case CURVE_BEZIER:
setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale); setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);
setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale); setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);
} }
}
time = time2; time = time2;
value1 = nvalue1; value1 = nvalue1;
value2 = nvalue2; value2 = nvalue2;
@ -1235,21 +1188,20 @@ public class SkeletonBinary extends SkeletonLoader {
for (int i = 0; i < byteCount;) { for (int i = 0; i < byteCount;) {
int b = read(); int b = read();
switch (b >> 4) { switch (b >> 4) {
case -1: case -1 -> throw new EOFException();
throw new EOFException(); case 12, 13 -> {
case 12:
case 13:
chars[charCount++] = (char)((b & 0x1F) << 6 | read() & 0x3F); chars[charCount++] = (char)((b & 0x1F) << 6 | read() & 0x3F);
i += 2; i += 2;
break; }
case 14: case 14 -> {
chars[charCount++] = (char)((b & 0x0F) << 12 | (read() & 0x3F) << 6 | read() & 0x3F); chars[charCount++] = (char)((b & 0x0F) << 12 | (read() & 0x3F) << 6 | read() & 0x3F);
i += 3; i += 3;
break; }
default: default -> {
chars[charCount++] = (char)b; chars[charCount++] = (char)b;
i++; i++;
} }
}
} }
return new String(chars, 0, charCount); return new String(chars, 0, charCount);
} }

View File

@ -65,11 +65,10 @@ public class SkeletonBounds {
polygons.clear(); polygons.clear();
for (int i = 0; i < slotCount; i++) { for (int i = 0; i < slotCount; i++) {
Slot slot = (Slot)slots[i]; var slot = (Slot)slots[i];
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof BoundingBoxAttachment) { if (attachment instanceof BoundingBoxAttachment boundingBox) {
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment)attachment;
boundingBoxes.add(boundingBox); boundingBoxes.add(boundingBox);
FloatArray polygon = polygonPool.obtain(); FloatArray polygon = polygonPool.obtain();
@ -93,7 +92,7 @@ public class SkeletonBounds {
float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE; float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE;
Object[] polygons = this.polygons.items; Object[] polygons = this.polygons.items;
for (int i = 0, n = this.polygons.size; i < n; i++) { for (int i = 0, n = this.polygons.size; i < n; i++) {
FloatArray polygon = (FloatArray)polygons[i]; var polygon = (FloatArray)polygons[i];
float[] vertices = polygon.items; float[] vertices = polygon.items;
for (int ii = 0, nn = polygon.size; ii < nn; ii += 2) { for (int ii = 0, nn = polygon.size; ii < nn; ii += 2) {
float x = vertices[ii]; float x = vertices[ii];

View File

@ -72,7 +72,7 @@ public class SkeletonData {
if (boneName == null) throw new IllegalArgumentException("boneName cannot be null."); if (boneName == null) throw new IllegalArgumentException("boneName cannot be null.");
Object[] bones = this.bones.items; Object[] bones = this.bones.items;
for (int i = 0, n = this.bones.size; i < n; i++) { for (int i = 0, n = this.bones.size; i < n; i++) {
BoneData bone = (BoneData)bones[i]; var bone = (BoneData)bones[i];
if (bone.name.equals(boneName)) return bone; if (bone.name.equals(boneName)) return bone;
} }
return null; return null;
@ -91,7 +91,7 @@ public class SkeletonData {
if (slotName == null) throw new IllegalArgumentException("slotName cannot be null."); if (slotName == null) throw new IllegalArgumentException("slotName cannot be null.");
Object[] slots = this.slots.items; Object[] slots = this.slots.items;
for (int i = 0, n = this.slots.size; i < n; i++) { for (int i = 0, n = this.slots.size; i < n; i++) {
SlotData slot = (SlotData)slots[i]; var slot = (SlotData)slots[i];
if (slot.name.equals(slotName)) return slot; if (slot.name.equals(slotName)) return slot;
} }
return null; return null;
@ -153,7 +153,7 @@ public class SkeletonData {
if (animationName == null) throw new IllegalArgumentException("animationName cannot be null."); if (animationName == null) throw new IllegalArgumentException("animationName cannot be null.");
Object[] animations = this.animations.items; Object[] animations = this.animations.items;
for (int i = 0, n = this.animations.size; i < n; i++) { for (int i = 0, n = this.animations.size; i < n; i++) {
Animation animation = (Animation)animations[i]; var animation = (Animation)animations[i];
if (animation.name.equals(animationName)) return animation; if (animation.name.equals(animationName)) return animation;
} }
return null; return null;
@ -172,7 +172,7 @@ public class SkeletonData {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] ikConstraints = this.ikConstraints.items; Object[] ikConstraints = this.ikConstraints.items;
for (int i = 0, n = this.ikConstraints.size; i < n; i++) { for (int i = 0, n = this.ikConstraints.size; i < n; i++) {
IkConstraintData constraint = (IkConstraintData)ikConstraints[i]; var constraint = (IkConstraintData)ikConstraints[i];
if (constraint.name.equals(constraintName)) return constraint; if (constraint.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -191,7 +191,7 @@ public class SkeletonData {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] transformConstraints = this.transformConstraints.items; Object[] transformConstraints = this.transformConstraints.items;
for (int i = 0, n = this.transformConstraints.size; i < n; i++) { for (int i = 0, n = this.transformConstraints.size; i < n; i++) {
TransformConstraintData constraint = (TransformConstraintData)transformConstraints[i]; var constraint = (TransformConstraintData)transformConstraints[i];
if (constraint.name.equals(constraintName)) return constraint; if (constraint.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -210,7 +210,7 @@ public class SkeletonData {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] pathConstraints = this.pathConstraints.items; Object[] pathConstraints = this.pathConstraints.items;
for (int i = 0, n = this.pathConstraints.size; i < n; i++) { for (int i = 0, n = this.pathConstraints.size; i < n; i++) {
PathConstraintData constraint = (PathConstraintData)pathConstraints[i]; var constraint = (PathConstraintData)pathConstraints[i];
if (constraint.name.equals(constraintName)) return constraint; if (constraint.name.equals(constraintName)) return constraint;
} }
return null; return null;
@ -229,7 +229,7 @@ public class SkeletonData {
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null."); if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
Object[] physicsConstraints = this.physicsConstraints.items; Object[] physicsConstraints = this.physicsConstraints.items;
for (int i = 0, n = this.physicsConstraints.size; i < n; i++) { for (int i = 0, n = this.physicsConstraints.size; i < n; i++) {
PhysicsConstraintData constraint = (PhysicsConstraintData)physicsConstraints[i]; var constraint = (PhysicsConstraintData)physicsConstraints[i];
if (constraint.name.equals(constraintName)) return constraint; if (constraint.name.equals(constraintName)) return constraint;
} }
return null; return null;

View File

@ -135,7 +135,7 @@ public class SkeletonJson extends SkeletonLoader {
float scale = this.scale; float scale = this.scale;
// Skeleton. // Skeleton.
SkeletonData skeletonData = new SkeletonData(); var skeletonData = new SkeletonData();
JsonValue skeletonMap = root.get("skeleton"); JsonValue skeletonMap = root.get("skeleton");
if (skeletonMap != null) { if (skeletonMap != null) {
skeletonData.hash = skeletonMap.getString("hash", null); skeletonData.hash = skeletonMap.getString("hash", null);
@ -158,7 +158,7 @@ public class SkeletonJson extends SkeletonLoader {
parent = skeletonData.findBone(parentName); parent = skeletonData.findBone(parentName);
if (parent == null) throw new SerializationException("Parent bone not found: " + parentName); if (parent == null) throw new SerializationException("Parent bone not found: " + parentName);
} }
BoneData data = new BoneData(skeletonData.bones.size, boneMap.getString("name"), parent); var data = new BoneData(skeletonData.bones.size, boneMap.getString("name"), parent);
data.length = boneMap.getFloat("length", 0) * scale; data.length = boneMap.getFloat("length", 0) * scale;
data.x = boneMap.getFloat("x", 0) * scale; data.x = boneMap.getFloat("x", 0) * scale;
data.y = boneMap.getFloat("y", 0) * scale; data.y = boneMap.getFloat("y", 0) * scale;
@ -186,7 +186,7 @@ public class SkeletonJson extends SkeletonLoader {
BoneData boneData = skeletonData.findBone(boneName); BoneData boneData = skeletonData.findBone(boneName);
if (boneData == null) throw new SerializationException("Slot bone not found: " + boneName); if (boneData == null) throw new SerializationException("Slot bone not found: " + boneName);
SlotData data = new SlotData(skeletonData.slots.size, slotName, boneData); var data = new SlotData(skeletonData.slots.size, slotName, boneData);
String color = slotMap.getString("color", null); String color = slotMap.getString("color", null);
if (color != null) Color.valueOf(color, data.getColor()); if (color != null) Color.valueOf(color, data.getColor());
@ -202,7 +202,7 @@ public class SkeletonJson extends SkeletonLoader {
// IK constraints. // IK constraints.
for (JsonValue constraintMap = root.getChild("ik"); constraintMap != null; constraintMap = constraintMap.next) { for (JsonValue constraintMap = root.getChild("ik"); constraintMap != null; constraintMap = constraintMap.next) {
IkConstraintData data = new IkConstraintData(constraintMap.getString("name")); var data = new IkConstraintData(constraintMap.getString("name"));
data.order = constraintMap.getInt("order", 0); data.order = constraintMap.getInt("order", 0);
data.skinRequired = constraintMap.getBoolean("skin", false); data.skinRequired = constraintMap.getBoolean("skin", false);
@ -228,7 +228,7 @@ public class SkeletonJson extends SkeletonLoader {
// Transform constraints. // Transform constraints.
for (JsonValue constraintMap = root.getChild("transform"); constraintMap != null; constraintMap = constraintMap.next) { for (JsonValue constraintMap = root.getChild("transform"); constraintMap != null; constraintMap = constraintMap.next) {
TransformConstraintData data = new TransformConstraintData(constraintMap.getString("name")); var data = new TransformConstraintData(constraintMap.getString("name"));
data.order = constraintMap.getInt("order", 0); data.order = constraintMap.getInt("order", 0);
data.skinRequired = constraintMap.getBoolean("skin", false); data.skinRequired = constraintMap.getBoolean("skin", false);
@ -264,7 +264,7 @@ public class SkeletonJson extends SkeletonLoader {
// Path constraints. // Path constraints.
for (JsonValue constraintMap = root.getChild("path"); constraintMap != null; constraintMap = constraintMap.next) { for (JsonValue constraintMap = root.getChild("path"); constraintMap != null; constraintMap = constraintMap.next) {
PathConstraintData data = new PathConstraintData(constraintMap.getString("name")); var data = new PathConstraintData(constraintMap.getString("name"));
data.order = constraintMap.getInt("order", 0); data.order = constraintMap.getInt("order", 0);
data.skinRequired = constraintMap.getBoolean("skin", false); data.skinRequired = constraintMap.getBoolean("skin", false);
@ -295,7 +295,7 @@ public class SkeletonJson extends SkeletonLoader {
// Physics constraints. // Physics constraints.
for (JsonValue constraintMap = root.getChild("physics"); constraintMap != null; constraintMap = constraintMap.next) { for (JsonValue constraintMap = root.getChild("physics"); constraintMap != null; constraintMap = constraintMap.next) {
PhysicsConstraintData data = new PhysicsConstraintData(constraintMap.getString("name")); var data = new PhysicsConstraintData(constraintMap.getString("name"));
data.order = constraintMap.getInt("order", 0); data.order = constraintMap.getInt("order", 0);
data.skinRequired = constraintMap.getBoolean("skin", false); data.skinRequired = constraintMap.getBoolean("skin", false);
@ -330,7 +330,7 @@ public class SkeletonJson extends SkeletonLoader {
// Skins. // Skins.
for (JsonValue skinMap = root.getChild("skins"); skinMap != null; skinMap = skinMap.next) { for (JsonValue skinMap = root.getChild("skins"); skinMap != null; skinMap = skinMap.next) {
Skin skin = new Skin(skinMap.getString("name")); var skin = new Skin(skinMap.getString("name"));
for (JsonValue entry = skinMap.getChild("bones"); entry != null; entry = entry.next) { for (JsonValue entry = skinMap.getChild("bones"); entry != null; entry = entry.next) {
BoneData bone = skeletonData.findBone(entry.asString()); BoneData bone = skeletonData.findBone(entry.asString());
if (bone == null) throw new SerializationException("Skin bone not found: " + entry); if (bone == null) throw new SerializationException("Skin bone not found: " + entry);
@ -381,7 +381,7 @@ public class SkeletonJson extends SkeletonLoader {
// Linked meshes. // Linked meshes.
Object[] items = linkedMeshes.items; Object[] items = linkedMeshes.items;
for (int i = 0, n = linkedMeshes.size; i < n; i++) { for (int i = 0, n = linkedMeshes.size; i < n; i++) {
LinkedMesh linkedMesh = (LinkedMesh)items[i]; var linkedMesh = (LinkedMesh)items[i];
Skin skin = linkedMesh.skin == null ? skeletonData.getDefaultSkin() : skeletonData.findSkin(linkedMesh.skin); Skin skin = linkedMesh.skin == null ? skeletonData.getDefaultSkin() : skeletonData.findSkin(linkedMesh.skin);
if (skin == null) throw new SerializationException("Skin not found: " + linkedMesh.skin); if (skin == null) throw new SerializationException("Skin not found: " + linkedMesh.skin);
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
@ -394,7 +394,7 @@ public class SkeletonJson extends SkeletonLoader {
// Events. // Events.
for (JsonValue eventMap = root.getChild("events"); eventMap != null; eventMap = eventMap.next) { for (JsonValue eventMap = root.getChild("events"); eventMap != null; eventMap = eventMap.next) {
EventData data = new EventData(eventMap.name); var data = new EventData(eventMap.name);
data.intValue = eventMap.getInt("int", 0); data.intValue = eventMap.getInt("int", 0);
data.floatValue = eventMap.getFloat("float", 0f); data.floatValue = eventMap.getFloat("float", 0f);
data.stringValue = eventMap.getString("string", ""); data.stringValue = eventMap.getString("string", "");
@ -500,7 +500,7 @@ public class SkeletonJson extends SkeletonLoader {
int vertexCount = map.getInt("vertexCount"); int vertexCount = map.getInt("vertexCount");
readVertices(map, path, vertexCount << 1); readVertices(map, path, vertexCount << 1);
float[] lengths = new float[vertexCount / 3]; var lengths = new float[vertexCount / 3];
int i = 0; int i = 0;
for (JsonValue curves = map.require("lengths").child; curves != null; curves = curves.next) for (JsonValue curves = map.require("lengths").child; curves != null; curves = curves.next)
lengths[i++] = curves.asFloat() * scale; lengths[i++] = curves.asFloat() * scale;
@ -543,7 +543,7 @@ public class SkeletonJson extends SkeletonLoader {
private Sequence readSequence (@Null JsonValue map) { private Sequence readSequence (@Null JsonValue map) {
if (map == null) return null; if (map == null) return null;
Sequence sequence = new Sequence(map.getInt("count")); var sequence = new Sequence(map.getInt("count"));
sequence.setStart(map.getInt("start", 1)); sequence.setStart(map.getInt("start", 1));
sequence.setDigits(map.getInt("digits", 0)); sequence.setDigits(map.getInt("digits", 0));
sequence.setSetupIndex(map.getInt("setup", 0)); sequence.setSetupIndex(map.getInt("setup", 0));
@ -561,8 +561,8 @@ public class SkeletonJson extends SkeletonLoader {
attachment.setVertices(vertices); attachment.setVertices(vertices);
return; return;
} }
FloatArray weights = new FloatArray(verticesLength * 3 * 3); var weights = new FloatArray(verticesLength * 3 * 3);
IntArray bones = new IntArray(verticesLength * 3); var bones = new IntArray(verticesLength * 3);
for (int i = 0, n = vertices.length; i < n;) { for (int i = 0, n = vertices.length; i < n;) {
int boneCount = (int)vertices[i++]; int boneCount = (int)vertices[i++];
bones.add(boneCount); bones.add(boneCount);
@ -579,7 +579,7 @@ public class SkeletonJson extends SkeletonLoader {
private void readAnimation (JsonValue map, String name, SkeletonData skeletonData) { private void readAnimation (JsonValue map, String name, SkeletonData skeletonData) {
float scale = this.scale; float scale = this.scale;
Array<Timeline> timelines = new Array(); var timelines = new Array<Timeline>();
// Slot timelines. // Slot timelines.
for (JsonValue slotMap = map.getChild("slots"); slotMap != null; slotMap = slotMap.next) { for (JsonValue slotMap = map.getChild("slots"); slotMap != null; slotMap = slotMap.next) {
@ -590,15 +590,15 @@ public class SkeletonJson extends SkeletonLoader {
if (keyMap == null) continue; if (keyMap == null) continue;
int frames = timelineMap.size; int frames = timelineMap.size;
String timelineName = timelineMap.name; switch (timelineMap.name) {
if (timelineName.equals("attachment")) { case "attachment" -> {
AttachmentTimeline timeline = new AttachmentTimeline(frames, slot.index); var timeline = new AttachmentTimeline(frames, slot.index);
for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++)
timeline.setFrame(frame, keyMap.getFloat("time", 0), keyMap.getString("name", null)); timeline.setFrame(frame, keyMap.getFloat("time", 0), keyMap.getString("name", null));
timelines.add(timeline); timelines.add(timeline);
}
} else if (timelineName.equals("rgba")) { case "rgba" -> {
RGBATimeline timeline = new RGBATimeline(frames, frames << 2, slot.index); var timeline = new RGBATimeline(frames, frames << 2, slot.index);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
String color = keyMap.getString("color"); String color = keyMap.getString("color");
float r = Integer.parseInt(color.substring(0, 2), 16) / 255f; float r = Integer.parseInt(color.substring(0, 2), 16) / 255f;
@ -633,9 +633,9 @@ public class SkeletonJson extends SkeletonLoader {
keyMap = nextMap; keyMap = nextMap;
} }
timelines.add(timeline); timelines.add(timeline);
}
} else if (timelineName.equals("rgb")) { case "rgb" -> {
RGBTimeline timeline = new RGBTimeline(frames, frames * 3, slot.index); var timeline = new RGBTimeline(frames, frames * 3, slot.index);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
String color = keyMap.getString("color"); String color = keyMap.getString("color");
float r = Integer.parseInt(color.substring(0, 2), 16) / 255f; float r = Integer.parseInt(color.substring(0, 2), 16) / 255f;
@ -666,12 +666,10 @@ public class SkeletonJson extends SkeletonLoader {
keyMap = nextMap; keyMap = nextMap;
} }
timelines.add(timeline); timelines.add(timeline);
}
} else if (timelineName.equals("alpha")) { case "alpha" -> timelines.add(readTimeline(keyMap, new AlphaTimeline(frames, frames, slot.index), 0, 1));
timelines.add(readTimeline(keyMap, new AlphaTimeline(frames, frames, slot.index), 0, 1)); case "rgba2" -> {
var timeline = new RGBA2Timeline(frames, frames * 7, slot.index);
} else if (timelineName.equals("rgba2")) {
RGBA2Timeline timeline = new RGBA2Timeline(frames, frames * 7, slot.index);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
String color = keyMap.getString("light"); String color = keyMap.getString("light");
float r = Integer.parseInt(color.substring(0, 2), 16) / 255f; float r = Integer.parseInt(color.substring(0, 2), 16) / 255f;
@ -720,9 +718,9 @@ public class SkeletonJson extends SkeletonLoader {
keyMap = nextMap; keyMap = nextMap;
} }
timelines.add(timeline); timelines.add(timeline);
}
} else if (timelineName.equals("rgb2")) { case "rgb2" -> {
RGB2Timeline timeline = new RGB2Timeline(frames, frames * 6, slot.index); var timeline = new RGB2Timeline(frames, frames * 6, slot.index);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
String color = keyMap.getString("light"); String color = keyMap.getString("light");
float r = Integer.parseInt(color.substring(0, 2), 16) / 255f; float r = Integer.parseInt(color.substring(0, 2), 16) / 255f;
@ -767,9 +765,10 @@ public class SkeletonJson extends SkeletonLoader {
keyMap = nextMap; keyMap = nextMap;
} }
timelines.add(timeline); timelines.add(timeline);
}
} else default -> throw new RuntimeException(
throw new RuntimeException("Invalid timeline type for a slot: " + timelineName + " (" + slotMap.name + ")"); "Invalid timeline type for a slot: " + timelineMap.name + " (" + slotMap.name + ")");
}
} }
} }
@ -782,39 +781,33 @@ public class SkeletonJson extends SkeletonLoader {
if (keyMap == null) continue; if (keyMap == null) continue;
int frames = timelineMap.size; int frames = timelineMap.size;
String timelineName = timelineMap.name; switch (timelineMap.name) {
if (timelineName.equals("rotate")) case "rotate" -> timelines.add(readTimeline(keyMap, new RotateTimeline(frames, frames, bone.index), 0, 1));
timelines.add(readTimeline(keyMap, new RotateTimeline(frames, frames, bone.index), 0, 1)); case "translate" -> //
else if (timelineName.equals("translate")) { timelines.add(readTimeline(keyMap, new TranslateTimeline(frames, frames << 1, bone.index), "x", "y", 0, scale));
TranslateTimeline timeline = new TranslateTimeline(frames, frames << 1, bone.index); case "translatex" -> //
timelines.add(readTimeline(keyMap, timeline, "x", "y", 0, scale));
} else if (timelineName.equals("translatex")) {
timelines.add(readTimeline(keyMap, new TranslateXTimeline(frames, frames, bone.index), 0, scale)); timelines.add(readTimeline(keyMap, new TranslateXTimeline(frames, frames, bone.index), 0, scale));
} else if (timelineName.equals("translatey")) { case "translatey" -> //
timelines.add(readTimeline(keyMap, new TranslateYTimeline(frames, frames, bone.index), 0, scale)); timelines.add(readTimeline(keyMap, new TranslateYTimeline(frames, frames, bone.index), 0, scale));
} else if (timelineName.equals("scale")) { case "scale" -> timelines
ScaleTimeline timeline = new ScaleTimeline(frames, frames << 1, bone.index); .add(readTimeline(keyMap, new ScaleTimeline(frames, frames << 1, bone.index), "x", "y", 1, 1));
timelines.add(readTimeline(keyMap, timeline, "x", "y", 1, 1)); case "scalex" -> timelines.add(readTimeline(keyMap, new ScaleXTimeline(frames, frames, bone.index), 1, 1));
} else if (timelineName.equals("scalex")) case "scaley" -> timelines.add(readTimeline(keyMap, new ScaleYTimeline(frames, frames, bone.index), 1, 1));
timelines.add(readTimeline(keyMap, new ScaleXTimeline(frames, frames, bone.index), 1, 1)); case "shear" -> //
else if (timelineName.equals("scaley")) timelines.add(readTimeline(keyMap, new ShearTimeline(frames, frames << 1, bone.index), "x", "y", 0, 1));
timelines.add(readTimeline(keyMap, new ScaleYTimeline(frames, frames, bone.index), 1, 1)); case "shearx" -> timelines.add(readTimeline(keyMap, new ShearXTimeline(frames, frames, bone.index), 0, 1));
else if (timelineName.equals("shear")) { case "sheary" -> timelines.add(readTimeline(keyMap, new ShearYTimeline(frames, frames, bone.index), 0, 1));
ShearTimeline timeline = new ShearTimeline(frames, frames << 1, bone.index); case "inherit" -> {
timelines.add(readTimeline(keyMap, timeline, "x", "y", 0, 1)); var timeline = new InheritTimeline(frames, bone.index);
} else if (timelineName.equals("shearx"))
timelines.add(readTimeline(keyMap, new ShearXTimeline(frames, frames, bone.index), 0, 1));
else if (timelineName.equals("sheary"))
timelines.add(readTimeline(keyMap, new ShearYTimeline(frames, frames, bone.index), 0, 1));
else if (timelineName.equals("inherit")) {
InheritTimeline timeline = new InheritTimeline(frames, bone.index);
for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) { for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) {
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
timeline.setFrame(frame, time, Inherit.valueOf(keyMap.getString("inherit", Inherit.normal.name()))); timeline.setFrame(frame, time, Inherit.valueOf(keyMap.getString("inherit", Inherit.normal.name())));
} }
timelines.add(timeline); timelines.add(timeline);
} else }
throw new RuntimeException("Invalid timeline type for a bone: " + timelineName + " (" + boneMap.name + ")"); default -> //
throw new RuntimeException("Invalid timeline type for a bone: " + timelineMap.name + " (" + boneMap.name + ")");
}
} }
} }
@ -823,7 +816,7 @@ public class SkeletonJson extends SkeletonLoader {
JsonValue keyMap = timelineMap.child; JsonValue keyMap = timelineMap.child;
if (keyMap == null) continue; if (keyMap == null) continue;
IkConstraintData constraint = skeletonData.findIkConstraint(timelineMap.name); IkConstraintData constraint = skeletonData.findIkConstraint(timelineMap.name);
IkConstraintTimeline timeline = new IkConstraintTimeline(timelineMap.size, timelineMap.size << 1, var timeline = new IkConstraintTimeline(timelineMap.size, timelineMap.size << 1,
skeletonData.getIkConstraints().indexOf(constraint, true)); skeletonData.getIkConstraints().indexOf(constraint, true));
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
float mix = keyMap.getFloat("mix", 1), softness = keyMap.getFloat("softness", 0) * scale; float mix = keyMap.getFloat("mix", 1), softness = keyMap.getFloat("softness", 0) * scale;
@ -855,7 +848,7 @@ public class SkeletonJson extends SkeletonLoader {
JsonValue keyMap = timelineMap.child; JsonValue keyMap = timelineMap.child;
if (keyMap == null) continue; if (keyMap == null) continue;
TransformConstraintData constraint = skeletonData.findTransformConstraint(timelineMap.name); TransformConstraintData constraint = skeletonData.findTransformConstraint(timelineMap.name);
TransformConstraintTimeline timeline = new TransformConstraintTimeline(timelineMap.size, timelineMap.size * 6, var timeline = new TransformConstraintTimeline(timelineMap.size, timelineMap.size * 6,
skeletonData.getTransformConstraints().indexOf(constraint, true)); skeletonData.getTransformConstraints().indexOf(constraint, true));
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
float mixRotate = keyMap.getFloat("mixRotate", 1); float mixRotate = keyMap.getFloat("mixRotate", 1);
@ -905,16 +898,18 @@ public class SkeletonJson extends SkeletonLoader {
if (keyMap == null) continue; if (keyMap == null) continue;
int frames = timelineMap.size; int frames = timelineMap.size;
String timelineName = timelineMap.name; switch (timelineMap.name) {
if (timelineName.equals("position")) { case "position" -> {
CurveTimeline1 timeline = new PathConstraintPositionTimeline(frames, frames, index); var timeline = new PathConstraintPositionTimeline(frames, frames, index);
timelines.add(readTimeline(keyMap, timeline, 0, constraint.positionMode == PositionMode.fixed ? scale : 1)); timelines.add(readTimeline(keyMap, timeline, 0, constraint.positionMode == PositionMode.fixed ? scale : 1));
} else if (timelineName.equals("spacing")) { }
CurveTimeline1 timeline = new PathConstraintSpacingTimeline(frames, frames, index); case "spacing" -> {
var timeline = new PathConstraintSpacingTimeline(frames, frames, index);
timelines.add(readTimeline(keyMap, timeline, 0, timelines.add(readTimeline(keyMap, timeline, 0,
constraint.spacingMode == SpacingMode.length || constraint.spacingMode == SpacingMode.fixed ? scale : 1)); constraint.spacingMode == SpacingMode.length || constraint.spacingMode == SpacingMode.fixed ? scale : 1));
} else if (timelineName.equals("mix")) { }
PathConstraintMixTimeline timeline = new PathConstraintMixTimeline(frames, frames * 3, index); case "mix" -> {
var timeline = new PathConstraintMixTimeline(frames, frames * 3, index);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
float mixRotate = keyMap.getFloat("mixRotate", 1); float mixRotate = keyMap.getFloat("mixRotate", 1);
float mixX = keyMap.getFloat("mixX", 1), mixY = keyMap.getFloat("mixY", mixX); float mixX = keyMap.getFloat("mixX", 1), mixY = keyMap.getFloat("mixY", mixX);
@ -942,6 +937,7 @@ public class SkeletonJson extends SkeletonLoader {
} }
timelines.add(timeline); timelines.add(timeline);
} }
}
} }
} }
@ -958,32 +954,26 @@ public class SkeletonJson extends SkeletonLoader {
if (keyMap == null) continue; if (keyMap == null) continue;
int frames = timelineMap.size; int frames = timelineMap.size;
String timelineName = timelineMap.name; CurveTimeline1 timeline;
if (timelineName.equals("reset")) { switch (timelineMap.name) {
PhysicsConstraintResetTimeline timeline = new PhysicsConstraintResetTimeline(frames, index); case "reset" -> {
var resetTimeline = new PhysicsConstraintResetTimeline(frames, index);
for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++)
timeline.setFrame(frame, keyMap.getFloat("time", 0)); resetTimeline.setFrame(frame, keyMap.getFloat("time", 0));
timelines.add(timeline); timelines.add(resetTimeline);
continue; continue;
} }
case "inertia" -> timeline = new PhysicsConstraintInertiaTimeline(frames, frames, index);
CurveTimeline1 timeline; case "strength" -> timeline = new PhysicsConstraintStrengthTimeline(frames, frames, index);
if (timelineName.equals("inertia")) case "damping" -> timeline = new PhysicsConstraintDampingTimeline(frames, frames, index);
timeline = new PhysicsConstraintInertiaTimeline(frames, frames, index); case "mass" -> timeline = new PhysicsConstraintMassTimeline(frames, frames, index);
else if (timelineName.equals("strength")) case "wind" -> timeline = new PhysicsConstraintWindTimeline(frames, frames, index);
timeline = new PhysicsConstraintStrengthTimeline(frames, frames, index); case "gravity" -> timeline = new PhysicsConstraintGravityTimeline(frames, frames, index);
else if (timelineName.equals("damping")) case "mix" -> timeline = new PhysicsConstraintMixTimeline(frames, frames, index);
timeline = new PhysicsConstraintDampingTimeline(frames, frames, index); default -> {
else if (timelineName.equals("mass"))
timeline = new PhysicsConstraintMassTimeline(frames, frames, index);
else if (timelineName.equals("wind"))
timeline = new PhysicsConstraintWindTimeline(frames, frames, index);
else if (timelineName.equals("gravity"))
timeline = new PhysicsConstraintGravityTimeline(frames, frames, index);
else if (timelineName.equals("mix"))
timeline = new PhysicsConstraintMixTimeline(frames, frames, index);
else
continue; continue;
}
}
timelines.add(readTimeline(keyMap, timeline, 0, 1)); timelines.add(readTimeline(keyMap, timeline, 0, 1));
} }
} }
@ -1001,14 +991,14 @@ public class SkeletonJson extends SkeletonLoader {
for (JsonValue timelineMap = attachmentMap.child; timelineMap != null; timelineMap = timelineMap.next) { for (JsonValue timelineMap = attachmentMap.child; timelineMap != null; timelineMap = timelineMap.next) {
JsonValue keyMap = timelineMap.child; JsonValue keyMap = timelineMap.child;
int frames = timelineMap.size; int frames = timelineMap.size;
String timelineName = timelineMap.name; switch (timelineMap.name) {
if (timelineName.equals("deform")) { case "deform" -> {
VertexAttachment vertexAttachment = (VertexAttachment)attachment; var vertexAttachment = (VertexAttachment)attachment;
boolean weighted = vertexAttachment.getBones() != null; boolean weighted = vertexAttachment.getBones() != null;
float[] vertices = vertexAttachment.getVertices(); float[] vertices = vertexAttachment.getVertices();
int deformLength = weighted ? (vertices.length / 3) << 1 : vertices.length; int deformLength = weighted ? (vertices.length / 3) << 1 : vertices.length;
DeformTimeline timeline = new DeformTimeline(frames, frames, slot.index, vertexAttachment); var timeline = new DeformTimeline(frames, frames, slot.index, vertexAttachment);
float time = keyMap.getFloat("time", 0); float time = keyMap.getFloat("time", 0);
for (int frame = 0, bezier = 0;; frame++) { for (int frame = 0, bezier = 0;; frame++) {
float[] deform; float[] deform;
@ -1042,8 +1032,9 @@ public class SkeletonJson extends SkeletonLoader {
keyMap = nextMap; keyMap = nextMap;
} }
timelines.add(timeline); timelines.add(timeline);
} else if (timelineName.equals("sequence")) { }
SequenceTimeline timeline = new SequenceTimeline(frames, slot.index, attachment); case "sequence" -> {
var timeline = new SequenceTimeline(frames, slot.index, attachment);
float lastDelay = 0; float lastDelay = 0;
for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) { for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) {
float delay = keyMap.getFloat("delay", lastDelay); float delay = keyMap.getFloat("delay", lastDelay);
@ -1053,6 +1044,7 @@ public class SkeletonJson extends SkeletonLoader {
} }
timelines.add(timeline); timelines.add(timeline);
} }
}
} }
} }
} }
@ -1061,7 +1053,7 @@ public class SkeletonJson extends SkeletonLoader {
// Draw order timeline. // Draw order timeline.
JsonValue drawOrderMap = map.get("drawOrder"); JsonValue drawOrderMap = map.get("drawOrder");
if (drawOrderMap != null) { if (drawOrderMap != null) {
DrawOrderTimeline timeline = new DrawOrderTimeline(drawOrderMap.size); var timeline = new DrawOrderTimeline(drawOrderMap.size);
int slotCount = skeletonData.slots.size; int slotCount = skeletonData.slots.size;
int frame = 0; int frame = 0;
for (JsonValue keyMap = drawOrderMap.child; keyMap != null; keyMap = keyMap.next, frame++) { for (JsonValue keyMap = drawOrderMap.child; keyMap != null; keyMap = keyMap.next, frame++) {
@ -1071,7 +1063,7 @@ public class SkeletonJson extends SkeletonLoader {
drawOrder = new int[slotCount]; drawOrder = new int[slotCount];
for (int i = slotCount - 1; i >= 0; i--) for (int i = slotCount - 1; i >= 0; i--)
drawOrder[i] = -1; drawOrder[i] = -1;
int[] unchanged = new int[slotCount - offsets.size]; var unchanged = new int[slotCount - offsets.size];
int originalIndex = 0, unchangedIndex = 0; int originalIndex = 0, unchangedIndex = 0;
for (JsonValue offsetMap = offsets.child; offsetMap != null; offsetMap = offsetMap.next) { for (JsonValue offsetMap = offsets.child; offsetMap != null; offsetMap = offsetMap.next) {
SlotData slot = skeletonData.findSlot(offsetMap.getString("slot")); SlotData slot = skeletonData.findSlot(offsetMap.getString("slot"));
@ -1097,12 +1089,12 @@ public class SkeletonJson extends SkeletonLoader {
// Event timeline. // Event timeline.
JsonValue eventsMap = map.get("events"); JsonValue eventsMap = map.get("events");
if (eventsMap != null) { if (eventsMap != null) {
EventTimeline timeline = new EventTimeline(eventsMap.size); var timeline = new EventTimeline(eventsMap.size);
int frame = 0; int frame = 0;
for (JsonValue keyMap = eventsMap.child; keyMap != null; keyMap = keyMap.next, frame++) { for (JsonValue keyMap = eventsMap.child; keyMap != null; keyMap = keyMap.next, frame++) {
EventData eventData = skeletonData.findEvent(keyMap.getString("name")); EventData eventData = skeletonData.findEvent(keyMap.getString("name"));
if (eventData == null) throw new SerializationException("Event not found: " + keyMap.getString("name")); if (eventData == null) throw new SerializationException("Event not found: " + keyMap.getString("name"));
Event event = new Event(keyMap.getFloat("time", 0), eventData); var event = new Event(keyMap.getFloat("time", 0), eventData);
event.intValue = keyMap.getInt("int", eventData.intValue); event.intValue = keyMap.getInt("int", eventData.intValue);
event.floatValue = keyMap.getFloat("float", eventData.floatValue); event.floatValue = keyMap.getFloat("float", eventData.floatValue);
event.stringValue = keyMap.getString("string", eventData.stringValue); event.stringValue = keyMap.getString("string", eventData.stringValue);

View File

@ -60,12 +60,12 @@ public class SkeletonRenderer {
* previous blend function is not restored, since that could result in unnecessary flushes, depending on what is rendered * previous blend function is not restored, since that could result in unnecessary flushes, depending on what is rendered
* next. */ * next. */
public void draw (Batch batch, Skeleton skeleton) { public void draw (Batch batch, Skeleton skeleton) {
if (batch instanceof TwoColorPolygonBatch) { if (batch instanceof TwoColorPolygonBatch twoColorBatch) {
draw((TwoColorPolygonBatch)batch, skeleton); draw(twoColorBatch, skeleton);
return; return;
} }
if (batch instanceof PolygonSpriteBatch) { if (batch instanceof PolygonSpriteBatch polygonBatch) {
draw((PolygonSpriteBatch)batch, skeleton); draw(polygonBatch, skeleton);
return; return;
} }
if (batch == null) throw new IllegalArgumentException("batch cannot be null."); if (batch == null) throw new IllegalArgumentException("batch cannot be null.");
@ -78,11 +78,10 @@ public class SkeletonRenderer {
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a; float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
Object[] drawOrder = skeleton.drawOrder.items; Object[] drawOrder = skeleton.drawOrder.items;
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) { for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
Slot slot = (Slot)drawOrder[i]; var slot = (Slot)drawOrder[i];
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) { if (attachment instanceof RegionAttachment region) {
RegionAttachment region = (RegionAttachment)attachment;
region.computeWorldVertices(slot, vertices, 0, 5); region.computeWorldVertices(slot, vertices, 0, 5);
Color color = region.getColor(), slotColor = slot.getColor(); Color color = region.getColor(), slotColor = slot.getColor();
float alpha = a * slotColor.a * color.a * 255; float alpha = a * slotColor.a * color.a * 255;
@ -119,8 +118,8 @@ public class SkeletonRenderer {
throw new RuntimeException(batch.getClass().getSimpleName() throw new RuntimeException(batch.getClass().getSimpleName()
+ " cannot render meshes, PolygonSpriteBatch or TwoColorPolygonBatch is required."); + " cannot render meshes, PolygonSpriteBatch or TwoColorPolygonBatch is required.");
} else if (attachment instanceof SkeletonAttachment) { } else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
Skeleton attachmentSkeleton = ((SkeletonAttachment)attachment).getSkeleton(); Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton); if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
} }
} }
@ -144,15 +143,14 @@ public class SkeletonRenderer {
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a; float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
Object[] drawOrder = skeleton.drawOrder.items; Object[] drawOrder = skeleton.drawOrder.items;
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) { for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
Slot slot = (Slot)drawOrder[i]; var slot = (Slot)drawOrder[i];
if (!slot.bone.active) { if (!slot.bone.active) {
clipper.clipEnd(slot); clipper.clipEnd(slot);
continue; continue;
} }
Texture texture = null; Texture texture = null;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) { if (attachment instanceof RegionAttachment region) {
RegionAttachment region = (RegionAttachment)attachment;
verticesLength = 20; verticesLength = 20;
vertices = this.vertices.items; vertices = this.vertices.items;
region.computeWorldVertices(slot, vertices, 0, 5); region.computeWorldVertices(slot, vertices, 0, 5);
@ -161,8 +159,7 @@ public class SkeletonRenderer {
uvs = region.getUVs(); uvs = region.getUVs();
color = region.getColor(); color = region.getColor();
} else if (attachment instanceof MeshAttachment) { } else if (attachment instanceof MeshAttachment mesh) {
MeshAttachment mesh = (MeshAttachment)attachment;
int count = mesh.getWorldVerticesLength(); int count = mesh.getWorldVerticesLength();
verticesLength = (count >> 1) * 5; verticesLength = (count >> 1) * 5;
vertices = this.vertices.setSize(verticesLength); vertices = this.vertices.setSize(verticesLength);
@ -172,13 +169,12 @@ public class SkeletonRenderer {
uvs = mesh.getUVs(); uvs = mesh.getUVs();
color = mesh.getColor(); color = mesh.getColor();
} else if (attachment instanceof ClippingAttachment) { } else if (attachment instanceof ClippingAttachment clip) {
ClippingAttachment clip = (ClippingAttachment)attachment;
clipper.clipStart(slot, clip); clipper.clipStart(slot, clip);
continue; continue;
} else if (attachment instanceof SkeletonAttachment) { } else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
Skeleton attachmentSkeleton = ((SkeletonAttachment)attachment).getSkeleton(); Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton); if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
} }
@ -241,15 +237,14 @@ public class SkeletonRenderer {
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a; float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
Object[] drawOrder = skeleton.drawOrder.items; Object[] drawOrder = skeleton.drawOrder.items;
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) { for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
Slot slot = (Slot)drawOrder[i]; var slot = (Slot)drawOrder[i];
if (!slot.bone.active) { if (!slot.bone.active) {
clipper.clipEnd(slot); clipper.clipEnd(slot);
continue; continue;
} }
Texture texture = null; Texture texture = null;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) { if (attachment instanceof RegionAttachment region) {
RegionAttachment region = (RegionAttachment)attachment;
verticesLength = 24; verticesLength = 24;
vertices = this.vertices.items; vertices = this.vertices.items;
region.computeWorldVertices(slot, vertices, 0, 6); region.computeWorldVertices(slot, vertices, 0, 6);
@ -258,8 +253,7 @@ public class SkeletonRenderer {
uvs = region.getUVs(); uvs = region.getUVs();
color = region.getColor(); color = region.getColor();
} else if (attachment instanceof MeshAttachment) { } else if (attachment instanceof MeshAttachment mesh) {
MeshAttachment mesh = (MeshAttachment)attachment;
int count = mesh.getWorldVerticesLength(); int count = mesh.getWorldVerticesLength();
verticesLength = count * 3; verticesLength = count * 3;
vertices = this.vertices.setSize(verticesLength); vertices = this.vertices.setSize(verticesLength);
@ -269,13 +263,12 @@ public class SkeletonRenderer {
uvs = mesh.getUVs(); uvs = mesh.getUVs();
color = mesh.getColor(); color = mesh.getColor();
} else if (attachment instanceof ClippingAttachment) { } else if (attachment instanceof ClippingAttachment clip) {
ClippingAttachment clip = (ClippingAttachment)attachment;
clipper.clipStart(slot, clip); clipper.clipStart(slot, clip);
continue; continue;
} else if (attachment instanceof SkeletonAttachment) { } else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
Skeleton attachmentSkeleton = ((SkeletonAttachment)attachment).getSkeleton(); Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton); if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
} }

View File

@ -109,8 +109,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (!(attachment instanceof PointAttachment)) continue; if (!(attachment instanceof PointAttachment point)) continue;
PointAttachment point = (PointAttachment)attachment;
point.computeWorldPosition(slot.getBone(), temp1); point.computeWorldPosition(slot.getBone(), temp1);
temp2.set(8, 0).rotate(point.computeWorldRotation(slot.getBone())); temp2.set(8, 0).rotate(point.computeWorldRotation(slot.getBone()));
shapes.rectLine(temp1, temp2, boneWidth / 2 * scale); shapes.rectLine(temp1, temp2, boneWidth / 2 * scale);
@ -126,8 +125,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) { if (attachment instanceof RegionAttachment region) {
RegionAttachment region = (RegionAttachment)attachment;
float[] vertices = this.vertices.items; float[] vertices = this.vertices.items;
region.computeWorldVertices(slot, vertices, 0, 2); region.computeWorldVertices(slot, vertices, 0, 2);
shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]); shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);
@ -143,8 +141,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (!(attachment instanceof MeshAttachment)) continue; if (!(attachment instanceof MeshAttachment mesh)) continue;
MeshAttachment mesh = (MeshAttachment)attachment;
float[] vertices = this.vertices.setSize(mesh.getWorldVerticesLength()); float[] vertices = this.vertices.setSize(mesh.getWorldVerticesLength());
mesh.computeWorldVertices(slot, 0, mesh.getWorldVerticesLength(), vertices, 0, 2); mesh.computeWorldVertices(slot, 0, mesh.getWorldVerticesLength(), vertices, 0, 2);
short[] triangles = mesh.getTriangles(); short[] triangles = mesh.getTriangles();
@ -191,8 +188,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (!(attachment instanceof ClippingAttachment)) continue; if (!(attachment instanceof ClippingAttachment clip)) continue;
ClippingAttachment clip = (ClippingAttachment)attachment;
int nn = clip.getWorldVerticesLength(); int nn = clip.getWorldVerticesLength();
float[] vertices = this.vertices.setSize(nn); float[] vertices = this.vertices.setSize(nn);
clip.computeWorldVertices(slot, 0, nn, vertices, 0, 2); clip.computeWorldVertices(slot, 0, nn, vertices, 0, 2);
@ -208,8 +204,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (!(attachment instanceof PathAttachment)) continue; if (!(attachment instanceof PathAttachment path)) continue;
PathAttachment path = (PathAttachment)attachment;
int nn = path.getWorldVerticesLength(); int nn = path.getWorldVerticesLength();
float[] vertices = this.vertices.setSize(nn); float[] vertices = this.vertices.setSize(nn);
path.computeWorldVertices(slot, 0, nn, vertices, 0, 2); path.computeWorldVertices(slot, 0, nn, vertices, 0, 2);
@ -259,8 +254,7 @@ public class SkeletonRendererDebug {
Slot slot = slots.get(i); Slot slot = slots.get(i);
if (!slot.bone.active) continue; if (!slot.bone.active) continue;
Attachment attachment = slot.attachment; Attachment attachment = slot.attachment;
if (!(attachment instanceof PointAttachment)) continue; if (!(attachment instanceof PointAttachment point)) continue;
PointAttachment point = (PointAttachment)attachment;
point.computeWorldPosition(slot.getBone(), temp1); point.computeWorldPosition(slot.getBone(), temp1);
shapes.circle(temp1.x, temp1.y, 3 * scale, 8); shapes.circle(temp1.x, temp1.y, 3 * scale, 8);
} }

View File

@ -60,7 +60,7 @@ public class Skin {
/** Adds an attachment to the skin for the specified slot index and name. */ /** Adds an attachment to the skin for the specified slot index and name. */
public void setAttachment (int slotIndex, String name, Attachment attachment) { public void setAttachment (int slotIndex, String name, Attachment attachment) {
if (attachment == null) throw new IllegalArgumentException("attachment cannot be null."); if (attachment == null) throw new IllegalArgumentException("attachment cannot be null.");
SkinEntry entry = new SkinEntry(slotIndex, name, attachment); var entry = new SkinEntry(slotIndex, name, attachment);
if (!attachments.add(entry)) attachments.get(entry).attachment = attachment; if (!attachments.add(entry)) attachments.get(entry).attachment = attachment;
} }
@ -90,8 +90,8 @@ public class Skin {
if (!constraints.contains(data, true)) constraints.add(data); if (!constraints.contains(data, true)) constraints.add(data);
for (SkinEntry entry : skin.attachments.orderedItems()) { for (SkinEntry entry : skin.attachments.orderedItems()) {
if (entry.attachment instanceof MeshAttachment) if (entry.attachment instanceof MeshAttachment mesh)
setAttachment(entry.slotIndex, entry.name, ((MeshAttachment)entry.attachment).newLinkedMesh()); setAttachment(entry.slotIndex, entry.name, mesh.newLinkedMesh());
else else
setAttachment(entry.slotIndex, entry.name, entry.attachment != null ? entry.attachment.copy() : null); setAttachment(entry.slotIndex, entry.name, entry.attachment != null ? entry.attachment.copy() : null);
} }
@ -157,7 +157,7 @@ public class Skin {
Object[] slots = skeleton.slots.items; Object[] slots = skeleton.slots.items;
for (SkinEntry entry : oldSkin.attachments.orderedItems()) { for (SkinEntry entry : oldSkin.attachments.orderedItems()) {
int slotIndex = entry.slotIndex; int slotIndex = entry.slotIndex;
Slot slot = (Slot)slots[slotIndex]; var slot = (Slot)slots[slotIndex];
if (slot.attachment == entry.attachment) { if (slot.attachment == entry.attachment) {
Attachment attachment = getAttachment(slotIndex, entry.name); Attachment attachment = getAttachment(slotIndex, entry.name);
if (attachment != null) slot.setAttachment(attachment); if (attachment != null) slot.setAttachment(attachment);
@ -204,7 +204,7 @@ public class Skin {
public boolean equals (Object object) { public boolean equals (Object object) {
if (object == null) return false; if (object == null) return false;
SkinEntry other = (SkinEntry)object; var other = (SkinEntry)object;
if (slotIndex != other.slotIndex) return false; if (slotIndex != other.slotIndex) return false;
return name.equals(other.name); return name.equals(other.name);
} }

View File

@ -115,9 +115,8 @@ public class Slot {
* specified attachment. */ * specified attachment. */
public void setAttachment (@Null Attachment attachment) { public void setAttachment (@Null Attachment attachment) {
if (this.attachment == attachment) return; if (this.attachment == attachment) return;
if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) if (!(attachment instanceof VertexAttachment newAttachment) || !(this.attachment instanceof VertexAttachment oldAttachment)
|| ((VertexAttachment)attachment).getTimelineAttachment() != ((VertexAttachment)this.attachment) || newAttachment.getTimelineAttachment() != oldAttachment.getTimelineAttachment()) {
.getTimelineAttachment()) {
deform.clear(); deform.clear();
} }
this.attachment = attachment; this.attachment = attachment;

View File

@ -59,7 +59,7 @@ public class AtlasAttachmentLoader implements AttachmentLoader {
} }
public RegionAttachment newRegionAttachment (Skin skin, String name, String path, @Null Sequence sequence) { public RegionAttachment newRegionAttachment (Skin skin, String name, String path, @Null Sequence sequence) {
RegionAttachment attachment = new RegionAttachment(name); var attachment = new RegionAttachment(name);
if (sequence != null) if (sequence != null)
loadSequence(name, path, sequence); loadSequence(name, path, sequence);
else { else {
@ -72,7 +72,7 @@ public class AtlasAttachmentLoader implements AttachmentLoader {
} }
public MeshAttachment newMeshAttachment (Skin skin, String name, String path, @Null Sequence sequence) { public MeshAttachment newMeshAttachment (Skin skin, String name, String path, @Null Sequence sequence) {
MeshAttachment attachment = new MeshAttachment(name); var attachment = new MeshAttachment(name);
if (sequence != null) if (sequence != null)
loadSequence(name, path, sequence); loadSequence(name, path, sequence);
else { else {

View File

@ -108,10 +108,9 @@ public class MeshAttachment extends VertexAttachment implements HasTextureRegion
float[] uvs = this.uvs; float[] uvs = this.uvs;
int n = uvs.length; int n = uvs.length;
float u, v, width, height; float u, v, width, height;
if (region instanceof AtlasRegion) { if (region instanceof AtlasRegion region) {
u = region.getU(); u = region.getU();
v = region.getV(); v = region.getV();
AtlasRegion region = (AtlasRegion)this.region;
float textureWidth = region.getTexture().getWidth(), textureHeight = region.getTexture().getHeight(); float textureWidth = region.getTexture().getWidth(), textureHeight = region.getTexture().getHeight();
switch (region.degrees) { switch (region.degrees) {
case 90: case 90:
@ -281,7 +280,7 @@ public class MeshAttachment extends VertexAttachment implements HasTextureRegion
/** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. */ /** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. */
public MeshAttachment newLinkedMesh () { public MeshAttachment newLinkedMesh () {
MeshAttachment mesh = new MeshAttachment(name); var mesh = new MeshAttachment(name);
mesh.timelineAttachment = timelineAttachment; mesh.timelineAttachment = timelineAttachment;
mesh.region = region; mesh.region = region;
mesh.path = path; mesh.path = path;

View File

@ -99,8 +99,7 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
float localX = -localX2; float localX = -localX2;
float localY = -localY2; float localY = -localY2;
boolean rotated = false; boolean rotated = false;
if (region instanceof AtlasRegion) { if (region instanceof AtlasRegion region) {
AtlasRegion region = (AtlasRegion)this.region;
localX += region.offsetX / region.originalWidth * width; localX += region.offsetX / region.originalWidth * width;
localY += region.offsetY / region.originalHeight * height; localY += region.offsetY / region.originalHeight * height;
if (region.degrees == 90) { if (region.degrees == 90) {

View File

@ -68,7 +68,7 @@ public class Sequence {
} }
public String getPath (String basePath, int index) { public String getPath (String basePath, int index) {
StringBuilder buffer = new StringBuilder(basePath.length() + digits); var buffer = new StringBuilder(basePath.length() + digits);
buffer.append(basePath); buffer.append(basePath);
String frame = Integer.toString(start + index); String frame = Integer.toString(start + index);
for (int i = digits - frame.length(); i > 0; i--) for (int i = digits - frame.length(); i > 0; i--)

View File

@ -114,7 +114,7 @@ abstract public class VertexAttachment extends Attachment {
int n = bones[v++]; int n = bones[v++];
n += v; n += v;
for (; v < n; v++, b += 3) { for (; v < n; v++, b += 3) {
Bone bone = (Bone)skeletonBones[bones[v]]; var bone = (Bone)skeletonBones[bones[v]];
float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];
wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight; wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;
wy += (vx * bone.getC() + vy * bone.getD() + bone.getWorldY()) * weight; wy += (vx * bone.getC() + vy * bone.getD() + bone.getWorldY()) * weight;
@ -129,7 +129,7 @@ abstract public class VertexAttachment extends Attachment {
int n = bones[v++]; int n = bones[v++];
n += v; n += v;
for (; v < n; v++, b += 3, f += 2) { for (; v < n; v++, b += 3, f += 2) {
Bone bone = (Bone)skeletonBones[bones[v]]; var bone = (Bone)skeletonBones[bones[v]];
float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];
wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight; wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;
wy += (vx * bone.getC() + vy * bone.getD() + bone.getWorldY()) * weight; wy += (vx * bone.getC() + vy * bone.getD() + bone.getWorldY()) * weight;

View File

@ -94,7 +94,7 @@ public class SkeletonActorPool extends Pool<SkeletonActor> {
Object[] obtained = this.obtained.items; Object[] obtained = this.obtained.items;
outer: outer:
for (int i = this.obtained.size - 1; i >= 0; i--) { for (int i = this.obtained.size - 1; i >= 0; i--) {
SkeletonActor actor = (SkeletonActor)obtained[i]; var actor = (SkeletonActor)obtained[i];
Array<TrackEntry> tracks = actor.state.getTracks(); Array<TrackEntry> tracks = actor.state.getTracks();
for (int ii = 0, nn = tracks.size; ii < nn; ii++) for (int ii = 0, nn = tracks.size; ii < nn; ii++)
if (tracks.get(ii) != null) continue outer; if (tracks.get(ii) != null) continue outer;
@ -103,7 +103,7 @@ public class SkeletonActorPool extends Pool<SkeletonActor> {
} }
protected SkeletonActor newObject () { protected SkeletonActor newObject () {
SkeletonActor actor = new SkeletonActor(); var actor = new SkeletonActor();
actor.setRenderer(renderer); actor.setRenderer(renderer);
return actor; return actor;
} }

View File

@ -82,11 +82,11 @@ public class SkeletonDataLoader extends AsynchronousAssetLoader<SkeletonData, Sk
attachmentLoader = new AtlasAttachmentLoader(manager.get(file.pathWithoutExtension() + ".atlas", TextureAtlas.class)); attachmentLoader = new AtlasAttachmentLoader(manager.get(file.pathWithoutExtension() + ".atlas", TextureAtlas.class));
if (file.extension().equalsIgnoreCase("skel")) { if (file.extension().equalsIgnoreCase("skel")) {
SkeletonBinary skeletonBinary = new SkeletonBinary(attachmentLoader); var skeletonBinary = new SkeletonBinary(attachmentLoader);
skeletonBinary.setScale(scale); skeletonBinary.setScale(scale);
skeletonData = skeletonBinary.readSkeletonData(file); skeletonData = skeletonBinary.readSkeletonData(file);
} else { } else {
SkeletonJson skeletonJson = new SkeletonJson(attachmentLoader); var skeletonJson = new SkeletonJson(attachmentLoader);
skeletonJson.setScale(scale); skeletonJson.setScale(scale);
skeletonData = skeletonJson.readSkeletonData(file); skeletonData = skeletonJson.readSkeletonData(file);
} }
@ -101,7 +101,7 @@ public class SkeletonDataLoader extends AsynchronousAssetLoader<SkeletonData, Sk
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, @Null SkeletonDataParameter parameter) { public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, @Null SkeletonDataParameter parameter) {
if (parameter == null) return null; if (parameter == null) return null;
if (parameter.attachmentLoader != null) return null; if (parameter.attachmentLoader != null) return null;
Array<AssetDescriptor> dependencies = new Array(); var dependencies = new Array<AssetDescriptor>();
dependencies.add(new AssetDescriptor(parameter.atlasName, TextureAtlas.class)); dependencies.add(new AssetDescriptor(parameter.atlasName, TextureAtlas.class));
return dependencies; return dependencies;
} }

View File

@ -222,13 +222,13 @@ class Triangulator {
for (int ii = 0; ii < n; ii++) { for (int ii = 0; ii < n; ii++) {
if (ii == i) continue; if (ii == i) continue;
ShortArray otherIndices = (ShortArray)convexPolygonsIndicesItems[ii]; var otherIndices = (ShortArray)convexPolygonsIndicesItems[ii];
if (otherIndices.size != 3) continue; if (otherIndices.size != 3) continue;
int otherFirstIndex = otherIndices.first(); int otherFirstIndex = otherIndices.first();
int otherSecondIndex = otherIndices.get(1); int otherSecondIndex = otherIndices.get(1);
int otherLastIndex = otherIndices.get(2); int otherLastIndex = otherIndices.get(2);
FloatArray otherPoly = (FloatArray)convexPolygonsItems[ii]; var otherPoly = (FloatArray)convexPolygonsItems[ii];
float x3 = otherPoly.get(otherPoly.size - 2), y3 = otherPoly.get(otherPoly.size - 1); float x3 = otherPoly.get(otherPoly.size - 2), y3 = otherPoly.get(otherPoly.size - 1);
if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue; if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;

View File

@ -826,7 +826,7 @@ public class TwoColorPolygonBatch implements PolygonBatch {
final int vertexIndex = this.vertexIndex; final int vertexIndex = this.vertexIndex;
int triangleIndex = this.triangleIndex; int triangleIndex = this.triangleIndex;
short vertex = (short)(vertexIndex / VERTEX_SIZE); var vertex = (short)(vertexIndex / VERTEX_SIZE);
for (int n = triangleIndex + triangleCount; triangleIndex < n; triangleIndex += 6, vertex += 4) { for (int n = triangleIndex + triangleCount; triangleIndex < n; triangleIndex += 6, vertex += 4) {
triangles[triangleIndex] = vertex; triangles[triangleIndex] = vertex;
triangles[triangleIndex + 1] = (short)(vertex + 1); triangles[triangleIndex + 1] = (short)(vertex + 1);
@ -859,7 +859,7 @@ public class TwoColorPolygonBatch implements PolygonBatch {
final int vertexIndex = this.vertexIndex; final int vertexIndex = this.vertexIndex;
int triangleIndex = this.triangleIndex; int triangleIndex = this.triangleIndex;
short vertex = (short)(vertexIndex / VERTEX_SIZE); var vertex = (short)(vertexIndex / VERTEX_SIZE);
for (int n = triangleIndex + triangleCount; triangleIndex < n; triangleIndex += 6, vertex += 4) { for (int n = triangleIndex + triangleCount; triangleIndex < n; triangleIndex += 6, vertex += 4) {
triangles[triangleIndex] = vertex; triangles[triangleIndex] = vertex;
triangles[triangleIndex + 1] = (short)(vertex + 1); triangles[triangleIndex + 1] = (short)(vertex + 1);
@ -1527,7 +1527,7 @@ public class TwoColorPolygonBatch implements PolygonBatch {
+ " gl_FragColor.rgb = ((texColor.a - 1.0) * u_pma + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n" // + " gl_FragColor.rgb = ((texColor.a - 1.0) * u_pma + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n" //
+ "}"; + "}";
ShaderProgram shader = new ShaderProgram(vertexShader, fragmentShader); var shader = new ShaderProgram(vertexShader, fragmentShader);
if (shader.isCompiled() == false) throw new IllegalArgumentException("Error compiling shader: " + shader.getLog()); if (shader.isCompiled() == false) throw new IllegalArgumentException("Error compiling shader: " + shader.getLog());
return shader; return shader;
} }

View File

@ -1,18 +1,22 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.builder.annotationPath.allLocations=enabled
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.annotation.Null.NonNull org.eclipse.jdt.core.compiler.annotation.nonnull=com.badlogic.gdx.utils.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.annotation.Null.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.badlogic.gdx.utils.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.annotation.Null org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=com.esotericsoftware.spine.launcher.utils.Null,com.esotericsoftware.spine.server.utils.Null,com.esotericsoftware.spine.editor.utils.Null org.eclipse.jdt.core.compiler.annotation.nullable=com.badlogic.gdx.utils.Null
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning
org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -21,14 +25,15 @@ org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=ignore org.eclipse.jdt.core.compiler.problem.deadCode=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@ -40,8 +45,10 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
@ -52,12 +59,13 @@ org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=info
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
@ -81,9 +89,9 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=info
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=info
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=info
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
@ -98,7 +106,7 @@ org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=info
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
@ -113,22 +121,22 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExcepti
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=info
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=16
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@ -136,20 +144,17 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@ -235,12 +240,11 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@ -271,8 +275,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@ -297,17 +299,13 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@ -355,8 +353,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@ -393,12 +389,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@ -424,10 +417,6 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=3 org.eclipse.jdt.core.formatter.tabulation.size=3
org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true