diff --git a/Package.swift b/Package.swift index a4a9d68fd..2b3b2681a 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,7 @@ let package = Package( .library( name: "SpineiOS", targets: ["SpineiOS"] - ) + ), ], targets: [ .target( @@ -43,7 +43,7 @@ let package = Package( sources: [ "spine-c/src/extensions.cpp", "spine-c/src/generated", - "spine-cpp/src/spine" + "spine-cpp/src/spine", ], publicHeadersPath: "spine-c/include", cxxSettings: [ @@ -63,7 +63,7 @@ let package = Package( path: "spine-ios/Sources/SpineSwift", sources: [ "Generated", - "Extensions" + "Extensions", ] ), .systemLibrary( diff --git a/spine-flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift b/spine-flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817a5..bfa0333a3 100644 --- a/spine-flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/spine-flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,5 @@ import FlutterMacOS import Foundation - func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { } diff --git a/spine-ios/Example/Spine iOS Example/AnimationStateEvents.swift b/spine-ios/Example/Spine iOS Example/AnimationStateEvents.swift index 1479b9161..6fabcf5d8 100644 --- a/spine-ios/Example/Spine iOS Example/AnimationStateEvents.swift +++ b/spine-ios/Example/Spine iOS Example/AnimationStateEvents.swift @@ -27,8 +27,8 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -import SpineiOS import SpineSwift +import SpineiOS import SwiftUI struct AnimationStateEvents: View { @@ -38,7 +38,7 @@ struct AnimationStateEvents: View { onInitialized: { controller in controller.skeleton.scaleX = 0.5 controller.skeleton.scaleY = 0.5 - controller.skeleton.findSlot("gun")?.appliedPose.color.set(1, 0, 0, 1) + controller.skeleton.findSlot("gun")?.appliedPose.color.set(1, 0, 0, 1) controller.animationStateData.defaultMix = 0.2 let walk = controller.animationState.setAnimation(0, "walk", true) walk.setListener { type, entry, event in diff --git a/spine-ios/Example/Spine iOS Example/DressUp.swift b/spine-ios/Example/Spine iOS Example/DressUp.swift index 2e2f14311..19b77f0a4 100644 --- a/spine-ios/Example/Spine iOS Example/DressUp.swift +++ b/spine-ios/Example/Spine iOS Example/DressUp.swift @@ -27,8 +27,8 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -import SpineiOS import SpineSwift +import SpineiOS import SwiftUI struct DressUp: View { @@ -112,7 +112,7 @@ final class DressUpModel: ObservableObject { skeleton.setSkin2(skin) skeleton.setupPose() skeleton.update(0) - skeleton.updateWorldTransform(SpineSwift.Physics.update) + skeleton.updateWorldTransform(SpineSwift.Physics.update) let skinName = skin.name self.skinImages[skinName] = try drawable.renderToImage( size: self.thumbnailSize, diff --git a/spine-ios/Example/Spine iOS Example/IKFollowing.swift b/spine-ios/Example/Spine iOS Example/IKFollowing.swift index 5b1c60147..b78fc6aa1 100644 --- a/spine-ios/Example/Spine iOS Example/IKFollowing.swift +++ b/spine-ios/Example/Spine iOS Example/IKFollowing.swift @@ -85,9 +85,9 @@ final class IKFollowingModel: ObservableObject { } let bone = controller.skeleton.findBone("crosshair")! if let parent = bone.parent { - let position = parent.appliedPose.worldToLocal(worldX: Float(worldPosition.x), worldY: Float(worldPosition.y)) - bone.appliedPose.x = position.x - bone.appliedPose.y = position.y + let position = parent.appliedPose.worldToLocal(worldX: Float(worldPosition.x), worldY: Float(worldPosition.y)) + bone.appliedPose.x = position.x + bone.appliedPose.y = position.y } } ) diff --git a/spine-ios/Example/Spine iOS Example/MainView.swift b/spine-ios/Example/Spine iOS Example/MainView.swift index 47551719c..fb38e9000 100644 --- a/spine-ios/Example/Spine iOS Example/MainView.swift +++ b/spine-ios/Example/Spine iOS Example/MainView.swift @@ -27,8 +27,8 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -import SpineiOS import SpineSwift +import SpineiOS import SwiftUI // View modifier to report memory leaks when view disappears diff --git a/spine-ios/Example/Spine iOS Example/PlayPauseAnimation.swift b/spine-ios/Example/Spine iOS Example/PlayPauseAnimation.swift index 0c4256727..a7040750a 100644 --- a/spine-ios/Example/Spine iOS Example/PlayPauseAnimation.swift +++ b/spine-ios/Example/Spine iOS Example/PlayPauseAnimation.swift @@ -35,7 +35,7 @@ struct PlayPauseAnimation: View { @StateObject var controller = SpineController( onInitialized: { controller in - controller.animationState.setAnimation(0, "flying", true) + controller.animationState.setAnimation(0, "flying", true) } ) diff --git a/spine-ios/Example/Spine iOS Example/SpineExampleApp.swift b/spine-ios/Example/Spine iOS Example/SpineExampleApp.swift index f1aacef05..905840cfb 100644 --- a/spine-ios/Example/Spine iOS Example/SpineExampleApp.swift +++ b/spine-ios/Example/Spine iOS Example/SpineExampleApp.swift @@ -27,8 +27,8 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -import SpineiOS import SpineSwift +import SpineiOS import SwiftUI @main diff --git a/spine-ios/Sources/SpineSwift/Extensions/AnimationStateEventManager.swift b/spine-ios/Sources/SpineSwift/Extensions/AnimationStateEventManager.swift index 3a1e508e9..f685724f7 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/AnimationStateEventManager.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/AnimationStateEventManager.swift @@ -37,10 +37,10 @@ public class AnimationStateEventManager { // Use pointer addresses as keys since Swift wrapper objects might be recreated private var stateListeners: [Int: AnimationStateListener?] = [:] private var trackEntryListeners: [Int: [Int: AnimationStateListener]] = [:] - + public static let instance = AnimationStateEventManager() private init() {} - + func setStateListener(_ state: AnimationState, _ listener: AnimationStateListener?) { let key = Int(bitPattern: state._ptr) if listener == nil { @@ -49,50 +49,50 @@ public class AnimationStateEventManager { stateListeners[key] = listener } } - + func getStateListener(_ state: AnimationState) -> AnimationStateListener? { let key = Int(bitPattern: state._ptr) return stateListeners[key] ?? nil } - + func setTrackEntryListener(_ entry: TrackEntry, _ listener: AnimationStateListener?) { // Get the animation state from the track entry itself guard let state = entry.animationState else { fatalError("TrackEntry does not have an associated AnimationState") } - + let stateKey = Int(bitPattern: state._ptr) let entryKey = Int(bitPattern: entry._ptr) - + if trackEntryListeners[stateKey] == nil { trackEntryListeners[stateKey] = [:] } - + if listener == nil { trackEntryListeners[stateKey]?.removeValue(forKey: entryKey) } else { trackEntryListeners[stateKey]?[entryKey] = listener } } - + func getTrackEntryListener(_ state: AnimationState, _ entry: TrackEntry) -> AnimationStateListener? { let stateKey = Int(bitPattern: state._ptr) let entryKey = Int(bitPattern: entry._ptr) return trackEntryListeners[stateKey]?[entryKey] } - + func removeTrackEntry(_ state: AnimationState, _ entry: TrackEntry) { let stateKey = Int(bitPattern: state._ptr) let entryKey = Int(bitPattern: entry._ptr) trackEntryListeners[stateKey]?.removeValue(forKey: entryKey) } - + func clearState(_ state: AnimationState) { let key = Int(bitPattern: state._ptr) stateListeners.removeValue(forKey: key) trackEntryListeners.removeValue(forKey: key) } - + /// Debug method to inspect current state of the manager public func debugPrint() { print("\nAnimationStateEventManager contents:") @@ -111,7 +111,7 @@ extension AnimationState { public func setListener(_ listener: AnimationStateListener?) { AnimationStateEventManager.instance.setStateListener(self, listener) } - + /// Get the current state listener public var listener: AnimationStateListener? { return AnimationStateEventManager.instance.getStateListener(self) @@ -125,4 +125,4 @@ extension TrackEntry { public func setListener(_ listener: AnimationStateListener?) { AnimationStateEventManager.instance.setTrackEntryListener(self, listener) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Extensions/BonePoseExtensions.swift b/spine-ios/Sources/SpineSwift/Extensions/BonePoseExtensions.swift index b7225834f..2100231b7 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/BonePoseExtensions.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/BonePoseExtensions.swift @@ -36,40 +36,44 @@ extension BonePose { /// Transform world coordinates to local coordinates public func worldToLocal(worldX: Float, worldY: Float) -> Vector { let output = ArrayFloat() - spine_bone_pose_world_to_local_v(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), - worldX, worldY, - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_bone_pose_world_to_local_v( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + worldX, worldY, + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let vector = Vector(x: output[0], y: output[1]) return vector } - + /// Transform local coordinates to world coordinates public func localToWorld(localX: Float, localY: Float) -> Vector { let output = ArrayFloat() - spine_bone_pose_local_to_world_v(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), - localX, localY, - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_bone_pose_local_to_world_v( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + localX, localY, + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let vector = Vector(x: output[0], y: output[1]) return vector } - + /// Transform world coordinates to parent coordinates public func worldToParent(worldX: Float, worldY: Float) -> Vector { let output = ArrayFloat() - spine_bone_pose_world_to_parent_v(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), - worldX, worldY, - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_bone_pose_world_to_parent_v( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + worldX, worldY, + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let vector = Vector(x: output[0], y: output[1]) return vector } - + /// Transform parent coordinates to world coordinates public func parentToWorld(parentX: Float, parentY: Float) -> Vector { let output = ArrayFloat() - spine_bone_pose_parent_to_world_v(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), - parentX, parentY, - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_bone_pose_parent_to_world_v( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + parentX, parentY, + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let vector = Vector(x: output[0], y: output[1]) return vector } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Extensions/SkeletonDrawable.swift b/spine-ios/Sources/SpineSwift/Extensions/SkeletonDrawable.swift index dc2052013..e0c6cdd3a 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/SkeletonDrawable.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/SkeletonDrawable.swift @@ -33,88 +33,88 @@ import SpineC /// Convenient drawable that combines skeleton, animation state, and rendering public class SkeletonDrawable { private let _drawable: UnsafeMutablePointer - + public let skeleton: Skeleton public let animationState: AnimationState public let animationStateData: AnimationStateData - + public init(skeletonData: SkeletonData) { guard let drawable = spine_skeleton_drawable_create(skeletonData._ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) else { fatalError("Failed to create skeleton drawable") } self._drawable = drawable - + // Get references to the skeleton and animation state guard let skeletonPtr = spine_skeleton_drawable_get_skeleton(drawable) else { spine_skeleton_drawable_dispose(drawable) fatalError("Failed to get skeleton from drawable") } self.skeleton = Skeleton(fromPointer: skeletonPtr) - + guard let animationStatePtr = spine_skeleton_drawable_get_animation_state(drawable) else { spine_skeleton_drawable_dispose(drawable) fatalError("Failed to get animation state from drawable") } self.animationState = AnimationState(fromPointer: animationStatePtr) - + guard let animationStateDataPtr = spine_skeleton_drawable_get_animation_state_data(drawable) else { spine_skeleton_drawable_dispose(drawable) fatalError("Failed to get animation state data from drawable") } self.animationStateData = AnimationStateData(fromPointer: animationStateDataPtr) } - + /// Update the animation state and process events public func update(_ delta: Float) { // Update animation state animationState.update(delta) - + // Process events if let eventsPtr = spine_skeleton_drawable_get_animation_state_events(_drawable) { let numEvents = Int(spine_animation_state_events_get_num_events(eventsPtr)) - + for i in 0.. RenderCommand? { guard let renderCommand = spine_skeleton_drawable_render(_drawable) else { @@ -122,9 +122,9 @@ public class SkeletonDrawable { } return RenderCommand(fromPointer: renderCommand) } - + deinit { AnimationStateEventManager.instance.clearState(animationState) spine_skeleton_drawable_dispose(_drawable) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Extensions/SkeletonExtensions.swift b/spine-ios/Sources/SpineSwift/Extensions/SkeletonExtensions.swift index b51b9a919..1a56fc52c 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/SkeletonExtensions.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/SkeletonExtensions.swift @@ -36,8 +36,9 @@ extension Skeleton { /// Get the axis-aligned bounding box (AABB) containing all world vertices of the skeleton public var bounds: Bounds { let output = ArrayFloat() - spine_skeleton_get_bounds(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_skeleton_get_bounds( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let bounds = Bounds( x: output[0], y: output[1], @@ -46,13 +47,14 @@ extension Skeleton { ) return bounds } - + /// Get the position of the skeleton public func getPosition() -> Vector { let output = ArrayFloat() - spine_skeleton_get_position_v(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), - output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_skeleton_get_position_v( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + output._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) let position = Vector(x: output[0], y: output[1]) return position } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Extensions/SkinExtensions.swift b/spine-ios/Sources/SpineSwift/Extensions/SkinExtensions.swift index 26ce5d243..b80c23cf4 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/SkinExtensions.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/SkinExtensions.swift @@ -38,29 +38,29 @@ extension Skin { guard let entriesPtr = spine_skin_get_entries(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) else { return [] } - + defer { spine_skin_entries_dispose(entriesPtr) } - + let numEntries = Int(spine_skin_entries_get_num_entries(entriesPtr)) var entries: [SkinEntry] = [] - + for i in 0.. Atlas { let result = spine_atlas_load(atlasData) - + // Check for error if let errorPtr = spine_atlas_result_get_error(result) { let error = String(cString: errorPtr) spine_atlas_result_dispose(result) throw SpineError("Couldn't load atlas: \(error)") } - + // Get atlas guard let atlasPtr = spine_atlas_result_get_atlas(result) else { spine_atlas_result_dispose(result) throw SpineError("Couldn't get atlas from result") } - + let atlas = Atlas(fromPointer: atlasPtr) spine_atlas_result_dispose(result) return atlas @@ -88,20 +88,20 @@ public func loadAtlas(_ atlasData: String) throws -> Atlas { /// Load skeleton data from JSON string public func loadSkeletonDataJson(atlas: Atlas, jsonData: String, path: String = "") throws -> SkeletonData { let result = spine_skeleton_data_load_json(atlas._ptr.assumingMemoryBound(to: spine_atlas_wrapper.self), jsonData, path) - + // Check for error if let errorPtr = spine_skeleton_data_result_get_error(result) { let error = String(cString: errorPtr) spine_skeleton_data_result_dispose(result) throw SpineError("Couldn't load skeleton data: \(error)") } - + // Get skeleton data guard let skeletonDataPtr = spine_skeleton_data_result_get_data(result) else { spine_skeleton_data_result_dispose(result) throw SpineError("Couldn't get skeleton data from result") } - + let skeletonData = SkeletonData(fromPointer: skeletonDataPtr) spine_skeleton_data_result_dispose(result) return skeletonData @@ -117,20 +117,20 @@ public func loadSkeletonDataBinary(atlas: Atlas, binaryData: Data, path: String path ) } - + // Check for error if let errorPtr = spine_skeleton_data_result_get_error(result) { let error = String(cString: errorPtr) spine_skeleton_data_result_dispose(result) throw SpineError("Couldn't load skeleton data: \(error)") } - + // Get skeleton data guard let skeletonDataPtr = spine_skeleton_data_result_get_data(result) else { spine_skeleton_data_result_dispose(result) throw SpineError("Couldn't get skeleton data from result") } - + let skeletonData = SkeletonData(fromPointer: skeletonDataPtr) spine_skeleton_data_result_dispose(result) return skeletonData @@ -140,8 +140,8 @@ public func loadSkeletonDataBinary(atlas: Atlas, binaryData: Data, path: String public struct SpineError: Error, CustomStringConvertible { public let description: String - + public init(_ description: String) { self.description = description } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Extensions/Types.swift b/spine-ios/Sources/SpineSwift/Extensions/Types.swift index b7ab7ada0..d5e66aab0 100644 --- a/spine-ios/Sources/SpineSwift/Extensions/Types.swift +++ b/spine-ios/Sources/SpineSwift/Extensions/Types.swift @@ -37,7 +37,7 @@ public struct Bounds { public var y: Float public var width: Float public var height: Float - + public init(x: Float, y: Float, width: Float, height: Float) { self.x = x self.y = y @@ -50,7 +50,7 @@ public struct Bounds { public struct Vector { public var x: Float public var y: Float - + public init(x: Float, y: Float) { self.x = x self.y = y @@ -62,10 +62,10 @@ public struct SkinEntry { public let slotIndex: Int public let name: String public let attachment: Attachment? - + internal init(slotIndex: Int, name: String, attachment: Attachment?) { self.slotIndex = slotIndex self.name = name self.attachment = attachment } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Animation.swift b/spine-ios/Sources/SpineSwift/Generated/Animation.swift index 01f4270d2..abe8993d7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Animation.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Animation.swift @@ -51,17 +51,18 @@ public class Animation: NSObject { public var timelines: ArrayTimeline { get { let result = spine_animation_get_timelines(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) - return ArrayTimeline(fromPointer: result!) + return ArrayTimeline(fromPointer: result!) } set { - spine_animation_set_timelines(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_timeline_wrapper.self)) + spine_animation_set_timelines( + _ptr.assumingMemoryBound(to: spine_animation_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_timeline_wrapper.self)) } } public var duration: Float { get { let result = spine_animation_get_duration(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) - return result + return result } set { spine_animation_set_duration(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self), newValue) @@ -79,12 +80,19 @@ public class Animation: NSObject { } public func hasTimeline(_ ids: ArrayPropertyId) -> Bool { - let result = spine_animation_has_timeline(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self), ids._ptr.assumingMemoryBound(to: spine_array_property_id_wrapper.self)) + let result = spine_animation_has_timeline( + _ptr.assumingMemoryBound(to: spine_animation_wrapper.self), ids._ptr.assumingMemoryBound(to: spine_array_property_id_wrapper.self)) return result } - public func apply(_ skeleton: Skeleton, _ lastTime: Float, _ time: Float, _ loop: Bool, _ events: ArrayEvent?, _ alpha: Float, _ blend: MixBlend, _ direction: MixDirection, _ appliedPose: Bool) { - spine_animation_apply(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), lastTime, time, loop, events?._ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), spine_mix_direction(rawValue: UInt32(direction.rawValue)), appliedPose) + public func apply( + _ skeleton: Skeleton, _ lastTime: Float, _ time: Float, _ loop: Bool, _ events: ArrayEvent?, _ alpha: Float, _ blend: MixBlend, + _ direction: MixDirection, _ appliedPose: Bool + ) { + spine_animation_apply( + _ptr.assumingMemoryBound(to: spine_animation_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), lastTime, + time, loop, events?._ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), alpha, + spine_mix_blend(rawValue: UInt32(blend.rawValue)), spine_mix_direction(rawValue: UInt32(direction.rawValue)), appliedPose) } public static func search(_ values: ArrayFloat, _ target: Float) -> Int32 { @@ -100,4 +108,4 @@ public class Animation: NSObject { public func dispose() { spine_animation_dispose(_ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Arrays.swift b/spine-ios/Sources/SpineSwift/Generated/Arrays.swift index e75d8aa6e..85ef8876e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Arrays.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Arrays.swift @@ -381,7 +381,8 @@ public class ArrayAnimation: NSObject { /// Adds a value to the end of this array public func add(_ value: Animation?) { - spine_array_animation_add(_ptr.assumingMemoryBound(to: spine_array_animation_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) + spine_array_animation_add( + _ptr.assumingMemoryBound(to: spine_array_animation_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) } /// Removes all elements from this array @@ -459,7 +460,8 @@ public class ArrayAtlasPage: NSObject { /// Adds a value to the end of this array public func add(_ value: AtlasPage?) { - spine_array_atlas_page_add(_ptr.assumingMemoryBound(to: spine_array_atlas_page_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) + spine_array_atlas_page_add( + _ptr.assumingMemoryBound(to: spine_array_atlas_page_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) } /// Removes all elements from this array @@ -537,7 +539,8 @@ public class ArrayAtlasRegion: NSObject { /// Adds a value to the end of this array public func add(_ value: AtlasRegion?) { - spine_array_atlas_region_add(_ptr.assumingMemoryBound(to: spine_array_atlas_region_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) + spine_array_atlas_region_add( + _ptr.assumingMemoryBound(to: spine_array_atlas_region_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) } /// Removes all elements from this array @@ -611,29 +614,31 @@ public class ArrayAttachment: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_attachment_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) - case "spine_clipping_attachment": - return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) - case "spine_mesh_attachment": - return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - case "spine_path_attachment": - return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - case "spine_point_attachment": - return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - case "spine_region_attachment": - return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_bounding_box_attachment": + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + case "spine_clipping_attachment": + return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) + case "spine_mesh_attachment": + return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) + case "spine_path_attachment": + return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) + case "spine_point_attachment": + return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) + case "spine_region_attachment": + return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") + } } } /// Adds a value to the end of this array public func add(_ value: Attachment?) { - spine_array_attachment_add(_ptr.assumingMemoryBound(to: spine_array_attachment_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) + spine_array_attachment_add( + _ptr.assumingMemoryBound(to: spine_array_attachment_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) } /// Removes all elements from this array @@ -711,7 +716,8 @@ public class ArrayBone: NSObject { /// Adds a value to the end of this array public func add(_ value: Bone?) { - spine_array_bone_add(_ptr.assumingMemoryBound(to: spine_array_bone_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + spine_array_bone_add( + _ptr.assumingMemoryBound(to: spine_array_bone_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } /// Removes all elements from this array @@ -789,7 +795,8 @@ public class ArrayBoneData: NSObject { /// Adds a value to the end of this array public func add(_ value: BoneData?) { - spine_array_bone_data_add(_ptr.assumingMemoryBound(to: spine_array_bone_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) + spine_array_bone_data_add( + _ptr.assumingMemoryBound(to: spine_array_bone_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } /// Removes all elements from this array @@ -867,7 +874,8 @@ public class ArrayBonePose: NSObject { /// Adds a value to the end of this array public func add(_ value: BonePose?) { - spine_array_bone_pose_add(_ptr.assumingMemoryBound(to: spine_array_bone_pose_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) + spine_array_bone_pose_add( + _ptr.assumingMemoryBound(to: spine_array_bone_pose_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) } /// Removes all elements from this array @@ -945,7 +953,9 @@ public class ArrayBoundingBoxAttachment: NSObject { /// Adds a value to the end of this array public func add(_ value: BoundingBoxAttachment?) { - spine_array_bounding_box_attachment_add(_ptr.assumingMemoryBound(to: spine_array_bounding_box_attachment_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + spine_array_bounding_box_attachment_add( + _ptr.assumingMemoryBound(to: spine_array_bounding_box_attachment_wrapper.self), + value?._ptr.assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) } /// Removes all elements from this array @@ -966,7 +976,8 @@ public class ArrayBoundingBoxAttachment: NSObject { public var length: Int { get { count } set { - spine_array_bounding_box_attachment_set_size(_ptr.assumingMemoryBound(to: spine_array_bounding_box_attachment_wrapper.self), newValue, nil) + spine_array_bounding_box_attachment_set_size( + _ptr.assumingMemoryBound(to: spine_array_bounding_box_attachment_wrapper.self), newValue, nil) } } @@ -1019,27 +1030,28 @@ public class ArrayConstraint: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_constraint_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_ik_constraint": - return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) - case "spine_path_constraint": - return PathConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_wrapper.self)) - case "spine_physics_constraint": - return PhysicsConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) - case "spine_slider": - return Slider(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_wrapper.self)) - case "spine_transform_constraint": - return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_ik_constraint": + return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) + case "spine_path_constraint": + return PathConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_wrapper.self)) + case "spine_physics_constraint": + return PhysicsConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) + case "spine_slider": + return Slider(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_wrapper.self)) + case "spine_transform_constraint": + return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint") + } } } /// Adds a value to the end of this array public func add(_ value: Constraint?) { - spine_array_constraint_add(_ptr.assumingMemoryBound(to: spine_array_constraint_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_constraint_wrapper.self)) + spine_array_constraint_add( + _ptr.assumingMemoryBound(to: spine_array_constraint_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_constraint_wrapper.self)) } /// Removes all elements from this array @@ -1113,27 +1125,31 @@ public class ArrayConstraintData: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_constraint_data_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_ik_constraint_data": - return IkConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self)) - case "spine_path_constraint_data": - return PathConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - case "spine_physics_constraint_data": - return PhysicsConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - case "spine_slider_data": - return SliderData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_data_wrapper.self)) - case "spine_transform_constraint_data": - return TransformConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class ConstraintData") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_ik_constraint_data": + return IkConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self)) + case "spine_path_constraint_data": + return PathConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) + case "spine_physics_constraint_data": + return PhysicsConstraintData( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) + case "spine_slider_data": + return SliderData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_data_wrapper.self)) + case "spine_transform_constraint_data": + return TransformConstraintData( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class ConstraintData") + } } } /// Adds a value to the end of this array public func add(_ value: ConstraintData?) { - spine_array_constraint_data_add(_ptr.assumingMemoryBound(to: spine_array_constraint_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_constraint_data_wrapper.self)) + spine_array_constraint_data_add( + _ptr.assumingMemoryBound(to: spine_array_constraint_data_wrapper.self), + value?._ptr.assumingMemoryBound(to: spine_constraint_data_wrapper.self)) } /// Removes all elements from this array @@ -1211,7 +1227,8 @@ public class ArrayEvent: NSObject { /// Adds a value to the end of this array public func add(_ value: Event?) { - spine_array_event_add(_ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) + spine_array_event_add( + _ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) } /// Removes all elements from this array @@ -1289,7 +1306,8 @@ public class ArrayEventData: NSObject { /// Adds a value to the end of this array public func add(_ value: EventData?) { - spine_array_event_data_add(_ptr.assumingMemoryBound(to: spine_array_event_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) + spine_array_event_data_add( + _ptr.assumingMemoryBound(to: spine_array_event_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) } /// Removes all elements from this array @@ -1363,29 +1381,31 @@ public class ArrayFromProperty: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_from_property_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_from_rotate": - return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self)) - case "spine_from_scale_x": - return FromScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_x_wrapper.self)) - case "spine_from_scale_y": - return FromScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_y_wrapper.self)) - case "spine_from_shear_y": - return FromShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_shear_y_wrapper.self)) - case "spine_from_x": - return FromX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_x_wrapper.self)) - case "spine_from_y": - return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_from_rotate": + return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self)) + case "spine_from_scale_x": + return FromScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_x_wrapper.self)) + case "spine_from_scale_y": + return FromScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_y_wrapper.self)) + case "spine_from_shear_y": + return FromShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_shear_y_wrapper.self)) + case "spine_from_x": + return FromX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_x_wrapper.self)) + case "spine_from_y": + return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty") + } } } /// Adds a value to the end of this array public func add(_ value: FromProperty?) { - spine_array_from_property_add(_ptr.assumingMemoryBound(to: spine_array_from_property_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_from_property_wrapper.self)) + spine_array_from_property_add( + _ptr.assumingMemoryBound(to: spine_array_from_property_wrapper.self), + value?._ptr.assumingMemoryBound(to: spine_from_property_wrapper.self)) } /// Removes all elements from this array @@ -1463,7 +1483,9 @@ public class ArrayPhysicsConstraint: NSObject { /// Adds a value to the end of this array public func add(_ value: PhysicsConstraint?) { - spine_array_physics_constraint_add(_ptr.assumingMemoryBound(to: spine_array_physics_constraint_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) + spine_array_physics_constraint_add( + _ptr.assumingMemoryBound(to: spine_array_physics_constraint_wrapper.self), + value?._ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) } /// Removes all elements from this array @@ -1541,7 +1563,8 @@ public class ArrayPolygon: NSObject { /// Adds a value to the end of this array public func add(_ value: Polygon?) { - spine_array_polygon_add(_ptr.assumingMemoryBound(to: spine_array_polygon_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) + spine_array_polygon_add( + _ptr.assumingMemoryBound(to: spine_array_polygon_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) } /// Removes all elements from this array @@ -1619,7 +1642,8 @@ public class ArraySkin: NSObject { /// Adds a value to the end of this array public func add(_ value: Skin?) { - spine_array_skin_add(_ptr.assumingMemoryBound(to: spine_array_skin_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) + spine_array_skin_add( + _ptr.assumingMemoryBound(to: spine_array_skin_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) } /// Removes all elements from this array @@ -1697,7 +1721,8 @@ public class ArraySlot: NSObject { /// Adds a value to the end of this array public func add(_ value: Slot?) { - spine_array_slot_add(_ptr.assumingMemoryBound(to: spine_array_slot_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) + spine_array_slot_add( + _ptr.assumingMemoryBound(to: spine_array_slot_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) } /// Removes all elements from this array @@ -1775,7 +1800,8 @@ public class ArraySlotData: NSObject { /// Adds a value to the end of this array public func add(_ value: SlotData?) { - spine_array_slot_data_add(_ptr.assumingMemoryBound(to: spine_array_slot_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) + spine_array_slot_data_add( + _ptr.assumingMemoryBound(to: spine_array_slot_data_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) } /// Removes all elements from this array @@ -1853,7 +1879,9 @@ public class ArrayTextureRegion: NSObject { /// Adds a value to the end of this array public func add(_ value: TextureRegion?) { - spine_array_texture_region_add(_ptr.assumingMemoryBound(to: spine_array_texture_region_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) + spine_array_texture_region_add( + _ptr.assumingMemoryBound(to: spine_array_texture_region_wrapper.self), + value?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) } /// Removes all elements from this array @@ -1927,89 +1955,103 @@ public class ArrayTimeline: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_timeline_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_alpha_timeline": - return AlphaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_alpha_timeline_wrapper.self)) - case "spine_attachment_timeline": - return AttachmentTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_timeline_wrapper.self)) - case "spine_deform_timeline": - return DeformTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_deform_timeline_wrapper.self)) - case "spine_draw_order_timeline": - return DrawOrderTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_draw_order_timeline_wrapper.self)) - case "spine_event_timeline": - return EventTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_event_timeline_wrapper.self)) - case "spine_ik_constraint_timeline": - return IkConstraintTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self)) - case "spine_inherit_timeline": - return InheritTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_inherit_timeline_wrapper.self)) - case "spine_path_constraint_mix_timeline": - return PathConstraintMixTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self)) - case "spine_path_constraint_position_timeline": - return PathConstraintPositionTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_position_timeline_wrapper.self)) - case "spine_path_constraint_spacing_timeline": - return PathConstraintSpacingTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_spacing_timeline_wrapper.self)) - case "spine_physics_constraint_damping_timeline": - return PhysicsConstraintDampingTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_damping_timeline_wrapper.self)) - case "spine_physics_constraint_gravity_timeline": - return PhysicsConstraintGravityTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_gravity_timeline_wrapper.self)) - case "spine_physics_constraint_inertia_timeline": - return PhysicsConstraintInertiaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_inertia_timeline_wrapper.self)) - case "spine_physics_constraint_mass_timeline": - return PhysicsConstraintMassTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_mass_timeline_wrapper.self)) - case "spine_physics_constraint_mix_timeline": - return PhysicsConstraintMixTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_mix_timeline_wrapper.self)) - case "spine_physics_constraint_reset_timeline": - return PhysicsConstraintResetTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self)) - case "spine_physics_constraint_strength_timeline": - return PhysicsConstraintStrengthTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_strength_timeline_wrapper.self)) - case "spine_physics_constraint_wind_timeline": - return PhysicsConstraintWindTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wind_timeline_wrapper.self)) - case "spine_rgb2_timeline": - return Rgb2Timeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgb2_timeline_wrapper.self)) - case "spine_rgba2_timeline": - return Rgba2Timeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgba2_timeline_wrapper.self)) - case "spine_rgba_timeline": - return RgbaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgba_timeline_wrapper.self)) - case "spine_rgb_timeline": - return RgbTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgb_timeline_wrapper.self)) - case "spine_rotate_timeline": - return RotateTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rotate_timeline_wrapper.self)) - case "spine_scale_timeline": - return ScaleTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_timeline_wrapper.self)) - case "spine_scale_x_timeline": - return ScaleXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_x_timeline_wrapper.self)) - case "spine_scale_y_timeline": - return ScaleYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_y_timeline_wrapper.self)) - case "spine_sequence_timeline": - return SequenceTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_sequence_timeline_wrapper.self)) - case "spine_shear_timeline": - return ShearTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_timeline_wrapper.self)) - case "spine_shear_x_timeline": - return ShearXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_x_timeline_wrapper.self)) - case "spine_shear_y_timeline": - return ShearYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_y_timeline_wrapper.self)) - case "spine_slider_mix_timeline": - return SliderMixTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_mix_timeline_wrapper.self)) - case "spine_slider_timeline": - return SliderTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_timeline_wrapper.self)) - case "spine_transform_constraint_timeline": - return TransformConstraintTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self)) - case "spine_translate_timeline": - return TranslateTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_timeline_wrapper.self)) - case "spine_translate_x_timeline": - return TranslateXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_x_timeline_wrapper.self)) - case "spine_translate_y_timeline": - return TranslateYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_y_timeline_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Timeline") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_alpha_timeline": + return AlphaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_alpha_timeline_wrapper.self)) + case "spine_attachment_timeline": + return AttachmentTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_timeline_wrapper.self)) + case "spine_deform_timeline": + return DeformTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_deform_timeline_wrapper.self)) + case "spine_draw_order_timeline": + return DrawOrderTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_draw_order_timeline_wrapper.self)) + case "spine_event_timeline": + return EventTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_event_timeline_wrapper.self)) + case "spine_ik_constraint_timeline": + return IkConstraintTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self)) + case "spine_inherit_timeline": + return InheritTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_inherit_timeline_wrapper.self)) + case "spine_path_constraint_mix_timeline": + return PathConstraintMixTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self)) + case "spine_path_constraint_position_timeline": + return PathConstraintPositionTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_position_timeline_wrapper.self)) + case "spine_path_constraint_spacing_timeline": + return PathConstraintSpacingTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_spacing_timeline_wrapper.self)) + case "spine_physics_constraint_damping_timeline": + return PhysicsConstraintDampingTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_damping_timeline_wrapper.self)) + case "spine_physics_constraint_gravity_timeline": + return PhysicsConstraintGravityTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_gravity_timeline_wrapper.self)) + case "spine_physics_constraint_inertia_timeline": + return PhysicsConstraintInertiaTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_inertia_timeline_wrapper.self)) + case "spine_physics_constraint_mass_timeline": + return PhysicsConstraintMassTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_mass_timeline_wrapper.self)) + case "spine_physics_constraint_mix_timeline": + return PhysicsConstraintMixTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_mix_timeline_wrapper.self)) + case "spine_physics_constraint_reset_timeline": + return PhysicsConstraintResetTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self)) + case "spine_physics_constraint_strength_timeline": + return PhysicsConstraintStrengthTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_strength_timeline_wrapper.self)) + case "spine_physics_constraint_wind_timeline": + return PhysicsConstraintWindTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wind_timeline_wrapper.self)) + case "spine_rgb2_timeline": + return Rgb2Timeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgb2_timeline_wrapper.self)) + case "spine_rgba2_timeline": + return Rgba2Timeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgba2_timeline_wrapper.self)) + case "spine_rgba_timeline": + return RgbaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgba_timeline_wrapper.self)) + case "spine_rgb_timeline": + return RgbTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rgb_timeline_wrapper.self)) + case "spine_rotate_timeline": + return RotateTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_rotate_timeline_wrapper.self)) + case "spine_scale_timeline": + return ScaleTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_timeline_wrapper.self)) + case "spine_scale_x_timeline": + return ScaleXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_x_timeline_wrapper.self)) + case "spine_scale_y_timeline": + return ScaleYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_scale_y_timeline_wrapper.self)) + case "spine_sequence_timeline": + return SequenceTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_sequence_timeline_wrapper.self)) + case "spine_shear_timeline": + return ShearTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_timeline_wrapper.self)) + case "spine_shear_x_timeline": + return ShearXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_x_timeline_wrapper.self)) + case "spine_shear_y_timeline": + return ShearYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_shear_y_timeline_wrapper.self)) + case "spine_slider_mix_timeline": + return SliderMixTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_mix_timeline_wrapper.self)) + case "spine_slider_timeline": + return SliderTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_timeline_wrapper.self)) + case "spine_transform_constraint_timeline": + return TransformConstraintTimeline( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self)) + case "spine_translate_timeline": + return TranslateTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_timeline_wrapper.self)) + case "spine_translate_x_timeline": + return TranslateXTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_x_timeline_wrapper.self)) + case "spine_translate_y_timeline": + return TranslateYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_y_timeline_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Timeline") + } } } /// Adds a value to the end of this array public func add(_ value: Timeline?) { - spine_array_timeline_add(_ptr.assumingMemoryBound(to: spine_array_timeline_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_timeline_wrapper.self)) + spine_array_timeline_add( + _ptr.assumingMemoryBound(to: spine_array_timeline_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_timeline_wrapper.self)) } /// Removes all elements from this array @@ -2083,29 +2125,30 @@ public class ArrayToProperty: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_to_property_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_to_rotate": - return ToRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_rotate_wrapper.self)) - case "spine_to_scale_x": - return ToScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_scale_x_wrapper.self)) - case "spine_to_scale_y": - return ToScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_scale_y_wrapper.self)) - case "spine_to_shear_y": - return ToShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_shear_y_wrapper.self)) - case "spine_to_x": - return ToX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_x_wrapper.self)) - case "spine_to_y": - return ToY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_y_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class ToProperty") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_to_rotate": + return ToRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_rotate_wrapper.self)) + case "spine_to_scale_x": + return ToScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_scale_x_wrapper.self)) + case "spine_to_scale_y": + return ToScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_scale_y_wrapper.self)) + case "spine_to_shear_y": + return ToShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_shear_y_wrapper.self)) + case "spine_to_x": + return ToX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_x_wrapper.self)) + case "spine_to_y": + return ToY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_y_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class ToProperty") + } } } /// Adds a value to the end of this array public func add(_ value: ToProperty?) { - spine_array_to_property_add(_ptr.assumingMemoryBound(to: spine_array_to_property_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_to_property_wrapper.self)) + spine_array_to_property_add( + _ptr.assumingMemoryBound(to: spine_array_to_property_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_to_property_wrapper.self)) } /// Removes all elements from this array @@ -2183,7 +2226,8 @@ public class ArrayTrackEntry: NSObject { /// Adds a value to the end of this array public func add(_ value: TrackEntry?) { - spine_array_track_entry_add(_ptr.assumingMemoryBound(to: spine_array_track_entry_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) + spine_array_track_entry_add( + _ptr.assumingMemoryBound(to: spine_array_track_entry_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) } /// Removes all elements from this array @@ -2257,31 +2301,32 @@ public class ArrayUpdate: NSObject { let elementPtr = buffer[Int(index)] guard let ptr = elementPtr else { return nil } let rtti = spine_update_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_bone": - return Bone(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_wrapper.self)) - case "spine_bone_pose": - return BonePose(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - case "spine_ik_constraint": - return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) - case "spine_path_constraint": - return PathConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_wrapper.self)) - case "spine_physics_constraint": - return PhysicsConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) - case "spine_slider": - return Slider(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_wrapper.self)) - case "spine_transform_constraint": - return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Update") - } + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_bone": + return Bone(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_wrapper.self)) + case "spine_bone_pose": + return BonePose(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_pose_wrapper.self)) + case "spine_ik_constraint": + return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) + case "spine_path_constraint": + return PathConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_constraint_wrapper.self)) + case "spine_physics_constraint": + return PhysicsConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) + case "spine_slider": + return Slider(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slider_wrapper.self)) + case "spine_transform_constraint": + return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Update") + } } } /// Adds a value to the end of this array public func add(_ value: Update?) { - spine_array_update_add(_ptr.assumingMemoryBound(to: spine_array_update_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_update_wrapper.self)) + spine_array_update_add( + _ptr.assumingMemoryBound(to: spine_array_update_wrapper.self), value?._ptr.assumingMemoryBound(to: spine_update_wrapper.self)) } /// Removes all elements from this array @@ -2316,4 +2361,4 @@ public class ArrayUpdate: NSObject { spine_array_update_dispose(_ptr.assumingMemoryBound(to: spine_array_update_wrapper.self)) } } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Atlas.swift b/spine-ios/Sources/SpineSwift/Generated/Atlas.swift index 57d113f98..44edee6d8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Atlas.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Atlas.swift @@ -65,4 +65,4 @@ public class Atlas: NSObject { public func dispose() { spine_atlas_dispose(_ptr.assumingMemoryBound(to: spine_atlas_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Attachment.swift b/spine-ios/Sources/SpineSwift/Generated/Attachment.swift index de7f88504..11d739e2e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Attachment.swift @@ -64,7 +64,8 @@ open class Attachment: NSObject { let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) case "spine_clipping_attachment": return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) case "spine_mesh_attachment": @@ -93,4 +94,4 @@ open class Attachment: NSObject { return Rtti(fromPointer: result!) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Bone.swift b/spine-ios/Sources/SpineSwift/Generated/Bone.swift index e979b6c8d..3f71e6aff 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Bone.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Bone.swift @@ -42,12 +42,14 @@ public class Bone: PosedActive, Posed, Update { } public convenience init(_ data: BoneData, _ parent: Bone?) { - let ptr = spine_bone_create(data._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self), parent?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + let ptr = spine_bone_create( + data._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self), parent?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) self.init(fromPointer: ptr!) } public static func from(_ bone: Bone, _ parent: Bone?) -> Bone { - let ptr = spine_bone_create2(bone._ptr.assumingMemoryBound(to: spine_bone_wrapper.self), parent?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + let ptr = spine_bone_create2( + bone._ptr.assumingMemoryBound(to: spine_bone_wrapper.self), parent?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) return Bone(fromPointer: ptr!) } @@ -96,7 +98,9 @@ public class Bone: PosedActive, Posed, Update { } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_bone_update(_ptr.assumingMemoryBound(to: spine_bone_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_bone_update( + _ptr.assumingMemoryBound(to: spine_bone_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func resetConstrained() { @@ -115,4 +119,4 @@ public class Bone: PosedActive, Posed, Update { public override func dispose() { spine_bone_dispose(_ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Color.swift b/spine-ios/Sources/SpineSwift/Generated/Color.swift index defad1351..577ce4137 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Color.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Color.swift @@ -56,7 +56,7 @@ public class Color: NSObject { public var r: Float { get { let result = spine_color_get_r(_ptr.assumingMemoryBound(to: spine_color_wrapper.self)) - return result + return result } set { spine_color_set_r(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), newValue) @@ -66,7 +66,7 @@ public class Color: NSObject { public var g: Float { get { let result = spine_color_get_g(_ptr.assumingMemoryBound(to: spine_color_wrapper.self)) - return result + return result } set { spine_color_set_g(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), newValue) @@ -76,7 +76,7 @@ public class Color: NSObject { public var b: Float { get { let result = spine_color_get_b(_ptr.assumingMemoryBound(to: spine_color_wrapper.self)) - return result + return result } set { spine_color_set_b(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), newValue) @@ -86,7 +86,7 @@ public class Color: NSObject { public var a: Float { get { let result = spine_color_get_a(_ptr.assumingMemoryBound(to: spine_color_wrapper.self)) - return result + return result } set { spine_color_set_a(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), newValue) @@ -122,7 +122,8 @@ public class Color: NSObject { } public func set3(_ other: Color) -> Color { - let result = spine_color_set_3(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), other._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) + let result = spine_color_set_3( + _ptr.assumingMemoryBound(to: spine_color_wrapper.self), other._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) return Color(fromPointer: result!) } @@ -137,11 +138,12 @@ public class Color: NSObject { } public func add3(_ other: Color) -> Color { - let result = spine_color_add_3(_ptr.assumingMemoryBound(to: spine_color_wrapper.self), other._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) + let result = spine_color_add_3( + _ptr.assumingMemoryBound(to: spine_color_wrapper.self), other._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) return Color(fromPointer: result!) } public func dispose() { spine_color_dispose(_ptr.assumingMemoryBound(to: spine_color_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Constraint.swift b/spine-ios/Sources/SpineSwift/Generated/Constraint.swift index b1e4706c1..b42fc8bac 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Constraint.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Constraint.swift @@ -41,4 +41,4 @@ public protocol Constraint: Update { func sort(_ skeleton: Skeleton) func update(_ skeleton: Skeleton, _ physics: Physics) static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Event.swift b/spine-ios/Sources/SpineSwift/Generated/Event.swift index ed57cee51..fbab78174 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Event.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Event.swift @@ -61,7 +61,7 @@ public class Event: NSObject { public var intValue: Int32 { get { let result = spine_event_get_int(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) - return result + return result } set { spine_event_set_int(_ptr.assumingMemoryBound(to: spine_event_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class Event: NSObject { public var floatValue: Float { get { let result = spine_event_get_float(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) - return result + return result } set { spine_event_set_float(_ptr.assumingMemoryBound(to: spine_event_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class Event: NSObject { public var stringValue: String { get { let result = spine_event_get_string(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_event_set_string(_ptr.assumingMemoryBound(to: spine_event_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class Event: NSObject { public var volume: Float { get { let result = spine_event_get_volume(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) - return result + return result } set { spine_event_set_volume(_ptr.assumingMemoryBound(to: spine_event_wrapper.self), newValue) @@ -101,7 +101,7 @@ public class Event: NSObject { public var balance: Float { get { let result = spine_event_get_balance(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) - return result + return result } set { spine_event_set_balance(_ptr.assumingMemoryBound(to: spine_event_wrapper.self), newValue) @@ -111,4 +111,4 @@ public class Event: NSObject { public func dispose() { spine_event_dispose(_ptr.assumingMemoryBound(to: spine_event_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Polygon.swift b/spine-ios/Sources/SpineSwift/Generated/Polygon.swift index 1c2fb772e..c2d0c23a8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Polygon.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Polygon.swift @@ -51,17 +51,18 @@ public class Polygon: NSObject { public var vertices: ArrayFloat { get { let result = spine_polygon_get__vertices(_ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) - return ArrayFloat(fromPointer: result!) + return ArrayFloat(fromPointer: result!) } set { - spine_polygon_set__vertices(_ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_polygon_set__vertices( + _ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } } public var count: Int32 { get { let result = spine_polygon_get__count(_ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) - return result + return result } set { spine_polygon_set__count(_ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), newValue) @@ -71,4 +72,4 @@ public class Polygon: NSObject { public func dispose() { spine_polygon_dispose(_ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Posed.swift b/spine-ios/Sources/SpineSwift/Generated/Posed.swift index 8a85c424e..21e129f53 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Posed.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Posed.swift @@ -38,4 +38,4 @@ public protocol Posed { var isPoseEqualToApplied: Bool { get } func constrained() func resetConstrained() -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Rtti.swift b/spine-ios/Sources/SpineSwift/Generated/Rtti.swift index 934acd7e5..0258d752b 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Rtti.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Rtti.swift @@ -49,16 +49,18 @@ public class Rtti: NSObject { } public func isExactly(_ rtti: Rtti) -> Bool { - let result = spine_rtti_is_exactly(_ptr.assumingMemoryBound(to: spine_rtti_wrapper.self), rtti._ptr.assumingMemoryBound(to: spine_rtti_wrapper.self)) + let result = spine_rtti_is_exactly( + _ptr.assumingMemoryBound(to: spine_rtti_wrapper.self), rtti._ptr.assumingMemoryBound(to: spine_rtti_wrapper.self)) return result } public func instanceOf(_ rtti: Rtti) -> Bool { - let result = spine_rtti_instance_of(_ptr.assumingMemoryBound(to: spine_rtti_wrapper.self), rtti._ptr.assumingMemoryBound(to: spine_rtti_wrapper.self)) + let result = spine_rtti_instance_of( + _ptr.assumingMemoryBound(to: spine_rtti_wrapper.self), rtti._ptr.assumingMemoryBound(to: spine_rtti_wrapper.self)) return result } public func dispose() { spine_rtti_dispose(_ptr.assumingMemoryBound(to: spine_rtti_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Sequence.swift b/spine-ios/Sources/SpineSwift/Generated/Sequence.swift index a402bae8f..6e264cf16 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Sequence.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Sequence.swift @@ -51,7 +51,7 @@ public class Sequence: NSObject { public var id: Int32 { get { let result = spine_sequence_get_id(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) - return result + return result } set { spine_sequence_set_id(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class Sequence: NSObject { public var start: Int32 { get { let result = spine_sequence_get_start(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) - return result + return result } set { spine_sequence_set_start(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class Sequence: NSObject { public var digits: Int32 { get { let result = spine_sequence_get_digits(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) - return result + return result } set { spine_sequence_set_digits(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class Sequence: NSObject { public var setupIndex: Int32 { get { let result = spine_sequence_get_setup_index(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) - return result + return result } set { spine_sequence_set_setup_index(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), newValue) @@ -99,7 +99,9 @@ public class Sequence: NSObject { } public func apply(_ slot: SlotPose?, _ attachment: Attachment?) { - spine_sequence_apply(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), slot?._ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), attachment?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) + spine_sequence_apply( + _ptr.assumingMemoryBound(to: spine_sequence_wrapper.self), slot?._ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), + attachment?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) } public func getPath(_ basePath: String, _ index: Int32) -> String { @@ -110,4 +112,4 @@ public class Sequence: NSObject { public func dispose() { spine_sequence_dispose(_ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Skeleton.swift b/spine-ios/Sources/SpineSwift/Generated/Skeleton.swift index 5bc8b64e3..8b17406e4 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Skeleton.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Skeleton.swift @@ -101,7 +101,7 @@ public class Skeleton: NSObject { public var scaleX: Float { get { let result = spine_skeleton_get_scale_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_scale_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -111,7 +111,7 @@ public class Skeleton: NSObject { public var scaleY: Float { get { let result = spine_skeleton_get_scale_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_scale_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -121,7 +121,7 @@ public class Skeleton: NSObject { public var x: Float { get { let result = spine_skeleton_get_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -131,7 +131,7 @@ public class Skeleton: NSObject { public var y: Float { get { let result = spine_skeleton_get_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -141,7 +141,7 @@ public class Skeleton: NSObject { public var windX: Float { get { let result = spine_skeleton_get_wind_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_wind_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -151,7 +151,7 @@ public class Skeleton: NSObject { public var windY: Float { get { let result = spine_skeleton_get_wind_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_wind_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -161,7 +161,7 @@ public class Skeleton: NSObject { public var gravityX: Float { get { let result = spine_skeleton_get_gravity_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_gravity_x(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -171,7 +171,7 @@ public class Skeleton: NSObject { public var gravityY: Float { get { let result = spine_skeleton_get_gravity_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_gravity_y(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -181,7 +181,7 @@ public class Skeleton: NSObject { public var time: Float { get { let result = spine_skeleton_get_time(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) - return result + return result } set { spine_skeleton_set_time(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue) @@ -191,7 +191,8 @@ public class Skeleton: NSObject { public var setColor: Color { get { fatalError("Setter-only property") } set(newValue) { - spine_skeleton_set_color_1(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) + spine_skeleton_set_color_1( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_color_wrapper.self)) } } @@ -204,11 +205,13 @@ public class Skeleton: NSObject { } public func constrained(_ object: Posed) { - spine_skeleton_constrained(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), object._ptr.assumingMemoryBound(to: spine_posed_wrapper.self)) + spine_skeleton_constrained( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), object._ptr.assumingMemoryBound(to: spine_posed_wrapper.self)) } public func sortBone(_ bone: Bone?) { - spine_skeleton_sort_bone(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), bone?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + spine_skeleton_sort_bone( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), bone?._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } public static func sortReset(_ bones: ArrayBone) { @@ -216,7 +219,8 @@ public class Skeleton: NSObject { } public func updateWorldTransform(_ physics: Physics) { - spine_skeleton_update_world_transform(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_skeleton_update_world_transform( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) } public func setupPose() { @@ -270,7 +274,8 @@ public class Skeleton: NSObject { } public func setSkin2(_ newSkin: Skin?) { - spine_skeleton_set_skin_2(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newSkin?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) + spine_skeleton_set_skin_2( + _ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), newSkin?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) } public func getAttachment(_ slotName: String, _ attachmentName: String) -> Attachment? { @@ -280,7 +285,8 @@ public class Skeleton: NSObject { let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) case "spine_clipping_attachment": return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) case "spine_mesh_attachment": @@ -303,7 +309,8 @@ public class Skeleton: NSObject { let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) case "spine_clipping_attachment": return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) case "spine_mesh_attachment": @@ -326,4 +333,4 @@ public class Skeleton: NSObject { public func dispose() { spine_skeleton_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Skin.swift b/spine-ios/Sources/SpineSwift/Generated/Skin.swift index 6d8382fb8..7f4a4de6f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Skin.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Skin.swift @@ -69,7 +69,9 @@ public class Skin: NSObject { } public func setAttachment(_ slotIndex: Int, _ name: String, _ attachment: Attachment) { - spine_skin_set_attachment(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, name, attachment._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) + spine_skin_set_attachment( + _ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, name, + attachment._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) } public func getAttachment(_ slotIndex: Int, _ name: String) -> Attachment? { @@ -79,7 +81,8 @@ public class Skin: NSObject { let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) case "spine_clipping_attachment": return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) case "spine_mesh_attachment": @@ -100,7 +103,9 @@ public class Skin: NSObject { } public func findAttachmentsForSlot(_ slotIndex: Int, _ attachments: ArrayAttachment) { - spine_skin_find_attachments_for_slot(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, attachments._ptr.assumingMemoryBound(to: spine_array_attachment_wrapper.self)) + spine_skin_find_attachments_for_slot( + _ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, + attachments._ptr.assumingMemoryBound(to: spine_array_attachment_wrapper.self)) } public func addSkin(_ other: Skin) { @@ -114,4 +119,4 @@ public class Skin: NSObject { public func dispose() { spine_skin_dispose(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Slider.swift b/spine-ios/Sources/SpineSwift/Generated/Slider.swift index 60b240a9d..28333b5e0 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Slider.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Slider.swift @@ -42,7 +42,8 @@ public class Slider: PosedActive, Posed, Constraint { } public convenience init(_ data: SliderData, _ skeleton: Skeleton) { - let ptr = spine_slider_create(data._ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_slider_create( + data._ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -59,10 +60,11 @@ public class Slider: PosedActive, Posed, Constraint { public var bone: Bone { get { let result = spine_slider_get_bone(_ptr.assumingMemoryBound(to: spine_slider_wrapper.self)) - return Bone(fromPointer: result!) + return Bone(fromPointer: result!) } set { - spine_slider_set_bone(_ptr.assumingMemoryBound(to: spine_slider_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + spine_slider_set_bone( + _ptr.assumingMemoryBound(to: spine_slider_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } } @@ -87,12 +89,15 @@ public class Slider: PosedActive, Posed, Constraint { } public func copyAttachment(_ skeleton: Skeleton) -> Slider { - let result = spine_slider_copy(_ptr.assumingMemoryBound(to: spine_slider_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_slider_copy( + _ptr.assumingMemoryBound(to: spine_slider_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return Slider(fromPointer: result!) } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_slider_update(_ptr.assumingMemoryBound(to: spine_slider_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_slider_update( + _ptr.assumingMemoryBound(to: spine_slider_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func sort(_ skeleton: Skeleton) { @@ -115,4 +120,4 @@ public class Slider: PosedActive, Posed, Constraint { public override func dispose() { spine_slider_dispose(_ptr.assumingMemoryBound(to: spine_slider_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Slot.swift b/spine-ios/Sources/SpineSwift/Generated/Slot.swift index 7abb41495..a95054a04 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Slot.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Slot.swift @@ -44,7 +44,8 @@ public class Slot: NSObject, Posed { } public convenience init(_ data: SlotData, _ skeleton: Skeleton) { - let ptr = spine_slot_create(data._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_slot_create( + data._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -88,4 +89,4 @@ public class Slot: NSObject, Posed { public func dispose() { spine_slot_dispose(_ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Timeline.swift b/spine-ios/Sources/SpineSwift/Generated/Timeline.swift index 8671126ea..c88874e2f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Timeline.swift @@ -73,8 +73,14 @@ open class Timeline: NSObject { return ArrayPropertyId(fromPointer: result!) } - public func apply(_ skeleton: Skeleton, _ lastTime: Float, _ time: Float, _ events: ArrayEvent?, _ alpha: Float, _ blend: MixBlend, _ direction: MixDirection, _ appliedPose: Bool) { - spine_timeline_apply(_ptr.assumingMemoryBound(to: spine_timeline_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), lastTime, time, events?._ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), spine_mix_direction(rawValue: UInt32(direction.rawValue)), appliedPose) + public func apply( + _ skeleton: Skeleton, _ lastTime: Float, _ time: Float, _ events: ArrayEvent?, _ alpha: Float, _ blend: MixBlend, _ direction: MixDirection, + _ appliedPose: Bool + ) { + spine_timeline_apply( + _ptr.assumingMemoryBound(to: spine_timeline_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), lastTime, + time, events?._ptr.assumingMemoryBound(to: spine_array_event_wrapper.self), alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), + spine_mix_direction(rawValue: UInt32(direction.rawValue)), appliedPose) } public static func rttiStatic() -> Rtti { @@ -82,4 +88,4 @@ open class Timeline: NSObject { return Rtti(fromPointer: result!) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/Update.swift b/spine-ios/Sources/SpineSwift/Generated/Update.swift index ed7580d76..d9d34031d 100644 --- a/spine-ios/Sources/SpineSwift/Generated/Update.swift +++ b/spine-ios/Sources/SpineSwift/Generated/Update.swift @@ -38,4 +38,4 @@ public protocol Update { var rtti: Rtti { get } func update(_ skeleton: Skeleton, _ physics: Physics) static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/alpha_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/alpha_timeline.swift index 1376320e1..1c5175283 100644 --- a/spine-ios/Sources/SpineSwift/Generated/alpha_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/alpha_timeline.swift @@ -49,7 +49,7 @@ public class AlphaTimeline: CurveTimeline1, SlotTimeline { public var slotIndex: Int32 { get { let result = spine_alpha_timeline_get_slot_index(_ptr.assumingMemoryBound(to: spine_alpha_timeline_wrapper.self)) - return result + return result } set { spine_alpha_timeline_set_slot_index(_ptr.assumingMemoryBound(to: spine_alpha_timeline_wrapper.self), newValue) @@ -59,4 +59,4 @@ public class AlphaTimeline: CurveTimeline1, SlotTimeline { public func dispose() { spine_alpha_timeline_dispose(_ptr.assumingMemoryBound(to: spine_alpha_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/animation_state.swift b/spine-ios/Sources/SpineSwift/Generated/animation_state.swift index bc9de2c8d..52f58c2f4 100644 --- a/spine-ios/Sources/SpineSwift/Generated/animation_state.swift +++ b/spine-ios/Sources/SpineSwift/Generated/animation_state.swift @@ -68,7 +68,7 @@ public class AnimationState: NSObject { public var timeScale: Float { get { let result = spine_animation_state_get_time_scale(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self)) - return result + return result } set { spine_animation_state_set_time_scale(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), newValue) @@ -78,7 +78,7 @@ public class AnimationState: NSObject { public var manualTrackEntryDisposal: Bool { get { let result = spine_animation_state_get_manual_track_entry_disposal(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self)) - return result + return result } set { spine_animation_state_set_manual_track_entry_disposal(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), newValue) @@ -95,7 +95,8 @@ public class AnimationState: NSObject { } public func apply(_ skeleton: Skeleton) -> Bool { - let result = spine_animation_state_apply(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_animation_state_apply( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return result } @@ -108,12 +109,14 @@ public class AnimationState: NSObject { } public func setEmptyAnimation(_ trackIndex: Int, _ mixDuration: Float) -> TrackEntry { - let result = spine_animation_state_set_empty_animation(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, mixDuration) + let result = spine_animation_state_set_empty_animation( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, mixDuration) return TrackEntry(fromPointer: result!) } public func addEmptyAnimation(_ trackIndex: Int, _ mixDuration: Float, _ delay: Float) -> TrackEntry { - let result = spine_animation_state_add_empty_animation(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, mixDuration, delay) + let result = spine_animation_state_add_empty_animation( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, mixDuration, delay) return TrackEntry(fromPointer: result!) } @@ -131,30 +134,37 @@ public class AnimationState: NSObject { } public func disposeTrackEntry(_ entry: TrackEntry?) { - spine_animation_state_dispose_track_entry(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), entry?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) + spine_animation_state_dispose_track_entry( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), entry?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) } public func setAnimation(_ trackIndex: Int, _ animationName: String, _ loop: Bool) -> TrackEntry { - let result = spine_animation_state_set_animation_1(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animationName, loop) + let result = spine_animation_state_set_animation_1( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animationName, loop) return TrackEntry(fromPointer: result!) } public func setAnimation2(_ trackIndex: Int, _ animation: Animation, _ loop: Bool) -> TrackEntry { - let result = spine_animation_state_set_animation_2(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animation._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), loop) + let result = spine_animation_state_set_animation_2( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, + animation._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), loop) return TrackEntry(fromPointer: result!) } public func addAnimation(_ trackIndex: Int, _ animationName: String, _ loop: Bool, _ delay: Float) -> TrackEntry { - let result = spine_animation_state_add_animation_1(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animationName, loop, delay) + let result = spine_animation_state_add_animation_1( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animationName, loop, delay) return TrackEntry(fromPointer: result!) } public func addAnimation2(_ trackIndex: Int, _ animation: Animation, _ loop: Bool, _ delay: Float) -> TrackEntry { - let result = spine_animation_state_add_animation_2(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, animation._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), loop, delay) + let result = spine_animation_state_add_animation_2( + _ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self), trackIndex, + animation._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), loop, delay) return TrackEntry(fromPointer: result!) } public func dispose() { spine_animation_state_dispose(_ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/animation_state_data.swift b/spine-ios/Sources/SpineSwift/Generated/animation_state_data.swift index 2d48a07a3..7db603a65 100644 --- a/spine-ios/Sources/SpineSwift/Generated/animation_state_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/animation_state_data.swift @@ -56,7 +56,7 @@ public class AnimationStateData: NSObject { public var defaultMix: Float { get { let result = spine_animation_state_data_get_default_mix(_ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self)) - return result + return result } set { spine_animation_state_data_set_default_mix(_ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self), newValue) @@ -64,7 +64,9 @@ public class AnimationStateData: NSObject { } public func getMix(_ from: Animation, _ to: Animation) -> Float { - let result = spine_animation_state_data_get_mix(_ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self), from._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), to._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) + let result = spine_animation_state_data_get_mix( + _ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self), from._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), + to._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) return result } @@ -77,10 +79,12 @@ public class AnimationStateData: NSObject { } public func setMix2(_ from: Animation, _ to: Animation, _ duration: Float) { - spine_animation_state_data_set_mix_2(_ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self), from._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), to._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), duration) + spine_animation_state_data_set_mix_2( + _ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self), from._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), + to._ptr.assumingMemoryBound(to: spine_animation_wrapper.self), duration) } public func dispose() { spine_animation_state_data_dispose(_ptr.assumingMemoryBound(to: spine_animation_state_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/atlas_attachment_loader.swift b/spine-ios/Sources/SpineSwift/Generated/atlas_attachment_loader.swift index e2fdfdc9f..bfb38882c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/atlas_attachment_loader.swift +++ b/spine-ios/Sources/SpineSwift/Generated/atlas_attachment_loader.swift @@ -49,32 +49,44 @@ public class AtlasAttachmentLoader: NSObject, AttachmentLoader { } public func newRegionAttachment(_ skin: Skin, _ name: String, _ path: String, _ sequence: Sequence?) -> RegionAttachment? { - let result = spine_atlas_attachment_loader_new_region_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name, path, sequence?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) + let result = spine_atlas_attachment_loader_new_region_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), + name, path, sequence?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) return result.map { RegionAttachment(fromPointer: $0) } } public func newMeshAttachment(_ skin: Skin, _ name: String, _ path: String, _ sequence: Sequence?) -> MeshAttachment? { - let result = spine_atlas_attachment_loader_new_mesh_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name, path, sequence?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) + let result = spine_atlas_attachment_loader_new_mesh_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), + name, path, sequence?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) return result.map { MeshAttachment(fromPointer: $0) } } public func newBoundingBoxAttachment(_ skin: Skin, _ name: String) -> BoundingBoxAttachment? { - let result = spine_atlas_attachment_loader_new_bounding_box_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name) + let result = spine_atlas_attachment_loader_new_bounding_box_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name + ) return result.map { BoundingBoxAttachment(fromPointer: $0) } } public func newPathAttachment(_ skin: Skin, _ name: String) -> PathAttachment? { - let result = spine_atlas_attachment_loader_new_path_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name) + let result = spine_atlas_attachment_loader_new_path_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name + ) return result.map { PathAttachment(fromPointer: $0) } } public func newPointAttachment(_ skin: Skin, _ name: String) -> PointAttachment? { - let result = spine_atlas_attachment_loader_new_point_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name) + let result = spine_atlas_attachment_loader_new_point_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name + ) return result.map { PointAttachment(fromPointer: $0) } } public func newClippingAttachment(_ skin: Skin, _ name: String) -> ClippingAttachment? { - let result = spine_atlas_attachment_loader_new_clipping_attachment(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name) + let result = spine_atlas_attachment_loader_new_clipping_attachment( + _ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self), skin._ptr.assumingMemoryBound(to: spine_skin_wrapper.self), name + ) return result.map { ClippingAttachment(fromPointer: $0) } } @@ -86,4 +98,4 @@ public class AtlasAttachmentLoader: NSObject, AttachmentLoader { public func dispose() { spine_atlas_attachment_loader_dispose(_ptr.assumingMemoryBound(to: spine_atlas_attachment_loader_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/atlas_page.swift b/spine-ios/Sources/SpineSwift/Generated/atlas_page.swift index 13c08f974..0febb12d7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/atlas_page.swift +++ b/spine-ios/Sources/SpineSwift/Generated/atlas_page.swift @@ -51,7 +51,7 @@ public class AtlasPage: NSObject { public var name: String { get { let result = spine_atlas_page_get_name(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_atlas_page_set_name(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class AtlasPage: NSObject { public var texturePath: String { get { let result = spine_atlas_page_get_texture_path(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_atlas_page_set_texture_path(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -71,57 +71,62 @@ public class AtlasPage: NSObject { public var format: Format { get { let result = spine_atlas_page_get_format(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return Format(rawValue: Int32(result.rawValue))! + return Format(rawValue: Int32(result.rawValue))! } set { - spine_atlas_page_set_format(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_format(rawValue: UInt32(newValue.rawValue))) + spine_atlas_page_set_format( + _ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_format(rawValue: UInt32(newValue.rawValue))) } } public var minFilter: TextureFilter { get { let result = spine_atlas_page_get_min_filter(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return TextureFilter(rawValue: Int32(result.rawValue))! + return TextureFilter(rawValue: Int32(result.rawValue))! } set { - spine_atlas_page_set_min_filter(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_filter(rawValue: UInt32(newValue.rawValue))) + spine_atlas_page_set_min_filter( + _ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_filter(rawValue: UInt32(newValue.rawValue))) } } public var magFilter: TextureFilter { get { let result = spine_atlas_page_get_mag_filter(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return TextureFilter(rawValue: Int32(result.rawValue))! + return TextureFilter(rawValue: Int32(result.rawValue))! } set { - spine_atlas_page_set_mag_filter(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_filter(rawValue: UInt32(newValue.rawValue))) + spine_atlas_page_set_mag_filter( + _ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_filter(rawValue: UInt32(newValue.rawValue))) } } public var uWrap: TextureWrap { get { let result = spine_atlas_page_get_u_wrap(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return TextureWrap(rawValue: Int32(result.rawValue))! + return TextureWrap(rawValue: Int32(result.rawValue))! } set { - spine_atlas_page_set_u_wrap(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_wrap(rawValue: UInt32(newValue.rawValue))) + spine_atlas_page_set_u_wrap( + _ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_wrap(rawValue: UInt32(newValue.rawValue))) } } public var vWrap: TextureWrap { get { let result = spine_atlas_page_get_v_wrap(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return TextureWrap(rawValue: Int32(result.rawValue))! + return TextureWrap(rawValue: Int32(result.rawValue))! } set { - spine_atlas_page_set_v_wrap(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_wrap(rawValue: UInt32(newValue.rawValue))) + spine_atlas_page_set_v_wrap( + _ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), spine_texture_wrap(rawValue: UInt32(newValue.rawValue))) } } public var width: Int32 { get { let result = spine_atlas_page_get_width(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return result + return result } set { spine_atlas_page_set_width(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -131,7 +136,7 @@ public class AtlasPage: NSObject { public var height: Int32 { get { let result = spine_atlas_page_get_height(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return result + return result } set { spine_atlas_page_set_height(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -141,7 +146,7 @@ public class AtlasPage: NSObject { public var pma: Bool { get { let result = spine_atlas_page_get_pma(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return result + return result } set { spine_atlas_page_set_pma(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -151,7 +156,7 @@ public class AtlasPage: NSObject { public var index: Int32 { get { let result = spine_atlas_page_get_index(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) - return result + return result } set { spine_atlas_page_set_index(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self), newValue) @@ -166,4 +171,4 @@ public class AtlasPage: NSObject { public func dispose() { spine_atlas_page_dispose(_ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/atlas_region.swift b/spine-ios/Sources/SpineSwift/Generated/atlas_region.swift index 863114753..9604cc1d8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/atlas_region.swift +++ b/spine-ios/Sources/SpineSwift/Generated/atlas_region.swift @@ -49,17 +49,18 @@ public class AtlasRegion: TextureRegion { public var page: AtlasPage? { get { let result = spine_atlas_region_get_page(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result.map { AtlasPage(fromPointer: $0) } + return result.map { AtlasPage(fromPointer: $0) } } set { - spine_atlas_region_set_page(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) + spine_atlas_region_set_page( + _ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_atlas_page_wrapper.self)) } } public var name: String { get { let result = spine_atlas_region_get_name(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_atlas_region_set_name(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -69,7 +70,7 @@ public class AtlasRegion: TextureRegion { public var index: Int32 { get { let result = spine_atlas_region_get_index(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_index(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -79,7 +80,7 @@ public class AtlasRegion: TextureRegion { public var x: Int32 { get { let result = spine_atlas_region_get_x(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_x(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -89,7 +90,7 @@ public class AtlasRegion: TextureRegion { public var y: Int32 { get { let result = spine_atlas_region_get_y(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_y(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -99,7 +100,7 @@ public class AtlasRegion: TextureRegion { public var offsetX: Float { get { let result = spine_atlas_region_get_offset_x(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_offset_x(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -109,7 +110,7 @@ public class AtlasRegion: TextureRegion { public var offsetY: Float { get { let result = spine_atlas_region_get_offset_y(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_offset_y(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -119,7 +120,7 @@ public class AtlasRegion: TextureRegion { public var packedWidth: Int32 { get { let result = spine_atlas_region_get_packed_width(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_packed_width(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -129,7 +130,7 @@ public class AtlasRegion: TextureRegion { public var packedHeight: Int32 { get { let result = spine_atlas_region_get_packed_height(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_packed_height(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -139,7 +140,7 @@ public class AtlasRegion: TextureRegion { public var originalWidth: Int32 { get { let result = spine_atlas_region_get_original_width(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_original_width(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -149,7 +150,7 @@ public class AtlasRegion: TextureRegion { public var originalHeight: Int32 { get { let result = spine_atlas_region_get_original_height(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_original_height(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -159,7 +160,7 @@ public class AtlasRegion: TextureRegion { public var rotate: Bool { get { let result = spine_atlas_region_get_rotate(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_rotate(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -169,7 +170,7 @@ public class AtlasRegion: TextureRegion { public var degrees: Int32 { get { let result = spine_atlas_region_get_degrees(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return result + return result } set { spine_atlas_region_set_degrees(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue) @@ -179,34 +180,37 @@ public class AtlasRegion: TextureRegion { public var splits: ArrayInt { get { let result = spine_atlas_region_get_splits(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return ArrayInt(fromPointer: result!) + return ArrayInt(fromPointer: result!) } set { - spine_atlas_region_set_splits(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) + spine_atlas_region_set_splits( + _ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) } } public var pads: ArrayInt { get { let result = spine_atlas_region_get_pads(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return ArrayInt(fromPointer: result!) + return ArrayInt(fromPointer: result!) } set { - spine_atlas_region_set_pads(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) + spine_atlas_region_set_pads( + _ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) } } public var values: ArrayFloat { get { let result = spine_atlas_region_get_values(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) - return ArrayFloat(fromPointer: result!) + return ArrayFloat(fromPointer: result!) } set { - spine_atlas_region_set_values(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_atlas_region_set_values( + _ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } } public override func dispose() { spine_atlas_region_dispose(_ptr.assumingMemoryBound(to: spine_atlas_region_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/attachment_loader.swift b/spine-ios/Sources/SpineSwift/Generated/attachment_loader.swift index eccd9ffa6..14c7c1fb7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/attachment_loader.swift +++ b/spine-ios/Sources/SpineSwift/Generated/attachment_loader.swift @@ -41,4 +41,4 @@ public protocol AttachmentLoader { func newPathAttachment(_ skin: Skin, _ name: String) -> PathAttachment? func newPointAttachment(_ skin: Skin, _ name: String) -> PointAttachment? func newClippingAttachment(_ skin: Skin, _ name: String) -> ClippingAttachment? -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/attachment_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/attachment_timeline.swift index 8b739792b..a9683a9e8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/attachment_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/attachment_timeline.swift @@ -49,7 +49,7 @@ public class AttachmentTimeline: Timeline, SlotTimeline { public var slotIndex: Int32 { get { let result = spine_attachment_timeline_get_slot_index(_ptr.assumingMemoryBound(to: spine_attachment_timeline_wrapper.self)) - return result + return result } set { spine_attachment_timeline_set_slot_index(_ptr.assumingMemoryBound(to: spine_attachment_timeline_wrapper.self), newValue) @@ -63,4 +63,4 @@ public class AttachmentTimeline: Timeline, SlotTimeline { public func dispose() { spine_attachment_timeline_dispose(_ptr.assumingMemoryBound(to: spine_attachment_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/attachment_type.swift b/spine-ios/Sources/SpineSwift/Generated/attachment_type.swift index c3ee65cf3..41e8e5409 100644 --- a/spine-ios/Sources/SpineSwift/Generated/attachment_type.swift +++ b/spine-ios/Sources/SpineSwift/Generated/attachment_type.swift @@ -44,4 +44,4 @@ public enum AttachmentType: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> AttachmentType? { return AttachmentType(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/blend_mode.swift b/spine-ios/Sources/SpineSwift/Generated/blend_mode.swift index 188c2c8ff..d1f8a47ea 100644 --- a/spine-ios/Sources/SpineSwift/Generated/blend_mode.swift +++ b/spine-ios/Sources/SpineSwift/Generated/blend_mode.swift @@ -41,4 +41,4 @@ public enum BlendMode: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> BlendMode? { return BlendMode(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_data.swift b/spine-ios/Sources/SpineSwift/Generated/bone_data.swift index 69b4f5574..3d9d808b9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_data.swift @@ -59,7 +59,7 @@ public class BoneData: PosedData { public var length: Float { get { let result = spine_bone_data_get_length(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) - return result + return result } set { spine_bone_data_set_length(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self), newValue) @@ -74,7 +74,7 @@ public class BoneData: PosedData { public var icon: String { get { let result = spine_bone_data_get_icon(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_bone_data_set_icon(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self), newValue) @@ -84,7 +84,7 @@ public class BoneData: PosedData { public var visible: Bool { get { let result = spine_bone_data_get_visible(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) - return result + return result } set { spine_bone_data_set_visible(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self), newValue) @@ -99,4 +99,4 @@ public class BoneData: PosedData { public override func dispose() { spine_bone_data_dispose(_ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_local.swift b/spine-ios/Sources/SpineSwift/Generated/bone_local.swift index c496b7ea3..804ecceea 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_local.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_local.swift @@ -51,7 +51,7 @@ public class BoneLocal: NSObject { public var x: Float { get { let result = spine_bone_local_get_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class BoneLocal: NSObject { public var y: Float { get { let result = spine_bone_local_get_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class BoneLocal: NSObject { public var rotation: Float { get { let result = spine_bone_local_get_rotation(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_rotation(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class BoneLocal: NSObject { public var scaleX: Float { get { let result = spine_bone_local_get_scale_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_scale_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class BoneLocal: NSObject { public var scaleY: Float { get { let result = spine_bone_local_get_scale_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_scale_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -101,7 +101,7 @@ public class BoneLocal: NSObject { public var shearX: Float { get { let result = spine_bone_local_get_shear_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_shear_x(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -111,7 +111,7 @@ public class BoneLocal: NSObject { public var shearY: Float { get { let result = spine_bone_local_get_shear_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return result + return result } set { spine_bone_local_set_shear_y(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), newValue) @@ -121,10 +121,11 @@ public class BoneLocal: NSObject { public var inherit: Inherit { get { let result = spine_bone_local_get_inherit(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) - return Inherit(rawValue: Int32(result.rawValue))! + return Inherit(rawValue: Int32(result.rawValue))! } set { - spine_bone_local_set_inherit(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), spine_inherit(rawValue: UInt32(newValue.rawValue))) + spine_bone_local_set_inherit( + _ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), spine_inherit(rawValue: UInt32(newValue.rawValue))) } } @@ -136,7 +137,8 @@ public class BoneLocal: NSObject { } public func set(_ pose: BoneLocal) { - spine_bone_local_set(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) + spine_bone_local_set( + _ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) } public func setPosition(_ x: Float, _ y: Float) { @@ -150,4 +152,4 @@ public class BoneLocal: NSObject { public func dispose() { spine_bone_local_dispose(_ptr.assumingMemoryBound(to: spine_bone_local_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_pose.swift b/spine-ios/Sources/SpineSwift/Generated/bone_pose.swift index d8d1857f3..8c9c6bcdb 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_pose.swift @@ -54,7 +54,7 @@ public class BonePose: BoneLocal, Update { public var a: Float { get { let result = spine_bone_pose_get_a(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_a(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -64,7 +64,7 @@ public class BonePose: BoneLocal, Update { public var b: Float { get { let result = spine_bone_pose_get_b(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_b(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -74,7 +74,7 @@ public class BonePose: BoneLocal, Update { public var c: Float { get { let result = spine_bone_pose_get_c(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_c(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -84,7 +84,7 @@ public class BonePose: BoneLocal, Update { public var d: Float { get { let result = spine_bone_pose_get_d(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_d(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -94,7 +94,7 @@ public class BonePose: BoneLocal, Update { public var worldX: Float { get { let result = spine_bone_pose_get_world_x(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_world_x(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -104,7 +104,7 @@ public class BonePose: BoneLocal, Update { public var worldY: Float { get { let result = spine_bone_pose_get_world_y(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) - return result + return result } set { spine_bone_pose_set_world_y(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), newValue) @@ -132,23 +132,29 @@ public class BonePose: BoneLocal, Update { } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_bone_pose_update(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_bone_pose_update( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func updateWorldTransform(_ skeleton: Skeleton) { - spine_bone_pose_update_world_transform(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_bone_pose_update_world_transform( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func updateLocalTransform(_ skeleton: Skeleton) { - spine_bone_pose_update_local_transform(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_bone_pose_update_local_transform( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func validateLocalTransform(_ skeleton: Skeleton) { - spine_bone_pose_validate_local_transform(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_bone_pose_validate_local_transform( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func modifyLocal(_ skeleton: Skeleton) { - spine_bone_pose_modify_local(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_bone_pose_modify_local( + _ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func modifyWorld(_ update: Int32) { @@ -181,4 +187,4 @@ public class BonePose: BoneLocal, Update { public override func dispose() { spine_bone_pose_dispose(_ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/bone_timeline.swift index aaac3b194..b4c2a7975 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_timeline.swift @@ -38,4 +38,4 @@ public protocol BoneTimeline { var rtti: Rtti { get } var boneIndex: Int32 { get set } static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_timeline1.swift b/spine-ios/Sources/SpineSwift/Generated/bone_timeline1.swift index 74a359e37..022247a74 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_timeline1.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_timeline1.swift @@ -44,11 +44,11 @@ open class BoneTimeline1: CurveTimeline1, BoneTimeline { public var boneIndex: Int32 { get { let result = spine_bone_timeline1_get_bone_index(_ptr.assumingMemoryBound(to: spine_bone_timeline1_wrapper.self)) - return result + return result } set { spine_bone_timeline1_set_bone_index(_ptr.assumingMemoryBound(to: spine_bone_timeline1_wrapper.self), newValue) } } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bone_timeline2.swift b/spine-ios/Sources/SpineSwift/Generated/bone_timeline2.swift index 5fe705468..655f7705e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bone_timeline2.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bone_timeline2.swift @@ -44,7 +44,7 @@ open class BoneTimeline2: CurveTimeline, BoneTimeline { public var boneIndex: Int32 { get { let result = spine_bone_timeline2_get_bone_index(_ptr.assumingMemoryBound(to: spine_bone_timeline2_wrapper.self)) - return result + return result } set { spine_bone_timeline2_set_bone_index(_ptr.assumingMemoryBound(to: spine_bone_timeline2_wrapper.self), newValue) @@ -55,4 +55,4 @@ open class BoneTimeline2: CurveTimeline, BoneTimeline { spine_bone_timeline2_set_frame(_ptr.assumingMemoryBound(to: spine_bone_timeline2_wrapper.self), frame, time, value1, value2) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/bounding_box_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/bounding_box_attachment.swift index 6e76b81cf..6ea99f8e8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/bounding_box_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/bounding_box_attachment.swift @@ -54,4 +54,4 @@ public class BoundingBoxAttachment: VertexAttachment { public func dispose() { spine_bounding_box_attachment_dispose(_ptr.assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/clipping_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/clipping_attachment.swift index cb06b0e70..b05c357a3 100644 --- a/spine-ios/Sources/SpineSwift/Generated/clipping_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/clipping_attachment.swift @@ -49,10 +49,12 @@ public class ClippingAttachment: VertexAttachment { public var endSlot: SlotData? { get { let result = spine_clipping_attachment_get_end_slot(_ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) - return result.map { SlotData(fromPointer: $0) } + return result.map { SlotData(fromPointer: $0) } } set { - spine_clipping_attachment_set_end_slot(_ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) + spine_clipping_attachment_set_end_slot( + _ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) } } @@ -64,4 +66,4 @@ public class ClippingAttachment: VertexAttachment { public func dispose() { spine_clipping_attachment_dispose(_ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/constraint_data.swift b/spine-ios/Sources/SpineSwift/Generated/constraint_data.swift index 8471457e0..e610a49ea 100644 --- a/spine-ios/Sources/SpineSwift/Generated/constraint_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/constraint_data.swift @@ -40,4 +40,4 @@ public protocol ConstraintData { var skinRequired: Bool { get } func createMethod(_ skeleton: Skeleton) -> Constraint static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/constraint_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/constraint_timeline.swift index fb3bcbf6e..924cebf1a 100644 --- a/spine-ios/Sources/SpineSwift/Generated/constraint_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/constraint_timeline.swift @@ -38,4 +38,4 @@ public protocol ConstraintTimeline { var rtti: Rtti { get } var constraintIndex: Int32 { get set } static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/constraint_timeline1.swift b/spine-ios/Sources/SpineSwift/Generated/constraint_timeline1.swift index 1baecd96f..59e2167ca 100644 --- a/spine-ios/Sources/SpineSwift/Generated/constraint_timeline1.swift +++ b/spine-ios/Sources/SpineSwift/Generated/constraint_timeline1.swift @@ -44,11 +44,11 @@ open class ConstraintTimeline1: CurveTimeline1, ConstraintTimeline { public var constraintIndex: Int32 { get { let result = spine_constraint_timeline1_get_constraint_index(_ptr.assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self)) - return result + return result } set { spine_constraint_timeline1_set_constraint_index(_ptr.assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self), newValue) } } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/curve_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/curve_timeline.swift index f5a4b6b21..48e6a7a0d 100644 --- a/spine-ios/Sources/SpineSwift/Generated/curve_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/curve_timeline.swift @@ -60,13 +60,18 @@ open class CurveTimeline: Timeline { return ArrayFloat(fromPointer: result!) } - public func setBezier(_ bezier: Int, _ frame: Int, _ value: Float, _ time1: Float, _ value1: Float, _ cx1: Float, _ cy1: Float, _ cx2: Float, _ cy2: Float, _ time2: Float, _ value2: Float) { - spine_curve_timeline_set_bezier(_ptr.assumingMemoryBound(to: spine_curve_timeline_wrapper.self), bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + public func setBezier( + _ bezier: Int, _ frame: Int, _ value: Float, _ time1: Float, _ value1: Float, _ cx1: Float, _ cy1: Float, _ cx2: Float, _ cy2: Float, + _ time2: Float, _ value2: Float + ) { + spine_curve_timeline_set_bezier( + _ptr.assumingMemoryBound(to: spine_curve_timeline_wrapper.self), bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) } public func getBezierValue(_ time: Float, _ frame: Int, _ valueOffset: Int, _ i: Int) -> Float { - let result = spine_curve_timeline_get_bezier_value(_ptr.assumingMemoryBound(to: spine_curve_timeline_wrapper.self), time, frame, valueOffset, i) + let result = spine_curve_timeline_get_bezier_value( + _ptr.assumingMemoryBound(to: spine_curve_timeline_wrapper.self), time, frame, valueOffset, i) return result } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/curve_timeline1.swift b/spine-ios/Sources/SpineSwift/Generated/curve_timeline1.swift index 838b0fe42..c4aff7818 100644 --- a/spine-ios/Sources/SpineSwift/Generated/curve_timeline1.swift +++ b/spine-ios/Sources/SpineSwift/Generated/curve_timeline1.swift @@ -51,23 +51,32 @@ open class CurveTimeline1: CurveTimeline { } public func getRelativeValue(_ time: Float, _ alpha: Float, _ blend: MixBlend, _ current: Float, _ setup: Float) -> Float { - let result = spine_curve_timeline1_get_relative_value(_ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, setup) + let result = spine_curve_timeline1_get_relative_value( + _ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, + setup) return result } - public func getScaleValue(_ time: Float, _ alpha: Float, _ blend: MixBlend, _ direction: MixDirection, _ current: Float, _ setup: Float) -> Float { - let result = spine_curve_timeline1_get_scale_value(_ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), spine_mix_direction(rawValue: UInt32(direction.rawValue)), current, setup) + public func getScaleValue(_ time: Float, _ alpha: Float, _ blend: MixBlend, _ direction: MixDirection, _ current: Float, _ setup: Float) -> Float + { + let result = spine_curve_timeline1_get_scale_value( + _ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), + spine_mix_direction(rawValue: UInt32(direction.rawValue)), current, setup) return result } public func getAbsoluteValue(_ time: Float, _ alpha: Float, _ blend: MixBlend, _ current: Float, _ setup: Float) -> Float { - let result = spine_curve_timeline1_get_absolute_value_1(_ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, setup) + let result = spine_curve_timeline1_get_absolute_value_1( + _ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, + setup) return result } public func getAbsoluteValue2(_ time: Float, _ alpha: Float, _ blend: MixBlend, _ current: Float, _ setup: Float, _ value: Float) -> Float { - let result = spine_curve_timeline1_get_absolute_value_2(_ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, setup, value) + let result = spine_curve_timeline1_get_absolute_value_2( + _ptr.assumingMemoryBound(to: spine_curve_timeline1_wrapper.self), time, alpha, spine_mix_blend(rawValue: UInt32(blend.rawValue)), current, + setup, value) return result } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/deform_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/deform_timeline.swift index ada310d1c..eb3564f1f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/deform_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/deform_timeline.swift @@ -42,35 +42,42 @@ public class DeformTimeline: SlotCurveTimeline { } public convenience init(_ frameCount: Int, _ bezierCount: Int, _ slotIndex: Int32, _ attachment: VertexAttachment) { - let ptr = spine_deform_timeline_create(frameCount, bezierCount, slotIndex, attachment._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) + let ptr = spine_deform_timeline_create( + frameCount, bezierCount, slotIndex, attachment._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) self.init(fromPointer: ptr!) } public var attachment: VertexAttachment { get { let result = spine_deform_timeline_get_attachment(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self)) - let rtti = spine_vertex_attachment_get_rtti(result!) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) - case "spine_clipping_attachment": - return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) - case "spine_mesh_attachment": - return MeshAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - case "spine_path_attachment": - return PathAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class VertexAttachment") - } + let rtti = spine_vertex_attachment_get_rtti(result!) + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_bounding_box_attachment": + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + case "spine_clipping_attachment": + return ClippingAttachment( + fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) + case "spine_mesh_attachment": + return MeshAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) + case "spine_path_attachment": + return PathAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class VertexAttachment") + } } set { - spine_deform_timeline_set_attachment(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) + spine_deform_timeline_set_attachment( + _ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) } } public func setFrame(_ frameIndex: Int32, _ time: Float, _ vertices: ArrayFloat) { - spine_deform_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self), frameIndex, time, vertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_deform_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self), frameIndex, time, + vertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } public func getCurvePercent(_ time: Float, _ frame: Int32) -> Float { @@ -81,4 +88,4 @@ public class DeformTimeline: SlotCurveTimeline { public func dispose() { spine_deform_timeline_dispose(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/draw_order_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/draw_order_timeline.swift index d67bc4f80..e8c2e3e31 100644 --- a/spine-ios/Sources/SpineSwift/Generated/draw_order_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/draw_order_timeline.swift @@ -47,10 +47,12 @@ public class DrawOrderTimeline: Timeline { } public func setFrame(_ frame: Int, _ time: Float, _ drawOrder: ArrayInt?) { - spine_draw_order_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_draw_order_timeline_wrapper.self), frame, time, drawOrder?._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) + spine_draw_order_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_draw_order_timeline_wrapper.self), frame, time, + drawOrder?._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) } public func dispose() { spine_draw_order_timeline_dispose(_ptr.assumingMemoryBound(to: spine_draw_order_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/event_data.swift b/spine-ios/Sources/SpineSwift/Generated/event_data.swift index 3789588c3..384af3ec7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/event_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/event_data.swift @@ -56,7 +56,7 @@ public class EventData: NSObject { public var intValue: Int32 { get { let result = spine_event_data_get_int(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return result + return result } set { spine_event_data_set_int(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -66,7 +66,7 @@ public class EventData: NSObject { public var floatValue: Float { get { let result = spine_event_data_get_float(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return result + return result } set { spine_event_data_set_float(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -76,7 +76,7 @@ public class EventData: NSObject { public var stringValue: String { get { let result = spine_event_data_get_string(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_event_data_set_string(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -86,7 +86,7 @@ public class EventData: NSObject { public var audioPath: String { get { let result = spine_event_data_get_audio_path(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_event_data_set_audio_path(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -96,7 +96,7 @@ public class EventData: NSObject { public var volume: Float { get { let result = spine_event_data_get_volume(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return result + return result } set { spine_event_data_set_volume(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -106,7 +106,7 @@ public class EventData: NSObject { public var balance: Float { get { let result = spine_event_data_get_balance(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) - return result + return result } set { spine_event_data_set_balance(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self), newValue) @@ -116,4 +116,4 @@ public class EventData: NSObject { public func dispose() { spine_event_data_dispose(_ptr.assumingMemoryBound(to: spine_event_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/event_queue_entry.swift b/spine-ios/Sources/SpineSwift/Generated/event_queue_entry.swift index c046ed239..6ca5c593c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/event_queue_entry.swift +++ b/spine-ios/Sources/SpineSwift/Generated/event_queue_entry.swift @@ -44,41 +44,47 @@ public class EventQueueEntry: NSObject { } public convenience init(_ eventType: EventType, _ trackEntry: TrackEntry?, _ event: Event?) { - let ptr = spine_event_queue_entry_create(spine_event_type(rawValue: UInt32(eventType.rawValue)), trackEntry?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), event?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) + let ptr = spine_event_queue_entry_create( + spine_event_type(rawValue: UInt32(eventType.rawValue)), trackEntry?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), + event?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) self.init(fromPointer: ptr!) } public var type: EventType { get { let result = spine_event_queue_entry_get__type(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self)) - return EventType(rawValue: Int32(result.rawValue))! + return EventType(rawValue: Int32(result.rawValue))! } set { - spine_event_queue_entry_set__type(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), spine_event_type(rawValue: UInt32(newValue.rawValue))) + spine_event_queue_entry_set__type( + _ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), spine_event_type(rawValue: UInt32(newValue.rawValue))) } } public var entry: TrackEntry? { get { let result = spine_event_queue_entry_get__entry(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self)) - return result.map { TrackEntry(fromPointer: $0) } + return result.map { TrackEntry(fromPointer: $0) } } set { - spine_event_queue_entry_set__entry(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) + spine_event_queue_entry_set__entry( + _ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) } } public var event: Event? { get { let result = spine_event_queue_entry_get__event(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self)) - return result.map { Event(fromPointer: $0) } + return result.map { Event(fromPointer: $0) } } set { - spine_event_queue_entry_set__event(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) + spine_event_queue_entry_set__event( + _ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) } } public func dispose() { spine_event_queue_entry_dispose(_ptr.assumingMemoryBound(to: spine_event_queue_entry_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/event_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/event_timeline.swift index 30042b057..8a7974118 100644 --- a/spine-ios/Sources/SpineSwift/Generated/event_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/event_timeline.swift @@ -52,10 +52,11 @@ public class EventTimeline: Timeline { } public func setFrame(_ frame: Int, _ event: Event) { - spine_event_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_event_timeline_wrapper.self), frame, event._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) + spine_event_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_event_timeline_wrapper.self), frame, event._ptr.assumingMemoryBound(to: spine_event_wrapper.self)) } public func dispose() { spine_event_timeline_dispose(_ptr.assumingMemoryBound(to: spine_event_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/event_type.swift b/spine-ios/Sources/SpineSwift/Generated/event_type.swift index 052443823..0720ff776 100644 --- a/spine-ios/Sources/SpineSwift/Generated/event_type.swift +++ b/spine-ios/Sources/SpineSwift/Generated/event_type.swift @@ -43,4 +43,4 @@ public enum EventType: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> EventType? { return EventType(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/format.swift b/spine-ios/Sources/SpineSwift/Generated/format.swift index 56ffd5d33..4a7713976 100644 --- a/spine-ios/Sources/SpineSwift/Generated/format.swift +++ b/spine-ios/Sources/SpineSwift/Generated/format.swift @@ -44,4 +44,4 @@ public enum Format: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> Format? { return Format(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_property.swift b/spine-ios/Sources/SpineSwift/Generated/from_property.swift index f322efea6..9100abcb3 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_property.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_property.swift @@ -51,7 +51,7 @@ open class FromProperty: NSObject { public var offset: Float { get { let result = spine_from_property_get__offset(_ptr.assumingMemoryBound(to: spine_from_property_wrapper.self)) - return result + return result } set { spine_from_property_set__offset(_ptr.assumingMemoryBound(to: spine_from_property_wrapper.self), newValue) @@ -61,10 +61,12 @@ open class FromProperty: NSObject { public var to: ArrayToProperty? { get { let result = spine_from_property_get__to(_ptr.assumingMemoryBound(to: spine_from_property_wrapper.self)) - return result.map { ArrayToProperty(fromPointer: $0) } + return result.map { ArrayToProperty(fromPointer: $0) } } set { - spine_from_property_set__to(_ptr.assumingMemoryBound(to: spine_from_property_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_array_to_property_wrapper.self)) + spine_from_property_set__to( + _ptr.assumingMemoryBound(to: spine_from_property_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_array_to_property_wrapper.self)) } } @@ -73,4 +75,4 @@ open class FromProperty: NSObject { return Rtti(fromPointer: result!) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_rotate.swift b/spine-ios/Sources/SpineSwift/Generated/from_rotate.swift index 8fe1a2033..c3e6e16b0 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_rotate.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_rotate.swift @@ -49,4 +49,4 @@ public class FromRotate: FromProperty { public func dispose() { spine_from_rotate_dispose(_ptr.assumingMemoryBound(to: spine_from_rotate_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_scale_x.swift b/spine-ios/Sources/SpineSwift/Generated/from_scale_x.swift index 00e5a035f..471bbbc87 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_scale_x.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_scale_x.swift @@ -49,4 +49,4 @@ public class FromScaleX: FromProperty { public func dispose() { spine_from_scale_x_dispose(_ptr.assumingMemoryBound(to: spine_from_scale_x_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_scale_y.swift b/spine-ios/Sources/SpineSwift/Generated/from_scale_y.swift index 888354601..30a14294c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_scale_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_scale_y.swift @@ -49,4 +49,4 @@ public class FromScaleY: FromProperty { public func dispose() { spine_from_scale_y_dispose(_ptr.assumingMemoryBound(to: spine_from_scale_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_shear_y.swift b/spine-ios/Sources/SpineSwift/Generated/from_shear_y.swift index cbab7d8c1..23227dd63 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_shear_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_shear_y.swift @@ -49,4 +49,4 @@ public class FromShearY: FromProperty { public func dispose() { spine_from_shear_y_dispose(_ptr.assumingMemoryBound(to: spine_from_shear_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_x.swift b/spine-ios/Sources/SpineSwift/Generated/from_x.swift index c1025416b..9982b4114 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_x.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_x.swift @@ -49,4 +49,4 @@ public class FromX: FromProperty { public func dispose() { spine_from_x_dispose(_ptr.assumingMemoryBound(to: spine_from_x_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/from_y.swift b/spine-ios/Sources/SpineSwift/Generated/from_y.swift index b4633ab39..7e9bfc9b6 100644 --- a/spine-ios/Sources/SpineSwift/Generated/from_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/from_y.swift @@ -49,4 +49,4 @@ public class FromY: FromProperty { public func dispose() { spine_from_y_dispose(_ptr.assumingMemoryBound(to: spine_from_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/ik_constraint.swift b/spine-ios/Sources/SpineSwift/Generated/ik_constraint.swift index f1bf22825..a2adc109a 100644 --- a/spine-ios/Sources/SpineSwift/Generated/ik_constraint.swift +++ b/spine-ios/Sources/SpineSwift/Generated/ik_constraint.swift @@ -42,7 +42,9 @@ public class IkConstraint: PosedActive, Posed, Constraint { } public convenience init(_ data: IkConstraintData, _ skeleton: Skeleton) { - let ptr = spine_ik_constraint_create(data._ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_ik_constraint_create( + data._ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -69,10 +71,11 @@ public class IkConstraint: PosedActive, Posed, Constraint { public var target: Bone { get { let result = spine_ik_constraint_get_target(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) - return Bone(fromPointer: result!) + return Bone(fromPointer: result!) } set { - spine_ik_constraint_set_target(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + spine_ik_constraint_set_target( + _ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } } @@ -92,16 +95,20 @@ public class IkConstraint: PosedActive, Posed, Constraint { } public func copyAttachment(_ skeleton: Skeleton) -> IkConstraint { - let result = spine_ik_constraint_copy(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_ik_constraint_copy( + _ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return IkConstraint(fromPointer: result!) } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_ik_constraint_update(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_ik_constraint_update( + _ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func sort(_ skeleton: Skeleton) { - spine_ik_constraint_sort(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_ik_constraint_sort( + _ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func resetConstrained() { @@ -117,15 +124,24 @@ public class IkConstraint: PosedActive, Posed, Constraint { return Rtti(fromPointer: result!) } - public static func apply(_ skeleton: Skeleton, _ bone: BonePose, _ targetX: Float, _ targetY: Float, _ compress: Bool, _ stretch: Bool, _ uniform: Bool, _ mix: Float) { - spine_ik_constraint_apply_1(skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), targetX, targetY, compress, stretch, uniform, mix) + public static func apply( + _ skeleton: Skeleton, _ bone: BonePose, _ targetX: Float, _ targetY: Float, _ compress: Bool, _ stretch: Bool, _ uniform: Bool, _ mix: Float + ) { + spine_ik_constraint_apply_1( + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + targetX, targetY, compress, stretch, uniform, mix) } - public static func apply2(_ skeleton: Skeleton, _ parent: BonePose, _ child: BonePose, _ targetX: Float, _ targetY: Float, _ bendDirection: Int32, _ stretch: Bool, _ uniform: Bool, _ softness: Float, _ mix: Float) { - spine_ik_constraint_apply_2(skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), parent._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), child._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), targetX, targetY, bendDirection, stretch, uniform, softness, mix) + public static func apply2( + _ skeleton: Skeleton, _ parent: BonePose, _ child: BonePose, _ targetX: Float, _ targetY: Float, _ bendDirection: Int32, _ stretch: Bool, + _ uniform: Bool, _ softness: Float, _ mix: Float + ) { + spine_ik_constraint_apply_2( + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), parent._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), + child._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), targetX, targetY, bendDirection, stretch, uniform, softness, mix) } public override func dispose() { spine_ik_constraint_dispose(_ptr.assumingMemoryBound(to: spine_ik_constraint_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_data.swift b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_data.swift index 202422a08..170eaef8e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_data.swift @@ -59,17 +59,19 @@ public class IkConstraintData: PosedData, ConstraintData { public var target: BoneData { get { let result = spine_ik_constraint_data_get_target(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self)) - return BoneData(fromPointer: result!) + return BoneData(fromPointer: result!) } set { - spine_ik_constraint_data_set_target(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) + spine_ik_constraint_data_set_target( + _ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } } public var uniform: Bool { get { let result = spine_ik_constraint_data_get_uniform(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self)) - return result + return result } set { spine_ik_constraint_data_set_uniform(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), newValue) @@ -82,7 +84,8 @@ public class IkConstraintData: PosedData, ConstraintData { } public func createMethod(_ skeleton: Skeleton) -> Constraint { - let result = spine_ik_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_ik_constraint_data_create_method( + _ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) let rtti = spine_constraint_get_rtti(result!) let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { @@ -109,4 +112,4 @@ public class IkConstraintData: PosedData, ConstraintData { public override func dispose() { spine_ik_constraint_data_dispose(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_pose.swift b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_pose.swift index 909bf6ab4..d0383d27b 100644 --- a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_pose.swift @@ -51,7 +51,7 @@ public class IkConstraintPose: NSObject { public var mix: Float { get { let result = spine_ik_constraint_pose_get_mix(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) - return result + return result } set { spine_ik_constraint_pose_set_mix(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class IkConstraintPose: NSObject { public var softness: Float { get { let result = spine_ik_constraint_pose_get_softness(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) - return result + return result } set { spine_ik_constraint_pose_set_softness(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class IkConstraintPose: NSObject { public var bendDirection: Int32 { get { let result = spine_ik_constraint_pose_get_bend_direction(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) - return result + return result } set { spine_ik_constraint_pose_set_bend_direction(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class IkConstraintPose: NSObject { public var compress: Bool { get { let result = spine_ik_constraint_pose_get_compress(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) - return result + return result } set { spine_ik_constraint_pose_set_compress(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class IkConstraintPose: NSObject { public var stretch: Bool { get { let result = spine_ik_constraint_pose_get_stretch(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) - return result + return result } set { spine_ik_constraint_pose_set_stretch(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), newValue) @@ -99,10 +99,12 @@ public class IkConstraintPose: NSObject { } public func set(_ pose: IkConstraintPose) { - spine_ik_constraint_pose_set(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) + spine_ik_constraint_pose_set( + _ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) } public func dispose() { spine_ik_constraint_pose_dispose(_ptr.assumingMemoryBound(to: spine_ik_constraint_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_timeline.swift index 09e2e8749..591378be4 100644 --- a/spine-ios/Sources/SpineSwift/Generated/ik_constraint_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/ik_constraint_timeline.swift @@ -49,7 +49,7 @@ public class IkConstraintTimeline: CurveTimeline, ConstraintTimeline { public var constraintIndex: Int32 { get { let result = spine_ik_constraint_timeline_get_constraint_index(_ptr.assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self)) - return result + return result } set { spine_ik_constraint_timeline_set_constraint_index(_ptr.assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self), newValue) @@ -57,10 +57,11 @@ public class IkConstraintTimeline: CurveTimeline, ConstraintTimeline { } public func setFrame(_ frame: Int32, _ time: Float, _ mix: Float, _ softness: Float, _ bendDirection: Int32, _ compress: Bool, _ stretch: Bool) { - spine_ik_constraint_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self), frame, time, mix, softness, bendDirection, compress, stretch) + spine_ik_constraint_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self), frame, time, mix, softness, bendDirection, compress, stretch) } public func dispose() { spine_ik_constraint_timeline_dispose(_ptr.assumingMemoryBound(to: spine_ik_constraint_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/inherit.swift b/spine-ios/Sources/SpineSwift/Generated/inherit.swift index 03d7371b4..1a35e0cb3 100644 --- a/spine-ios/Sources/SpineSwift/Generated/inherit.swift +++ b/spine-ios/Sources/SpineSwift/Generated/inherit.swift @@ -42,4 +42,4 @@ public enum Inherit: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> Inherit? { return Inherit(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/inherit_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/inherit_timeline.swift index 241186d27..a4d0342a0 100644 --- a/spine-ios/Sources/SpineSwift/Generated/inherit_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/inherit_timeline.swift @@ -49,7 +49,7 @@ public class InheritTimeline: Timeline, BoneTimeline { public var boneIndex: Int32 { get { let result = spine_inherit_timeline_get_bone_index(_ptr.assumingMemoryBound(to: spine_inherit_timeline_wrapper.self)) - return result + return result } set { spine_inherit_timeline_set_bone_index(_ptr.assumingMemoryBound(to: spine_inherit_timeline_wrapper.self), newValue) @@ -57,10 +57,11 @@ public class InheritTimeline: Timeline, BoneTimeline { } public func setFrame(_ frame: Int32, _ time: Float, _ inherit: Inherit) { - spine_inherit_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_inherit_timeline_wrapper.self), frame, time, spine_inherit(rawValue: UInt32(inherit.rawValue))) + spine_inherit_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_inherit_timeline_wrapper.self), frame, time, spine_inherit(rawValue: UInt32(inherit.rawValue))) } public func dispose() { spine_inherit_timeline_dispose(_ptr.assumingMemoryBound(to: spine_inherit_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/linked_mesh.swift b/spine-ios/Sources/SpineSwift/Generated/linked_mesh.swift index c6cf7eff2..db3e656da 100644 --- a/spine-ios/Sources/SpineSwift/Generated/linked_mesh.swift +++ b/spine-ios/Sources/SpineSwift/Generated/linked_mesh.swift @@ -35,4 +35,4 @@ import SpineC /// LinkedMesh wrapper public protocol LinkedMesh { var _ptr: UnsafeMutableRawPointer { get } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/mesh_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/mesh_attachment.swift index 86659b669..a6dc27d63 100644 --- a/spine-ios/Sources/SpineSwift/Generated/mesh_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/mesh_attachment.swift @@ -49,7 +49,7 @@ public class MeshAttachment: VertexAttachment { public var hullLength: Int32 { get { let result = spine_mesh_attachment_get_hull_length(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result + return result } set { spine_mesh_attachment_set_hull_length(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue) @@ -59,10 +59,12 @@ public class MeshAttachment: VertexAttachment { public var regionUVs: ArrayFloat { get { let result = spine_mesh_attachment_get_region_u_vs(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return ArrayFloat(fromPointer: result!) + return ArrayFloat(fromPointer: result!) } set { - spine_mesh_attachment_set_region_u_vs(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_mesh_attachment_set_region_u_vs( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } } @@ -74,10 +76,12 @@ public class MeshAttachment: VertexAttachment { public var triangles: ArrayUnsignedShort { get { let result = spine_mesh_attachment_get_triangles(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return ArrayUnsignedShort(fromPointer: result!) + return ArrayUnsignedShort(fromPointer: result!) } set { - spine_mesh_attachment_set_triangles(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self)) + spine_mesh_attachment_set_triangles( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self)) } } @@ -89,7 +93,7 @@ public class MeshAttachment: VertexAttachment { public var path: String { get { let result = spine_mesh_attachment_get_path(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_mesh_attachment_set_path(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue) @@ -99,47 +103,54 @@ public class MeshAttachment: VertexAttachment { public var region: TextureRegion? { get { let result = spine_mesh_attachment_get_region(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result.map { TextureRegion(fromPointer: $0) } + return result.map { TextureRegion(fromPointer: $0) } } set { - spine_mesh_attachment_set_region(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) + spine_mesh_attachment_set_region( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) } } public var sequence: Sequence? { get { let result = spine_mesh_attachment_get_sequence(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result.map { Sequence(fromPointer: $0) } + return result.map { Sequence(fromPointer: $0) } } set { - spine_mesh_attachment_set_sequence(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) + spine_mesh_attachment_set_sequence( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) } } public var parentMesh: MeshAttachment? { get { let result = spine_mesh_attachment_get_parent_mesh(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result.map { MeshAttachment(fromPointer: $0) } + return result.map { MeshAttachment(fromPointer: $0) } } set { - spine_mesh_attachment_set_parent_mesh(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) + spine_mesh_attachment_set_parent_mesh( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) } } public var edges: ArrayUnsignedShort { get { let result = spine_mesh_attachment_get_edges(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return ArrayUnsignedShort(fromPointer: result!) + return ArrayUnsignedShort(fromPointer: result!) } set { - spine_mesh_attachment_set_edges(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self)) + spine_mesh_attachment_set_edges( + _ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self)) } } public var width: Float { get { let result = spine_mesh_attachment_get_width(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result + return result } set { spine_mesh_attachment_set_width(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue) @@ -149,7 +160,7 @@ public class MeshAttachment: VertexAttachment { public var height: Float { get { let result = spine_mesh_attachment_get_height(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - return result + return result } set { spine_mesh_attachment_set_height(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self), newValue) @@ -168,4 +179,4 @@ public class MeshAttachment: VertexAttachment { public func dispose() { spine_mesh_attachment_dispose(_ptr.assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/mix_blend.swift b/spine-ios/Sources/SpineSwift/Generated/mix_blend.swift index 582dd9718..f45e5c2f6 100644 --- a/spine-ios/Sources/SpineSwift/Generated/mix_blend.swift +++ b/spine-ios/Sources/SpineSwift/Generated/mix_blend.swift @@ -41,4 +41,4 @@ public enum MixBlend: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> MixBlend? { return MixBlend(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/mix_direction.swift b/spine-ios/Sources/SpineSwift/Generated/mix_direction.swift index 9ca621d28..ef271a6b6 100644 --- a/spine-ios/Sources/SpineSwift/Generated/mix_direction.swift +++ b/spine-ios/Sources/SpineSwift/Generated/mix_direction.swift @@ -39,4 +39,4 @@ public enum MixDirection: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> MixDirection? { return MixDirection(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/path_attachment.swift index f6e9f36d5..9c40b5881 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_attachment.swift @@ -49,17 +49,19 @@ public class PathAttachment: VertexAttachment { public var lengths: ArrayFloat { get { let result = spine_path_attachment_get_lengths(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - return ArrayFloat(fromPointer: result!) + return ArrayFloat(fromPointer: result!) } set { - spine_path_attachment_set_lengths(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_path_attachment_set_lengths( + _ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } } public var closed: Bool { get { let result = spine_path_attachment_get_closed(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - return result + return result } set { spine_path_attachment_set_closed(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self), newValue) @@ -69,7 +71,7 @@ public class PathAttachment: VertexAttachment { public var constantSpeed: Bool { get { let result = spine_path_attachment_get_constant_speed(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - return result + return result } set { spine_path_attachment_set_constant_speed(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self), newValue) @@ -84,4 +86,4 @@ public class PathAttachment: VertexAttachment { public func dispose() { spine_path_attachment_dispose(_ptr.assumingMemoryBound(to: spine_path_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint.swift index 834ba5c09..f60e171cb 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint.swift @@ -42,7 +42,9 @@ public class PathConstraint: PosedActive, Posed, Constraint { } public convenience init(_ data: PathConstraintData, _ skeleton: Skeleton) { - let ptr = spine_path_constraint_create(data._ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_path_constraint_create( + data._ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -64,10 +66,11 @@ public class PathConstraint: PosedActive, Posed, Constraint { public var slot: Slot { get { let result = spine_path_constraint_get_slot(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self)) - return Slot(fromPointer: result!) + return Slot(fromPointer: result!) } set { - spine_path_constraint_set_slot(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) + spine_path_constraint_set_slot( + _ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) } } @@ -92,16 +95,20 @@ public class PathConstraint: PosedActive, Posed, Constraint { } public func copyAttachment(_ skeleton: Skeleton) -> PathConstraint { - let result = spine_path_constraint_copy(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_path_constraint_copy( + _ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return PathConstraint(fromPointer: result!) } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_path_constraint_update(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_path_constraint_update( + _ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func sort(_ skeleton: Skeleton) { - spine_path_constraint_sort(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_path_constraint_sort( + _ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func resetConstrained() { @@ -120,4 +127,4 @@ public class PathConstraint: PosedActive, Posed, Constraint { public override func dispose() { spine_path_constraint_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint_data.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint_data.swift index 722621632..955e05b36 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint_data.swift @@ -59,47 +59,52 @@ public class PathConstraintData: PosedData, ConstraintData { public var slot: SlotData { get { let result = spine_path_constraint_data_get_slot(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - return SlotData(fromPointer: result!) + return SlotData(fromPointer: result!) } set { - spine_path_constraint_data_set_slot(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) + spine_path_constraint_data_set_slot( + _ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) } } public var positionMode: PositionMode { get { let result = spine_path_constraint_data_get_position_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - return PositionMode(rawValue: Int32(result.rawValue))! + return PositionMode(rawValue: Int32(result.rawValue))! } set { - spine_path_constraint_data_set_position_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_position_mode(rawValue: UInt32(newValue.rawValue))) + spine_path_constraint_data_set_position_mode( + _ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_position_mode(rawValue: UInt32(newValue.rawValue))) } } public var spacingMode: SpacingMode { get { let result = spine_path_constraint_data_get_spacing_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - return SpacingMode(rawValue: Int32(result.rawValue))! + return SpacingMode(rawValue: Int32(result.rawValue))! } set { - spine_path_constraint_data_set_spacing_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_spacing_mode(rawValue: UInt32(newValue.rawValue))) + spine_path_constraint_data_set_spacing_mode( + _ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_spacing_mode(rawValue: UInt32(newValue.rawValue))) } } public var rotateMode: RotateMode { get { let result = spine_path_constraint_data_get_rotate_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - return RotateMode(rawValue: Int32(result.rawValue))! + return RotateMode(rawValue: Int32(result.rawValue))! } set { - spine_path_constraint_data_set_rotate_mode(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_rotate_mode(rawValue: UInt32(newValue.rawValue))) + spine_path_constraint_data_set_rotate_mode( + _ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), spine_rotate_mode(rawValue: UInt32(newValue.rawValue))) } } public var offsetRotation: Float { get { let result = spine_path_constraint_data_get_offset_rotation(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) - return result + return result } set { spine_path_constraint_data_set_offset_rotation(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), newValue) @@ -112,7 +117,8 @@ public class PathConstraintData: PosedData, ConstraintData { } public func createMethod(_ skeleton: Skeleton) -> Constraint { - let result = spine_path_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_path_constraint_data_create_method( + _ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) let rtti = spine_constraint_get_rtti(result!) let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { @@ -139,4 +145,4 @@ public class PathConstraintData: PosedData, ConstraintData { public override func dispose() { spine_path_constraint_data_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint_mix_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint_mix_timeline.swift index b6a7bed79..56534a076 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint_mix_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint_mix_timeline.swift @@ -48,19 +48,22 @@ public class PathConstraintMixTimeline: CurveTimeline, ConstraintTimeline { public var constraintIndex: Int32 { get { - let result = spine_path_constraint_mix_timeline_get_constraint_index(_ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self)) - return result + let result = spine_path_constraint_mix_timeline_get_constraint_index( + _ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self)) + return result } set { - spine_path_constraint_mix_timeline_set_constraint_index(_ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self), newValue) + spine_path_constraint_mix_timeline_set_constraint_index( + _ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self), newValue) } } public func setFrame(_ frame: Int32, _ time: Float, _ mixRotate: Float, _ mixX: Float, _ mixY: Float) { - spine_path_constraint_mix_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self), frame, time, mixRotate, mixX, mixY) + spine_path_constraint_mix_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self), frame, time, mixRotate, mixX, mixY) } public func dispose() { spine_path_constraint_mix_timeline_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_mix_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint_pose.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint_pose.swift index c4e2cd117..521e8f340 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint_pose.swift @@ -51,7 +51,7 @@ public class PathConstraintPose: NSObject { public var position: Float { get { let result = spine_path_constraint_pose_get_position(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) - return result + return result } set { spine_path_constraint_pose_set_position(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class PathConstraintPose: NSObject { public var spacing: Float { get { let result = spine_path_constraint_pose_get_spacing(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) - return result + return result } set { spine_path_constraint_pose_set_spacing(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class PathConstraintPose: NSObject { public var mixRotate: Float { get { let result = spine_path_constraint_pose_get_mix_rotate(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) - return result + return result } set { spine_path_constraint_pose_set_mix_rotate(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class PathConstraintPose: NSObject { public var mixX: Float { get { let result = spine_path_constraint_pose_get_mix_x(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) - return result + return result } set { spine_path_constraint_pose_set_mix_x(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class PathConstraintPose: NSObject { public var mixY: Float { get { let result = spine_path_constraint_pose_get_mix_y(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) - return result + return result } set { spine_path_constraint_pose_set_mix_y(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), newValue) @@ -99,10 +99,12 @@ public class PathConstraintPose: NSObject { } public func set(_ pose: PathConstraintPose) { - spine_path_constraint_pose_set(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) + spine_path_constraint_pose_set( + _ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) } public func dispose() { spine_path_constraint_pose_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint_position_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint_position_timeline.swift index e73ce7e5b..1581d31b5 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint_position_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint_position_timeline.swift @@ -49,4 +49,4 @@ public class PathConstraintPositionTimeline: ConstraintTimeline1 { public func dispose() { spine_path_constraint_position_timeline_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_position_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/path_constraint_spacing_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/path_constraint_spacing_timeline.swift index d09f0b3fc..37147fd6c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/path_constraint_spacing_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/path_constraint_spacing_timeline.swift @@ -49,4 +49,4 @@ public class PathConstraintSpacingTimeline: ConstraintTimeline1 { public func dispose() { spine_path_constraint_spacing_timeline_dispose(_ptr.assumingMemoryBound(to: spine_path_constraint_spacing_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics.swift b/spine-ios/Sources/SpineSwift/Generated/physics.swift index eef1ca631..eed202790 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics.swift @@ -41,4 +41,4 @@ public enum Physics: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> Physics? { return Physics(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint.swift index f956d19c8..64568ba52 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint.swift @@ -42,7 +42,9 @@ public class PhysicsConstraint: PosedActive, Posed, Constraint { } public convenience init(_ data: PhysicsConstraintData, _ skeleton: Skeleton) { - let ptr = spine_physics_constraint_create(data._ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_physics_constraint_create( + data._ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -59,10 +61,12 @@ public class PhysicsConstraint: PosedActive, Posed, Constraint { public var bone: BonePose { get { let result = spine_physics_constraint_get_bone(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) - return BonePose(fromPointer: result!) + return BonePose(fromPointer: result!) } set { - spine_physics_constraint_set_bone(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) + spine_physics_constraint_set_bone( + _ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) } } @@ -87,20 +91,25 @@ public class PhysicsConstraint: PosedActive, Posed, Constraint { } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_physics_constraint_update(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_physics_constraint_update( + _ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func sort(_ skeleton: Skeleton) { - spine_physics_constraint_sort(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_physics_constraint_sort( + _ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func copyAttachment(_ skeleton: Skeleton) -> PhysicsConstraint { - let result = spine_physics_constraint_copy(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_physics_constraint_copy( + _ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return PhysicsConstraint(fromPointer: result!) } public func reset(_ skeleton: Skeleton) { - spine_physics_constraint_reset(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_physics_constraint_reset( + _ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func translate(_ x: Float, _ y: Float) { @@ -127,4 +136,4 @@ public class PhysicsConstraint: PosedActive, Posed, Constraint { public override func dispose() { spine_physics_constraint_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_damping_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_damping_timeline.swift index 644b6d962..79fde085c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_damping_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_damping_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintDampingTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_damping_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_damping_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_data.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_data.swift index aca3aa3f8..810d62caa 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_data.swift @@ -54,17 +54,19 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var bone: BoneData { get { let result = spine_physics_constraint_data_get_bone(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return BoneData(fromPointer: result!) + return BoneData(fromPointer: result!) } set { - spine_physics_constraint_data_set_bone(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) + spine_physics_constraint_data_set_bone( + _ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } } public var step: Float { get { let result = spine_physics_constraint_data_get_step(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_step(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -74,7 +76,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var x: Float { get { let result = spine_physics_constraint_data_get_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -84,7 +86,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var y: Float { get { let result = spine_physics_constraint_data_get_y(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_y(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -94,7 +96,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var rotate: Float { get { let result = spine_physics_constraint_data_get_rotate(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_rotate(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -104,7 +106,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var scaleX: Float { get { let result = spine_physics_constraint_data_get_scale_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_scale_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -114,7 +116,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var shearX: Float { get { let result = spine_physics_constraint_data_get_shear_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_shear_x(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -124,7 +126,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var limit: Float { get { let result = spine_physics_constraint_data_get_limit(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_limit(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -134,7 +136,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var inertiaGlobal: Bool { get { let result = spine_physics_constraint_data_get_inertia_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_inertia_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -144,7 +146,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var strengthGlobal: Bool { get { let result = spine_physics_constraint_data_get_strength_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_strength_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -154,7 +156,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var dampingGlobal: Bool { get { let result = spine_physics_constraint_data_get_damping_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_damping_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -164,7 +166,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var massGlobal: Bool { get { let result = spine_physics_constraint_data_get_mass_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_mass_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -174,7 +176,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var windGlobal: Bool { get { let result = spine_physics_constraint_data_get_wind_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_wind_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -184,7 +186,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var gravityGlobal: Bool { get { let result = spine_physics_constraint_data_get_gravity_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_gravity_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -194,7 +196,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public var mixGlobal: Bool { get { let result = spine_physics_constraint_data_get_mix_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) - return result + return result } set { spine_physics_constraint_data_set_mix_global(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), newValue) @@ -207,7 +209,9 @@ public class PhysicsConstraintData: PosedData, ConstraintData { } public func createMethod(_ skeleton: Skeleton) -> Constraint { - let result = spine_physics_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_physics_constraint_data_create_method( + _ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) let rtti = spine_constraint_get_rtti(result!) let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { @@ -234,4 +238,4 @@ public class PhysicsConstraintData: PosedData, ConstraintData { public override func dispose() { spine_physics_constraint_data_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_gravity_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_gravity_timeline.swift index 4f85a8cb1..8552690b5 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_gravity_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_gravity_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintGravityTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_gravity_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_gravity_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_inertia_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_inertia_timeline.swift index a8a8706e1..20d76fc50 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_inertia_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_inertia_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintInertiaTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_inertia_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_inertia_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mass_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mass_timeline.swift index 11d752aa3..0b65abaee 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mass_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mass_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintMassTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_mass_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_mass_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mix_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mix_timeline.swift index ba46846a6..11be9c83a 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mix_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_mix_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintMixTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_mix_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_mix_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_pose.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_pose.swift index 5328abec5..e36e5aec7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_pose.swift @@ -51,7 +51,7 @@ public class PhysicsConstraintPose: NSObject { public var inertia: Float { get { let result = spine_physics_constraint_pose_get_inertia(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_inertia(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class PhysicsConstraintPose: NSObject { public var strength: Float { get { let result = spine_physics_constraint_pose_get_strength(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_strength(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class PhysicsConstraintPose: NSObject { public var damping: Float { get { let result = spine_physics_constraint_pose_get_damping(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_damping(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class PhysicsConstraintPose: NSObject { public var massInverse: Float { get { let result = spine_physics_constraint_pose_get_mass_inverse(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_mass_inverse(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class PhysicsConstraintPose: NSObject { public var wind: Float { get { let result = spine_physics_constraint_pose_get_wind(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_wind(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -101,7 +101,7 @@ public class PhysicsConstraintPose: NSObject { public var gravity: Float { get { let result = spine_physics_constraint_pose_get_gravity(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_gravity(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -111,7 +111,7 @@ public class PhysicsConstraintPose: NSObject { public var mix: Float { get { let result = spine_physics_constraint_pose_get_mix(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) - return result + return result } set { spine_physics_constraint_pose_set_mix(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), newValue) @@ -119,10 +119,12 @@ public class PhysicsConstraintPose: NSObject { } public func set(_ pose: PhysicsConstraintPose) { - spine_physics_constraint_pose_set(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) + spine_physics_constraint_pose_set( + _ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) } public func dispose() { spine_physics_constraint_pose_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_reset_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_reset_timeline.swift index 48f38a095..3686e2b1f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_reset_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_reset_timeline.swift @@ -48,19 +48,22 @@ public class PhysicsConstraintResetTimeline: Timeline, ConstraintTimeline { public var constraintIndex: Int32 { get { - let result = spine_physics_constraint_reset_timeline_get_constraint_index(_ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self)) - return result + let result = spine_physics_constraint_reset_timeline_get_constraint_index( + _ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self)) + return result } set { - spine_physics_constraint_reset_timeline_set_constraint_index(_ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self), newValue) + spine_physics_constraint_reset_timeline_set_constraint_index( + _ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self), newValue) } } public func setFrame(_ frame: Int32, _ time: Float) { - spine_physics_constraint_reset_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self), frame, time) + spine_physics_constraint_reset_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self), frame, time) } public func dispose() { spine_physics_constraint_reset_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_reset_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_strength_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_strength_timeline.swift index e02c176d6..2a0ca43e6 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_strength_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_strength_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintStrengthTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_strength_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_strength_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_timeline.swift index 01e15d40c..0c146d4a9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_timeline.swift @@ -43,12 +43,14 @@ open class PhysicsConstraintTimeline: CurveTimeline1, ConstraintTimeline { public var constraintIndex: Int32 { get { - let result = spine_physics_constraint_timeline_get_constraint_index(_ptr.assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self)) - return result + let result = spine_physics_constraint_timeline_get_constraint_index( + _ptr.assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self)) + return result } set { - spine_physics_constraint_timeline_set_constraint_index(_ptr.assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self), newValue) + spine_physics_constraint_timeline_set_constraint_index( + _ptr.assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self), newValue) } } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_wind_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_wind_timeline.swift index b32d55b8f..4e59c0a72 100644 --- a/spine-ios/Sources/SpineSwift/Generated/physics_constraint_wind_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/physics_constraint_wind_timeline.swift @@ -49,4 +49,4 @@ public class PhysicsConstraintWindTimeline: PhysicsConstraintTimeline { public func dispose() { spine_physics_constraint_wind_timeline_dispose(_ptr.assumingMemoryBound(to: spine_physics_constraint_wind_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/point_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/point_attachment.swift index b6efaa9b1..dfe6e9824 100644 --- a/spine-ios/Sources/SpineSwift/Generated/point_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/point_attachment.swift @@ -49,7 +49,7 @@ public class PointAttachment: Attachment { public var x: Float { get { let result = spine_point_attachment_get_x(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - return result + return result } set { spine_point_attachment_set_x(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self), newValue) @@ -59,7 +59,7 @@ public class PointAttachment: Attachment { public var y: Float { get { let result = spine_point_attachment_get_y(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - return result + return result } set { spine_point_attachment_set_y(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self), newValue) @@ -69,7 +69,7 @@ public class PointAttachment: Attachment { public var rotation: Float { get { let result = spine_point_attachment_get_rotation(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - return result + return result } set { spine_point_attachment_set_rotation(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self), newValue) @@ -82,11 +82,12 @@ public class PointAttachment: Attachment { } public func computeWorldRotation(_ bone: BonePose) -> Float { - let result = spine_point_attachment_compute_world_rotation(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self), bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) + let result = spine_point_attachment_compute_world_rotation( + _ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self), bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self)) return result } public func dispose() { spine_point_attachment_dispose(_ptr.assumingMemoryBound(to: spine_point_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/posed_active.swift b/spine-ios/Sources/SpineSwift/Generated/posed_active.swift index c6a44b8bc..ee7ad7c66 100644 --- a/spine-ios/Sources/SpineSwift/Generated/posed_active.swift +++ b/spine-ios/Sources/SpineSwift/Generated/posed_active.swift @@ -58,4 +58,4 @@ public class PosedActive: NSObject { public func dispose() { spine_posed_active_dispose(_ptr.assumingMemoryBound(to: spine_posed_active_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/posed_data.swift b/spine-ios/Sources/SpineSwift/Generated/posed_data.swift index 525148c5e..f09a5a0bf 100644 --- a/spine-ios/Sources/SpineSwift/Generated/posed_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/posed_data.swift @@ -56,7 +56,7 @@ public class PosedData: NSObject { public var skinRequired: Bool { get { let result = spine_posed_data_get_skin_required(_ptr.assumingMemoryBound(to: spine_posed_data_wrapper.self)) - return result + return result } set { spine_posed_data_set_skin_required(_ptr.assumingMemoryBound(to: spine_posed_data_wrapper.self), newValue) @@ -66,4 +66,4 @@ public class PosedData: NSObject { public func dispose() { spine_posed_data_dispose(_ptr.assumingMemoryBound(to: spine_posed_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/position_mode.swift b/spine-ios/Sources/SpineSwift/Generated/position_mode.swift index e081c7eba..5ee15273a 100644 --- a/spine-ios/Sources/SpineSwift/Generated/position_mode.swift +++ b/spine-ios/Sources/SpineSwift/Generated/position_mode.swift @@ -39,4 +39,4 @@ public enum PositionMode: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> PositionMode? { return PositionMode(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/property.swift b/spine-ios/Sources/SpineSwift/Generated/property.swift index 166c960b6..0504762e8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/property.swift +++ b/spine-ios/Sources/SpineSwift/Generated/property.swift @@ -53,19 +53,19 @@ public enum Property: Int32, CaseIterable { case pathConstraintPosition = 131072 case pathConstraintSpacing = 262144 case pathConstraintMix = 524288 - case physicsConstraintInertia = 1048576 - case physicsConstraintStrength = 2097152 - case physicsConstraintDamping = 4194304 - case physicsConstraintMass = 8388608 - case physicsConstraintWind = 16777216 - case physicsConstraintGravity = 33554432 - case physicsConstraintMix = 67108864 - case physicsConstraintReset = 134217728 - case sequence = 268435456 - case sliderTime = 536870912 - case sliderMix = 1073741824 + case physicsConstraintInertia = 1_048_576 + case physicsConstraintStrength = 2_097_152 + case physicsConstraintDamping = 4_194_304 + case physicsConstraintMass = 8_388_608 + case physicsConstraintWind = 16_777_216 + case physicsConstraintGravity = 33_554_432 + case physicsConstraintMix = 67_108_864 + case physicsConstraintReset = 134_217_728 + case sequence = 268_435_456 + case sliderTime = 536_870_912 + case sliderMix = 1_073_741_824 public static func fromValue(_ value: Int32) -> Property? { return Property(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/region_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/region_attachment.swift index 71f7444e1..1b20337fe 100644 --- a/spine-ios/Sources/SpineSwift/Generated/region_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/region_attachment.swift @@ -49,7 +49,7 @@ public class RegionAttachment: Attachment { public var x: Float { get { let result = spine_region_attachment_get_x(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_x(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -59,7 +59,7 @@ public class RegionAttachment: Attachment { public var y: Float { get { let result = spine_region_attachment_get_y(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_y(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -69,7 +69,7 @@ public class RegionAttachment: Attachment { public var rotation: Float { get { let result = spine_region_attachment_get_rotation(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_rotation(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -79,7 +79,7 @@ public class RegionAttachment: Attachment { public var scaleX: Float { get { let result = spine_region_attachment_get_scale_x(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_scale_x(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -89,7 +89,7 @@ public class RegionAttachment: Attachment { public var scaleY: Float { get { let result = spine_region_attachment_get_scale_y(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_scale_y(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -99,7 +99,7 @@ public class RegionAttachment: Attachment { public var width: Float { get { let result = spine_region_attachment_get_width(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_width(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -109,7 +109,7 @@ public class RegionAttachment: Attachment { public var height: Float { get { let result = spine_region_attachment_get_height(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result + return result } set { spine_region_attachment_set_height(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -124,7 +124,7 @@ public class RegionAttachment: Attachment { public var path: String { get { let result = spine_region_attachment_get_path(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_region_attachment_set_path(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue) @@ -134,20 +134,24 @@ public class RegionAttachment: Attachment { public var region: TextureRegion? { get { let result = spine_region_attachment_get_region(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result.map { TextureRegion(fromPointer: $0) } + return result.map { TextureRegion(fromPointer: $0) } } set { - spine_region_attachment_set_region(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) + spine_region_attachment_set_region( + _ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) } } public var sequence: Sequence? { get { let result = spine_region_attachment_get_sequence(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - return result.map { Sequence(fromPointer: $0) } + return result.map { Sequence(fromPointer: $0) } } set { - spine_region_attachment_set_sequence(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) + spine_region_attachment_set_sequence( + _ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_sequence_wrapper.self)) } } @@ -166,10 +170,12 @@ public class RegionAttachment: Attachment { } public func computeWorldVertices(_ slot: Slot, _ worldVertices: ArrayFloat, _ offset: Int, _ stride: Int) { - spine_region_attachment_compute_world_vertices_2(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), worldVertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), offset, stride) + spine_region_attachment_compute_world_vertices_2( + _ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), + worldVertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), offset, stride) } public func dispose() { spine_region_attachment_dispose(_ptr.assumingMemoryBound(to: spine_region_attachment_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/render_command.swift b/spine-ios/Sources/SpineSwift/Generated/render_command.swift index cd76d6ccd..caaa5159c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/render_command.swift +++ b/spine-ios/Sources/SpineSwift/Generated/render_command.swift @@ -96,4 +96,4 @@ public class RenderCommand: NSObject { public func dispose() { spine_render_command_dispose(_ptr.assumingMemoryBound(to: spine_render_command_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rgb2_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/rgb2_timeline.swift index b588b1bfc..11b45ed9e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rgb2_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rgb2_timeline.swift @@ -53,4 +53,4 @@ public class Rgb2Timeline: SlotCurveTimeline { public func dispose() { spine_rgb2_timeline_dispose(_ptr.assumingMemoryBound(to: spine_rgb2_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rgb_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/rgb_timeline.swift index 36dce83db..e75fd8f1f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rgb_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rgb_timeline.swift @@ -53,4 +53,4 @@ public class RgbTimeline: SlotCurveTimeline { public func dispose() { spine_rgb_timeline_dispose(_ptr.assumingMemoryBound(to: spine_rgb_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rgba2_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/rgba2_timeline.swift index b0dd4f883..1fd9ab123 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rgba2_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rgba2_timeline.swift @@ -53,4 +53,4 @@ public class Rgba2Timeline: SlotCurveTimeline { public func dispose() { spine_rgba2_timeline_dispose(_ptr.assumingMemoryBound(to: spine_rgba2_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rgba_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/rgba_timeline.swift index b2bc3ef95..c0fcf98e9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rgba_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rgba_timeline.swift @@ -53,4 +53,4 @@ public class RgbaTimeline: SlotCurveTimeline { public func dispose() { spine_rgba_timeline_dispose(_ptr.assumingMemoryBound(to: spine_rgba_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rotate_mode.swift b/spine-ios/Sources/SpineSwift/Generated/rotate_mode.swift index db4823efd..faf40e844 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rotate_mode.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rotate_mode.swift @@ -40,4 +40,4 @@ public enum RotateMode: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> RotateMode? { return RotateMode(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/rotate_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/rotate_timeline.swift index 660e9cff2..52df8a356 100644 --- a/spine-ios/Sources/SpineSwift/Generated/rotate_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/rotate_timeline.swift @@ -49,4 +49,4 @@ public class RotateTimeline: BoneTimeline1 { public func dispose() { spine_rotate_timeline_dispose(_ptr.assumingMemoryBound(to: spine_rotate_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/scale_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/scale_timeline.swift index 5de42fb4c..8f27c55b8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/scale_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/scale_timeline.swift @@ -49,4 +49,4 @@ public class ScaleTimeline: BoneTimeline2 { public func dispose() { spine_scale_timeline_dispose(_ptr.assumingMemoryBound(to: spine_scale_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/scale_x_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/scale_x_timeline.swift index f823e809a..6ad499b7e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/scale_x_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/scale_x_timeline.swift @@ -49,4 +49,4 @@ public class ScaleXTimeline: BoneTimeline1 { public func dispose() { spine_scale_x_timeline_dispose(_ptr.assumingMemoryBound(to: spine_scale_x_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/scale_y_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/scale_y_timeline.swift index f3ea817cc..2aae975f7 100644 --- a/spine-ios/Sources/SpineSwift/Generated/scale_y_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/scale_y_timeline.swift @@ -49,4 +49,4 @@ public class ScaleYTimeline: BoneTimeline1 { public func dispose() { spine_scale_y_timeline_dispose(_ptr.assumingMemoryBound(to: spine_scale_y_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/sequence_mode.swift b/spine-ios/Sources/SpineSwift/Generated/sequence_mode.swift index e8ee7ee48..c82d36bb8 100644 --- a/spine-ios/Sources/SpineSwift/Generated/sequence_mode.swift +++ b/spine-ios/Sources/SpineSwift/Generated/sequence_mode.swift @@ -44,4 +44,4 @@ public enum SequenceMode: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> SequenceMode? { return SequenceMode(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/sequence_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/sequence_timeline.swift index 243a03cd9..9320e61f9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/sequence_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/sequence_timeline.swift @@ -52,7 +52,8 @@ public class SequenceTimeline: Timeline, SlotTimeline { let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) case "spine_clipping_attachment": return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) case "spine_mesh_attachment": @@ -71,7 +72,7 @@ public class SequenceTimeline: Timeline, SlotTimeline { public var slotIndex: Int32 { get { let result = spine_sequence_timeline_get_slot_index(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self)) - return result + return result } set { spine_sequence_timeline_set_slot_index(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self), newValue) @@ -79,10 +80,12 @@ public class SequenceTimeline: Timeline, SlotTimeline { } public func setFrame(_ frame: Int32, _ time: Float, _ mode: SequenceMode, _ index: Int32, _ delay: Float) { - spine_sequence_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self), frame, time, spine_sequence_mode(rawValue: UInt32(mode.rawValue)), index, delay) + spine_sequence_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self), frame, time, spine_sequence_mode(rawValue: UInt32(mode.rawValue)), + index, delay) } public func dispose() { spine_sequence_timeline_dispose(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/shear_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/shear_timeline.swift index aaa2e8620..f9548760d 100644 --- a/spine-ios/Sources/SpineSwift/Generated/shear_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/shear_timeline.swift @@ -49,4 +49,4 @@ public class ShearTimeline: BoneTimeline2 { public func dispose() { spine_shear_timeline_dispose(_ptr.assumingMemoryBound(to: spine_shear_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/shear_x_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/shear_x_timeline.swift index a14435d68..94d1b6dac 100644 --- a/spine-ios/Sources/SpineSwift/Generated/shear_x_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/shear_x_timeline.swift @@ -49,4 +49,4 @@ public class ShearXTimeline: BoneTimeline1 { public func dispose() { spine_shear_x_timeline_dispose(_ptr.assumingMemoryBound(to: spine_shear_x_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/shear_y_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/shear_y_timeline.swift index 2232c1dd6..b088b376b 100644 --- a/spine-ios/Sources/SpineSwift/Generated/shear_y_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/shear_y_timeline.swift @@ -49,4 +49,4 @@ public class ShearYTimeline: BoneTimeline1 { public func dispose() { spine_shear_y_timeline_dispose(_ptr.assumingMemoryBound(to: spine_shear_y_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_binary.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_binary.swift index d0e318989..8b4512802 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_binary.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_binary.swift @@ -73,4 +73,4 @@ public class SkeletonBinary: NSObject { public func dispose() { spine_skeleton_binary_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_binary_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_bounds.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_bounds.swift index 0a7bead09..73bafc526 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_bounds.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_bounds.swift @@ -89,7 +89,9 @@ public class SkeletonBounds: NSObject { } public func update(_ skeleton: Skeleton, _ updateAabb: Bool) { - spine_skeleton_bounds_update(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), updateAabb) + spine_skeleton_bounds_update( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + updateAabb) } public func aabbContainsPoint(_ x: Float, _ y: Float) -> Bool { @@ -103,22 +105,27 @@ public class SkeletonBounds: NSObject { } public func aabbIntersectsSkeleton(_ bounds: SkeletonBounds) -> Bool { - let result = spine_skeleton_bounds_aabb_intersects_skeleton(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), bounds._ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self)) + let result = spine_skeleton_bounds_aabb_intersects_skeleton( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), bounds._ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self)) return result } public func getPolygon(_ attachment: BoundingBoxAttachment?) -> Polygon? { - let result = spine_skeleton_bounds_get_polygon(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), attachment?._ptr.assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + let result = spine_skeleton_bounds_get_polygon( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), + attachment?._ptr.assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) return result.map { Polygon(fromPointer: $0) } } public func getBoundingBox(_ polygon: Polygon?) -> BoundingBoxAttachment? { - let result = spine_skeleton_bounds_get_bounding_box(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon?._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) + let result = spine_skeleton_bounds_get_bounding_box( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon?._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self)) return result.map { BoundingBoxAttachment(fromPointer: $0) } } public func containsPoint(_ polygon: Polygon, _ x: Float, _ y: Float) -> Bool { - let result = spine_skeleton_bounds_contains_point_1(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), x, y) + let result = spine_skeleton_bounds_contains_point_1( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), x, y) return result } @@ -133,11 +140,13 @@ public class SkeletonBounds: NSObject { } public func intersectsSegment2(_ polygon: Polygon, _ x1: Float, _ y1: Float, _ x2: Float, _ y2: Float) -> Bool { - let result = spine_skeleton_bounds_intersects_segment_2(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), x1, y1, x2, y2) + let result = spine_skeleton_bounds_intersects_segment_2( + _ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self), polygon._ptr.assumingMemoryBound(to: spine_polygon_wrapper.self), x1, + y1, x2, y2) return result } public func dispose() { spine_skeleton_bounds_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_bounds_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_clipping.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_clipping.swift index 07cfd976c..b33b15a73 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_clipping.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_clipping.swift @@ -69,12 +69,15 @@ public class SkeletonClipping: NSObject { } public func clipStart(_ skeleton: Skeleton, _ slot: Slot, _ clip: ClippingAttachment?) -> Int { - let result = spine_skeleton_clipping_clip_start(_ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), clip?._ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) + let result = spine_skeleton_clipping_clip_start( + _ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), clip?._ptr.assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) return result } public func clipEnd(_ slot: Slot) { - spine_skeleton_clipping_clip_end_1(_ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) + spine_skeleton_clipping_clip_end_1( + _ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self)) } public func clipEnd2() { @@ -82,11 +85,14 @@ public class SkeletonClipping: NSObject { } public func clipTriangles(_ vertices: ArrayFloat, _ triangles: ArrayUnsignedShort, _ uvs: ArrayFloat, _ stride: Int) -> Bool { - let result = spine_skeleton_clipping_clip_triangles_3(_ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), vertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), triangles._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self), uvs._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), stride) + let result = spine_skeleton_clipping_clip_triangles_3( + _ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self), vertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), + triangles._ptr.assumingMemoryBound(to: spine_array_unsigned_short_wrapper.self), + uvs._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), stride) return result } public func dispose() { spine_skeleton_clipping_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_clipping_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_data.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_data.swift index 10a19dcaa..c7763e7e3 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_data.swift @@ -51,7 +51,7 @@ public class SkeletonData: NSObject { public var name: String { get { let result = spine_skeleton_data_get_name(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_skeleton_data_set_name(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -76,10 +76,11 @@ public class SkeletonData: NSObject { public var defaultSkin: Skin? { get { let result = spine_skeleton_data_get_default_skin(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result.map { Skin(fromPointer: $0) } + return result.map { Skin(fromPointer: $0) } } set { - spine_skeleton_data_set_default_skin(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) + spine_skeleton_data_set_default_skin( + _ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_skin_wrapper.self)) } } @@ -101,7 +102,7 @@ public class SkeletonData: NSObject { public var x: Float { get { let result = spine_skeleton_data_get_x(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_x(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -111,7 +112,7 @@ public class SkeletonData: NSObject { public var y: Float { get { let result = spine_skeleton_data_get_y(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_y(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -121,7 +122,7 @@ public class SkeletonData: NSObject { public var width: Float { get { let result = spine_skeleton_data_get_width(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_width(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -131,7 +132,7 @@ public class SkeletonData: NSObject { public var height: Float { get { let result = spine_skeleton_data_get_height(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_height(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -141,7 +142,7 @@ public class SkeletonData: NSObject { public var referenceScale: Float { get { let result = spine_skeleton_data_get_reference_scale(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_reference_scale(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -151,7 +152,7 @@ public class SkeletonData: NSObject { public var version: String { get { let result = spine_skeleton_data_get_version(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_skeleton_data_set_version(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -161,7 +162,7 @@ public class SkeletonData: NSObject { public var hashString: String { get { let result = spine_skeleton_data_get_hash(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_skeleton_data_set_hash(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -171,7 +172,7 @@ public class SkeletonData: NSObject { public var imagesPath: String { get { let result = spine_skeleton_data_get_images_path(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_skeleton_data_set_images_path(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -181,7 +182,7 @@ public class SkeletonData: NSObject { public var audioPath: String { get { let result = spine_skeleton_data_get_audio_path(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_skeleton_data_set_audio_path(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -191,7 +192,7 @@ public class SkeletonData: NSObject { public var fps: Float { get { let result = spine_skeleton_data_get_fps(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) - return result + return result } set { spine_skeleton_data_set_fps(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self), newValue) @@ -226,4 +227,4 @@ public class SkeletonData: NSObject { public func dispose() { spine_skeleton_data_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_json.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_json.swift index e8e956f28..511970734 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_json.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_json.swift @@ -78,4 +78,4 @@ public class SkeletonJson: NSObject { public func dispose() { spine_skeleton_json_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_json_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/skeleton_renderer.swift b/spine-ios/Sources/SpineSwift/Generated/skeleton_renderer.swift index 439f9690e..7232467d6 100644 --- a/spine-ios/Sources/SpineSwift/Generated/skeleton_renderer.swift +++ b/spine-ios/Sources/SpineSwift/Generated/skeleton_renderer.swift @@ -49,11 +49,12 @@ public class SkeletonRenderer: NSObject { } public func render(_ skeleton: Skeleton) -> RenderCommand? { - let result = spine_skeleton_renderer_render(_ptr.assumingMemoryBound(to: spine_skeleton_renderer_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_skeleton_renderer_render( + _ptr.assumingMemoryBound(to: spine_skeleton_renderer_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return result.map { RenderCommand(fromPointer: $0) } } public func dispose() { spine_skeleton_renderer_dispose(_ptr.assumingMemoryBound(to: spine_skeleton_renderer_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slider_data.swift b/spine-ios/Sources/SpineSwift/Generated/slider_data.swift index 21bf6d1ef..be36ce118 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slider_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slider_data.swift @@ -54,17 +54,18 @@ public class SliderData: PosedData, ConstraintData { public var animation: Animation { get { let result = spine_slider_data_get_animation(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return Animation(fromPointer: result!) + return Animation(fromPointer: result!) } set { - spine_slider_data_set_animation(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) + spine_slider_data_set_animation( + _ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) } } public var additive: Bool { get { let result = spine_slider_data_get_additive(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result + return result } set { spine_slider_data_set_additive(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue) @@ -74,7 +75,7 @@ public class SliderData: PosedData, ConstraintData { public var loop: Bool { get { let result = spine_slider_data_get_loop(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result + return result } set { spine_slider_data_set_loop(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue) @@ -84,45 +85,48 @@ public class SliderData: PosedData, ConstraintData { public var bone: BoneData? { get { let result = spine_slider_data_get_bone(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result.map { BoneData(fromPointer: $0) } + return result.map { BoneData(fromPointer: $0) } } set { - spine_slider_data_set_bone(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) + spine_slider_data_set_bone( + _ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } } public var property: FromProperty? { get { let result = spine_slider_data_get_property(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - guard let ptr = result else { return nil } - let rtti = spine_from_property_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_from_rotate": - return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self)) - case "spine_from_scale_x": - return FromScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_x_wrapper.self)) - case "spine_from_scale_y": - return FromScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_y_wrapper.self)) - case "spine_from_shear_y": - return FromShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_shear_y_wrapper.self)) - case "spine_from_x": - return FromX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_x_wrapper.self)) - case "spine_from_y": - return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty") - } + guard let ptr = result else { return nil } + let rtti = spine_from_property_get_rtti(ptr) + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_from_rotate": + return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self)) + case "spine_from_scale_x": + return FromScaleX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_x_wrapper.self)) + case "spine_from_scale_y": + return FromScaleY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_scale_y_wrapper.self)) + case "spine_from_shear_y": + return FromShearY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_shear_y_wrapper.self)) + case "spine_from_x": + return FromX(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_x_wrapper.self)) + case "spine_from_y": + return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty") + } } set { - spine_slider_data_set_property(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_from_property_wrapper.self)) + spine_slider_data_set_property( + _ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_from_property_wrapper.self) + ) } } public var scale: Float { get { let result = spine_slider_data_get_scale(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result + return result } set { spine_slider_data_set_scale(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue) @@ -132,7 +136,7 @@ public class SliderData: PosedData, ConstraintData { public var offset: Float { get { let result = spine_slider_data_get_offset(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result + return result } set { spine_slider_data_set_offset(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue) @@ -142,7 +146,7 @@ public class SliderData: PosedData, ConstraintData { public var local: Bool { get { let result = spine_slider_data_get_local(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) - return result + return result } set { spine_slider_data_set_local(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), newValue) @@ -155,7 +159,8 @@ public class SliderData: PosedData, ConstraintData { } public func createMethod(_ skeleton: Skeleton) -> Constraint { - let result = spine_slider_data_create_method(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_slider_data_create_method( + _ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) let rtti = spine_constraint_get_rtti(result!) let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { @@ -182,4 +187,4 @@ public class SliderData: PosedData, ConstraintData { public override func dispose() { spine_slider_data_dispose(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slider_mix_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/slider_mix_timeline.swift index 4df32749f..3a7ec63fb 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slider_mix_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slider_mix_timeline.swift @@ -49,4 +49,4 @@ public class SliderMixTimeline: ConstraintTimeline1 { public func dispose() { spine_slider_mix_timeline_dispose(_ptr.assumingMemoryBound(to: spine_slider_mix_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slider_pose.swift b/spine-ios/Sources/SpineSwift/Generated/slider_pose.swift index 63e117468..99173ad5f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slider_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slider_pose.swift @@ -51,7 +51,7 @@ public class SliderPose: NSObject { public var time: Float { get { let result = spine_slider_pose_get_time(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self)) - return result + return result } set { spine_slider_pose_set_time(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class SliderPose: NSObject { public var mix: Float { get { let result = spine_slider_pose_get_mix(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self)) - return result + return result } set { spine_slider_pose_set_mix(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self), newValue) @@ -69,10 +69,11 @@ public class SliderPose: NSObject { } public func set(_ pose: SliderPose) { - spine_slider_pose_set(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self)) + spine_slider_pose_set( + _ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self)) } public func dispose() { spine_slider_pose_dispose(_ptr.assumingMemoryBound(to: spine_slider_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slider_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/slider_timeline.swift index 614f77cf8..fa8718a00 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slider_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slider_timeline.swift @@ -49,4 +49,4 @@ public class SliderTimeline: ConstraintTimeline1 { public func dispose() { spine_slider_timeline_dispose(_ptr.assumingMemoryBound(to: spine_slider_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slot_curve_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/slot_curve_timeline.swift index 133c2d807..55aaee7e0 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slot_curve_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slot_curve_timeline.swift @@ -44,11 +44,11 @@ open class SlotCurveTimeline: CurveTimeline, SlotTimeline { public var slotIndex: Int32 { get { let result = spine_slot_curve_timeline_get_slot_index(_ptr.assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self)) - return result + return result } set { spine_slot_curve_timeline_set_slot_index(_ptr.assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self), newValue) } } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slot_data.swift b/spine-ios/Sources/SpineSwift/Generated/slot_data.swift index 55213ba7a..115e0cdfa 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slot_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slot_data.swift @@ -59,7 +59,7 @@ public class SlotData: PosedData { public var attachmentName: String { get { let result = spine_slot_data_get_attachment_name(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) - return String(cString: result!) + return String(cString: result!) } set { spine_slot_data_set_attachment_name(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), newValue) @@ -69,17 +69,18 @@ public class SlotData: PosedData { public var blendMode: BlendMode { get { let result = spine_slot_data_get_blend_mode(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) - return BlendMode(rawValue: Int32(result.rawValue))! + return BlendMode(rawValue: Int32(result.rawValue))! } set { - spine_slot_data_set_blend_mode(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), spine_blend_mode(rawValue: UInt32(newValue.rawValue))) + spine_slot_data_set_blend_mode( + _ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), spine_blend_mode(rawValue: UInt32(newValue.rawValue))) } } public var visible: Bool { get { let result = spine_slot_data_get_visible(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) - return result + return result } set { spine_slot_data_set_visible(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self), newValue) @@ -94,4 +95,4 @@ public class SlotData: PosedData { public override func dispose() { spine_slot_data_dispose(_ptr.assumingMemoryBound(to: spine_slot_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slot_pose.swift b/spine-ios/Sources/SpineSwift/Generated/slot_pose.swift index 07ff4ab3f..cac525cb4 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slot_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slot_pose.swift @@ -61,7 +61,7 @@ public class SlotPose: NSObject { public var hasDarkColor: Bool { get { let result = spine_slot_pose_has_dark_color(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) - return result + return result } set { spine_slot_pose_set_has_dark_color(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), newValue) @@ -71,35 +71,37 @@ public class SlotPose: NSObject { public var attachment: Attachment? { get { let result = spine_slot_pose_get_attachment(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) - guard let ptr = result else { return nil } - let rtti = spine_attachment_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) - case "spine_clipping_attachment": - return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) - case "spine_mesh_attachment": - return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - case "spine_path_attachment": - return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - case "spine_point_attachment": - return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - case "spine_region_attachment": - return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") - } + guard let ptr = result else { return nil } + let rtti = spine_attachment_get_rtti(ptr) + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_bounding_box_attachment": + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + case "spine_clipping_attachment": + return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) + case "spine_mesh_attachment": + return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) + case "spine_path_attachment": + return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) + case "spine_point_attachment": + return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) + case "spine_region_attachment": + return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") + } } set { - spine_slot_pose_set_attachment(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) + spine_slot_pose_set_attachment( + _ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) } } public var sequenceIndex: Int32 { get { let result = spine_slot_pose_get_sequence_index(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) - return result + return result } set { spine_slot_pose_set_sequence_index(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), newValue) @@ -112,10 +114,11 @@ public class SlotPose: NSObject { } public func set(_ pose: SlotPose) { - spine_slot_pose_set(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) + spine_slot_pose_set( + _ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) } public func dispose() { spine_slot_pose_dispose(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/slot_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/slot_timeline.swift index a083f86b2..4799c03ea 100644 --- a/spine-ios/Sources/SpineSwift/Generated/slot_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/slot_timeline.swift @@ -38,4 +38,4 @@ public protocol SlotTimeline { var rtti: Rtti { get } var slotIndex: Int32 { get set } static func rttiStatic() -> Rtti -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/spacing_mode.swift b/spine-ios/Sources/SpineSwift/Generated/spacing_mode.swift index 53794382b..ae99e776c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/spacing_mode.swift +++ b/spine-ios/Sources/SpineSwift/Generated/spacing_mode.swift @@ -41,4 +41,4 @@ public enum SpacingMode: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> SpacingMode? { return SpacingMode(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/texture_filter.swift b/spine-ios/Sources/SpineSwift/Generated/texture_filter.swift index cb45cf97f..13238f02e 100644 --- a/spine-ios/Sources/SpineSwift/Generated/texture_filter.swift +++ b/spine-ios/Sources/SpineSwift/Generated/texture_filter.swift @@ -45,4 +45,4 @@ public enum TextureFilter: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> TextureFilter? { return TextureFilter(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/texture_region.swift b/spine-ios/Sources/SpineSwift/Generated/texture_region.swift index 10817b16b..0f1ada737 100644 --- a/spine-ios/Sources/SpineSwift/Generated/texture_region.swift +++ b/spine-ios/Sources/SpineSwift/Generated/texture_region.swift @@ -56,7 +56,7 @@ public class TextureRegion: NSObject { public var u: Float { get { let result = spine_texture_region_get_u(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_u(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -66,7 +66,7 @@ public class TextureRegion: NSObject { public var v: Float { get { let result = spine_texture_region_get_v(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_v(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -76,7 +76,7 @@ public class TextureRegion: NSObject { public var u2: Float { get { let result = spine_texture_region_get_u2(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_u2(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -86,7 +86,7 @@ public class TextureRegion: NSObject { public var v2: Float { get { let result = spine_texture_region_get_v2(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_v2(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -96,7 +96,7 @@ public class TextureRegion: NSObject { public var regionWidth: Int32 { get { let result = spine_texture_region_get_region_width(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_region_width(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -106,7 +106,7 @@ public class TextureRegion: NSObject { public var regionHeight: Int32 { get { let result = spine_texture_region_get_region_height(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) - return result + return result } set { spine_texture_region_set_region_height(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self), newValue) @@ -121,4 +121,4 @@ public class TextureRegion: NSObject { public func dispose() { spine_texture_region_dispose(_ptr.assumingMemoryBound(to: spine_texture_region_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/texture_wrap.swift b/spine-ios/Sources/SpineSwift/Generated/texture_wrap.swift index 467c1f129..253143be9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/texture_wrap.swift +++ b/spine-ios/Sources/SpineSwift/Generated/texture_wrap.swift @@ -40,4 +40,4 @@ public enum TextureWrap: Int32, CaseIterable { public static func fromValue(_ value: Int32) -> TextureWrap? { return TextureWrap(rawValue: value) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_property.swift b/spine-ios/Sources/SpineSwift/Generated/to_property.swift index fba7277b7..7a1067932 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_property.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_property.swift @@ -51,7 +51,7 @@ open class ToProperty: NSObject { public var offset: Float { get { let result = spine_to_property_get__offset(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self)) - return result + return result } set { spine_to_property_set__offset(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), newValue) @@ -61,7 +61,7 @@ open class ToProperty: NSObject { public var max: Float { get { let result = spine_to_property_get__max(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self)) - return result + return result } set { spine_to_property_set__max(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), newValue) @@ -71,7 +71,7 @@ open class ToProperty: NSObject { public var scale: Float { get { let result = spine_to_property_get__scale(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self)) - return result + return result } set { spine_to_property_set__scale(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), newValue) @@ -79,12 +79,17 @@ open class ToProperty: NSObject { } public func mix(_ pose: TransformConstraintPose) -> Float { - let result = spine_to_property_mix(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) + let result = spine_to_property_mix( + _ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) return result } public func apply(_ skeleton: Skeleton, _ pose: TransformConstraintPose, _ bone: BonePose, _ value: Float, _ local: Bool, _ additive: Bool) { - spine_to_property_apply(_ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), value, local, additive) + spine_to_property_apply( + _ptr.assumingMemoryBound(to: spine_to_property_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), + bone._ptr.assumingMemoryBound(to: spine_bone_pose_wrapper.self), value, local, additive) } public static func rttiStatic() -> Rtti { @@ -92,4 +97,4 @@ open class ToProperty: NSObject { return Rtti(fromPointer: result!) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_rotate.swift b/spine-ios/Sources/SpineSwift/Generated/to_rotate.swift index c56b2e320..5f460604f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_rotate.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_rotate.swift @@ -49,4 +49,4 @@ public class ToRotate: ToProperty { public func dispose() { spine_to_rotate_dispose(_ptr.assumingMemoryBound(to: spine_to_rotate_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_scale_x.swift b/spine-ios/Sources/SpineSwift/Generated/to_scale_x.swift index 91f295263..8ae1b27d2 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_scale_x.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_scale_x.swift @@ -49,4 +49,4 @@ public class ToScaleX: ToProperty { public func dispose() { spine_to_scale_x_dispose(_ptr.assumingMemoryBound(to: spine_to_scale_x_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_scale_y.swift b/spine-ios/Sources/SpineSwift/Generated/to_scale_y.swift index 6a5571fa2..fc03da829 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_scale_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_scale_y.swift @@ -49,4 +49,4 @@ public class ToScaleY: ToProperty { public func dispose() { spine_to_scale_y_dispose(_ptr.assumingMemoryBound(to: spine_to_scale_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_shear_y.swift b/spine-ios/Sources/SpineSwift/Generated/to_shear_y.swift index 320c3386d..0675a9e97 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_shear_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_shear_y.swift @@ -49,4 +49,4 @@ public class ToShearY: ToProperty { public func dispose() { spine_to_shear_y_dispose(_ptr.assumingMemoryBound(to: spine_to_shear_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_x.swift b/spine-ios/Sources/SpineSwift/Generated/to_x.swift index 5fd6134e7..f6a4f3434 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_x.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_x.swift @@ -49,4 +49,4 @@ public class ToX: ToProperty { public func dispose() { spine_to_x_dispose(_ptr.assumingMemoryBound(to: spine_to_x_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/to_y.swift b/spine-ios/Sources/SpineSwift/Generated/to_y.swift index e0e7d05c7..5c77d0e8f 100644 --- a/spine-ios/Sources/SpineSwift/Generated/to_y.swift +++ b/spine-ios/Sources/SpineSwift/Generated/to_y.swift @@ -49,4 +49,4 @@ public class ToY: ToProperty { public func dispose() { spine_to_y_dispose(_ptr.assumingMemoryBound(to: spine_to_y_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/track_entry.swift b/spine-ios/Sources/SpineSwift/Generated/track_entry.swift index 57705112c..603fc61f4 100644 --- a/spine-ios/Sources/SpineSwift/Generated/track_entry.swift +++ b/spine-ios/Sources/SpineSwift/Generated/track_entry.swift @@ -56,10 +56,11 @@ public class TrackEntry: NSObject { public var animation: Animation { get { let result = spine_track_entry_get_animation(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return Animation(fromPointer: result!) + return Animation(fromPointer: result!) } set { - spine_track_entry_set_animation(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) + spine_track_entry_set_animation( + _ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_animation_wrapper.self)) } } @@ -71,7 +72,7 @@ public class TrackEntry: NSObject { public var loop: Bool { get { let result = spine_track_entry_get_loop(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_loop(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -81,7 +82,7 @@ public class TrackEntry: NSObject { public var holdPrevious: Bool { get { let result = spine_track_entry_get_hold_previous(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_hold_previous(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -91,7 +92,7 @@ public class TrackEntry: NSObject { public var reverse: Bool { get { let result = spine_track_entry_get_reverse(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_reverse(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -101,7 +102,7 @@ public class TrackEntry: NSObject { public var shortestRotation: Bool { get { let result = spine_track_entry_get_shortest_rotation(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_shortest_rotation(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -111,7 +112,7 @@ public class TrackEntry: NSObject { public var delay: Float { get { let result = spine_track_entry_get_delay(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_delay(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -121,7 +122,7 @@ public class TrackEntry: NSObject { public var trackTime: Float { get { let result = spine_track_entry_get_track_time(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_track_time(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -131,7 +132,7 @@ public class TrackEntry: NSObject { public var trackEnd: Float { get { let result = spine_track_entry_get_track_end(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_track_end(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -141,7 +142,7 @@ public class TrackEntry: NSObject { public var animationStart: Float { get { let result = spine_track_entry_get_animation_start(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_animation_start(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -151,7 +152,7 @@ public class TrackEntry: NSObject { public var animationEnd: Float { get { let result = spine_track_entry_get_animation_end(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_animation_end(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -161,7 +162,7 @@ public class TrackEntry: NSObject { public var animationLast: Float { get { let result = spine_track_entry_get_animation_last(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_animation_last(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -176,7 +177,7 @@ public class TrackEntry: NSObject { public var timeScale: Float { get { let result = spine_track_entry_get_time_scale(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_time_scale(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -186,7 +187,7 @@ public class TrackEntry: NSObject { public var alpha: Float { get { let result = spine_track_entry_get_alpha(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_alpha(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -196,7 +197,7 @@ public class TrackEntry: NSObject { public var eventThreshold: Float { get { let result = spine_track_entry_get_event_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_event_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -206,7 +207,7 @@ public class TrackEntry: NSObject { public var mixAttachmentThreshold: Float { get { let result = spine_track_entry_get_mix_attachment_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_mix_attachment_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -216,7 +217,7 @@ public class TrackEntry: NSObject { public var alphaAttachmentThreshold: Float { get { let result = spine_track_entry_get_alpha_attachment_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_alpha_attachment_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -226,7 +227,7 @@ public class TrackEntry: NSObject { public var mixDrawOrderThreshold: Float { get { let result = spine_track_entry_get_mix_draw_order_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_mix_draw_order_threshold(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -246,7 +247,7 @@ public class TrackEntry: NSObject { public var mixTime: Float { get { let result = spine_track_entry_get_mix_time(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result + return result } set { spine_track_entry_set_mix_time(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue) @@ -261,10 +262,11 @@ public class TrackEntry: NSObject { public var mixBlend: MixBlend { get { let result = spine_track_entry_get_mix_blend(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return MixBlend(rawValue: Int32(result.rawValue))! + return MixBlend(rawValue: Int32(result.rawValue))! } set { - spine_track_entry_set_mix_blend(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), spine_mix_blend(rawValue: UInt32(newValue.rawValue))) + spine_track_entry_set_mix_blend( + _ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), spine_mix_blend(rawValue: UInt32(newValue.rawValue))) } } @@ -301,10 +303,12 @@ public class TrackEntry: NSObject { public var animationState: AnimationState? { get { let result = spine_track_entry_get_animation_state(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) - return result.map { AnimationState(fromPointer: $0) } + return result.map { AnimationState(fromPointer: $0) } } set { - spine_track_entry_set_animation_state(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self)) + spine_track_entry_set_animation_state( + _ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_animation_state_wrapper.self)) } } @@ -331,4 +335,4 @@ public class TrackEntry: NSObject { public func dispose() { spine_track_entry_dispose(_ptr.assumingMemoryBound(to: spine_track_entry_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/transform_constraint.swift b/spine-ios/Sources/SpineSwift/Generated/transform_constraint.swift index 341cd4228..65d7b5a81 100644 --- a/spine-ios/Sources/SpineSwift/Generated/transform_constraint.swift +++ b/spine-ios/Sources/SpineSwift/Generated/transform_constraint.swift @@ -42,7 +42,9 @@ public class TransformConstraint: PosedActive, Posed, Constraint { } public convenience init(_ data: TransformConstraintData, _ skeleton: Skeleton) { - let ptr = spine_transform_constraint_create(data._ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let ptr = spine_transform_constraint_create( + data._ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) self.init(fromPointer: ptr!) } @@ -64,10 +66,11 @@ public class TransformConstraint: PosedActive, Posed, Constraint { public var source: Bone { get { let result = spine_transform_constraint_get_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) - return Bone(fromPointer: result!) + return Bone(fromPointer: result!) } set { - spine_transform_constraint_set_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) + spine_transform_constraint_set_source( + _ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_wrapper.self)) } } @@ -92,16 +95,20 @@ public class TransformConstraint: PosedActive, Posed, Constraint { } public func copyAttachment(_ skeleton: Skeleton) -> TransformConstraint { - let result = spine_transform_constraint_copy(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_transform_constraint_copy( + _ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) return TransformConstraint(fromPointer: result!) } public func update(_ skeleton: Skeleton, _ physics: Physics) { - spine_transform_constraint_update(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), spine_physics(rawValue: UInt32(physics.rawValue))) + spine_transform_constraint_update( + _ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + spine_physics(rawValue: UInt32(physics.rawValue))) } public func sort(_ skeleton: Skeleton) { - spine_transform_constraint_sort(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + spine_transform_constraint_sort( + _ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) } public func resetConstrained() { @@ -120,4 +127,4 @@ public class TransformConstraint: PosedActive, Posed, Constraint { public override func dispose() { spine_transform_constraint_dispose(_ptr.assumingMemoryBound(to: spine_transform_constraint_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_data.swift b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_data.swift index aacda7b36..5f6d5fda9 100644 --- a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_data.swift +++ b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_data.swift @@ -59,17 +59,20 @@ public class TransformConstraintData: PosedData, ConstraintData { public var source: BoneData { get { let result = spine_transform_constraint_data_get_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return BoneData(fromPointer: result!) + return BoneData(fromPointer: result!) } set { - spine_transform_constraint_data_set_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) + spine_transform_constraint_data_set_source( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_bone_data_wrapper.self)) } } public var offsetRotation: Float { get { - let result = spine_transform_constraint_data_get_offset_rotation(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + let result = spine_transform_constraint_data_get_offset_rotation( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) + return result } set { spine_transform_constraint_data_set_offset_rotation(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -79,7 +82,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var offsetX: Float { get { let result = spine_transform_constraint_data_get_offset_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_offset_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -89,7 +92,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var offsetY: Float { get { let result = spine_transform_constraint_data_get_offset_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_offset_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -98,8 +101,9 @@ public class TransformConstraintData: PosedData, ConstraintData { public var offsetScaleX: Float { get { - let result = spine_transform_constraint_data_get_offset_scale_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + let result = spine_transform_constraint_data_get_offset_scale_x( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) + return result } set { spine_transform_constraint_data_set_offset_scale_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -108,8 +112,9 @@ public class TransformConstraintData: PosedData, ConstraintData { public var offsetScaleY: Float { get { - let result = spine_transform_constraint_data_get_offset_scale_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + let result = spine_transform_constraint_data_get_offset_scale_y( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) + return result } set { spine_transform_constraint_data_set_offset_scale_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -118,8 +123,9 @@ public class TransformConstraintData: PosedData, ConstraintData { public var offsetShearY: Float { get { - let result = spine_transform_constraint_data_get_offset_shear_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + let result = spine_transform_constraint_data_get_offset_shear_y( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) + return result } set { spine_transform_constraint_data_set_offset_shear_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -129,7 +135,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var localSource: Bool { get { let result = spine_transform_constraint_data_get_local_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_local_source(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -139,7 +145,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var localTarget: Bool { get { let result = spine_transform_constraint_data_get_local_target(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_local_target(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -149,7 +155,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var additive: Bool { get { let result = spine_transform_constraint_data_get_additive(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_additive(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -159,7 +165,7 @@ public class TransformConstraintData: PosedData, ConstraintData { public var clamp: Bool { get { let result = spine_transform_constraint_data_get_clamp(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) - return result + return result } set { spine_transform_constraint_data_set_clamp(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), newValue) @@ -177,7 +183,9 @@ public class TransformConstraintData: PosedData, ConstraintData { } public func createMethod(_ skeleton: Skeleton) -> Constraint { - let result = spine_transform_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) + let result = spine_transform_constraint_data_create_method( + _ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self), + skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self)) let rtti = spine_constraint_get_rtti(result!) let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) switch rttiClassName { @@ -204,4 +212,4 @@ public class TransformConstraintData: PosedData, ConstraintData { public override func dispose() { spine_transform_constraint_data_dispose(_ptr.assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_pose.swift b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_pose.swift index 9b0b8b9a2..725c4d3ab 100644 --- a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_pose.swift +++ b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_pose.swift @@ -51,7 +51,7 @@ public class TransformConstraintPose: NSObject { public var mixRotate: Float { get { let result = spine_transform_constraint_pose_get_mix_rotate(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_rotate(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -61,7 +61,7 @@ public class TransformConstraintPose: NSObject { public var mixX: Float { get { let result = spine_transform_constraint_pose_get_mix_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -71,7 +71,7 @@ public class TransformConstraintPose: NSObject { public var mixY: Float { get { let result = spine_transform_constraint_pose_get_mix_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -81,7 +81,7 @@ public class TransformConstraintPose: NSObject { public var mixScaleX: Float { get { let result = spine_transform_constraint_pose_get_mix_scale_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_scale_x(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -91,7 +91,7 @@ public class TransformConstraintPose: NSObject { public var mixScaleY: Float { get { let result = spine_transform_constraint_pose_get_mix_scale_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_scale_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -101,7 +101,7 @@ public class TransformConstraintPose: NSObject { public var mixShearY: Float { get { let result = spine_transform_constraint_pose_get_mix_shear_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) - return result + return result } set { spine_transform_constraint_pose_set_mix_shear_y(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), newValue) @@ -109,10 +109,12 @@ public class TransformConstraintPose: NSObject { } public func set(_ pose: TransformConstraintPose) { - spine_transform_constraint_pose_set(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) + spine_transform_constraint_pose_set( + _ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self), + pose._ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) } public func dispose() { spine_transform_constraint_pose_dispose(_ptr.assumingMemoryBound(to: spine_transform_constraint_pose_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_timeline.swift index 0cf7048e1..89247a97c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/transform_constraint_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/transform_constraint_timeline.swift @@ -48,19 +48,25 @@ public class TransformConstraintTimeline: CurveTimeline, ConstraintTimeline { public var constraintIndex: Int32 { get { - let result = spine_transform_constraint_timeline_get_constraint_index(_ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self)) - return result + let result = spine_transform_constraint_timeline_get_constraint_index( + _ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self)) + return result } set { - spine_transform_constraint_timeline_set_constraint_index(_ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self), newValue) + spine_transform_constraint_timeline_set_constraint_index( + _ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self), newValue) } } - public func setFrame(_ frame: Int32, _ time: Float, _ mixRotate: Float, _ mixX: Float, _ mixY: Float, _ mixScaleX: Float, _ mixScaleY: Float, _ mixShearY: Float) { - spine_transform_constraint_timeline_set_frame(_ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self), frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) + public func setFrame( + _ frame: Int32, _ time: Float, _ mixRotate: Float, _ mixX: Float, _ mixY: Float, _ mixScaleX: Float, _ mixScaleY: Float, _ mixShearY: Float + ) { + spine_transform_constraint_timeline_set_frame( + _ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self), frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, + mixShearY) } public func dispose() { spine_transform_constraint_timeline_dispose(_ptr.assumingMemoryBound(to: spine_transform_constraint_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/translate_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/translate_timeline.swift index e773a5236..d7d19ce40 100644 --- a/spine-ios/Sources/SpineSwift/Generated/translate_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/translate_timeline.swift @@ -49,4 +49,4 @@ public class TranslateTimeline: BoneTimeline2 { public func dispose() { spine_translate_timeline_dispose(_ptr.assumingMemoryBound(to: spine_translate_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/translate_x_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/translate_x_timeline.swift index 23945908d..8ea2cda45 100644 --- a/spine-ios/Sources/SpineSwift/Generated/translate_x_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/translate_x_timeline.swift @@ -49,4 +49,4 @@ public class TranslateXTimeline: BoneTimeline1 { public func dispose() { spine_translate_x_timeline_dispose(_ptr.assumingMemoryBound(to: spine_translate_x_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/translate_y_timeline.swift b/spine-ios/Sources/SpineSwift/Generated/translate_y_timeline.swift index 4b4cc619b..30a28bb4c 100644 --- a/spine-ios/Sources/SpineSwift/Generated/translate_y_timeline.swift +++ b/spine-ios/Sources/SpineSwift/Generated/translate_y_timeline.swift @@ -49,4 +49,4 @@ public class TranslateYTimeline: BoneTimeline1 { public func dispose() { spine_translate_y_timeline_dispose(_ptr.assumingMemoryBound(to: spine_translate_y_timeline_wrapper.self)) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineSwift/Generated/vertex_attachment.swift b/spine-ios/Sources/SpineSwift/Generated/vertex_attachment.swift index e6904c64c..4bdcd20b2 100644 --- a/spine-ios/Sources/SpineSwift/Generated/vertex_attachment.swift +++ b/spine-ios/Sources/SpineSwift/Generated/vertex_attachment.swift @@ -49,27 +49,31 @@ open class VertexAttachment: Attachment { public var bones: ArrayInt { get { let result = spine_vertex_attachment_get_bones(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) - return ArrayInt(fromPointer: result!) + return ArrayInt(fromPointer: result!) } set { - spine_vertex_attachment_set_bones(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) + spine_vertex_attachment_set_bones( + _ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_int_wrapper.self)) } } public var vertices: ArrayFloat { get { let result = spine_vertex_attachment_get_vertices(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) - return ArrayFloat(fromPointer: result!) + return ArrayFloat(fromPointer: result!) } set { - spine_vertex_attachment_set_vertices(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) + spine_vertex_attachment_set_vertices( + _ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), + newValue._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self)) } } public var worldVerticesLength: Int { get { let result = spine_vertex_attachment_get_world_vertices_length(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) - return result + return result } set { spine_vertex_attachment_set_world_vertices_length(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), newValue) @@ -79,37 +83,47 @@ open class VertexAttachment: Attachment { public var timelineAttachment: Attachment? { get { let result = spine_vertex_attachment_get_timeline_attachment(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) - guard let ptr = result else { return nil } - let rtti = spine_attachment_get_rtti(ptr) - let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) - switch rttiClassName { - case "spine_bounding_box_attachment": - return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) - case "spine_clipping_attachment": - return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) - case "spine_mesh_attachment": - return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) - case "spine_path_attachment": - return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) - case "spine_point_attachment": - return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) - case "spine_region_attachment": - return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) - default: - fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") - } + guard let ptr = result else { return nil } + let rtti = spine_attachment_get_rtti(ptr) + let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!) + switch rttiClassName { + case "spine_bounding_box_attachment": + return BoundingBoxAttachment( + fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self)) + case "spine_clipping_attachment": + return ClippingAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_clipping_attachment_wrapper.self)) + case "spine_mesh_attachment": + return MeshAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_mesh_attachment_wrapper.self)) + case "spine_path_attachment": + return PathAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_path_attachment_wrapper.self)) + case "spine_point_attachment": + return PointAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_point_attachment_wrapper.self)) + case "spine_region_attachment": + return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self)) + default: + fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment") + } } set { - spine_vertex_attachment_set_timeline_attachment(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), newValue?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) + spine_vertex_attachment_set_timeline_attachment( + _ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), + newValue?._ptr.assumingMemoryBound(to: spine_attachment_wrapper.self)) } } public func copyTo(_ other: VertexAttachment) { - spine_vertex_attachment_copy_to(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), other._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) + spine_vertex_attachment_copy_to( + _ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), + other._ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self)) } - public func computeWorldVertices(_ skeleton: Skeleton, _ slot: Slot, _ start: Int, _ count: Int, _ worldVertices: ArrayFloat, _ offset: Int, _ stride: Int) { - spine_vertex_attachment_compute_world_vertices_2(_ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), start, count, worldVertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), offset, stride) + public func computeWorldVertices( + _ skeleton: Skeleton, _ slot: Slot, _ start: Int, _ count: Int, _ worldVertices: ArrayFloat, _ offset: Int, _ stride: Int + ) { + spine_vertex_attachment_compute_world_vertices_2( + _ptr.assumingMemoryBound(to: spine_vertex_attachment_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), + slot._ptr.assumingMemoryBound(to: spine_slot_wrapper.self), start, count, + worldVertices._ptr.assumingMemoryBound(to: spine_array_float_wrapper.self), offset, stride) } -} \ No newline at end of file +} diff --git a/spine-ios/Sources/SpineiOS/Extensions/MTLClearColor+UIColor.swift b/spine-ios/Sources/SpineiOS/Extensions/MTLClearColor+UIColor.swift index 2099ecc1f..0d54a7070 100644 --- a/spine-ios/Sources/SpineiOS/Extensions/MTLClearColor+UIColor.swift +++ b/spine-ios/Sources/SpineiOS/Extensions/MTLClearColor+UIColor.swift @@ -28,19 +28,20 @@ *****************************************************************************/ import MetalKit + #if canImport(UIKit) -import UIKit + import UIKit -extension MTLClearColor { - init(_ color: UIColor) { - var red: CGFloat = 0 - var green: CGFloat = 0 - var blue: CGFloat = 0 - var alpha: CGFloat = 0 + extension MTLClearColor { + init(_ color: UIColor) { + var red: CGFloat = 0 + var green: CGFloat = 0 + var blue: CGFloat = 0 + var alpha: CGFloat = 0 - color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) + color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) - self.init(red: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha)) + self.init(red: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha)) + } } -} #endif diff --git a/spine-ios/Sources/SpineiOS/Extensions/RenderCommand+Vertices.swift b/spine-ios/Sources/SpineiOS/Extensions/RenderCommand+Vertices.swift index 16efb04f1..ba6439d8c 100644 --- a/spine-ios/Sources/SpineiOS/Extensions/RenderCommand+Vertices.swift +++ b/spine-ios/Sources/SpineiOS/Extensions/RenderCommand+Vertices.swift @@ -28,8 +28,8 @@ *****************************************************************************/ import Foundation -import SpineSwift import SpineShadersStructs +import SpineSwift import simd extension RenderCommand { @@ -39,9 +39,10 @@ extension RenderCommand { let numVerts = Int(numVertices) let numInds = Int(numIndices) guard let indicesPtr = indices, - let positionsPtr = positions, - let uvsPtr = uvs, - let colorsPtr = colors else { + let positionsPtr = positions, + let uvsPtr = uvs, + let colorsPtr = colors + else { return vertices } let indicesArray = Array(UnsafeBufferPointer(start: indicesPtr, count: numInds)) diff --git a/spine-ios/Sources/SpineiOS/Extensions/SkeletonDrawableWrapper+CGImage.swift b/spine-ios/Sources/SpineiOS/Extensions/SkeletonDrawableWrapper+CGImage.swift index 50e6c8906..8b0b30643 100644 --- a/spine-ios/Sources/SpineiOS/Extensions/SkeletonDrawableWrapper+CGImage.swift +++ b/spine-ios/Sources/SpineiOS/Extensions/SkeletonDrawableWrapper+CGImage.swift @@ -29,62 +29,63 @@ import CoreGraphics import Foundation + #if canImport(UIKit) -import UIKit + import UIKit -extension SkeletonDrawableWrapper { + extension SkeletonDrawableWrapper { - /// Render the ``Skeleton`` to a `CGImage` - /// - /// Parameters: - /// - size: The size of the `CGImage` that should be rendered. - /// - backgroundColor: the background color of the image - /// - scaleFactor: The scale factor. Set this to `UIScreen.main.scale` if you want to show the image in a view - public func renderToImage(size: CGSize, backgroundColor: UIColor, scaleFactor: CGFloat = 1) throws -> CGImage? { - let spineView = SpineUIView( - controller: SpineController(disposeDrawableOnDeInit: false), // Doesn't own the drawable - backgroundColor: backgroundColor - ) - spineView.frame = CGRect(origin: .zero, size: size) - spineView.isPaused = false - spineView.enableSetNeedsDisplay = false - spineView.framebufferOnly = false - spineView.contentScaleFactor = scaleFactor + /// Render the ``Skeleton`` to a `CGImage` + /// + /// Parameters: + /// - size: The size of the `CGImage` that should be rendered. + /// - backgroundColor: the background color of the image + /// - scaleFactor: The scale factor. Set this to `UIScreen.main.scale` if you want to show the image in a view + public func renderToImage(size: CGSize, backgroundColor: UIColor, scaleFactor: CGFloat = 1) throws -> CGImage? { + let spineView = SpineUIView( + controller: SpineController(disposeDrawableOnDeInit: false), // Doesn't own the drawable + backgroundColor: backgroundColor + ) + spineView.frame = CGRect(origin: .zero, size: size) + spineView.isPaused = false + spineView.enableSetNeedsDisplay = false + spineView.framebufferOnly = false + spineView.contentScaleFactor = scaleFactor - try spineView.load(drawable: self) - spineView.renderer?.waitUntilCompleted = true + try spineView.load(drawable: self) + spineView.renderer?.waitUntilCompleted = true - spineView.delegate?.draw(in: spineView) + spineView.delegate?.draw(in: spineView) - guard let texture = spineView.currentDrawable?.texture else { - throw SpineError("Could not read texture.") + guard let texture = spineView.currentDrawable?.texture else { + throw SpineError("Could not read texture.") + } + let width = texture.width + let height = texture.height + let rowBytes = width * 4 + let data = UnsafeMutableRawPointer.allocate(byteCount: rowBytes * height, alignment: MemoryLayout.alignment) + defer { + data.deallocate() + } + + let region = MTLRegionMake2D(0, 0, width, height) + texture.getBytes(data, bytesPerRow: rowBytes, from: region, mipmapLevel: 0) + + let bitmapInfo = CGBitmapInfo( + rawValue: CGImageAlphaInfo.premultipliedFirst.rawValue + ).union(.byteOrder32Little) + + let colorSpace = CGColorSpaceCreateDeviceRGB() + guard + let context = CGContext( + data: data, width: width, height: height, bitsPerComponent: 8, bytesPerRow: rowBytes, space: colorSpace, + bitmapInfo: bitmapInfo.rawValue), + let cgImage = context.makeImage() + else { + throw SpineError("Could not create image.") + } + return cgImage } - let width = texture.width - let height = texture.height - let rowBytes = width * 4 - let data = UnsafeMutableRawPointer.allocate(byteCount: rowBytes * height, alignment: MemoryLayout.alignment) - defer { - data.deallocate() - } - - let region = MTLRegionMake2D(0, 0, width, height) - texture.getBytes(data, bytesPerRow: rowBytes, from: region, mipmapLevel: 0) - - let bitmapInfo = CGBitmapInfo( - rawValue: CGImageAlphaInfo.premultipliedFirst.rawValue - ).union(.byteOrder32Little) - - let colorSpace = CGColorSpaceCreateDeviceRGB() - guard - let context = CGContext( - data: data, width: width, height: height, bitsPerComponent: 8, bytesPerRow: rowBytes, space: colorSpace, - bitmapInfo: bitmapInfo.rawValue), - let cgImage = context.makeImage() - else { - throw SpineError("Could not create image.") - } - return cgImage } -} #endif diff --git a/spine-ios/Sources/SpineiOS/Metal/SpineRenderer.swift b/spine-ios/Sources/SpineiOS/Metal/SpineRenderer.swift index edbd945a7..b66a134d5 100644 --- a/spine-ios/Sources/SpineiOS/Metal/SpineRenderer.swift +++ b/spine-ios/Sources/SpineiOS/Metal/SpineRenderer.swift @@ -29,9 +29,9 @@ import Foundation import MetalKit -import SpineSwift import SpineC import SpineShadersStructs +import SpineSwift protocol SpineRendererDelegate: AnyObject { func spineRendererWillUpdate(_ spineRenderer: SpineRenderer) diff --git a/spine-ios/Sources/SpineiOS/SkeletonDrawableWrapper.swift b/spine-ios/Sources/SpineiOS/SkeletonDrawableWrapper.swift index 19b36a629..79dcd08a1 100644 --- a/spine-ios/Sources/SpineiOS/SkeletonDrawableWrapper.swift +++ b/spine-ios/Sources/SpineiOS/SkeletonDrawableWrapper.swift @@ -135,7 +135,7 @@ public final class SkeletonDrawableWrapper: NSObject { public func update(delta: Float) { if disposed { return } - skeletonDrawable.update(delta); + skeletonDrawable.update(delta) } public func dispose() { diff --git a/spine-ios/Sources/SpineiOS/SpineController.swift b/spine-ios/Sources/SpineiOS/SpineController.swift index c88399e2f..763ac6def 100644 --- a/spine-ios/Sources/SpineiOS/SpineController.swift +++ b/spine-ios/Sources/SpineiOS/SpineController.swift @@ -30,8 +30,8 @@ import CoreGraphics import Foundation import QuartzCore -import UIKit import SpineSwift +import UIKit public typealias SpineControllerCallback = (_ controller: SpineController) -> Void @@ -110,7 +110,7 @@ public final class SpineController: NSObject, ObservableObject { drawable?.dispose() // TODO move drawable out of view? } } - + /// Manually dispose the drawable. Call this when you know the controller is no longer needed. /// This is useful in SwiftUI where views may be cached and deinit may be delayed. public func dispose() { @@ -244,7 +244,7 @@ extension SpineController: SpineRendererDataSource { func renderCommands(_ spineRenderer: SpineRenderer) -> [RenderCommand] { guard let drawable = drawable else { return [] } - + var commands = [RenderCommand]() var current = drawable.skeletonDrawable.render() while let cmd = current { diff --git a/spine-ios/Sources/SpineiOS/SpineSwiftExtensions.swift b/spine-ios/Sources/SpineiOS/SpineSwiftExtensions.swift index bdeb750da..1d477f3f5 100644 --- a/spine-ios/Sources/SpineiOS/SpineSwiftExtensions.swift +++ b/spine-ios/Sources/SpineiOS/SpineSwiftExtensions.swift @@ -91,25 +91,25 @@ extension Atlas { guard let atlasData = String(data: data, encoding: .utf8) else { throw SpineError("Couldn't read atlas bytes as utf8 string") } - + // Use SpineSwift's loadAtlas function let atlas = try loadAtlas(atlasData) - + var atlasPages = [UIImage]() - + // Load images for each atlas page let pages = atlas.pages for i in 0.. 0 ? (controller.atlas.pages[0]?.pma ?? false) : false - + renderer = try SpineRenderer( device: SpineObjects.shared.device, commandQueue: SpineObjects.shared.commandQueue, diff --git a/spine-ios/test/Package.swift b/spine-ios/test/Package.swift index 6cb872713..22051986d 100644 --- a/spine-ios/test/Package.swift +++ b/spine-ios/test/Package.swift @@ -16,9 +16,9 @@ let package = Package( name: "SpineTest", dependencies: [ .product(name: "SpineC", package: "spine-runtimes"), - .product(name: "SpineSwift", package: "spine-runtimes") + .product(name: "SpineSwift", package: "spine-runtimes"), ], path: "src" ) ] -) \ No newline at end of file +) diff --git a/spine-ios/test/src/main.swift b/spine-ios/test/src/main.swift index 51b4a91ec..8aa737e7d 100644 --- a/spine-ios/test/src/main.swift +++ b/spine-ios/test/src/main.swift @@ -14,4 +14,4 @@ print("\n=== Testing SpineSwift API ===") print("Starting SpineSwift test...") print("About to call runSkeletonDrawableTestSwift...") runSkeletonDrawableTestSwift() -print("SpineSwift test completed") \ No newline at end of file +print("SpineSwift test completed") diff --git a/spine-ios/test/src/skeleton_drawable_test.swift b/spine-ios/test/src/skeleton_drawable_test.swift index aef761320..d7b73ab39 100644 --- a/spine-ios/test/src/skeleton_drawable_test.swift +++ b/spine-ios/test/src/skeleton_drawable_test.swift @@ -89,7 +89,7 @@ func runSkeletonDrawableTest() { // Set an animation and setup track entry listener let trackEntry = spine_animation_state_set_animation_1(animationState, 0, "walk", true) print("āœ“ Set animation: walk") - + // Test track entry properties if let trackEntry = trackEntry { let trackIndex = spine_track_entry_get_track_index(trackEntry) @@ -100,7 +100,7 @@ func runSkeletonDrawableTest() { // Update several times to trigger events print("\nUpdating animation state...") for i in 0..<5 { - spine_animation_state_update(animationState, 0.016) // ~60fps + spine_animation_state_update(animationState, 0.016) // ~60fps spine_animation_state_apply(animationState, skeleton) // Check for events @@ -152,7 +152,7 @@ func runSkeletonDrawableTest() { // Test with different animations that might have different bounds print("\nTesting bounds with jump animation:") spine_animation_state_set_animation_1(animationState, 0, "jump", false) - spine_animation_state_update(animationState, 0.5) // Update to middle of jump + spine_animation_state_update(animationState, 0.5) // Update to middle of jump spine_animation_state_apply(animationState, skeleton) spine_skeleton_update_world_transform(skeleton, SPINE_PHYSICS_NONE) diff --git a/spine-ios/test/src/skeleton_drawable_test_swift.swift b/spine-ios/test/src/skeleton_drawable_test_swift.swift index d05ff060a..d19ba5ca2 100644 --- a/spine-ios/test/src/skeleton_drawable_test_swift.swift +++ b/spine-ios/test/src/skeleton_drawable_test_swift.swift @@ -65,7 +65,8 @@ func runSkeletonDrawableTestSwift() { drawable.skeleton.updateWorldTransform(Physics.none) let boundsAfterPose = drawable.skeleton.bounds - print(" Bounds after setupPose: x=\(boundsAfterPose.x), y=\(boundsAfterPose.y), width=\(boundsAfterPose.width), height=\(boundsAfterPose.height)") + print( + " Bounds after setupPose: x=\(boundsAfterPose.x), y=\(boundsAfterPose.y), width=\(boundsAfterPose.width), height=\(boundsAfterPose.height)") // Test position let position = drawable.skeleton.getPosition() @@ -96,7 +97,7 @@ func runSkeletonDrawableTestSwift() { // Update several times to trigger events print("\nUpdating animation state...") for i in 0..<5 { - drawable.update(0.016) // ~60fps + drawable.update(0.016) // ~60fps print(" Frame \(i): updated") } @@ -114,19 +115,21 @@ func runSkeletonDrawableTestSwift() { print("\nTesting bounds after animation:") drawable.skeleton.updateWorldTransform(Physics.none) let boundsAfterAnimation = drawable.skeleton.bounds - print(" Bounds after animation: x=\(boundsAfterAnimation.x), y=\(boundsAfterAnimation.y), width=\(boundsAfterAnimation.width), height=\(boundsAfterAnimation.height)") + print( + " Bounds after animation: x=\(boundsAfterAnimation.x), y=\(boundsAfterAnimation.y), width=\(boundsAfterAnimation.width), height=\(boundsAfterAnimation.height)" + ) // Test with different animations that might have different bounds print("\nTesting bounds with jump animation:") _ = drawable.animationState.setAnimation(0, "jump", false) - drawable.update(0.5) // Update to middle of jump + drawable.update(0.5) // Update to middle of jump let boundsAfterJump = drawable.skeleton.bounds print(" Bounds during jump: x=\(boundsAfterJump.x), y=\(boundsAfterJump.y), width=\(boundsAfterJump.width), height=\(boundsAfterJump.height)") // Test skin entries print("\nTesting skin entries:") - + // First, check available skins let skins = skeletonData.skins print(" Available skins: \(skins.count)") @@ -137,29 +140,29 @@ func runSkeletonDrawableTestSwift() { print(" Skin \(i): \(skin.name)") } } - + // Set and test the first skin (or default skin) if let defaultSkin = skins[0] { // First get entries from the skin directly let entriesFromData = defaultSkin.getEntries() print(" Skin '\(defaultSkin.name)' from skeletonData has \(entriesFromData.count) entries") - + // Count entries with attachments let withAttachments = entriesFromData.filter { $0.attachment != nil }.count print(" Entries with attachments: \(withAttachments)") - + // Now set it on the skeleton drawable.skeleton.setSkin2(defaultSkin) drawable.skeleton.setupPoseSlots() // Update slots after setting skin print(" Set skin on skeleton: \(defaultSkin.name)") } } - + // Now test the skeleton's current skin if let skin = drawable.skeleton.skin { let entries = skin.getEntries() print(" Skeleton's current skin has \(entries.count) entries") - + // Show first few entries (with or without attachments for debugging) let entriesToShow = min(5, entries.count) for i in 0.. 3 { print(" ... and \(entries.count - 3) more entries") } @@ -191,7 +194,7 @@ func runSkeletonDrawableTestSwift() { // Test bone properties let bonePose = rootBone.appliedPose print(" Root bone: name=\(rootBone.data.name), x=\(bonePose.x), y=\(bonePose.y)") - + // Get the bone's transform matrix from applied pose let a = bonePose.a let b = bonePose.b @@ -200,27 +203,27 @@ func runSkeletonDrawableTestSwift() { let worldX = bonePose.worldX let worldY = bonePose.worldY print(" Root bone transform: a=\(a), b=\(b), c=\(c), d=\(d), worldX=\(worldX), worldY=\(worldY)") - + // Use BonePose's built-in transformation methods let worldPoint = Vector(x: 100, y: 100) let localPoint = bonePose.worldToLocal(worldX: worldPoint.x, worldY: worldPoint.y) print(" World point (100, 100) -> Local: (\(localPoint.x), \(localPoint.y))") - + // Test local to world transformation let backToWorld = bonePose.localToWorld(localX: localPoint.x, localY: localPoint.y) print(" Local back to world: (\(backToWorld.x), \(backToWorld.y))") - + // Test rotation and scale from the pose let rotation = bonePose.rotation let scaleX = bonePose.scaleX let scaleY = bonePose.scaleY print(" Bone rotation: \(rotation), scale: (\(scaleX), \(scaleY))") - + // Test parent transformation if parent exists if let parentBone = rootBone.parent { let parentPose = parentBone.appliedPose print(" Parent bone: name=\(parentBone.data.name), worldX=\(parentPose.worldX), worldY=\(parentPose.worldY)") - + // Transform world to parent coordinates let parentPoint = bonePose.worldToParent(worldX: worldPoint.x, worldY: worldPoint.y) print(" World point (100, 100) -> Parent: (\(parentPoint.x), \(parentPoint.y))") @@ -247,4 +250,4 @@ func runSkeletonDrawableTestSwift() { print("\nāœ“ SpineSwift API test complete") } -// Test function is called from main.swift \ No newline at end of file +// Test function is called from main.swift diff --git a/spine-libgdx/gradle.properties b/spine-libgdx/gradle.properties index 0d318b38b..e1ccdf0f3 100644 --- a/spine-libgdx/gradle.properties +++ b/spine-libgdx/gradle.properties @@ -1,6 +1,6 @@ group=com.esotericsoftware.spine version=4.3.0-SNAPSHOT -libgdx_version=1.13.5 +libgdx_version=1.13.6-SNAPSHOT POM_NAME=spine-libgdx POM_DESCRIPTION=Spine Runtime for libGDX POM_URL=https://github.com/esotericsoftware/spine-runtimes