From e324cf5cb17de21cd615e2fd09084a9a29e29a51 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 9 Jul 2025 01:50:41 +0200 Subject: [PATCH] [c] Port type extractor to TypeScript and improve codegen - Ported extract-spine-cpp-types.js to TypeScript in type-extractor.ts - Improved type interfaces with discriminated unions for better type safety - Added proper isConst tracking for const-qualified methods - Fixed exclusions to check method.isConst instead of return type - Removed special type mappings (utf8, spine_void) - primitives pass through unchanged - Made toCTypeName strict with proper error handling - Documented all conversion functions with examples - Excluded SpineObject from extraction (matches JS behavior) - Removed original JS extractor as it's now replaced by TypeScript version The TypeScript extractor produces identical output (107 files, 164 types) while providing better type information including isConst for methods and consistent isStatic fields. Co-Authored-By: Claude --- spine-c-new/codegen/exclusions.txt | 35 +- spine-c-new/codegen/src/array-scanner.ts | 4 +- .../codegen/src/generators/array-generator.ts | 21 +- .../src/generators/method-generator.ts | 177 +- spine-c-new/include/spine-c.h | 31 +- spine-c-new/src/{generated/pose.h => base.h} | 51 +- spine-c-new/src/extensions.cpp | 531 ++++ spine-c-new/src/extensions.h | 133 + spine-c-new/src/generated/alpha_timeline.cpp | 28 +- spine-c-new/src/generated/alpha_timeline.h | 18 +- spine-c-new/src/generated/animation.cpp | 40 +- spine-c-new/src/generated/animation.h | 18 +- spine-c-new/src/generated/animation_state.cpp | 78 +- spine-c-new/src/generated/animation_state.h | 30 +- .../src/generated/animation_state_data.cpp | 6 +- .../src/generated/animation_state_data.h | 8 +- spine-c-new/src/generated/arrays.cpp | 2359 +++++++++++++++++ spine-c-new/src/generated/arrays.h | 569 ++++ spine-c-new/src/generated/atlas.cpp | 20 +- spine-c-new/src/generated/atlas.h | 13 +- .../src/generated/atlas_attachment_loader.cpp | 38 +- .../src/generated/atlas_attachment_loader.h | 18 +- spine-c-new/src/generated/atlas_page.cpp | 2 +- spine-c-new/src/generated/atlas_page.h | 6 +- spine-c-new/src/generated/atlas_region.h | 4 +- spine-c-new/src/generated/attachment.cpp | 82 +- spine-c-new/src/generated/attachment.h | 40 +- .../src/generated/attachment_loader.cpp | 39 +- spine-c-new/src/generated/attachment_loader.h | 17 +- .../src/generated/attachment_timeline.cpp | 56 +- .../src/generated/attachment_timeline.h | 29 +- spine-c-new/src/generated/attachment_type.h | 16 +- spine-c-new/src/generated/blend_mode.h | 10 +- spine-c-new/src/generated/block.cpp | 10 +- spine-c-new/src/generated/block.h | 10 +- spine-c-new/src/generated/bone.cpp | 42 +- spine-c-new/src/generated/bone.h | 15 +- spine-c-new/src/generated/bone_data.cpp | 30 +- spine-c-new/src/generated/bone_data.h | 17 +- spine-c-new/src/generated/bone_local.cpp | 8 +- spine-c-new/src/generated/bone_local.h | 4 +- spine-c-new/src/generated/bone_pose.cpp | 44 +- spine-c-new/src/generated/bone_pose.h | 18 +- spine-c-new/src/generated/bone_timeline.cpp | 12 +- spine-c-new/src/generated/bone_timeline.h | 12 +- spine-c-new/src/generated/bone_timeline1.cpp | 28 +- spine-c-new/src/generated/bone_timeline1.h | 18 +- spine-c-new/src/generated/bone_timeline2.cpp | 18 +- spine-c-new/src/generated/bone_timeline2.h | 16 +- .../src/generated/bounding_box_attachment.cpp | 58 +- .../src/generated/bounding_box_attachment.h | 28 +- .../src/generated/clipping_attachment.cpp | 60 +- .../src/generated/clipping_attachment.h | 28 +- spine-c-new/src/generated/color.cpp | 20 +- spine-c-new/src/generated/color.h | 10 +- spine-c-new/src/generated/constraint.cpp | 39 +- spine-c-new/src/generated/constraint.h | 18 +- spine-c-new/src/generated/constraint_data.cpp | 30 +- spine-c-new/src/generated/constraint_data.h | 16 +- .../src/generated/constraint_data_generic.cpp | 79 - .../src/generated/constraint_data_generic.h | 54 - .../src/generated/constraint_generic.cpp | 127 - .../src/generated/constraint_generic.h | 62 - .../src/generated/constraint_timeline.cpp | 12 +- .../src/generated/constraint_timeline.h | 12 +- .../src/generated/constraint_timeline1.cpp | 24 +- .../src/generated/constraint_timeline1.h | 16 +- spine-c-new/src/generated/curve_timeline.cpp | 61 +- spine-c-new/src/generated/curve_timeline.h | 30 +- spine-c-new/src/generated/curve_timeline1.cpp | 73 +- spine-c-new/src/generated/curve_timeline1.h | 34 +- spine-c-new/src/generated/curve_timeline2.cpp | 63 +- spine-c-new/src/generated/curve_timeline2.h | 32 +- spine-c-new/src/generated/deform_timeline.cpp | 36 +- spine-c-new/src/generated/deform_timeline.h | 21 +- .../src/generated/draw_order_timeline.cpp | 54 +- .../src/generated/draw_order_timeline.h | 25 +- spine-c-new/src/generated/event.cpp | 16 +- spine-c-new/src/generated/event.h | 12 +- spine-c-new/src/generated/event_data.cpp | 54 +- spine-c-new/src/generated/event_data.h | 20 +- spine-c-new/src/generated/event_queue_entry.h | 4 +- spine-c-new/src/generated/event_timeline.cpp | 48 +- spine-c-new/src/generated/event_timeline.h | 23 +- spine-c-new/src/generated/event_type.h | 14 +- spine-c-new/src/generated/format.h | 16 +- spine-c-new/src/generated/from_property.cpp | 9 +- spine-c-new/src/generated/from_property.h | 7 +- spine-c-new/src/generated/from_rotate.cpp | 4 +- spine-c-new/src/generated/from_rotate.h | 6 +- spine-c-new/src/generated/from_scale_x.cpp | 4 +- spine-c-new/src/generated/from_scale_x.h | 6 +- spine-c-new/src/generated/from_scale_y.cpp | 4 +- spine-c-new/src/generated/from_scale_y.h | 6 +- spine-c-new/src/generated/from_shear_y.cpp | 4 +- spine-c-new/src/generated/from_shear_y.h | 6 +- spine-c-new/src/generated/from_x.cpp | 4 +- spine-c-new/src/generated/from_x.h | 6 +- spine-c-new/src/generated/from_y.cpp | 4 +- spine-c-new/src/generated/from_y.h | 6 +- spine-c-new/src/generated/hash_map.cpp | 85 - spine-c-new/src/generated/hash_map.h | 55 - spine-c-new/src/generated/ik_constraint.cpp | 42 +- spine-c-new/src/generated/ik_constraint.h | 15 +- .../src/generated/ik_constraint_data.cpp | 40 +- .../src/generated/ik_constraint_data.h | 18 +- .../src/generated/ik_constraint_pose.cpp | 18 +- .../src/generated/ik_constraint_pose.h | 16 +- .../src/generated/ik_constraint_timeline.cpp | 64 +- .../src/generated/ik_constraint_timeline.h | 37 +- spine-c-new/src/generated/inherit.h | 12 +- .../src/generated/inherit_timeline.cpp | 48 +- spine-c-new/src/generated/inherit_timeline.h | 26 +- spine-c-new/src/generated/interpolation.h | 4 +- spine-c-new/src/generated/linked_mesh.cpp | 4 +- spine-c-new/src/generated/linked_mesh.h | 8 +- spine-c-new/src/generated/mesh_attachment.cpp | 120 +- spine-c-new/src/generated/mesh_attachment.h | 50 +- spine-c-new/src/generated/mix_blend.h | 10 +- spine-c-new/src/generated/mix_direction.h | 6 +- spine-c-new/src/generated/path_attachment.cpp | 84 +- spine-c-new/src/generated/path_attachment.h | 41 +- spine-c-new/src/generated/path_constraint.cpp | 42 +- spine-c-new/src/generated/path_constraint.h | 15 +- .../src/generated/path_constraint_data.cpp | 52 +- .../src/generated/path_constraint_data.h | 14 +- .../path_constraint_mix_timeline.cpp | 64 +- .../generated/path_constraint_mix_timeline.h | 37 +- .../src/generated/path_constraint_pose.cpp | 2 +- .../src/generated/path_constraint_pose.h | 4 +- .../path_constraint_position_timeline.cpp | 28 +- .../path_constraint_position_timeline.h | 18 +- .../path_constraint_spacing_timeline.cpp | 28 +- .../path_constraint_spacing_timeline.h | 18 +- spine-c-new/src/generated/physics.h | 10 +- .../src/generated/physics_constraint.cpp | 42 +- .../src/generated/physics_constraint.h | 14 +- .../physics_constraint_damping_timeline.cpp | 74 +- .../physics_constraint_damping_timeline.h | 39 +- .../src/generated/physics_constraint_data.cpp | 70 +- .../src/generated/physics_constraint_data.h | 41 +- .../physics_constraint_gravity_timeline.cpp | 74 +- .../physics_constraint_gravity_timeline.h | 39 +- .../physics_constraint_inertia_timeline.cpp | 74 +- .../physics_constraint_inertia_timeline.h | 39 +- .../physics_constraint_mass_timeline.cpp | 74 +- .../physics_constraint_mass_timeline.h | 39 +- .../physics_constraint_mix_timeline.cpp | 74 +- .../physics_constraint_mix_timeline.h | 39 +- .../src/generated/physics_constraint_pose.cpp | 2 +- .../src/generated/physics_constraint_pose.h | 4 +- .../physics_constraint_reset_timeline.cpp | 44 +- .../physics_constraint_reset_timeline.h | 26 +- .../physics_constraint_strength_timeline.cpp | 74 +- .../physics_constraint_strength_timeline.h | 39 +- .../generated/physics_constraint_timeline.cpp | 74 +- .../generated/physics_constraint_timeline.h | 39 +- .../physics_constraint_wind_timeline.cpp | 74 +- .../physics_constraint_wind_timeline.h | 39 +- .../src/generated/point_attachment.cpp | 24 +- spine-c-new/src/generated/point_attachment.h | 14 +- spine-c-new/src/generated/polygon.h | 4 +- spine-c-new/src/generated/pose.cpp | 58 - spine-c-new/src/generated/posed.cpp | 27 +- spine-c-new/src/generated/posed.h | 16 +- spine-c-new/src/generated/posed_active.cpp | 6 +- spine-c-new/src/generated/posed_active.h | 8 +- spine-c-new/src/generated/posed_data.cpp | 32 +- spine-c-new/src/generated/posed_data.h | 21 +- .../src/generated/posed_data_generic.cpp | 73 - .../src/generated/posed_data_generic.h | 53 - spine-c-new/src/generated/posed_generic.cpp | 91 - spine-c-new/src/generated/posed_generic.h | 56 - spine-c-new/src/generated/position_mode.h | 6 +- .../src/generated/pow_interpolation.cpp | 2 +- spine-c-new/src/generated/pow_interpolation.h | 6 +- .../src/generated/pow_out_interpolation.cpp | 2 +- .../src/generated/pow_out_interpolation.h | 6 +- spine-c-new/src/generated/property.h | 64 +- .../src/generated/region_attachment.cpp | 56 +- spine-c-new/src/generated/region_attachment.h | 26 +- spine-c-new/src/generated/render_command.h | 4 +- spine-c-new/src/generated/rgb2_timeline.cpp | 14 +- spine-c-new/src/generated/rgb2_timeline.h | 12 +- spine-c-new/src/generated/rgb_timeline.cpp | 14 +- spine-c-new/src/generated/rgb_timeline.h | 12 +- spine-c-new/src/generated/rgba2_timeline.cpp | 14 +- spine-c-new/src/generated/rgba2_timeline.h | 12 +- spine-c-new/src/generated/rgba_timeline.cpp | 14 +- spine-c-new/src/generated/rgba_timeline.h | 12 +- spine-c-new/src/generated/rotate_mode.h | 8 +- spine-c-new/src/generated/rotate_timeline.cpp | 28 +- spine-c-new/src/generated/rotate_timeline.h | 18 +- spine-c-new/src/generated/rtti.cpp | 26 +- spine-c-new/src/generated/rtti.h | 16 +- spine-c-new/src/generated/scale_timeline.cpp | 18 +- spine-c-new/src/generated/scale_timeline.h | 16 +- .../src/generated/scale_x_timeline.cpp | 28 +- spine-c-new/src/generated/scale_x_timeline.h | 18 +- .../src/generated/scale_y_timeline.cpp | 28 +- spine-c-new/src/generated/scale_y_timeline.h | 18 +- spine-c-new/src/generated/sequence.cpp | 30 +- spine-c-new/src/generated/sequence.h | 25 +- spine-c-new/src/generated/sequence_mode.h | 16 +- .../src/generated/sequence_timeline.cpp | 52 +- spine-c-new/src/generated/sequence_timeline.h | 26 +- spine-c-new/src/generated/shear_timeline.cpp | 18 +- spine-c-new/src/generated/shear_timeline.h | 16 +- .../src/generated/shear_x_timeline.cpp | 28 +- spine-c-new/src/generated/shear_x_timeline.h | 18 +- .../src/generated/shear_y_timeline.cpp | 28 +- spine-c-new/src/generated/shear_y_timeline.h | 18 +- spine-c-new/src/generated/skeleton.cpp | 96 +- spine-c-new/src/generated/skeleton.h | 30 +- spine-c-new/src/generated/skeleton_binary.cpp | 14 +- spine-c-new/src/generated/skeleton_binary.h | 12 +- spine-c-new/src/generated/skeleton_bounds.cpp | 48 +- spine-c-new/src/generated/skeleton_bounds.h | 20 +- spine-c-new/src/generated/skeleton_data.cpp | 148 +- spine-c-new/src/generated/skeleton_data.h | 50 +- spine-c-new/src/generated/skeleton_json.cpp | 14 +- spine-c-new/src/generated/skeleton_json.h | 12 +- .../src/generated/skeleton_renderer.cpp | 4 +- spine-c-new/src/generated/skeleton_renderer.h | 4 +- spine-c-new/src/generated/skin.cpp | 42 +- spine-c-new/src/generated/skin.h | 21 +- spine-c-new/src/generated/slider.cpp | 42 +- spine-c-new/src/generated/slider.h | 14 +- spine-c-new/src/generated/slider_data.cpp | 52 +- spine-c-new/src/generated/slider_data.h | 25 +- .../src/generated/slider_mix_timeline.cpp | 28 +- .../src/generated/slider_mix_timeline.h | 18 +- spine-c-new/src/generated/slider_pose.cpp | 2 +- spine-c-new/src/generated/slider_pose.h | 4 +- spine-c-new/src/generated/slider_timeline.cpp | 28 +- spine-c-new/src/generated/slider_timeline.h | 18 +- spine-c-new/src/generated/slot.cpp | 22 +- spine-c-new/src/generated/slot.h | 6 +- .../src/generated/slot_curve_timeline.cpp | 62 +- .../src/generated/slot_curve_timeline.h | 35 +- spine-c-new/src/generated/slot_data.cpp | 48 +- spine-c-new/src/generated/slot_data.h | 23 +- spine-c-new/src/generated/slot_pose.cpp | 28 +- spine-c-new/src/generated/slot_pose.h | 15 +- spine-c-new/src/generated/slot_timeline.cpp | 12 +- spine-c-new/src/generated/slot_timeline.h | 12 +- spine-c-new/src/generated/spacing_mode.h | 10 +- spine-c-new/src/generated/texture_filter.h | 18 +- spine-c-new/src/generated/texture_region.h | 4 +- spine-c-new/src/generated/texture_wrap.h | 8 +- spine-c-new/src/generated/timeline.cpp | 376 +-- spine-c-new/src/generated/timeline.h | 168 +- spine-c-new/src/generated/to_property.cpp | 11 +- spine-c-new/src/generated/to_property.h | 7 +- spine-c-new/src/generated/to_rotate.cpp | 6 +- spine-c-new/src/generated/to_rotate.h | 6 +- spine-c-new/src/generated/to_scale_x.cpp | 6 +- spine-c-new/src/generated/to_scale_x.h | 6 +- spine-c-new/src/generated/to_scale_y.cpp | 6 +- spine-c-new/src/generated/to_scale_y.h | 6 +- spine-c-new/src/generated/to_shear_y.cpp | 6 +- spine-c-new/src/generated/to_shear_y.h | 6 +- spine-c-new/src/generated/to_x.cpp | 6 +- spine-c-new/src/generated/to_x.h | 6 +- spine-c-new/src/generated/to_y.cpp | 6 +- spine-c-new/src/generated/to_y.h | 6 +- spine-c-new/src/generated/track_entry.cpp | 80 +- spine-c-new/src/generated/track_entry.h | 35 +- .../src/generated/transform_constraint.cpp | 42 +- .../src/generated/transform_constraint.h | 15 +- .../generated/transform_constraint_data.cpp | 64 +- .../src/generated/transform_constraint_data.h | 31 +- .../generated/transform_constraint_pose.cpp | 2 +- .../src/generated/transform_constraint_pose.h | 4 +- .../transform_constraint_timeline.cpp | 64 +- .../generated/transform_constraint_timeline.h | 37 +- .../src/generated/translate_timeline.cpp | 18 +- .../src/generated/translate_timeline.h | 16 +- .../src/generated/translate_x_timeline.cpp | 28 +- .../src/generated/translate_x_timeline.h | 18 +- .../src/generated/translate_y_timeline.cpp | 28 +- .../src/generated/translate_y_timeline.h | 18 +- spine-c-new/src/generated/types.h | 194 ++ spine-c-new/src/generated/update.cpp | 13 +- spine-c-new/src/generated/update.h | 7 +- .../src/generated/vertex_attachment.cpp | 65 +- spine-c-new/src/generated/vertex_attachment.h | 31 +- spine-c-new/src/generated/vertices.h | 4 +- spine-c-new/test/test.c | 12 +- 289 files changed, 6673 insertions(+), 5608 deletions(-) rename spine-c-new/src/{generated/pose.h => base.h} (71%) create mode 100644 spine-c-new/src/extensions.cpp create mode 100644 spine-c-new/src/extensions.h create mode 100644 spine-c-new/src/generated/arrays.cpp create mode 100644 spine-c-new/src/generated/arrays.h delete mode 100644 spine-c-new/src/generated/constraint_data_generic.cpp delete mode 100644 spine-c-new/src/generated/constraint_data_generic.h delete mode 100644 spine-c-new/src/generated/constraint_generic.cpp delete mode 100644 spine-c-new/src/generated/constraint_generic.h delete mode 100644 spine-c-new/src/generated/hash_map.cpp delete mode 100644 spine-c-new/src/generated/hash_map.h delete mode 100644 spine-c-new/src/generated/pose.cpp delete mode 100644 spine-c-new/src/generated/posed_data_generic.cpp delete mode 100644 spine-c-new/src/generated/posed_data_generic.h delete mode 100644 spine-c-new/src/generated/posed_generic.cpp delete mode 100644 spine-c-new/src/generated/posed_generic.h create mode 100644 spine-c-new/src/generated/types.h diff --git a/spine-c-new/codegen/exclusions.txt b/spine-c-new/codegen/exclusions.txt index 532db031f..76b8f7a73 100644 --- a/spine-c-new/codegen/exclusions.txt +++ b/spine-c-new/codegen/exclusions.txt @@ -24,40 +24,23 @@ type: EventQueue type: Json type: BaseTimeline -# Excluded methods (specific methods on otherwise included types) +# We handle those in extensions.cpp through a simpler mechanism method: AnimationState::setListener method: AnimationState::addListener method: AnimationState::removeListener method: AnimationState::clearListeners -method: AnimationState::disableQueue -method: AnimationState::enableQueue -method: AnimationState::setManualTrackEntryDisposal -method: AnimationState::getManualTrackEntryDisposal -method: Skeleton::updateCache -method: Skeleton::printUpdateCache -method: SkeletonData::setName -method: SkeletonData::setVersion -method: SkeletonData::setHash -method: SkeletonData::setImagesPath -method: SkeletonData::setAudioPath -method: SkeletonData::setFps -method: EventData::setIntValue -method: EventData::setFloatValue -method: EventData::setStringValue -method: EventData::setAudioPath -method: EventData::setVolume -method: EventData::setBalance +method: TrackEntry::setListener +method: TrackEntry::getListener + +# Used in UE4, not used anywhere else +method: AnimationState::setRendererObject +method: TrackEntry::setRendererObject # Array methods need special handling method: AttachmentTimeline.getAttachmentNames -# BoneLocal/BonePose setScale is overloaded in a confusing way -method: BoneLocal::setScale -method: BonePose::setScale - -# Color set is overloaded with conflicting signatures -method: Color::set - +# Can not emulate AttachmentMap::Entries, as that's stack allocated +method: Skin::getAttachments # Exclude const versions of getSetupPose() - we'll only expose the non-const version method: BoneData::getSetupPose const diff --git a/spine-c-new/codegen/src/array-scanner.ts b/spine-c-new/codegen/src/array-scanner.ts index 6b4aa6ab3..6dc7c7145 100644 --- a/spine-c-new/codegen/src/array-scanner.ts +++ b/spine-c-new/codegen/src/array-scanner.ts @@ -103,8 +103,8 @@ export function scanArraySpecializations(typesJson: SpineTypes, exclusions: any[ if (isPrimitive) { // Map primitive types const typeMap: { [key: string]: string } = { - 'int': 'int32_t', - 'unsigned short': 'uint16_t', + 'int': 'int', + 'unsigned short': 'unsigned short', 'float': 'float', 'double': 'double', 'bool': 'bool', diff --git a/spine-c-new/codegen/src/generators/array-generator.ts b/spine-c-new/codegen/src/generators/array-generator.ts index 30fd5a9d3..eea751358 100644 --- a/spine-c-new/codegen/src/generators/array-generator.ts +++ b/spine-c-new/codegen/src/generators/array-generator.ts @@ -81,13 +81,6 @@ export class ArrayGenerator { source.push('}'); source.push(''); - // Generate create with capacity - header.push(`SPINE_C_EXPORT ${spec.cTypeName} ${spec.cTypeName}_create_with_capacity(int32_t capacity);`); - source.push(`${spec.cTypeName} ${spec.cTypeName}_create_with_capacity(int32_t capacity) {`); - source.push(` return (${spec.cTypeName}) new (__FILE__, __LINE__) ${spec.cppType}(capacity);`); - source.push('}'); - source.push(''); - // Generate dispose header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_dispose(${spec.cTypeName} array);`); source.push(`void ${spec.cTypeName}_dispose(${spec.cTypeName} array) {`); @@ -97,16 +90,16 @@ export class ArrayGenerator { source.push(''); // Generate hardcoded get/set methods - header.push(`SPINE_C_EXPORT ${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int32_t index);`); - source.push(`${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int32_t index) {`); + header.push(`SPINE_C_EXPORT ${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int index);`); + source.push(`${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int index) {`); source.push(` if (!array) return ${this.getDefaultValue(spec)};`); source.push(` ${spec.cppType} *_array = (${spec.cppType}*) array;`); source.push(` return ${this.convertFromCpp(spec, '(*_array)[index]')};`); source.push('}'); source.push(''); - header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_set(${spec.cTypeName} array, int32_t index, ${spec.cElementType} value);`); - source.push(`void ${spec.cTypeName}_set(${spec.cTypeName} array, int32_t index, ${spec.cElementType} value) {`); + header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_set(${spec.cTypeName} array, int index, ${spec.cElementType} value);`); + source.push(`void ${spec.cTypeName}_set(${spec.cTypeName} array, int index, ${spec.cElementType} value) {`); source.push(` if (!array) return;`); source.push(` ${spec.cppType} *_array = (${spec.cppType}*) array;`); source.push(` (*_array)[index] = ${this.convertToCpp(spec, 'value')};`); @@ -141,7 +134,7 @@ export class ArrayGenerator { } else if (method.returnType === 'size_t') { returnType = 'size_t'; } else if (method.returnType === 'int') { - returnType = 'int32_t'; + returnType = 'int'; } else if (method.returnType === 'bool') { returnType = 'bool'; } else if (method.returnType === `${spec.cppType} *`) { @@ -167,7 +160,7 @@ export class ArrayGenerator { cParams.push(`size_t ${param.name}`); cppArgs.push(param.name); } else if (param.type === 'int') { - cParams.push(`int32_t ${param.name}`); + cParams.push(`int ${param.name}`); cppArgs.push(param.name); } else { // Unknown parameter type - skip this method @@ -212,7 +205,7 @@ export class ArrayGenerator { private getDefaultReturn(returnType: string, spec: ArraySpecialization): string { if (returnType === 'bool') return 'false'; - if (returnType === 'size_t' || returnType === 'int32_t') return '0'; + if (returnType === 'size_t' || returnType === 'int') return '0'; if (returnType === spec.cElementType) return this.getDefaultValue(spec); if (returnType === spec.cTypeName) return 'nullptr'; return '0'; diff --git a/spine-c-new/codegen/src/generators/method-generator.ts b/spine-c-new/codegen/src/generators/method-generator.ts index 5b9712d72..09792200d 100644 --- a/spine-c-new/codegen/src/generators/method-generator.ts +++ b/spine-c-new/codegen/src/generators/method-generator.ts @@ -3,7 +3,7 @@ import { isMethodExcluded } from '../exclusions'; import { GeneratorResult } from './constructor-generator'; export class MethodGenerator { - constructor(private exclusions: Exclusion[], private validTypes: Set) {} + constructor(private exclusions: Exclusion[], private validTypes: Set) { } generate(type: Type): GeneratorResult { const declarations: string[] = []; @@ -14,7 +14,7 @@ export class MethodGenerator { const methods = type.members.filter(m => m.kind === 'method' ).filter(m => !isMethodExcluded(type.name, m.name, this.exclusions, m)) - .filter(m => !m.isStatic); + .filter(m => !m.isStatic); // Check for const/non-const method pairs const methodGroups = new Map(); @@ -86,105 +86,112 @@ export class MethodGenerator { const methodSeenCounts = new Map(); for (const method of uniqueMethods) { - // Handle getters - if (method.name.startsWith('get') && (!method.parameters || method.parameters.length === 0)) { - const propName = method.name.substring(3); + try { + // Handle getters + if (method.name.startsWith('get') && (!method.parameters || method.parameters.length === 0)) { + const propName = method.name.substring(3); - // Check if return type is Array - if (method.returnType && method.returnType.includes('Array<')) { - // For Array types, only generate collection accessors - this.generateCollectionAccessors(type, method, propName, declarations, implementations); - } else if (method.name === 'getRTTI') { - // Special handling for getRTTI - make it static - const funcName = toCFunctionName(type.name, 'get_rtti'); - const returnType = 'spine_rtti'; + // Check if return type is Array + if (method.returnType && method.returnType.includes('Array<')) { + // For Array types, only generate collection accessors + this.generateCollectionAccessors(type, method, propName, declarations, implementations); + } else if (method.name === 'getRTTI') { + // Special handling for getRTTI - make it static + const funcName = toCFunctionName(type.name, 'get_rtti'); + const returnType = 'spine_rtti'; - declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}();`); + declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}();`); - implementations.push(`${returnType} ${funcName}() {`); - implementations.push(` return (spine_rtti) &${type.name}::rtti;`); + implementations.push(`${returnType} ${funcName}() {`); + implementations.push(` return (spine_rtti) &${type.name}::rtti;`); + implementations.push(`}`); + implementations.push(''); + } else { + // For non-Array types, generate regular getter + const funcName = toCFunctionName(type.name, method.name); + const returnType = toCTypeName(method.returnType || 'void', this.validTypes); + + declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${cTypeName} obj);`); + + implementations.push(`${returnType} ${funcName}(${cTypeName} obj) {`); + implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`); + implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`); + + const callExpr = this.generateMethodCall('_obj', method); + implementations.push(` return ${callExpr};`); + implementations.push(`}`); + implementations.push(''); + } + } + // Handle setters + else if (method.name.startsWith('set') && method.parameters && method.parameters.length === 1) { + const funcName = toCFunctionName(type.name, method.name); + const paramType = toCTypeName(method.parameters[0].type, this.validTypes); + + declarations.push(`SPINE_C_EXPORT void ${funcName}(${cTypeName} obj, ${paramType} value);`); + + implementations.push(`void ${funcName}(${cTypeName} obj, ${paramType} value) {`); + implementations.push(` if (!obj) return;`); + implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`); + + const callExpr = this.generateSetterCall('_obj', method, 'value'); + implementations.push(` ${callExpr};`); implementations.push(`}`); implementations.push(''); - } else { - // For non-Array types, generate regular getter - const funcName = toCFunctionName(type.name, method.name); + } + // Handle other methods + else { + // Check if this is an overloaded method + const isOverloaded = (methodCounts.get(method.name) || 0) > 1; + const seenCount = methodSeenCounts.get(method.name) || 0; + methodSeenCounts.set(method.name, seenCount + 1); + + // Generate function name with suffix for overloads + let funcName = toCFunctionName(type.name, method.name); + + // Check for naming conflicts with type names + if (method.name === 'pose' && type.name === 'Bone') { + // Rename bone_pose() method to avoid conflict with spine_bone_pose type + funcName = toCFunctionName(type.name, 'update_pose'); + } + + if (isOverloaded && seenCount > 0) { + // Add parameter count suffix for overloaded methods + const paramCount = method.parameters ? method.parameters.length : 0; + funcName = `${funcName}_${paramCount}`; + } + const returnType = toCTypeName(method.returnType || 'void', this.validTypes); + const params = this.generateMethodParameters(cTypeName, method); - declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${cTypeName} obj);`); + declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${params.declaration});`); - implementations.push(`${returnType} ${funcName}(${cTypeName} obj) {`); + implementations.push(`${returnType} ${funcName}(${params.declaration}) {`); implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`); implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`); - const callExpr = this.generateMethodCall('_obj', method); - implementations.push(` return ${callExpr};`); + const callExpr = this.generateMethodCall('_obj', method, params.call); + if (returnType === 'void') { + implementations.push(` ${callExpr};`); + } else { + implementations.push(` return ${callExpr};`); + } implementations.push(`}`); implementations.push(''); } - } - // Handle setters - else if (method.name.startsWith('set') && method.parameters && method.parameters.length === 1) { - const funcName = toCFunctionName(type.name, method.name); - const paramType = toCTypeName(method.parameters[0].type, this.validTypes); - - declarations.push(`SPINE_C_EXPORT void ${funcName}(${cTypeName} obj, ${paramType} value);`); - - implementations.push(`void ${funcName}(${cTypeName} obj, ${paramType} value) {`); - implementations.push(` if (!obj) return;`); - implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`); - - const callExpr = this.generateSetterCall('_obj', method, 'value'); - implementations.push(` ${callExpr};`); - implementations.push(`}`); - implementations.push(''); - } - // Handle other methods - else { - // Check if this is an overloaded method - const isOverloaded = (methodCounts.get(method.name) || 0) > 1; - const seenCount = methodSeenCounts.get(method.name) || 0; - methodSeenCounts.set(method.name, seenCount + 1); - - // Generate function name with suffix for overloads - let funcName = toCFunctionName(type.name, method.name); - - // Check for naming conflicts with type names - if (method.name === 'pose' && type.name === 'Bone') { - // Rename bone_pose() method to avoid conflict with spine_bone_pose type - funcName = toCFunctionName(type.name, 'update_pose'); - } - - if (isOverloaded && seenCount > 0) { - // Add parameter count suffix for overloaded methods - const paramCount = method.parameters ? method.parameters.length : 0; - funcName = `${funcName}_${paramCount}`; - } - - const returnType = toCTypeName(method.returnType || 'void', this.validTypes); - const params = this.generateMethodParameters(cTypeName, method); - - declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${params.declaration});`); - - implementations.push(`${returnType} ${funcName}(${params.declaration}) {`); - implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`); - implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`); - - const callExpr = this.generateMethodCall('_obj', method, params.call); - if (returnType === 'void') { - implementations.push(` ${callExpr};`); - } else { - implementations.push(` return ${callExpr};`); - } - implementations.push(`}`); - implementations.push(''); + } catch (error) { + console.error(`Error generating method for type ${type.name}::${method.name}:`); + console.error(error); + throw error; } } return { declarations, implementations }; + } private generateCollectionAccessors(type: Type, method: Method, propName: string, - declarations: string[], implementations: string[]) { + declarations: string[], implementations: string[]) { const cTypeName = `spine_${toSnakeCase(type.name)}`; const propSnake = toSnakeCase(propName); const arrayMatch = method.returnType!.match(/Array<(.+?)>/); @@ -193,15 +200,15 @@ export class MethodGenerator { const elementType = arrayMatch[1].trim().replace(/\s*\*$/, ''); let cElementType: string; if (elementType === 'int') { - cElementType = 'int32_t'; + cElementType = 'int'; } else if (elementType === 'float') { cElementType = 'float'; } else if (elementType === 'uint8_t') { cElementType = 'uint8_t'; } else if (elementType === 'String') { - cElementType = 'const utf8 *'; + cElementType = 'const char *'; } else if (elementType === 'PropertyId') { - cElementType = 'int32_t'; // PropertyId is just an int + cElementType = 'int64_t'; // PropertyId is just an int } else { cElementType = `spine_${toSnakeCase(elementType)}`; } @@ -245,7 +252,7 @@ export class MethodGenerator { // Handle return type conversions if (method.returnType) { if (method.returnType === 'const String &' || method.returnType === 'String') { - call = `(const utf8 *) ${call}.buffer()`; + call = `(const char *) ${call}.buffer()`; } else if (method.returnType === 'const RTTI &' || method.returnType === 'RTTI &') { // RTTI needs special handling - return as opaque pointer call = `(spine_rtti) &${call}`; @@ -366,6 +373,6 @@ export class MethodGenerator { private isPrimitiveType(type: string): boolean { return ['int', 'float', 'double', 'bool', 'size_t', 'int32_t', 'uint32_t', - 'int16_t', 'uint16_t', 'uint8_t', 'void'].includes(type); + 'int16_t', 'uint16_t', 'uint8_t', 'void'].includes(type); } } \ No newline at end of file diff --git a/spine-c-new/include/spine-c.h b/spine-c-new/include/spine-c.h index 50c900bf1..ee33d125e 100644 --- a/spine-c-new/include/spine-c.h +++ b/spine-c-new/include/spine-c.h @@ -30,25 +30,14 @@ #ifndef SPINE_C_H #define SPINE_C_H -// Custom types and functions -#include "../src/custom.h" +// Base definitions +#include "../src/base.h" -// Generated enum types -#include "../src/generated/event_type.h" -#include "../src/generated/format.h" -#include "../src/generated/texture_filter.h" -#include "../src/generated/texture_wrap.h" -#include "../src/generated/attachment_type.h" -#include "../src/generated/blend_mode.h" -#include "../src/generated/inherit.h" -#include "../src/generated/mix_blend.h" -#include "../src/generated/mix_direction.h" -#include "../src/generated/physics.h" -#include "../src/generated/position_mode.h" -#include "../src/generated/property.h" -#include "../src/generated/rotate_mode.h" -#include "../src/generated/sequence_mode.h" -#include "../src/generated/spacing_mode.h" +// All type declarations and enum includes +#include "../src/generated/types.h" + +// Extension functions +#include "../src/extensions.h" // Generated class types #include "../src/generated/animation.h" @@ -80,9 +69,7 @@ #include "../src/generated/rgba2_timeline.h" #include "../src/generated/rgb2_timeline.h" #include "../src/generated/constraint.h" -#include "../src/generated/constraint_generic.h" #include "../src/generated/constraint_data.h" -#include "../src/generated/constraint_data_generic.h" #include "../src/generated/constraint_timeline.h" #include "../src/generated/constraint_timeline1.h" #include "../src/generated/curve_timeline.h" @@ -93,7 +80,6 @@ #include "../src/generated/event.h" #include "../src/generated/event_data.h" #include "../src/generated/event_timeline.h" -#include "../src/generated/hash_map.h" #include "../src/generated/ik_constraint.h" #include "../src/generated/ik_constraint_data.h" #include "../src/generated/ik_constraint_pose.h" @@ -124,12 +110,9 @@ #include "../src/generated/physics_constraint_mix_timeline.h" #include "../src/generated/physics_constraint_reset_timeline.h" #include "../src/generated/point_attachment.h" -#include "../src/generated/pose.h" #include "../src/generated/posed.h" -#include "../src/generated/posed_generic.h" #include "../src/generated/posed_active.h" #include "../src/generated/posed_data.h" -#include "../src/generated/posed_data_generic.h" #include "../src/generated/rtti.h" #include "../src/generated/region_attachment.h" #include "../src/generated/rotate_timeline.h" diff --git a/spine-c-new/src/generated/pose.h b/spine-c-new/src/base.h similarity index 71% rename from spine-c-new/src/generated/pose.h rename to spine-c-new/src/base.h index 8b6495144..3b5d8613e 100644 --- a/spine-c-new/src/generated/pose.h +++ b/spine-c-new/src/base.h @@ -27,28 +27,39 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#ifndef SPINE_C_POSE_H -#define SPINE_C_POSE_H +#ifndef SPINE_C_BASE_H +#define SPINE_C_BASE_H + +#include +#include +#include #ifdef __cplusplus -extern "C" { +#if _WIN32 +#define SPINE_C_EXPORT extern "C" __declspec(dllexport) +#else +#ifdef __EMSCRIPTEN__ +#define SPINE_C_EXPORT extern "C" __attribute__((used)) +#else +#define SPINE_C_EXPORT extern "C" +#endif +#endif +#else +#if _WIN32 +#define SPINE_C_EXPORT __declspec(dllexport) +#else +#ifdef __EMSCRIPTEN__ +#define SPINE_C_EXPORT __attribute__((used)) +#else +#define SPINE_C_EXPORT +#endif +#endif #endif -#include "../custom.h" +#define SPINE_OPAQUE_TYPE(name) \ + typedef struct name##_wrapper { \ + char _dummy; \ + } name##_wrapper; \ + typedef name##_wrapper *name; -SPINE_OPAQUE_TYPE(spine_pose) - -SPINE_C_EXPORT spine_pose spine_pose_create(void); -SPINE_C_EXPORT void spine_pose_dispose(spine_pose obj); -SPINE_C_EXPORT void spine_pose_set(spine_pose obj, spine_p value); - -typedef enum spine_pose_type { -} spine_pose_type; - -SPINE_C_EXPORT spine_bool spine_pose_is_type(spine_pose obj, spine_pose_type type); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_POSE_H \ No newline at end of file +#endif // SPINE_C_BASE_H \ No newline at end of file diff --git a/spine-c-new/src/extensions.cpp b/spine-c-new/src/extensions.cpp new file mode 100644 index 000000000..7768524aa --- /dev/null +++ b/spine-c-new/src/extensions.cpp @@ -0,0 +1,531 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated April 5, 2025. Replaces all prior versions. + * + * Copyright (c) 2013-2025, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include "base.h" +#include "generated/types.h" +#include "extensions.h" +#include +#include +#include +#include +#include +#include + +using namespace spine; + +// Internal structures +struct _spine_atlas { + void *atlas; + const char **imagePaths; + int32_t numImagePaths; + const char *error; +}; + +struct _spine_skeleton_data_result { + spine_skeleton_data skeletonData; + const char *error; +}; + +struct _spine_bounds { + float x, y, width, height; +}; + +struct _spine_vector { + float x, y; +}; + +struct _spine_skeleton_drawable : public SpineObject { + spine_skeleton skeleton; + spine_animation_state animationState; + spine_animation_state_data animationStateData; + spine_animation_state_events animationStateEvents; + SkeletonRenderer *renderer; +}; + +struct _spine_skin_entry { + int32_t slotIndex; + const char *name; + spine_attachment attachment; +}; + +struct _spine_skin_entries { + int32_t numEntries; + _spine_skin_entry *entries; +}; + +// Animation state event tracking +struct AnimationStateEvent { + EventType type; + TrackEntry *entry; + Event *event; + AnimationStateEvent(EventType type, TrackEntry *entry, Event *event) : type(type), entry(entry), event(event){}; +}; + +class EventListener : public AnimationStateListenerObject, public SpineObject { +public: + Array events; + + void callback(AnimationState *state, EventType type, TrackEntry *entry, Event *event) override { + events.add(AnimationStateEvent(type, entry, event)); + SP_UNUSED(state); + } +}; + +// Static variables +static Color NULL_COLOR(0, 0, 0, 0); +static SpineExtension *defaultExtension = nullptr; +static DebugExtension *debugExtension = nullptr; + +static void initExtensions() { + if (defaultExtension == nullptr) { + defaultExtension = new DefaultSpineExtension(); + debugExtension = new DebugExtension(defaultExtension); + } +} + +namespace spine { + SpineExtension *getDefaultExtension() { + initExtensions(); + return defaultExtension; + } +} + +// Version functions +int32_t spine_major_version() { + return SPINE_MAJOR_VERSION; +} + +int32_t spine_minor_version() { + return SPINE_MINOR_VERSION; +} + +void spine_enable_debug_extension(bool enable) { + initExtensions(); + SpineExtension::setInstance(enable ? debugExtension : defaultExtension); +} + +void spine_report_leaks() { + initExtensions(); + debugExtension->reportLeaks(); + fflush(stdout); +} + +// Color functions +float spine_color_get_r(spine_color color) { + if (!color) return 0; + return ((Color *) color)->r; +} + +float spine_color_get_g(spine_color color) { + if (!color) return 0; + return ((Color *) color)->g; +} + +float spine_color_get_b(spine_color color) { + if (!color) return 0; + return ((Color *) color)->b; +} + +float spine_color_get_a(spine_color color) { + if (!color) return 0; + return ((Color *) color)->a; +} + +// Bounds functions +float spine_bounds_get_x(spine_bounds bounds) { + if (!bounds) return 0; + return ((_spine_bounds *) bounds)->x; +} + +float spine_bounds_get_y(spine_bounds bounds) { + if (!bounds) return 0; + return ((_spine_bounds *) bounds)->y; +} + +float spine_bounds_get_width(spine_bounds bounds) { + if (!bounds) return 0; + return ((_spine_bounds *) bounds)->width; +} + +float spine_bounds_get_height(spine_bounds bounds) { + if (!bounds) return 0; + return ((_spine_bounds *) bounds)->height; +} + +// Vector functions +float spine_vector_get_x(spine_vector vector) { + if (!vector) return 0; + return ((_spine_vector *) vector)->x; +} + +float spine_vector_get_y(spine_vector vector) { + if (!vector) return 0; + return ((_spine_vector *) vector)->y; +} + +// Atlas functions +class LiteTextureLoad : public TextureLoader { + void load(AtlasPage &page, const String &path) { + page.texture = (void *) (intptr_t) page.index; + } + + void unload(void *texture) { + } +}; +static LiteTextureLoad liteLoader; + +spine_atlas spine_atlas_load(const char *atlasData) { + if (!atlasData) return nullptr; + int32_t length = (int32_t) strlen(atlasData); + auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, "", &liteLoader, true); + _spine_atlas *result = SpineExtension::calloc<_spine_atlas>(1, __FILE__, __LINE__); + result->atlas = atlas; + result->numImagePaths = (int32_t) atlas->getPages().size(); + result->imagePaths = SpineExtension::calloc(result->numImagePaths, __FILE__, __LINE__); + for (int i = 0; i < result->numImagePaths; i++) { + result->imagePaths[i] = (const char *) strdup(atlas->getPages()[i]->texturePath.buffer()); + } + return (spine_atlas) result; +} + +class CallbackTextureLoad : public TextureLoader { + spine_texture_loader_load_func loadCb; + spine_texture_loader_unload_func unloadCb; + +public: + CallbackTextureLoad() : loadCb(nullptr), unloadCb(nullptr) {} + + void setCallbacks(spine_texture_loader_load_func load, spine_texture_loader_unload_func unload) { + loadCb = load; + unloadCb = unload; + } + + void load(AtlasPage &page, const String &path) { + page.texture = this->loadCb(path.buffer()); + } + + void unload(void *texture) { + this->unloadCb(texture); + } +}; +static CallbackTextureLoad callbackLoader; + +spine_atlas spine_atlas_load_callback(const char *atlasData, const char *atlasDir, + spine_texture_loader_load_func load, + spine_texture_loader_unload_func unload) { + if (!atlasData) return nullptr; + int32_t length = (int32_t) strlen(atlasData); + callbackLoader.setCallbacks(load, unload); + auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, (const char *) atlasDir, &callbackLoader, true); + _spine_atlas *result = SpineExtension::calloc<_spine_atlas>(1, __FILE__, __LINE__); + result->atlas = atlas; + result->numImagePaths = (int32_t) atlas->getPages().size(); + result->imagePaths = SpineExtension::calloc(result->numImagePaths, __FILE__, __LINE__); + for (int i = 0; i < result->numImagePaths; i++) { + result->imagePaths[i] = (const char *) strdup(atlas->getPages()[i]->texturePath.buffer()); + } + return (spine_atlas) result; +} + +int32_t spine_atlas_get_num_image_paths(spine_atlas atlas) { + if (!atlas) return 0; + return ((_spine_atlas *) atlas)->numImagePaths; +} + +const char *spine_atlas_get_image_path(spine_atlas atlas, int32_t index) { + if (!atlas) return nullptr; + _spine_atlas *_atlas = (_spine_atlas *) atlas; + if (index < 0 || index >= _atlas->numImagePaths) return nullptr; + return _atlas->imagePaths[index]; +} + +bool spine_atlas_is_pma(spine_atlas atlas) { + if (!atlas) return false; + Atlas *_atlas = (Atlas *) ((_spine_atlas *) atlas)->atlas; + for (size_t i = 0; i < _atlas->getPages().size(); i++) { + AtlasPage *page = _atlas->getPages()[i]; + if (page->pma) return true; + } + return false; +} + +const char *spine_atlas_get_error(spine_atlas atlas) { + if (!atlas) return nullptr; + return ((_spine_atlas *) atlas)->error; +} + +void spine_atlas_dispose(spine_atlas atlas) { + if (!atlas) return; + _spine_atlas *_atlas = (_spine_atlas *) atlas; + if (_atlas->atlas) { + delete (Atlas *) _atlas->atlas; + } + if (_atlas->imagePaths) { + for (int i = 0; i < _atlas->numImagePaths; i++) { + if (_atlas->imagePaths[i]) { + SpineExtension::free(_atlas->imagePaths[i], __FILE__, __LINE__); + } + } + SpineExtension::free(_atlas->imagePaths, __FILE__, __LINE__); + } + if (_atlas->error) { + SpineExtension::free(_atlas->error, __FILE__, __LINE__); + } + SpineExtension::free(_atlas, __FILE__, __LINE__); +} + +// Skeleton data loading +spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const char *skeletonData) { + if (!atlas || !skeletonData) return nullptr; + _spine_skeleton_data_result *result = SpineExtension::calloc<_spine_skeleton_data_result>(1, __FILE__, __LINE__); + SkeletonJson json((Atlas *) ((_spine_atlas *) atlas)->atlas); + json.setScale(1); + + SkeletonData *data = json.readSkeletonData(skeletonData); + if (!data) { + result->error = (const char *) strdup("Failed to load skeleton data"); + return (spine_skeleton_data_result) result; + } + + result->skeletonData = (spine_skeleton_data) data; + return (spine_skeleton_data_result) result; +} + +spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length) { + if (!atlas || !skeletonData) return nullptr; + _spine_skeleton_data_result *result = SpineExtension::calloc<_spine_skeleton_data_result>(1, __FILE__, __LINE__); + SkeletonBinary binary((Atlas *) ((_spine_atlas *) atlas)->atlas); + binary.setScale(1); + + SkeletonData *data = binary.readSkeletonData((const unsigned char *) skeletonData, length); + if (!data) { + result->error = (const char *) strdup("Failed to load skeleton data"); + return (spine_skeleton_data_result) result; + } + + result->skeletonData = (spine_skeleton_data) data; + return (spine_skeleton_data_result) result; +} + +const char *spine_skeleton_data_result_get_error(spine_skeleton_data_result result) { + if (!result) return nullptr; + return ((_spine_skeleton_data_result *) result)->error; +} + +spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result) { + if (!result) return nullptr; + return ((_spine_skeleton_data_result *) result)->skeletonData; +} + +void spine_skeleton_data_result_dispose(spine_skeleton_data_result result) { + if (!result) return; + _spine_skeleton_data_result *_result = (_spine_skeleton_data_result *) result; + if (_result->error) { + SpineExtension::free(_result->error, __FILE__, __LINE__); + } + SpineExtension::free(_result, __FILE__, __LINE__); +} + +// Skeleton drawable +spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData) { + if (!skeletonData) return nullptr; + _spine_skeleton_drawable *drawable = new (__FILE__, __LINE__) _spine_skeleton_drawable(); + + Skeleton *skeleton = new (__FILE__, __LINE__) Skeleton(*((SkeletonData *) skeletonData)); + AnimationStateData *stateData = new (__FILE__, __LINE__) AnimationStateData((SkeletonData *) skeletonData); + AnimationState *state = new (__FILE__, __LINE__) AnimationState(stateData); + EventListener *listener = new (__FILE__, __LINE__) EventListener(); + state->setListener(listener); + + drawable->skeleton = (spine_skeleton) skeleton; + drawable->animationStateData = (spine_animation_state_data) stateData; + drawable->animationState = (spine_animation_state) state; + drawable->animationStateEvents = (spine_animation_state_events) listener; + drawable->renderer = new (__FILE__, __LINE__) SkeletonRenderer(); + + return (spine_skeleton_drawable) drawable; +} + +spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable) { + if (!drawable) return nullptr; + _spine_skeleton_drawable *_drawable = (_spine_skeleton_drawable *) drawable; + Skeleton *skeleton = (Skeleton *) _drawable->skeleton; + SkeletonRenderer *renderer = _drawable->renderer; + + RenderCommand *commands = renderer->render(*skeleton); + return (spine_render_command) commands; +} + +void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable) { + if (!drawable) return; + _spine_skeleton_drawable *_drawable = (_spine_skeleton_drawable *) drawable; + + if (_drawable->renderer) { + delete _drawable->renderer; + } + if (_drawable->animationState) { + delete (AnimationState *) _drawable->animationState; + } + if (_drawable->animationStateData) { + delete (AnimationStateData *) _drawable->animationStateData; + } + if (_drawable->skeleton) { + delete (Skeleton *) _drawable->skeleton; + } + if (_drawable->animationStateEvents) { + delete (EventListener *) _drawable->animationStateEvents; + } + + delete _drawable; +} + +spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable) { + if (!drawable) return nullptr; + return ((_spine_skeleton_drawable *) drawable)->skeleton; +} + +spine_animation_state spine_skeleton_drawable_get_animation_state(spine_skeleton_drawable drawable) { + if (!drawable) return nullptr; + return ((_spine_skeleton_drawable *) drawable)->animationState; +} + +spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable) { + if (!drawable) return nullptr; + return ((_spine_skeleton_drawable *) drawable)->animationStateData; +} + +spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable) { + if (!drawable) return nullptr; + return ((_spine_skeleton_drawable *) drawable)->animationStateEvents; +} + +// Render command functions +float *spine_render_command_get_positions(spine_render_command command) { + if (!command) return nullptr; + return ((RenderCommand *) command)->positions; +} + +float *spine_render_command_get_uvs(spine_render_command command) { + if (!command) return nullptr; + return ((RenderCommand *) command)->uvs; +} + +int32_t *spine_render_command_get_colors(spine_render_command command) { + if (!command) return nullptr; + return (int32_t *) ((RenderCommand *) command)->colors; +} + +int32_t *spine_render_command_get_dark_colors(spine_render_command command) { + if (!command) return nullptr; + return (int32_t *) ((RenderCommand *) command)->darkColors; +} + +int32_t spine_render_command_get_num_vertices(spine_render_command command) { + if (!command) return 0; + return ((RenderCommand *) command)->numVertices; +} + +uint16_t *spine_render_command_get_indices(spine_render_command command) { + if (!command) return nullptr; + return ((RenderCommand *) command)->indices; +} + +int32_t spine_render_command_get_num_indices(spine_render_command command) { + if (!command) return 0; + return ((RenderCommand *) command)->numIndices; +} + +int32_t spine_render_command_get_atlas_page(spine_render_command command) { + if (!command) return 0; + return (int32_t) (intptr_t) ((RenderCommand *) command)->texture; +} + +spine_blend_mode spine_render_command_get_blend_mode(spine_render_command command) { + if (!command) return SPINE_BLEND_MODE_NORMAL; + BlendMode mode = ((RenderCommand *) command)->blendMode; + switch (mode) { + case BlendMode_Normal: return SPINE_BLEND_MODE_NORMAL; + case BlendMode_Additive: return SPINE_BLEND_MODE_ADDITIVE; + case BlendMode_Multiply: return SPINE_BLEND_MODE_MULTIPLY; + case BlendMode_Screen: return SPINE_BLEND_MODE_SCREEN; + default: return SPINE_BLEND_MODE_NORMAL; + } +} + +spine_render_command spine_render_command_get_next(spine_render_command command) { + if (!command) return nullptr; + return (spine_render_command) ((RenderCommand *) command)->next; +} + +// Skin entries +spine_skin_entries spine_skin_entries_create() { + _spine_skin_entries *entries = SpineExtension::calloc<_spine_skin_entries>(1, __FILE__, __LINE__); + return (spine_skin_entries) entries; +} + +void spine_skin_entries_dispose(spine_skin_entries entries) { + if (!entries) return; + _spine_skin_entries *_entries = (_spine_skin_entries *) entries; + if (_entries->entries) { + for (int i = 0; i < _entries->numEntries; i++) { + if (_entries->entries[i].name) { + SpineExtension::free(_entries->entries[i].name, __FILE__, __LINE__); + } + } + SpineExtension::free(_entries->entries, __FILE__, __LINE__); + } + SpineExtension::free(_entries, __FILE__, __LINE__); +} + +int32_t spine_skin_entries_get_num_entries(spine_skin_entries entries) { + if (!entries) return 0; + return ((_spine_skin_entries *) entries)->numEntries; +} + +spine_skin_entry spine_skin_entries_get_entry(spine_skin_entries entries, int32_t index) { + if (!entries) return nullptr; + _spine_skin_entries *_entries = (_spine_skin_entries *) entries; + if (index < 0 || index >= _entries->numEntries) return nullptr; + return (spine_skin_entry) &_entries->entries[index]; +} + +int32_t spine_skin_entry_get_slot_index(spine_skin_entry entry) { + if (!entry) return 0; + return ((_spine_skin_entry *) entry)->slotIndex; +} + +const char *spine_skin_entry_get_name(spine_skin_entry entry) { + if (!entry) return nullptr; + return ((_spine_skin_entry *) entry)->name; +} + +spine_attachment spine_skin_entry_get_attachment(spine_skin_entry entry) { + if (!entry) return nullptr; + return ((_spine_skin_entry *) entry)->attachment; +} \ No newline at end of file diff --git a/spine-c-new/src/extensions.h b/spine-c-new/src/extensions.h new file mode 100644 index 000000000..fb87797aa --- /dev/null +++ b/spine-c-new/src/extensions.h @@ -0,0 +1,133 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated April 5, 2025. Replaces all prior versions. + * + * Copyright (c) 2013-2025, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_C_EXTENSIONS_H +#define SPINE_C_EXTENSIONS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "base.h" + +// Custom types for spine-c-new (not generated) +SPINE_OPAQUE_TYPE(spine_skeleton_data_result) +SPINE_OPAQUE_TYPE(spine_bounds) +SPINE_OPAQUE_TYPE(spine_vector) +SPINE_OPAQUE_TYPE(spine_skeleton_drawable) +SPINE_OPAQUE_TYPE(spine_animation_state_events) +SPINE_OPAQUE_TYPE(spine_skin_entry) +SPINE_OPAQUE_TYPE(spine_skin_entries) +SPINE_OPAQUE_TYPE(spine_texture_loader) + +// Additional types +typedef void* spine_void; +typedef void (*spine_dispose_renderer_object)(void*); + +// Texture loader callbacks +typedef void* (*spine_texture_loader_load_func)(const char *path); +typedef void (*spine_texture_loader_unload_func)(void *texture); + +// Version functions +SPINE_C_EXPORT int32_t spine_major_version(); +SPINE_C_EXPORT int32_t spine_minor_version(); +SPINE_C_EXPORT void spine_enable_debug_extension(bool enable); +SPINE_C_EXPORT void spine_report_leaks(); + +// Color functions +SPINE_C_EXPORT float spine_color_get_r(spine_color color); +SPINE_C_EXPORT float spine_color_get_g(spine_color color); +SPINE_C_EXPORT float spine_color_get_b(spine_color color); +SPINE_C_EXPORT float spine_color_get_a(spine_color color); + +// Bounds functions +SPINE_C_EXPORT float spine_bounds_get_x(spine_bounds bounds); +SPINE_C_EXPORT float spine_bounds_get_y(spine_bounds bounds); +SPINE_C_EXPORT float spine_bounds_get_width(spine_bounds bounds); +SPINE_C_EXPORT float spine_bounds_get_height(spine_bounds bounds); + +// Vector functions +SPINE_C_EXPORT float spine_vector_get_x(spine_vector vector); +SPINE_C_EXPORT float spine_vector_get_y(spine_vector vector); + +// Atlas functions +SPINE_C_EXPORT spine_atlas spine_atlas_load(const char *atlasData); +SPINE_C_EXPORT spine_atlas spine_atlas_load_callback(const char *atlasData, const char *atlasDir, + spine_texture_loader_load_func load, + spine_texture_loader_unload_func unload); +SPINE_C_EXPORT int32_t spine_atlas_get_num_image_paths(spine_atlas atlas); +SPINE_C_EXPORT const char *spine_atlas_get_image_path(spine_atlas atlas, int32_t index); +SPINE_C_EXPORT bool spine_atlas_is_pma(spine_atlas atlas); +SPINE_C_EXPORT const char *spine_atlas_get_error(spine_atlas atlas); +SPINE_C_EXPORT void spine_atlas_dispose(spine_atlas atlas); + +// Skeleton data functions +SPINE_C_EXPORT spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const char *skeletonData); +SPINE_C_EXPORT spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length); +SPINE_C_EXPORT const char *spine_skeleton_data_result_get_error(spine_skeleton_data_result result); +SPINE_C_EXPORT spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result); +SPINE_C_EXPORT void spine_skeleton_data_result_dispose(spine_skeleton_data_result result); + +// Skeleton drawable functions +SPINE_C_EXPORT spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData); +SPINE_C_EXPORT spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable); +SPINE_C_EXPORT void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable); +SPINE_C_EXPORT spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable); +SPINE_C_EXPORT spine_animation_state spine_skeleton_drawable_get_animation_state(spine_skeleton_drawable drawable); +SPINE_C_EXPORT spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable); +SPINE_C_EXPORT spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable); + +// Render command functions +SPINE_C_EXPORT float *spine_render_command_get_positions(spine_render_command command); +SPINE_C_EXPORT float *spine_render_command_get_uvs(spine_render_command command); +SPINE_C_EXPORT int32_t *spine_render_command_get_colors(spine_render_command command); +SPINE_C_EXPORT int32_t *spine_render_command_get_dark_colors(spine_render_command command); +SPINE_C_EXPORT int32_t spine_render_command_get_num_vertices(spine_render_command command); +SPINE_C_EXPORT uint16_t *spine_render_command_get_indices(spine_render_command command); +SPINE_C_EXPORT int32_t spine_render_command_get_num_indices(spine_render_command command); +SPINE_C_EXPORT int32_t spine_render_command_get_atlas_page(spine_render_command command); +SPINE_C_EXPORT spine_blend_mode spine_render_command_get_blend_mode(spine_render_command command); +SPINE_C_EXPORT spine_render_command spine_render_command_get_next(spine_render_command command); + +// Skin entries functions +SPINE_C_EXPORT spine_skin_entries spine_skin_entries_create(); +SPINE_C_EXPORT void spine_skin_entries_dispose(spine_skin_entries entries); +SPINE_C_EXPORT int32_t spine_skin_entries_get_num_entries(spine_skin_entries entries); +SPINE_C_EXPORT spine_skin_entry spine_skin_entries_get_entry(spine_skin_entries entries, int32_t index); + +// Skin entry functions +SPINE_C_EXPORT int32_t spine_skin_entry_get_slot_index(spine_skin_entry entry); +SPINE_C_EXPORT const char *spine_skin_entry_get_name(spine_skin_entry entry); +SPINE_C_EXPORT spine_attachment spine_skin_entry_get_attachment(spine_skin_entry entry); + +#ifdef __cplusplus +} +#endif + +#endif // SPINE_C_EXTENSIONS_H \ No newline at end of file diff --git a/spine-c-new/src/generated/alpha_timeline.cpp b/spine-c-new/src/generated/alpha_timeline.cpp index a8b50040c..83749d8c7 100644 --- a/spine-c-new/src/generated/alpha_timeline.cpp +++ b/spine-c-new/src/generated/alpha_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_alpha_timeline spine_alpha_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) { +spine_alpha_timeline spine_alpha_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) { AlphaTimeline *obj = new (__FILE__, __LINE__) AlphaTimeline(frameCount, bezierCount, slotIndex); return (spine_alpha_timeline) obj; } @@ -42,19 +42,17 @@ void spine_alpha_timeline_dispose(spine_alpha_timeline obj) { delete (AlphaTimeline *) obj; } -spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline obj) { - if (!obj) return nullptr; - AlphaTimeline *_obj = (AlphaTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_alpha_timeline_get_rtti() { + return (spine_rtti) &AlphaTimeline::rtti; } -void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; AlphaTimeline *_obj = (AlphaTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, spine_size_t frame, float time, float value) { +void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, size_t frame, float time, float value) { if (!obj) return ; AlphaTimeline *_obj = (AlphaTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_alpha_timeline_get_curve_value(spine_alpha_timeline obj, float time) float spine_alpha_timeline_get_relative_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; AlphaTimeline *_obj = (AlphaTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; AlphaTimeline *_obj = (AlphaTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_alpha_timeline_get_absolute_value_6(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; AlphaTimeline *_obj = (AlphaTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_alpha_timeline_get_scale_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; AlphaTimeline *_obj = (AlphaTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj) { +int spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj) { if (!obj) return 0; AlphaTimeline *_obj = (AlphaTimeline *) obj; return _obj->getSlotIndex(); } -void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int32_t value) { +void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int value) { if (!obj) return; AlphaTimeline *_obj = (AlphaTimeline *) obj; _obj->setSlotIndex(value); diff --git a/spine-c-new/src/generated/alpha_timeline.h b/spine-c-new/src/generated/alpha_timeline.h index eef9b0c32..1a4a02541 100644 --- a/spine-c-new/src/generated/alpha_timeline.h +++ b/spine-c-new/src/generated/alpha_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_alpha_timeline) - -SPINE_C_EXPORT spine_alpha_timeline spine_alpha_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_alpha_timeline spine_alpha_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_alpha_timeline_dispose(spine_alpha_timeline obj); -SPINE_C_EXPORT spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline obj); -SPINE_C_EXPORT void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_alpha_timeline_get_rtti(); +SPINE_C_EXPORT void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_alpha_timeline_get_curve_value(spine_alpha_timeline obj, float time); SPINE_C_EXPORT float spine_alpha_timeline_get_relative_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value_6(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_alpha_timeline_get_scale_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj); -SPINE_C_EXPORT void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj); +SPINE_C_EXPORT void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/animation.cpp b/spine-c-new/src/generated/animation.cpp index 01319a4e2..ed1d0309b 100644 --- a/spine-c-new/src/generated/animation.cpp +++ b/spine-c-new/src/generated/animation.cpp @@ -32,8 +32,8 @@ using namespace spine; -spine_animation spine_animation_create(const utf8 * name, void * timelines, float duration) { - Animation *obj = new (__FILE__, __LINE__) Animation(String(name), (Vector &) timelines, duration); +spine_animation spine_animation_create(const char* name, spine_array_timeline timelines, float duration) { + Animation *obj = new (__FILE__, __LINE__) Animation(String(name), (Array &) timelines, duration); return (spine_animation) obj; } @@ -42,12 +42,6 @@ void spine_animation_dispose(spine_animation obj) { delete (Animation *) obj; } -void * spine_animation_get_timelines(spine_animation obj) { - if (!obj) return nullptr; - Animation *_obj = (Animation *) obj; - return (void *) _obj->getTimelines(); -} - int32_t spine_animation_get_num_timelines(spine_animation obj) { if (!obj) return 0; Animation *_obj = (Animation *) obj; @@ -60,16 +54,16 @@ spine_timeline *spine_animation_get_timelines(spine_animation obj) { return (spine_timeline *) _obj->getTimelines().buffer(); } -void spine_animation_set_timelines(spine_animation obj, void * value) { +void spine_animation_set_timelines(spine_animation obj, spine_array_timeline value) { if (!obj) return; Animation *_obj = (Animation *) obj; - _obj->setTimelines((Vector &) value); + _obj->setTimelines((Array &) value); } -spine_bool spine_animation_has_timeline(spine_animation obj, void * ids) { - if (!obj) return 0; +bool spine_animation_has_timeline(spine_animation obj, spine_array_property_id ids) { + if (!obj) return false; Animation *_obj = (Animation *) obj; - return _obj->hasTimeline((Vector &) ids); + return _obj->hasTimeline((Array &) ids); } float spine_animation_get_duration(spine_animation obj) { @@ -84,22 +78,16 @@ void spine_animation_set_duration(spine_animation obj, float value) { _obj->setDuration(value); } -void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, spine_bool loop, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, bool loop, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; Animation *_obj = (Animation *) obj; - _obj->apply(skeleton, lastTime, time, loop, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, loop, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -const utf8 * spine_animation_get_name(spine_animation obj) { +const char* spine_animation_get_name(spine_animation obj) { if (!obj) return nullptr; Animation *_obj = (Animation *) obj; - return (const utf8 *) _obj->getName().buffer(); -} - -int32_t * spine_animation_get_bones(spine_animation obj) { - if (!obj) return 0; - Animation *_obj = (Animation *) obj; - return _obj->getBones(); + return (const char *) _obj->getName().buffer(); } int32_t spine_animation_get_num_bones(spine_animation obj) { @@ -108,8 +96,10 @@ int32_t spine_animation_get_num_bones(spine_animation obj) { return (int32_t) _obj->getBones().size(); } -int32_t *spine_animation_get_bones(spine_animation obj) { +int *spine_animation_get_bones(spine_animation obj) { if (!obj) return nullptr; Animation *_obj = (Animation *) obj; - return (int32_t *) _obj->getBones().buffer(); + auto& vec = _obj->getBones(); + if (vec.size() == 0) return nullptr; + return (int *) &vec[0]; } diff --git a/spine-c-new/src/generated/animation.h b/spine-c-new/src/generated/animation.h index e5aab3f56..9e743996f 100644 --- a/spine-c-new/src/generated/animation.h +++ b/spine-c-new/src/generated/animation.h @@ -34,24 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_animation) - -SPINE_C_EXPORT spine_animation spine_animation_create(const utf8 * name, void * timelines, float duration); +SPINE_C_EXPORT spine_animation spine_animation_create(const char* name, spine_array_timeline timelines, float duration); SPINE_C_EXPORT void spine_animation_dispose(spine_animation obj); -SPINE_C_EXPORT void * spine_animation_get_timelines(spine_animation obj); SPINE_C_EXPORT int32_t spine_animation_get_num_timelines(spine_animation obj); SPINE_C_EXPORT spine_timeline *spine_animation_get_timelines(spine_animation obj); -SPINE_C_EXPORT void spine_animation_set_timelines(spine_animation obj, void * value); -SPINE_C_EXPORT spine_bool spine_animation_has_timeline(spine_animation obj, void * ids); +SPINE_C_EXPORT void spine_animation_set_timelines(spine_animation obj, spine_array_timeline value); +SPINE_C_EXPORT bool spine_animation_has_timeline(spine_animation obj, spine_array_property_id ids); SPINE_C_EXPORT float spine_animation_get_duration(spine_animation obj); SPINE_C_EXPORT void spine_animation_set_duration(spine_animation obj, float value); -SPINE_C_EXPORT void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, spine_bool loop, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT const utf8 * spine_animation_get_name(spine_animation obj); -SPINE_C_EXPORT int32_t * spine_animation_get_bones(spine_animation obj); +SPINE_C_EXPORT void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, bool loop, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT const char* spine_animation_get_name(spine_animation obj); SPINE_C_EXPORT int32_t spine_animation_get_num_bones(spine_animation obj); -SPINE_C_EXPORT int32_t *spine_animation_get_bones(spine_animation obj); +SPINE_C_EXPORT int *spine_animation_get_bones(spine_animation obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/animation_state.cpp b/spine-c-new/src/generated/animation_state.cpp index ca263ba89..c85a3bc18 100644 --- a/spine-c-new/src/generated/animation_state.cpp +++ b/spine-c-new/src/generated/animation_state.cpp @@ -48,10 +48,10 @@ void spine_animation_state_update(spine_animation_state obj, float delta) { _obj->update(delta); } -spine_bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton) { - if (!obj) return 0; +bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton) { + if (!obj) return false; AnimationState *_obj = (AnimationState *) obj; - return _obj->apply(skeleton); + return _obj->apply(*(Skeleton*) skeleton); } void spine_animation_state_clear_tracks(spine_animation_state obj) { @@ -60,44 +60,44 @@ void spine_animation_state_clear_tracks(spine_animation_state obj) { _obj->clearTracks(); } -void spine_animation_state_clear_track(spine_animation_state obj, spine_size_t trackIndex) { +void spine_animation_state_clear_track(spine_animation_state obj, size_t trackIndex) { if (!obj) return ; AnimationState *_obj = (AnimationState *) obj; _obj->clearTrack(trackIndex); } -spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->setAnimation(trackIndex, String(animationName), loop); } -spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_set_animation_3(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->setAnimation(trackIndex, (Animation *) animation, loop); } -spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop, float delay) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop, float delay) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->addAnimation(trackIndex, String(animationName), loop, delay); } -spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop, float delay) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_add_animation_4(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop, float delay) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->addAnimation(trackIndex, (Animation *) animation, loop, delay); } -spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->setEmptyAnimation(trackIndex, mixDuration); } -spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration, float delay) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration, float delay) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->addEmptyAnimation(trackIndex, mixDuration, delay); } @@ -108,24 +108,18 @@ void spine_animation_state_set_empty_animations(spine_animation_state obj, float _obj->setEmptyAnimations(value); } -spine_track_entry spine_animation_state_get_current(spine_animation_state obj, spine_size_t trackIndex) { - if (!obj) return nullptr; +spine_track_entry spine_animation_state_get_current(spine_animation_state obj, size_t trackIndex) { + if (!obj) return (spine_track_entry) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_track_entry) _obj->getCurrent(trackIndex); } spine_animation_state_data spine_animation_state_get_data(spine_animation_state obj) { - if (!obj) return nullptr; + if (!obj) return (spine_animation_state_data) 0; AnimationState *_obj = (AnimationState *) obj; return (spine_animation_state_data) _obj->getData(); } -void * spine_animation_state_get_tracks(spine_animation_state obj) { - if (!obj) return nullptr; - AnimationState *_obj = (AnimationState *) obj; - return (void *) _obj->getTracks(); -} - int32_t spine_animation_state_get_num_tracks(spine_animation_state obj) { if (!obj) return 0; AnimationState *_obj = (AnimationState *) obj; @@ -150,20 +144,38 @@ void spine_animation_state_set_time_scale(spine_animation_state obj, float value _obj->setTimeScale(value); } +void spine_animation_state_disable_queue(spine_animation_state obj) { + if (!obj) return ; + AnimationState *_obj = (AnimationState *) obj; + _obj->disableQueue(); +} + +void spine_animation_state_enable_queue(spine_animation_state obj) { + if (!obj) return ; + AnimationState *_obj = (AnimationState *) obj; + _obj->enableQueue(); +} + +void spine_animation_state_set_manual_track_entry_disposal(spine_animation_state obj, bool value) { + if (!obj) return; + AnimationState *_obj = (AnimationState *) obj; + _obj->setManualTrackEntryDisposal(value); +} + +bool spine_animation_state_get_manual_track_entry_disposal(spine_animation_state obj) { + if (!obj) return false; + AnimationState *_obj = (AnimationState *) obj; + return _obj->getManualTrackEntryDisposal(); +} + void spine_animation_state_dispose_track_entry(spine_animation_state obj, spine_track_entry entry) { if (!obj) return ; AnimationState *_obj = (AnimationState *) obj; _obj->disposeTrackEntry((TrackEntry *) entry); } -spine_void spine_animation_state_get_renderer_object(spine_animation_state obj) { +void * spine_animation_state_get_renderer_object(spine_animation_state obj) { if (!obj) return nullptr; AnimationState *_obj = (AnimationState *) obj; - return (spine_void) _obj->getRendererObject(); -} - -void spine_animation_state_set_renderer_object(spine_animation_state obj, spine_void rendererObject, spine_dispose_renderer_object dispose) { - if (!obj) return ; - AnimationState *_obj = (AnimationState *) obj; - _obj->setRendererObject((void *) rendererObject, dispose); + return (void *) _obj->getRendererObject(); } diff --git a/spine-c-new/src/generated/animation_state.h b/spine-c-new/src/generated/animation_state.h index 54e29ad29..34f47a945 100644 --- a/spine-c-new/src/generated/animation_state.h +++ b/spine-c-new/src/generated/animation_state.h @@ -34,33 +34,33 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_animation_state) +#include "types.h" SPINE_C_EXPORT spine_animation_state spine_animation_state_create(spine_animation_state_data data); SPINE_C_EXPORT void spine_animation_state_dispose(spine_animation_state obj); SPINE_C_EXPORT void spine_animation_state_update(spine_animation_state obj, float delta); -SPINE_C_EXPORT spine_bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton); +SPINE_C_EXPORT bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_animation_state_clear_tracks(spine_animation_state obj); -SPINE_C_EXPORT void spine_animation_state_clear_track(spine_animation_state obj, spine_size_t trackIndex); -SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop); -SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop); -SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop, float delay); -SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop, float delay); -SPINE_C_EXPORT spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration); -SPINE_C_EXPORT spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration, float delay); +SPINE_C_EXPORT void spine_animation_state_clear_track(spine_animation_state obj, size_t trackIndex); +SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop); +SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation_3(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop); +SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop, float delay); +SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation_4(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop, float delay); +SPINE_C_EXPORT spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration); +SPINE_C_EXPORT spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration, float delay); SPINE_C_EXPORT void spine_animation_state_set_empty_animations(spine_animation_state obj, float value); -SPINE_C_EXPORT spine_track_entry spine_animation_state_get_current(spine_animation_state obj, spine_size_t trackIndex); +SPINE_C_EXPORT spine_track_entry spine_animation_state_get_current(spine_animation_state obj, size_t trackIndex); SPINE_C_EXPORT spine_animation_state_data spine_animation_state_get_data(spine_animation_state obj); -SPINE_C_EXPORT void * spine_animation_state_get_tracks(spine_animation_state obj); SPINE_C_EXPORT int32_t spine_animation_state_get_num_tracks(spine_animation_state obj); SPINE_C_EXPORT spine_track_entry *spine_animation_state_get_tracks(spine_animation_state obj); SPINE_C_EXPORT float spine_animation_state_get_time_scale(spine_animation_state obj); SPINE_C_EXPORT void spine_animation_state_set_time_scale(spine_animation_state obj, float value); +SPINE_C_EXPORT void spine_animation_state_disable_queue(spine_animation_state obj); +SPINE_C_EXPORT void spine_animation_state_enable_queue(spine_animation_state obj); +SPINE_C_EXPORT void spine_animation_state_set_manual_track_entry_disposal(spine_animation_state obj, bool value); +SPINE_C_EXPORT bool spine_animation_state_get_manual_track_entry_disposal(spine_animation_state obj); SPINE_C_EXPORT void spine_animation_state_dispose_track_entry(spine_animation_state obj, spine_track_entry entry); -SPINE_C_EXPORT spine_void spine_animation_state_get_renderer_object(spine_animation_state obj); -SPINE_C_EXPORT void spine_animation_state_set_renderer_object(spine_animation_state obj, spine_void rendererObject, spine_dispose_renderer_object dispose); +SPINE_C_EXPORT void * spine_animation_state_get_renderer_object(spine_animation_state obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/animation_state_data.cpp b/spine-c-new/src/generated/animation_state_data.cpp index d39988f1d..83a4146ea 100644 --- a/spine-c-new/src/generated/animation_state_data.cpp +++ b/spine-c-new/src/generated/animation_state_data.cpp @@ -43,7 +43,7 @@ void spine_animation_state_data_dispose(spine_animation_state_data obj) { } spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_skeleton_data) 0; AnimationStateData *_obj = (AnimationStateData *) obj; return (spine_skeleton_data) _obj->getSkeletonData(); } @@ -60,13 +60,13 @@ void spine_animation_state_data_set_default_mix(spine_animation_state_data obj, _obj->setDefaultMix(value); } -void spine_animation_state_data_set_mix(spine_animation_state_data obj, const utf8 * fromName, const utf8 * toName, float duration) { +void spine_animation_state_data_set_mix(spine_animation_state_data obj, const char* fromName, const char* toName, float duration) { if (!obj) return ; AnimationStateData *_obj = (AnimationStateData *) obj; _obj->setMix(String(fromName), String(toName), duration); } -void spine_animation_state_data_set_mix(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration) { +void spine_animation_state_data_set_mix_3(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration) { if (!obj) return ; AnimationStateData *_obj = (AnimationStateData *) obj; _obj->setMix((Animation *) from, (Animation *) to, duration); diff --git a/spine-c-new/src/generated/animation_state_data.h b/spine-c-new/src/generated/animation_state_data.h index f0c347a6d..0e4840657 100644 --- a/spine-c-new/src/generated/animation_state_data.h +++ b/spine-c-new/src/generated/animation_state_data.h @@ -34,17 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_animation_state_data) +#include "types.h" SPINE_C_EXPORT spine_animation_state_data spine_animation_state_data_create(spine_skeleton_data skeletonData); SPINE_C_EXPORT void spine_animation_state_data_dispose(spine_animation_state_data obj); SPINE_C_EXPORT spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data obj); SPINE_C_EXPORT float spine_animation_state_data_get_default_mix(spine_animation_state_data obj); SPINE_C_EXPORT void spine_animation_state_data_set_default_mix(spine_animation_state_data obj, float value); -SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, const utf8 * fromName, const utf8 * toName, float duration); -SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration); +SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, const char* fromName, const char* toName, float duration); +SPINE_C_EXPORT void spine_animation_state_data_set_mix_3(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration); SPINE_C_EXPORT float spine_animation_state_data_get_mix(spine_animation_state_data obj, spine_animation from, spine_animation to); SPINE_C_EXPORT void spine_animation_state_data_clear(spine_animation_state_data obj); diff --git a/spine-c-new/src/generated/arrays.cpp b/spine-c-new/src/generated/arrays.cpp new file mode 100644 index 000000000..2aebc9a9e --- /dev/null +++ b/spine-c-new/src/generated/arrays.cpp @@ -0,0 +1,2359 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated April 5, 2025. Replaces all prior versions. + * + * Copyright (c) 2013-2025, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include "arrays.h" +#include +#include + +using namespace spine; + +spine_array_animation spine_array_animation_create() { + return (spine_array_animation) new (__FILE__, __LINE__) Array(); +} + +void spine_array_animation_dispose(spine_array_animation array) { + if (!array) return; + delete (Array*) array; +} + +spine_animation spine_array_animation_get(spine_array_animation array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_animation) (*_array)[index]; +} + +void spine_array_animation_set(spine_array_animation array, int index, spine_animation value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Animation *) value; +} + +void spine_array_animation_clear(spine_array_animation array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_animation_get_capacity(spine_array_animation array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_animation_size(spine_array_animation array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_animation_ensure_capacity(spine_array_animation array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_animation_add(spine_array_animation array, spine_animation inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Animation *) inValue); +} + +void spine_array_animation_remove_at(spine_array_animation array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_animation_contains(spine_array_animation array, spine_animation inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Animation *) inValue); +} + +int spine_array_animation_index_of(spine_array_animation array, spine_animation inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Animation *) inValue); +} + +spine_animation spine_array_animation_buffer(spine_array_animation array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_animation) _array->buffer(); +} + +spine_array_atlas_page spine_array_atlas_page_create() { + return (spine_array_atlas_page) new (__FILE__, __LINE__) Array(); +} + +void spine_array_atlas_page_dispose(spine_array_atlas_page array) { + if (!array) return; + delete (Array*) array; +} + +spine_atlas_page spine_array_atlas_page_get(spine_array_atlas_page array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_atlas_page) (*_array)[index]; +} + +void spine_array_atlas_page_set(spine_array_atlas_page array, int index, spine_atlas_page value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (AtlasPage *) value; +} + +void spine_array_atlas_page_clear(spine_array_atlas_page array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_atlas_page_get_capacity(spine_array_atlas_page array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_atlas_page_size(spine_array_atlas_page array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_atlas_page_ensure_capacity(spine_array_atlas_page array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_atlas_page_add(spine_array_atlas_page array, spine_atlas_page inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((AtlasPage *) inValue); +} + +void spine_array_atlas_page_remove_at(spine_array_atlas_page array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_atlas_page_contains(spine_array_atlas_page array, spine_atlas_page inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((AtlasPage *) inValue); +} + +int spine_array_atlas_page_index_of(spine_array_atlas_page array, spine_atlas_page inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((AtlasPage *) inValue); +} + +spine_atlas_page spine_array_atlas_page_buffer(spine_array_atlas_page array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_atlas_page) _array->buffer(); +} + +spine_array_atlas_region spine_array_atlas_region_create() { + return (spine_array_atlas_region) new (__FILE__, __LINE__) Array(); +} + +void spine_array_atlas_region_dispose(spine_array_atlas_region array) { + if (!array) return; + delete (Array*) array; +} + +spine_atlas_region spine_array_atlas_region_get(spine_array_atlas_region array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_atlas_region) (*_array)[index]; +} + +void spine_array_atlas_region_set(spine_array_atlas_region array, int index, spine_atlas_region value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (AtlasRegion *) value; +} + +void spine_array_atlas_region_clear(spine_array_atlas_region array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_atlas_region_get_capacity(spine_array_atlas_region array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_atlas_region_size(spine_array_atlas_region array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_atlas_region_ensure_capacity(spine_array_atlas_region array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_atlas_region_add(spine_array_atlas_region array, spine_atlas_region inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((AtlasRegion *) inValue); +} + +void spine_array_atlas_region_remove_at(spine_array_atlas_region array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_atlas_region_contains(spine_array_atlas_region array, spine_atlas_region inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((AtlasRegion *) inValue); +} + +int spine_array_atlas_region_index_of(spine_array_atlas_region array, spine_atlas_region inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((AtlasRegion *) inValue); +} + +spine_atlas_region spine_array_atlas_region_buffer(spine_array_atlas_region array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_atlas_region) _array->buffer(); +} + +spine_array_attachment spine_array_attachment_create() { + return (spine_array_attachment) new (__FILE__, __LINE__) Array(); +} + +void spine_array_attachment_dispose(spine_array_attachment array) { + if (!array) return; + delete (Array*) array; +} + +spine_attachment spine_array_attachment_get(spine_array_attachment array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_attachment) (*_array)[index]; +} + +void spine_array_attachment_set(spine_array_attachment array, int index, spine_attachment value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Attachment *) value; +} + +void spine_array_attachment_clear(spine_array_attachment array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_attachment_get_capacity(spine_array_attachment array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_attachment_size(spine_array_attachment array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_attachment_ensure_capacity(spine_array_attachment array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_attachment_add(spine_array_attachment array, spine_attachment inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Attachment *) inValue); +} + +void spine_array_attachment_remove_at(spine_array_attachment array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_attachment_contains(spine_array_attachment array, spine_attachment inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Attachment *) inValue); +} + +int spine_array_attachment_index_of(spine_array_attachment array, spine_attachment inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Attachment *) inValue); +} + +spine_attachment spine_array_attachment_buffer(spine_array_attachment array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_attachment) _array->buffer(); +} + +spine_array_bone spine_array_bone_create() { + return (spine_array_bone) new (__FILE__, __LINE__) Array(); +} + +void spine_array_bone_dispose(spine_array_bone array) { + if (!array) return; + delete (Array*) array; +} + +spine_bone spine_array_bone_get(spine_array_bone array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone) (*_array)[index]; +} + +void spine_array_bone_set(spine_array_bone array, int index, spine_bone value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Bone *) value; +} + +void spine_array_bone_clear(spine_array_bone array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_bone_get_capacity(spine_array_bone array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_bone_size(spine_array_bone array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_bone_ensure_capacity(spine_array_bone array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_bone_add(spine_array_bone array, spine_bone inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Bone *) inValue); +} + +void spine_array_bone_remove_at(spine_array_bone array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_bone_contains(spine_array_bone array, spine_bone inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Bone *) inValue); +} + +int spine_array_bone_index_of(spine_array_bone array, spine_bone inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Bone *) inValue); +} + +spine_bone spine_array_bone_buffer(spine_array_bone array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone) _array->buffer(); +} + +spine_array_bone_data spine_array_bone_data_create() { + return (spine_array_bone_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_bone_data_dispose(spine_array_bone_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_bone_data spine_array_bone_data_get(spine_array_bone_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone_data) (*_array)[index]; +} + +void spine_array_bone_data_set(spine_array_bone_data array, int index, spine_bone_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (BoneData *) value; +} + +void spine_array_bone_data_clear(spine_array_bone_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_bone_data_get_capacity(spine_array_bone_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_bone_data_size(spine_array_bone_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_bone_data_ensure_capacity(spine_array_bone_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_bone_data_add(spine_array_bone_data array, spine_bone_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((BoneData *) inValue); +} + +void spine_array_bone_data_remove_at(spine_array_bone_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_bone_data_contains(spine_array_bone_data array, spine_bone_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((BoneData *) inValue); +} + +int spine_array_bone_data_index_of(spine_array_bone_data array, spine_bone_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((BoneData *) inValue); +} + +spine_bone_data spine_array_bone_data_buffer(spine_array_bone_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone_data) _array->buffer(); +} + +spine_array_bone_pose spine_array_bone_pose_create() { + return (spine_array_bone_pose) new (__FILE__, __LINE__) Array(); +} + +void spine_array_bone_pose_dispose(spine_array_bone_pose array) { + if (!array) return; + delete (Array*) array; +} + +spine_bone_pose spine_array_bone_pose_get(spine_array_bone_pose array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone_pose) (*_array)[index]; +} + +void spine_array_bone_pose_set(spine_array_bone_pose array, int index, spine_bone_pose value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (BonePose *) value; +} + +void spine_array_bone_pose_clear(spine_array_bone_pose array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_bone_pose_get_capacity(spine_array_bone_pose array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_bone_pose_size(spine_array_bone_pose array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_bone_pose_ensure_capacity(spine_array_bone_pose array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_bone_pose_add(spine_array_bone_pose array, spine_bone_pose inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((BonePose *) inValue); +} + +void spine_array_bone_pose_remove_at(spine_array_bone_pose array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_bone_pose_contains(spine_array_bone_pose array, spine_bone_pose inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((BonePose *) inValue); +} + +int spine_array_bone_pose_index_of(spine_array_bone_pose array, spine_bone_pose inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((BonePose *) inValue); +} + +spine_bone_pose spine_array_bone_pose_buffer(spine_array_bone_pose array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bone_pose) _array->buffer(); +} + +spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create() { + return (spine_array_bounding_box_attachment) new (__FILE__, __LINE__) Array(); +} + +void spine_array_bounding_box_attachment_dispose(spine_array_bounding_box_attachment array) { + if (!array) return; + delete (Array*) array; +} + +spine_bounding_box_attachment spine_array_bounding_box_attachment_get(spine_array_bounding_box_attachment array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bounding_box_attachment) (*_array)[index]; +} + +void spine_array_bounding_box_attachment_set(spine_array_bounding_box_attachment array, int index, spine_bounding_box_attachment value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (BoundingBoxAttachment *) value; +} + +void spine_array_bounding_box_attachment_clear(spine_array_bounding_box_attachment array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_bounding_box_attachment_get_capacity(spine_array_bounding_box_attachment array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_bounding_box_attachment_size(spine_array_bounding_box_attachment array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_bounding_box_attachment_ensure_capacity(spine_array_bounding_box_attachment array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_bounding_box_attachment_add(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((BoundingBoxAttachment *) inValue); +} + +void spine_array_bounding_box_attachment_remove_at(spine_array_bounding_box_attachment array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_bounding_box_attachment_contains(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((BoundingBoxAttachment *) inValue); +} + +int spine_array_bounding_box_attachment_index_of(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((BoundingBoxAttachment *) inValue); +} + +spine_bounding_box_attachment spine_array_bounding_box_attachment_buffer(spine_array_bounding_box_attachment array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_bounding_box_attachment) _array->buffer(); +} + +spine_array_constraint spine_array_constraint_create() { + return (spine_array_constraint) new (__FILE__, __LINE__) Array(); +} + +void spine_array_constraint_dispose(spine_array_constraint array) { + if (!array) return; + delete (Array*) array; +} + +spine_constraint spine_array_constraint_get(spine_array_constraint array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_constraint) (*_array)[index]; +} + +void spine_array_constraint_set(spine_array_constraint array, int index, spine_constraint value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Constraint *) value; +} + +void spine_array_constraint_clear(spine_array_constraint array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_constraint_get_capacity(spine_array_constraint array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_constraint_size(spine_array_constraint array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_constraint_ensure_capacity(spine_array_constraint array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_constraint_add(spine_array_constraint array, spine_constraint inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Constraint *) inValue); +} + +void spine_array_constraint_remove_at(spine_array_constraint array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_constraint_contains(spine_array_constraint array, spine_constraint inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Constraint *) inValue); +} + +int spine_array_constraint_index_of(spine_array_constraint array, spine_constraint inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Constraint *) inValue); +} + +spine_constraint spine_array_constraint_buffer(spine_array_constraint array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_constraint) _array->buffer(); +} + +spine_array_constraint_data spine_array_constraint_data_create() { + return (spine_array_constraint_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_constraint_data_dispose(spine_array_constraint_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_constraint_data spine_array_constraint_data_get(spine_array_constraint_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_constraint_data) (*_array)[index]; +} + +void spine_array_constraint_data_set(spine_array_constraint_data array, int index, spine_constraint_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (ConstraintData *) value; +} + +void spine_array_constraint_data_clear(spine_array_constraint_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_constraint_data_get_capacity(spine_array_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_constraint_data_size(spine_array_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_constraint_data_ensure_capacity(spine_array_constraint_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_constraint_data_add(spine_array_constraint_data array, spine_constraint_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((ConstraintData *) inValue); +} + +void spine_array_constraint_data_remove_at(spine_array_constraint_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_constraint_data_contains(spine_array_constraint_data array, spine_constraint_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((ConstraintData *) inValue); +} + +int spine_array_constraint_data_index_of(spine_array_constraint_data array, spine_constraint_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((ConstraintData *) inValue); +} + +spine_constraint_data spine_array_constraint_data_buffer(spine_array_constraint_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_constraint_data) _array->buffer(); +} + +spine_array_event spine_array_event_create() { + return (spine_array_event) new (__FILE__, __LINE__) Array(); +} + +void spine_array_event_dispose(spine_array_event array) { + if (!array) return; + delete (Array*) array; +} + +spine_event spine_array_event_get(spine_array_event array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_event) (*_array)[index]; +} + +void spine_array_event_set(spine_array_event array, int index, spine_event value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Event *) value; +} + +void spine_array_event_clear(spine_array_event array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_event_get_capacity(spine_array_event array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_event_size(spine_array_event array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_event_ensure_capacity(spine_array_event array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_event_add(spine_array_event array, spine_event inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Event *) inValue); +} + +void spine_array_event_remove_at(spine_array_event array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_event_contains(spine_array_event array, spine_event inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Event *) inValue); +} + +int spine_array_event_index_of(spine_array_event array, spine_event inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Event *) inValue); +} + +spine_event spine_array_event_buffer(spine_array_event array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_event) _array->buffer(); +} + +spine_array_event_data spine_array_event_data_create() { + return (spine_array_event_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_event_data_dispose(spine_array_event_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_event_data spine_array_event_data_get(spine_array_event_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_event_data) (*_array)[index]; +} + +void spine_array_event_data_set(spine_array_event_data array, int index, spine_event_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (EventData *) value; +} + +void spine_array_event_data_clear(spine_array_event_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_event_data_get_capacity(spine_array_event_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_event_data_size(spine_array_event_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_event_data_ensure_capacity(spine_array_event_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_event_data_add(spine_array_event_data array, spine_event_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((EventData *) inValue); +} + +void spine_array_event_data_remove_at(spine_array_event_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_event_data_contains(spine_array_event_data array, spine_event_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((EventData *) inValue); +} + +int spine_array_event_data_index_of(spine_array_event_data array, spine_event_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((EventData *) inValue); +} + +spine_event_data spine_array_event_data_buffer(spine_array_event_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_event_data) _array->buffer(); +} + +spine_array_float spine_array_float_create() { + return (spine_array_float) new (__FILE__, __LINE__) Array(); +} + +void spine_array_float_dispose(spine_array_float array) { + if (!array) return; + delete (Array*) array; +} + +float spine_array_float_get(spine_array_float array, int index) { + if (!array) return 0; + Array *_array = (Array*) array; + return (*_array)[index]; +} + +void spine_array_float_set(spine_array_float array, int index, float value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = value; +} + +void spine_array_float_clear(spine_array_float array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_float_get_capacity(spine_array_float array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_float_size(spine_array_float array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_float_ensure_capacity(spine_array_float array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_float_add(spine_array_float array, float inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add(inValue); +} + +void spine_array_float_remove_at(spine_array_float array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_float_contains(spine_array_float array, float inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains(inValue); +} + +int spine_array_float_index_of(spine_array_float array, float inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf(inValue); +} + +float *spine_array_float_buffer(spine_array_float array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return _array->buffer(); +} + +spine_array_from_property spine_array_from_property_create() { + return (spine_array_from_property) new (__FILE__, __LINE__) Array(); +} + +void spine_array_from_property_dispose(spine_array_from_property array) { + if (!array) return; + delete (Array*) array; +} + +spine_from_property spine_array_from_property_get(spine_array_from_property array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_from_property) (*_array)[index]; +} + +void spine_array_from_property_set(spine_array_from_property array, int index, spine_from_property value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (class FromProperty *) value; +} + +void spine_array_from_property_clear(spine_array_from_property array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_from_property_get_capacity(spine_array_from_property array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_from_property_size(spine_array_from_property array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_from_property_ensure_capacity(spine_array_from_property array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_from_property_add(spine_array_from_property array, spine_from_property inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((class FromProperty *) inValue); +} + +void spine_array_from_property_remove_at(spine_array_from_property array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_from_property_contains(spine_array_from_property array, spine_from_property inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((class FromProperty *) inValue); +} + +int spine_array_from_property_index_of(spine_array_from_property array, spine_from_property inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((class FromProperty *) inValue); +} + +spine_from_property spine_array_from_property_buffer(spine_array_from_property array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_from_property) _array->buffer(); +} + +spine_array_ik_constraint_data spine_array_ik_constraint_data_create() { + return (spine_array_ik_constraint_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_ik_constraint_data_dispose(spine_array_ik_constraint_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_ik_constraint_data spine_array_ik_constraint_data_get(spine_array_ik_constraint_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_ik_constraint_data) (*_array)[index]; +} + +void spine_array_ik_constraint_data_set(spine_array_ik_constraint_data array, int index, spine_ik_constraint_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (IkConstraintData *) value; +} + +void spine_array_ik_constraint_data_clear(spine_array_ik_constraint_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_ik_constraint_data_get_capacity(spine_array_ik_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_ik_constraint_data_size(spine_array_ik_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_ik_constraint_data_ensure_capacity(spine_array_ik_constraint_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_ik_constraint_data_add(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((IkConstraintData *) inValue); +} + +void spine_array_ik_constraint_data_remove_at(spine_array_ik_constraint_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_ik_constraint_data_contains(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((IkConstraintData *) inValue); +} + +int spine_array_ik_constraint_data_index_of(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((IkConstraintData *) inValue); +} + +spine_ik_constraint_data spine_array_ik_constraint_data_buffer(spine_array_ik_constraint_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_ik_constraint_data) _array->buffer(); +} + +spine_array_int spine_array_int_create() { + return (spine_array_int) new (__FILE__, __LINE__) Array(); +} + +void spine_array_int_dispose(spine_array_int array) { + if (!array) return; + delete (Array*) array; +} + +int spine_array_int_get(spine_array_int array, int index) { + if (!array) return 0; + Array *_array = (Array*) array; + return (*_array)[index]; +} + +void spine_array_int_set(spine_array_int array, int index, int value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = value; +} + +void spine_array_int_clear(spine_array_int array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_int_get_capacity(spine_array_int array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_int_size(spine_array_int array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_int_ensure_capacity(spine_array_int array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_int_add(spine_array_int array, int inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add(inValue); +} + +void spine_array_int_remove_at(spine_array_int array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_int_contains(spine_array_int array, int inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains(inValue); +} + +int spine_array_int_index_of(spine_array_int array, int inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf(inValue); +} + +int *spine_array_int_buffer(spine_array_int array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return _array->buffer(); +} + +spine_array_path_constraint_data spine_array_path_constraint_data_create() { + return (spine_array_path_constraint_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_path_constraint_data_dispose(spine_array_path_constraint_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_path_constraint_data spine_array_path_constraint_data_get(spine_array_path_constraint_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_path_constraint_data) (*_array)[index]; +} + +void spine_array_path_constraint_data_set(spine_array_path_constraint_data array, int index, spine_path_constraint_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (PathConstraintData *) value; +} + +void spine_array_path_constraint_data_clear(spine_array_path_constraint_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_path_constraint_data_get_capacity(spine_array_path_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_path_constraint_data_size(spine_array_path_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_path_constraint_data_ensure_capacity(spine_array_path_constraint_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_path_constraint_data_add(spine_array_path_constraint_data array, spine_path_constraint_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((PathConstraintData *) inValue); +} + +void spine_array_path_constraint_data_remove_at(spine_array_path_constraint_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_path_constraint_data_contains(spine_array_path_constraint_data array, spine_path_constraint_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((PathConstraintData *) inValue); +} + +int spine_array_path_constraint_data_index_of(spine_array_path_constraint_data array, spine_path_constraint_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((PathConstraintData *) inValue); +} + +spine_path_constraint_data spine_array_path_constraint_data_buffer(spine_array_path_constraint_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_path_constraint_data) _array->buffer(); +} + +spine_array_physics_constraint spine_array_physics_constraint_create() { + return (spine_array_physics_constraint) new (__FILE__, __LINE__) Array(); +} + +void spine_array_physics_constraint_dispose(spine_array_physics_constraint array) { + if (!array) return; + delete (Array*) array; +} + +spine_physics_constraint spine_array_physics_constraint_get(spine_array_physics_constraint array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_physics_constraint) (*_array)[index]; +} + +void spine_array_physics_constraint_set(spine_array_physics_constraint array, int index, spine_physics_constraint value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (PhysicsConstraint *) value; +} + +void spine_array_physics_constraint_clear(spine_array_physics_constraint array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_physics_constraint_get_capacity(spine_array_physics_constraint array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_physics_constraint_size(spine_array_physics_constraint array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_physics_constraint_ensure_capacity(spine_array_physics_constraint array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_physics_constraint_add(spine_array_physics_constraint array, spine_physics_constraint inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((PhysicsConstraint *) inValue); +} + +void spine_array_physics_constraint_remove_at(spine_array_physics_constraint array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_physics_constraint_contains(spine_array_physics_constraint array, spine_physics_constraint inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((PhysicsConstraint *) inValue); +} + +int spine_array_physics_constraint_index_of(spine_array_physics_constraint array, spine_physics_constraint inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((PhysicsConstraint *) inValue); +} + +spine_physics_constraint spine_array_physics_constraint_buffer(spine_array_physics_constraint array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_physics_constraint) _array->buffer(); +} + +spine_array_physics_constraint_data spine_array_physics_constraint_data_create() { + return (spine_array_physics_constraint_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_physics_constraint_data_dispose(spine_array_physics_constraint_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_physics_constraint_data spine_array_physics_constraint_data_get(spine_array_physics_constraint_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_physics_constraint_data) (*_array)[index]; +} + +void spine_array_physics_constraint_data_set(spine_array_physics_constraint_data array, int index, spine_physics_constraint_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (PhysicsConstraintData *) value; +} + +void spine_array_physics_constraint_data_clear(spine_array_physics_constraint_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_physics_constraint_data_get_capacity(spine_array_physics_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_physics_constraint_data_size(spine_array_physics_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_physics_constraint_data_ensure_capacity(spine_array_physics_constraint_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_physics_constraint_data_add(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((PhysicsConstraintData *) inValue); +} + +void spine_array_physics_constraint_data_remove_at(spine_array_physics_constraint_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_physics_constraint_data_contains(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((PhysicsConstraintData *) inValue); +} + +int spine_array_physics_constraint_data_index_of(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((PhysicsConstraintData *) inValue); +} + +spine_physics_constraint_data spine_array_physics_constraint_data_buffer(spine_array_physics_constraint_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_physics_constraint_data) _array->buffer(); +} + +spine_array_polygon spine_array_polygon_create() { + return (spine_array_polygon) new (__FILE__, __LINE__) Array(); +} + +void spine_array_polygon_dispose(spine_array_polygon array) { + if (!array) return; + delete (Array*) array; +} + +spine_polygon spine_array_polygon_get(spine_array_polygon array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_polygon) (*_array)[index]; +} + +void spine_array_polygon_set(spine_array_polygon array, int index, spine_polygon value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Polygon *) value; +} + +void spine_array_polygon_clear(spine_array_polygon array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_polygon_get_capacity(spine_array_polygon array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_polygon_size(spine_array_polygon array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_polygon_ensure_capacity(spine_array_polygon array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_polygon_add(spine_array_polygon array, spine_polygon inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Polygon *) inValue); +} + +void spine_array_polygon_remove_at(spine_array_polygon array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_polygon_contains(spine_array_polygon array, spine_polygon inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Polygon *) inValue); +} + +int spine_array_polygon_index_of(spine_array_polygon array, spine_polygon inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Polygon *) inValue); +} + +spine_polygon spine_array_polygon_buffer(spine_array_polygon array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_polygon) _array->buffer(); +} + +spine_array_property_id spine_array_property_id_create() { + return (spine_array_property_id) new (__FILE__, __LINE__) Array(); +} + +void spine_array_property_id_dispose(spine_array_property_id array) { + if (!array) return; + delete (Array*) array; +} + +int64_t spine_array_property_id_get(spine_array_property_id array, int index) { + if (!array) return 0; + Array *_array = (Array*) array; + return (*_array)[index]; +} + +void spine_array_property_id_set(spine_array_property_id array, int index, int64_t value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = value; +} + +void spine_array_property_id_clear(spine_array_property_id array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_property_id_get_capacity(spine_array_property_id array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_property_id_size(spine_array_property_id array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_property_id_ensure_capacity(spine_array_property_id array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_property_id_add(spine_array_property_id array, int64_t inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add(inValue); +} + +void spine_array_property_id_remove_at(spine_array_property_id array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_property_id_contains(spine_array_property_id array, int64_t inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains(inValue); +} + +int spine_array_property_id_index_of(spine_array_property_id array, int64_t inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf(inValue); +} + +int64_t *spine_array_property_id_buffer(spine_array_property_id array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return _array->buffer(); +} + +spine_array_skin spine_array_skin_create() { + return (spine_array_skin) new (__FILE__, __LINE__) Array(); +} + +void spine_array_skin_dispose(spine_array_skin array) { + if (!array) return; + delete (Array*) array; +} + +spine_skin spine_array_skin_get(spine_array_skin array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_skin) (*_array)[index]; +} + +void spine_array_skin_set(spine_array_skin array, int index, spine_skin value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Skin *) value; +} + +void spine_array_skin_clear(spine_array_skin array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_skin_get_capacity(spine_array_skin array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_skin_size(spine_array_skin array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_skin_ensure_capacity(spine_array_skin array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_skin_add(spine_array_skin array, spine_skin inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Skin *) inValue); +} + +void spine_array_skin_remove_at(spine_array_skin array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_skin_contains(spine_array_skin array, spine_skin inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Skin *) inValue); +} + +int spine_array_skin_index_of(spine_array_skin array, spine_skin inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Skin *) inValue); +} + +spine_skin spine_array_skin_buffer(spine_array_skin array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_skin) _array->buffer(); +} + +spine_array_slot spine_array_slot_create() { + return (spine_array_slot) new (__FILE__, __LINE__) Array(); +} + +void spine_array_slot_dispose(spine_array_slot array) { + if (!array) return; + delete (Array*) array; +} + +spine_slot spine_array_slot_get(spine_array_slot array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_slot) (*_array)[index]; +} + +void spine_array_slot_set(spine_array_slot array, int index, spine_slot value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Slot *) value; +} + +void spine_array_slot_clear(spine_array_slot array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_slot_get_capacity(spine_array_slot array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_slot_size(spine_array_slot array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_slot_ensure_capacity(spine_array_slot array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_slot_add(spine_array_slot array, spine_slot inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Slot *) inValue); +} + +void spine_array_slot_remove_at(spine_array_slot array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_slot_contains(spine_array_slot array, spine_slot inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Slot *) inValue); +} + +int spine_array_slot_index_of(spine_array_slot array, spine_slot inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Slot *) inValue); +} + +spine_slot spine_array_slot_buffer(spine_array_slot array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_slot) _array->buffer(); +} + +spine_array_slot_data spine_array_slot_data_create() { + return (spine_array_slot_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_slot_data_dispose(spine_array_slot_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_slot_data spine_array_slot_data_get(spine_array_slot_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_slot_data) (*_array)[index]; +} + +void spine_array_slot_data_set(spine_array_slot_data array, int index, spine_slot_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (SlotData *) value; +} + +void spine_array_slot_data_clear(spine_array_slot_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_slot_data_get_capacity(spine_array_slot_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_slot_data_size(spine_array_slot_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_slot_data_ensure_capacity(spine_array_slot_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_slot_data_add(spine_array_slot_data array, spine_slot_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((SlotData *) inValue); +} + +void spine_array_slot_data_remove_at(spine_array_slot_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_slot_data_contains(spine_array_slot_data array, spine_slot_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((SlotData *) inValue); +} + +int spine_array_slot_data_index_of(spine_array_slot_data array, spine_slot_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((SlotData *) inValue); +} + +spine_slot_data spine_array_slot_data_buffer(spine_array_slot_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_slot_data) _array->buffer(); +} + +spine_array_texture_region spine_array_texture_region_create() { + return (spine_array_texture_region) new (__FILE__, __LINE__) Array(); +} + +void spine_array_texture_region_dispose(spine_array_texture_region array) { + if (!array) return; + delete (Array*) array; +} + +spine_texture_region spine_array_texture_region_get(spine_array_texture_region array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_texture_region) (*_array)[index]; +} + +void spine_array_texture_region_set(spine_array_texture_region array, int index, spine_texture_region value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (TextureRegion *) value; +} + +void spine_array_texture_region_clear(spine_array_texture_region array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_texture_region_get_capacity(spine_array_texture_region array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_texture_region_size(spine_array_texture_region array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_texture_region_ensure_capacity(spine_array_texture_region array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_texture_region_add(spine_array_texture_region array, spine_texture_region inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((TextureRegion *) inValue); +} + +void spine_array_texture_region_remove_at(spine_array_texture_region array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_texture_region_contains(spine_array_texture_region array, spine_texture_region inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((TextureRegion *) inValue); +} + +int spine_array_texture_region_index_of(spine_array_texture_region array, spine_texture_region inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((TextureRegion *) inValue); +} + +spine_texture_region spine_array_texture_region_buffer(spine_array_texture_region array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_texture_region) _array->buffer(); +} + +spine_array_timeline spine_array_timeline_create() { + return (spine_array_timeline) new (__FILE__, __LINE__) Array(); +} + +void spine_array_timeline_dispose(spine_array_timeline array) { + if (!array) return; + delete (Array*) array; +} + +spine_timeline spine_array_timeline_get(spine_array_timeline array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_timeline) (*_array)[index]; +} + +void spine_array_timeline_set(spine_array_timeline array, int index, spine_timeline value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Timeline *) value; +} + +void spine_array_timeline_clear(spine_array_timeline array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_timeline_get_capacity(spine_array_timeline array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_timeline_size(spine_array_timeline array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_timeline_ensure_capacity(spine_array_timeline array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_timeline_add(spine_array_timeline array, spine_timeline inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Timeline *) inValue); +} + +void spine_array_timeline_remove_at(spine_array_timeline array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_timeline_contains(spine_array_timeline array, spine_timeline inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Timeline *) inValue); +} + +int spine_array_timeline_index_of(spine_array_timeline array, spine_timeline inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Timeline *) inValue); +} + +spine_timeline spine_array_timeline_buffer(spine_array_timeline array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_timeline) _array->buffer(); +} + +spine_array_to_property spine_array_to_property_create() { + return (spine_array_to_property) new (__FILE__, __LINE__) Array(); +} + +void spine_array_to_property_dispose(spine_array_to_property array) { + if (!array) return; + delete (Array*) array; +} + +spine_to_property spine_array_to_property_get(spine_array_to_property array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_to_property) (*_array)[index]; +} + +void spine_array_to_property_set(spine_array_to_property array, int index, spine_to_property value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (class ToProperty *) value; +} + +void spine_array_to_property_clear(spine_array_to_property array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_to_property_get_capacity(spine_array_to_property array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_to_property_size(spine_array_to_property array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_to_property_ensure_capacity(spine_array_to_property array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_to_property_add(spine_array_to_property array, spine_to_property inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((class ToProperty *) inValue); +} + +void spine_array_to_property_remove_at(spine_array_to_property array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_to_property_contains(spine_array_to_property array, spine_to_property inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((class ToProperty *) inValue); +} + +int spine_array_to_property_index_of(spine_array_to_property array, spine_to_property inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((class ToProperty *) inValue); +} + +spine_to_property spine_array_to_property_buffer(spine_array_to_property array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_to_property) _array->buffer(); +} + +spine_array_track_entry spine_array_track_entry_create() { + return (spine_array_track_entry) new (__FILE__, __LINE__) Array(); +} + +void spine_array_track_entry_dispose(spine_array_track_entry array) { + if (!array) return; + delete (Array*) array; +} + +spine_track_entry spine_array_track_entry_get(spine_array_track_entry array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_track_entry) (*_array)[index]; +} + +void spine_array_track_entry_set(spine_array_track_entry array, int index, spine_track_entry value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (TrackEntry *) value; +} + +void spine_array_track_entry_clear(spine_array_track_entry array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_track_entry_get_capacity(spine_array_track_entry array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_track_entry_size(spine_array_track_entry array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_track_entry_ensure_capacity(spine_array_track_entry array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_track_entry_add(spine_array_track_entry array, spine_track_entry inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((TrackEntry *) inValue); +} + +void spine_array_track_entry_remove_at(spine_array_track_entry array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_track_entry_contains(spine_array_track_entry array, spine_track_entry inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((TrackEntry *) inValue); +} + +int spine_array_track_entry_index_of(spine_array_track_entry array, spine_track_entry inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((TrackEntry *) inValue); +} + +spine_track_entry spine_array_track_entry_buffer(spine_array_track_entry array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_track_entry) _array->buffer(); +} + +spine_array_transform_constraint_data spine_array_transform_constraint_data_create() { + return (spine_array_transform_constraint_data) new (__FILE__, __LINE__) Array(); +} + +void spine_array_transform_constraint_data_dispose(spine_array_transform_constraint_data array) { + if (!array) return; + delete (Array*) array; +} + +spine_transform_constraint_data spine_array_transform_constraint_data_get(spine_array_transform_constraint_data array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_transform_constraint_data) (*_array)[index]; +} + +void spine_array_transform_constraint_data_set(spine_array_transform_constraint_data array, int index, spine_transform_constraint_data value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (TransformConstraintData *) value; +} + +void spine_array_transform_constraint_data_clear(spine_array_transform_constraint_data array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_transform_constraint_data_get_capacity(spine_array_transform_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_transform_constraint_data_size(spine_array_transform_constraint_data array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_transform_constraint_data_ensure_capacity(spine_array_transform_constraint_data array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_transform_constraint_data_add(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((TransformConstraintData *) inValue); +} + +void spine_array_transform_constraint_data_remove_at(spine_array_transform_constraint_data array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_transform_constraint_data_contains(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((TransformConstraintData *) inValue); +} + +int spine_array_transform_constraint_data_index_of(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((TransformConstraintData *) inValue); +} + +spine_transform_constraint_data spine_array_transform_constraint_data_buffer(spine_array_transform_constraint_data array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_transform_constraint_data) _array->buffer(); +} + +spine_array_unsigned_short spine_array_unsigned_short_create() { + return (spine_array_unsigned_short) new (__FILE__, __LINE__) Array(); +} + +void spine_array_unsigned_short_dispose(spine_array_unsigned_short array) { + if (!array) return; + delete (Array*) array; +} + +unsigned short spine_array_unsigned_short_get(spine_array_unsigned_short array, int index) { + if (!array) return 0; + Array *_array = (Array*) array; + return (*_array)[index]; +} + +void spine_array_unsigned_short_set(spine_array_unsigned_short array, int index, unsigned short value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = value; +} + +void spine_array_unsigned_short_clear(spine_array_unsigned_short array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_unsigned_short_get_capacity(spine_array_unsigned_short array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_unsigned_short_size(spine_array_unsigned_short array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_unsigned_short_ensure_capacity(spine_array_unsigned_short array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_unsigned_short_add(spine_array_unsigned_short array, unsigned short inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add(inValue); +} + +void spine_array_unsigned_short_remove_at(spine_array_unsigned_short array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_unsigned_short_contains(spine_array_unsigned_short array, unsigned short inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains(inValue); +} + +int spine_array_unsigned_short_index_of(spine_array_unsigned_short array, unsigned short inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf(inValue); +} + +unsigned short *spine_array_unsigned_short_buffer(spine_array_unsigned_short array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return _array->buffer(); +} + +spine_array_update spine_array_update_create() { + return (spine_array_update) new (__FILE__, __LINE__) Array(); +} + +void spine_array_update_dispose(spine_array_update array) { + if (!array) return; + delete (Array*) array; +} + +spine_update spine_array_update_get(spine_array_update array, int index) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_update) (*_array)[index]; +} + +void spine_array_update_set(spine_array_update array, int index, spine_update value) { + if (!array) return; + Array *_array = (Array*) array; + (*_array)[index] = (Update *) value; +} + +void spine_array_update_clear(spine_array_update array) { + if (!array) return; + Array *_array = (Array*) array; + _array->clear(); +} + +size_t spine_array_update_get_capacity(spine_array_update array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->getCapacity(); +} + +size_t spine_array_update_size(spine_array_update array) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->size(); +} + +void spine_array_update_ensure_capacity(spine_array_update array, size_t newCapacity) { + if (!array) return; + Array *_array = (Array*) array; + _array->ensureCapacity(newCapacity); +} + +void spine_array_update_add(spine_array_update array, spine_update inValue) { + if (!array) return; + Array *_array = (Array*) array; + _array->add((Update *) inValue); +} + +void spine_array_update_remove_at(spine_array_update array, size_t inIndex) { + if (!array) return; + Array *_array = (Array*) array; + _array->removeAt(inIndex); +} + +bool spine_array_update_contains(spine_array_update array, spine_update inValue) { + if (!array) return false; + Array *_array = (Array*) array; + return _array->contains((Update *) inValue); +} + +int spine_array_update_index_of(spine_array_update array, spine_update inValue) { + if (!array) return 0; + Array *_array = (Array*) array; + return _array->indexOf((Update *) inValue); +} + +spine_update spine_array_update_buffer(spine_array_update array) { + if (!array) return nullptr; + Array *_array = (Array*) array; + return (spine_update) _array->buffer(); +} diff --git a/spine-c-new/src/generated/arrays.h b/spine-c-new/src/generated/arrays.h new file mode 100644 index 000000000..1a2194e2c --- /dev/null +++ b/spine-c-new/src/generated/arrays.h @@ -0,0 +1,569 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated April 5, 2025. Replaces all prior versions. + * + * Copyright (c) 2013-2025, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_C_ARRAYS_H +#define SPINE_C_ARRAYS_H + +#include "../base.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Array +SPINE_OPAQUE_TYPE(spine_array_animation) + +SPINE_C_EXPORT spine_array_animation spine_array_animation_create(); +SPINE_C_EXPORT void spine_array_animation_dispose(spine_array_animation array); +SPINE_C_EXPORT spine_animation spine_array_animation_get(spine_array_animation array, int index); +SPINE_C_EXPORT void spine_array_animation_set(spine_array_animation array, int index, spine_animation value); +SPINE_C_EXPORT void spine_array_animation_clear(spine_array_animation array); +SPINE_C_EXPORT size_t spine_array_animation_get_capacity(spine_array_animation array); +SPINE_C_EXPORT size_t spine_array_animation_size(spine_array_animation array); +SPINE_C_EXPORT void spine_array_animation_ensure_capacity(spine_array_animation array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_animation_add(spine_array_animation array, spine_animation inValue); +SPINE_C_EXPORT void spine_array_animation_remove_at(spine_array_animation array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_animation_contains(spine_array_animation array, spine_animation inValue); +SPINE_C_EXPORT int spine_array_animation_index_of(spine_array_animation array, spine_animation inValue); +SPINE_C_EXPORT spine_animation spine_array_animation_buffer(spine_array_animation array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_atlas_page) + +SPINE_C_EXPORT spine_array_atlas_page spine_array_atlas_page_create(); +SPINE_C_EXPORT void spine_array_atlas_page_dispose(spine_array_atlas_page array); +SPINE_C_EXPORT spine_atlas_page spine_array_atlas_page_get(spine_array_atlas_page array, int index); +SPINE_C_EXPORT void spine_array_atlas_page_set(spine_array_atlas_page array, int index, spine_atlas_page value); +SPINE_C_EXPORT void spine_array_atlas_page_clear(spine_array_atlas_page array); +SPINE_C_EXPORT size_t spine_array_atlas_page_get_capacity(spine_array_atlas_page array); +SPINE_C_EXPORT size_t spine_array_atlas_page_size(spine_array_atlas_page array); +SPINE_C_EXPORT void spine_array_atlas_page_ensure_capacity(spine_array_atlas_page array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_atlas_page_add(spine_array_atlas_page array, spine_atlas_page inValue); +SPINE_C_EXPORT void spine_array_atlas_page_remove_at(spine_array_atlas_page array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_atlas_page_contains(spine_array_atlas_page array, spine_atlas_page inValue); +SPINE_C_EXPORT int spine_array_atlas_page_index_of(spine_array_atlas_page array, spine_atlas_page inValue); +SPINE_C_EXPORT spine_atlas_page spine_array_atlas_page_buffer(spine_array_atlas_page array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_atlas_region) + +SPINE_C_EXPORT spine_array_atlas_region spine_array_atlas_region_create(); +SPINE_C_EXPORT void spine_array_atlas_region_dispose(spine_array_atlas_region array); +SPINE_C_EXPORT spine_atlas_region spine_array_atlas_region_get(spine_array_atlas_region array, int index); +SPINE_C_EXPORT void spine_array_atlas_region_set(spine_array_atlas_region array, int index, spine_atlas_region value); +SPINE_C_EXPORT void spine_array_atlas_region_clear(spine_array_atlas_region array); +SPINE_C_EXPORT size_t spine_array_atlas_region_get_capacity(spine_array_atlas_region array); +SPINE_C_EXPORT size_t spine_array_atlas_region_size(spine_array_atlas_region array); +SPINE_C_EXPORT void spine_array_atlas_region_ensure_capacity(spine_array_atlas_region array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_atlas_region_add(spine_array_atlas_region array, spine_atlas_region inValue); +SPINE_C_EXPORT void spine_array_atlas_region_remove_at(spine_array_atlas_region array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_atlas_region_contains(spine_array_atlas_region array, spine_atlas_region inValue); +SPINE_C_EXPORT int spine_array_atlas_region_index_of(spine_array_atlas_region array, spine_atlas_region inValue); +SPINE_C_EXPORT spine_atlas_region spine_array_atlas_region_buffer(spine_array_atlas_region array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_attachment) + +SPINE_C_EXPORT spine_array_attachment spine_array_attachment_create(); +SPINE_C_EXPORT void spine_array_attachment_dispose(spine_array_attachment array); +SPINE_C_EXPORT spine_attachment spine_array_attachment_get(spine_array_attachment array, int index); +SPINE_C_EXPORT void spine_array_attachment_set(spine_array_attachment array, int index, spine_attachment value); +SPINE_C_EXPORT void spine_array_attachment_clear(spine_array_attachment array); +SPINE_C_EXPORT size_t spine_array_attachment_get_capacity(spine_array_attachment array); +SPINE_C_EXPORT size_t spine_array_attachment_size(spine_array_attachment array); +SPINE_C_EXPORT void spine_array_attachment_ensure_capacity(spine_array_attachment array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_attachment_add(spine_array_attachment array, spine_attachment inValue); +SPINE_C_EXPORT void spine_array_attachment_remove_at(spine_array_attachment array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_attachment_contains(spine_array_attachment array, spine_attachment inValue); +SPINE_C_EXPORT int spine_array_attachment_index_of(spine_array_attachment array, spine_attachment inValue); +SPINE_C_EXPORT spine_attachment spine_array_attachment_buffer(spine_array_attachment array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_bone) + +SPINE_C_EXPORT spine_array_bone spine_array_bone_create(); +SPINE_C_EXPORT void spine_array_bone_dispose(spine_array_bone array); +SPINE_C_EXPORT spine_bone spine_array_bone_get(spine_array_bone array, int index); +SPINE_C_EXPORT void spine_array_bone_set(spine_array_bone array, int index, spine_bone value); +SPINE_C_EXPORT void spine_array_bone_clear(spine_array_bone array); +SPINE_C_EXPORT size_t spine_array_bone_get_capacity(spine_array_bone array); +SPINE_C_EXPORT size_t spine_array_bone_size(spine_array_bone array); +SPINE_C_EXPORT void spine_array_bone_ensure_capacity(spine_array_bone array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_bone_add(spine_array_bone array, spine_bone inValue); +SPINE_C_EXPORT void spine_array_bone_remove_at(spine_array_bone array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_bone_contains(spine_array_bone array, spine_bone inValue); +SPINE_C_EXPORT int spine_array_bone_index_of(spine_array_bone array, spine_bone inValue); +SPINE_C_EXPORT spine_bone spine_array_bone_buffer(spine_array_bone array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_bone_data) + +SPINE_C_EXPORT spine_array_bone_data spine_array_bone_data_create(); +SPINE_C_EXPORT void spine_array_bone_data_dispose(spine_array_bone_data array); +SPINE_C_EXPORT spine_bone_data spine_array_bone_data_get(spine_array_bone_data array, int index); +SPINE_C_EXPORT void spine_array_bone_data_set(spine_array_bone_data array, int index, spine_bone_data value); +SPINE_C_EXPORT void spine_array_bone_data_clear(spine_array_bone_data array); +SPINE_C_EXPORT size_t spine_array_bone_data_get_capacity(spine_array_bone_data array); +SPINE_C_EXPORT size_t spine_array_bone_data_size(spine_array_bone_data array); +SPINE_C_EXPORT void spine_array_bone_data_ensure_capacity(spine_array_bone_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_bone_data_add(spine_array_bone_data array, spine_bone_data inValue); +SPINE_C_EXPORT void spine_array_bone_data_remove_at(spine_array_bone_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_bone_data_contains(spine_array_bone_data array, spine_bone_data inValue); +SPINE_C_EXPORT int spine_array_bone_data_index_of(spine_array_bone_data array, spine_bone_data inValue); +SPINE_C_EXPORT spine_bone_data spine_array_bone_data_buffer(spine_array_bone_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_bone_pose) + +SPINE_C_EXPORT spine_array_bone_pose spine_array_bone_pose_create(); +SPINE_C_EXPORT void spine_array_bone_pose_dispose(spine_array_bone_pose array); +SPINE_C_EXPORT spine_bone_pose spine_array_bone_pose_get(spine_array_bone_pose array, int index); +SPINE_C_EXPORT void spine_array_bone_pose_set(spine_array_bone_pose array, int index, spine_bone_pose value); +SPINE_C_EXPORT void spine_array_bone_pose_clear(spine_array_bone_pose array); +SPINE_C_EXPORT size_t spine_array_bone_pose_get_capacity(spine_array_bone_pose array); +SPINE_C_EXPORT size_t spine_array_bone_pose_size(spine_array_bone_pose array); +SPINE_C_EXPORT void spine_array_bone_pose_ensure_capacity(spine_array_bone_pose array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_bone_pose_add(spine_array_bone_pose array, spine_bone_pose inValue); +SPINE_C_EXPORT void spine_array_bone_pose_remove_at(spine_array_bone_pose array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_bone_pose_contains(spine_array_bone_pose array, spine_bone_pose inValue); +SPINE_C_EXPORT int spine_array_bone_pose_index_of(spine_array_bone_pose array, spine_bone_pose inValue); +SPINE_C_EXPORT spine_bone_pose spine_array_bone_pose_buffer(spine_array_bone_pose array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_bounding_box_attachment) + +SPINE_C_EXPORT spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create(); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_dispose(spine_array_bounding_box_attachment array); +SPINE_C_EXPORT spine_bounding_box_attachment spine_array_bounding_box_attachment_get(spine_array_bounding_box_attachment array, int index); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_set(spine_array_bounding_box_attachment array, int index, spine_bounding_box_attachment value); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_clear(spine_array_bounding_box_attachment array); +SPINE_C_EXPORT size_t spine_array_bounding_box_attachment_get_capacity(spine_array_bounding_box_attachment array); +SPINE_C_EXPORT size_t spine_array_bounding_box_attachment_size(spine_array_bounding_box_attachment array); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_ensure_capacity(spine_array_bounding_box_attachment array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_add(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); +SPINE_C_EXPORT void spine_array_bounding_box_attachment_remove_at(spine_array_bounding_box_attachment array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_bounding_box_attachment_contains(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); +SPINE_C_EXPORT int spine_array_bounding_box_attachment_index_of(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); +SPINE_C_EXPORT spine_bounding_box_attachment spine_array_bounding_box_attachment_buffer(spine_array_bounding_box_attachment array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_constraint) + +SPINE_C_EXPORT spine_array_constraint spine_array_constraint_create(); +SPINE_C_EXPORT void spine_array_constraint_dispose(spine_array_constraint array); +SPINE_C_EXPORT spine_constraint spine_array_constraint_get(spine_array_constraint array, int index); +SPINE_C_EXPORT void spine_array_constraint_set(spine_array_constraint array, int index, spine_constraint value); +SPINE_C_EXPORT void spine_array_constraint_clear(spine_array_constraint array); +SPINE_C_EXPORT size_t spine_array_constraint_get_capacity(spine_array_constraint array); +SPINE_C_EXPORT size_t spine_array_constraint_size(spine_array_constraint array); +SPINE_C_EXPORT void spine_array_constraint_ensure_capacity(spine_array_constraint array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_constraint_add(spine_array_constraint array, spine_constraint inValue); +SPINE_C_EXPORT void spine_array_constraint_remove_at(spine_array_constraint array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_constraint_contains(spine_array_constraint array, spine_constraint inValue); +SPINE_C_EXPORT int spine_array_constraint_index_of(spine_array_constraint array, spine_constraint inValue); +SPINE_C_EXPORT spine_constraint spine_array_constraint_buffer(spine_array_constraint array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_constraint_data) + +SPINE_C_EXPORT spine_array_constraint_data spine_array_constraint_data_create(); +SPINE_C_EXPORT void spine_array_constraint_data_dispose(spine_array_constraint_data array); +SPINE_C_EXPORT spine_constraint_data spine_array_constraint_data_get(spine_array_constraint_data array, int index); +SPINE_C_EXPORT void spine_array_constraint_data_set(spine_array_constraint_data array, int index, spine_constraint_data value); +SPINE_C_EXPORT void spine_array_constraint_data_clear(spine_array_constraint_data array); +SPINE_C_EXPORT size_t spine_array_constraint_data_get_capacity(spine_array_constraint_data array); +SPINE_C_EXPORT size_t spine_array_constraint_data_size(spine_array_constraint_data array); +SPINE_C_EXPORT void spine_array_constraint_data_ensure_capacity(spine_array_constraint_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_constraint_data_add(spine_array_constraint_data array, spine_constraint_data inValue); +SPINE_C_EXPORT void spine_array_constraint_data_remove_at(spine_array_constraint_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_constraint_data_contains(spine_array_constraint_data array, spine_constraint_data inValue); +SPINE_C_EXPORT int spine_array_constraint_data_index_of(spine_array_constraint_data array, spine_constraint_data inValue); +SPINE_C_EXPORT spine_constraint_data spine_array_constraint_data_buffer(spine_array_constraint_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_event) + +SPINE_C_EXPORT spine_array_event spine_array_event_create(); +SPINE_C_EXPORT void spine_array_event_dispose(spine_array_event array); +SPINE_C_EXPORT spine_event spine_array_event_get(spine_array_event array, int index); +SPINE_C_EXPORT void spine_array_event_set(spine_array_event array, int index, spine_event value); +SPINE_C_EXPORT void spine_array_event_clear(spine_array_event array); +SPINE_C_EXPORT size_t spine_array_event_get_capacity(spine_array_event array); +SPINE_C_EXPORT size_t spine_array_event_size(spine_array_event array); +SPINE_C_EXPORT void spine_array_event_ensure_capacity(spine_array_event array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_event_add(spine_array_event array, spine_event inValue); +SPINE_C_EXPORT void spine_array_event_remove_at(spine_array_event array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_event_contains(spine_array_event array, spine_event inValue); +SPINE_C_EXPORT int spine_array_event_index_of(spine_array_event array, spine_event inValue); +SPINE_C_EXPORT spine_event spine_array_event_buffer(spine_array_event array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_event_data) + +SPINE_C_EXPORT spine_array_event_data spine_array_event_data_create(); +SPINE_C_EXPORT void spine_array_event_data_dispose(spine_array_event_data array); +SPINE_C_EXPORT spine_event_data spine_array_event_data_get(spine_array_event_data array, int index); +SPINE_C_EXPORT void spine_array_event_data_set(spine_array_event_data array, int index, spine_event_data value); +SPINE_C_EXPORT void spine_array_event_data_clear(spine_array_event_data array); +SPINE_C_EXPORT size_t spine_array_event_data_get_capacity(spine_array_event_data array); +SPINE_C_EXPORT size_t spine_array_event_data_size(spine_array_event_data array); +SPINE_C_EXPORT void spine_array_event_data_ensure_capacity(spine_array_event_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_event_data_add(spine_array_event_data array, spine_event_data inValue); +SPINE_C_EXPORT void spine_array_event_data_remove_at(spine_array_event_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_event_data_contains(spine_array_event_data array, spine_event_data inValue); +SPINE_C_EXPORT int spine_array_event_data_index_of(spine_array_event_data array, spine_event_data inValue); +SPINE_C_EXPORT spine_event_data spine_array_event_data_buffer(spine_array_event_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_float) + +SPINE_C_EXPORT spine_array_float spine_array_float_create(); +SPINE_C_EXPORT void spine_array_float_dispose(spine_array_float array); +SPINE_C_EXPORT float spine_array_float_get(spine_array_float array, int index); +SPINE_C_EXPORT void spine_array_float_set(spine_array_float array, int index, float value); +SPINE_C_EXPORT void spine_array_float_clear(spine_array_float array); +SPINE_C_EXPORT size_t spine_array_float_get_capacity(spine_array_float array); +SPINE_C_EXPORT size_t spine_array_float_size(spine_array_float array); +SPINE_C_EXPORT void spine_array_float_ensure_capacity(spine_array_float array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_float_add(spine_array_float array, float inValue); +SPINE_C_EXPORT void spine_array_float_remove_at(spine_array_float array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_float_contains(spine_array_float array, float inValue); +SPINE_C_EXPORT int spine_array_float_index_of(spine_array_float array, float inValue); +SPINE_C_EXPORT float *spine_array_float_buffer(spine_array_float array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_from_property) + +SPINE_C_EXPORT spine_array_from_property spine_array_from_property_create(); +SPINE_C_EXPORT void spine_array_from_property_dispose(spine_array_from_property array); +SPINE_C_EXPORT spine_from_property spine_array_from_property_get(spine_array_from_property array, int index); +SPINE_C_EXPORT void spine_array_from_property_set(spine_array_from_property array, int index, spine_from_property value); +SPINE_C_EXPORT void spine_array_from_property_clear(spine_array_from_property array); +SPINE_C_EXPORT size_t spine_array_from_property_get_capacity(spine_array_from_property array); +SPINE_C_EXPORT size_t spine_array_from_property_size(spine_array_from_property array); +SPINE_C_EXPORT void spine_array_from_property_ensure_capacity(spine_array_from_property array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_from_property_add(spine_array_from_property array, spine_from_property inValue); +SPINE_C_EXPORT void spine_array_from_property_remove_at(spine_array_from_property array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_from_property_contains(spine_array_from_property array, spine_from_property inValue); +SPINE_C_EXPORT int spine_array_from_property_index_of(spine_array_from_property array, spine_from_property inValue); +SPINE_C_EXPORT spine_from_property spine_array_from_property_buffer(spine_array_from_property array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_ik_constraint_data) + +SPINE_C_EXPORT spine_array_ik_constraint_data spine_array_ik_constraint_data_create(); +SPINE_C_EXPORT void spine_array_ik_constraint_data_dispose(spine_array_ik_constraint_data array); +SPINE_C_EXPORT spine_ik_constraint_data spine_array_ik_constraint_data_get(spine_array_ik_constraint_data array, int index); +SPINE_C_EXPORT void spine_array_ik_constraint_data_set(spine_array_ik_constraint_data array, int index, spine_ik_constraint_data value); +SPINE_C_EXPORT void spine_array_ik_constraint_data_clear(spine_array_ik_constraint_data array); +SPINE_C_EXPORT size_t spine_array_ik_constraint_data_get_capacity(spine_array_ik_constraint_data array); +SPINE_C_EXPORT size_t spine_array_ik_constraint_data_size(spine_array_ik_constraint_data array); +SPINE_C_EXPORT void spine_array_ik_constraint_data_ensure_capacity(spine_array_ik_constraint_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_ik_constraint_data_add(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); +SPINE_C_EXPORT void spine_array_ik_constraint_data_remove_at(spine_array_ik_constraint_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_ik_constraint_data_contains(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); +SPINE_C_EXPORT int spine_array_ik_constraint_data_index_of(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); +SPINE_C_EXPORT spine_ik_constraint_data spine_array_ik_constraint_data_buffer(spine_array_ik_constraint_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_int) + +SPINE_C_EXPORT spine_array_int spine_array_int_create(); +SPINE_C_EXPORT void spine_array_int_dispose(spine_array_int array); +SPINE_C_EXPORT int spine_array_int_get(spine_array_int array, int index); +SPINE_C_EXPORT void spine_array_int_set(spine_array_int array, int index, int value); +SPINE_C_EXPORT void spine_array_int_clear(spine_array_int array); +SPINE_C_EXPORT size_t spine_array_int_get_capacity(spine_array_int array); +SPINE_C_EXPORT size_t spine_array_int_size(spine_array_int array); +SPINE_C_EXPORT void spine_array_int_ensure_capacity(spine_array_int array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_int_add(spine_array_int array, int inValue); +SPINE_C_EXPORT void spine_array_int_remove_at(spine_array_int array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_int_contains(spine_array_int array, int inValue); +SPINE_C_EXPORT int spine_array_int_index_of(spine_array_int array, int inValue); +SPINE_C_EXPORT int *spine_array_int_buffer(spine_array_int array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_path_constraint_data) + +SPINE_C_EXPORT spine_array_path_constraint_data spine_array_path_constraint_data_create(); +SPINE_C_EXPORT void spine_array_path_constraint_data_dispose(spine_array_path_constraint_data array); +SPINE_C_EXPORT spine_path_constraint_data spine_array_path_constraint_data_get(spine_array_path_constraint_data array, int index); +SPINE_C_EXPORT void spine_array_path_constraint_data_set(spine_array_path_constraint_data array, int index, spine_path_constraint_data value); +SPINE_C_EXPORT void spine_array_path_constraint_data_clear(spine_array_path_constraint_data array); +SPINE_C_EXPORT size_t spine_array_path_constraint_data_get_capacity(spine_array_path_constraint_data array); +SPINE_C_EXPORT size_t spine_array_path_constraint_data_size(spine_array_path_constraint_data array); +SPINE_C_EXPORT void spine_array_path_constraint_data_ensure_capacity(spine_array_path_constraint_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_path_constraint_data_add(spine_array_path_constraint_data array, spine_path_constraint_data inValue); +SPINE_C_EXPORT void spine_array_path_constraint_data_remove_at(spine_array_path_constraint_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_path_constraint_data_contains(spine_array_path_constraint_data array, spine_path_constraint_data inValue); +SPINE_C_EXPORT int spine_array_path_constraint_data_index_of(spine_array_path_constraint_data array, spine_path_constraint_data inValue); +SPINE_C_EXPORT spine_path_constraint_data spine_array_path_constraint_data_buffer(spine_array_path_constraint_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_physics_constraint) + +SPINE_C_EXPORT spine_array_physics_constraint spine_array_physics_constraint_create(); +SPINE_C_EXPORT void spine_array_physics_constraint_dispose(spine_array_physics_constraint array); +SPINE_C_EXPORT spine_physics_constraint spine_array_physics_constraint_get(spine_array_physics_constraint array, int index); +SPINE_C_EXPORT void spine_array_physics_constraint_set(spine_array_physics_constraint array, int index, spine_physics_constraint value); +SPINE_C_EXPORT void spine_array_physics_constraint_clear(spine_array_physics_constraint array); +SPINE_C_EXPORT size_t spine_array_physics_constraint_get_capacity(spine_array_physics_constraint array); +SPINE_C_EXPORT size_t spine_array_physics_constraint_size(spine_array_physics_constraint array); +SPINE_C_EXPORT void spine_array_physics_constraint_ensure_capacity(spine_array_physics_constraint array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_physics_constraint_add(spine_array_physics_constraint array, spine_physics_constraint inValue); +SPINE_C_EXPORT void spine_array_physics_constraint_remove_at(spine_array_physics_constraint array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_physics_constraint_contains(spine_array_physics_constraint array, spine_physics_constraint inValue); +SPINE_C_EXPORT int spine_array_physics_constraint_index_of(spine_array_physics_constraint array, spine_physics_constraint inValue); +SPINE_C_EXPORT spine_physics_constraint spine_array_physics_constraint_buffer(spine_array_physics_constraint array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_physics_constraint_data) + +SPINE_C_EXPORT spine_array_physics_constraint_data spine_array_physics_constraint_data_create(); +SPINE_C_EXPORT void spine_array_physics_constraint_data_dispose(spine_array_physics_constraint_data array); +SPINE_C_EXPORT spine_physics_constraint_data spine_array_physics_constraint_data_get(spine_array_physics_constraint_data array, int index); +SPINE_C_EXPORT void spine_array_physics_constraint_data_set(spine_array_physics_constraint_data array, int index, spine_physics_constraint_data value); +SPINE_C_EXPORT void spine_array_physics_constraint_data_clear(spine_array_physics_constraint_data array); +SPINE_C_EXPORT size_t spine_array_physics_constraint_data_get_capacity(spine_array_physics_constraint_data array); +SPINE_C_EXPORT size_t spine_array_physics_constraint_data_size(spine_array_physics_constraint_data array); +SPINE_C_EXPORT void spine_array_physics_constraint_data_ensure_capacity(spine_array_physics_constraint_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_physics_constraint_data_add(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); +SPINE_C_EXPORT void spine_array_physics_constraint_data_remove_at(spine_array_physics_constraint_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_physics_constraint_data_contains(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); +SPINE_C_EXPORT int spine_array_physics_constraint_data_index_of(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); +SPINE_C_EXPORT spine_physics_constraint_data spine_array_physics_constraint_data_buffer(spine_array_physics_constraint_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_polygon) + +SPINE_C_EXPORT spine_array_polygon spine_array_polygon_create(); +SPINE_C_EXPORT void spine_array_polygon_dispose(spine_array_polygon array); +SPINE_C_EXPORT spine_polygon spine_array_polygon_get(spine_array_polygon array, int index); +SPINE_C_EXPORT void spine_array_polygon_set(spine_array_polygon array, int index, spine_polygon value); +SPINE_C_EXPORT void spine_array_polygon_clear(spine_array_polygon array); +SPINE_C_EXPORT size_t spine_array_polygon_get_capacity(spine_array_polygon array); +SPINE_C_EXPORT size_t spine_array_polygon_size(spine_array_polygon array); +SPINE_C_EXPORT void spine_array_polygon_ensure_capacity(spine_array_polygon array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_polygon_add(spine_array_polygon array, spine_polygon inValue); +SPINE_C_EXPORT void spine_array_polygon_remove_at(spine_array_polygon array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_polygon_contains(spine_array_polygon array, spine_polygon inValue); +SPINE_C_EXPORT int spine_array_polygon_index_of(spine_array_polygon array, spine_polygon inValue); +SPINE_C_EXPORT spine_polygon spine_array_polygon_buffer(spine_array_polygon array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_property_id) + +SPINE_C_EXPORT spine_array_property_id spine_array_property_id_create(); +SPINE_C_EXPORT void spine_array_property_id_dispose(spine_array_property_id array); +SPINE_C_EXPORT int64_t spine_array_property_id_get(spine_array_property_id array, int index); +SPINE_C_EXPORT void spine_array_property_id_set(spine_array_property_id array, int index, int64_t value); +SPINE_C_EXPORT void spine_array_property_id_clear(spine_array_property_id array); +SPINE_C_EXPORT size_t spine_array_property_id_get_capacity(spine_array_property_id array); +SPINE_C_EXPORT size_t spine_array_property_id_size(spine_array_property_id array); +SPINE_C_EXPORT void spine_array_property_id_ensure_capacity(spine_array_property_id array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_property_id_add(spine_array_property_id array, int64_t inValue); +SPINE_C_EXPORT void spine_array_property_id_remove_at(spine_array_property_id array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_property_id_contains(spine_array_property_id array, int64_t inValue); +SPINE_C_EXPORT int spine_array_property_id_index_of(spine_array_property_id array, int64_t inValue); +SPINE_C_EXPORT int64_t *spine_array_property_id_buffer(spine_array_property_id array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_skin) + +SPINE_C_EXPORT spine_array_skin spine_array_skin_create(); +SPINE_C_EXPORT void spine_array_skin_dispose(spine_array_skin array); +SPINE_C_EXPORT spine_skin spine_array_skin_get(spine_array_skin array, int index); +SPINE_C_EXPORT void spine_array_skin_set(spine_array_skin array, int index, spine_skin value); +SPINE_C_EXPORT void spine_array_skin_clear(spine_array_skin array); +SPINE_C_EXPORT size_t spine_array_skin_get_capacity(spine_array_skin array); +SPINE_C_EXPORT size_t spine_array_skin_size(spine_array_skin array); +SPINE_C_EXPORT void spine_array_skin_ensure_capacity(spine_array_skin array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_skin_add(spine_array_skin array, spine_skin inValue); +SPINE_C_EXPORT void spine_array_skin_remove_at(spine_array_skin array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_skin_contains(spine_array_skin array, spine_skin inValue); +SPINE_C_EXPORT int spine_array_skin_index_of(spine_array_skin array, spine_skin inValue); +SPINE_C_EXPORT spine_skin spine_array_skin_buffer(spine_array_skin array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_slot) + +SPINE_C_EXPORT spine_array_slot spine_array_slot_create(); +SPINE_C_EXPORT void spine_array_slot_dispose(spine_array_slot array); +SPINE_C_EXPORT spine_slot spine_array_slot_get(spine_array_slot array, int index); +SPINE_C_EXPORT void spine_array_slot_set(spine_array_slot array, int index, spine_slot value); +SPINE_C_EXPORT void spine_array_slot_clear(spine_array_slot array); +SPINE_C_EXPORT size_t spine_array_slot_get_capacity(spine_array_slot array); +SPINE_C_EXPORT size_t spine_array_slot_size(spine_array_slot array); +SPINE_C_EXPORT void spine_array_slot_ensure_capacity(spine_array_slot array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_slot_add(spine_array_slot array, spine_slot inValue); +SPINE_C_EXPORT void spine_array_slot_remove_at(spine_array_slot array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_slot_contains(spine_array_slot array, spine_slot inValue); +SPINE_C_EXPORT int spine_array_slot_index_of(spine_array_slot array, spine_slot inValue); +SPINE_C_EXPORT spine_slot spine_array_slot_buffer(spine_array_slot array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_slot_data) + +SPINE_C_EXPORT spine_array_slot_data spine_array_slot_data_create(); +SPINE_C_EXPORT void spine_array_slot_data_dispose(spine_array_slot_data array); +SPINE_C_EXPORT spine_slot_data spine_array_slot_data_get(spine_array_slot_data array, int index); +SPINE_C_EXPORT void spine_array_slot_data_set(spine_array_slot_data array, int index, spine_slot_data value); +SPINE_C_EXPORT void spine_array_slot_data_clear(spine_array_slot_data array); +SPINE_C_EXPORT size_t spine_array_slot_data_get_capacity(spine_array_slot_data array); +SPINE_C_EXPORT size_t spine_array_slot_data_size(spine_array_slot_data array); +SPINE_C_EXPORT void spine_array_slot_data_ensure_capacity(spine_array_slot_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_slot_data_add(spine_array_slot_data array, spine_slot_data inValue); +SPINE_C_EXPORT void spine_array_slot_data_remove_at(spine_array_slot_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_slot_data_contains(spine_array_slot_data array, spine_slot_data inValue); +SPINE_C_EXPORT int spine_array_slot_data_index_of(spine_array_slot_data array, spine_slot_data inValue); +SPINE_C_EXPORT spine_slot_data spine_array_slot_data_buffer(spine_array_slot_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_texture_region) + +SPINE_C_EXPORT spine_array_texture_region spine_array_texture_region_create(); +SPINE_C_EXPORT void spine_array_texture_region_dispose(spine_array_texture_region array); +SPINE_C_EXPORT spine_texture_region spine_array_texture_region_get(spine_array_texture_region array, int index); +SPINE_C_EXPORT void spine_array_texture_region_set(spine_array_texture_region array, int index, spine_texture_region value); +SPINE_C_EXPORT void spine_array_texture_region_clear(spine_array_texture_region array); +SPINE_C_EXPORT size_t spine_array_texture_region_get_capacity(spine_array_texture_region array); +SPINE_C_EXPORT size_t spine_array_texture_region_size(spine_array_texture_region array); +SPINE_C_EXPORT void spine_array_texture_region_ensure_capacity(spine_array_texture_region array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_texture_region_add(spine_array_texture_region array, spine_texture_region inValue); +SPINE_C_EXPORT void spine_array_texture_region_remove_at(spine_array_texture_region array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_texture_region_contains(spine_array_texture_region array, spine_texture_region inValue); +SPINE_C_EXPORT int spine_array_texture_region_index_of(spine_array_texture_region array, spine_texture_region inValue); +SPINE_C_EXPORT spine_texture_region spine_array_texture_region_buffer(spine_array_texture_region array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_timeline) + +SPINE_C_EXPORT spine_array_timeline spine_array_timeline_create(); +SPINE_C_EXPORT void spine_array_timeline_dispose(spine_array_timeline array); +SPINE_C_EXPORT spine_timeline spine_array_timeline_get(spine_array_timeline array, int index); +SPINE_C_EXPORT void spine_array_timeline_set(spine_array_timeline array, int index, spine_timeline value); +SPINE_C_EXPORT void spine_array_timeline_clear(spine_array_timeline array); +SPINE_C_EXPORT size_t spine_array_timeline_get_capacity(spine_array_timeline array); +SPINE_C_EXPORT size_t spine_array_timeline_size(spine_array_timeline array); +SPINE_C_EXPORT void spine_array_timeline_ensure_capacity(spine_array_timeline array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_timeline_add(spine_array_timeline array, spine_timeline inValue); +SPINE_C_EXPORT void spine_array_timeline_remove_at(spine_array_timeline array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_timeline_contains(spine_array_timeline array, spine_timeline inValue); +SPINE_C_EXPORT int spine_array_timeline_index_of(spine_array_timeline array, spine_timeline inValue); +SPINE_C_EXPORT spine_timeline spine_array_timeline_buffer(spine_array_timeline array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_to_property) + +SPINE_C_EXPORT spine_array_to_property spine_array_to_property_create(); +SPINE_C_EXPORT void spine_array_to_property_dispose(spine_array_to_property array); +SPINE_C_EXPORT spine_to_property spine_array_to_property_get(spine_array_to_property array, int index); +SPINE_C_EXPORT void spine_array_to_property_set(spine_array_to_property array, int index, spine_to_property value); +SPINE_C_EXPORT void spine_array_to_property_clear(spine_array_to_property array); +SPINE_C_EXPORT size_t spine_array_to_property_get_capacity(spine_array_to_property array); +SPINE_C_EXPORT size_t spine_array_to_property_size(spine_array_to_property array); +SPINE_C_EXPORT void spine_array_to_property_ensure_capacity(spine_array_to_property array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_to_property_add(spine_array_to_property array, spine_to_property inValue); +SPINE_C_EXPORT void spine_array_to_property_remove_at(spine_array_to_property array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_to_property_contains(spine_array_to_property array, spine_to_property inValue); +SPINE_C_EXPORT int spine_array_to_property_index_of(spine_array_to_property array, spine_to_property inValue); +SPINE_C_EXPORT spine_to_property spine_array_to_property_buffer(spine_array_to_property array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_track_entry) + +SPINE_C_EXPORT spine_array_track_entry spine_array_track_entry_create(); +SPINE_C_EXPORT void spine_array_track_entry_dispose(spine_array_track_entry array); +SPINE_C_EXPORT spine_track_entry spine_array_track_entry_get(spine_array_track_entry array, int index); +SPINE_C_EXPORT void spine_array_track_entry_set(spine_array_track_entry array, int index, spine_track_entry value); +SPINE_C_EXPORT void spine_array_track_entry_clear(spine_array_track_entry array); +SPINE_C_EXPORT size_t spine_array_track_entry_get_capacity(spine_array_track_entry array); +SPINE_C_EXPORT size_t spine_array_track_entry_size(spine_array_track_entry array); +SPINE_C_EXPORT void spine_array_track_entry_ensure_capacity(spine_array_track_entry array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_track_entry_add(spine_array_track_entry array, spine_track_entry inValue); +SPINE_C_EXPORT void spine_array_track_entry_remove_at(spine_array_track_entry array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_track_entry_contains(spine_array_track_entry array, spine_track_entry inValue); +SPINE_C_EXPORT int spine_array_track_entry_index_of(spine_array_track_entry array, spine_track_entry inValue); +SPINE_C_EXPORT spine_track_entry spine_array_track_entry_buffer(spine_array_track_entry array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_transform_constraint_data) + +SPINE_C_EXPORT spine_array_transform_constraint_data spine_array_transform_constraint_data_create(); +SPINE_C_EXPORT void spine_array_transform_constraint_data_dispose(spine_array_transform_constraint_data array); +SPINE_C_EXPORT spine_transform_constraint_data spine_array_transform_constraint_data_get(spine_array_transform_constraint_data array, int index); +SPINE_C_EXPORT void spine_array_transform_constraint_data_set(spine_array_transform_constraint_data array, int index, spine_transform_constraint_data value); +SPINE_C_EXPORT void spine_array_transform_constraint_data_clear(spine_array_transform_constraint_data array); +SPINE_C_EXPORT size_t spine_array_transform_constraint_data_get_capacity(spine_array_transform_constraint_data array); +SPINE_C_EXPORT size_t spine_array_transform_constraint_data_size(spine_array_transform_constraint_data array); +SPINE_C_EXPORT void spine_array_transform_constraint_data_ensure_capacity(spine_array_transform_constraint_data array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_transform_constraint_data_add(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); +SPINE_C_EXPORT void spine_array_transform_constraint_data_remove_at(spine_array_transform_constraint_data array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_transform_constraint_data_contains(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); +SPINE_C_EXPORT int spine_array_transform_constraint_data_index_of(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); +SPINE_C_EXPORT spine_transform_constraint_data spine_array_transform_constraint_data_buffer(spine_array_transform_constraint_data array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_unsigned_short) + +SPINE_C_EXPORT spine_array_unsigned_short spine_array_unsigned_short_create(); +SPINE_C_EXPORT void spine_array_unsigned_short_dispose(spine_array_unsigned_short array); +SPINE_C_EXPORT unsigned short spine_array_unsigned_short_get(spine_array_unsigned_short array, int index); +SPINE_C_EXPORT void spine_array_unsigned_short_set(spine_array_unsigned_short array, int index, unsigned short value); +SPINE_C_EXPORT void spine_array_unsigned_short_clear(spine_array_unsigned_short array); +SPINE_C_EXPORT size_t spine_array_unsigned_short_get_capacity(spine_array_unsigned_short array); +SPINE_C_EXPORT size_t spine_array_unsigned_short_size(spine_array_unsigned_short array); +SPINE_C_EXPORT void spine_array_unsigned_short_ensure_capacity(spine_array_unsigned_short array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_unsigned_short_add(spine_array_unsigned_short array, unsigned short inValue); +SPINE_C_EXPORT void spine_array_unsigned_short_remove_at(spine_array_unsigned_short array, size_t inIndex); +SPINE_C_EXPORT unsigned short *spine_array_unsigned_short_buffer(spine_array_unsigned_short array); + +// Array +SPINE_OPAQUE_TYPE(spine_array_update) + +SPINE_C_EXPORT spine_array_update spine_array_update_create(); +SPINE_C_EXPORT void spine_array_update_dispose(spine_array_update array); +SPINE_C_EXPORT spine_update spine_array_update_get(spine_array_update array, int index); +SPINE_C_EXPORT void spine_array_update_set(spine_array_update array, int index, spine_update value); +SPINE_C_EXPORT void spine_array_update_clear(spine_array_update array); +SPINE_C_EXPORT size_t spine_array_update_get_capacity(spine_array_update array); +SPINE_C_EXPORT size_t spine_array_update_size(spine_array_update array); +SPINE_C_EXPORT void spine_array_update_ensure_capacity(spine_array_update array, size_t newCapacity); +SPINE_C_EXPORT void spine_array_update_add(spine_array_update array, spine_update inValue); +SPINE_C_EXPORT void spine_array_update_remove_at(spine_array_update array, size_t inIndex); +SPINE_C_EXPORT bool spine_array_update_contains(spine_array_update array, spine_update inValue); +SPINE_C_EXPORT int spine_array_update_index_of(spine_array_update array, spine_update inValue); +SPINE_C_EXPORT spine_update spine_array_update_buffer(spine_array_update array); + +#ifdef __cplusplus +} +#endif + +#endif // SPINE_C_ARRAYS_H \ No newline at end of file diff --git a/spine-c-new/src/generated/atlas.cpp b/spine-c-new/src/generated/atlas.cpp index 4db4e56dd..15a5aaf02 100644 --- a/spine-c-new/src/generated/atlas.cpp +++ b/spine-c-new/src/generated/atlas.cpp @@ -32,12 +32,12 @@ using namespace spine; -spine_atlas spine_atlas_create(const utf8 * path, spine_texture_loader textureLoader, spine_bool createTexture) { +spine_atlas spine_atlas_create(const char* path, spine_texture_loader textureLoader, bool createTexture) { Atlas *obj = new (__FILE__, __LINE__) Atlas(String(path), (TextureLoader *) textureLoader, createTexture); return (spine_atlas) obj; } -spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const utf8 * data, int32_t length, const utf8 * dir, spine_texture_loader textureLoader, spine_bool createTexture) { +spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const char * data, int length, const char * dir, spine_texture_loader textureLoader, bool createTexture) { Atlas *obj = new (__FILE__, __LINE__) Atlas((const char *) data, length, (const char *) dir, (TextureLoader *) textureLoader, createTexture); return (spine_atlas) obj; } @@ -53,18 +53,12 @@ void spine_atlas_flip_v(spine_atlas obj) { _obj->flipV(); } -spine_atlas_region spine_atlas_find_region(spine_atlas obj, const utf8 * name) { - if (!obj) return nullptr; +spine_atlas_region spine_atlas_find_region(spine_atlas obj, const char* name) { + if (!obj) return (spine_atlas_region) 0; Atlas *_obj = (Atlas *) obj; return (spine_atlas_region) _obj->findRegion(String(name)); } -void * spine_atlas_get_pages(spine_atlas obj) { - if (!obj) return nullptr; - Atlas *_obj = (Atlas *) obj; - return (void *) _obj->getPages(); -} - int32_t spine_atlas_get_num_pages(spine_atlas obj) { if (!obj) return 0; Atlas *_obj = (Atlas *) obj; @@ -77,12 +71,6 @@ spine_atlas_page *spine_atlas_get_pages(spine_atlas obj) { return (spine_atlas_page *) _obj->getPages().buffer(); } -void * spine_atlas_get_regions(spine_atlas obj) { - if (!obj) return nullptr; - Atlas *_obj = (Atlas *) obj; - return (void *) _obj->getRegions(); -} - int32_t spine_atlas_get_num_regions(spine_atlas obj) { if (!obj) return 0; Atlas *_obj = (Atlas *) obj; diff --git a/spine-c-new/src/generated/atlas.h b/spine-c-new/src/generated/atlas.h index d194218ab..2a692abd5 100644 --- a/spine-c-new/src/generated/atlas.h +++ b/spine-c-new/src/generated/atlas.h @@ -34,19 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" +#include "../extensions.h" -SPINE_OPAQUE_TYPE(spine_atlas) - -SPINE_C_EXPORT spine_atlas spine_atlas_create(const utf8 * path, spine_texture_loader textureLoader, spine_bool createTexture); -SPINE_C_EXPORT spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const utf8 * data, int32_t length, const utf8 * dir, spine_texture_loader textureLoader, spine_bool createTexture); +SPINE_C_EXPORT spine_atlas spine_atlas_create(const char* path, spine_texture_loader textureLoader, bool createTexture); +SPINE_C_EXPORT spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const char * data, int length, const char * dir, spine_texture_loader textureLoader, bool createTexture); SPINE_C_EXPORT void spine_atlas_dispose(spine_atlas obj); SPINE_C_EXPORT void spine_atlas_flip_v(spine_atlas obj); -SPINE_C_EXPORT spine_atlas_region spine_atlas_find_region(spine_atlas obj, const utf8 * name); -SPINE_C_EXPORT void * spine_atlas_get_pages(spine_atlas obj); +SPINE_C_EXPORT spine_atlas_region spine_atlas_find_region(spine_atlas obj, const char* name); SPINE_C_EXPORT int32_t spine_atlas_get_num_pages(spine_atlas obj); SPINE_C_EXPORT spine_atlas_page *spine_atlas_get_pages(spine_atlas obj); -SPINE_C_EXPORT void * spine_atlas_get_regions(spine_atlas obj); SPINE_C_EXPORT int32_t spine_atlas_get_num_regions(spine_atlas obj); SPINE_C_EXPORT spine_atlas_region *spine_atlas_get_regions(spine_atlas obj); diff --git a/spine-c-new/src/generated/atlas_attachment_loader.cpp b/spine-c-new/src/generated/atlas_attachment_loader.cpp index 2b51d1c4e..a58704034 100644 --- a/spine-c-new/src/generated/atlas_attachment_loader.cpp +++ b/spine-c-new/src/generated/atlas_attachment_loader.cpp @@ -42,44 +42,44 @@ void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader obj) { delete (AtlasAttachmentLoader *) obj; } -spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) { - if (!obj) return nullptr; +spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + if (!obj) return (spine_region_attachment) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_region_attachment) _obj->newRegionAttachment(skin, String(name), String(path), (Sequence *) sequence); + return (spine_region_attachment) _obj->newRegionAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence); } -spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) { - if (!obj) return nullptr; +spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + if (!obj) return (spine_mesh_attachment) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_mesh_attachment) _obj->newMeshAttachment(skin, String(name), String(path), (Sequence *) sequence); + return (spine_mesh_attachment) _obj->newMeshAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence); } -spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_bounding_box_attachment) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(skin, String(name)); + return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(*(Skin*) skin, String(name)); } -spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_path_attachment) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_path_attachment) _obj->newPathAttachment(skin, String(name)); + return (spine_path_attachment) _obj->newPathAttachment(*(Skin*) skin, String(name)); } -spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) { +spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) { if (!obj) return 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_point_attachment) _obj->newPointAttachment(skin, String(name)); + return (spine_point_attachment) _obj->newPointAttachment(*(Skin*) skin, String(name)); } -spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_clipping_attachment) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_clipping_attachment) _obj->newClippingAttachment(skin, String(name)); + return (spine_clipping_attachment) _obj->newClippingAttachment(*(Skin*) skin, String(name)); } -spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const utf8 * name) { - if (!obj) return nullptr; +spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const char* name) { + if (!obj) return (spine_atlas_region) 0; AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; return (spine_atlas_region) _obj->findRegion(String(name)); } diff --git a/spine-c-new/src/generated/atlas_attachment_loader.h b/spine-c-new/src/generated/atlas_attachment_loader.h index 3d91ffd58..7cc30ea9b 100644 --- a/spine-c-new/src/generated/atlas_attachment_loader.h +++ b/spine-c-new/src/generated/atlas_attachment_loader.h @@ -34,19 +34,17 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_atlas_attachment_loader) +#include "types.h" SPINE_C_EXPORT spine_atlas_attachment_loader spine_atlas_attachment_loader_create(spine_atlas atlas); SPINE_C_EXPORT void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader obj); -SPINE_C_EXPORT spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence); -SPINE_C_EXPORT spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence); -SPINE_C_EXPORT spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const utf8 * name); +SPINE_C_EXPORT spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_EXPORT spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_EXPORT spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const char* name); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/atlas_page.cpp b/spine-c-new/src/generated/atlas_page.cpp index 1b28c9eb0..e57825a1e 100644 --- a/spine-c-new/src/generated/atlas_page.cpp +++ b/spine-c-new/src/generated/atlas_page.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_atlas_page spine_atlas_page_create(const utf8 * inName) { +spine_atlas_page spine_atlas_page_create(const char* inName) { AtlasPage *obj = new (__FILE__, __LINE__) AtlasPage(String(inName)); return (spine_atlas_page) obj; } diff --git a/spine-c-new/src/generated/atlas_page.h b/spine-c-new/src/generated/atlas_page.h index 448db63f5..3de455b47 100644 --- a/spine-c-new/src/generated/atlas_page.h +++ b/spine-c-new/src/generated/atlas_page.h @@ -34,11 +34,9 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_atlas_page) - -SPINE_C_EXPORT spine_atlas_page spine_atlas_page_create(const utf8 * inName); +SPINE_C_EXPORT spine_atlas_page spine_atlas_page_create(const char* inName); SPINE_C_EXPORT void spine_atlas_page_dispose(spine_atlas_page obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/atlas_region.h b/spine-c-new/src/generated/atlas_region.h index 99243d452..476707d84 100644 --- a/spine-c-new/src/generated/atlas_region.h +++ b/spine-c-new/src/generated/atlas_region.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_atlas_region) +#include "types.h" SPINE_C_EXPORT void spine_atlas_region_dispose(spine_atlas_region obj); diff --git a/spine-c-new/src/generated/attachment.cpp b/spine-c-new/src/generated/attachment.cpp index f78e4697d..25a594d60 100644 --- a/spine-c-new/src/generated/attachment.cpp +++ b/spine-c-new/src/generated/attachment.cpp @@ -32,35 +32,28 @@ using namespace spine; -spine_attachment spine_attachment_create(const utf8 * name) { - Attachment *obj = new (__FILE__, __LINE__) Attachment(String(name)); - return (spine_attachment) obj; -} - void spine_attachment_dispose(spine_attachment obj) { if (!obj) return; delete (Attachment *) obj; } -spine_rtti spine_attachment_get_rtti(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_attachment_get_rtti() { + return (spine_rtti) &Attachment::rtti; } -const utf8 * spine_attachment_get_name(spine_attachment obj) { +const char* spine_attachment_get_name(spine_attachment obj) { if (!obj) return nullptr; Attachment *_obj = (Attachment *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } spine_attachment spine_attachment_copy(spine_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; Attachment *_obj = (Attachment *) obj; return (spine_attachment) _obj->copy(); } -int32_t spine_attachment_get_ref_count(spine_attachment obj) { +int spine_attachment_get_ref_count(spine_attachment obj) { if (!obj) return 0; Attachment *_obj = (Attachment *) obj; return _obj->getRefCount(); @@ -77,66 +70,3 @@ void spine_attachment_dereference(spine_attachment obj) { Attachment *_obj = (Attachment *) obj; _obj->dereference(); } - -spine_bool spine_attachment_is_type(spine_attachment obj, spine_attachment_type type) { - if (!obj) return 0; - Attachment *_obj = (Attachment *) obj; - - switch (type) { - case SPINE_TYPE_ATTACHMENT_POINT_ATTACHMENT: - return _obj->getRTTI().instanceOf(PointAttachment::rtti); - case SPINE_TYPE_ATTACHMENT_REGION_ATTACHMENT: - return _obj->getRTTI().instanceOf(RegionAttachment::rtti); - case SPINE_TYPE_ATTACHMENT_BOUNDING_BOX_ATTACHMENT: - return _obj->getRTTI().instanceOf(BoundingBoxAttachment::rtti); - case SPINE_TYPE_ATTACHMENT_CLIPPING_ATTACHMENT: - return _obj->getRTTI().instanceOf(ClippingAttachment::rtti); - case SPINE_TYPE_ATTACHMENT_MESH_ATTACHMENT: - return _obj->getRTTI().instanceOf(MeshAttachment::rtti); - case SPINE_TYPE_ATTACHMENT_PATH_ATTACHMENT: - return _obj->getRTTI().instanceOf(PathAttachment::rtti); - } - return 0; -} - -spine_point_attachment spine_attachment_as_point_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(PointAttachment::rtti)) return nullptr; - return (spine_point_attachment) obj; -} - -spine_region_attachment spine_attachment_as_region_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(RegionAttachment::rtti)) return nullptr; - return (spine_region_attachment) obj; -} - -spine_bounding_box_attachment spine_attachment_as_bounding_box_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(BoundingBoxAttachment::rtti)) return nullptr; - return (spine_bounding_box_attachment) obj; -} - -spine_clipping_attachment spine_attachment_as_clipping_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(ClippingAttachment::rtti)) return nullptr; - return (spine_clipping_attachment) obj; -} - -spine_mesh_attachment spine_attachment_as_mesh_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(MeshAttachment::rtti)) return nullptr; - return (spine_mesh_attachment) obj; -} - -spine_path_attachment spine_attachment_as_path_attachment(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - if (!_obj->getRTTI().instanceOf(PathAttachment::rtti)) return nullptr; - return (spine_path_attachment) obj; -} diff --git a/spine-c-new/src/generated/attachment.h b/spine-c-new/src/generated/attachment.h index 5031da627..5d01a440d 100644 --- a/spine-c-new/src/generated/attachment.h +++ b/spine-c-new/src/generated/attachment.h @@ -34,47 +34,15 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_attachment) - -SPINE_C_EXPORT spine_attachment spine_attachment_create(const utf8 * name); SPINE_C_EXPORT void spine_attachment_dispose(spine_attachment obj); -SPINE_C_EXPORT spine_rtti spine_attachment_get_rtti(spine_attachment obj); -SPINE_C_EXPORT const utf8 * spine_attachment_get_name(spine_attachment obj); +SPINE_C_EXPORT spine_rtti spine_attachment_get_rtti(); +SPINE_C_EXPORT const char* spine_attachment_get_name(spine_attachment obj); SPINE_C_EXPORT spine_attachment spine_attachment_copy(spine_attachment obj); -SPINE_C_EXPORT int32_t spine_attachment_get_ref_count(spine_attachment obj); +SPINE_C_EXPORT int spine_attachment_get_ref_count(spine_attachment obj); SPINE_C_EXPORT void spine_attachment_reference(spine_attachment obj); SPINE_C_EXPORT void spine_attachment_dereference(spine_attachment obj); -struct spine_point_attachment_wrapper; -typedef struct spine_point_attachment_wrapper *spine_point_attachment; -struct spine_region_attachment_wrapper; -typedef struct spine_region_attachment_wrapper *spine_region_attachment; -struct spine_bounding_box_attachment_wrapper; -typedef struct spine_bounding_box_attachment_wrapper *spine_bounding_box_attachment; -struct spine_clipping_attachment_wrapper; -typedef struct spine_clipping_attachment_wrapper *spine_clipping_attachment; -struct spine_mesh_attachment_wrapper; -typedef struct spine_mesh_attachment_wrapper *spine_mesh_attachment; -struct spine_path_attachment_wrapper; -typedef struct spine_path_attachment_wrapper *spine_path_attachment; - -typedef enum spine_attachment_type { - SPINE_TYPE_ATTACHMENT_POINT_ATTACHMENT = 0, - SPINE_TYPE_ATTACHMENT_REGION_ATTACHMENT = 1, - SPINE_TYPE_ATTACHMENT_BOUNDING_BOX_ATTACHMENT = 2, - SPINE_TYPE_ATTACHMENT_CLIPPING_ATTACHMENT = 3, - SPINE_TYPE_ATTACHMENT_MESH_ATTACHMENT = 4, - SPINE_TYPE_ATTACHMENT_PATH_ATTACHMENT = 5 -} spine_attachment_type; - -SPINE_C_EXPORT spine_bool spine_attachment_is_type(spine_attachment obj, spine_attachment_type type); -SPINE_C_EXPORT spine_point_attachment spine_attachment_as_point_attachment(spine_attachment obj); -SPINE_C_EXPORT spine_region_attachment spine_attachment_as_region_attachment(spine_attachment obj); -SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_as_bounding_box_attachment(spine_attachment obj); -SPINE_C_EXPORT spine_clipping_attachment spine_attachment_as_clipping_attachment(spine_attachment obj); -SPINE_C_EXPORT spine_mesh_attachment spine_attachment_as_mesh_attachment(spine_attachment obj); -SPINE_C_EXPORT spine_path_attachment spine_attachment_as_path_attachment(spine_attachment obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/attachment_loader.cpp b/spine-c-new/src/generated/attachment_loader.cpp index 9aa900ac3..5fe91dc53 100644 --- a/spine-c-new/src/generated/attachment_loader.cpp +++ b/spine-c-new/src/generated/attachment_loader.cpp @@ -32,48 +32,43 @@ using namespace spine; -spine_attachment_loader spine_attachment_loader_create(void) { - AttachmentLoader *obj = new (__FILE__, __LINE__) AttachmentLoader(); - return (spine_attachment_loader) obj; -} - void spine_attachment_loader_dispose(spine_attachment_loader obj) { if (!obj) return; delete (AttachmentLoader *) obj; } -spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) { - if (!obj) return nullptr; +spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + if (!obj) return (spine_region_attachment) 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_region_attachment) _obj->newRegionAttachment(skin, String(name), String(path), (Sequence *) sequence); + return (spine_region_attachment) _obj->newRegionAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence); } -spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) { - if (!obj) return nullptr; +spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + if (!obj) return (spine_mesh_attachment) 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_mesh_attachment) _obj->newMeshAttachment(skin, String(name), String(path), (Sequence *) sequence); + return (spine_mesh_attachment) _obj->newMeshAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence); } -spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_bounding_box_attachment) 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(skin, String(name)); + return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(*(Skin*) skin, String(name)); } -spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_path_attachment) 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_path_attachment) _obj->newPathAttachment(skin, String(name)); + return (spine_path_attachment) _obj->newPathAttachment(*(Skin*) skin, String(name)); } -spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) { +spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) { if (!obj) return 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_point_attachment) _obj->newPointAttachment(skin, String(name)); + return (spine_point_attachment) _obj->newPointAttachment(*(Skin*) skin, String(name)); } -spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) { - if (!obj) return nullptr; +spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) { + if (!obj) return (spine_clipping_attachment) 0; AttachmentLoader *_obj = (AttachmentLoader *) obj; - return (spine_clipping_attachment) _obj->newClippingAttachment(skin, String(name)); + return (spine_clipping_attachment) _obj->newClippingAttachment(*(Skin*) skin, String(name)); } diff --git a/spine-c-new/src/generated/attachment_loader.h b/spine-c-new/src/generated/attachment_loader.h index 80524df30..5dcfe76ed 100644 --- a/spine-c-new/src/generated/attachment_loader.h +++ b/spine-c-new/src/generated/attachment_loader.h @@ -34,18 +34,15 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_attachment_loader) - -SPINE_C_EXPORT spine_attachment_loader spine_attachment_loader_create(void); SPINE_C_EXPORT void spine_attachment_loader_dispose(spine_attachment_loader obj); -SPINE_C_EXPORT spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence); -SPINE_C_EXPORT spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence); -SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name); -SPINE_C_EXPORT spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name); +SPINE_C_EXPORT spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_EXPORT spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const char* name); +SPINE_C_EXPORT spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const char* name); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/attachment_timeline.cpp b/spine-c-new/src/generated/attachment_timeline.cpp index bbe9d9a58..f90b5a894 100644 --- a/spine-c-new/src/generated/attachment_timeline.cpp +++ b/spine-c-new/src/generated/attachment_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_attachment_timeline spine_attachment_timeline_create(spine_size_t frameCount, int32_t slotIndex) { +spine_attachment_timeline spine_attachment_timeline_create(size_t frameCount, int slotIndex) { AttachmentTimeline *obj = new (__FILE__, __LINE__) AttachmentTimeline(frameCount, slotIndex); return (spine_attachment_timeline) obj; } @@ -42,70 +42,56 @@ void spine_attachment_timeline_dispose(spine_attachment_timeline obj) { delete (AttachmentTimeline *) obj; } -spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_attachment_timeline_get_rtti() { + return (spine_rtti) &AttachmentTimeline::rtti; } -void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int32_t frame, float time, const utf8 * attachmentName) { +void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int frame, float time, const char* attachmentName) { if (!obj) return ; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; _obj->setFrame(frame, time, String(attachmentName)); } -void * spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getAttachmentNames(); -} - int32_t spine_attachment_timeline_get_num_attachment_names(spine_attachment_timeline obj) { if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return (int32_t) _obj->getAttachmentNames().size(); } -spine_string *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) { +const char * *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) { if (!obj) return nullptr; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (spine_string *) _obj->getAttachmentNames().buffer(); + return (const char * *) _obj->getAttachmentNames().buffer(); } -spine_size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj) { - if (!obj) return nullptr; +size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj) { + if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj) { - if (!obj) return nullptr; +size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj) { + if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return _obj->getFrameCount(); } -void * spine_attachment_timeline_get_frames(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_attachment_timeline_get_num_frames(spine_attachment_timeline obj) { if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj) { +float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj) { if (!obj) return nullptr; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_attachment_timeline_get_duration(spine_attachment_timeline obj) { @@ -114,31 +100,25 @@ float spine_attachment_timeline_get_duration(spine_attachment_timeline obj) { return _obj->getDuration(); } -void * spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_attachment_timeline_get_num_property_ids(spine_attachment_timeline obj) { if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) { +int64_t *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) { if (!obj) return nullptr; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj) { +int spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj) { if (!obj) return 0; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; return _obj->getSlotIndex(); } -void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int32_t value) { +void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int value) { if (!obj) return; AttachmentTimeline *_obj = (AttachmentTimeline *) obj; _obj->setSlotIndex(value); diff --git a/spine-c-new/src/generated/attachment_timeline.h b/spine-c-new/src/generated/attachment_timeline.h index cd5dcb399..d5e159d45 100644 --- a/spine-c-new/src/generated/attachment_timeline.h +++ b/spine-c-new/src/generated/attachment_timeline.h @@ -34,29 +34,24 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_attachment_timeline) - -SPINE_C_EXPORT spine_attachment_timeline spine_attachment_timeline_create(spine_size_t frameCount, int32_t slotIndex); +SPINE_C_EXPORT spine_attachment_timeline spine_attachment_timeline_create(size_t frameCount, int slotIndex); SPINE_C_EXPORT void spine_attachment_timeline_dispose(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline obj); -SPINE_C_EXPORT void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int32_t frame, float time, const utf8 * attachmentName); -SPINE_C_EXPORT void * spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj); +SPINE_C_EXPORT spine_rtti spine_attachment_timeline_get_rtti(); +SPINE_C_EXPORT void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int frame, float time, const char* attachmentName); SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_attachment_names(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_string *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj); -SPINE_C_EXPORT void * spine_attachment_timeline_get_frames(spine_attachment_timeline obj); +SPINE_C_EXPORT const char * *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj); +SPINE_C_EXPORT size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj); +SPINE_C_EXPORT size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj); SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_frames(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj); +SPINE_C_EXPORT float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj); SPINE_C_EXPORT float spine_attachment_timeline_get_duration(spine_attachment_timeline obj); -SPINE_C_EXPORT void * spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj); SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_property_ids(spine_attachment_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj); -SPINE_C_EXPORT int32_t spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj); -SPINE_C_EXPORT void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj); +SPINE_C_EXPORT int spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj); +SPINE_C_EXPORT void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/attachment_type.h b/spine-c-new/src/generated/attachment_type.h index 2ccdb81d5..526eae813 100644 --- a/spine-c-new/src/generated/attachment_type.h +++ b/spine-c-new/src/generated/attachment_type.h @@ -30,20 +30,20 @@ #ifndef SPINE_C_ATTACHMENTTYPE_H #define SPINE_C_ATTACHMENTTYPE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_attachment_type { - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_REGION, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_BOUNDINGBOX, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_MESH, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_LINKEDMESH, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_PATH, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_POINT, - SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_CLIPPING + SPINE_ATTACHMENT_TYPE_REGION, + SPINE_ATTACHMENT_TYPE_BOUNDINGBOX, + SPINE_ATTACHMENT_TYPE_MESH, + SPINE_ATTACHMENT_TYPE_LINKEDMESH, + SPINE_ATTACHMENT_TYPE_PATH, + SPINE_ATTACHMENT_TYPE_POINT, + SPINE_ATTACHMENT_TYPE_CLIPPING } spine_attachment_type; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/blend_mode.h b/spine-c-new/src/generated/blend_mode.h index 9db601041..b6e5d56f1 100644 --- a/spine-c-new/src/generated/blend_mode.h +++ b/spine-c-new/src/generated/blend_mode.h @@ -30,17 +30,17 @@ #ifndef SPINE_C_BLENDMODE_H #define SPINE_C_BLENDMODE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_blend_mode { - SPINE_BLEND_MODE_BLEND_MODE_NORMAL = 0, - SPINE_BLEND_MODE_BLEND_MODE_ADDITIVE, - SPINE_BLEND_MODE_BLEND_MODE_MULTIPLY, - SPINE_BLEND_MODE_BLEND_MODE_SCREEN + SPINE_BLEND_MODE_NORMAL = 0, + SPINE_BLEND_MODE_ADDITIVE, + SPINE_BLEND_MODE_MULTIPLY, + SPINE_BLEND_MODE_SCREEN } spine_blend_mode; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/block.cpp b/spine-c-new/src/generated/block.cpp index ebd9e9cee..4914f564f 100644 --- a/spine-c-new/src/generated/block.cpp +++ b/spine-c-new/src/generated/block.cpp @@ -37,20 +37,20 @@ void spine_block_dispose(spine_block obj) { delete (Block *) obj; } -int32_t spine_block_free(spine_block obj) { +int spine_block_free(spine_block obj) { if (!obj) return 0; Block *_obj = (Block *) obj; return _obj->free(); } -spine_bool spine_block_can_fit(spine_block obj, int32_t numBytes) { - if (!obj) return 0; +bool spine_block_can_fit(spine_block obj, int numBytes) { + if (!obj) return false; Block *_obj = (Block *) obj; return _obj->canFit(numBytes); } -spine_uint8_t spine_block_allocate(spine_block obj, int32_t numBytes) { +uint8_t * spine_block_allocate(spine_block obj, int numBytes) { if (!obj) return 0; Block *_obj = (Block *) obj; - return (spine_uint8_t) _obj->allocate(numBytes); + return (uint8_t *) _obj->allocate(numBytes); } diff --git a/spine-c-new/src/generated/block.h b/spine-c-new/src/generated/block.h index 8d70b4d98..9c442dc62 100644 --- a/spine-c-new/src/generated/block.h +++ b/spine-c-new/src/generated/block.h @@ -34,14 +34,12 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_block) +#include "types.h" SPINE_C_EXPORT void spine_block_dispose(spine_block obj); -SPINE_C_EXPORT int32_t spine_block_free(spine_block obj); -SPINE_C_EXPORT spine_bool spine_block_can_fit(spine_block obj, int32_t numBytes); -SPINE_C_EXPORT spine_uint8_t spine_block_allocate(spine_block obj, int32_t numBytes); +SPINE_C_EXPORT int spine_block_free(spine_block obj); +SPINE_C_EXPORT bool spine_block_can_fit(spine_block obj, int numBytes); +SPINE_C_EXPORT uint8_t * spine_block_allocate(spine_block obj, int numBytes); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bone.cpp b/spine-c-new/src/generated/bone.cpp index eae6f62d2..8ecbee799 100644 --- a/spine-c-new/src/generated/bone.cpp +++ b/spine-c-new/src/generated/bone.cpp @@ -33,12 +33,12 @@ using namespace spine; spine_bone spine_bone_create(spine_bone_data data, spine_bone parent) { - Bone *obj = new (__FILE__, __LINE__) Bone(data, (Bone *) parent); + Bone *obj = new (__FILE__, __LINE__) Bone(*(BoneData*) data, (Bone *) parent); return (spine_bone) obj; } spine_bone spine_bone_create_with_bone_bone(spine_bone bone, spine_bone parent) { - Bone *obj = new (__FILE__, __LINE__) Bone(bone, (Bone *) parent); + Bone *obj = new (__FILE__, __LINE__) Bone(*(Bone*) bone, (Bone *) parent); return (spine_bone) obj; } @@ -47,24 +47,16 @@ void spine_bone_dispose(spine_bone obj) { delete (Bone *) obj; } -spine_rtti spine_bone_get_rtti(spine_bone obj) { - if (!obj) return nullptr; - Bone *_obj = (Bone *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bone_get_rtti() { + return (spine_rtti) &Bone::rtti; } spine_bone spine_bone_get_parent(spine_bone obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; Bone *_obj = (Bone *) obj; return (spine_bone) _obj->getParent(); } -void * spine_bone_get_children(spine_bone obj) { - if (!obj) return nullptr; - Bone *_obj = (Bone *) obj; - return (void *) _obj->getChildren(); -} - int32_t spine_bone_get_num_children(spine_bone obj) { if (!obj) return 0; Bone *_obj = (Bone *) obj; @@ -84,21 +76,21 @@ void spine_bone_setup_pose(spine_bone obj) { } spine_bone_data spine_bone_get_data(spine_bone obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; Bone *_obj = (Bone *) obj; - return _obj->getData(); + return (spine_bone_data) &_obj->getData(); } spine_bone_local spine_bone_get_pose(spine_bone obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_local) 0; Bone *_obj = (Bone *) obj; - return _obj->getPose(); + return (spine_bone_local) &_obj->getPose(); } spine_bone_pose spine_bone_get_applied_pose(spine_bone obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_pose) 0; Bone *_obj = (Bone *) obj; - return _obj->getAppliedPose(); + return (spine_bone_pose) &_obj->getAppliedPose(); } void spine_bone_reset_constrained(spine_bone obj) { @@ -107,7 +99,7 @@ void spine_bone_reset_constrained(spine_bone obj) { _obj->resetConstrained(); } -void spine_bone_pose(spine_bone obj) { +void spine_bone_update_pose(spine_bone obj) { if (!obj) return ; Bone *_obj = (Bone *) obj; _obj->pose(); @@ -119,19 +111,19 @@ void spine_bone_constrained(spine_bone obj) { _obj->constrained(); } -spine_bool spine_bone_is_pose_equal_to_applied(spine_bone obj) { - if (!obj) return 0; +bool spine_bone_is_pose_equal_to_applied(spine_bone obj) { + if (!obj) return false; Bone *_obj = (Bone *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_bone_is_active(spine_bone obj) { - if (!obj) return 0; +bool spine_bone_is_active(spine_bone obj) { + if (!obj) return false; Bone *_obj = (Bone *) obj; return _obj->isActive(); } -void spine_bone_set_active(spine_bone obj, spine_bool value) { +void spine_bone_set_active(spine_bone obj, bool value) { if (!obj) return; Bone *_obj = (Bone *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/bone.h b/spine-c-new/src/generated/bone.h index e56f56b3b..aa65ffd46 100644 --- a/spine-c-new/src/generated/bone.h +++ b/spine-c-new/src/generated/bone.h @@ -34,16 +34,13 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_bone) +#include "types.h" SPINE_C_EXPORT spine_bone spine_bone_create(spine_bone_data data, spine_bone parent); SPINE_C_EXPORT spine_bone spine_bone_create_with_bone_bone(spine_bone bone, spine_bone parent); SPINE_C_EXPORT void spine_bone_dispose(spine_bone obj); -SPINE_C_EXPORT spine_rtti spine_bone_get_rtti(spine_bone obj); +SPINE_C_EXPORT spine_rtti spine_bone_get_rtti(); SPINE_C_EXPORT spine_bone spine_bone_get_parent(spine_bone obj); -SPINE_C_EXPORT void * spine_bone_get_children(spine_bone obj); SPINE_C_EXPORT int32_t spine_bone_get_num_children(spine_bone obj); SPINE_C_EXPORT spine_bone *spine_bone_get_children(spine_bone obj); SPINE_C_EXPORT void spine_bone_setup_pose(spine_bone obj); @@ -51,11 +48,11 @@ SPINE_C_EXPORT spine_bone_data spine_bone_get_data(spine_bone obj); SPINE_C_EXPORT spine_bone_local spine_bone_get_pose(spine_bone obj); SPINE_C_EXPORT spine_bone_pose spine_bone_get_applied_pose(spine_bone obj); SPINE_C_EXPORT void spine_bone_reset_constrained(spine_bone obj); -SPINE_C_EXPORT void spine_bone_pose(spine_bone obj); +SPINE_C_EXPORT void spine_bone_update_pose(spine_bone obj); SPINE_C_EXPORT void spine_bone_constrained(spine_bone obj); -SPINE_C_EXPORT spine_bool spine_bone_is_pose_equal_to_applied(spine_bone obj); -SPINE_C_EXPORT spine_bool spine_bone_is_active(spine_bone obj); -SPINE_C_EXPORT void spine_bone_set_active(spine_bone obj, spine_bool value); +SPINE_C_EXPORT bool spine_bone_is_pose_equal_to_applied(spine_bone obj); +SPINE_C_EXPORT bool spine_bone_is_active(spine_bone obj); +SPINE_C_EXPORT void spine_bone_set_active(spine_bone obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bone_data.cpp b/spine-c-new/src/generated/bone_data.cpp index 1acd51359..5189d94ab 100644 --- a/spine-c-new/src/generated/bone_data.cpp +++ b/spine-c-new/src/generated/bone_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_bone_data spine_bone_data_create(int32_t index, const utf8 * name, spine_bone_data parent) { +spine_bone_data spine_bone_data_create(int index, const char* name, spine_bone_data parent) { BoneData *obj = new (__FILE__, __LINE__) BoneData(index, String(name), (BoneData *) parent); return (spine_bone_data) obj; } @@ -42,14 +42,14 @@ void spine_bone_data_dispose(spine_bone_data obj) { delete (BoneData *) obj; } -int32_t spine_bone_data_get_index(spine_bone_data obj) { +int spine_bone_data_get_index(spine_bone_data obj) { if (!obj) return 0; BoneData *_obj = (BoneData *) obj; return _obj->getIndex(); } spine_bone_data spine_bone_data_get_parent(spine_bone_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; BoneData *_obj = (BoneData *) obj; return (spine_bone_data) _obj->getParent(); } @@ -67,43 +67,37 @@ void spine_bone_data_set_length(spine_bone_data obj, float value) { } spine_color spine_bone_data_get_color(spine_bone_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; BoneData *_obj = (BoneData *) obj; return (spine_color) &_obj->getColor(); } -const utf8 * spine_bone_data_get_icon(spine_bone_data obj) { +const char* spine_bone_data_get_icon(spine_bone_data obj) { if (!obj) return nullptr; BoneData *_obj = (BoneData *) obj; - return (const utf8 *) _obj->getIcon().buffer(); + return (const char *) _obj->getIcon().buffer(); } -void spine_bone_data_set_icon(spine_bone_data obj, const utf8 * value) { +void spine_bone_data_set_icon(spine_bone_data obj, const char* value) { if (!obj) return; BoneData *_obj = (BoneData *) obj; _obj->setIcon(String(value)); } -spine_bool spine_bone_data_get_visible(spine_bone_data obj) { - if (!obj) return 0; +bool spine_bone_data_get_visible(spine_bone_data obj) { + if (!obj) return false; BoneData *_obj = (BoneData *) obj; return _obj->getVisible(); } -void spine_bone_data_set_visible(spine_bone_data obj, spine_bool value) { +void spine_bone_data_set_visible(spine_bone_data obj, bool value) { if (!obj) return; BoneData *_obj = (BoneData *) obj; _obj->setVisible(value); } spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_local) 0; BoneData *_obj = (BoneData *) obj; - return _obj->getSetupPose(); -} - -spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj) { - if (!obj) return nullptr; - BoneData *_obj = (BoneData *) obj; - return _obj->getSetupPose(); + return (spine_bone_local) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/bone_data.h b/spine-c-new/src/generated/bone_data.h index f24d5e7cd..b353803de 100644 --- a/spine-c-new/src/generated/bone_data.h +++ b/spine-c-new/src/generated/bone_data.h @@ -34,22 +34,19 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_bone_data) - -SPINE_C_EXPORT spine_bone_data spine_bone_data_create(int32_t index, const utf8 * name, spine_bone_data parent); +SPINE_C_EXPORT spine_bone_data spine_bone_data_create(int index, const char* name, spine_bone_data parent); SPINE_C_EXPORT void spine_bone_data_dispose(spine_bone_data obj); -SPINE_C_EXPORT int32_t spine_bone_data_get_index(spine_bone_data obj); +SPINE_C_EXPORT int spine_bone_data_get_index(spine_bone_data obj); SPINE_C_EXPORT spine_bone_data spine_bone_data_get_parent(spine_bone_data obj); SPINE_C_EXPORT float spine_bone_data_get_length(spine_bone_data obj); SPINE_C_EXPORT void spine_bone_data_set_length(spine_bone_data obj, float value); SPINE_C_EXPORT spine_color spine_bone_data_get_color(spine_bone_data obj); -SPINE_C_EXPORT const utf8 * spine_bone_data_get_icon(spine_bone_data obj); -SPINE_C_EXPORT void spine_bone_data_set_icon(spine_bone_data obj, const utf8 * value); -SPINE_C_EXPORT spine_bool spine_bone_data_get_visible(spine_bone_data obj); -SPINE_C_EXPORT void spine_bone_data_set_visible(spine_bone_data obj, spine_bool value); -SPINE_C_EXPORT spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj); +SPINE_C_EXPORT const char* spine_bone_data_get_icon(spine_bone_data obj); +SPINE_C_EXPORT void spine_bone_data_set_icon(spine_bone_data obj, const char* value); +SPINE_C_EXPORT bool spine_bone_data_get_visible(spine_bone_data obj); +SPINE_C_EXPORT void spine_bone_data_set_visible(spine_bone_data obj, bool value); SPINE_C_EXPORT spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/bone_local.cpp b/spine-c-new/src/generated/bone_local.cpp index 2ce8fe320..c33fd217f 100644 --- a/spine-c-new/src/generated/bone_local.cpp +++ b/spine-c-new/src/generated/bone_local.cpp @@ -45,7 +45,7 @@ void spine_bone_local_dispose(spine_bone_local obj) { void spine_bone_local_set(spine_bone_local obj, spine_bone_local value) { if (!obj) return; BoneLocal *_obj = (BoneLocal *) obj; - _obj->set(value); + _obj->set(*((BoneLocal*) value)); } float spine_bone_local_get_x(spine_bone_local obj) { @@ -151,13 +151,13 @@ void spine_bone_local_set_shear_y(spine_bone_local obj, float value) { } spine_inherit spine_bone_local_get_inherit(spine_bone_local obj) { - if (!obj) return nullptr; + if (!obj) return (spine_inherit) 0; BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getInherit(); + return (spine_inherit) _obj->getInherit(); } void spine_bone_local_set_inherit(spine_bone_local obj, spine_inherit value) { if (!obj) return; BoneLocal *_obj = (BoneLocal *) obj; - _obj->setInherit(value); + _obj->setInherit((Inherit) value); } diff --git a/spine-c-new/src/generated/bone_local.h b/spine-c-new/src/generated/bone_local.h index 6dcc3319d..0faffb2cb 100644 --- a/spine-c-new/src/generated/bone_local.h +++ b/spine-c-new/src/generated/bone_local.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_bone_local) +#include "types.h" SPINE_C_EXPORT spine_bone_local spine_bone_local_create(void); SPINE_C_EXPORT void spine_bone_local_dispose(spine_bone_local obj); diff --git a/spine-c-new/src/generated/bone_pose.cpp b/spine-c-new/src/generated/bone_pose.cpp index 4db4463f1..24c0f060e 100644 --- a/spine-c-new/src/generated/bone_pose.cpp +++ b/spine-c-new/src/generated/bone_pose.cpp @@ -45,40 +45,40 @@ void spine_bone_pose_dispose(spine_bone_pose obj) { void spine_bone_pose_update(spine_bone_pose obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_bone_pose_update_world_transform(spine_bone_pose obj, spine_skeleton skeleton) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->updateWorldTransform(skeleton); + _obj->updateWorldTransform(*(Skeleton*) skeleton); } void spine_bone_pose_update_local_transform(spine_bone_pose obj, spine_skeleton skeleton) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->updateLocalTransform(skeleton); + _obj->updateLocalTransform(*(Skeleton*) skeleton); } void spine_bone_pose_validate_local_transform(spine_bone_pose obj, spine_skeleton skeleton) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->validateLocalTransform(skeleton); + _obj->validateLocalTransform(*(Skeleton*) skeleton); } void spine_bone_pose_modify_local(spine_bone_pose obj, spine_skeleton skeleton) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->modifyLocal(skeleton); + _obj->modifyLocal(*(Skeleton*) skeleton); } -void spine_bone_pose_modify_world(spine_bone_pose obj, int32_t update) { +void spine_bone_pose_modify_world(spine_bone_pose obj, int update) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; _obj->modifyWorld(update); } -void spine_bone_pose_reset_world(spine_bone_pose obj, int32_t update) { +void spine_bone_pose_reset_world(spine_bone_pose obj, int update) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; _obj->resetWorld(update); @@ -180,28 +180,28 @@ float spine_bone_pose_get_world_scale_y(spine_bone_pose obj) { return _obj->getWorldScaleY(); } -void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float outLocalX, float outLocalY) { +void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float* outLocalX, float* outLocalY) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->worldToLocal(worldX, worldY, outLocalX, outLocalY); + _obj->worldToLocal(worldX, worldY, *outLocalX, *outLocalY); } -void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float outWorldX, float outWorldY) { +void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float* outWorldX, float* outWorldY) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->localToWorld(localX, localY, outWorldX, outWorldY); + _obj->localToWorld(localX, localY, *outWorldX, *outWorldY); } -void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float outParentX, float outParentY) { +void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float* outParentX, float* outParentY) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->worldToParent(worldX, worldY, outParentX, outParentY); + _obj->worldToParent(worldX, worldY, *outParentX, *outParentY); } -void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float outWorldX, float outWorldY) { +void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float* outWorldX, float* outWorldY) { if (!obj) return ; BonePose *_obj = (BonePose *) obj; - _obj->parentToWorld(parentX, parentY, outWorldX, outWorldY); + _obj->parentToWorld(parentX, parentY, *outWorldX, *outWorldY); } float spine_bone_pose_world_to_local_rotation(spine_bone_pose obj, float worldRotation) { @@ -225,7 +225,7 @@ void spine_bone_pose_rotate_world(spine_bone_pose obj, float degrees) { void spine_bone_pose_set(spine_bone_pose obj, spine_bone_local value) { if (!obj) return; BonePose *_obj = (BonePose *) obj; - _obj->set(value); + _obj->set(*((BoneLocal*) value)); } float spine_bone_pose_get_x(spine_bone_pose obj) { @@ -331,19 +331,17 @@ void spine_bone_pose_set_shear_y(spine_bone_pose obj, float value) { } spine_inherit spine_bone_pose_get_inherit(spine_bone_pose obj) { - if (!obj) return nullptr; + if (!obj) return (spine_inherit) 0; BonePose *_obj = (BonePose *) obj; - return _obj->getInherit(); + return (spine_inherit) _obj->getInherit(); } void spine_bone_pose_set_inherit(spine_bone_pose obj, spine_inherit value) { if (!obj) return; BonePose *_obj = (BonePose *) obj; - _obj->setInherit(value); + _obj->setInherit((Inherit) value); } -spine_rtti spine_bone_pose_get_rtti(spine_bone_pose obj) { - if (!obj) return nullptr; - BonePose *_obj = (BonePose *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bone_pose_get_rtti() { + return (spine_rtti) &BonePose::rtti; } diff --git a/spine-c-new/src/generated/bone_pose.h b/spine-c-new/src/generated/bone_pose.h index a9a6a4589..89fc1e6e0 100644 --- a/spine-c-new/src/generated/bone_pose.h +++ b/spine-c-new/src/generated/bone_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_bone_pose) +#include "types.h" SPINE_C_EXPORT spine_bone_pose spine_bone_pose_create(void); SPINE_C_EXPORT void spine_bone_pose_dispose(spine_bone_pose obj); @@ -45,8 +43,8 @@ SPINE_C_EXPORT void spine_bone_pose_update_world_transform(spine_bone_pose obj, SPINE_C_EXPORT void spine_bone_pose_update_local_transform(spine_bone_pose obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_bone_pose_validate_local_transform(spine_bone_pose obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_bone_pose_modify_local(spine_bone_pose obj, spine_skeleton skeleton); -SPINE_C_EXPORT void spine_bone_pose_modify_world(spine_bone_pose obj, int32_t update); -SPINE_C_EXPORT void spine_bone_pose_reset_world(spine_bone_pose obj, int32_t update); +SPINE_C_EXPORT void spine_bone_pose_modify_world(spine_bone_pose obj, int update); +SPINE_C_EXPORT void spine_bone_pose_reset_world(spine_bone_pose obj, int update); SPINE_C_EXPORT float spine_bone_pose_get_a(spine_bone_pose obj); SPINE_C_EXPORT void spine_bone_pose_set_a(spine_bone_pose obj, float value); SPINE_C_EXPORT float spine_bone_pose_get_b(spine_bone_pose obj); @@ -63,10 +61,10 @@ SPINE_C_EXPORT float spine_bone_pose_get_world_rotation_x(spine_bone_pose obj); SPINE_C_EXPORT float spine_bone_pose_get_world_rotation_y(spine_bone_pose obj); SPINE_C_EXPORT float spine_bone_pose_get_world_scale_x(spine_bone_pose obj); SPINE_C_EXPORT float spine_bone_pose_get_world_scale_y(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float outLocalX, float outLocalY); -SPINE_C_EXPORT void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float outWorldX, float outWorldY); -SPINE_C_EXPORT void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float outParentX, float outParentY); -SPINE_C_EXPORT void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float outWorldX, float outWorldY); +SPINE_C_EXPORT void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float* outLocalX, float* outLocalY); +SPINE_C_EXPORT void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float* outWorldX, float* outWorldY); +SPINE_C_EXPORT void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float* outParentX, float* outParentY); +SPINE_C_EXPORT void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float* outWorldX, float* outWorldY); SPINE_C_EXPORT float spine_bone_pose_world_to_local_rotation(spine_bone_pose obj, float worldRotation); SPINE_C_EXPORT float spine_bone_pose_local_to_world_rotation(spine_bone_pose obj, float localRotation); SPINE_C_EXPORT void spine_bone_pose_rotate_world(spine_bone_pose obj, float degrees); @@ -90,7 +88,7 @@ SPINE_C_EXPORT float spine_bone_pose_get_shear_y(spine_bone_pose obj); SPINE_C_EXPORT void spine_bone_pose_set_shear_y(spine_bone_pose obj, float value); SPINE_C_EXPORT spine_inherit spine_bone_pose_get_inherit(spine_bone_pose obj); SPINE_C_EXPORT void spine_bone_pose_set_inherit(spine_bone_pose obj, spine_inherit value); -SPINE_C_EXPORT spine_rtti spine_bone_pose_get_rtti(spine_bone_pose obj); +SPINE_C_EXPORT spine_rtti spine_bone_pose_get_rtti(); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bone_timeline.cpp b/spine-c-new/src/generated/bone_timeline.cpp index 5df8f5d07..2498a8b08 100644 --- a/spine-c-new/src/generated/bone_timeline.cpp +++ b/spine-c-new/src/generated/bone_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_bone_timeline spine_bone_timeline_create(int32_t boneIndex) { +spine_bone_timeline spine_bone_timeline_create(int boneIndex) { BoneTimeline *obj = new (__FILE__, __LINE__) BoneTimeline(boneIndex); return (spine_bone_timeline) obj; } @@ -42,19 +42,17 @@ void spine_bone_timeline_dispose(spine_bone_timeline obj) { delete (BoneTimeline *) obj; } -spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline obj) { - if (!obj) return nullptr; - BoneTimeline *_obj = (BoneTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bone_timeline_get_rtti() { + return (spine_rtti) &BoneTimeline::rtti; } -int32_t spine_bone_timeline_get_bone_index(spine_bone_timeline obj) { +int spine_bone_timeline_get_bone_index(spine_bone_timeline obj) { if (!obj) return 0; BoneTimeline *_obj = (BoneTimeline *) obj; return _obj->getBoneIndex(); } -void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int32_t value) { +void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int value) { if (!obj) return; BoneTimeline *_obj = (BoneTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/bone_timeline.h b/spine-c-new/src/generated/bone_timeline.h index 89023e2e3..5011cb561 100644 --- a/spine-c-new/src/generated/bone_timeline.h +++ b/spine-c-new/src/generated/bone_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_bone_timeline) - -SPINE_C_EXPORT spine_bone_timeline spine_bone_timeline_create(int32_t boneIndex); +SPINE_C_EXPORT spine_bone_timeline spine_bone_timeline_create(int boneIndex); SPINE_C_EXPORT void spine_bone_timeline_dispose(spine_bone_timeline obj); -SPINE_C_EXPORT spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline obj); -SPINE_C_EXPORT int32_t spine_bone_timeline_get_bone_index(spine_bone_timeline obj); -SPINE_C_EXPORT void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int32_t value); +SPINE_C_EXPORT spine_rtti spine_bone_timeline_get_rtti(); +SPINE_C_EXPORT int spine_bone_timeline_get_bone_index(spine_bone_timeline obj); +SPINE_C_EXPORT void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bone_timeline1.cpp b/spine-c-new/src/generated/bone_timeline1.cpp index fefe46280..8aa640529 100644 --- a/spine-c-new/src/generated/bone_timeline1.cpp +++ b/spine-c-new/src/generated/bone_timeline1.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_bone_timeline1 spine_bone_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property) { +spine_bone_timeline1 spine_bone_timeline1_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property) { BoneTimeline1 *obj = new (__FILE__, __LINE__) BoneTimeline1(frameCount, bezierCount, boneIndex, property); return (spine_bone_timeline1) obj; } @@ -42,19 +42,17 @@ void spine_bone_timeline1_dispose(spine_bone_timeline1 obj) { delete (BoneTimeline1 *) obj; } -spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 obj) { - if (!obj) return nullptr; - BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bone_timeline1_get_rtti() { + return (spine_rtti) &BoneTimeline1::rtti; } -void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, spine_size_t frame, float time, float value) { +void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, size_t frame, float time, float value) { if (!obj) return ; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 obj, float time) float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_bone_timeline1_get_absolute_value_6(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj) { +int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj) { if (!obj) return 0; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; return _obj->getBoneIndex(); } -void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int32_t value) { +void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int value) { if (!obj) return; BoneTimeline1 *_obj = (BoneTimeline1 *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/bone_timeline1.h b/spine-c-new/src/generated/bone_timeline1.h index 01d7c0558..91f48e2d5 100644 --- a/spine-c-new/src/generated/bone_timeline1.h +++ b/spine-c-new/src/generated/bone_timeline1.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_bone_timeline1) - -SPINE_C_EXPORT spine_bone_timeline1 spine_bone_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property); +SPINE_C_EXPORT spine_bone_timeline1 spine_bone_timeline1_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property); SPINE_C_EXPORT void spine_bone_timeline1_dispose(spine_bone_timeline1 obj); -SPINE_C_EXPORT spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 obj); -SPINE_C_EXPORT void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_bone_timeline1_get_rtti(); +SPINE_C_EXPORT void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 obj, float time); SPINE_C_EXPORT float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value_6(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj); -SPINE_C_EXPORT void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int32_t value); +SPINE_C_EXPORT int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj); +SPINE_C_EXPORT void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bone_timeline2.cpp b/spine-c-new/src/generated/bone_timeline2.cpp index bc60d8354..80c9e6739 100644 --- a/spine-c-new/src/generated/bone_timeline2.cpp +++ b/spine-c-new/src/generated/bone_timeline2.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_bone_timeline2 spine_bone_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property1, spine_property property2) { +spine_bone_timeline2 spine_bone_timeline2_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property1, spine_property property2) { BoneTimeline2 *obj = new (__FILE__, __LINE__) BoneTimeline2(frameCount, bezierCount, boneIndex, property1, property2); return (spine_bone_timeline2) obj; } @@ -42,19 +42,17 @@ void spine_bone_timeline2_dispose(spine_bone_timeline2 obj) { delete (BoneTimeline2 *) obj; } -spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 obj) { - if (!obj) return nullptr; - BoneTimeline2 *_obj = (BoneTimeline2 *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bone_timeline2_get_rtti() { + return (spine_rtti) &BoneTimeline2::rtti; } -void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; BoneTimeline2 *_obj = (BoneTimeline2 *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, spine_size_t frame, float time, float value1, float value2) { +void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, size_t frame, float time, float value1, float value2) { if (!obj) return ; BoneTimeline2 *_obj = (BoneTimeline2 *) obj; _obj->setFrame(frame, time, value1, value2); @@ -66,13 +64,13 @@ float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 obj, float time) return _obj->getCurveValue(time); } -int32_t spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj) { +int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj) { if (!obj) return 0; BoneTimeline2 *_obj = (BoneTimeline2 *) obj; return _obj->getBoneIndex(); } -void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int32_t value) { +void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int value) { if (!obj) return; BoneTimeline2 *_obj = (BoneTimeline2 *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/bone_timeline2.h b/spine-c-new/src/generated/bone_timeline2.h index e064d0b3b..bd5337ad0 100644 --- a/spine-c-new/src/generated/bone_timeline2.h +++ b/spine-c-new/src/generated/bone_timeline2.h @@ -34,18 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_bone_timeline2) - -SPINE_C_EXPORT spine_bone_timeline2 spine_bone_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property1, spine_property property2); +SPINE_C_EXPORT spine_bone_timeline2 spine_bone_timeline2_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property1, spine_property property2); SPINE_C_EXPORT void spine_bone_timeline2_dispose(spine_bone_timeline2 obj); -SPINE_C_EXPORT spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 obj); -SPINE_C_EXPORT void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, spine_size_t frame, float time, float value1, float value2); +SPINE_C_EXPORT spine_rtti spine_bone_timeline2_get_rtti(); +SPINE_C_EXPORT void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, size_t frame, float time, float value1, float value2); SPINE_C_EXPORT float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 obj, float time); -SPINE_C_EXPORT int32_t spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj); -SPINE_C_EXPORT void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int32_t value); +SPINE_C_EXPORT int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj); +SPINE_C_EXPORT void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/bounding_box_attachment.cpp b/spine-c-new/src/generated/bounding_box_attachment.cpp index e2543a738..8b70fbdae 100644 --- a/spine-c-new/src/generated/bounding_box_attachment.cpp +++ b/spine-c-new/src/generated/bounding_box_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_bounding_box_attachment spine_bounding_box_attachment_create(const utf8 * name) { +spine_bounding_box_attachment spine_bounding_box_attachment_create(const char* name) { BoundingBoxAttachment *obj = new (__FILE__, __LINE__) BoundingBoxAttachment(String(name)); return (spine_bounding_box_attachment) obj; } @@ -42,70 +42,56 @@ void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment obj) { delete (BoundingBoxAttachment *) obj; } -spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_bounding_box_attachment_get_rtti() { + return (spine_rtti) &BoundingBoxAttachment::rtti; } spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return (spine_color) &_obj->getColor(); } spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return (spine_attachment) _obj->copy(); } -void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); } -void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_bounding_box_attachment_compute_world_vertices_7(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); } -int32_t spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj) { +int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj) { if (!obj) return 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return _obj->getId(); } -int32_t * spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) { - if (!obj) return 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return _obj->getBones(); -} - int32_t spine_bounding_box_attachment_get_num_bones(spine_bounding_box_attachment obj) { if (!obj) return 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return (int32_t) _obj->getBones().size(); } -int32_t *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) { +int *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) { if (!obj) return nullptr; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (int32_t *) _obj->getBones().buffer(); + return (int *) _obj->getBones().buffer(); } -void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, int32_t * value) { +void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, spine_array_int value) { if (!obj) return; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->setBones((Vector &) value); -} - -void * spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return _obj->getVertices(); + _obj->setBones((Array &) value); } int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attachment obj) { @@ -114,32 +100,32 @@ int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attach return (int32_t) _obj->getVertices().size(); } -spine_float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) { +float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) { if (!obj) return nullptr; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (spine_float *) _obj->getVertices().buffer(); + return (float *) _obj->getVertices().buffer(); } -void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, void * value) { +void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, spine_array_float value) { if (!obj) return; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->setVertices((Vector &) value); + _obj->setVertices((Array &) value); } -spine_size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; +size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj) { + if (!obj) return 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return _obj->getWorldVerticesLength(); } -void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, spine_size_t value) { +void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, size_t value) { if (!obj) return; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; _obj->setWorldVerticesLength(value); } spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; return (spine_attachment) _obj->getTimelineAttachment(); } diff --git a/spine-c-new/src/generated/bounding_box_attachment.h b/spine-c-new/src/generated/bounding_box_attachment.h index 1af24ef0e..7f94146d9 100644 --- a/spine-c-new/src/generated/bounding_box_attachment.h +++ b/spine-c-new/src/generated/bounding_box_attachment.h @@ -34,28 +34,24 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_bounding_box_attachment) - -SPINE_C_EXPORT spine_bounding_box_attachment spine_bounding_box_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_bounding_box_attachment spine_bounding_box_attachment_create(const char* name); SPINE_C_EXPORT void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment obj); -SPINE_C_EXPORT spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment obj); +SPINE_C_EXPORT spine_rtti spine_bounding_box_attachment_get_rtti(); SPINE_C_EXPORT spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment obj); SPINE_C_EXPORT spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment obj); -SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj); -SPINE_C_EXPORT int32_t * spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj); +SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices_7(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj); SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_num_bones(spine_bounding_box_attachment obj); -SPINE_C_EXPORT int32_t *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj); -SPINE_C_EXPORT void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, int32_t * value); -SPINE_C_EXPORT void * spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj); +SPINE_C_EXPORT int *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj); +SPINE_C_EXPORT void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, spine_array_int value); SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attachment obj); -SPINE_C_EXPORT spine_float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj); -SPINE_C_EXPORT void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, void * value); -SPINE_C_EXPORT spine_size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj); -SPINE_C_EXPORT void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, spine_size_t value); +SPINE_C_EXPORT float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj); +SPINE_C_EXPORT void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, spine_array_float value); +SPINE_C_EXPORT size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj); +SPINE_C_EXPORT void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, size_t value); SPINE_C_EXPORT spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment obj); SPINE_C_EXPORT void spine_bounding_box_attachment_set_timeline_attachment(spine_bounding_box_attachment obj, spine_attachment value); SPINE_C_EXPORT void spine_bounding_box_attachment_copy_to(spine_bounding_box_attachment obj, spine_vertex_attachment other); diff --git a/spine-c-new/src/generated/clipping_attachment.cpp b/spine-c-new/src/generated/clipping_attachment.cpp index 516ae8dd5..d016888df 100644 --- a/spine-c-new/src/generated/clipping_attachment.cpp +++ b/spine-c-new/src/generated/clipping_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_clipping_attachment spine_clipping_attachment_create(const utf8 * name) { +spine_clipping_attachment spine_clipping_attachment_create(const char* name) { ClippingAttachment *obj = new (__FILE__, __LINE__) ClippingAttachment(String(name)); return (spine_clipping_attachment) obj; } @@ -42,14 +42,12 @@ void spine_clipping_attachment_dispose(spine_clipping_attachment obj) { delete (ClippingAttachment *) obj; } -spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment obj) { - if (!obj) return nullptr; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_clipping_attachment_get_rtti() { + return (spine_rtti) &ClippingAttachment::rtti; } spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_data) 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return (spine_slot_data) _obj->getEndSlot(); } @@ -61,63 +59,51 @@ void spine_clipping_attachment_set_end_slot(spine_clipping_attachment obj, spine } spine_color spine_clipping_attachment_get_color(spine_clipping_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return (spine_color) &_obj->getColor(); } spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return (spine_attachment) _obj->copy(); } -void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); } -void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_clipping_attachment_compute_world_vertices_7(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); } -int32_t spine_clipping_attachment_get_id(spine_clipping_attachment obj) { +int spine_clipping_attachment_get_id(spine_clipping_attachment obj) { if (!obj) return 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return _obj->getId(); } -int32_t * spine_clipping_attachment_get_bones(spine_clipping_attachment obj) { - if (!obj) return 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return _obj->getBones(); -} - int32_t spine_clipping_attachment_get_num_bones(spine_clipping_attachment obj) { if (!obj) return 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return (int32_t) _obj->getBones().size(); } -int32_t *spine_clipping_attachment_get_bones(spine_clipping_attachment obj) { +int *spine_clipping_attachment_get_bones(spine_clipping_attachment obj) { if (!obj) return nullptr; ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (int32_t *) _obj->getBones().buffer(); + return (int *) _obj->getBones().buffer(); } -void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, int32_t * value) { +void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, spine_array_int value) { if (!obj) return; ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setBones((Vector &) value); -} - -void * spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) { - if (!obj) return nullptr; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return _obj->getVertices(); + _obj->setBones((Array &) value); } int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj) { @@ -126,32 +112,32 @@ int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj return (int32_t) _obj->getVertices().size(); } -spine_float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) { +float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) { if (!obj) return nullptr; ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_float *) _obj->getVertices().buffer(); + return (float *) _obj->getVertices().buffer(); } -void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, void * value) { +void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, spine_array_float value) { if (!obj) return; ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setVertices((Vector &) value); + _obj->setVertices((Array &) value); } -spine_size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj) { - if (!obj) return nullptr; +size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj) { + if (!obj) return 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return _obj->getWorldVerticesLength(); } -void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, spine_size_t value) { +void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, size_t value) { if (!obj) return; ClippingAttachment *_obj = (ClippingAttachment *) obj; _obj->setWorldVerticesLength(value); } spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; ClippingAttachment *_obj = (ClippingAttachment *) obj; return (spine_attachment) _obj->getTimelineAttachment(); } diff --git a/spine-c-new/src/generated/clipping_attachment.h b/spine-c-new/src/generated/clipping_attachment.h index 00179de12..44e6ad402 100644 --- a/spine-c-new/src/generated/clipping_attachment.h +++ b/spine-c-new/src/generated/clipping_attachment.h @@ -34,30 +34,26 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_clipping_attachment) - -SPINE_C_EXPORT spine_clipping_attachment spine_clipping_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_clipping_attachment spine_clipping_attachment_create(const char* name); SPINE_C_EXPORT void spine_clipping_attachment_dispose(spine_clipping_attachment obj); -SPINE_C_EXPORT spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment obj); +SPINE_C_EXPORT spine_rtti spine_clipping_attachment_get_rtti(); SPINE_C_EXPORT spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment obj); SPINE_C_EXPORT void spine_clipping_attachment_set_end_slot(spine_clipping_attachment obj, spine_slot_data value); SPINE_C_EXPORT spine_color spine_clipping_attachment_get_color(spine_clipping_attachment obj); SPINE_C_EXPORT spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment obj); -SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT int32_t spine_clipping_attachment_get_id(spine_clipping_attachment obj); -SPINE_C_EXPORT int32_t * spine_clipping_attachment_get_bones(spine_clipping_attachment obj); +SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices_7(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT int spine_clipping_attachment_get_id(spine_clipping_attachment obj); SPINE_C_EXPORT int32_t spine_clipping_attachment_get_num_bones(spine_clipping_attachment obj); -SPINE_C_EXPORT int32_t *spine_clipping_attachment_get_bones(spine_clipping_attachment obj); -SPINE_C_EXPORT void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, int32_t * value); -SPINE_C_EXPORT void * spine_clipping_attachment_get_vertices(spine_clipping_attachment obj); +SPINE_C_EXPORT int *spine_clipping_attachment_get_bones(spine_clipping_attachment obj); +SPINE_C_EXPORT void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, spine_array_int value); SPINE_C_EXPORT int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj); -SPINE_C_EXPORT spine_float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj); -SPINE_C_EXPORT void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, void * value); -SPINE_C_EXPORT spine_size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj); -SPINE_C_EXPORT void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, spine_size_t value); +SPINE_C_EXPORT float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj); +SPINE_C_EXPORT void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, spine_array_float value); +SPINE_C_EXPORT size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj); +SPINE_C_EXPORT void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, size_t value); SPINE_C_EXPORT spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment obj); SPINE_C_EXPORT void spine_clipping_attachment_set_timeline_attachment(spine_clipping_attachment obj, spine_attachment value); SPINE_C_EXPORT void spine_clipping_attachment_copy_to(spine_clipping_attachment obj, spine_vertex_attachment other); diff --git a/spine-c-new/src/generated/color.cpp b/spine-c-new/src/generated/color.cpp index 3127d9096..1ede6bbdb 100644 --- a/spine-c-new/src/generated/color.cpp +++ b/spine-c-new/src/generated/color.cpp @@ -48,13 +48,13 @@ void spine_color_dispose(spine_color obj) { } spine_color spine_color_set(spine_color obj, float _r, float _g, float _b, float _a) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; return (spine_color) &_obj->set(_r, _g, _b, _a); } -spine_color spine_color_set(spine_color obj, float _r, float _g, float _b) { - if (!obj) return nullptr; +spine_color spine_color_set_3(spine_color obj, float _r, float _g, float _b) { + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; return (spine_color) &_obj->set(_r, _g, _b); } @@ -66,25 +66,25 @@ void spine_color_set(spine_color obj, spine_color value) { } spine_color spine_color_add(spine_color obj, float _r, float _g, float _b, float _a) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; return (spine_color) &_obj->add(_r, _g, _b, _a); } -spine_color spine_color_add(spine_color obj, float _r, float _g, float _b) { - if (!obj) return nullptr; +spine_color spine_color_add_3(spine_color obj, float _r, float _g, float _b) { + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; return (spine_color) &_obj->add(_r, _g, _b); } -spine_color spine_color_add(spine_color obj, spine_color other) { - if (!obj) return nullptr; +spine_color spine_color_add_1(spine_color obj, spine_color other) { + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; - return (spine_color) &_obj->add(other); + return (spine_color) &_obj->add(*(Color*) other); } spine_color spine_color_clamp(spine_color obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; Color *_obj = (Color *) obj; return (spine_color) &_obj->clamp(); } diff --git a/spine-c-new/src/generated/color.h b/spine-c-new/src/generated/color.h index 5c9c0cdc1..c7745a496 100644 --- a/spine-c-new/src/generated/color.h +++ b/spine-c-new/src/generated/color.h @@ -34,19 +34,17 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_color) +#include "types.h" SPINE_C_EXPORT spine_color spine_color_create(void); SPINE_C_EXPORT spine_color spine_color_create_with_float_float_float_float(float r, float g, float b, float a); SPINE_C_EXPORT void spine_color_dispose(spine_color obj); SPINE_C_EXPORT spine_color spine_color_set(spine_color obj, float _r, float _g, float _b, float _a); -SPINE_C_EXPORT spine_color spine_color_set(spine_color obj, float _r, float _g, float _b); +SPINE_C_EXPORT spine_color spine_color_set_3(spine_color obj, float _r, float _g, float _b); SPINE_C_EXPORT void spine_color_set(spine_color obj, spine_color value); SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, float _r, float _g, float _b, float _a); -SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, float _r, float _g, float _b); -SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, spine_color other); +SPINE_C_EXPORT spine_color spine_color_add_3(spine_color obj, float _r, float _g, float _b); +SPINE_C_EXPORT spine_color spine_color_add_1(spine_color obj, spine_color other); SPINE_C_EXPORT spine_color spine_color_clamp(spine_color obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/constraint.cpp b/spine-c-new/src/generated/constraint.cpp index 895723aa6..a724081d3 100644 --- a/spine-c-new/src/generated/constraint.cpp +++ b/spine-c-new/src/generated/constraint.cpp @@ -32,36 +32,29 @@ using namespace spine; -spine_constraint spine_constraint_create(void) { - Constraint *obj = new (__FILE__, __LINE__) Constraint(); - return (spine_constraint) obj; -} - void spine_constraint_dispose(spine_constraint obj) { if (!obj) return; delete (Constraint *) obj; } -spine_rtti spine_constraint_get_rtti(spine_constraint obj) { - if (!obj) return nullptr; - Constraint *_obj = (Constraint *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_constraint_get_rtti() { + return (spine_rtti) &Constraint::rtti; } spine_constraint_data spine_constraint_get_data(spine_constraint obj) { if (!obj) return 0; Constraint *_obj = (Constraint *) obj; - return _obj->getData(); + return (spine_constraint_data) &_obj->getData(); } void spine_constraint_sort(spine_constraint obj, spine_skeleton skeleton) { if (!obj) return ; Constraint *_obj = (Constraint *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_constraint_is_source_active(spine_constraint obj) { - if (!obj) return 0; +bool spine_constraint_is_source_active(spine_constraint obj) { + if (!obj) return false; Constraint *_obj = (Constraint *) obj; return _obj->isSourceActive(); } @@ -81,23 +74,5 @@ void spine_constraint_setup_pose(spine_constraint obj) { void spine_constraint_update(spine_constraint obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; Constraint *_obj = (Constraint *) obj; - _obj->update(skeleton, physics); -} - -spine_bool spine_constraint_is_type(spine_constraint obj, spine_constraint_type type) { - if (!obj) return 0; - Constraint *_obj = (Constraint *) obj; - - switch (type) { - case SPINE_TYPE_CONSTRAINT_CONSTRAINT_GENERIC: - return _obj->getRTTI().instanceOf(ConstraintGeneric::rtti); - } - return 0; -} - -spine_constraint_generic spine_constraint_as_constraint_generic(spine_constraint obj) { - if (!obj) return nullptr; - Constraint *_obj = (Constraint *) obj; - if (!_obj->getRTTI().instanceOf(ConstraintGeneric::rtti)) return nullptr; - return (spine_constraint_generic) obj; + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } diff --git a/spine-c-new/src/generated/constraint.h b/spine-c-new/src/generated/constraint.h index 2a175bc1e..17094bfcf 100644 --- a/spine-c-new/src/generated/constraint.h +++ b/spine-c-new/src/generated/constraint.h @@ -34,28 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_constraint) - -SPINE_C_EXPORT spine_constraint spine_constraint_create(void); SPINE_C_EXPORT void spine_constraint_dispose(spine_constraint obj); -SPINE_C_EXPORT spine_rtti spine_constraint_get_rtti(spine_constraint obj); +SPINE_C_EXPORT spine_rtti spine_constraint_get_rtti(); SPINE_C_EXPORT spine_constraint_data spine_constraint_get_data(spine_constraint obj); SPINE_C_EXPORT void spine_constraint_sort(spine_constraint obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_constraint_is_source_active(spine_constraint obj); +SPINE_C_EXPORT bool spine_constraint_is_source_active(spine_constraint obj); SPINE_C_EXPORT void spine_constraint_pose(spine_constraint obj); SPINE_C_EXPORT void spine_constraint_setup_pose(spine_constraint obj); SPINE_C_EXPORT void spine_constraint_update(spine_constraint obj, spine_skeleton skeleton, spine_physics physics); -struct spine_constraint_generic_wrapper; -typedef struct spine_constraint_generic_wrapper *spine_constraint_generic; - -typedef enum spine_constraint_type { - SPINE_TYPE_CONSTRAINT_CONSTRAINT_GENERIC = 0 -} spine_constraint_type; - -SPINE_C_EXPORT spine_bool spine_constraint_is_type(spine_constraint obj, spine_constraint_type type); -SPINE_C_EXPORT spine_constraint_generic spine_constraint_as_constraint_generic(spine_constraint obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/constraint_data.cpp b/spine-c-new/src/generated/constraint_data.cpp index a80da8843..30e6df16e 100644 --- a/spine-c-new/src/generated/constraint_data.cpp +++ b/spine-c-new/src/generated/constraint_data.cpp @@ -32,45 +32,29 @@ using namespace spine; -spine_constraint_data spine_constraint_data_create(const utf8 * name) { - ConstraintData *obj = new (__FILE__, __LINE__) ConstraintData(String(name)); - return (spine_constraint_data) obj; -} - void spine_constraint_data_dispose(spine_constraint_data obj) { if (!obj) return; delete (ConstraintData *) obj; } -spine_rtti spine_constraint_data_get_rtti(spine_constraint_data obj) { - if (!obj) return nullptr; - ConstraintData *_obj = (ConstraintData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_constraint_data_get_rtti() { + return (spine_rtti) &ConstraintData::rtti; } spine_constraint spine_constraint_data_create(spine_constraint_data obj, spine_skeleton skeleton) { if (!obj) return 0; ConstraintData *_obj = (ConstraintData *) obj; - return (spine_constraint) _obj->create(skeleton); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } -const utf8 * spine_constraint_data_get_name(spine_constraint_data obj) { +const char* spine_constraint_data_get_name(spine_constraint_data obj) { if (!obj) return nullptr; ConstraintData *_obj = (ConstraintData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_constraint_data_is_skin_required(spine_constraint_data obj) { - if (!obj) return 0; +bool spine_constraint_data_is_skin_required(spine_constraint_data obj) { + if (!obj) return false; ConstraintData *_obj = (ConstraintData *) obj; return _obj->isSkinRequired(); } - -spine_bool spine_constraint_data_is_type(spine_constraint_data obj, spine_constraint_data_type type) { - if (!obj) return 0; - ConstraintData *_obj = (ConstraintData *) obj; - - switch (type) { - } - return 0; -} diff --git a/spine-c-new/src/generated/constraint_data.h b/spine-c-new/src/generated/constraint_data.h index 0cb3fd608..d910c5d86 100644 --- a/spine-c-new/src/generated/constraint_data.h +++ b/spine-c-new/src/generated/constraint_data.h @@ -34,21 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_constraint_data) - -SPINE_C_EXPORT spine_constraint_data spine_constraint_data_create(const utf8 * name); SPINE_C_EXPORT void spine_constraint_data_dispose(spine_constraint_data obj); -SPINE_C_EXPORT spine_rtti spine_constraint_data_get_rtti(spine_constraint_data obj); +SPINE_C_EXPORT spine_rtti spine_constraint_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_constraint_data_create(spine_constraint_data obj, spine_skeleton skeleton); -SPINE_C_EXPORT const utf8 * spine_constraint_data_get_name(spine_constraint_data obj); -SPINE_C_EXPORT spine_bool spine_constraint_data_is_skin_required(spine_constraint_data obj); - -typedef enum spine_constraint_data_type { -} spine_constraint_data_type; - -SPINE_C_EXPORT spine_bool spine_constraint_data_is_type(spine_constraint_data obj, spine_constraint_data_type type); +SPINE_C_EXPORT const char* spine_constraint_data_get_name(spine_constraint_data obj); +SPINE_C_EXPORT bool spine_constraint_data_is_skin_required(spine_constraint_data obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/constraint_data_generic.cpp b/spine-c-new/src/generated/constraint_data_generic.cpp deleted file mode 100644 index 7eea6cdb2..000000000 --- a/spine-c-new/src/generated/constraint_data_generic.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "constraint_data_generic.h" -#include - -using namespace spine; - -spine_constraint_data_generic spine_constraint_data_generic_create(const utf8 * name) { - ConstraintDataGeneric *obj = new (__FILE__, __LINE__) ConstraintDataGeneric(String(name)); - return (spine_constraint_data_generic) obj; -} - -void spine_constraint_data_generic_dispose(spine_constraint_data_generic obj) { - if (!obj) return; - delete (ConstraintDataGeneric *) obj; -} - -spine_constraint spine_constraint_data_generic_create(spine_constraint_data_generic obj, spine_skeleton skeleton) { - if (!obj) return 0; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return (spine_constraint) _obj->create(skeleton); -} - -const utf8 * spine_constraint_data_generic_get_name(spine_constraint_data_generic obj) { - if (!obj) return nullptr; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return (const utf8 *) _obj->getName().buffer(); -} - -spine_bool spine_constraint_data_generic_is_skin_required(spine_constraint_data_generic obj) { - if (!obj) return 0; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return _obj->isSkinRequired(); -} - -spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj) { - if (!obj) return nullptr; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return _obj->getSetupPose(); -} - -spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj) { - if (!obj) return nullptr; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return _obj->getSetupPose(); -} - -spine_rtti spine_constraint_data_generic_get_rtti(spine_constraint_data_generic obj) { - if (!obj) return nullptr; - ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj; - return (spine_rtti) &_obj->getRTTI(); -} diff --git a/spine-c-new/src/generated/constraint_data_generic.h b/spine-c-new/src/generated/constraint_data_generic.h deleted file mode 100644 index a8ea20326..000000000 --- a/spine-c-new/src/generated/constraint_data_generic.h +++ /dev/null @@ -1,54 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_C_CONSTRAINTDATAGENERIC_H -#define SPINE_C_CONSTRAINTDATAGENERIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_constraint_data_generic) - -SPINE_C_EXPORT spine_constraint_data_generic spine_constraint_data_generic_create(const utf8 * name); -SPINE_C_EXPORT void spine_constraint_data_generic_dispose(spine_constraint_data_generic obj); -SPINE_C_EXPORT spine_constraint spine_constraint_data_generic_create(spine_constraint_data_generic obj, spine_skeleton skeleton); -SPINE_C_EXPORT const utf8 * spine_constraint_data_generic_get_name(spine_constraint_data_generic obj); -SPINE_C_EXPORT spine_bool spine_constraint_data_generic_is_skin_required(spine_constraint_data_generic obj); -SPINE_C_EXPORT spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj); -SPINE_C_EXPORT spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj); -SPINE_C_EXPORT spine_rtti spine_constraint_data_generic_get_rtti(spine_constraint_data_generic obj); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_CONSTRAINTDATAGENERIC_H \ No newline at end of file diff --git a/spine-c-new/src/generated/constraint_generic.cpp b/spine-c-new/src/generated/constraint_generic.cpp deleted file mode 100644 index f9a0c6860..000000000 --- a/spine-c-new/src/generated/constraint_generic.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "constraint_generic.h" -#include - -using namespace spine; - -spine_constraint_generic spine_constraint_generic_create(spine_d data) { - ConstraintGeneric *obj = new (__FILE__, __LINE__) ConstraintGeneric(data); - return (spine_constraint_generic) obj; -} - -void spine_constraint_generic_dispose(spine_constraint_generic obj) { - if (!obj) return; - delete (ConstraintGeneric *) obj; -} - -spine_constraint_data spine_constraint_generic_get_data(spine_constraint_generic obj) { - if (!obj) return 0; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->getData(); -} - -void spine_constraint_generic_pose(spine_constraint_generic obj) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->pose(); -} - -void spine_constraint_generic_setup_pose(spine_constraint_generic obj) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->setupPose(); -} - -spine_p spine_constraint_generic_get_pose(spine_constraint_generic obj) { - if (!obj) return nullptr; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->getPose(); -} - -spine_p spine_constraint_generic_get_applied_pose(spine_constraint_generic obj) { - if (!obj) return nullptr; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->getAppliedPose(); -} - -void spine_constraint_generic_reset_constrained(spine_constraint_generic obj) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->resetConstrained(); -} - -void spine_constraint_generic_constrained(spine_constraint_generic obj) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->constrained(); -} - -spine_bool spine_constraint_generic_is_pose_equal_to_applied(spine_constraint_generic obj) { - if (!obj) return 0; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->isPoseEqualToApplied(); -} - -spine_bool spine_constraint_generic_is_active(spine_constraint_generic obj) { - if (!obj) return 0; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->isActive(); -} - -void spine_constraint_generic_set_active(spine_constraint_generic obj, spine_bool value) { - if (!obj) return; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->setActive(value); -} - -spine_rtti spine_constraint_generic_get_rtti(spine_constraint_generic obj) { - if (!obj) return nullptr; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return (spine_rtti) &_obj->getRTTI(); -} - -void spine_constraint_generic_sort(spine_constraint_generic obj, spine_skeleton skeleton) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->sort(skeleton); -} - -spine_bool spine_constraint_generic_is_source_active(spine_constraint_generic obj) { - if (!obj) return 0; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - return _obj->isSourceActive(); -} - -void spine_constraint_generic_update(spine_constraint_generic obj, spine_skeleton skeleton, spine_physics physics) { - if (!obj) return ; - ConstraintGeneric *_obj = (ConstraintGeneric *) obj; - _obj->update(skeleton, physics); -} diff --git a/spine-c-new/src/generated/constraint_generic.h b/spine-c-new/src/generated/constraint_generic.h deleted file mode 100644 index e67b93de6..000000000 --- a/spine-c-new/src/generated/constraint_generic.h +++ /dev/null @@ -1,62 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_C_CONSTRAINTGENERIC_H -#define SPINE_C_CONSTRAINTGENERIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_constraint_generic) - -SPINE_C_EXPORT spine_constraint_generic spine_constraint_generic_create(spine_d data); -SPINE_C_EXPORT void spine_constraint_generic_dispose(spine_constraint_generic obj); -SPINE_C_EXPORT spine_constraint_data spine_constraint_generic_get_data(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_pose(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_setup_pose(spine_constraint_generic obj); -SPINE_C_EXPORT spine_p spine_constraint_generic_get_pose(spine_constraint_generic obj); -SPINE_C_EXPORT spine_p spine_constraint_generic_get_applied_pose(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_reset_constrained(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_constrained(spine_constraint_generic obj); -SPINE_C_EXPORT spine_bool spine_constraint_generic_is_pose_equal_to_applied(spine_constraint_generic obj); -SPINE_C_EXPORT spine_bool spine_constraint_generic_is_active(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_set_active(spine_constraint_generic obj, spine_bool value); -SPINE_C_EXPORT spine_rtti spine_constraint_generic_get_rtti(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_sort(spine_constraint_generic obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_constraint_generic_is_source_active(spine_constraint_generic obj); -SPINE_C_EXPORT void spine_constraint_generic_update(spine_constraint_generic obj, spine_skeleton skeleton, spine_physics physics); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_CONSTRAINTGENERIC_H \ No newline at end of file diff --git a/spine-c-new/src/generated/constraint_timeline.cpp b/spine-c-new/src/generated/constraint_timeline.cpp index f2a4e50ca..cea4a6e4d 100644 --- a/spine-c-new/src/generated/constraint_timeline.cpp +++ b/spine-c-new/src/generated/constraint_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_constraint_timeline spine_constraint_timeline_create(int32_t constraintIndex) { +spine_constraint_timeline spine_constraint_timeline_create(int constraintIndex) { ConstraintTimeline *obj = new (__FILE__, __LINE__) ConstraintTimeline(constraintIndex); return (spine_constraint_timeline) obj; } @@ -42,19 +42,17 @@ void spine_constraint_timeline_dispose(spine_constraint_timeline obj) { delete (ConstraintTimeline *) obj; } -spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline obj) { - if (!obj) return nullptr; - ConstraintTimeline *_obj = (ConstraintTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_constraint_timeline_get_rtti() { + return (spine_rtti) &ConstraintTimeline::rtti; } -int32_t spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj) { +int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj) { if (!obj) return 0; ConstraintTimeline *_obj = (ConstraintTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int32_t value) { +void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int value) { if (!obj) return; ConstraintTimeline *_obj = (ConstraintTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/constraint_timeline.h b/spine-c-new/src/generated/constraint_timeline.h index b4dae80db..ef837fe8d 100644 --- a/spine-c-new/src/generated/constraint_timeline.h +++ b/spine-c-new/src/generated/constraint_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_constraint_timeline) - -SPINE_C_EXPORT spine_constraint_timeline spine_constraint_timeline_create(int32_t constraintIndex); +SPINE_C_EXPORT spine_constraint_timeline spine_constraint_timeline_create(int constraintIndex); SPINE_C_EXPORT void spine_constraint_timeline_dispose(spine_constraint_timeline obj); -SPINE_C_EXPORT spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline obj); -SPINE_C_EXPORT int32_t spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj); -SPINE_C_EXPORT void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int32_t value); +SPINE_C_EXPORT spine_rtti spine_constraint_timeline_get_rtti(); +SPINE_C_EXPORT int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj); +SPINE_C_EXPORT void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/constraint_timeline1.cpp b/spine-c-new/src/generated/constraint_timeline1.cpp index 292173483..ee2f6a3c6 100644 --- a/spine-c-new/src/generated/constraint_timeline1.cpp +++ b/spine-c-new/src/generated/constraint_timeline1.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_constraint_timeline1 spine_constraint_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property) { +spine_constraint_timeline1 spine_constraint_timeline1_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property) { ConstraintTimeline1 *obj = new (__FILE__, __LINE__) ConstraintTimeline1(frameCount, bezierCount, constraintIndex, property); return (spine_constraint_timeline1) obj; } @@ -42,13 +42,11 @@ void spine_constraint_timeline1_dispose(spine_constraint_timeline1 obj) { delete (ConstraintTimeline1 *) obj; } -spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 obj) { - if (!obj) return nullptr; - ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_constraint_timeline1_get_rtti() { + return (spine_rtti) &ConstraintTimeline1::rtti; } -void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, spine_size_t frame, float time, float value) { +void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, size_t frame, float time, float value) { if (!obj) return ; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; _obj->setFrame(frame, time, value); @@ -63,34 +61,34 @@ float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 obj, float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_constraint_timeline1_get_absolute_value_6(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj) { +int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj) { if (!obj) return 0; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; return _obj->getConstraintIndex(); } -void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int32_t value) { +void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int value) { if (!obj) return; ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/constraint_timeline1.h b/spine-c-new/src/generated/constraint_timeline1.h index 3211163d0..90d4ec429 100644 --- a/spine-c-new/src/generated/constraint_timeline1.h +++ b/spine-c-new/src/generated/constraint_timeline1.h @@ -34,21 +34,19 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_constraint_timeline1) - -SPINE_C_EXPORT spine_constraint_timeline1 spine_constraint_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property); +SPINE_C_EXPORT spine_constraint_timeline1 spine_constraint_timeline1_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property); SPINE_C_EXPORT void spine_constraint_timeline1_dispose(spine_constraint_timeline1 obj); -SPINE_C_EXPORT spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 obj); -SPINE_C_EXPORT void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_constraint_timeline1_get_rtti(); +SPINE_C_EXPORT void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 obj, float time); SPINE_C_EXPORT float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value_6(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj); -SPINE_C_EXPORT void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int32_t value); +SPINE_C_EXPORT int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj); +SPINE_C_EXPORT void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/curve_timeline.cpp b/spine-c-new/src/generated/curve_timeline.cpp index 57cfdca19..0ff3d3348 100644 --- a/spine-c-new/src/generated/curve_timeline.cpp +++ b/spine-c-new/src/generated/curve_timeline.cpp @@ -32,98 +32,79 @@ using namespace spine; -spine_curve_timeline spine_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount) { - CurveTimeline *obj = new (__FILE__, __LINE__) CurveTimeline(frameCount, frameEntries, bezierCount); - return (spine_curve_timeline) obj; -} - void spine_curve_timeline_dispose(spine_curve_timeline obj) { if (!obj) return; delete (CurveTimeline *) obj; } -spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_curve_timeline_get_rtti() { + return (spine_rtti) &CurveTimeline::rtti; } -void spine_curve_timeline_set_linear(spine_curve_timeline obj, spine_size_t value) { +void spine_curve_timeline_set_linear(spine_curve_timeline obj, size_t value) { if (!obj) return; CurveTimeline *_obj = (CurveTimeline *) obj; _obj->setLinear(value); } -void spine_curve_timeline_set_stepped(spine_curve_timeline obj, spine_size_t value) { +void spine_curve_timeline_set_stepped(spine_curve_timeline obj, size_t value) { if (!obj) return; CurveTimeline *_obj = (CurveTimeline *) obj; _obj->setStepped(value); } -void spine_curve_timeline_set_bezier(spine_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_curve_timeline_set_bezier(spine_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; CurveTimeline *_obj = (CurveTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_curve_timeline_get_curves(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_curve_timeline_get_num_curves(spine_curve_timeline obj) { if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_curve_timeline_get_curves(spine_curve_timeline obj) { +float *spine_curve_timeline_get_curves(spine_curve_timeline obj) { if (!obj) return nullptr; CurveTimeline *_obj = (CurveTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; CurveTimeline *_obj = (CurveTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj) { + if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj) { + if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return _obj->getFrameCount(); } -void * spine_curve_timeline_get_frames(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_curve_timeline_get_num_frames(spine_curve_timeline obj) { if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_curve_timeline_get_frames(spine_curve_timeline obj) { +float *spine_curve_timeline_get_frames(spine_curve_timeline obj) { if (!obj) return nullptr; CurveTimeline *_obj = (CurveTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_curve_timeline_get_duration(spine_curve_timeline obj) { @@ -132,20 +113,14 @@ float spine_curve_timeline_get_duration(spine_curve_timeline obj) { return _obj->getDuration(); } -void * spine_curve_timeline_get_property_ids(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_curve_timeline_get_num_property_ids(spine_curve_timeline obj) { if (!obj) return 0; CurveTimeline *_obj = (CurveTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_curve_timeline_get_property_ids(spine_curve_timeline obj) { +int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj) { if (!obj) return nullptr; CurveTimeline *_obj = (CurveTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/curve_timeline.h b/spine-c-new/src/generated/curve_timeline.h index c5c38df9c..ad810e12c 100644 --- a/spine-c-new/src/generated/curve_timeline.h +++ b/spine-c-new/src/generated/curve_timeline.h @@ -34,30 +34,24 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_curve_timeline) - -SPINE_C_EXPORT spine_curve_timeline spine_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount); SPINE_C_EXPORT void spine_curve_timeline_dispose(spine_curve_timeline obj); -SPINE_C_EXPORT spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline obj); -SPINE_C_EXPORT void spine_curve_timeline_set_linear(spine_curve_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline_set_stepped(spine_curve_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline_set_bezier(spine_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_curve_timeline_get_curves(spine_curve_timeline obj); +SPINE_C_EXPORT spine_rtti spine_curve_timeline_get_rtti(); +SPINE_C_EXPORT void spine_curve_timeline_set_linear(spine_curve_timeline obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline_set_stepped(spine_curve_timeline obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline_set_bezier(spine_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_curves(spine_curve_timeline obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline_get_curves(spine_curve_timeline obj); -SPINE_C_EXPORT void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj); -SPINE_C_EXPORT spine_size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj); -SPINE_C_EXPORT void * spine_curve_timeline_get_frames(spine_curve_timeline obj); +SPINE_C_EXPORT float *spine_curve_timeline_get_curves(spine_curve_timeline obj); +SPINE_C_EXPORT void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj); +SPINE_C_EXPORT size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj); SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_frames(spine_curve_timeline obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline_get_frames(spine_curve_timeline obj); +SPINE_C_EXPORT float *spine_curve_timeline_get_frames(spine_curve_timeline obj); SPINE_C_EXPORT float spine_curve_timeline_get_duration(spine_curve_timeline obj); -SPINE_C_EXPORT void * spine_curve_timeline_get_property_ids(spine_curve_timeline obj); SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_property_ids(spine_curve_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_curve_timeline_get_property_ids(spine_curve_timeline obj); +SPINE_C_EXPORT int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/curve_timeline1.cpp b/spine-c-new/src/generated/curve_timeline1.cpp index 840e10c9c..d8110236c 100644 --- a/spine-c-new/src/generated/curve_timeline1.cpp +++ b/spine-c-new/src/generated/curve_timeline1.cpp @@ -32,23 +32,16 @@ using namespace spine; -spine_curve_timeline1 spine_curve_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount) { - CurveTimeline1 *obj = new (__FILE__, __LINE__) CurveTimeline1(frameCount, bezierCount); - return (spine_curve_timeline1) obj; -} - void spine_curve_timeline1_dispose(spine_curve_timeline1 obj) { if (!obj) return; delete (CurveTimeline1 *) obj; } -spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_curve_timeline1_get_rtti() { + return (spine_rtti) &CurveTimeline1::rtti; } -void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, spine_size_t frame, float time, float value) { +void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, size_t frame, float time, float value) { if (!obj) return ; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; _obj->setFrame(frame, time, value); @@ -63,103 +56,91 @@ float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 obj, float tim float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_curve_timeline1_get_absolute_value_6(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, spine_size_t value) { +void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, size_t value) { if (!obj) return; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; _obj->setLinear(value); } -void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, spine_size_t value) { +void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, size_t value) { if (!obj) return; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; _obj->setStepped(value); } -void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getCurves(); -} - int32_t spine_curve_timeline1_get_num_curves(spine_curve_timeline1 obj) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) { +float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) { if (!obj) return nullptr; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj) { + if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj) { + if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return _obj->getFrameCount(); } -void * spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getFrames(); -} - int32_t spine_curve_timeline1_get_num_frames(spine_curve_timeline1 obj) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) { +float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) { if (!obj) return nullptr; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj) { @@ -168,20 +149,14 @@ float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj) { return _obj->getDuration(); } -void * spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_curve_timeline1_get_num_property_ids(spine_curve_timeline1 obj) { if (!obj) return 0; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) { +int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) { if (!obj) return nullptr; CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/curve_timeline1.h b/spine-c-new/src/generated/curve_timeline1.h index 1d88f5313..bedcae65a 100644 --- a/spine-c-new/src/generated/curve_timeline1.h +++ b/spine-c-new/src/generated/curve_timeline1.h @@ -34,36 +34,30 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_curve_timeline1) - -SPINE_C_EXPORT spine_curve_timeline1 spine_curve_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount); SPINE_C_EXPORT void spine_curve_timeline1_dispose(spine_curve_timeline1 obj); -SPINE_C_EXPORT spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 obj); -SPINE_C_EXPORT void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_curve_timeline1_get_rtti(); +SPINE_C_EXPORT void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 obj, float time); SPINE_C_EXPORT float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value_6(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_curve_timeline1_get_curves(spine_curve_timeline1 obj); +SPINE_C_EXPORT void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_curves(spine_curve_timeline1 obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj); -SPINE_C_EXPORT void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj); -SPINE_C_EXPORT spine_size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj); -SPINE_C_EXPORT void * spine_curve_timeline1_get_frames(spine_curve_timeline1 obj); +SPINE_C_EXPORT float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj); +SPINE_C_EXPORT void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj); +SPINE_C_EXPORT size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj); SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_frames(spine_curve_timeline1 obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj); +SPINE_C_EXPORT float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj); SPINE_C_EXPORT float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj); -SPINE_C_EXPORT void * spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj); SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_property_ids(spine_curve_timeline1 obj); -SPINE_C_EXPORT spine_property_id *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj); +SPINE_C_EXPORT int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/curve_timeline2.cpp b/spine-c-new/src/generated/curve_timeline2.cpp index d93648105..5ab3d3359 100644 --- a/spine-c-new/src/generated/curve_timeline2.cpp +++ b/spine-c-new/src/generated/curve_timeline2.cpp @@ -32,23 +32,16 @@ using namespace spine; -spine_curve_timeline2 spine_curve_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount) { - CurveTimeline2 *obj = new (__FILE__, __LINE__) CurveTimeline2(frameCount, bezierCount); - return (spine_curve_timeline2) obj; -} - void spine_curve_timeline2_dispose(spine_curve_timeline2 obj) { if (!obj) return; delete (CurveTimeline2 *) obj; } -spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_curve_timeline2_get_rtti() { + return (spine_rtti) &CurveTimeline2::rtti; } -void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, spine_size_t frame, float time, float value1, float value2) { +void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, size_t frame, float time, float value1, float value2) { if (!obj) return ; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; _obj->setFrame(frame, time, value1, value2); @@ -60,82 +53,70 @@ float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 obj, float tim return _obj->getCurveValue(time); } -void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, spine_size_t value) { +void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, size_t value) { if (!obj) return; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; _obj->setLinear(value); } -void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, spine_size_t value) { +void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, size_t value) { if (!obj) return; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; _obj->setStepped(value); } -void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getCurves(); -} - int32_t spine_curve_timeline2_get_num_curves(spine_curve_timeline2 obj) { if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) { +float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) { if (!obj) return nullptr; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj) { + if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj) { - if (!obj) return nullptr; +size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj) { + if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return _obj->getFrameCount(); } -void * spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getFrames(); -} - int32_t spine_curve_timeline2_get_num_frames(spine_curve_timeline2 obj) { if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) { +float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) { if (!obj) return nullptr; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj) { @@ -144,20 +125,14 @@ float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj) { return _obj->getDuration(); } -void * spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_curve_timeline2_get_num_property_ids(spine_curve_timeline2 obj) { if (!obj) return 0; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) { +int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) { if (!obj) return nullptr; CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/curve_timeline2.h b/spine-c-new/src/generated/curve_timeline2.h index 58005aae6..84f3ec911 100644 --- a/spine-c-new/src/generated/curve_timeline2.h +++ b/spine-c-new/src/generated/curve_timeline2.h @@ -34,32 +34,26 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_curve_timeline2) - -SPINE_C_EXPORT spine_curve_timeline2 spine_curve_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount); SPINE_C_EXPORT void spine_curve_timeline2_dispose(spine_curve_timeline2 obj); -SPINE_C_EXPORT spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 obj); -SPINE_C_EXPORT void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, spine_size_t frame, float time, float value1, float value2); +SPINE_C_EXPORT spine_rtti spine_curve_timeline2_get_rtti(); +SPINE_C_EXPORT void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, size_t frame, float time, float value1, float value2); SPINE_C_EXPORT float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 obj, float time); -SPINE_C_EXPORT void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, spine_size_t value); -SPINE_C_EXPORT void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_curve_timeline2_get_curves(spine_curve_timeline2 obj); +SPINE_C_EXPORT void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, size_t value); +SPINE_C_EXPORT void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_curves(spine_curve_timeline2 obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj); -SPINE_C_EXPORT void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj); -SPINE_C_EXPORT spine_size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj); -SPINE_C_EXPORT void * spine_curve_timeline2_get_frames(spine_curve_timeline2 obj); +SPINE_C_EXPORT float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj); +SPINE_C_EXPORT void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj); +SPINE_C_EXPORT size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj); SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_frames(spine_curve_timeline2 obj); -SPINE_C_EXPORT spine_float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj); +SPINE_C_EXPORT float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj); SPINE_C_EXPORT float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj); -SPINE_C_EXPORT void * spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj); SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_property_ids(spine_curve_timeline2 obj); -SPINE_C_EXPORT spine_property_id *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj); +SPINE_C_EXPORT int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/deform_timeline.cpp b/spine-c-new/src/generated/deform_timeline.cpp index 76aa5640c..1e192966e 100644 --- a/spine-c-new/src/generated/deform_timeline.cpp +++ b/spine-c-new/src/generated/deform_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_deform_timeline spine_deform_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex, spine_vertex_attachment attachment) { +spine_deform_timeline spine_deform_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex, spine_vertex_attachment attachment) { DeformTimeline *obj = new (__FILE__, __LINE__) DeformTimeline(frameCount, bezierCount, slotIndex, (VertexAttachment *) attachment); return (spine_deform_timeline) obj; } @@ -42,22 +42,14 @@ void spine_deform_timeline_dispose(spine_deform_timeline obj) { delete (DeformTimeline *) obj; } -spine_rtti spine_deform_timeline_get_rtti(spine_deform_timeline obj) { - if (!obj) return nullptr; - DeformTimeline *_obj = (DeformTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_deform_timeline_get_rtti() { + return (spine_rtti) &DeformTimeline::rtti; } -void spine_deform_timeline_set_frame(spine_deform_timeline obj, int32_t frameIndex, float time, void * vertices) { +void spine_deform_timeline_set_frame(spine_deform_timeline obj, int frameIndex, float time, spine_array_float vertices) { if (!obj) return ; DeformTimeline *_obj = (DeformTimeline *) obj; - _obj->setFrame(frameIndex, time, (Vector &) vertices); -} - -void * spine_deform_timeline_get_vertices(spine_deform_timeline obj) { - if (!obj) return nullptr; - DeformTimeline *_obj = (DeformTimeline *) obj; - return _obj->getVertices(); + _obj->setFrame(frameIndex, time, (Array &) vertices); } int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj) { @@ -66,14 +58,14 @@ int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj) { return (int32_t) _obj->getVertices().size(); } -spine_vectorgetVertices().buffer(); + return (spine_arraygetVertices().buffer(); } spine_vertex_attachment spine_deform_timeline_get_attachment(spine_deform_timeline obj) { - if (!obj) return nullptr; + if (!obj) return (spine_vertex_attachment) 0; DeformTimeline *_obj = (DeformTimeline *) obj; return (spine_vertex_attachment) _obj->getAttachment(); } @@ -84,26 +76,26 @@ void spine_deform_timeline_set_attachment(spine_deform_timeline obj, spine_verte _obj->setAttachment((VertexAttachment *) value); } -void spine_deform_timeline_set_bezier(spine_deform_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_deform_timeline_set_bezier(spine_deform_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; DeformTimeline *_obj = (DeformTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int32_t frame) { +float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int frame) { if (!obj) return 0; DeformTimeline *_obj = (DeformTimeline *) obj; return _obj->getCurvePercent(time, frame); } -spine_size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj) { - if (!obj) return nullptr; +size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj) { + if (!obj) return 0; DeformTimeline *_obj = (DeformTimeline *) obj; return _obj->getFrameCount(); } -void spine_deform_timeline_apply(spine_deform_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_deform_timeline_apply(spine_deform_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; DeformTimeline *_obj = (DeformTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } diff --git a/spine-c-new/src/generated/deform_timeline.h b/spine-c-new/src/generated/deform_timeline.h index 5a0800a23..abfe6e002 100644 --- a/spine-c-new/src/generated/deform_timeline.h +++ b/spine-c-new/src/generated/deform_timeline.h @@ -34,23 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_deform_timeline) - -SPINE_C_EXPORT spine_deform_timeline spine_deform_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex, spine_vertex_attachment attachment); +SPINE_C_EXPORT spine_deform_timeline spine_deform_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex, spine_vertex_attachment attachment); SPINE_C_EXPORT void spine_deform_timeline_dispose(spine_deform_timeline obj); -SPINE_C_EXPORT spine_rtti spine_deform_timeline_get_rtti(spine_deform_timeline obj); -SPINE_C_EXPORT void spine_deform_timeline_set_frame(spine_deform_timeline obj, int32_t frameIndex, float time, void * vertices); -SPINE_C_EXPORT void * spine_deform_timeline_get_vertices(spine_deform_timeline obj); +SPINE_C_EXPORT spine_rtti spine_deform_timeline_get_rtti(); +SPINE_C_EXPORT void spine_deform_timeline_set_frame(spine_deform_timeline obj, int frameIndex, float time, spine_array_float vertices); SPINE_C_EXPORT int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj); -SPINE_C_EXPORT spine_vectorgetRTTI(); +spine_rtti spine_draw_order_timeline_get_rtti() { + return (spine_rtti) &DrawOrderTimeline::rtti; } -void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj) { - if (!obj) return nullptr; +size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj) { + if (!obj) return 0; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; return _obj->getFrameCount(); } -void * spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj) { - if (!obj) return nullptr; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return _obj->getDrawOrders(); -} - int32_t spine_draw_order_timeline_get_num_draw_orders(spine_draw_order_timeline obj) { if (!obj) return 0; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; return (int32_t) _obj->getDrawOrders().size(); } -spine_vectorgetDrawOrders().buffer(); + return (spine_arraygetDrawOrders().buffer(); } -void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, spine_size_t frame, float time, int32_t * drawOrder) { +void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, size_t frame, float time, spine_array_int drawOrder) { if (!obj) return ; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - _obj->setFrame(frame, time, (Vector *) drawOrder); + _obj->setFrame(frame, time, (Array *) drawOrder); } -spine_size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj) { - if (!obj) return nullptr; +size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj) { + if (!obj) return 0; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; return _obj->getFrameEntries(); } -void * spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) { - if (!obj) return nullptr; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_draw_order_timeline_get_num_frames(spine_draw_order_timeline obj) { if (!obj) return 0; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) { +float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) { if (!obj) return nullptr; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj) { @@ -114,20 +100,14 @@ float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj) { return _obj->getDuration(); } -void * spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) { - if (!obj) return nullptr; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_draw_order_timeline_get_num_property_ids(spine_draw_order_timeline obj) { if (!obj) return 0; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) { +int64_t *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) { if (!obj) return nullptr; DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/draw_order_timeline.h b/spine-c-new/src/generated/draw_order_timeline.h index bb66223b3..2a18de1ce 100644 --- a/spine-c-new/src/generated/draw_order_timeline.h +++ b/spine-c-new/src/generated/draw_order_timeline.h @@ -34,27 +34,22 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_draw_order_timeline) - -SPINE_C_EXPORT spine_draw_order_timeline spine_draw_order_timeline_create(spine_size_t frameCount); +SPINE_C_EXPORT spine_draw_order_timeline spine_draw_order_timeline_create(size_t frameCount); SPINE_C_EXPORT void spine_draw_order_timeline_dispose(spine_draw_order_timeline obj); -SPINE_C_EXPORT spine_rtti spine_draw_order_timeline_get_rtti(spine_draw_order_timeline obj); -SPINE_C_EXPORT void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj); -SPINE_C_EXPORT void * spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj); +SPINE_C_EXPORT spine_rtti spine_draw_order_timeline_get_rtti(); +SPINE_C_EXPORT void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj); SPINE_C_EXPORT int32_t spine_draw_order_timeline_get_num_draw_orders(spine_draw_order_timeline obj); -SPINE_C_EXPORT spine_vectorgetData(); + return (spine_event_data) &_obj->getData(); } float spine_event_get_time(spine_event obj) { @@ -54,13 +54,13 @@ float spine_event_get_time(spine_event obj) { return _obj->getTime(); } -int32_t spine_event_get_int(spine_event obj) { +int spine_event_get_int(spine_event obj) { if (!obj) return 0; Event *_obj = (Event *) obj; return _obj->getInt(); } -void spine_event_set_int(spine_event obj, int32_t value) { +void spine_event_set_int(spine_event obj, int value) { if (!obj) return; Event *_obj = (Event *) obj; _obj->setInt(value); @@ -78,13 +78,13 @@ void spine_event_set_float(spine_event obj, float value) { _obj->setFloat(value); } -const utf8 * spine_event_get_string(spine_event obj) { +const char* spine_event_get_string(spine_event obj) { if (!obj) return nullptr; Event *_obj = (Event *) obj; - return (const utf8 *) _obj->getString().buffer(); + return (const char *) _obj->getString().buffer(); } -void spine_event_set_string(spine_event obj, const utf8 * value) { +void spine_event_set_string(spine_event obj, const char* value) { if (!obj) return; Event *_obj = (Event *) obj; _obj->setString(String(value)); diff --git a/spine-c-new/src/generated/event.h b/spine-c-new/src/generated/event.h index bf8b987ff..514857b09 100644 --- a/spine-c-new/src/generated/event.h +++ b/spine-c-new/src/generated/event.h @@ -34,20 +34,18 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_event) +#include "types.h" SPINE_C_EXPORT spine_event spine_event_create(float time, spine_event_data data); SPINE_C_EXPORT void spine_event_dispose(spine_event obj); SPINE_C_EXPORT spine_event_data spine_event_get_data(spine_event obj); SPINE_C_EXPORT float spine_event_get_time(spine_event obj); -SPINE_C_EXPORT int32_t spine_event_get_int(spine_event obj); -SPINE_C_EXPORT void spine_event_set_int(spine_event obj, int32_t value); +SPINE_C_EXPORT int spine_event_get_int(spine_event obj); +SPINE_C_EXPORT void spine_event_set_int(spine_event obj, int value); SPINE_C_EXPORT float spine_event_get_float(spine_event obj); SPINE_C_EXPORT void spine_event_set_float(spine_event obj, float value); -SPINE_C_EXPORT const utf8 * spine_event_get_string(spine_event obj); -SPINE_C_EXPORT void spine_event_set_string(spine_event obj, const utf8 * value); +SPINE_C_EXPORT const char* spine_event_get_string(spine_event obj); +SPINE_C_EXPORT void spine_event_set_string(spine_event obj, const char* value); SPINE_C_EXPORT float spine_event_get_volume(spine_event obj); SPINE_C_EXPORT void spine_event_set_volume(spine_event obj, float value); SPINE_C_EXPORT float spine_event_get_balance(spine_event obj); diff --git a/spine-c-new/src/generated/event_data.cpp b/spine-c-new/src/generated/event_data.cpp index fa036960d..d7b9c1cfb 100644 --- a/spine-c-new/src/generated/event_data.cpp +++ b/spine-c-new/src/generated/event_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_event_data spine_event_data_create(const utf8 * name) { +spine_event_data spine_event_data_create(const char* name) { EventData *obj = new (__FILE__, __LINE__) EventData(String(name)); return (spine_event_data) obj; } @@ -42,34 +42,58 @@ void spine_event_data_dispose(spine_event_data obj) { delete (EventData *) obj; } -const utf8 * spine_event_data_get_name(spine_event_data obj) { +const char* spine_event_data_get_name(spine_event_data obj) { if (!obj) return nullptr; EventData *_obj = (EventData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -int32_t spine_event_data_get_int_value(spine_event_data obj) { +int spine_event_data_get_int_value(spine_event_data obj) { if (!obj) return 0; EventData *_obj = (EventData *) obj; return _obj->getIntValue(); } +void spine_event_data_set_int_value(spine_event_data obj, int value) { + if (!obj) return; + EventData *_obj = (EventData *) obj; + _obj->setIntValue(value); +} + float spine_event_data_get_float_value(spine_event_data obj) { if (!obj) return 0; EventData *_obj = (EventData *) obj; return _obj->getFloatValue(); } -const utf8 * spine_event_data_get_string_value(spine_event_data obj) { - if (!obj) return nullptr; +void spine_event_data_set_float_value(spine_event_data obj, float value) { + if (!obj) return; EventData *_obj = (EventData *) obj; - return (const utf8 *) _obj->getStringValue().buffer(); + _obj->setFloatValue(value); } -const utf8 * spine_event_data_get_audio_path(spine_event_data obj) { +const char* spine_event_data_get_string_value(spine_event_data obj) { if (!obj) return nullptr; EventData *_obj = (EventData *) obj; - return (const utf8 *) _obj->getAudioPath().buffer(); + return (const char *) _obj->getStringValue().buffer(); +} + +void spine_event_data_set_string_value(spine_event_data obj, const char* value) { + if (!obj) return; + EventData *_obj = (EventData *) obj; + _obj->setStringValue(String(value)); +} + +const char* spine_event_data_get_audio_path(spine_event_data obj) { + if (!obj) return nullptr; + EventData *_obj = (EventData *) obj; + return (const char *) _obj->getAudioPath().buffer(); +} + +void spine_event_data_set_audio_path(spine_event_data obj, const char* value) { + if (!obj) return; + EventData *_obj = (EventData *) obj; + _obj->setAudioPath(String(value)); } float spine_event_data_get_volume(spine_event_data obj) { @@ -78,8 +102,20 @@ float spine_event_data_get_volume(spine_event_data obj) { return _obj->getVolume(); } +void spine_event_data_set_volume(spine_event_data obj, float value) { + if (!obj) return; + EventData *_obj = (EventData *) obj; + _obj->setVolume(value); +} + float spine_event_data_get_balance(spine_event_data obj) { if (!obj) return 0; EventData *_obj = (EventData *) obj; return _obj->getBalance(); } + +void spine_event_data_set_balance(spine_event_data obj, float value) { + if (!obj) return; + EventData *_obj = (EventData *) obj; + _obj->setBalance(value); +} diff --git a/spine-c-new/src/generated/event_data.h b/spine-c-new/src/generated/event_data.h index 7bdee5b5f..928b51f8a 100644 --- a/spine-c-new/src/generated/event_data.h +++ b/spine-c-new/src/generated/event_data.h @@ -34,19 +34,23 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_event_data) - -SPINE_C_EXPORT spine_event_data spine_event_data_create(const utf8 * name); +SPINE_C_EXPORT spine_event_data spine_event_data_create(const char* name); SPINE_C_EXPORT void spine_event_data_dispose(spine_event_data obj); -SPINE_C_EXPORT const utf8 * spine_event_data_get_name(spine_event_data obj); -SPINE_C_EXPORT int32_t spine_event_data_get_int_value(spine_event_data obj); +SPINE_C_EXPORT const char* spine_event_data_get_name(spine_event_data obj); +SPINE_C_EXPORT int spine_event_data_get_int_value(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_int_value(spine_event_data obj, int value); SPINE_C_EXPORT float spine_event_data_get_float_value(spine_event_data obj); -SPINE_C_EXPORT const utf8 * spine_event_data_get_string_value(spine_event_data obj); -SPINE_C_EXPORT const utf8 * spine_event_data_get_audio_path(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_float_value(spine_event_data obj, float value); +SPINE_C_EXPORT const char* spine_event_data_get_string_value(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_string_value(spine_event_data obj, const char* value); +SPINE_C_EXPORT const char* spine_event_data_get_audio_path(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_audio_path(spine_event_data obj, const char* value); SPINE_C_EXPORT float spine_event_data_get_volume(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_volume(spine_event_data obj, float value); SPINE_C_EXPORT float spine_event_data_get_balance(spine_event_data obj); +SPINE_C_EXPORT void spine_event_data_set_balance(spine_event_data obj, float value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/event_queue_entry.h b/spine-c-new/src/generated/event_queue_entry.h index 1912ffbe4..21c748f58 100644 --- a/spine-c-new/src/generated/event_queue_entry.h +++ b/spine-c-new/src/generated/event_queue_entry.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_event_queue_entry) +#include "types.h" SPINE_C_EXPORT spine_event_queue_entry spine_event_queue_entry_create(spine_event_type eventType, spine_track_entry trackEntry, spine_event event); SPINE_C_EXPORT void spine_event_queue_entry_dispose(spine_event_queue_entry obj); diff --git a/spine-c-new/src/generated/event_timeline.cpp b/spine-c-new/src/generated/event_timeline.cpp index 254380299..2b0e4c225 100644 --- a/spine-c-new/src/generated/event_timeline.cpp +++ b/spine-c-new/src/generated/event_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_event_timeline spine_event_timeline_create(spine_size_t frameCount) { +spine_event_timeline spine_event_timeline_create(size_t frameCount) { EventTimeline *obj = new (__FILE__, __LINE__) EventTimeline(frameCount); return (spine_event_timeline) obj; } @@ -42,30 +42,22 @@ void spine_event_timeline_dispose(spine_event_timeline obj) { delete (EventTimeline *) obj; } -spine_rtti spine_event_timeline_get_rtti(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_event_timeline_get_rtti() { + return (spine_rtti) &EventTimeline::rtti; } -void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; EventTimeline *_obj = (EventTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_event_timeline_get_frame_count(spine_event_timeline obj) { - if (!obj) return nullptr; +size_t spine_event_timeline_get_frame_count(spine_event_timeline obj) { + if (!obj) return 0; EventTimeline *_obj = (EventTimeline *) obj; return _obj->getFrameCount(); } -void * spine_event_timeline_get_events(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return (void *) _obj->getEvents(); -} - int32_t spine_event_timeline_get_num_events(spine_event_timeline obj) { if (!obj) return 0; EventTimeline *_obj = (EventTimeline *) obj; @@ -78,34 +70,28 @@ spine_event *spine_event_timeline_get_events(spine_event_timeline obj) { return (spine_event *) _obj->getEvents().buffer(); } -void spine_event_timeline_set_frame(spine_event_timeline obj, spine_size_t frame, spine_event event) { +void spine_event_timeline_set_frame(spine_event_timeline obj, size_t frame, spine_event event) { if (!obj) return ; EventTimeline *_obj = (EventTimeline *) obj; _obj->setFrame(frame, (Event *) event); } -spine_size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj) { - if (!obj) return nullptr; +size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj) { + if (!obj) return 0; EventTimeline *_obj = (EventTimeline *) obj; return _obj->getFrameEntries(); } -void * spine_event_timeline_get_frames(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_event_timeline_get_num_frames(spine_event_timeline obj) { if (!obj) return 0; EventTimeline *_obj = (EventTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_event_timeline_get_frames(spine_event_timeline obj) { +float *spine_event_timeline_get_frames(spine_event_timeline obj) { if (!obj) return nullptr; EventTimeline *_obj = (EventTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_event_timeline_get_duration(spine_event_timeline obj) { @@ -114,20 +100,14 @@ float spine_event_timeline_get_duration(spine_event_timeline obj) { return _obj->getDuration(); } -void * spine_event_timeline_get_property_ids(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_event_timeline_get_num_property_ids(spine_event_timeline obj) { if (!obj) return 0; EventTimeline *_obj = (EventTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_event_timeline_get_property_ids(spine_event_timeline obj) { +int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj) { if (!obj) return nullptr; EventTimeline *_obj = (EventTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/event_timeline.h b/spine-c-new/src/generated/event_timeline.h index 3661c41ca..989a386a3 100644 --- a/spine-c-new/src/generated/event_timeline.h +++ b/spine-c-new/src/generated/event_timeline.h @@ -34,27 +34,22 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_event_timeline) - -SPINE_C_EXPORT spine_event_timeline spine_event_timeline_create(spine_size_t frameCount); +SPINE_C_EXPORT spine_event_timeline spine_event_timeline_create(size_t frameCount); SPINE_C_EXPORT void spine_event_timeline_dispose(spine_event_timeline obj); -SPINE_C_EXPORT spine_rtti spine_event_timeline_get_rtti(spine_event_timeline obj); -SPINE_C_EXPORT void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_event_timeline_get_frame_count(spine_event_timeline obj); -SPINE_C_EXPORT void * spine_event_timeline_get_events(spine_event_timeline obj); +SPINE_C_EXPORT spine_rtti spine_event_timeline_get_rtti(); +SPINE_C_EXPORT void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_event_timeline_get_frame_count(spine_event_timeline obj); SPINE_C_EXPORT int32_t spine_event_timeline_get_num_events(spine_event_timeline obj); SPINE_C_EXPORT spine_event *spine_event_timeline_get_events(spine_event_timeline obj); -SPINE_C_EXPORT void spine_event_timeline_set_frame(spine_event_timeline obj, spine_size_t frame, spine_event event); -SPINE_C_EXPORT spine_size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj); -SPINE_C_EXPORT void * spine_event_timeline_get_frames(spine_event_timeline obj); +SPINE_C_EXPORT void spine_event_timeline_set_frame(spine_event_timeline obj, size_t frame, spine_event event); +SPINE_C_EXPORT size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj); SPINE_C_EXPORT int32_t spine_event_timeline_get_num_frames(spine_event_timeline obj); -SPINE_C_EXPORT spine_float *spine_event_timeline_get_frames(spine_event_timeline obj); +SPINE_C_EXPORT float *spine_event_timeline_get_frames(spine_event_timeline obj); SPINE_C_EXPORT float spine_event_timeline_get_duration(spine_event_timeline obj); -SPINE_C_EXPORT void * spine_event_timeline_get_property_ids(spine_event_timeline obj); SPINE_C_EXPORT int32_t spine_event_timeline_get_num_property_ids(spine_event_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_event_timeline_get_property_ids(spine_event_timeline obj); +SPINE_C_EXPORT int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/event_type.h b/spine-c-new/src/generated/event_type.h index 563d86f6c..b96701705 100644 --- a/spine-c-new/src/generated/event_type.h +++ b/spine-c-new/src/generated/event_type.h @@ -30,19 +30,19 @@ #ifndef SPINE_C_EVENTTYPE_H #define SPINE_C_EVENTTYPE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_event_type { - SPINE_EVENT_TYPE_EVENT_TYPE_START = 0, - SPINE_EVENT_TYPE_EVENT_TYPE_INTERRUPT, - SPINE_EVENT_TYPE_EVENT_TYPE_END, - SPINE_EVENT_TYPE_EVENT_TYPE_DISPOSE, - SPINE_EVENT_TYPE_EVENT_TYPE_COMPLETE, - SPINE_EVENT_TYPE_EVENT_TYPE_EVENT + SPINE_EVENT_TYPE_START = 0, + SPINE_EVENT_TYPE_INTERRUPT, + SPINE_EVENT_TYPE_END, + SPINE_EVENT_TYPE_DISPOSE, + SPINE_EVENT_TYPE_COMPLETE, + SPINE_EVENT_TYPE_EVENT } spine_event_type; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/format.h b/spine-c-new/src/generated/format.h index 261dc6ff2..f090e0eb5 100644 --- a/spine-c-new/src/generated/format.h +++ b/spine-c-new/src/generated/format.h @@ -30,20 +30,20 @@ #ifndef SPINE_C_FORMAT_H #define SPINE_C_FORMAT_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_format { - SPINE_FORMAT_FORMAT_ALPHA, - SPINE_FORMAT_FORMAT_INTENSITY, - SPINE_FORMAT_FORMAT_LUMINANCE_ALPHA, - SPINE_FORMAT_FORMAT_RGB565, - SPINE_FORMAT_FORMAT_RGBA4444, - SPINE_FORMAT_FORMAT_RGB888, - SPINE_FORMAT_FORMAT_RGBA8888 + SPINE_FORMAT_ALPHA, + SPINE_FORMAT_INTENSITY, + SPINE_FORMAT_LUMINANCE_ALPHA, + SPINE_FORMAT_RGB565, + SPINE_FORMAT_RGBA4444, + SPINE_FORMAT_RGB888, + SPINE_FORMAT_RGBA8888 } spine_format; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/from_property.cpp b/spine-c-new/src/generated/from_property.cpp index 0909007ab..e06b66b5b 100644 --- a/spine-c-new/src/generated/from_property.cpp +++ b/spine-c-new/src/generated/from_property.cpp @@ -32,18 +32,13 @@ using namespace spine; -spine_from_property spine_from_property_create(void) { - FromProperty *obj = new (__FILE__, __LINE__) FromProperty(); - return (spine_from_property) obj; -} - void spine_from_property_dispose(spine_from_property obj) { if (!obj) return; delete (FromProperty *) obj; } -float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromProperty *_obj = (FromProperty *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_property.h b/spine-c-new/src/generated/from_property.h index a1aca63de..4683b1643 100644 --- a/spine-c-new/src/generated/from_property.h +++ b/spine-c-new/src/generated/from_property.h @@ -34,13 +34,10 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_from_property) - -SPINE_C_EXPORT spine_from_property spine_from_property_create(void); SPINE_C_EXPORT void spine_from_property_dispose(spine_from_property obj); -SPINE_C_EXPORT float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_rotate.cpp b/spine-c-new/src/generated/from_rotate.cpp index ba220bc6f..eddd397aa 100644 --- a/spine-c-new/src/generated/from_rotate.cpp +++ b/spine-c-new/src/generated/from_rotate.cpp @@ -37,8 +37,8 @@ void spine_from_rotate_dispose(spine_from_rotate obj) { delete (FromRotate *) obj; } -float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromRotate *_obj = (FromRotate *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_rotate.h b/spine-c-new/src/generated/from_rotate.h index f213dba5a..1b442ed44 100644 --- a/spine-c-new/src/generated/from_rotate.h +++ b/spine-c-new/src/generated/from_rotate.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_rotate) +#include "types.h" SPINE_C_EXPORT void spine_from_rotate_dispose(spine_from_rotate obj); -SPINE_C_EXPORT float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_scale_x.cpp b/spine-c-new/src/generated/from_scale_x.cpp index 89c9692eb..f39c47954 100644 --- a/spine-c-new/src/generated/from_scale_x.cpp +++ b/spine-c-new/src/generated/from_scale_x.cpp @@ -37,8 +37,8 @@ void spine_from_scale_x_dispose(spine_from_scale_x obj) { delete (FromScaleX *) obj; } -float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromScaleX *_obj = (FromScaleX *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_scale_x.h b/spine-c-new/src/generated/from_scale_x.h index 79898b862..fee59f155 100644 --- a/spine-c-new/src/generated/from_scale_x.h +++ b/spine-c-new/src/generated/from_scale_x.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_scale_x) +#include "types.h" SPINE_C_EXPORT void spine_from_scale_x_dispose(spine_from_scale_x obj); -SPINE_C_EXPORT float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_scale_y.cpp b/spine-c-new/src/generated/from_scale_y.cpp index 7739c7866..70bdd4635 100644 --- a/spine-c-new/src/generated/from_scale_y.cpp +++ b/spine-c-new/src/generated/from_scale_y.cpp @@ -37,8 +37,8 @@ void spine_from_scale_y_dispose(spine_from_scale_y obj) { delete (FromScaleY *) obj; } -float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromScaleY *_obj = (FromScaleY *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_scale_y.h b/spine-c-new/src/generated/from_scale_y.h index ff633b0a0..97f605075 100644 --- a/spine-c-new/src/generated/from_scale_y.h +++ b/spine-c-new/src/generated/from_scale_y.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_scale_y) +#include "types.h" SPINE_C_EXPORT void spine_from_scale_y_dispose(spine_from_scale_y obj); -SPINE_C_EXPORT float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_shear_y.cpp b/spine-c-new/src/generated/from_shear_y.cpp index f7d8bb240..b5d6022a8 100644 --- a/spine-c-new/src/generated/from_shear_y.cpp +++ b/spine-c-new/src/generated/from_shear_y.cpp @@ -37,8 +37,8 @@ void spine_from_shear_y_dispose(spine_from_shear_y obj) { delete (FromShearY *) obj; } -float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromShearY *_obj = (FromShearY *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_shear_y.h b/spine-c-new/src/generated/from_shear_y.h index 19493b985..9b96cb8ec 100644 --- a/spine-c-new/src/generated/from_shear_y.h +++ b/spine-c-new/src/generated/from_shear_y.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_shear_y) +#include "types.h" SPINE_C_EXPORT void spine_from_shear_y_dispose(spine_from_shear_y obj); -SPINE_C_EXPORT float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_x.cpp b/spine-c-new/src/generated/from_x.cpp index 4b6bd1efc..3683e3c90 100644 --- a/spine-c-new/src/generated/from_x.cpp +++ b/spine-c-new/src/generated/from_x.cpp @@ -37,8 +37,8 @@ void spine_from_x_dispose(spine_from_x obj) { delete (FromX *) obj; } -float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromX *_obj = (FromX *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_x.h b/spine-c-new/src/generated/from_x.h index 425b792d9..63f00660e 100644 --- a/spine-c-new/src/generated/from_x.h +++ b/spine-c-new/src/generated/from_x.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_x) +#include "types.h" SPINE_C_EXPORT void spine_from_x_dispose(spine_from_x obj); -SPINE_C_EXPORT float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/from_y.cpp b/spine-c-new/src/generated/from_y.cpp index c7c940ff3..91ceab445 100644 --- a/spine-c-new/src/generated/from_y.cpp +++ b/spine-c-new/src/generated/from_y.cpp @@ -37,8 +37,8 @@ void spine_from_y_dispose(spine_from_y obj) { delete (FromY *) obj; } -float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) { +float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { if (!obj) return 0; FromY *_obj = (FromY *) obj; - return _obj->value(skeleton, source, local, (float *) offsets); + return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets); } diff --git a/spine-c-new/src/generated/from_y.h b/spine-c-new/src/generated/from_y.h index 8c679e825..092a71b1c 100644 --- a/spine-c-new/src/generated/from_y.h +++ b/spine-c-new/src/generated/from_y.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_from_y) +#include "types.h" SPINE_C_EXPORT void spine_from_y_dispose(spine_from_y obj); -SPINE_C_EXPORT float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets); +SPINE_C_EXPORT float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/hash_map.cpp b/spine-c-new/src/generated/hash_map.cpp deleted file mode 100644 index 10debce77..000000000 --- a/spine-c-new/src/generated/hash_map.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "hash_map.h" -#include - -using namespace spine; - -spine_hash_map spine_hash_map_create(void) { - HashMap *obj = new (__FILE__, __LINE__) HashMap(); - return (spine_hash_map) obj; -} - -void spine_hash_map_dispose(spine_hash_map obj) { - if (!obj) return; - delete (HashMap *) obj; -} - -void spine_hash_map_clear(spine_hash_map obj) { - if (!obj) return ; - HashMap *_obj = (HashMap *) obj; - _obj->clear(); -} - -spine_size_t spine_hash_map_size(spine_hash_map obj) { - if (!obj) return nullptr; - HashMap *_obj = (HashMap *) obj; - return _obj->size(); -} - -void spine_hash_map_put(spine_hash_map obj, spine_k key, spine_v value) { - if (!obj) return ; - HashMap *_obj = (HashMap *) obj; - _obj->put(key, value); -} - -spine_bool spine_hash_map_add_all(spine_hash_map obj, void * keys, spine_v value) { - if (!obj) return 0; - HashMap *_obj = (HashMap *) obj; - return _obj->addAll((Vector &) keys, value); -} - -spine_bool spine_hash_map_contains_key(spine_hash_map obj, spine_k key) { - if (!obj) return 0; - HashMap *_obj = (HashMap *) obj; - return _obj->containsKey(key); -} - -spine_bool spine_hash_map_remove(spine_hash_map obj, spine_k key) { - if (!obj) return 0; - HashMap *_obj = (HashMap *) obj; - return _obj->remove(key); -} - -spine_entries spine_hash_map_get_entries(spine_hash_map obj) { - if (!obj) return nullptr; - HashMap *_obj = (HashMap *) obj; - return _obj->getEntries(); -} diff --git a/spine-c-new/src/generated/hash_map.h b/spine-c-new/src/generated/hash_map.h deleted file mode 100644 index 339f9c430..000000000 --- a/spine-c-new/src/generated/hash_map.h +++ /dev/null @@ -1,55 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_C_HASHMAP_H -#define SPINE_C_HASHMAP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_hash_map) - -SPINE_C_EXPORT spine_hash_map spine_hash_map_create(void); -SPINE_C_EXPORT void spine_hash_map_dispose(spine_hash_map obj); -SPINE_C_EXPORT void spine_hash_map_clear(spine_hash_map obj); -SPINE_C_EXPORT spine_size_t spine_hash_map_size(spine_hash_map obj); -SPINE_C_EXPORT void spine_hash_map_put(spine_hash_map obj, spine_k key, spine_v value); -SPINE_C_EXPORT spine_bool spine_hash_map_add_all(spine_hash_map obj, void * keys, spine_v value); -SPINE_C_EXPORT spine_bool spine_hash_map_contains_key(spine_hash_map obj, spine_k key); -SPINE_C_EXPORT spine_bool spine_hash_map_remove(spine_hash_map obj, spine_k key); -SPINE_C_EXPORT spine_entries spine_hash_map_get_entries(spine_hash_map obj); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_HASHMAP_H \ No newline at end of file diff --git a/spine-c-new/src/generated/ik_constraint.cpp b/spine-c-new/src/generated/ik_constraint.cpp index 21c879df5..dac6fede3 100644 --- a/spine-c-new/src/generated/ik_constraint.cpp +++ b/spine-c-new/src/generated/ik_constraint.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_ik_constraint spine_ik_constraint_create(spine_ik_constraint_data data, spine_skeleton skeleton) { - IkConstraint *obj = new (__FILE__, __LINE__) IkConstraint(data, skeleton); + IkConstraint *obj = new (__FILE__, __LINE__) IkConstraint(*(IkConstraintData*) data, *(Skeleton*) skeleton); return (spine_ik_constraint) obj; } @@ -42,32 +42,30 @@ void spine_ik_constraint_dispose(spine_ik_constraint obj) { delete (IkConstraint *) obj; } -spine_rtti spine_ik_constraint_get_rtti(spine_ik_constraint obj) { - if (!obj) return nullptr; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_ik_constraint_get_rtti() { + return (spine_rtti) &IkConstraint::rtti; } spine_ik_constraint spine_ik_constraint_copy(spine_ik_constraint obj, spine_skeleton skeleton) { if (!obj) return 0; IkConstraint *_obj = (IkConstraint *) obj; - return (spine_ik_constraint) _obj->copy(skeleton); + return (spine_ik_constraint) _obj->copy(*(Skeleton*) skeleton); } void spine_ik_constraint_update(spine_ik_constraint obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; IkConstraint *_obj = (IkConstraint *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_ik_constraint_sort(spine_ik_constraint obj, spine_skeleton skeleton) { if (!obj) return ; IkConstraint *_obj = (IkConstraint *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_ik_constraint_is_source_active(spine_ik_constraint obj) { - if (!obj) return 0; +bool spine_ik_constraint_is_source_active(spine_ik_constraint obj) { + if (!obj) return false; IkConstraint *_obj = (IkConstraint *) obj; return _obj->isSourceActive(); } @@ -75,13 +73,7 @@ spine_bool spine_ik_constraint_is_source_active(spine_ik_constraint obj) { spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint obj) { if (!obj) return 0; IkConstraint *_obj = (IkConstraint *) obj; - return _obj->getData(); -} - -void * spine_ik_constraint_get_bones(spine_ik_constraint obj) { - if (!obj) return nullptr; - IkConstraint *_obj = (IkConstraint *) obj; - return (void *) _obj->getBones(); + return (spine_ik_constraint_data) &_obj->getData(); } int32_t spine_ik_constraint_get_num_bones(spine_ik_constraint obj) { @@ -97,7 +89,7 @@ spine_bone_pose *spine_ik_constraint_get_bones(spine_ik_constraint obj) { } spine_bone spine_ik_constraint_get_target(spine_ik_constraint obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; IkConstraint *_obj = (IkConstraint *) obj; return (spine_bone) _obj->getTarget(); } @@ -123,13 +115,13 @@ void spine_ik_constraint_setup_pose(spine_ik_constraint obj) { spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_constraint obj) { if (!obj) return 0; IkConstraint *_obj = (IkConstraint *) obj; - return _obj->getPose(); + return (spine_ik_constraint_pose) &_obj->getPose(); } spine_ik_constraint_pose spine_ik_constraint_get_applied_pose(spine_ik_constraint obj) { if (!obj) return 0; IkConstraint *_obj = (IkConstraint *) obj; - return _obj->getAppliedPose(); + return (spine_ik_constraint_pose) &_obj->getAppliedPose(); } void spine_ik_constraint_reset_constrained(spine_ik_constraint obj) { @@ -144,19 +136,19 @@ void spine_ik_constraint_constrained(spine_ik_constraint obj) { _obj->constrained(); } -spine_bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint obj) { - if (!obj) return 0; +bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint obj) { + if (!obj) return false; IkConstraint *_obj = (IkConstraint *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_ik_constraint_is_active(spine_ik_constraint obj) { - if (!obj) return 0; +bool spine_ik_constraint_is_active(spine_ik_constraint obj) { + if (!obj) return false; IkConstraint *_obj = (IkConstraint *) obj; return _obj->isActive(); } -void spine_ik_constraint_set_active(spine_ik_constraint obj, spine_bool value) { +void spine_ik_constraint_set_active(spine_ik_constraint obj, bool value) { if (!obj) return; IkConstraint *_obj = (IkConstraint *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/ik_constraint.h b/spine-c-new/src/generated/ik_constraint.h index db4af13a8..75095d7d6 100644 --- a/spine-c-new/src/generated/ik_constraint.h +++ b/spine-c-new/src/generated/ik_constraint.h @@ -34,19 +34,16 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_ik_constraint) +#include "types.h" SPINE_C_EXPORT spine_ik_constraint spine_ik_constraint_create(spine_ik_constraint_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_ik_constraint_dispose(spine_ik_constraint obj); -SPINE_C_EXPORT spine_rtti spine_ik_constraint_get_rtti(spine_ik_constraint obj); +SPINE_C_EXPORT spine_rtti spine_ik_constraint_get_rtti(); SPINE_C_EXPORT spine_ik_constraint spine_ik_constraint_copy(spine_ik_constraint obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_ik_constraint_update(spine_ik_constraint obj, spine_skeleton skeleton, spine_physics physics); SPINE_C_EXPORT void spine_ik_constraint_sort(spine_ik_constraint obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_ik_constraint_is_source_active(spine_ik_constraint obj); +SPINE_C_EXPORT bool spine_ik_constraint_is_source_active(spine_ik_constraint obj); SPINE_C_EXPORT spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint obj); -SPINE_C_EXPORT void * spine_ik_constraint_get_bones(spine_ik_constraint obj); SPINE_C_EXPORT int32_t spine_ik_constraint_get_num_bones(spine_ik_constraint obj); SPINE_C_EXPORT spine_bone_pose *spine_ik_constraint_get_bones(spine_ik_constraint obj); SPINE_C_EXPORT spine_bone spine_ik_constraint_get_target(spine_ik_constraint obj); @@ -57,9 +54,9 @@ SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_co SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_get_applied_pose(spine_ik_constraint obj); SPINE_C_EXPORT void spine_ik_constraint_reset_constrained(spine_ik_constraint obj); SPINE_C_EXPORT void spine_ik_constraint_constrained(spine_ik_constraint obj); -SPINE_C_EXPORT spine_bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint obj); -SPINE_C_EXPORT spine_bool spine_ik_constraint_is_active(spine_ik_constraint obj); -SPINE_C_EXPORT void spine_ik_constraint_set_active(spine_ik_constraint obj, spine_bool value); +SPINE_C_EXPORT bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint obj); +SPINE_C_EXPORT bool spine_ik_constraint_is_active(spine_ik_constraint obj); +SPINE_C_EXPORT void spine_ik_constraint_set_active(spine_ik_constraint obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/ik_constraint_data.cpp b/spine-c-new/src/generated/ik_constraint_data.cpp index ef1901a85..b87293abe 100644 --- a/spine-c-new/src/generated/ik_constraint_data.cpp +++ b/spine-c-new/src/generated/ik_constraint_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_ik_constraint_data spine_ik_constraint_data_create(const utf8 * name) { +spine_ik_constraint_data spine_ik_constraint_data_create(const char* name) { IkConstraintData *obj = new (__FILE__, __LINE__) IkConstraintData(String(name)); return (spine_ik_constraint_data) obj; } @@ -42,22 +42,14 @@ void spine_ik_constraint_data_dispose(spine_ik_constraint_data obj) { delete (IkConstraintData *) obj; } -spine_rtti spine_ik_constraint_data_get_rtti(spine_ik_constraint_data obj) { - if (!obj) return nullptr; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_ik_constraint_data_get_rtti() { + return (spine_rtti) &IkConstraintData::rtti; } spine_constraint spine_ik_constraint_data_create(spine_ik_constraint_data obj, spine_skeleton skeleton) { if (!obj) return 0; IkConstraintData *_obj = (IkConstraintData *) obj; - return (spine_constraint) _obj->create(skeleton); -} - -void * spine_ik_constraint_data_get_bones(spine_ik_constraint_data obj) { - if (!obj) return nullptr; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (void *) _obj->getBones(); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } int32_t spine_ik_constraint_data_get_num_bones(spine_ik_constraint_data obj) { @@ -73,7 +65,7 @@ spine_bone_data *spine_ik_constraint_data_get_bones(spine_ik_constraint_data obj } spine_bone_data spine_ik_constraint_data_get_target(spine_ik_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; IkConstraintData *_obj = (IkConstraintData *) obj; return (spine_bone_data) _obj->getTarget(); } @@ -84,26 +76,26 @@ void spine_ik_constraint_data_set_target(spine_ik_constraint_data obj, spine_bon _obj->setTarget((BoneData *) value); } -spine_bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data obj) { - if (!obj) return 0; +bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data obj) { + if (!obj) return false; IkConstraintData *_obj = (IkConstraintData *) obj; return _obj->getUniform(); } -void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data obj, spine_bool value) { +void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data obj, bool value) { if (!obj) return; IkConstraintData *_obj = (IkConstraintData *) obj; _obj->setUniform(value); } -const utf8 * spine_ik_constraint_data_get_name(spine_ik_constraint_data obj) { +const char* spine_ik_constraint_data_get_name(spine_ik_constraint_data obj) { if (!obj) return nullptr; IkConstraintData *_obj = (IkConstraintData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data obj) { - if (!obj) return 0; +bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data obj) { + if (!obj) return false; IkConstraintData *_obj = (IkConstraintData *) obj; return _obj->isSkinRequired(); } @@ -111,11 +103,5 @@ spine_bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data ob spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data obj) { if (!obj) return 0; IkConstraintData *_obj = (IkConstraintData *) obj; - return _obj->getSetupPose(); -} - -spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data obj) { - if (!obj) return 0; - IkConstraintData *_obj = (IkConstraintData *) obj; - return _obj->getSetupPose(); + return (spine_ik_constraint_pose) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/ik_constraint_data.h b/spine-c-new/src/generated/ik_constraint_data.h index 418d1d384..62d717ed1 100644 --- a/spine-c-new/src/generated/ik_constraint_data.h +++ b/spine-c-new/src/generated/ik_constraint_data.h @@ -34,24 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_ik_constraint_data) - -SPINE_C_EXPORT spine_ik_constraint_data spine_ik_constraint_data_create(const utf8 * name); +SPINE_C_EXPORT spine_ik_constraint_data spine_ik_constraint_data_create(const char* name); SPINE_C_EXPORT void spine_ik_constraint_data_dispose(spine_ik_constraint_data obj); -SPINE_C_EXPORT spine_rtti spine_ik_constraint_data_get_rtti(spine_ik_constraint_data obj); +SPINE_C_EXPORT spine_rtti spine_ik_constraint_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_ik_constraint_data_create(spine_ik_constraint_data obj, spine_skeleton skeleton); -SPINE_C_EXPORT void * spine_ik_constraint_data_get_bones(spine_ik_constraint_data obj); SPINE_C_EXPORT int32_t spine_ik_constraint_data_get_num_bones(spine_ik_constraint_data obj); SPINE_C_EXPORT spine_bone_data *spine_ik_constraint_data_get_bones(spine_ik_constraint_data obj); SPINE_C_EXPORT spine_bone_data spine_ik_constraint_data_get_target(spine_ik_constraint_data obj); SPINE_C_EXPORT void spine_ik_constraint_data_set_target(spine_ik_constraint_data obj, spine_bone_data value); -SPINE_C_EXPORT spine_bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data obj); -SPINE_C_EXPORT void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data obj, spine_bool value); -SPINE_C_EXPORT const utf8 * spine_ik_constraint_data_get_name(spine_ik_constraint_data obj); -SPINE_C_EXPORT spine_bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data obj); -SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data obj); +SPINE_C_EXPORT bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data obj); +SPINE_C_EXPORT void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data obj, bool value); +SPINE_C_EXPORT const char* spine_ik_constraint_data_get_name(spine_ik_constraint_data obj); +SPINE_C_EXPORT bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data obj); SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/ik_constraint_pose.cpp b/spine-c-new/src/generated/ik_constraint_pose.cpp index 72607651d..82818d074 100644 --- a/spine-c-new/src/generated/ik_constraint_pose.cpp +++ b/spine-c-new/src/generated/ik_constraint_pose.cpp @@ -45,7 +45,7 @@ void spine_ik_constraint_pose_dispose(spine_ik_constraint_pose obj) { void spine_ik_constraint_pose_set(spine_ik_constraint_pose obj, spine_ik_constraint_pose value) { if (!obj) return; IkConstraintPose *_obj = (IkConstraintPose *) obj; - _obj->set(value); + _obj->set(*((IkConstraintPose*) value)); } float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose obj) { @@ -72,37 +72,37 @@ void spine_ik_constraint_pose_set_softness(spine_ik_constraint_pose obj, float v _obj->setSoftness(value); } -int32_t spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose obj) { +int spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose obj) { if (!obj) return 0; IkConstraintPose *_obj = (IkConstraintPose *) obj; return _obj->getBendDirection(); } -void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose obj, int32_t value) { +void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose obj, int value) { if (!obj) return; IkConstraintPose *_obj = (IkConstraintPose *) obj; _obj->setBendDirection(value); } -spine_bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose obj) { - if (!obj) return 0; +bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose obj) { + if (!obj) return false; IkConstraintPose *_obj = (IkConstraintPose *) obj; return _obj->getCompress(); } -void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose obj, spine_bool value) { +void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose obj, bool value) { if (!obj) return; IkConstraintPose *_obj = (IkConstraintPose *) obj; _obj->setCompress(value); } -spine_bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose obj) { - if (!obj) return 0; +bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose obj) { + if (!obj) return false; IkConstraintPose *_obj = (IkConstraintPose *) obj; return _obj->getStretch(); } -void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose obj, spine_bool value) { +void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose obj, bool value) { if (!obj) return; IkConstraintPose *_obj = (IkConstraintPose *) obj; _obj->setStretch(value); diff --git a/spine-c-new/src/generated/ik_constraint_pose.h b/spine-c-new/src/generated/ik_constraint_pose.h index c80828564..668284bee 100644 --- a/spine-c-new/src/generated/ik_constraint_pose.h +++ b/spine-c-new/src/generated/ik_constraint_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_ik_constraint_pose) +#include "types.h" SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_pose_create(void); SPINE_C_EXPORT void spine_ik_constraint_pose_dispose(spine_ik_constraint_pose obj); @@ -45,12 +43,12 @@ SPINE_C_EXPORT float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose o SPINE_C_EXPORT void spine_ik_constraint_pose_set_mix(spine_ik_constraint_pose obj, float value); SPINE_C_EXPORT float spine_ik_constraint_pose_get_softness(spine_ik_constraint_pose obj); SPINE_C_EXPORT void spine_ik_constraint_pose_set_softness(spine_ik_constraint_pose obj, float value); -SPINE_C_EXPORT int32_t spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose obj); -SPINE_C_EXPORT void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose obj, int32_t value); -SPINE_C_EXPORT spine_bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose obj); -SPINE_C_EXPORT void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose obj); -SPINE_C_EXPORT void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose obj, spine_bool value); +SPINE_C_EXPORT int spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose obj); +SPINE_C_EXPORT void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose obj, int value); +SPINE_C_EXPORT bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose obj); +SPINE_C_EXPORT void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose obj, bool value); +SPINE_C_EXPORT bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose obj); +SPINE_C_EXPORT void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/ik_constraint_timeline.cpp b/spine-c-new/src/generated/ik_constraint_timeline.cpp index 38a241711..12dc71093 100644 --- a/spine-c-new/src/generated/ik_constraint_timeline.cpp +++ b/spine-c-new/src/generated/ik_constraint_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_ik_constraint_timeline spine_ik_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex) { +spine_ik_constraint_timeline spine_ik_constraint_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex) { IkConstraintTimeline *obj = new (__FILE__, __LINE__) IkConstraintTimeline(frameCount, bezierCount, constraintIndex); return (spine_ik_constraint_timeline) obj; } @@ -42,94 +42,80 @@ void spine_ik_constraint_timeline_dispose(spine_ik_constraint_timeline obj) { delete (IkConstraintTimeline *) obj; } -spine_rtti spine_ik_constraint_timeline_get_rtti(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_ik_constraint_timeline_get_rtti() { + return (spine_rtti) &IkConstraintTimeline::rtti; } -void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_ik_constraint_timeline_set_frame(spine_ik_constraint_timeline obj, int32_t frame, float time, float mix, float softness, int32_t bendDirection, spine_bool compress, spine_bool stretch) { +void spine_ik_constraint_timeline_set_frame(spine_ik_constraint_timeline obj, int frame, float time, float mix, float softness, int bendDirection, bool compress, bool stretch) { if (!obj) return ; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; _obj->setFrame(frame, time, mix, softness, bendDirection, compress, stretch); } -void spine_ik_constraint_timeline_set_linear(spine_ik_constraint_timeline obj, spine_size_t value) { +void spine_ik_constraint_timeline_set_linear(spine_ik_constraint_timeline obj, size_t value) { if (!obj) return; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; _obj->setLinear(value); } -void spine_ik_constraint_timeline_set_stepped(spine_ik_constraint_timeline obj, spine_size_t value) { +void spine_ik_constraint_timeline_set_stepped(spine_ik_constraint_timeline obj, size_t value) { if (!obj) return; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; _obj->setStepped(value); } -void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_ik_constraint_timeline_get_num_curves(spine_ik_constraint_timeline obj) { if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj) { +float *spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj) { if (!obj) return nullptr; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline obj) { + if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline obj) { + if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return _obj->getFrameCount(); } -void * spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_ik_constraint_timeline_get_num_frames(spine_ik_constraint_timeline obj) { if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj) { +float *spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj) { if (!obj) return nullptr; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline obj) { @@ -138,31 +124,25 @@ float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline obj return _obj->getDuration(); } -void * spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_ik_constraint_timeline_get_num_property_ids(spine_ik_constraint_timeline obj) { if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj) { +int64_t *spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj) { if (!obj) return nullptr; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline obj) { +int spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline obj) { if (!obj) return 0; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline obj, int32_t value) { +void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline obj, int value) { if (!obj) return; IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/ik_constraint_timeline.h b/spine-c-new/src/generated/ik_constraint_timeline.h index f862c088c..54d9316ae 100644 --- a/spine-c-new/src/generated/ik_constraint_timeline.h +++ b/spine-c-new/src/generated/ik_constraint_timeline.h @@ -34,33 +34,28 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_ik_constraint_timeline) - -SPINE_C_EXPORT spine_ik_constraint_timeline spine_ik_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex); +SPINE_C_EXPORT spine_ik_constraint_timeline spine_ik_constraint_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex); SPINE_C_EXPORT void spine_ik_constraint_timeline_dispose(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_rtti spine_ik_constraint_timeline_get_rtti(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_ik_constraint_timeline_set_frame(spine_ik_constraint_timeline obj, int32_t frame, float time, float mix, float softness, int32_t bendDirection, spine_bool compress, spine_bool stretch); -SPINE_C_EXPORT void spine_ik_constraint_timeline_set_linear(spine_ik_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_ik_constraint_timeline_set_stepped(spine_ik_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT spine_rtti spine_ik_constraint_timeline_get_rtti(); +SPINE_C_EXPORT void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_ik_constraint_timeline_set_frame(spine_ik_constraint_timeline obj, int frame, float time, float mix, float softness, int bendDirection, bool compress, bool stretch); +SPINE_C_EXPORT void spine_ik_constraint_timeline_set_linear(spine_ik_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_ik_constraint_timeline_set_stepped(spine_ik_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_ik_constraint_timeline_get_num_curves(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT void * spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT float *spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_ik_constraint_timeline_get_num_frames(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT float *spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj); SPINE_C_EXPORT float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT void * spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_ik_constraint_timeline_get_num_property_ids(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT int32_t spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline obj); -SPINE_C_EXPORT void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT int spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline obj); +SPINE_C_EXPORT void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/inherit.h b/spine-c-new/src/generated/inherit.h index c5f8a48c6..5e206d778 100644 --- a/spine-c-new/src/generated/inherit.h +++ b/spine-c-new/src/generated/inherit.h @@ -30,18 +30,18 @@ #ifndef SPINE_C_INHERIT_H #define SPINE_C_INHERIT_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_inherit { - SPINE_INHERIT_INHERIT_NORMAL = 0, - SPINE_INHERIT_INHERIT_ONLY_TRANSLATION, - SPINE_INHERIT_INHERIT_NO_ROTATION_OR_REFLECTION, - SPINE_INHERIT_INHERIT_NO_SCALE, - SPINE_INHERIT_INHERIT_NO_SCALE_OR_REFLECTION + SPINE_INHERIT_NORMAL = 0, + SPINE_INHERIT_ONLY_TRANSLATION, + SPINE_INHERIT_NO_ROTATION_OR_REFLECTION, + SPINE_INHERIT_NO_SCALE, + SPINE_INHERIT_NO_SCALE_OR_REFLECTION } spine_inherit; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/inherit_timeline.cpp b/spine-c-new/src/generated/inherit_timeline.cpp index 79c460e46..b888e7f33 100644 --- a/spine-c-new/src/generated/inherit_timeline.cpp +++ b/spine-c-new/src/generated/inherit_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_inherit_timeline spine_inherit_timeline_create(spine_size_t frameCount, int32_t boneIndex) { +spine_inherit_timeline spine_inherit_timeline_create(size_t frameCount, int boneIndex) { InheritTimeline *obj = new (__FILE__, __LINE__) InheritTimeline(frameCount, boneIndex); return (spine_inherit_timeline) obj; } @@ -42,52 +42,44 @@ void spine_inherit_timeline_dispose(spine_inherit_timeline obj) { delete (InheritTimeline *) obj; } -spine_rtti spine_inherit_timeline_get_rtti(spine_inherit_timeline obj) { - if (!obj) return nullptr; - InheritTimeline *_obj = (InheritTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_inherit_timeline_get_rtti() { + return (spine_rtti) &InheritTimeline::rtti; } -void spine_inherit_timeline_set_frame(spine_inherit_timeline obj, int32_t frame, float time, spine_inherit inherit) { +void spine_inherit_timeline_set_frame(spine_inherit_timeline obj, int frame, float time, spine_inherit inherit) { if (!obj) return ; InheritTimeline *_obj = (InheritTimeline *) obj; - _obj->setFrame(frame, time, inherit); + _obj->setFrame(frame, time, (Inherit) inherit); } -void spine_inherit_timeline_apply(spine_inherit_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_inherit_timeline_apply(spine_inherit_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; InheritTimeline *_obj = (InheritTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline obj) { - if (!obj) return nullptr; +size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline obj) { + if (!obj) return 0; InheritTimeline *_obj = (InheritTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline obj) { - if (!obj) return nullptr; +size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline obj) { + if (!obj) return 0; InheritTimeline *_obj = (InheritTimeline *) obj; return _obj->getFrameCount(); } -void * spine_inherit_timeline_get_frames(spine_inherit_timeline obj) { - if (!obj) return nullptr; - InheritTimeline *_obj = (InheritTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_inherit_timeline_get_num_frames(spine_inherit_timeline obj) { if (!obj) return 0; InheritTimeline *_obj = (InheritTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_inherit_timeline_get_frames(spine_inherit_timeline obj) { +float *spine_inherit_timeline_get_frames(spine_inherit_timeline obj) { if (!obj) return nullptr; InheritTimeline *_obj = (InheritTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_inherit_timeline_get_duration(spine_inherit_timeline obj) { @@ -96,31 +88,25 @@ float spine_inherit_timeline_get_duration(spine_inherit_timeline obj) { return _obj->getDuration(); } -void * spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj) { - if (!obj) return nullptr; - InheritTimeline *_obj = (InheritTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_inherit_timeline_get_num_property_ids(spine_inherit_timeline obj) { if (!obj) return 0; InheritTimeline *_obj = (InheritTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj) { +int64_t *spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj) { if (!obj) return nullptr; InheritTimeline *_obj = (InheritTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_inherit_timeline_get_bone_index(spine_inherit_timeline obj) { +int spine_inherit_timeline_get_bone_index(spine_inherit_timeline obj) { if (!obj) return 0; InheritTimeline *_obj = (InheritTimeline *) obj; return _obj->getBoneIndex(); } -void spine_inherit_timeline_set_bone_index(spine_inherit_timeline obj, int32_t value) { +void spine_inherit_timeline_set_bone_index(spine_inherit_timeline obj, int value) { if (!obj) return; InheritTimeline *_obj = (InheritTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/inherit_timeline.h b/spine-c-new/src/generated/inherit_timeline.h index 0d52c4cf6..dc35c936a 100644 --- a/spine-c-new/src/generated/inherit_timeline.h +++ b/spine-c-new/src/generated/inherit_timeline.h @@ -34,26 +34,22 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_inherit_timeline) - -SPINE_C_EXPORT spine_inherit_timeline spine_inherit_timeline_create(spine_size_t frameCount, int32_t boneIndex); +SPINE_C_EXPORT spine_inherit_timeline spine_inherit_timeline_create(size_t frameCount, int boneIndex); SPINE_C_EXPORT void spine_inherit_timeline_dispose(spine_inherit_timeline obj); -SPINE_C_EXPORT spine_rtti spine_inherit_timeline_get_rtti(spine_inherit_timeline obj); -SPINE_C_EXPORT void spine_inherit_timeline_set_frame(spine_inherit_timeline obj, int32_t frame, float time, spine_inherit inherit); -SPINE_C_EXPORT void spine_inherit_timeline_apply(spine_inherit_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline obj); -SPINE_C_EXPORT spine_size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline obj); -SPINE_C_EXPORT void * spine_inherit_timeline_get_frames(spine_inherit_timeline obj); +SPINE_C_EXPORT spine_rtti spine_inherit_timeline_get_rtti(); +SPINE_C_EXPORT void spine_inherit_timeline_set_frame(spine_inherit_timeline obj, int frame, float time, spine_inherit inherit); +SPINE_C_EXPORT void spine_inherit_timeline_apply(spine_inherit_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline obj); +SPINE_C_EXPORT size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline obj); SPINE_C_EXPORT int32_t spine_inherit_timeline_get_num_frames(spine_inherit_timeline obj); -SPINE_C_EXPORT spine_float *spine_inherit_timeline_get_frames(spine_inherit_timeline obj); +SPINE_C_EXPORT float *spine_inherit_timeline_get_frames(spine_inherit_timeline obj); SPINE_C_EXPORT float spine_inherit_timeline_get_duration(spine_inherit_timeline obj); -SPINE_C_EXPORT void * spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj); SPINE_C_EXPORT int32_t spine_inherit_timeline_get_num_property_ids(spine_inherit_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj); -SPINE_C_EXPORT int32_t spine_inherit_timeline_get_bone_index(spine_inherit_timeline obj); -SPINE_C_EXPORT void spine_inherit_timeline_set_bone_index(spine_inherit_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj); +SPINE_C_EXPORT int spine_inherit_timeline_get_bone_index(spine_inherit_timeline obj); +SPINE_C_EXPORT void spine_inherit_timeline_set_bone_index(spine_inherit_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/interpolation.h b/spine-c-new/src/generated/interpolation.h index e4394ce24..f39f87192 100644 --- a/spine-c-new/src/generated/interpolation.h +++ b/spine-c-new/src/generated/interpolation.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_interpolation) +#include "types.h" SPINE_C_EXPORT void spine_interpolation_dispose(spine_interpolation obj); SPINE_C_EXPORT float spine_interpolation_apply(spine_interpolation obj, float a); diff --git a/spine-c-new/src/generated/linked_mesh.cpp b/spine-c-new/src/generated/linked_mesh.cpp index eeda5f715..b25811d00 100644 --- a/spine-c-new/src/generated/linked_mesh.cpp +++ b/spine-c-new/src/generated/linked_mesh.cpp @@ -32,12 +32,12 @@ using namespace spine; -spine_linked_mesh spine_linked_mesh_create(spine_mesh_attachment mesh, spine_const int skinIndex, spine_size_t slotIndex, const utf8 * parent, spine_bool inheritTimelines) { +spine_linked_mesh spine_linked_mesh_create(spine_mesh_attachment mesh, const int skinIndex, size_t slotIndex, const char* parent, bool inheritTimelines) { LinkedMesh *obj = new (__FILE__, __LINE__) LinkedMesh((MeshAttachment *) mesh, skinIndex, slotIndex, String(parent), inheritTimelines); return (spine_linked_mesh) obj; } -spine_linked_mesh spine_linked_mesh_create_with_mesh_attachment_string_size_t_string_bool(spine_mesh_attachment mesh, const utf8 * skin, spine_size_t slotIndex, const utf8 * parent, spine_bool inheritTimelines) { +spine_linked_mesh spine_linked_mesh_create_with_mesh_attachment_string_size_t_string_bool(spine_mesh_attachment mesh, const char* skin, size_t slotIndex, const char* parent, bool inheritTimelines) { LinkedMesh *obj = new (__FILE__, __LINE__) LinkedMesh((MeshAttachment *) mesh, String(skin), slotIndex, String(parent), inheritTimelines); return (spine_linked_mesh) obj; } diff --git a/spine-c-new/src/generated/linked_mesh.h b/spine-c-new/src/generated/linked_mesh.h index fe8509c5b..030264c02 100644 --- a/spine-c-new/src/generated/linked_mesh.h +++ b/spine-c-new/src/generated/linked_mesh.h @@ -34,12 +34,10 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_linked_mesh) - -SPINE_C_EXPORT spine_linked_mesh spine_linked_mesh_create(spine_mesh_attachment mesh, spine_const int skinIndex, spine_size_t slotIndex, const utf8 * parent, spine_bool inheritTimelines); -SPINE_C_EXPORT spine_linked_mesh spine_linked_mesh_create_with_mesh_attachment_string_size_t_string_bool(spine_mesh_attachment mesh, const utf8 * skin, spine_size_t slotIndex, const utf8 * parent, spine_bool inheritTimelines); +SPINE_C_EXPORT spine_linked_mesh spine_linked_mesh_create(spine_mesh_attachment mesh, const int skinIndex, size_t slotIndex, const char* parent, bool inheritTimelines); +SPINE_C_EXPORT spine_linked_mesh spine_linked_mesh_create_with_mesh_attachment_string_size_t_string_bool(spine_mesh_attachment mesh, const char* skin, size_t slotIndex, const char* parent, bool inheritTimelines); SPINE_C_EXPORT void spine_linked_mesh_dispose(spine_linked_mesh obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/mesh_attachment.cpp b/spine-c-new/src/generated/mesh_attachment.cpp index 758b9ca90..a6cece6ac 100644 --- a/spine-c-new/src/generated/mesh_attachment.cpp +++ b/spine-c-new/src/generated/mesh_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_mesh_attachment spine_mesh_attachment_create(const utf8 * name) { +spine_mesh_attachment spine_mesh_attachment_create(const char* name) { MeshAttachment *obj = new (__FILE__, __LINE__) MeshAttachment(String(name)); return (spine_mesh_attachment) obj; } @@ -42,16 +42,14 @@ void spine_mesh_attachment_dispose(spine_mesh_attachment obj) { delete (MeshAttachment *) obj; } -spine_rtti spine_mesh_attachment_get_rtti(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_mesh_attachment_get_rtti() { + return (spine_rtti) &MeshAttachment::rtti; } -void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); } void spine_mesh_attachment_update_region(spine_mesh_attachment obj) { @@ -60,46 +58,34 @@ void spine_mesh_attachment_update_region(spine_mesh_attachment obj) { _obj->updateRegion(); } -int32_t spine_mesh_attachment_get_hull_length(spine_mesh_attachment obj) { +int spine_mesh_attachment_get_hull_length(spine_mesh_attachment obj) { if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; return _obj->getHullLength(); } -void spine_mesh_attachment_set_hull_length(spine_mesh_attachment obj, int32_t value) { +void spine_mesh_attachment_set_hull_length(spine_mesh_attachment obj, int value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; _obj->setHullLength(value); } -void * spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getRegionUVs(); -} - int32_t spine_mesh_attachment_get_num_region_u_vs(spine_mesh_attachment obj) { if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (int32_t) _obj->getRegionUVs().size(); } -spine_float *spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj) { +float *spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj) { if (!obj) return nullptr; MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_float *) _obj->getRegionUVs().buffer(); + return (float *) _obj->getRegionUVs().buffer(); } -void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment obj, void * value) { +void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment obj, spine_array_float value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setRegionUVs((Vector &) value); -} - -void * spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getUVs(); + _obj->setRegionUVs((Array &) value); } int32_t spine_mesh_attachment_get_num_u_vs(spine_mesh_attachment obj) { @@ -108,16 +94,10 @@ int32_t spine_mesh_attachment_get_num_u_vs(spine_mesh_attachment obj) { return (int32_t) _obj->getUVs().size(); } -spine_float *spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj) { +float *spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj) { if (!obj) return nullptr; MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_float *) _obj->getUVs().buffer(); -} - -void * spine_mesh_attachment_get_triangles(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getTriangles(); + return (float *) _obj->getUVs().buffer(); } int32_t spine_mesh_attachment_get_num_triangles(spine_mesh_attachment obj) { @@ -132,32 +112,32 @@ spine_unsigned short *spine_mesh_attachment_get_triangles(spine_mesh_attachment return (spine_unsigned short *) _obj->getTriangles().buffer(); } -void spine_mesh_attachment_set_triangles(spine_mesh_attachment obj, void * value) { +void spine_mesh_attachment_set_triangles(spine_mesh_attachment obj, spine_array_unsigned_short value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setTriangles((Vector &) value); + _obj->setTriangles((Array &) value); } spine_color spine_mesh_attachment_get_color(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_color) &_obj->getColor(); } -const utf8 * spine_mesh_attachment_get_path(spine_mesh_attachment obj) { +const char* spine_mesh_attachment_get_path(spine_mesh_attachment obj) { if (!obj) return nullptr; MeshAttachment *_obj = (MeshAttachment *) obj; - return (const utf8 *) _obj->getPath().buffer(); + return (const char *) _obj->getPath().buffer(); } -void spine_mesh_attachment_set_path(spine_mesh_attachment obj, const utf8 * value) { +void spine_mesh_attachment_set_path(spine_mesh_attachment obj, const char* value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; _obj->setPath(String(value)); } spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_texture_region) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_texture_region) _obj->getRegion(); } @@ -169,7 +149,7 @@ void spine_mesh_attachment_set_region(spine_mesh_attachment obj, spine_texture_r } spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_sequence) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_sequence) _obj->getSequence(); } @@ -181,7 +161,7 @@ void spine_mesh_attachment_set_sequence(spine_mesh_attachment obj, spine_sequenc } spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_mesh_attachment) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_mesh_attachment) _obj->getParentMesh(); } @@ -192,12 +172,6 @@ void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment obj, spine_mesh _obj->setParentMesh((MeshAttachment *) value); } -void * spine_mesh_attachment_get_edges(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getEdges(); -} - int32_t spine_mesh_attachment_get_num_edges(spine_mesh_attachment obj) { if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; @@ -210,10 +184,10 @@ spine_unsigned short *spine_mesh_attachment_get_edges(spine_mesh_attachment obj) return (spine_unsigned short *) _obj->getEdges().buffer(); } -void spine_mesh_attachment_set_edges(spine_mesh_attachment obj, void * value) { +void spine_mesh_attachment_set_edges(spine_mesh_attachment obj, spine_array_unsigned_short value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setEdges((Vector &) value); + _obj->setEdges((Array &) value); } float spine_mesh_attachment_get_width(spine_mesh_attachment obj) { @@ -241,57 +215,45 @@ void spine_mesh_attachment_set_height(spine_mesh_attachment obj, float value) { } spine_attachment spine_mesh_attachment_copy(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_attachment) _obj->copy(); } spine_mesh_attachment spine_mesh_attachment_new_linked_mesh(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_mesh_attachment) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_mesh_attachment) _obj->newLinkedMesh(); } -void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_mesh_attachment_compute_world_vertices_7(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); } -int32_t spine_mesh_attachment_get_id(spine_mesh_attachment obj) { +int spine_mesh_attachment_get_id(spine_mesh_attachment obj) { if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; return _obj->getId(); } -int32_t * spine_mesh_attachment_get_bones(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getBones(); -} - int32_t spine_mesh_attachment_get_num_bones(spine_mesh_attachment obj) { if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (int32_t) _obj->getBones().size(); } -int32_t *spine_mesh_attachment_get_bones(spine_mesh_attachment obj) { +int *spine_mesh_attachment_get_bones(spine_mesh_attachment obj) { if (!obj) return nullptr; MeshAttachment *_obj = (MeshAttachment *) obj; - return (int32_t *) _obj->getBones().buffer(); + return (int *) _obj->getBones().buffer(); } -void spine_mesh_attachment_set_bones(spine_mesh_attachment obj, int32_t * value) { +void spine_mesh_attachment_set_bones(spine_mesh_attachment obj, spine_array_int value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setBones((Vector &) value); -} - -void * spine_mesh_attachment_get_vertices(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getVertices(); + _obj->setBones((Array &) value); } int32_t spine_mesh_attachment_get_num_vertices(spine_mesh_attachment obj) { @@ -300,32 +262,32 @@ int32_t spine_mesh_attachment_get_num_vertices(spine_mesh_attachment obj) { return (int32_t) _obj->getVertices().size(); } -spine_float *spine_mesh_attachment_get_vertices(spine_mesh_attachment obj) { +float *spine_mesh_attachment_get_vertices(spine_mesh_attachment obj) { if (!obj) return nullptr; MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_float *) _obj->getVertices().buffer(); + return (float *) _obj->getVertices().buffer(); } -void spine_mesh_attachment_set_vertices(spine_mesh_attachment obj, void * value) { +void spine_mesh_attachment_set_vertices(spine_mesh_attachment obj, spine_array_float value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setVertices((Vector &) value); + _obj->setVertices((Array &) value); } -spine_size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment obj) { - if (!obj) return nullptr; +size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment obj) { + if (!obj) return 0; MeshAttachment *_obj = (MeshAttachment *) obj; return _obj->getWorldVerticesLength(); } -void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment obj, spine_size_t value) { +void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment obj, size_t value) { if (!obj) return; MeshAttachment *_obj = (MeshAttachment *) obj; _obj->setWorldVerticesLength(value); } spine_attachment spine_mesh_attachment_get_timeline_attachment(spine_mesh_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; MeshAttachment *_obj = (MeshAttachment *) obj; return (spine_attachment) _obj->getTimelineAttachment(); } diff --git a/spine-c-new/src/generated/mesh_attachment.h b/spine-c-new/src/generated/mesh_attachment.h index 6931b36d4..857f1414c 100644 --- a/spine-c-new/src/generated/mesh_attachment.h +++ b/spine-c-new/src/generated/mesh_attachment.h @@ -34,59 +34,51 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_mesh_attachment) - -SPINE_C_EXPORT spine_mesh_attachment spine_mesh_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_mesh_attachment spine_mesh_attachment_create(const char* name); SPINE_C_EXPORT void spine_mesh_attachment_dispose(spine_mesh_attachment obj); -SPINE_C_EXPORT spine_rtti spine_mesh_attachment_get_rtti(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride); +SPINE_C_EXPORT spine_rtti spine_mesh_attachment_get_rtti(); +SPINE_C_EXPORT void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); SPINE_C_EXPORT void spine_mesh_attachment_update_region(spine_mesh_attachment obj); -SPINE_C_EXPORT int32_t spine_mesh_attachment_get_hull_length(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_hull_length(spine_mesh_attachment obj, int32_t value); -SPINE_C_EXPORT void * spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj); +SPINE_C_EXPORT int spine_mesh_attachment_get_hull_length(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_hull_length(spine_mesh_attachment obj, int value); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_region_u_vs(spine_mesh_attachment obj); -SPINE_C_EXPORT spine_float *spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment obj, void * value); -SPINE_C_EXPORT void * spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj); +SPINE_C_EXPORT float *spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment obj, spine_array_float value); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_u_vs(spine_mesh_attachment obj); -SPINE_C_EXPORT spine_float *spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj); -SPINE_C_EXPORT void * spine_mesh_attachment_get_triangles(spine_mesh_attachment obj); +SPINE_C_EXPORT float *spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_triangles(spine_mesh_attachment obj); SPINE_C_EXPORT spine_unsigned short *spine_mesh_attachment_get_triangles(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_triangles(spine_mesh_attachment obj, void * value); +SPINE_C_EXPORT void spine_mesh_attachment_set_triangles(spine_mesh_attachment obj, spine_array_unsigned_short value); SPINE_C_EXPORT spine_color spine_mesh_attachment_get_color(spine_mesh_attachment obj); -SPINE_C_EXPORT const utf8 * spine_mesh_attachment_get_path(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_path(spine_mesh_attachment obj, const utf8 * value); +SPINE_C_EXPORT const char* spine_mesh_attachment_get_path(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_path(spine_mesh_attachment obj, const char* value); SPINE_C_EXPORT spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_region(spine_mesh_attachment obj, spine_texture_region value); SPINE_C_EXPORT spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_sequence(spine_mesh_attachment obj, spine_sequence value); SPINE_C_EXPORT spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment obj, spine_mesh_attachment value); -SPINE_C_EXPORT void * spine_mesh_attachment_get_edges(spine_mesh_attachment obj); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_edges(spine_mesh_attachment obj); SPINE_C_EXPORT spine_unsigned short *spine_mesh_attachment_get_edges(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_edges(spine_mesh_attachment obj, void * value); +SPINE_C_EXPORT void spine_mesh_attachment_set_edges(spine_mesh_attachment obj, spine_array_unsigned_short value); SPINE_C_EXPORT float spine_mesh_attachment_get_width(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_width(spine_mesh_attachment obj, float value); SPINE_C_EXPORT float spine_mesh_attachment_get_height(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_height(spine_mesh_attachment obj, float value); SPINE_C_EXPORT spine_attachment spine_mesh_attachment_copy(spine_mesh_attachment obj); SPINE_C_EXPORT spine_mesh_attachment spine_mesh_attachment_new_linked_mesh(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_compute_world_vertices(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT int32_t spine_mesh_attachment_get_id(spine_mesh_attachment obj); -SPINE_C_EXPORT int32_t * spine_mesh_attachment_get_bones(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_compute_world_vertices_7(spine_mesh_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT int spine_mesh_attachment_get_id(spine_mesh_attachment obj); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_bones(spine_mesh_attachment obj); -SPINE_C_EXPORT int32_t *spine_mesh_attachment_get_bones(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_bones(spine_mesh_attachment obj, int32_t * value); -SPINE_C_EXPORT void * spine_mesh_attachment_get_vertices(spine_mesh_attachment obj); +SPINE_C_EXPORT int *spine_mesh_attachment_get_bones(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_bones(spine_mesh_attachment obj, spine_array_int value); SPINE_C_EXPORT int32_t spine_mesh_attachment_get_num_vertices(spine_mesh_attachment obj); -SPINE_C_EXPORT spine_float *spine_mesh_attachment_get_vertices(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_vertices(spine_mesh_attachment obj, void * value); -SPINE_C_EXPORT spine_size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment obj); -SPINE_C_EXPORT void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment obj, spine_size_t value); +SPINE_C_EXPORT float *spine_mesh_attachment_get_vertices(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_vertices(spine_mesh_attachment obj, spine_array_float value); +SPINE_C_EXPORT size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment obj); +SPINE_C_EXPORT void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment obj, size_t value); SPINE_C_EXPORT spine_attachment spine_mesh_attachment_get_timeline_attachment(spine_mesh_attachment obj); SPINE_C_EXPORT void spine_mesh_attachment_set_timeline_attachment(spine_mesh_attachment obj, spine_attachment value); SPINE_C_EXPORT void spine_mesh_attachment_copy_to(spine_mesh_attachment obj, spine_vertex_attachment other); diff --git a/spine-c-new/src/generated/mix_blend.h b/spine-c-new/src/generated/mix_blend.h index 1ef76f175..fc947349c 100644 --- a/spine-c-new/src/generated/mix_blend.h +++ b/spine-c-new/src/generated/mix_blend.h @@ -30,17 +30,17 @@ #ifndef SPINE_C_MIXBLEND_H #define SPINE_C_MIXBLEND_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_mix_blend { - SPINE_MIX_BLEND_MIX_BLEND_SETUP = 0, - SPINE_MIX_BLEND_MIX_BLEND_FIRST, - SPINE_MIX_BLEND_MIX_BLEND_REPLACE, - SPINE_MIX_BLEND_MIX_BLEND_ADD + SPINE_MIX_BLEND_SETUP = 0, + SPINE_MIX_BLEND_FIRST, + SPINE_MIX_BLEND_REPLACE, + SPINE_MIX_BLEND_ADD } spine_mix_blend; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/mix_direction.h b/spine-c-new/src/generated/mix_direction.h index f31dff3bd..28c3b57e0 100644 --- a/spine-c-new/src/generated/mix_direction.h +++ b/spine-c-new/src/generated/mix_direction.h @@ -30,15 +30,15 @@ #ifndef SPINE_C_MIXDIRECTION_H #define SPINE_C_MIXDIRECTION_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_mix_direction { - SPINE_MIX_DIRECTION_MIX_DIRECTION_IN = 0, - SPINE_MIX_DIRECTION_MIX_DIRECTION_OUT + SPINE_MIX_DIRECTION_IN = 0, + SPINE_MIX_DIRECTION_OUT } spine_mix_direction; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/path_attachment.cpp b/spine-c-new/src/generated/path_attachment.cpp index c8abc989b..d37315390 100644 --- a/spine-c-new/src/generated/path_attachment.cpp +++ b/spine-c-new/src/generated/path_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_path_attachment spine_path_attachment_create(const utf8 * name) { +spine_path_attachment spine_path_attachment_create(const char* name) { PathAttachment *obj = new (__FILE__, __LINE__) PathAttachment(String(name)); return (spine_path_attachment) obj; } @@ -42,16 +42,8 @@ void spine_path_attachment_dispose(spine_path_attachment obj) { delete (PathAttachment *) obj; } -spine_rtti spine_path_attachment_get_rtti(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); -} - -void * spine_path_attachment_get_lengths(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return _obj->getLengths(); +spine_rtti spine_path_attachment_get_rtti() { + return (spine_rtti) &PathAttachment::rtti; } int32_t spine_path_attachment_get_num_lengths(spine_path_attachment obj) { @@ -60,100 +52,88 @@ int32_t spine_path_attachment_get_num_lengths(spine_path_attachment obj) { return (int32_t) _obj->getLengths().size(); } -spine_float *spine_path_attachment_get_lengths(spine_path_attachment obj) { +float *spine_path_attachment_get_lengths(spine_path_attachment obj) { if (!obj) return nullptr; PathAttachment *_obj = (PathAttachment *) obj; - return (spine_float *) _obj->getLengths().buffer(); + return (float *) _obj->getLengths().buffer(); } -void spine_path_attachment_set_lengths(spine_path_attachment obj, void * value) { +void spine_path_attachment_set_lengths(spine_path_attachment obj, spine_array_float value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; - _obj->setLengths((Vector &) value); + _obj->setLengths((Array &) value); } -spine_bool spine_path_attachment_is_closed(spine_path_attachment obj) { - if (!obj) return 0; +bool spine_path_attachment_is_closed(spine_path_attachment obj) { + if (!obj) return false; PathAttachment *_obj = (PathAttachment *) obj; return _obj->isClosed(); } -void spine_path_attachment_set_closed(spine_path_attachment obj, spine_bool value) { +void spine_path_attachment_set_closed(spine_path_attachment obj, bool value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; _obj->setClosed(value); } -spine_bool spine_path_attachment_is_constant_speed(spine_path_attachment obj) { - if (!obj) return 0; +bool spine_path_attachment_is_constant_speed(spine_path_attachment obj) { + if (!obj) return false; PathAttachment *_obj = (PathAttachment *) obj; return _obj->isConstantSpeed(); } -void spine_path_attachment_set_constant_speed(spine_path_attachment obj, spine_bool value) { +void spine_path_attachment_set_constant_speed(spine_path_attachment obj, bool value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; _obj->setConstantSpeed(value); } spine_color spine_path_attachment_get_color(spine_path_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; PathAttachment *_obj = (PathAttachment *) obj; return (spine_color) &_obj->getColor(); } spine_attachment spine_path_attachment_copy(spine_path_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; PathAttachment *_obj = (PathAttachment *) obj; return (spine_attachment) _obj->copy(); } -void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; PathAttachment *_obj = (PathAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); } -void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_path_attachment_compute_world_vertices_7(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; PathAttachment *_obj = (PathAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); } -int32_t spine_path_attachment_get_id(spine_path_attachment obj) { +int spine_path_attachment_get_id(spine_path_attachment obj) { if (!obj) return 0; PathAttachment *_obj = (PathAttachment *) obj; return _obj->getId(); } -int32_t * spine_path_attachment_get_bones(spine_path_attachment obj) { - if (!obj) return 0; - PathAttachment *_obj = (PathAttachment *) obj; - return _obj->getBones(); -} - int32_t spine_path_attachment_get_num_bones(spine_path_attachment obj) { if (!obj) return 0; PathAttachment *_obj = (PathAttachment *) obj; return (int32_t) _obj->getBones().size(); } -int32_t *spine_path_attachment_get_bones(spine_path_attachment obj) { +int *spine_path_attachment_get_bones(spine_path_attachment obj) { if (!obj) return nullptr; PathAttachment *_obj = (PathAttachment *) obj; - return (int32_t *) _obj->getBones().buffer(); + return (int *) _obj->getBones().buffer(); } -void spine_path_attachment_set_bones(spine_path_attachment obj, int32_t * value) { +void spine_path_attachment_set_bones(spine_path_attachment obj, spine_array_int value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; - _obj->setBones((Vector &) value); -} - -void * spine_path_attachment_get_vertices(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return _obj->getVertices(); + _obj->setBones((Array &) value); } int32_t spine_path_attachment_get_num_vertices(spine_path_attachment obj) { @@ -162,32 +142,32 @@ int32_t spine_path_attachment_get_num_vertices(spine_path_attachment obj) { return (int32_t) _obj->getVertices().size(); } -spine_float *spine_path_attachment_get_vertices(spine_path_attachment obj) { +float *spine_path_attachment_get_vertices(spine_path_attachment obj) { if (!obj) return nullptr; PathAttachment *_obj = (PathAttachment *) obj; - return (spine_float *) _obj->getVertices().buffer(); + return (float *) _obj->getVertices().buffer(); } -void spine_path_attachment_set_vertices(spine_path_attachment obj, void * value) { +void spine_path_attachment_set_vertices(spine_path_attachment obj, spine_array_float value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; - _obj->setVertices((Vector &) value); + _obj->setVertices((Array &) value); } -spine_size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment obj) { - if (!obj) return nullptr; +size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment obj) { + if (!obj) return 0; PathAttachment *_obj = (PathAttachment *) obj; return _obj->getWorldVerticesLength(); } -void spine_path_attachment_set_world_vertices_length(spine_path_attachment obj, spine_size_t value) { +void spine_path_attachment_set_world_vertices_length(spine_path_attachment obj, size_t value) { if (!obj) return; PathAttachment *_obj = (PathAttachment *) obj; _obj->setWorldVerticesLength(value); } spine_attachment spine_path_attachment_get_timeline_attachment(spine_path_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; PathAttachment *_obj = (PathAttachment *) obj; return (spine_attachment) _obj->getTimelineAttachment(); } diff --git a/spine-c-new/src/generated/path_attachment.h b/spine-c-new/src/generated/path_attachment.h index bc2d49b17..b063d0eab 100644 --- a/spine-c-new/src/generated/path_attachment.h +++ b/spine-c-new/src/generated/path_attachment.h @@ -34,36 +34,31 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_path_attachment) - -SPINE_C_EXPORT spine_path_attachment spine_path_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_path_attachment spine_path_attachment_create(const char* name); SPINE_C_EXPORT void spine_path_attachment_dispose(spine_path_attachment obj); -SPINE_C_EXPORT spine_rtti spine_path_attachment_get_rtti(spine_path_attachment obj); -SPINE_C_EXPORT void * spine_path_attachment_get_lengths(spine_path_attachment obj); +SPINE_C_EXPORT spine_rtti spine_path_attachment_get_rtti(); SPINE_C_EXPORT int32_t spine_path_attachment_get_num_lengths(spine_path_attachment obj); -SPINE_C_EXPORT spine_float *spine_path_attachment_get_lengths(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_lengths(spine_path_attachment obj, void * value); -SPINE_C_EXPORT spine_bool spine_path_attachment_is_closed(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_closed(spine_path_attachment obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_path_attachment_is_constant_speed(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_constant_speed(spine_path_attachment obj, spine_bool value); +SPINE_C_EXPORT float *spine_path_attachment_get_lengths(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_lengths(spine_path_attachment obj, spine_array_float value); +SPINE_C_EXPORT bool spine_path_attachment_is_closed(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_closed(spine_path_attachment obj, bool value); +SPINE_C_EXPORT bool spine_path_attachment_is_constant_speed(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_constant_speed(spine_path_attachment obj, bool value); SPINE_C_EXPORT spine_color spine_path_attachment_get_color(spine_path_attachment obj); SPINE_C_EXPORT spine_attachment spine_path_attachment_copy(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT int32_t spine_path_attachment_get_id(spine_path_attachment obj); -SPINE_C_EXPORT int32_t * spine_path_attachment_get_bones(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_compute_world_vertices(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT void spine_path_attachment_compute_world_vertices_7(spine_path_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT int spine_path_attachment_get_id(spine_path_attachment obj); SPINE_C_EXPORT int32_t spine_path_attachment_get_num_bones(spine_path_attachment obj); -SPINE_C_EXPORT int32_t *spine_path_attachment_get_bones(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_bones(spine_path_attachment obj, int32_t * value); -SPINE_C_EXPORT void * spine_path_attachment_get_vertices(spine_path_attachment obj); +SPINE_C_EXPORT int *spine_path_attachment_get_bones(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_bones(spine_path_attachment obj, spine_array_int value); SPINE_C_EXPORT int32_t spine_path_attachment_get_num_vertices(spine_path_attachment obj); -SPINE_C_EXPORT spine_float *spine_path_attachment_get_vertices(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_vertices(spine_path_attachment obj, void * value); -SPINE_C_EXPORT spine_size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment obj); -SPINE_C_EXPORT void spine_path_attachment_set_world_vertices_length(spine_path_attachment obj, spine_size_t value); +SPINE_C_EXPORT float *spine_path_attachment_get_vertices(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_vertices(spine_path_attachment obj, spine_array_float value); +SPINE_C_EXPORT size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment obj); +SPINE_C_EXPORT void spine_path_attachment_set_world_vertices_length(spine_path_attachment obj, size_t value); SPINE_C_EXPORT spine_attachment spine_path_attachment_get_timeline_attachment(spine_path_attachment obj); SPINE_C_EXPORT void spine_path_attachment_set_timeline_attachment(spine_path_attachment obj, spine_attachment value); SPINE_C_EXPORT void spine_path_attachment_copy_to(spine_path_attachment obj, spine_vertex_attachment other); diff --git a/spine-c-new/src/generated/path_constraint.cpp b/spine-c-new/src/generated/path_constraint.cpp index 53ca4df23..ff3007259 100644 --- a/spine-c-new/src/generated/path_constraint.cpp +++ b/spine-c-new/src/generated/path_constraint.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_path_constraint spine_path_constraint_create(spine_path_constraint_data data, spine_skeleton skeleton) { - PathConstraint *obj = new (__FILE__, __LINE__) PathConstraint(data, skeleton); + PathConstraint *obj = new (__FILE__, __LINE__) PathConstraint(*(PathConstraintData*) data, *(Skeleton*) skeleton); return (spine_path_constraint) obj; } @@ -42,42 +42,34 @@ void spine_path_constraint_dispose(spine_path_constraint obj) { delete (PathConstraint *) obj; } -spine_rtti spine_path_constraint_get_rtti(spine_path_constraint obj) { - if (!obj) return nullptr; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_path_constraint_get_rtti() { + return (spine_rtti) &PathConstraint::rtti; } spine_path_constraint spine_path_constraint_copy(spine_path_constraint obj, spine_skeleton skeleton) { if (!obj) return 0; PathConstraint *_obj = (PathConstraint *) obj; - return (spine_path_constraint) _obj->copy(skeleton); + return (spine_path_constraint) _obj->copy(*(Skeleton*) skeleton); } void spine_path_constraint_update(spine_path_constraint obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; PathConstraint *_obj = (PathConstraint *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_path_constraint_sort(spine_path_constraint obj, spine_skeleton skeleton) { if (!obj) return ; PathConstraint *_obj = (PathConstraint *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_path_constraint_is_source_active(spine_path_constraint obj) { - if (!obj) return 0; +bool spine_path_constraint_is_source_active(spine_path_constraint obj) { + if (!obj) return false; PathConstraint *_obj = (PathConstraint *) obj; return _obj->isSourceActive(); } -void * spine_path_constraint_get_bones(spine_path_constraint obj) { - if (!obj) return nullptr; - PathConstraint *_obj = (PathConstraint *) obj; - return (void *) _obj->getBones(); -} - int32_t spine_path_constraint_get_num_bones(spine_path_constraint obj) { if (!obj) return 0; PathConstraint *_obj = (PathConstraint *) obj; @@ -91,7 +83,7 @@ spine_bone_pose *spine_path_constraint_get_bones(spine_path_constraint obj) { } spine_slot spine_path_constraint_get_slot(spine_path_constraint obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot) 0; PathConstraint *_obj = (PathConstraint *) obj; return (spine_slot) _obj->getSlot(); } @@ -105,7 +97,7 @@ void spine_path_constraint_set_slot(spine_path_constraint obj, spine_slot value) spine_path_constraint_data spine_path_constraint_get_data(spine_path_constraint obj) { if (!obj) return 0; PathConstraint *_obj = (PathConstraint *) obj; - return _obj->getData(); + return (spine_path_constraint_data) &_obj->getData(); } void spine_path_constraint_pose(spine_path_constraint obj) { @@ -123,13 +115,13 @@ void spine_path_constraint_setup_pose(spine_path_constraint obj) { spine_path_constraint_pose spine_path_constraint_get_pose(spine_path_constraint obj) { if (!obj) return 0; PathConstraint *_obj = (PathConstraint *) obj; - return _obj->getPose(); + return (spine_path_constraint_pose) &_obj->getPose(); } spine_path_constraint_pose spine_path_constraint_get_applied_pose(spine_path_constraint obj) { if (!obj) return 0; PathConstraint *_obj = (PathConstraint *) obj; - return _obj->getAppliedPose(); + return (spine_path_constraint_pose) &_obj->getAppliedPose(); } void spine_path_constraint_reset_constrained(spine_path_constraint obj) { @@ -144,19 +136,19 @@ void spine_path_constraint_constrained(spine_path_constraint obj) { _obj->constrained(); } -spine_bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint obj) { - if (!obj) return 0; +bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint obj) { + if (!obj) return false; PathConstraint *_obj = (PathConstraint *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_path_constraint_is_active(spine_path_constraint obj) { - if (!obj) return 0; +bool spine_path_constraint_is_active(spine_path_constraint obj) { + if (!obj) return false; PathConstraint *_obj = (PathConstraint *) obj; return _obj->isActive(); } -void spine_path_constraint_set_active(spine_path_constraint obj, spine_bool value) { +void spine_path_constraint_set_active(spine_path_constraint obj, bool value) { if (!obj) return; PathConstraint *_obj = (PathConstraint *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/path_constraint.h b/spine-c-new/src/generated/path_constraint.h index af0d98cd2..e064fa9a6 100644 --- a/spine-c-new/src/generated/path_constraint.h +++ b/spine-c-new/src/generated/path_constraint.h @@ -34,18 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_path_constraint) +#include "types.h" SPINE_C_EXPORT spine_path_constraint spine_path_constraint_create(spine_path_constraint_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_path_constraint_dispose(spine_path_constraint obj); -SPINE_C_EXPORT spine_rtti spine_path_constraint_get_rtti(spine_path_constraint obj); +SPINE_C_EXPORT spine_rtti spine_path_constraint_get_rtti(); SPINE_C_EXPORT spine_path_constraint spine_path_constraint_copy(spine_path_constraint obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_path_constraint_update(spine_path_constraint obj, spine_skeleton skeleton, spine_physics physics); SPINE_C_EXPORT void spine_path_constraint_sort(spine_path_constraint obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_path_constraint_is_source_active(spine_path_constraint obj); -SPINE_C_EXPORT void * spine_path_constraint_get_bones(spine_path_constraint obj); +SPINE_C_EXPORT bool spine_path_constraint_is_source_active(spine_path_constraint obj); SPINE_C_EXPORT int32_t spine_path_constraint_get_num_bones(spine_path_constraint obj); SPINE_C_EXPORT spine_bone_pose *spine_path_constraint_get_bones(spine_path_constraint obj); SPINE_C_EXPORT spine_slot spine_path_constraint_get_slot(spine_path_constraint obj); @@ -57,9 +54,9 @@ SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_get_pose(spine_p SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_get_applied_pose(spine_path_constraint obj); SPINE_C_EXPORT void spine_path_constraint_reset_constrained(spine_path_constraint obj); SPINE_C_EXPORT void spine_path_constraint_constrained(spine_path_constraint obj); -SPINE_C_EXPORT spine_bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint obj); -SPINE_C_EXPORT spine_bool spine_path_constraint_is_active(spine_path_constraint obj); -SPINE_C_EXPORT void spine_path_constraint_set_active(spine_path_constraint obj, spine_bool value); +SPINE_C_EXPORT bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint obj); +SPINE_C_EXPORT bool spine_path_constraint_is_active(spine_path_constraint obj); +SPINE_C_EXPORT void spine_path_constraint_set_active(spine_path_constraint obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/path_constraint_data.cpp b/spine-c-new/src/generated/path_constraint_data.cpp index 0dd145d47..b2762e314 100644 --- a/spine-c-new/src/generated/path_constraint_data.cpp +++ b/spine-c-new/src/generated/path_constraint_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_path_constraint_data spine_path_constraint_data_create(const utf8 * name) { +spine_path_constraint_data spine_path_constraint_data_create(const char* name) { PathConstraintData *obj = new (__FILE__, __LINE__) PathConstraintData(String(name)); return (spine_path_constraint_data) obj; } @@ -42,22 +42,14 @@ void spine_path_constraint_data_dispose(spine_path_constraint_data obj) { delete (PathConstraintData *) obj; } -spine_rtti spine_path_constraint_data_get_rtti(spine_path_constraint_data obj) { - if (!obj) return nullptr; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_path_constraint_data_get_rtti() { + return (spine_rtti) &PathConstraintData::rtti; } spine_constraint spine_path_constraint_data_create(spine_path_constraint_data obj, spine_skeleton skeleton) { if (!obj) return 0; PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_constraint) _obj->create(skeleton); -} - -void * spine_path_constraint_data_get_bones(spine_path_constraint_data obj) { - if (!obj) return nullptr; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (void *) _obj->getBones(); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } int32_t spine_path_constraint_data_get_num_bones(spine_path_constraint_data obj) { @@ -73,7 +65,7 @@ spine_bone_data *spine_path_constraint_data_get_bones(spine_path_constraint_data } spine_slot_data spine_path_constraint_data_get_slot(spine_path_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_data) 0; PathConstraintData *_obj = (PathConstraintData *) obj; return (spine_slot_data) _obj->getSlot(); } @@ -85,39 +77,39 @@ void spine_path_constraint_data_set_slot(spine_path_constraint_data obj, spine_s } spine_position_mode spine_path_constraint_data_get_position_mode(spine_path_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_position_mode) 0; PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getPositionMode(); + return (spine_position_mode) _obj->getPositionMode(); } void spine_path_constraint_data_set_position_mode(spine_path_constraint_data obj, spine_position_mode value) { if (!obj) return; PathConstraintData *_obj = (PathConstraintData *) obj; - _obj->setPositionMode(value); + _obj->setPositionMode((PositionMode) value); } spine_spacing_mode spine_path_constraint_data_get_spacing_mode(spine_path_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_spacing_mode) 0; PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getSpacingMode(); + return (spine_spacing_mode) _obj->getSpacingMode(); } void spine_path_constraint_data_set_spacing_mode(spine_path_constraint_data obj, spine_spacing_mode value) { if (!obj) return; PathConstraintData *_obj = (PathConstraintData *) obj; - _obj->setSpacingMode(value); + _obj->setSpacingMode((SpacingMode) value); } spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spine_path_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_rotate_mode) 0; PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getRotateMode(); + return (spine_rotate_mode) _obj->getRotateMode(); } void spine_path_constraint_data_set_rotate_mode(spine_path_constraint_data obj, spine_rotate_mode value) { if (!obj) return; PathConstraintData *_obj = (PathConstraintData *) obj; - _obj->setRotateMode(value); + _obj->setRotateMode((RotateMode) value); } float spine_path_constraint_data_get_offset_rotation(spine_path_constraint_data obj) { @@ -132,14 +124,14 @@ void spine_path_constraint_data_set_offset_rotation(spine_path_constraint_data o _obj->setOffsetRotation(value); } -const utf8 * spine_path_constraint_data_get_name(spine_path_constraint_data obj) { +const char* spine_path_constraint_data_get_name(spine_path_constraint_data obj) { if (!obj) return nullptr; PathConstraintData *_obj = (PathConstraintData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data obj) { - if (!obj) return 0; +bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data obj) { + if (!obj) return false; PathConstraintData *_obj = (PathConstraintData *) obj; return _obj->isSkinRequired(); } @@ -147,11 +139,5 @@ spine_bool spine_path_constraint_data_is_skin_required(spine_path_constraint_dat spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data obj) { if (!obj) return 0; PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getSetupPose(); -} - -spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data obj) { - if (!obj) return 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getSetupPose(); + return (spine_path_constraint_pose) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/path_constraint_data.h b/spine-c-new/src/generated/path_constraint_data.h index 181f9727b..d1a175865 100644 --- a/spine-c-new/src/generated/path_constraint_data.h +++ b/spine-c-new/src/generated/path_constraint_data.h @@ -34,15 +34,12 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_path_constraint_data) - -SPINE_C_EXPORT spine_path_constraint_data spine_path_constraint_data_create(const utf8 * name); +SPINE_C_EXPORT spine_path_constraint_data spine_path_constraint_data_create(const char* name); SPINE_C_EXPORT void spine_path_constraint_data_dispose(spine_path_constraint_data obj); -SPINE_C_EXPORT spine_rtti spine_path_constraint_data_get_rtti(spine_path_constraint_data obj); +SPINE_C_EXPORT spine_rtti spine_path_constraint_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_path_constraint_data_create(spine_path_constraint_data obj, spine_skeleton skeleton); -SPINE_C_EXPORT void * spine_path_constraint_data_get_bones(spine_path_constraint_data obj); SPINE_C_EXPORT int32_t spine_path_constraint_data_get_num_bones(spine_path_constraint_data obj); SPINE_C_EXPORT spine_bone_data *spine_path_constraint_data_get_bones(spine_path_constraint_data obj); SPINE_C_EXPORT spine_slot_data spine_path_constraint_data_get_slot(spine_path_constraint_data obj); @@ -55,9 +52,8 @@ SPINE_C_EXPORT spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spin SPINE_C_EXPORT void spine_path_constraint_data_set_rotate_mode(spine_path_constraint_data obj, spine_rotate_mode value); SPINE_C_EXPORT float spine_path_constraint_data_get_offset_rotation(spine_path_constraint_data obj); SPINE_C_EXPORT void spine_path_constraint_data_set_offset_rotation(spine_path_constraint_data obj, float value); -SPINE_C_EXPORT const utf8 * spine_path_constraint_data_get_name(spine_path_constraint_data obj); -SPINE_C_EXPORT spine_bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data obj); -SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data obj); +SPINE_C_EXPORT const char* spine_path_constraint_data_get_name(spine_path_constraint_data obj); +SPINE_C_EXPORT bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data obj); SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/path_constraint_mix_timeline.cpp b/spine-c-new/src/generated/path_constraint_mix_timeline.cpp index 274aef034..54ddae5bd 100644 --- a/spine-c-new/src/generated/path_constraint_mix_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_mix_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_path_constraint_mix_timeline spine_path_constraint_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex) { +spine_path_constraint_mix_timeline spine_path_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex) { PathConstraintMixTimeline *obj = new (__FILE__, __LINE__) PathConstraintMixTimeline(frameCount, bezierCount, constraintIndex); return (spine_path_constraint_mix_timeline) obj; } @@ -42,94 +42,80 @@ void spine_path_constraint_mix_timeline_dispose(spine_path_constraint_mix_timeli delete (PathConstraintMixTimeline *) obj; } -spine_rtti spine_path_constraint_mix_timeline_get_rtti(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_path_constraint_mix_timeline_get_rtti() { + return (spine_rtti) &PathConstraintMixTimeline::rtti; } -void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_path_constraint_mix_timeline_set_frame(spine_path_constraint_mix_timeline obj, int32_t frame, float time, float mixRotate, float mixX, float mixY) { +void spine_path_constraint_mix_timeline_set_frame(spine_path_constraint_mix_timeline obj, int frame, float time, float mixRotate, float mixX, float mixY) { if (!obj) return ; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; _obj->setFrame(frame, time, mixRotate, mixX, mixY); } -void spine_path_constraint_mix_timeline_set_linear(spine_path_constraint_mix_timeline obj, spine_size_t value) { +void spine_path_constraint_mix_timeline_set_linear(spine_path_constraint_mix_timeline obj, size_t value) { if (!obj) return; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; _obj->setLinear(value); } -void spine_path_constraint_mix_timeline_set_stepped(spine_path_constraint_mix_timeline obj, spine_size_t value) { +void spine_path_constraint_mix_timeline_set_stepped(spine_path_constraint_mix_timeline obj, size_t value) { if (!obj) return; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; _obj->setStepped(value); } -void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_path_constraint_mix_timeline_get_num_curves(spine_path_constraint_mix_timeline obj) { if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj) { +float *spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj) { if (!obj) return nullptr; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; +size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline obj) { + if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; +size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline obj) { + if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return _obj->getFrameCount(); } -void * spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_path_constraint_mix_timeline_get_num_frames(spine_path_constraint_mix_timeline obj) { if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj) { +float *spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj) { if (!obj) return nullptr; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_timeline obj) { @@ -138,31 +124,25 @@ float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_ return _obj->getDuration(); } -void * spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_path_constraint_mix_timeline_get_num_property_ids(spine_path_constraint_mix_timeline obj) { if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj) { +int64_t *spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj) { if (!obj) return nullptr; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline obj) { +int spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline obj) { if (!obj) return 0; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline obj, int32_t value) { +void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline obj, int value) { if (!obj) return; PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/path_constraint_mix_timeline.h b/spine-c-new/src/generated/path_constraint_mix_timeline.h index ff7bbadd8..35500b021 100644 --- a/spine-c-new/src/generated/path_constraint_mix_timeline.h +++ b/spine-c-new/src/generated/path_constraint_mix_timeline.h @@ -34,33 +34,28 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_path_constraint_mix_timeline) - -SPINE_C_EXPORT spine_path_constraint_mix_timeline spine_path_constraint_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex); +SPINE_C_EXPORT spine_path_constraint_mix_timeline spine_path_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex); SPINE_C_EXPORT void spine_path_constraint_mix_timeline_dispose(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_rtti spine_path_constraint_mix_timeline_get_rtti(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_frame(spine_path_constraint_mix_timeline obj, int32_t frame, float time, float mixRotate, float mixX, float mixY); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_linear(spine_path_constraint_mix_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_stepped(spine_path_constraint_mix_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT spine_rtti spine_path_constraint_mix_timeline_get_rtti(); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_frame(spine_path_constraint_mix_timeline obj, int frame, float time, float mixRotate, float mixX, float mixY); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_linear(spine_path_constraint_mix_timeline obj, size_t value); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_stepped(spine_path_constraint_mix_timeline obj, size_t value); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_path_constraint_mix_timeline_get_num_curves(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_float *spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT void * spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT float *spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline obj); SPINE_C_EXPORT int32_t spine_path_constraint_mix_timeline_get_num_frames(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_float *spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT float *spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj); SPINE_C_EXPORT float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT void * spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj); SPINE_C_EXPORT int32_t spine_path_constraint_mix_timeline_get_num_property_ids(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT int32_t spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT int spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline obj); +SPINE_C_EXPORT void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/path_constraint_pose.cpp b/spine-c-new/src/generated/path_constraint_pose.cpp index e961a9d0a..5eede403d 100644 --- a/spine-c-new/src/generated/path_constraint_pose.cpp +++ b/spine-c-new/src/generated/path_constraint_pose.cpp @@ -45,7 +45,7 @@ void spine_path_constraint_pose_dispose(spine_path_constraint_pose obj) { void spine_path_constraint_pose_set(spine_path_constraint_pose obj, spine_path_constraint_pose value) { if (!obj) return; PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->set(value); + _obj->set(*((PathConstraintPose*) value)); } float spine_path_constraint_pose_get_position(spine_path_constraint_pose obj) { diff --git a/spine-c-new/src/generated/path_constraint_pose.h b/spine-c-new/src/generated/path_constraint_pose.h index 45d440a19..d34891d2d 100644 --- a/spine-c-new/src/generated/path_constraint_pose.h +++ b/spine-c-new/src/generated/path_constraint_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_path_constraint_pose) +#include "types.h" SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_pose_create(void); SPINE_C_EXPORT void spine_path_constraint_pose_dispose(spine_path_constraint_pose obj); diff --git a/spine-c-new/src/generated/path_constraint_position_timeline.cpp b/spine-c-new/src/generated/path_constraint_position_timeline.cpp index e6256b2d4..3ba61714e 100644 --- a/spine-c-new/src/generated/path_constraint_position_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_position_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_path_constraint_position_timeline spine_path_constraint_position_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex) { +spine_path_constraint_position_timeline spine_path_constraint_position_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex) { PathConstraintPositionTimeline *obj = new (__FILE__, __LINE__) PathConstraintPositionTimeline(frameCount, bezierCount, constraintIndex); return (spine_path_constraint_position_timeline) obj; } @@ -42,19 +42,17 @@ void spine_path_constraint_position_timeline_dispose(spine_path_constraint_posit delete (PathConstraintPositionTimeline *) obj; } -spine_rtti spine_path_constraint_position_timeline_get_rtti(spine_path_constraint_position_timeline obj) { - if (!obj) return nullptr; - PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_path_constraint_position_timeline_get_rtti() { + return (spine_rtti) &PathConstraintPositionTimeline::rtti; } -void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline obj, spine_size_t frame, float time, float value) { +void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_path_constraint_position_timeline_get_curve_value(spine_path_constra float spine_path_constraint_position_timeline_get_relative_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_path_constraint_position_timeline_get_absolute_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_path_constraint_position_timeline_get_absolute_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_path_constraint_position_timeline_get_absolute_value_6(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_path_constraint_position_timeline_get_scale_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline obj) { +int spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline obj) { if (!obj) return 0; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline obj, int32_t value) { +void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline obj, int value) { if (!obj) return; PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/path_constraint_position_timeline.h b/spine-c-new/src/generated/path_constraint_position_timeline.h index 13e9e4e17..48e7a06fa 100644 --- a/spine-c-new/src/generated/path_constraint_position_timeline.h +++ b/spine-c-new/src/generated/path_constraint_position_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_path_constraint_position_timeline) - -SPINE_C_EXPORT spine_path_constraint_position_timeline spine_path_constraint_position_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex); +SPINE_C_EXPORT spine_path_constraint_position_timeline spine_path_constraint_position_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex); SPINE_C_EXPORT void spine_path_constraint_position_timeline_dispose(spine_path_constraint_position_timeline obj); -SPINE_C_EXPORT spine_rtti spine_path_constraint_position_timeline_get_rtti(spine_path_constraint_position_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_path_constraint_position_timeline_get_rtti(); +SPINE_C_EXPORT void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_curve_value(spine_path_constraint_position_timeline obj, float time); SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_relative_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_absolute_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_absolute_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_absolute_value_6(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_path_constraint_position_timeline_get_scale_value(spine_path_constraint_position_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline obj); +SPINE_C_EXPORT void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp b/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp index f8a4f8339..e708648c2 100644 --- a/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_path_constraint_spacing_timeline spine_path_constraint_spacing_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex) { +spine_path_constraint_spacing_timeline spine_path_constraint_spacing_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex) { PathConstraintSpacingTimeline *obj = new (__FILE__, __LINE__) PathConstraintSpacingTimeline(frameCount, bezierCount, constraintIndex); return (spine_path_constraint_spacing_timeline) obj; } @@ -42,19 +42,17 @@ void spine_path_constraint_spacing_timeline_dispose(spine_path_constraint_spacin delete (PathConstraintSpacingTimeline *) obj; } -spine_rtti spine_path_constraint_spacing_timeline_get_rtti(spine_path_constraint_spacing_timeline obj) { - if (!obj) return nullptr; - PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_path_constraint_spacing_timeline_get_rtti() { + return (spine_rtti) &PathConstraintSpacingTimeline::rtti; } -void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline obj, spine_size_t frame, float time, float value) { +void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_path_constraint_spacing_timeline_get_curve_value(spine_path_constrai float spine_path_constraint_spacing_timeline_get_relative_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_path_constraint_spacing_timeline_get_absolute_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_path_constraint_spacing_timeline_get_absolute_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_path_constraint_spacing_timeline_get_absolute_value_6(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_path_constraint_spacing_timeline_get_scale_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline obj) { +int spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline obj) { if (!obj) return 0; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline obj, int32_t value) { +void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline obj, int value) { if (!obj) return; PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/path_constraint_spacing_timeline.h b/spine-c-new/src/generated/path_constraint_spacing_timeline.h index 3b2302948..402616aa9 100644 --- a/spine-c-new/src/generated/path_constraint_spacing_timeline.h +++ b/spine-c-new/src/generated/path_constraint_spacing_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_path_constraint_spacing_timeline) - -SPINE_C_EXPORT spine_path_constraint_spacing_timeline spine_path_constraint_spacing_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex); +SPINE_C_EXPORT spine_path_constraint_spacing_timeline spine_path_constraint_spacing_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex); SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_dispose(spine_path_constraint_spacing_timeline obj); -SPINE_C_EXPORT spine_rtti spine_path_constraint_spacing_timeline_get_rtti(spine_path_constraint_spacing_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_path_constraint_spacing_timeline_get_rtti(); +SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_curve_value(spine_path_constraint_spacing_timeline obj, float time); SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_relative_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_absolute_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_absolute_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_absolute_value_6(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_path_constraint_spacing_timeline_get_scale_value(spine_path_constraint_spacing_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline obj); -SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline obj); +SPINE_C_EXPORT void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics.h b/spine-c-new/src/generated/physics.h index d92047be6..ebb064308 100644 --- a/spine-c-new/src/generated/physics.h +++ b/spine-c-new/src/generated/physics.h @@ -30,17 +30,17 @@ #ifndef SPINE_C_PHYSICS_H #define SPINE_C_PHYSICS_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_physics { - SPINE_PHYSICS_PHYSICS_NONE, - SPINE_PHYSICS_PHYSICS_RESET, - SPINE_PHYSICS_PHYSICS_UPDATE, - SPINE_PHYSICS_PHYSICS_POSE + SPINE_PHYSICS_NONE, + SPINE_PHYSICS_RESET, + SPINE_PHYSICS_UPDATE, + SPINE_PHYSICS_POSE } spine_physics; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/physics_constraint.cpp b/spine-c-new/src/generated/physics_constraint.cpp index 55f66731e..54b7e334e 100644 --- a/spine-c-new/src/generated/physics_constraint.cpp +++ b/spine-c-new/src/generated/physics_constraint.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_physics_constraint spine_physics_constraint_create(spine_physics_constraint_data data, spine_skeleton skeleton) { - PhysicsConstraint *obj = new (__FILE__, __LINE__) PhysicsConstraint(data, skeleton); + PhysicsConstraint *obj = new (__FILE__, __LINE__) PhysicsConstraint(*(PhysicsConstraintData*) data, *(Skeleton*) skeleton); return (spine_physics_constraint) obj; } @@ -42,26 +42,24 @@ void spine_physics_constraint_dispose(spine_physics_constraint obj) { delete (PhysicsConstraint *) obj; } -spine_rtti spine_physics_constraint_get_rtti(spine_physics_constraint obj) { - if (!obj) return nullptr; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_get_rtti() { + return (spine_rtti) &PhysicsConstraint::rtti; } void spine_physics_constraint_update(spine_physics_constraint obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_physics_constraint_sort(spine_physics_constraint obj, spine_skeleton skeleton) { if (!obj) return ; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_physics_constraint_is_source_active(spine_physics_constraint obj) { - if (!obj) return 0; +bool spine_physics_constraint_is_source_active(spine_physics_constraint obj) { + if (!obj) return false; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; return _obj->isSourceActive(); } @@ -69,13 +67,13 @@ spine_bool spine_physics_constraint_is_source_active(spine_physics_constraint ob spine_physics_constraint spine_physics_constraint_copy(spine_physics_constraint obj, spine_skeleton skeleton) { if (!obj) return 0; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_physics_constraint) _obj->copy(skeleton); + return (spine_physics_constraint) _obj->copy(*(Skeleton*) skeleton); } void spine_physics_constraint_reset(spine_physics_constraint obj, spine_skeleton skeleton) { if (!obj) return ; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->reset(skeleton); + _obj->reset(*(Skeleton*) skeleton); } void spine_physics_constraint_translate(spine_physics_constraint obj, float x, float y) { @@ -91,21 +89,21 @@ void spine_physics_constraint_rotate(spine_physics_constraint obj, float x, floa } spine_bone_pose spine_physics_constraint_get_bone(spine_physics_constraint obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_pose) 0; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->getBone(); + return (spine_bone_pose) &_obj->getBone(); } void spine_physics_constraint_set_bone(spine_physics_constraint obj, spine_bone_pose value) { if (!obj) return; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->setBone(value); + _obj->setBone(*((BonePose*) value)); } spine_constraint_data spine_physics_constraint_get_data(spine_physics_constraint obj) { if (!obj) return 0; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->getData(); + return (spine_constraint_data) &_obj->getData(); } void spine_physics_constraint_pose(spine_physics_constraint obj) { @@ -123,13 +121,13 @@ void spine_physics_constraint_setup_pose(spine_physics_constraint obj) { spine_physics_constraint_pose spine_physics_constraint_get_pose(spine_physics_constraint obj) { if (!obj) return 0; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->getPose(); + return (spine_physics_constraint_pose) &_obj->getPose(); } spine_physics_constraint_pose spine_physics_constraint_get_applied_pose(spine_physics_constraint obj) { if (!obj) return 0; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->getAppliedPose(); + return (spine_physics_constraint_pose) &_obj->getAppliedPose(); } void spine_physics_constraint_reset_constrained(spine_physics_constraint obj) { @@ -144,19 +142,19 @@ void spine_physics_constraint_constrained(spine_physics_constraint obj) { _obj->constrained(); } -spine_bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint obj) { - if (!obj) return 0; +bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint obj) { + if (!obj) return false; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_physics_constraint_is_active(spine_physics_constraint obj) { - if (!obj) return 0; +bool spine_physics_constraint_is_active(spine_physics_constraint obj) { + if (!obj) return false; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; return _obj->isActive(); } -void spine_physics_constraint_set_active(spine_physics_constraint obj, spine_bool value) { +void spine_physics_constraint_set_active(spine_physics_constraint obj, bool value) { if (!obj) return; PhysicsConstraint *_obj = (PhysicsConstraint *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/physics_constraint.h b/spine-c-new/src/generated/physics_constraint.h index 0ab88da05..40f6af059 100644 --- a/spine-c-new/src/generated/physics_constraint.h +++ b/spine-c-new/src/generated/physics_constraint.h @@ -34,16 +34,14 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_physics_constraint) +#include "types.h" SPINE_C_EXPORT spine_physics_constraint spine_physics_constraint_create(spine_physics_constraint_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_physics_constraint_dispose(spine_physics_constraint obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_get_rtti(spine_physics_constraint obj); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_get_rtti(); SPINE_C_EXPORT void spine_physics_constraint_update(spine_physics_constraint obj, spine_skeleton skeleton, spine_physics physics); SPINE_C_EXPORT void spine_physics_constraint_sort(spine_physics_constraint obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_physics_constraint_is_source_active(spine_physics_constraint obj); +SPINE_C_EXPORT bool spine_physics_constraint_is_source_active(spine_physics_constraint obj); SPINE_C_EXPORT spine_physics_constraint spine_physics_constraint_copy(spine_physics_constraint obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_physics_constraint_reset(spine_physics_constraint obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_physics_constraint_translate(spine_physics_constraint obj, float x, float y); @@ -57,9 +55,9 @@ SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_get_pose(s SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_get_applied_pose(spine_physics_constraint obj); SPINE_C_EXPORT void spine_physics_constraint_reset_constrained(spine_physics_constraint obj); SPINE_C_EXPORT void spine_physics_constraint_constrained(spine_physics_constraint obj); -SPINE_C_EXPORT spine_bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint obj); -SPINE_C_EXPORT spine_bool spine_physics_constraint_is_active(spine_physics_constraint obj); -SPINE_C_EXPORT void spine_physics_constraint_set_active(spine_physics_constraint obj, spine_bool value); +SPINE_C_EXPORT bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint obj); +SPINE_C_EXPORT bool spine_physics_constraint_is_active(spine_physics_constraint obj); +SPINE_C_EXPORT void spine_physics_constraint_set_active(spine_physics_constraint obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp b/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp index 4bac3df42..1635b4cda 100644 --- a/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_damping_timeline spine_physics_constraint_damping_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_damping_timeline spine_physics_constraint_damping_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintDampingTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintDampingTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_damping_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_damping_timeline_dispose(spine_physics_constraint_ delete (PhysicsConstraintDampingTimeline *) obj; } -spine_rtti spine_physics_constraint_damping_timeline_get_rtti(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_damping_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintDampingTimeline::rtti; } -void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_damping_timeline_get_curve_value(spine_physics_co float spine_physics_constraint_damping_timeline_get_relative_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_damping_timeline_get_absolute_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_damping_timeline_get_absolute_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_damping_timeline_get_absolute_value_6(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_damping_timeline_get_scale_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_damping_timeline_set_linear(spine_physics_constraint_damping_timeline obj, spine_size_t value) { +void spine_physics_constraint_damping_timeline_set_linear(spine_physics_constraint_damping_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_damping_timeline_set_stepped(spine_physics_constraint_damping_timeline obj, spine_size_t value) { +void spine_physics_constraint_damping_timeline_set_stepped(spine_physics_constraint_damping_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_damping_timeline_get_num_curves(spine_physics_constraint_damping_timeline obj) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj) { +float *spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj) { if (!obj) return nullptr; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline obj) { + if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline obj) { + if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_damping_timeline_get_num_frames(spine_physics_constraint_damping_timeline obj) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj) { +float *spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj) { if (!obj) return nullptr; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_damping_timeline_get_duration(spine_physics_constraint_damping_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_damping_timeline_get_duration(spine_physics_const return _obj->getDuration(); } -void * spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_damping_timeline_get_num_property_ids(spine_physics_constraint_damping_timeline obj) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj) { +int64_t *spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj) { if (!obj) return nullptr; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline obj) { +int spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline obj) { if (!obj) return 0; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline obj, int32_t value) { +void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline obj, int value) { if (!obj) return; PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_damping_timeline.h b/spine-c-new/src/generated/physics_constraint_damping_timeline.h index c1f9f4840..839e0781b 100644 --- a/spine-c-new/src/generated/physics_constraint_damping_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_damping_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_damping_timeline) - -SPINE_C_EXPORT spine_physics_constraint_damping_timeline spine_physics_constraint_damping_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_damping_timeline spine_physics_constraint_damping_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_dispose(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_damping_timeline_get_rtti(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_damping_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_curve_value(spine_physics_constraint_damping_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_relative_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_absolute_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_absolute_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_absolute_value_6(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_scale_value(spine_physics_constraint_damping_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_linear(spine_physics_constraint_damping_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_stepped(spine_physics_constraint_damping_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_linear(spine_physics_constraint_damping_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_stepped(spine_physics_constraint_damping_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_damping_timeline_get_num_curves(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_damping_timeline_get_num_frames(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_damping_timeline_get_duration(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_damping_timeline_get_num_property_ids(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_data.cpp b/spine-c-new/src/generated/physics_constraint_data.cpp index 27b7052ec..71823b40f 100644 --- a/spine-c-new/src/generated/physics_constraint_data.cpp +++ b/spine-c-new/src/generated/physics_constraint_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_data spine_physics_constraint_data_create(const utf8 * name) { +spine_physics_constraint_data spine_physics_constraint_data_create(const char* name) { PhysicsConstraintData *obj = new (__FILE__, __LINE__) PhysicsConstraintData(String(name)); return (spine_physics_constraint_data) obj; } @@ -42,20 +42,18 @@ void spine_physics_constraint_data_dispose(spine_physics_constraint_data obj) { delete (PhysicsConstraintData *) obj; } -spine_rtti spine_physics_constraint_data_get_rtti(spine_physics_constraint_data obj) { - if (!obj) return nullptr; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_data_get_rtti() { + return (spine_rtti) &PhysicsConstraintData::rtti; } spine_constraint spine_physics_constraint_data_create(spine_physics_constraint_data obj, spine_skeleton skeleton) { if (!obj) return 0; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return (spine_constraint) _obj->create(skeleton); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } spine_bone_data spine_physics_constraint_data_get_bone(spine_physics_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return (spine_bone_data) _obj->getBone(); } @@ -150,98 +148,98 @@ void spine_physics_constraint_data_set_limit(spine_physics_constraint_data obj, _obj->setLimit(value); } -spine_bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getInertiaGlobal(); } -void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setInertiaGlobal(value); } -spine_bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getStrengthGlobal(); } -void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setStrengthGlobal(value); } -spine_bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getDampingGlobal(); } -void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setDampingGlobal(value); } -spine_bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getMassGlobal(); } -void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setMassGlobal(value); } -spine_bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getWindGlobal(); } -void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setWindGlobal(value); } -spine_bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getGravityGlobal(); } -void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setGravityGlobal(value); } -spine_bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->getMixGlobal(); } -void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data obj, spine_bool value) { +void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data obj, bool value) { if (!obj) return; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; _obj->setMixGlobal(value); } -const utf8 * spine_physics_constraint_data_get_name(spine_physics_constraint_data obj) { +const char* spine_physics_constraint_data_get_name(spine_physics_constraint_data obj) { if (!obj) return nullptr; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data obj) { - if (!obj) return 0; +bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data obj) { + if (!obj) return false; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; return _obj->isSkinRequired(); } @@ -249,11 +247,5 @@ spine_bool spine_physics_constraint_data_is_skin_required(spine_physics_constrai spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data obj) { if (!obj) return 0; PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getSetupPose(); -} - -spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getSetupPose(); + return (spine_physics_constraint_pose) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/physics_constraint_data.h b/spine-c-new/src/generated/physics_constraint_data.h index 5cb852711..9ad2b35fd 100644 --- a/spine-c-new/src/generated/physics_constraint_data.h +++ b/spine-c-new/src/generated/physics_constraint_data.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_data) - -SPINE_C_EXPORT spine_physics_constraint_data spine_physics_constraint_data_create(const utf8 * name); +SPINE_C_EXPORT spine_physics_constraint_data spine_physics_constraint_data_create(const char* name); SPINE_C_EXPORT void spine_physics_constraint_data_dispose(spine_physics_constraint_data obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_data_get_rtti(spine_physics_constraint_data obj); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_physics_constraint_data_create(spine_physics_constraint_data obj, spine_skeleton skeleton); SPINE_C_EXPORT spine_bone_data spine_physics_constraint_data_get_bone(spine_physics_constraint_data obj); SPINE_C_EXPORT void spine_physics_constraint_data_set_bone(spine_physics_constraint_data obj, spine_bone_data value); @@ -58,23 +56,22 @@ SPINE_C_EXPORT float spine_physics_constraint_data_get_shear_x(spine_physics_con SPINE_C_EXPORT void spine_physics_constraint_data_set_shear_x(spine_physics_constraint_data obj, float value); SPINE_C_EXPORT float spine_physics_constraint_data_get_limit(spine_physics_constraint_data obj); SPINE_C_EXPORT void spine_physics_constraint_data_set_limit(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data obj, spine_bool value); -SPINE_C_EXPORT const utf8 * spine_physics_constraint_data_get_name(spine_physics_constraint_data obj); -SPINE_C_EXPORT spine_bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data obj); -SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data obj); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data obj); +SPINE_C_EXPORT void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data obj, bool value); +SPINE_C_EXPORT const char* spine_physics_constraint_data_get_name(spine_physics_constraint_data obj); +SPINE_C_EXPORT bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data obj); SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp b/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp index f138f63af..db78a06e8 100644 --- a/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_gravity_timeline spine_physics_constraint_gravity_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_gravity_timeline spine_physics_constraint_gravity_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintGravityTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintGravityTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_gravity_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_gravity_timeline_dispose(spine_physics_constraint_ delete (PhysicsConstraintGravityTimeline *) obj; } -spine_rtti spine_physics_constraint_gravity_timeline_get_rtti(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_gravity_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintGravityTimeline::rtti; } -void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_gravity_timeline_get_curve_value(spine_physics_co float spine_physics_constraint_gravity_timeline_get_relative_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_gravity_timeline_get_absolute_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_gravity_timeline_get_absolute_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_gravity_timeline_get_absolute_value_6(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_gravity_timeline_get_scale_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_gravity_timeline_set_linear(spine_physics_constraint_gravity_timeline obj, spine_size_t value) { +void spine_physics_constraint_gravity_timeline_set_linear(spine_physics_constraint_gravity_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_gravity_timeline_set_stepped(spine_physics_constraint_gravity_timeline obj, spine_size_t value) { +void spine_physics_constraint_gravity_timeline_set_stepped(spine_physics_constraint_gravity_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_gravity_timeline_get_num_curves(spine_physics_constraint_gravity_timeline obj) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj) { +float *spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj) { if (!obj) return nullptr; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline obj) { + if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline obj) { + if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_gravity_timeline_get_num_frames(spine_physics_constraint_gravity_timeline obj) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj) { +float *spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj) { if (!obj) return nullptr; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_constraint_gravity_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_const return _obj->getDuration(); } -void * spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_gravity_timeline_get_num_property_ids(spine_physics_constraint_gravity_timeline obj) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj) { +int64_t *spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj) { if (!obj) return nullptr; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline obj) { +int spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline obj) { if (!obj) return 0; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline obj, int32_t value) { +void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline obj, int value) { if (!obj) return; PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_gravity_timeline.h b/spine-c-new/src/generated/physics_constraint_gravity_timeline.h index d3787cbeb..de975c798 100644 --- a/spine-c-new/src/generated/physics_constraint_gravity_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_gravity_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_gravity_timeline) - -SPINE_C_EXPORT spine_physics_constraint_gravity_timeline spine_physics_constraint_gravity_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_gravity_timeline spine_physics_constraint_gravity_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_dispose(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_gravity_timeline_get_rtti(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_gravity_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_curve_value(spine_physics_constraint_gravity_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_relative_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_absolute_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_absolute_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_absolute_value_6(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_scale_value(spine_physics_constraint_gravity_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_linear(spine_physics_constraint_gravity_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_stepped(spine_physics_constraint_gravity_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_linear(spine_physics_constraint_gravity_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_stepped(spine_physics_constraint_gravity_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_gravity_timeline_get_num_curves(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_gravity_timeline_get_num_frames(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_gravity_timeline_get_num_property_ids(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp b/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp index b4c6208c7..f9564f8d9 100644 --- a/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_inertia_timeline spine_physics_constraint_inertia_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_inertia_timeline spine_physics_constraint_inertia_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintInertiaTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintInertiaTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_inertia_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_inertia_timeline_dispose(spine_physics_constraint_ delete (PhysicsConstraintInertiaTimeline *) obj; } -spine_rtti spine_physics_constraint_inertia_timeline_get_rtti(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_inertia_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintInertiaTimeline::rtti; } -void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_inertia_timeline_get_curve_value(spine_physics_co float spine_physics_constraint_inertia_timeline_get_relative_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_inertia_timeline_get_absolute_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_inertia_timeline_get_absolute_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_inertia_timeline_get_absolute_value_6(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_inertia_timeline_get_scale_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_inertia_timeline_set_linear(spine_physics_constraint_inertia_timeline obj, spine_size_t value) { +void spine_physics_constraint_inertia_timeline_set_linear(spine_physics_constraint_inertia_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_inertia_timeline_set_stepped(spine_physics_constraint_inertia_timeline obj, spine_size_t value) { +void spine_physics_constraint_inertia_timeline_set_stepped(spine_physics_constraint_inertia_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_inertia_timeline_get_num_curves(spine_physics_constraint_inertia_timeline obj) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj) { +float *spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj) { if (!obj) return nullptr; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline obj) { + if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline obj) { + if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_inertia_timeline_get_num_frames(spine_physics_constraint_inertia_timeline obj) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj) { +float *spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj) { if (!obj) return nullptr; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_constraint_inertia_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_const return _obj->getDuration(); } -void * spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_inertia_timeline_get_num_property_ids(spine_physics_constraint_inertia_timeline obj) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj) { +int64_t *spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj) { if (!obj) return nullptr; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline obj) { +int spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline obj) { if (!obj) return 0; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline obj, int32_t value) { +void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline obj, int value) { if (!obj) return; PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_inertia_timeline.h b/spine-c-new/src/generated/physics_constraint_inertia_timeline.h index 9284a1dcf..0ddb3ca51 100644 --- a/spine-c-new/src/generated/physics_constraint_inertia_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_inertia_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_inertia_timeline) - -SPINE_C_EXPORT spine_physics_constraint_inertia_timeline spine_physics_constraint_inertia_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_inertia_timeline spine_physics_constraint_inertia_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_dispose(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_inertia_timeline_get_rtti(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_inertia_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_curve_value(spine_physics_constraint_inertia_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_relative_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_absolute_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_absolute_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_absolute_value_6(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_scale_value(spine_physics_constraint_inertia_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_linear(spine_physics_constraint_inertia_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_stepped(spine_physics_constraint_inertia_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_linear(spine_physics_constraint_inertia_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_stepped(spine_physics_constraint_inertia_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_inertia_timeline_get_num_curves(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_inertia_timeline_get_num_frames(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_inertia_timeline_get_num_property_ids(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp b/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp index 7fd32c0cb..b705113cb 100644 --- a/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_mass_timeline spine_physics_constraint_mass_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_mass_timeline spine_physics_constraint_mass_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintMassTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintMassTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_mass_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_mass_timeline_dispose(spine_physics_constraint_mas delete (PhysicsConstraintMassTimeline *) obj; } -spine_rtti spine_physics_constraint_mass_timeline_get_rtti(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_mass_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintMassTimeline::rtti; } -void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_mass_timeline_get_curve_value(spine_physics_const float spine_physics_constraint_mass_timeline_get_relative_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_mass_timeline_get_absolute_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_mass_timeline_get_absolute_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_mass_timeline_get_absolute_value_6(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_mass_timeline_get_scale_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_mass_timeline_set_linear(spine_physics_constraint_mass_timeline obj, spine_size_t value) { +void spine_physics_constraint_mass_timeline_set_linear(spine_physics_constraint_mass_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_mass_timeline_set_stepped(spine_physics_constraint_mass_timeline obj, spine_size_t value) { +void spine_physics_constraint_mass_timeline_set_stepped(spine_physics_constraint_mass_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_mass_timeline_get_num_curves(spine_physics_constraint_mass_timeline obj) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj) { +float *spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline obj) { + if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline obj) { + if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_mass_timeline_get_num_frames(spine_physics_constraint_mass_timeline obj) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj) { +float *spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constraint_mass_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constrai return _obj->getDuration(); } -void * spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_mass_timeline_get_num_property_ids(spine_physics_constraint_mass_timeline obj) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj) { +int64_t *spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline obj) { +int spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline obj) { if (!obj) return 0; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline obj, int32_t value) { +void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline obj, int value) { if (!obj) return; PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_mass_timeline.h b/spine-c-new/src/generated/physics_constraint_mass_timeline.h index de9321f57..371cf28a3 100644 --- a/spine-c-new/src/generated/physics_constraint_mass_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_mass_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_mass_timeline) - -SPINE_C_EXPORT spine_physics_constraint_mass_timeline spine_physics_constraint_mass_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_mass_timeline spine_physics_constraint_mass_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_dispose(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_mass_timeline_get_rtti(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_mass_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_curve_value(spine_physics_constraint_mass_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_relative_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_absolute_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_absolute_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_absolute_value_6(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_scale_value(spine_physics_constraint_mass_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_linear(spine_physics_constraint_mass_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_stepped(spine_physics_constraint_mass_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_linear(spine_physics_constraint_mass_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_stepped(spine_physics_constraint_mass_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_mass_timeline_get_num_curves(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_mass_timeline_get_num_frames(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_mass_timeline_get_num_property_ids(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp b/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp index a50589dfd..a737765e0 100644 --- a/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_mix_timeline spine_physics_constraint_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_mix_timeline spine_physics_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintMixTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintMixTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_mix_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_mix_timeline_dispose(spine_physics_constraint_mix_ delete (PhysicsConstraintMixTimeline *) obj; } -spine_rtti spine_physics_constraint_mix_timeline_get_rtti(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_mix_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintMixTimeline::rtti; } -void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_mix_timeline_get_curve_value(spine_physics_constr float spine_physics_constraint_mix_timeline_get_relative_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_mix_timeline_get_absolute_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_mix_timeline_get_absolute_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_mix_timeline_get_absolute_value_6(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_mix_timeline_get_scale_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_mix_timeline_set_linear(spine_physics_constraint_mix_timeline obj, spine_size_t value) { +void spine_physics_constraint_mix_timeline_set_linear(spine_physics_constraint_mix_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_mix_timeline_set_stepped(spine_physics_constraint_mix_timeline obj, spine_size_t value) { +void spine_physics_constraint_mix_timeline_set_stepped(spine_physics_constraint_mix_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_mix_timeline_get_num_curves(spine_physics_constraint_mix_timeline obj) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj) { +float *spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline obj) { + if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline obj) { + if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_mix_timeline_get_num_frames(spine_physics_constraint_mix_timeline obj) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj) { +float *spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constraint_mix_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constrain return _obj->getDuration(); } -void * spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_mix_timeline_get_num_property_ids(spine_physics_constraint_mix_timeline obj) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj) { +int64_t *spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj) { if (!obj) return nullptr; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline obj) { +int spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline obj) { if (!obj) return 0; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline obj, int32_t value) { +void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline obj, int value) { if (!obj) return; PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_mix_timeline.h b/spine-c-new/src/generated/physics_constraint_mix_timeline.h index 5384a3008..4d77561ae 100644 --- a/spine-c-new/src/generated/physics_constraint_mix_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_mix_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_mix_timeline) - -SPINE_C_EXPORT spine_physics_constraint_mix_timeline spine_physics_constraint_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_mix_timeline spine_physics_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_dispose(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_mix_timeline_get_rtti(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_mix_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_curve_value(spine_physics_constraint_mix_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_relative_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_absolute_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_absolute_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_absolute_value_6(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_scale_value(spine_physics_constraint_mix_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_linear(spine_physics_constraint_mix_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_stepped(spine_physics_constraint_mix_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_linear(spine_physics_constraint_mix_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_stepped(spine_physics_constraint_mix_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_mix_timeline_get_num_curves(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_mix_timeline_get_num_frames(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_mix_timeline_get_num_property_ids(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_pose.cpp b/spine-c-new/src/generated/physics_constraint_pose.cpp index 5452de9a0..91652eaac 100644 --- a/spine-c-new/src/generated/physics_constraint_pose.cpp +++ b/spine-c-new/src/generated/physics_constraint_pose.cpp @@ -45,7 +45,7 @@ void spine_physics_constraint_pose_dispose(spine_physics_constraint_pose obj) { void spine_physics_constraint_pose_set(spine_physics_constraint_pose obj, spine_physics_constraint_pose value) { if (!obj) return; PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->set(value); + _obj->set(*((PhysicsConstraintPose*) value)); } float spine_physics_constraint_pose_get_inertia(spine_physics_constraint_pose obj) { diff --git a/spine-c-new/src/generated/physics_constraint_pose.h b/spine-c-new/src/generated/physics_constraint_pose.h index cf18aa8c9..aef5c6d8a 100644 --- a/spine-c-new/src/generated/physics_constraint_pose.h +++ b/spine-c-new/src/generated/physics_constraint_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_physics_constraint_pose) +#include "types.h" SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_pose_create(void); SPINE_C_EXPORT void spine_physics_constraint_pose_dispose(spine_physics_constraint_pose obj); diff --git a/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp b/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp index 0cbeeff2a..e54fde13b 100644 --- a/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_reset_timeline spine_physics_constraint_reset_timeline_create(spine_size_t frameCount, int32_t constraintIndex) { +spine_physics_constraint_reset_timeline spine_physics_constraint_reset_timeline_create(size_t frameCount, int constraintIndex) { PhysicsConstraintResetTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintResetTimeline(frameCount, constraintIndex); return (spine_physics_constraint_reset_timeline) obj; } @@ -42,58 +42,50 @@ void spine_physics_constraint_reset_timeline_dispose(spine_physics_constraint_re delete (PhysicsConstraintResetTimeline *) obj; } -spine_rtti spine_physics_constraint_reset_timeline_get_rtti(spine_physics_constraint_reset_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_reset_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintResetTimeline::rtti; } -void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -int32_t spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline obj) { +int spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline obj) { if (!obj) return 0; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; return _obj->getFrameCount(); } -int32_t spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline obj) { +int spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline obj) { if (!obj) return 0; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline obj, int32_t frame, float time) { +void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline obj, int frame, float time) { if (!obj) return ; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; _obj->setFrame(frame, time); } -spine_size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline obj) { + if (!obj) return 0; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; return _obj->getFrameEntries(); } -void * spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_reset_timeline_get_num_frames(spine_physics_constraint_reset_timeline obj) { if (!obj) return 0; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj) { +float *spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj) { if (!obj) return nullptr; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constraint_reset_timeline obj) { @@ -102,25 +94,19 @@ float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constra return _obj->getDuration(); } -void * spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_reset_timeline_get_num_property_ids(spine_physics_constraint_reset_timeline obj) { if (!obj) return 0; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj) { +int64_t *spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj) { if (!obj) return nullptr; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline obj, int32_t value) { +void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline obj, int value) { if (!obj) return; PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_reset_timeline.h b/spine-c-new/src/generated/physics_constraint_reset_timeline.h index 69ab478f8..eff7c309a 100644 --- a/spine-c-new/src/generated/physics_constraint_reset_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_reset_timeline.h @@ -34,26 +34,22 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_reset_timeline) - -SPINE_C_EXPORT spine_physics_constraint_reset_timeline spine_physics_constraint_reset_timeline_create(spine_size_t frameCount, int32_t constraintIndex); +SPINE_C_EXPORT spine_physics_constraint_reset_timeline spine_physics_constraint_reset_timeline_create(size_t frameCount, int constraintIndex); SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_dispose(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_reset_timeline_get_rtti(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT int32_t spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline obj, int32_t frame, float time); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_reset_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT int spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline obj, int frame, float time); +SPINE_C_EXPORT size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_reset_timeline_get_num_frames(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_reset_timeline_get_num_property_ids(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp b/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp index 63574700b..b23195539 100644 --- a/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_strength_timeline spine_physics_constraint_strength_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_strength_timeline spine_physics_constraint_strength_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintStrengthTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintStrengthTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_strength_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_strength_timeline_dispose(spine_physics_constraint delete (PhysicsConstraintStrengthTimeline *) obj; } -spine_rtti spine_physics_constraint_strength_timeline_get_rtti(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_strength_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintStrengthTimeline::rtti; } -void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_strength_timeline_get_curve_value(spine_physics_c float spine_physics_constraint_strength_timeline_get_relative_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_strength_timeline_get_absolute_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_strength_timeline_get_absolute_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_strength_timeline_get_absolute_value_6(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_strength_timeline_get_scale_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_strength_timeline_set_linear(spine_physics_constraint_strength_timeline obj, spine_size_t value) { +void spine_physics_constraint_strength_timeline_set_linear(spine_physics_constraint_strength_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_strength_timeline_set_stepped(spine_physics_constraint_strength_timeline obj, spine_size_t value) { +void spine_physics_constraint_strength_timeline_set_stepped(spine_physics_constraint_strength_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_strength_timeline_get_num_curves(spine_physics_constraint_strength_timeline obj) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj) { +float *spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj) { if (!obj) return nullptr; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline obj) { + if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline obj) { + if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_strength_timeline_get_num_frames(spine_physics_constraint_strength_timeline obj) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj) { +float *spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj) { if (!obj) return nullptr; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_strength_timeline_get_duration(spine_physics_constraint_strength_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_strength_timeline_get_duration(spine_physics_cons return _obj->getDuration(); } -void * spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_strength_timeline_get_num_property_ids(spine_physics_constraint_strength_timeline obj) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj) { +int64_t *spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj) { if (!obj) return nullptr; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline obj) { +int spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline obj) { if (!obj) return 0; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline obj, int32_t value) { +void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline obj, int value) { if (!obj) return; PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_strength_timeline.h b/spine-c-new/src/generated/physics_constraint_strength_timeline.h index c81d6f538..4cd0b8b81 100644 --- a/spine-c-new/src/generated/physics_constraint_strength_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_strength_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_strength_timeline) - -SPINE_C_EXPORT spine_physics_constraint_strength_timeline spine_physics_constraint_strength_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_strength_timeline spine_physics_constraint_strength_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_dispose(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_strength_timeline_get_rtti(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_strength_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_curve_value(spine_physics_constraint_strength_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_relative_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_absolute_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_absolute_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_absolute_value_6(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_scale_value(spine_physics_constraint_strength_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_linear(spine_physics_constraint_strength_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_stepped(spine_physics_constraint_strength_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_linear(spine_physics_constraint_strength_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_stepped(spine_physics_constraint_strength_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_strength_timeline_get_num_curves(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_strength_timeline_get_num_frames(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_strength_timeline_get_duration(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_strength_timeline_get_num_property_ids(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_timeline.cpp b/spine-c-new/src/generated/physics_constraint_timeline.cpp index df195cd0d..e95004d84 100644 --- a/spine-c-new/src/generated/physics_constraint_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_timeline spine_physics_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property) { +spine_physics_constraint_timeline spine_physics_constraint_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property) { PhysicsConstraintTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintTimeline(frameCount, bezierCount, constraintIndex, property); return (spine_physics_constraint_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_timeline_dispose(spine_physics_constraint_timeline delete (PhysicsConstraintTimeline *) obj; } -spine_rtti spine_physics_constraint_timeline_get_rtti(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintTimeline::rtti; } -void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_timeline_get_curve_value(spine_physics_constraint float spine_physics_constraint_timeline_get_relative_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_timeline_get_absolute_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_timeline_get_absolute_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_timeline_get_absolute_value_6(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_timeline_get_scale_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline obj, spine_size_t value) { +void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_timeline_set_stepped(spine_physics_constraint_timeline obj, spine_size_t value) { +void spine_physics_constraint_timeline_set_stepped(spine_physics_constraint_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_timeline_set_bezier(spine_physics_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_timeline_set_bezier(spine_physics_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_timeline_get_bezier_value(spine_physics_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_timeline_get_bezier_value(spine_physics_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_timeline_get_num_curves(spine_physics_constraint_timeline obj) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj) { +float *spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj) { if (!obj) return nullptr; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline obj) { + if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline obj) { + if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_timeline_get_num_frames(spine_physics_constraint_timeline obj) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj) { +float *spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj) { if (!obj) return nullptr; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_ti return _obj->getDuration(); } -void * spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_timeline_get_num_property_ids(spine_physics_constraint_timeline obj) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj) { +int64_t *spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj) { if (!obj) return nullptr; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline obj) { +int spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline obj) { if (!obj) return 0; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline obj, int32_t value) { +void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline obj, int value) { if (!obj) return; PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_timeline.h b/spine-c-new/src/generated/physics_constraint_timeline.h index 8d4d7c74d..2768b2b7f 100644 --- a/spine-c-new/src/generated/physics_constraint_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_timeline) - -SPINE_C_EXPORT spine_physics_constraint_timeline spine_physics_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property); +SPINE_C_EXPORT spine_physics_constraint_timeline spine_physics_constraint_timeline_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property); SPINE_C_EXPORT void spine_physics_constraint_timeline_dispose(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_timeline_get_rtti(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_timeline_get_curve_value(spine_physics_constraint_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_timeline_get_relative_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_timeline_get_absolute_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_timeline_get_absolute_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_timeline_get_absolute_value_6(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_timeline_get_scale_value(spine_physics_constraint_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_timeline_set_stepped(spine_physics_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_timeline_set_bezier(spine_physics_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_timeline_get_bezier_value(spine_physics_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_timeline_set_stepped(spine_physics_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_timeline_set_bezier(spine_physics_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_timeline_get_bezier_value(spine_physics_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_timeline_get_num_curves(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_timeline_get_num_frames(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_timeline_get_num_property_ids(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp b/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp index 82fc9140a..12ff18075 100644 --- a/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_physics_constraint_wind_timeline spine_physics_constraint_wind_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex) { +spine_physics_constraint_wind_timeline spine_physics_constraint_wind_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex) { PhysicsConstraintWindTimeline *obj = new (__FILE__, __LINE__) PhysicsConstraintWindTimeline(frameCount, bezierCount, physicsConstraintIndex); return (spine_physics_constraint_wind_timeline) obj; } @@ -42,19 +42,17 @@ void spine_physics_constraint_wind_timeline_dispose(spine_physics_constraint_win delete (PhysicsConstraintWindTimeline *) obj; } -spine_rtti spine_physics_constraint_wind_timeline_get_rtti(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_physics_constraint_wind_timeline_get_rtti() { + return (spine_rtti) &PhysicsConstraintWindTimeline::rtti; } -void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline obj, spine_size_t frame, float time, float value) { +void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline obj, size_t frame, float time, float value) { if (!obj) return ; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,97 +67,85 @@ float spine_physics_constraint_wind_timeline_get_curve_value(spine_physics_const float spine_physics_constraint_wind_timeline_get_relative_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_physics_constraint_wind_timeline_get_absolute_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_physics_constraint_wind_timeline_get_absolute_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_physics_constraint_wind_timeline_get_absolute_value_6(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_physics_constraint_wind_timeline_get_scale_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -void spine_physics_constraint_wind_timeline_set_linear(spine_physics_constraint_wind_timeline obj, spine_size_t value) { +void spine_physics_constraint_wind_timeline_set_linear(spine_physics_constraint_wind_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; _obj->setLinear(value); } -void spine_physics_constraint_wind_timeline_set_stepped(spine_physics_constraint_wind_timeline obj, spine_size_t value) { +void spine_physics_constraint_wind_timeline_set_stepped(spine_physics_constraint_wind_timeline obj, size_t value) { if (!obj) return; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; _obj->setStepped(value); } -void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_physics_constraint_wind_timeline_get_num_curves(spine_physics_constraint_wind_timeline obj) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj) { +float *spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj) { if (!obj) return nullptr; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline obj) { + if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; +size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline obj) { + if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return _obj->getFrameCount(); } -void * spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_physics_constraint_wind_timeline_get_num_frames(spine_physics_constraint_wind_timeline obj) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj) { +float *spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj) { if (!obj) return nullptr; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constraint_wind_timeline obj) { @@ -168,31 +154,25 @@ float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constrai return _obj->getDuration(); } -void * spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_physics_constraint_wind_timeline_get_num_property_ids(spine_physics_constraint_wind_timeline obj) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj) { +int64_t *spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj) { if (!obj) return nullptr; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline obj) { +int spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline obj) { if (!obj) return 0; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline obj, int32_t value) { +void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline obj, int value) { if (!obj) return; PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/physics_constraint_wind_timeline.h b/spine-c-new/src/generated/physics_constraint_wind_timeline.h index b9b7618c8..5949b4cb4 100644 --- a/spine-c-new/src/generated/physics_constraint_wind_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_wind_timeline.h @@ -34,38 +34,33 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_physics_constraint_wind_timeline) - -SPINE_C_EXPORT spine_physics_constraint_wind_timeline spine_physics_constraint_wind_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t physicsConstraintIndex); +SPINE_C_EXPORT spine_physics_constraint_wind_timeline spine_physics_constraint_wind_timeline_create(size_t frameCount, size_t bezierCount, int physicsConstraintIndex); SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_dispose(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_rtti spine_physics_constraint_wind_timeline_get_rtti(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_physics_constraint_wind_timeline_get_rtti(); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_curve_value(spine_physics_constraint_wind_timeline obj, float time); SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_relative_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_absolute_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_absolute_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_absolute_value_6(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_scale_value(spine_physics_constraint_wind_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_linear(spine_physics_constraint_wind_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_stepped(spine_physics_constraint_wind_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_linear(spine_physics_constraint_wind_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_stepped(spine_physics_constraint_wind_timeline obj, size_t value); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_physics_constraint_wind_timeline_get_num_curves(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_wind_timeline_get_num_frames(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_float *spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT float *spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj); SPINE_C_EXPORT float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT void * spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj); SPINE_C_EXPORT int32_t spine_physics_constraint_wind_timeline_get_num_property_ids(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT int32_t spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline obj); -SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT int spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline obj); +SPINE_C_EXPORT void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/point_attachment.cpp b/spine-c-new/src/generated/point_attachment.cpp index e980dbcd3..9ba57b30a 100644 --- a/spine-c-new/src/generated/point_attachment.cpp +++ b/spine-c-new/src/generated/point_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_point_attachment spine_point_attachment_create(const utf8 * name) { +spine_point_attachment spine_point_attachment_create(const char* name) { PointAttachment *obj = new (__FILE__, __LINE__) PointAttachment(String(name)); return (spine_point_attachment) obj; } @@ -42,10 +42,8 @@ void spine_point_attachment_dispose(spine_point_attachment obj) { delete (PointAttachment *) obj; } -spine_rtti spine_point_attachment_get_rtti(spine_point_attachment obj) { - if (!obj) return nullptr; - PointAttachment *_obj = (PointAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_point_attachment_get_rtti() { + return (spine_rtti) &PointAttachment::rtti; } float spine_point_attachment_get_x(spine_point_attachment obj) { @@ -85,36 +83,36 @@ void spine_point_attachment_set_rotation(spine_point_attachment obj, float value } spine_color spine_point_attachment_get_color(spine_point_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; PointAttachment *_obj = (PointAttachment *) obj; return (spine_color) &_obj->getColor(); } -void spine_point_attachment_compute_world_position(spine_point_attachment obj, spine_bone_pose bone, float ox, float oy) { +void spine_point_attachment_compute_world_position(spine_point_attachment obj, spine_bone_pose bone, float* ox, float* oy) { if (!obj) return ; PointAttachment *_obj = (PointAttachment *) obj; - _obj->computeWorldPosition(bone, ox, oy); + _obj->computeWorldPosition(*(BonePose*) bone, *ox, *oy); } float spine_point_attachment_compute_world_rotation(spine_point_attachment obj, spine_bone_pose bone) { if (!obj) return 0; PointAttachment *_obj = (PointAttachment *) obj; - return _obj->computeWorldRotation(bone); + return _obj->computeWorldRotation(*(BonePose*) bone); } spine_attachment spine_point_attachment_copy(spine_point_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; PointAttachment *_obj = (PointAttachment *) obj; return (spine_attachment) _obj->copy(); } -const utf8 * spine_point_attachment_get_name(spine_point_attachment obj) { +const char* spine_point_attachment_get_name(spine_point_attachment obj) { if (!obj) return nullptr; PointAttachment *_obj = (PointAttachment *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -int32_t spine_point_attachment_get_ref_count(spine_point_attachment obj) { +int spine_point_attachment_get_ref_count(spine_point_attachment obj) { if (!obj) return 0; PointAttachment *_obj = (PointAttachment *) obj; return _obj->getRefCount(); diff --git a/spine-c-new/src/generated/point_attachment.h b/spine-c-new/src/generated/point_attachment.h index 32ef68c5d..8eb07b2e5 100644 --- a/spine-c-new/src/generated/point_attachment.h +++ b/spine-c-new/src/generated/point_attachment.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_point_attachment) - -SPINE_C_EXPORT spine_point_attachment spine_point_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_point_attachment spine_point_attachment_create(const char* name); SPINE_C_EXPORT void spine_point_attachment_dispose(spine_point_attachment obj); -SPINE_C_EXPORT spine_rtti spine_point_attachment_get_rtti(spine_point_attachment obj); +SPINE_C_EXPORT spine_rtti spine_point_attachment_get_rtti(); SPINE_C_EXPORT float spine_point_attachment_get_x(spine_point_attachment obj); SPINE_C_EXPORT void spine_point_attachment_set_x(spine_point_attachment obj, float value); SPINE_C_EXPORT float spine_point_attachment_get_y(spine_point_attachment obj); @@ -48,11 +46,11 @@ SPINE_C_EXPORT void spine_point_attachment_set_y(spine_point_attachment obj, flo SPINE_C_EXPORT float spine_point_attachment_get_rotation(spine_point_attachment obj); SPINE_C_EXPORT void spine_point_attachment_set_rotation(spine_point_attachment obj, float value); SPINE_C_EXPORT spine_color spine_point_attachment_get_color(spine_point_attachment obj); -SPINE_C_EXPORT void spine_point_attachment_compute_world_position(spine_point_attachment obj, spine_bone_pose bone, float ox, float oy); +SPINE_C_EXPORT void spine_point_attachment_compute_world_position(spine_point_attachment obj, spine_bone_pose bone, float* ox, float* oy); SPINE_C_EXPORT float spine_point_attachment_compute_world_rotation(spine_point_attachment obj, spine_bone_pose bone); SPINE_C_EXPORT spine_attachment spine_point_attachment_copy(spine_point_attachment obj); -SPINE_C_EXPORT const utf8 * spine_point_attachment_get_name(spine_point_attachment obj); -SPINE_C_EXPORT int32_t spine_point_attachment_get_ref_count(spine_point_attachment obj); +SPINE_C_EXPORT const char* spine_point_attachment_get_name(spine_point_attachment obj); +SPINE_C_EXPORT int spine_point_attachment_get_ref_count(spine_point_attachment obj); SPINE_C_EXPORT void spine_point_attachment_reference(spine_point_attachment obj); SPINE_C_EXPORT void spine_point_attachment_dereference(spine_point_attachment obj); diff --git a/spine-c-new/src/generated/polygon.h b/spine-c-new/src/generated/polygon.h index f26d19e5e..5ac7a66bc 100644 --- a/spine-c-new/src/generated/polygon.h +++ b/spine-c-new/src/generated/polygon.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_polygon) +#include "types.h" SPINE_C_EXPORT spine_polygon spine_polygon_create(void); SPINE_C_EXPORT void spine_polygon_dispose(spine_polygon obj); diff --git a/spine-c-new/src/generated/pose.cpp b/spine-c-new/src/generated/pose.cpp deleted file mode 100644 index 34a346b9f..000000000 --- a/spine-c-new/src/generated/pose.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "pose.h" -#include - -using namespace spine; - -spine_pose spine_pose_create(void) { - Pose *obj = new (__FILE__, __LINE__) Pose(); - return (spine_pose) obj; -} - -void spine_pose_dispose(spine_pose obj) { - if (!obj) return; - delete (Pose *) obj; -} - -void spine_pose_set(spine_pose obj, spine_p value) { - if (!obj) return; - Pose *_obj = (Pose *) obj; - _obj->set(value); -} - -spine_bool spine_pose_is_type(spine_pose obj, spine_pose_type type) { - if (!obj) return 0; - Pose *_obj = (Pose *) obj; - - switch (type) { - } - return 0; -} diff --git a/spine-c-new/src/generated/posed.cpp b/spine-c-new/src/generated/posed.cpp index 172478ba8..ff372bfa9 100644 --- a/spine-c-new/src/generated/posed.cpp +++ b/spine-c-new/src/generated/posed.cpp @@ -32,11 +32,6 @@ using namespace spine; -spine_posed spine_posed_create(void) { - Posed *obj = new (__FILE__, __LINE__) Posed(); - return (spine_posed) obj; -} - void spine_posed_dispose(spine_posed obj) { if (!obj) return; delete (Posed *) obj; @@ -66,26 +61,8 @@ void spine_posed_reset_constrained(spine_posed obj) { _obj->resetConstrained(); } -spine_bool spine_posed_is_pose_equal_to_applied(spine_posed obj) { - if (!obj) return 0; +bool spine_posed_is_pose_equal_to_applied(spine_posed obj) { + if (!obj) return false; Posed *_obj = (Posed *) obj; return _obj->isPoseEqualToApplied(); } - -spine_bool spine_posed_is_type(spine_posed obj, spine_posed_type type) { - if (!obj) return 0; - Posed *_obj = (Posed *) obj; - - switch (type) { - case SPINE_TYPE_POSED_POSED_GENERIC: - return _obj->getRTTI().instanceOf(PosedGeneric::rtti); - } - return 0; -} - -spine_posed_generic spine_posed_as_posed_generic(spine_posed obj) { - if (!obj) return nullptr; - Posed *_obj = (Posed *) obj; - if (!_obj->getRTTI().instanceOf(PosedGeneric::rtti)) return nullptr; - return (spine_posed_generic) obj; -} diff --git a/spine-c-new/src/generated/posed.h b/spine-c-new/src/generated/posed.h index 7993be61b..c12357a56 100644 --- a/spine-c-new/src/generated/posed.h +++ b/spine-c-new/src/generated/posed.h @@ -34,26 +34,14 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_posed) - -SPINE_C_EXPORT spine_posed spine_posed_create(void); SPINE_C_EXPORT void spine_posed_dispose(spine_posed obj); SPINE_C_EXPORT void spine_posed_setup_pose(spine_posed obj); SPINE_C_EXPORT void spine_posed_pose(spine_posed obj); SPINE_C_EXPORT void spine_posed_constrained(spine_posed obj); SPINE_C_EXPORT void spine_posed_reset_constrained(spine_posed obj); -SPINE_C_EXPORT spine_bool spine_posed_is_pose_equal_to_applied(spine_posed obj); -struct spine_posed_generic_wrapper; -typedef struct spine_posed_generic_wrapper *spine_posed_generic; - -typedef enum spine_posed_type { - SPINE_TYPE_POSED_POSED_GENERIC = 0 -} spine_posed_type; - -SPINE_C_EXPORT spine_bool spine_posed_is_type(spine_posed obj, spine_posed_type type); -SPINE_C_EXPORT spine_posed_generic spine_posed_as_posed_generic(spine_posed obj); +SPINE_C_EXPORT bool spine_posed_is_pose_equal_to_applied(spine_posed obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/posed_active.cpp b/spine-c-new/src/generated/posed_active.cpp index 04785e222..b45487669 100644 --- a/spine-c-new/src/generated/posed_active.cpp +++ b/spine-c-new/src/generated/posed_active.cpp @@ -42,13 +42,13 @@ void spine_posed_active_dispose(spine_posed_active obj) { delete (PosedActive *) obj; } -spine_bool spine_posed_active_is_active(spine_posed_active obj) { - if (!obj) return 0; +bool spine_posed_active_is_active(spine_posed_active obj) { + if (!obj) return false; PosedActive *_obj = (PosedActive *) obj; return _obj->isActive(); } -void spine_posed_active_set_active(spine_posed_active obj, spine_bool value) { +void spine_posed_active_set_active(spine_posed_active obj, bool value) { if (!obj) return; PosedActive *_obj = (PosedActive *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/posed_active.h b/spine-c-new/src/generated/posed_active.h index c369e568e..24726cb02 100644 --- a/spine-c-new/src/generated/posed_active.h +++ b/spine-c-new/src/generated/posed_active.h @@ -34,14 +34,12 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_posed_active) +#include "types.h" SPINE_C_EXPORT spine_posed_active spine_posed_active_create(void); SPINE_C_EXPORT void spine_posed_active_dispose(spine_posed_active obj); -SPINE_C_EXPORT spine_bool spine_posed_active_is_active(spine_posed_active obj); -SPINE_C_EXPORT void spine_posed_active_set_active(spine_posed_active obj, spine_bool value); +SPINE_C_EXPORT bool spine_posed_active_is_active(spine_posed_active obj); +SPINE_C_EXPORT void spine_posed_active_set_active(spine_posed_active obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/posed_data.cpp b/spine-c-new/src/generated/posed_data.cpp index 2b31097b8..2d9a81179 100644 --- a/spine-c-new/src/generated/posed_data.cpp +++ b/spine-c-new/src/generated/posed_data.cpp @@ -32,8 +32,8 @@ using namespace spine; -spine_posed_data spine_posed_data_create(spine_spine::string name) { - PosedData *obj = new (__FILE__, __LINE__) PosedData(name); +spine_posed_data spine_posed_data_create(const char* name) { + PosedData *obj = new (__FILE__, __LINE__) PosedData(String(name)); return (spine_posed_data) obj; } @@ -42,38 +42,20 @@ void spine_posed_data_dispose(spine_posed_data obj) { delete (PosedData *) obj; } -spine_spine::string spine_posed_data_get_name(spine_posed_data obj) { +const char* spine_posed_data_get_name(spine_posed_data obj) { if (!obj) return nullptr; PosedData *_obj = (PosedData *) obj; - return _obj->getName(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_posed_data_is_skin_required(spine_posed_data obj) { - if (!obj) return 0; +bool spine_posed_data_is_skin_required(spine_posed_data obj) { + if (!obj) return false; PosedData *_obj = (PosedData *) obj; return _obj->isSkinRequired(); } -void spine_posed_data_set_skin_required(spine_posed_data obj, spine_bool value) { +void spine_posed_data_set_skin_required(spine_posed_data obj, bool value) { if (!obj) return; PosedData *_obj = (PosedData *) obj; _obj->setSkinRequired(value); } - -spine_bool spine_posed_data_is_type(spine_posed_data obj, spine_posed_data_type type) { - if (!obj) return 0; - PosedData *_obj = (PosedData *) obj; - - switch (type) { - case SPINE_TYPE_POSED_DATA_POSED_DATA_GENERIC: - return _obj->getRTTI().instanceOf(PosedDataGeneric::rtti); - } - return 0; -} - -spine_posed_data_generic spine_posed_data_as_posed_data_generic(spine_posed_data obj) { - if (!obj) return nullptr; - PosedData *_obj = (PosedData *) obj; - if (!_obj->getRTTI().instanceOf(PosedDataGeneric::rtti)) return nullptr; - return (spine_posed_data_generic) obj; -} diff --git a/spine-c-new/src/generated/posed_data.h b/spine-c-new/src/generated/posed_data.h index e49298613..da6825192 100644 --- a/spine-c-new/src/generated/posed_data.h +++ b/spine-c-new/src/generated/posed_data.h @@ -34,24 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_posed_data) - -SPINE_C_EXPORT spine_posed_data spine_posed_data_create(spine_spine::string name); +SPINE_C_EXPORT spine_posed_data spine_posed_data_create(const char* name); SPINE_C_EXPORT void spine_posed_data_dispose(spine_posed_data obj); -SPINE_C_EXPORT spine_spine::string spine_posed_data_get_name(spine_posed_data obj); -SPINE_C_EXPORT spine_bool spine_posed_data_is_skin_required(spine_posed_data obj); -SPINE_C_EXPORT void spine_posed_data_set_skin_required(spine_posed_data obj, spine_bool value); -struct spine_posed_data_generic_wrapper; -typedef struct spine_posed_data_generic_wrapper *spine_posed_data_generic; - -typedef enum spine_posed_data_type { - SPINE_TYPE_POSED_DATA_POSED_DATA_GENERIC = 0 -} spine_posed_data_type; - -SPINE_C_EXPORT spine_bool spine_posed_data_is_type(spine_posed_data obj, spine_posed_data_type type); -SPINE_C_EXPORT spine_posed_data_generic spine_posed_data_as_posed_data_generic(spine_posed_data obj); +SPINE_C_EXPORT const char* spine_posed_data_get_name(spine_posed_data obj); +SPINE_C_EXPORT bool spine_posed_data_is_skin_required(spine_posed_data obj); +SPINE_C_EXPORT void spine_posed_data_set_skin_required(spine_posed_data obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/posed_data_generic.cpp b/spine-c-new/src/generated/posed_data_generic.cpp deleted file mode 100644 index c4d5ca248..000000000 --- a/spine-c-new/src/generated/posed_data_generic.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "posed_data_generic.h" -#include - -using namespace spine; - -spine_posed_data_generic spine_posed_data_generic_create(spine_spine::string name) { - PosedDataGeneric *obj = new (__FILE__, __LINE__) PosedDataGeneric(name); - return (spine_posed_data_generic) obj; -} - -void spine_posed_data_generic_dispose(spine_posed_data_generic obj) { - if (!obj) return; - delete (PosedDataGeneric *) obj; -} - -spine_p spine_posed_data_generic_get_setup_pose(spine_posed_data_generic obj) { - if (!obj) return nullptr; - PosedDataGeneric *_obj = (PosedDataGeneric *) obj; - return _obj->getSetupPose(); -} - -spine_p spine_posed_data_generic_get_setup_pose(spine_posed_data_generic obj) { - if (!obj) return nullptr; - PosedDataGeneric *_obj = (PosedDataGeneric *) obj; - return _obj->getSetupPose(); -} - -spine_spine::string spine_posed_data_generic_get_name(spine_posed_data_generic obj) { - if (!obj) return nullptr; - PosedDataGeneric *_obj = (PosedDataGeneric *) obj; - return _obj->getName(); -} - -spine_bool spine_posed_data_generic_is_skin_required(spine_posed_data_generic obj) { - if (!obj) return 0; - PosedDataGeneric *_obj = (PosedDataGeneric *) obj; - return _obj->isSkinRequired(); -} - -void spine_posed_data_generic_set_skin_required(spine_posed_data_generic obj, spine_bool value) { - if (!obj) return; - PosedDataGeneric *_obj = (PosedDataGeneric *) obj; - _obj->setSkinRequired(value); -} diff --git a/spine-c-new/src/generated/posed_data_generic.h b/spine-c-new/src/generated/posed_data_generic.h deleted file mode 100644 index c1dffc5dc..000000000 --- a/spine-c-new/src/generated/posed_data_generic.h +++ /dev/null @@ -1,53 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_C_POSEDDATAGENERIC_H -#define SPINE_C_POSEDDATAGENERIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_posed_data_generic) - -SPINE_C_EXPORT spine_posed_data_generic spine_posed_data_generic_create(spine_spine::string name); -SPINE_C_EXPORT void spine_posed_data_generic_dispose(spine_posed_data_generic obj); -SPINE_C_EXPORT spine_p spine_posed_data_generic_get_setup_pose(spine_posed_data_generic obj); -SPINE_C_EXPORT spine_p spine_posed_data_generic_get_setup_pose(spine_posed_data_generic obj); -SPINE_C_EXPORT spine_spine::string spine_posed_data_generic_get_name(spine_posed_data_generic obj); -SPINE_C_EXPORT spine_bool spine_posed_data_generic_is_skin_required(spine_posed_data_generic obj); -SPINE_C_EXPORT void spine_posed_data_generic_set_skin_required(spine_posed_data_generic obj, spine_bool value); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_POSEDDATAGENERIC_H \ No newline at end of file diff --git a/spine-c-new/src/generated/posed_generic.cpp b/spine-c-new/src/generated/posed_generic.cpp deleted file mode 100644 index 78cdd0d5a..000000000 --- a/spine-c-new/src/generated/posed_generic.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include "posed_generic.h" -#include - -using namespace spine; - -spine_posed_generic spine_posed_generic_create(spine_d data) { - PosedGeneric *obj = new (__FILE__, __LINE__) PosedGeneric(data); - return (spine_posed_generic) obj; -} - -void spine_posed_generic_dispose(spine_posed_generic obj) { - if (!obj) return; - delete (PosedGeneric *) obj; -} - -void spine_posed_generic_setup_pose(spine_posed_generic obj) { - if (!obj) return ; - PosedGeneric *_obj = (PosedGeneric *) obj; - _obj->setupPose(); -} - -spine_d spine_posed_generic_get_data(spine_posed_generic obj) { - if (!obj) return nullptr; - PosedGeneric *_obj = (PosedGeneric *) obj; - return _obj->getData(); -} - -spine_p spine_posed_generic_get_pose(spine_posed_generic obj) { - if (!obj) return nullptr; - PosedGeneric *_obj = (PosedGeneric *) obj; - return _obj->getPose(); -} - -spine_a spine_posed_generic_get_applied_pose(spine_posed_generic obj) { - if (!obj) return nullptr; - PosedGeneric *_obj = (PosedGeneric *) obj; - return _obj->getAppliedPose(); -} - -void spine_posed_generic_reset_constrained(spine_posed_generic obj) { - if (!obj) return ; - PosedGeneric *_obj = (PosedGeneric *) obj; - _obj->resetConstrained(); -} - -void spine_posed_generic_pose(spine_posed_generic obj) { - if (!obj) return ; - PosedGeneric *_obj = (PosedGeneric *) obj; - _obj->pose(); -} - -void spine_posed_generic_constrained(spine_posed_generic obj) { - if (!obj) return ; - PosedGeneric *_obj = (PosedGeneric *) obj; - _obj->constrained(); -} - -spine_bool spine_posed_generic_is_pose_equal_to_applied(spine_posed_generic obj) { - if (!obj) return 0; - PosedGeneric *_obj = (PosedGeneric *) obj; - return _obj->isPoseEqualToApplied(); -} diff --git a/spine-c-new/src/generated/posed_generic.h b/spine-c-new/src/generated/posed_generic.h deleted file mode 100644 index 51c530297..000000000 --- a/spine-c-new/src/generated/posed_generic.h +++ /dev/null @@ -1,56 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_C_POSEDGENERIC_H -#define SPINE_C_POSEDGENERIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_posed_generic) - -SPINE_C_EXPORT spine_posed_generic spine_posed_generic_create(spine_d data); -SPINE_C_EXPORT void spine_posed_generic_dispose(spine_posed_generic obj); -SPINE_C_EXPORT void spine_posed_generic_setup_pose(spine_posed_generic obj); -SPINE_C_EXPORT spine_d spine_posed_generic_get_data(spine_posed_generic obj); -SPINE_C_EXPORT spine_p spine_posed_generic_get_pose(spine_posed_generic obj); -SPINE_C_EXPORT spine_a spine_posed_generic_get_applied_pose(spine_posed_generic obj); -SPINE_C_EXPORT void spine_posed_generic_reset_constrained(spine_posed_generic obj); -SPINE_C_EXPORT void spine_posed_generic_pose(spine_posed_generic obj); -SPINE_C_EXPORT void spine_posed_generic_constrained(spine_posed_generic obj); -SPINE_C_EXPORT spine_bool spine_posed_generic_is_pose_equal_to_applied(spine_posed_generic obj); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_POSEDGENERIC_H \ No newline at end of file diff --git a/spine-c-new/src/generated/position_mode.h b/spine-c-new/src/generated/position_mode.h index 59fd48ed5..b26f38be9 100644 --- a/spine-c-new/src/generated/position_mode.h +++ b/spine-c-new/src/generated/position_mode.h @@ -30,15 +30,15 @@ #ifndef SPINE_C_POSITIONMODE_H #define SPINE_C_POSITIONMODE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_position_mode { - SPINE_POSITION_MODE_POSITION_MODE_FIXED = 0, - SPINE_POSITION_MODE_POSITION_MODE_PERCENT + SPINE_POSITION_MODE_FIXED = 0, + SPINE_POSITION_MODE_PERCENT } spine_position_mode; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/pow_interpolation.cpp b/spine-c-new/src/generated/pow_interpolation.cpp index 75db044cb..e7942e0c6 100644 --- a/spine-c-new/src/generated/pow_interpolation.cpp +++ b/spine-c-new/src/generated/pow_interpolation.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_pow_interpolation spine_pow_interpolation_create(int32_t power) { +spine_pow_interpolation spine_pow_interpolation_create(int power) { PowInterpolation *obj = new (__FILE__, __LINE__) PowInterpolation(power); return (spine_pow_interpolation) obj; } diff --git a/spine-c-new/src/generated/pow_interpolation.h b/spine-c-new/src/generated/pow_interpolation.h index b127d8622..33112f004 100644 --- a/spine-c-new/src/generated/pow_interpolation.h +++ b/spine-c-new/src/generated/pow_interpolation.h @@ -34,11 +34,9 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_pow_interpolation) - -SPINE_C_EXPORT spine_pow_interpolation spine_pow_interpolation_create(int32_t power); +SPINE_C_EXPORT spine_pow_interpolation spine_pow_interpolation_create(int power); SPINE_C_EXPORT void spine_pow_interpolation_dispose(spine_pow_interpolation obj); SPINE_C_EXPORT float spine_pow_interpolation_apply(spine_pow_interpolation obj, float a); SPINE_C_EXPORT float spine_pow_interpolation_interpolate(spine_pow_interpolation obj, float start, float end, float a); diff --git a/spine-c-new/src/generated/pow_out_interpolation.cpp b/spine-c-new/src/generated/pow_out_interpolation.cpp index 0dcdf2321..2c4e14c24 100644 --- a/spine-c-new/src/generated/pow_out_interpolation.cpp +++ b/spine-c-new/src/generated/pow_out_interpolation.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_pow_out_interpolation spine_pow_out_interpolation_create(int32_t power) { +spine_pow_out_interpolation spine_pow_out_interpolation_create(int power) { PowOutInterpolation *obj = new (__FILE__, __LINE__) PowOutInterpolation(power); return (spine_pow_out_interpolation) obj; } diff --git a/spine-c-new/src/generated/pow_out_interpolation.h b/spine-c-new/src/generated/pow_out_interpolation.h index 73513946b..1dc65fd96 100644 --- a/spine-c-new/src/generated/pow_out_interpolation.h +++ b/spine-c-new/src/generated/pow_out_interpolation.h @@ -34,11 +34,9 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_pow_out_interpolation) - -SPINE_C_EXPORT spine_pow_out_interpolation spine_pow_out_interpolation_create(int32_t power); +SPINE_C_EXPORT spine_pow_out_interpolation spine_pow_out_interpolation_create(int power); SPINE_C_EXPORT void spine_pow_out_interpolation_dispose(spine_pow_out_interpolation obj); SPINE_C_EXPORT float spine_pow_out_interpolation_apply(spine_pow_out_interpolation obj, float a); SPINE_C_EXPORT float spine_pow_out_interpolation_interpolate(spine_pow_out_interpolation obj, float start, float end, float a); diff --git a/spine-c-new/src/generated/property.h b/spine-c-new/src/generated/property.h index 035906825..f0367bca4 100644 --- a/spine-c-new/src/generated/property.h +++ b/spine-c-new/src/generated/property.h @@ -30,44 +30,44 @@ #ifndef SPINE_C_PROPERTY_H #define SPINE_C_PROPERTY_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_property { - SPINE_PROPERTY_PROPERTY_ROTATE = 1 << 0, - SPINE_PROPERTY_PROPERTY_X = 1 << 1, - SPINE_PROPERTY_PROPERTY_Y = 1 << 2, - SPINE_PROPERTY_PROPERTY_SCALE_X = 1 << 3, - SPINE_PROPERTY_PROPERTY_SCALE_Y = 1 << 4, - SPINE_PROPERTY_PROPERTY_SHEAR_X = 1 << 5, - SPINE_PROPERTY_PROPERTY_SHEAR_Y = 1 << 6, - SPINE_PROPERTY_PROPERTY_INHERIT = 1 << 7, - SPINE_PROPERTY_PROPERTY_RGB = 1 << 8, - SPINE_PROPERTY_PROPERTY_ALPHA = 1 << 9, - SPINE_PROPERTY_PROPERTY_RGB2 = 1 << 10, - SPINE_PROPERTY_PROPERTY_ATTACHMENT = 1 << 11, - SPINE_PROPERTY_PROPERTY_DEFORM = 1 << 12, - SPINE_PROPERTY_PROPERTY_EVENT = 1 << 13, - SPINE_PROPERTY_PROPERTY_DRAW_ORDER = 1 << 14, - SPINE_PROPERTY_PROPERTY_IK_CONSTRAINT = 1 << 15, - SPINE_PROPERTY_PROPERTY_TRANSFORM_CONSTRAINT = 1 << 16, - SPINE_PROPERTY_PROPERTY_PATH_CONSTRAINT_POSITION = 1 << 17, - SPINE_PROPERTY_PROPERTY_PATH_CONSTRAINT_SPACING = 1 << 18, - SPINE_PROPERTY_PROPERTY_PATH_CONSTRAINT_MIX = 1 << 19, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_INERTIA = 1 << 20, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_STRENGTH = 1 << 21, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_DAMPING = 1 << 22, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_MASS = 1 << 23, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_WIND = 1 << 24, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_GRAVITY = 1 << 25, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_MIX = 1 << 26, - SPINE_PROPERTY_PROPERTY_PHYSICS_CONSTRAINT_RESET = 1 << 27, - SPINE_PROPERTY_PROPERTY_SEQUENCE = 1 << 28, - SPINE_PROPERTY_PROPERTY_SLIDER_TIME = 1 << 29, - SPINE_PROPERTY_PROPERTY_SLIDER_MIX = 1 << 30 + SPINE_PROPERTY_ROTATE = 1 << 0, + SPINE_PROPERTY_X = 1 << 1, + SPINE_PROPERTY_Y = 1 << 2, + SPINE_PROPERTY_SCALE_X = 1 << 3, + SPINE_PROPERTY_SCALE_Y = 1 << 4, + SPINE_PROPERTY_SHEAR_X = 1 << 5, + SPINE_PROPERTY_SHEAR_Y = 1 << 6, + SPINE_PROPERTY_INHERIT = 1 << 7, + SPINE_PROPERTY_RGB = 1 << 8, + SPINE_PROPERTY_ALPHA = 1 << 9, + SPINE_PROPERTY_RGB2 = 1 << 10, + SPINE_PROPERTY_ATTACHMENT = 1 << 11, + SPINE_PROPERTY_DEFORM = 1 << 12, + SPINE_PROPERTY_EVENT = 1 << 13, + SPINE_PROPERTY_DRAW_ORDER = 1 << 14, + SPINE_PROPERTY_IK_CONSTRAINT = 1 << 15, + SPINE_PROPERTY_TRANSFORM_CONSTRAINT = 1 << 16, + SPINE_PROPERTY_PATH_CONSTRAINT_POSITION = 1 << 17, + SPINE_PROPERTY_PATH_CONSTRAINT_SPACING = 1 << 18, + SPINE_PROPERTY_PATH_CONSTRAINT_MIX = 1 << 19, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_INERTIA = 1 << 20, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_STRENGTH = 1 << 21, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_DAMPING = 1 << 22, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_MASS = 1 << 23, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_WIND = 1 << 24, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_GRAVITY = 1 << 25, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_MIX = 1 << 26, + SPINE_PROPERTY_PHYSICS_CONSTRAINT_RESET = 1 << 27, + SPINE_PROPERTY_SEQUENCE = 1 << 28, + SPINE_PROPERTY_SLIDER_TIME = 1 << 29, + SPINE_PROPERTY_SLIDER_MIX = 1 << 30 } spine_property; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/region_attachment.cpp b/spine-c-new/src/generated/region_attachment.cpp index 483026560..b87e0a4f4 100644 --- a/spine-c-new/src/generated/region_attachment.cpp +++ b/spine-c-new/src/generated/region_attachment.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_region_attachment spine_region_attachment_create(const utf8 * name) { +spine_region_attachment spine_region_attachment_create(const char* name) { RegionAttachment *obj = new (__FILE__, __LINE__) RegionAttachment(String(name)); return (spine_region_attachment) obj; } @@ -42,10 +42,8 @@ void spine_region_attachment_dispose(spine_region_attachment obj) { delete (RegionAttachment *) obj; } -spine_rtti spine_region_attachment_get_rtti(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_region_attachment_get_rtti() { + return (spine_rtti) &RegionAttachment::rtti; } void spine_region_attachment_update_region(spine_region_attachment obj) { @@ -54,16 +52,16 @@ void spine_region_attachment_update_region(spine_region_attachment obj) { _obj->updateRegion(); } -void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->computeWorldVertices(slot, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Slot*) slot, (float *) worldVertices, offset, stride); } -void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_region_attachment_compute_world_vertices_4(spine_region_attachment obj, spine_slot slot, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->computeWorldVertices(slot, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Slot*) slot, (Array &) worldVertices, offset, stride); } float spine_region_attachment_get_x(spine_region_attachment obj) { @@ -151,25 +149,25 @@ void spine_region_attachment_set_height(spine_region_attachment obj, float value } spine_color spine_region_attachment_get_color(spine_region_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; RegionAttachment *_obj = (RegionAttachment *) obj; return (spine_color) &_obj->getColor(); } -const utf8 * spine_region_attachment_get_path(spine_region_attachment obj) { +const char* spine_region_attachment_get_path(spine_region_attachment obj) { if (!obj) return nullptr; RegionAttachment *_obj = (RegionAttachment *) obj; - return (const utf8 *) _obj->getPath().buffer(); + return (const char *) _obj->getPath().buffer(); } -void spine_region_attachment_set_path(spine_region_attachment obj, const utf8 * value) { +void spine_region_attachment_set_path(spine_region_attachment obj, const char* value) { if (!obj) return; RegionAttachment *_obj = (RegionAttachment *) obj; _obj->setPath(String(value)); } spine_texture_region spine_region_attachment_get_region(spine_region_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_texture_region) 0; RegionAttachment *_obj = (RegionAttachment *) obj; return (spine_texture_region) _obj->getRegion(); } @@ -181,7 +179,7 @@ void spine_region_attachment_set_region(spine_region_attachment obj, spine_textu } spine_sequence spine_region_attachment_get_sequence(spine_region_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_sequence) 0; RegionAttachment *_obj = (RegionAttachment *) obj; return (spine_sequence) _obj->getSequence(); } @@ -192,28 +190,16 @@ void spine_region_attachment_set_sequence(spine_region_attachment obj, spine_seq _obj->setSequence((Sequence *) value); } -void * spine_region_attachment_get_offset(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getOffset(); -} - int32_t spine_region_attachment_get_num_offset(spine_region_attachment obj) { if (!obj) return 0; RegionAttachment *_obj = (RegionAttachment *) obj; return (int32_t) _obj->getOffset().size(); } -spine_float *spine_region_attachment_get_offset(spine_region_attachment obj) { +float *spine_region_attachment_get_offset(spine_region_attachment obj) { if (!obj) return nullptr; RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_float *) _obj->getOffset().buffer(); -} - -void * spine_region_attachment_get_u_vs(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getUVs(); + return (float *) _obj->getOffset().buffer(); } int32_t spine_region_attachment_get_num_u_vs(spine_region_attachment obj) { @@ -222,25 +208,25 @@ int32_t spine_region_attachment_get_num_u_vs(spine_region_attachment obj) { return (int32_t) _obj->getUVs().size(); } -spine_float *spine_region_attachment_get_u_vs(spine_region_attachment obj) { +float *spine_region_attachment_get_u_vs(spine_region_attachment obj) { if (!obj) return nullptr; RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_float *) _obj->getUVs().buffer(); + return (float *) _obj->getUVs().buffer(); } spine_attachment spine_region_attachment_copy(spine_region_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; RegionAttachment *_obj = (RegionAttachment *) obj; return (spine_attachment) _obj->copy(); } -const utf8 * spine_region_attachment_get_name(spine_region_attachment obj) { +const char* spine_region_attachment_get_name(spine_region_attachment obj) { if (!obj) return nullptr; RegionAttachment *_obj = (RegionAttachment *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -int32_t spine_region_attachment_get_ref_count(spine_region_attachment obj) { +int spine_region_attachment_get_ref_count(spine_region_attachment obj) { if (!obj) return 0; RegionAttachment *_obj = (RegionAttachment *) obj; return _obj->getRefCount(); diff --git a/spine-c-new/src/generated/region_attachment.h b/spine-c-new/src/generated/region_attachment.h index a3664701c..33dcacf09 100644 --- a/spine-c-new/src/generated/region_attachment.h +++ b/spine-c-new/src/generated/region_attachment.h @@ -34,16 +34,14 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_region_attachment) - -SPINE_C_EXPORT spine_region_attachment spine_region_attachment_create(const utf8 * name); +SPINE_C_EXPORT spine_region_attachment spine_region_attachment_create(const char* name); SPINE_C_EXPORT void spine_region_attachment_dispose(spine_region_attachment obj); -SPINE_C_EXPORT spine_rtti spine_region_attachment_get_rtti(spine_region_attachment obj); +SPINE_C_EXPORT spine_rtti spine_region_attachment_get_rtti(); SPINE_C_EXPORT void spine_region_attachment_update_region(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, spine_float worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, void * worldVertices, spine_size_t offset, spine_size_t stride); +SPINE_C_EXPORT void spine_region_attachment_compute_world_vertices(spine_region_attachment obj, spine_slot slot, float * worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT void spine_region_attachment_compute_world_vertices_4(spine_region_attachment obj, spine_slot slot, spine_array_float worldVertices, size_t offset, size_t stride); SPINE_C_EXPORT float spine_region_attachment_get_x(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_set_x(spine_region_attachment obj, float value); SPINE_C_EXPORT float spine_region_attachment_get_y(spine_region_attachment obj); @@ -59,21 +57,19 @@ SPINE_C_EXPORT void spine_region_attachment_set_width(spine_region_attachment ob SPINE_C_EXPORT float spine_region_attachment_get_height(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_set_height(spine_region_attachment obj, float value); SPINE_C_EXPORT spine_color spine_region_attachment_get_color(spine_region_attachment obj); -SPINE_C_EXPORT const utf8 * spine_region_attachment_get_path(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_set_path(spine_region_attachment obj, const utf8 * value); +SPINE_C_EXPORT const char* spine_region_attachment_get_path(spine_region_attachment obj); +SPINE_C_EXPORT void spine_region_attachment_set_path(spine_region_attachment obj, const char* value); SPINE_C_EXPORT spine_texture_region spine_region_attachment_get_region(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_set_region(spine_region_attachment obj, spine_texture_region value); SPINE_C_EXPORT spine_sequence spine_region_attachment_get_sequence(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_set_sequence(spine_region_attachment obj, spine_sequence value); -SPINE_C_EXPORT void * spine_region_attachment_get_offset(spine_region_attachment obj); SPINE_C_EXPORT int32_t spine_region_attachment_get_num_offset(spine_region_attachment obj); -SPINE_C_EXPORT spine_float *spine_region_attachment_get_offset(spine_region_attachment obj); -SPINE_C_EXPORT void * spine_region_attachment_get_u_vs(spine_region_attachment obj); +SPINE_C_EXPORT float *spine_region_attachment_get_offset(spine_region_attachment obj); SPINE_C_EXPORT int32_t spine_region_attachment_get_num_u_vs(spine_region_attachment obj); -SPINE_C_EXPORT spine_float *spine_region_attachment_get_u_vs(spine_region_attachment obj); +SPINE_C_EXPORT float *spine_region_attachment_get_u_vs(spine_region_attachment obj); SPINE_C_EXPORT spine_attachment spine_region_attachment_copy(spine_region_attachment obj); -SPINE_C_EXPORT const utf8 * spine_region_attachment_get_name(spine_region_attachment obj); -SPINE_C_EXPORT int32_t spine_region_attachment_get_ref_count(spine_region_attachment obj); +SPINE_C_EXPORT const char* spine_region_attachment_get_name(spine_region_attachment obj); +SPINE_C_EXPORT int spine_region_attachment_get_ref_count(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_reference(spine_region_attachment obj); SPINE_C_EXPORT void spine_region_attachment_dereference(spine_region_attachment obj); diff --git a/spine-c-new/src/generated/render_command.h b/spine-c-new/src/generated/render_command.h index e8b5e1b08..95e3b3a14 100644 --- a/spine-c-new/src/generated/render_command.h +++ b/spine-c-new/src/generated/render_command.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_render_command) +#include "types.h" SPINE_C_EXPORT void spine_render_command_dispose(spine_render_command obj); diff --git a/spine-c-new/src/generated/rgb2_timeline.cpp b/spine-c-new/src/generated/rgb2_timeline.cpp index a06ea1c77..043287ad0 100644 --- a/spine-c-new/src/generated/rgb2_timeline.cpp +++ b/spine-c-new/src/generated/rgb2_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_rgb2_timeline spine_rgb2_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) { +spine_rgb2_timeline spine_rgb2_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) { RGB2Timeline *obj = new (__FILE__, __LINE__) RGB2Timeline(frameCount, bezierCount, slotIndex); return (spine_rgb2_timeline) obj; } @@ -42,20 +42,18 @@ void spine_rgb2_timeline_dispose(spine_rgb2_timeline obj) { delete (RGB2Timeline *) obj; } -spine_rtti spine_rgb2_timeline_get_rtti(spine_rgb2_timeline obj) { - if (!obj) return nullptr; - RGB2Timeline *_obj = (RGB2Timeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_rgb2_timeline_get_rtti() { + return (spine_rtti) &RGB2Timeline::rtti; } -void spine_rgb2_timeline_set_frame(spine_rgb2_timeline obj, int32_t frame, float time, float r, float g, float b, float r2, float g2, float b2) { +void spine_rgb2_timeline_set_frame(spine_rgb2_timeline obj, int frame, float time, float r, float g, float b, float r2, float g2, float b2) { if (!obj) return ; RGB2Timeline *_obj = (RGB2Timeline *) obj; _obj->setFrame(frame, time, r, g, b, r2, g2, b2); } -void spine_rgb2_timeline_apply(spine_rgb2_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_rgb2_timeline_apply(spine_rgb2_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; RGB2Timeline *_obj = (RGB2Timeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } diff --git a/spine-c-new/src/generated/rgb2_timeline.h b/spine-c-new/src/generated/rgb2_timeline.h index 37d3312ca..b0562cff6 100644 --- a/spine-c-new/src/generated/rgb2_timeline.h +++ b/spine-c-new/src/generated/rgb2_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rgb2_timeline) - -SPINE_C_EXPORT spine_rgb2_timeline spine_rgb2_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_rgb2_timeline spine_rgb2_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_rgb2_timeline_dispose(spine_rgb2_timeline obj); -SPINE_C_EXPORT spine_rtti spine_rgb2_timeline_get_rtti(spine_rgb2_timeline obj); -SPINE_C_EXPORT void spine_rgb2_timeline_set_frame(spine_rgb2_timeline obj, int32_t frame, float time, float r, float g, float b, float r2, float g2, float b2); -SPINE_C_EXPORT void spine_rgb2_timeline_apply(spine_rgb2_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); +SPINE_C_EXPORT spine_rtti spine_rgb2_timeline_get_rtti(); +SPINE_C_EXPORT void spine_rgb2_timeline_set_frame(spine_rgb2_timeline obj, int frame, float time, float r, float g, float b, float r2, float g2, float b2); +SPINE_C_EXPORT void spine_rgb2_timeline_apply(spine_rgb2_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/rgb_timeline.cpp b/spine-c-new/src/generated/rgb_timeline.cpp index e7307c705..c17acc149 100644 --- a/spine-c-new/src/generated/rgb_timeline.cpp +++ b/spine-c-new/src/generated/rgb_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_rgb_timeline spine_rgb_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) { +spine_rgb_timeline spine_rgb_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) { RGBTimeline *obj = new (__FILE__, __LINE__) RGBTimeline(frameCount, bezierCount, slotIndex); return (spine_rgb_timeline) obj; } @@ -42,20 +42,18 @@ void spine_rgb_timeline_dispose(spine_rgb_timeline obj) { delete (RGBTimeline *) obj; } -spine_rtti spine_rgb_timeline_get_rtti(spine_rgb_timeline obj) { - if (!obj) return nullptr; - RGBTimeline *_obj = (RGBTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_rgb_timeline_get_rtti() { + return (spine_rtti) &RGBTimeline::rtti; } -void spine_rgb_timeline_set_frame(spine_rgb_timeline obj, int32_t frame, float time, float r, float g, float b) { +void spine_rgb_timeline_set_frame(spine_rgb_timeline obj, int frame, float time, float r, float g, float b) { if (!obj) return ; RGBTimeline *_obj = (RGBTimeline *) obj; _obj->setFrame(frame, time, r, g, b); } -void spine_rgb_timeline_apply(spine_rgb_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_rgb_timeline_apply(spine_rgb_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; RGBTimeline *_obj = (RGBTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } diff --git a/spine-c-new/src/generated/rgb_timeline.h b/spine-c-new/src/generated/rgb_timeline.h index b8ab5946e..5f3a520b5 100644 --- a/spine-c-new/src/generated/rgb_timeline.h +++ b/spine-c-new/src/generated/rgb_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rgb_timeline) - -SPINE_C_EXPORT spine_rgb_timeline spine_rgb_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_rgb_timeline spine_rgb_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_rgb_timeline_dispose(spine_rgb_timeline obj); -SPINE_C_EXPORT spine_rtti spine_rgb_timeline_get_rtti(spine_rgb_timeline obj); -SPINE_C_EXPORT void spine_rgb_timeline_set_frame(spine_rgb_timeline obj, int32_t frame, float time, float r, float g, float b); -SPINE_C_EXPORT void spine_rgb_timeline_apply(spine_rgb_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); +SPINE_C_EXPORT spine_rtti spine_rgb_timeline_get_rtti(); +SPINE_C_EXPORT void spine_rgb_timeline_set_frame(spine_rgb_timeline obj, int frame, float time, float r, float g, float b); +SPINE_C_EXPORT void spine_rgb_timeline_apply(spine_rgb_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/rgba2_timeline.cpp b/spine-c-new/src/generated/rgba2_timeline.cpp index 0ea35bf9c..0abcd0cd6 100644 --- a/spine-c-new/src/generated/rgba2_timeline.cpp +++ b/spine-c-new/src/generated/rgba2_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_rgba2_timeline spine_rgba2_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) { +spine_rgba2_timeline spine_rgba2_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) { RGBA2Timeline *obj = new (__FILE__, __LINE__) RGBA2Timeline(frameCount, bezierCount, slotIndex); return (spine_rgba2_timeline) obj; } @@ -42,20 +42,18 @@ void spine_rgba2_timeline_dispose(spine_rgba2_timeline obj) { delete (RGBA2Timeline *) obj; } -spine_rtti spine_rgba2_timeline_get_rtti(spine_rgba2_timeline obj) { - if (!obj) return nullptr; - RGBA2Timeline *_obj = (RGBA2Timeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_rgba2_timeline_get_rtti() { + return (spine_rtti) &RGBA2Timeline::rtti; } -void spine_rgba2_timeline_set_frame(spine_rgba2_timeline obj, int32_t frame, float time, float r, float g, float b, float a, float r2, float g2, float b2) { +void spine_rgba2_timeline_set_frame(spine_rgba2_timeline obj, int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2) { if (!obj) return ; RGBA2Timeline *_obj = (RGBA2Timeline *) obj; _obj->setFrame(frame, time, r, g, b, a, r2, g2, b2); } -void spine_rgba2_timeline_apply(spine_rgba2_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_rgba2_timeline_apply(spine_rgba2_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; RGBA2Timeline *_obj = (RGBA2Timeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } diff --git a/spine-c-new/src/generated/rgba2_timeline.h b/spine-c-new/src/generated/rgba2_timeline.h index 7d5a0ce96..6b6249a03 100644 --- a/spine-c-new/src/generated/rgba2_timeline.h +++ b/spine-c-new/src/generated/rgba2_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rgba2_timeline) - -SPINE_C_EXPORT spine_rgba2_timeline spine_rgba2_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_rgba2_timeline spine_rgba2_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_rgba2_timeline_dispose(spine_rgba2_timeline obj); -SPINE_C_EXPORT spine_rtti spine_rgba2_timeline_get_rtti(spine_rgba2_timeline obj); -SPINE_C_EXPORT void spine_rgba2_timeline_set_frame(spine_rgba2_timeline obj, int32_t frame, float time, float r, float g, float b, float a, float r2, float g2, float b2); -SPINE_C_EXPORT void spine_rgba2_timeline_apply(spine_rgba2_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); +SPINE_C_EXPORT spine_rtti spine_rgba2_timeline_get_rtti(); +SPINE_C_EXPORT void spine_rgba2_timeline_set_frame(spine_rgba2_timeline obj, int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2); +SPINE_C_EXPORT void spine_rgba2_timeline_apply(spine_rgba2_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/rgba_timeline.cpp b/spine-c-new/src/generated/rgba_timeline.cpp index 4383e5b75..7f38c1cc4 100644 --- a/spine-c-new/src/generated/rgba_timeline.cpp +++ b/spine-c-new/src/generated/rgba_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_rgba_timeline spine_rgba_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) { +spine_rgba_timeline spine_rgba_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) { RGBATimeline *obj = new (__FILE__, __LINE__) RGBATimeline(frameCount, bezierCount, slotIndex); return (spine_rgba_timeline) obj; } @@ -42,20 +42,18 @@ void spine_rgba_timeline_dispose(spine_rgba_timeline obj) { delete (RGBATimeline *) obj; } -spine_rtti spine_rgba_timeline_get_rtti(spine_rgba_timeline obj) { - if (!obj) return nullptr; - RGBATimeline *_obj = (RGBATimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_rgba_timeline_get_rtti() { + return (spine_rtti) &RGBATimeline::rtti; } -void spine_rgba_timeline_set_frame(spine_rgba_timeline obj, int32_t frame, float time, float r, float g, float b, float a) { +void spine_rgba_timeline_set_frame(spine_rgba_timeline obj, int frame, float time, float r, float g, float b, float a) { if (!obj) return ; RGBATimeline *_obj = (RGBATimeline *) obj; _obj->setFrame(frame, time, r, g, b, a); } -void spine_rgba_timeline_apply(spine_rgba_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_rgba_timeline_apply(spine_rgba_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; RGBATimeline *_obj = (RGBATimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } diff --git a/spine-c-new/src/generated/rgba_timeline.h b/spine-c-new/src/generated/rgba_timeline.h index a94b340f5..529a81dbb 100644 --- a/spine-c-new/src/generated/rgba_timeline.h +++ b/spine-c-new/src/generated/rgba_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rgba_timeline) - -SPINE_C_EXPORT spine_rgba_timeline spine_rgba_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_rgba_timeline spine_rgba_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_rgba_timeline_dispose(spine_rgba_timeline obj); -SPINE_C_EXPORT spine_rtti spine_rgba_timeline_get_rtti(spine_rgba_timeline obj); -SPINE_C_EXPORT void spine_rgba_timeline_set_frame(spine_rgba_timeline obj, int32_t frame, float time, float r, float g, float b, float a); -SPINE_C_EXPORT void spine_rgba_timeline_apply(spine_rgba_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); +SPINE_C_EXPORT spine_rtti spine_rgba_timeline_get_rtti(); +SPINE_C_EXPORT void spine_rgba_timeline_set_frame(spine_rgba_timeline obj, int frame, float time, float r, float g, float b, float a); +SPINE_C_EXPORT void spine_rgba_timeline_apply(spine_rgba_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/rotate_mode.h b/spine-c-new/src/generated/rotate_mode.h index 9588361dd..6db197d04 100644 --- a/spine-c-new/src/generated/rotate_mode.h +++ b/spine-c-new/src/generated/rotate_mode.h @@ -30,16 +30,16 @@ #ifndef SPINE_C_ROTATEMODE_H #define SPINE_C_ROTATEMODE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_rotate_mode { - SPINE_ROTATE_MODE_ROTATE_MODE_TANGENT = 0, - SPINE_ROTATE_MODE_ROTATE_MODE_CHAIN, - SPINE_ROTATE_MODE_ROTATE_MODE_CHAIN_SCALE + SPINE_ROTATE_MODE_TANGENT = 0, + SPINE_ROTATE_MODE_CHAIN, + SPINE_ROTATE_MODE_CHAIN_SCALE } spine_rotate_mode; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/rotate_timeline.cpp b/spine-c-new/src/generated/rotate_timeline.cpp index a5625fe73..c6f79f4bf 100644 --- a/spine-c-new/src/generated/rotate_timeline.cpp +++ b/spine-c-new/src/generated/rotate_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_rotate_timeline spine_rotate_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_rotate_timeline spine_rotate_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { RotateTimeline *obj = new (__FILE__, __LINE__) RotateTimeline(frameCount, bezierCount, boneIndex); return (spine_rotate_timeline) obj; } @@ -42,19 +42,17 @@ void spine_rotate_timeline_dispose(spine_rotate_timeline obj) { delete (RotateTimeline *) obj; } -spine_rtti spine_rotate_timeline_get_rtti(spine_rotate_timeline obj) { - if (!obj) return nullptr; - RotateTimeline *_obj = (RotateTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_rotate_timeline_get_rtti() { + return (spine_rtti) &RotateTimeline::rtti; } -void spine_rotate_timeline_apply(spine_rotate_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_rotate_timeline_apply(spine_rotate_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; RotateTimeline *_obj = (RotateTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_rotate_timeline_set_frame(spine_rotate_timeline obj, spine_size_t frame, float time, float value) { +void spine_rotate_timeline_set_frame(spine_rotate_timeline obj, size_t frame, float time, float value) { if (!obj) return ; RotateTimeline *_obj = (RotateTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_rotate_timeline_get_curve_value(spine_rotate_timeline obj, float tim float spine_rotate_timeline_get_relative_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; RotateTimeline *_obj = (RotateTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_rotate_timeline_get_absolute_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; RotateTimeline *_obj = (RotateTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_rotate_timeline_get_absolute_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_rotate_timeline_get_absolute_value_6(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; RotateTimeline *_obj = (RotateTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_rotate_timeline_get_scale_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; RotateTimeline *_obj = (RotateTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_rotate_timeline_get_bone_index(spine_rotate_timeline obj) { +int spine_rotate_timeline_get_bone_index(spine_rotate_timeline obj) { if (!obj) return 0; RotateTimeline *_obj = (RotateTimeline *) obj; return _obj->getBoneIndex(); } -void spine_rotate_timeline_set_bone_index(spine_rotate_timeline obj, int32_t value) { +void spine_rotate_timeline_set_bone_index(spine_rotate_timeline obj, int value) { if (!obj) return; RotateTimeline *_obj = (RotateTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/rotate_timeline.h b/spine-c-new/src/generated/rotate_timeline.h index d00116467..0ba6d8a15 100644 --- a/spine-c-new/src/generated/rotate_timeline.h +++ b/spine-c-new/src/generated/rotate_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rotate_timeline) - -SPINE_C_EXPORT spine_rotate_timeline spine_rotate_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_rotate_timeline spine_rotate_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_rotate_timeline_dispose(spine_rotate_timeline obj); -SPINE_C_EXPORT spine_rtti spine_rotate_timeline_get_rtti(spine_rotate_timeline obj); -SPINE_C_EXPORT void spine_rotate_timeline_apply(spine_rotate_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_rotate_timeline_set_frame(spine_rotate_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_rotate_timeline_get_rtti(); +SPINE_C_EXPORT void spine_rotate_timeline_apply(spine_rotate_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_rotate_timeline_set_frame(spine_rotate_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_rotate_timeline_get_curve_value(spine_rotate_timeline obj, float time); SPINE_C_EXPORT float spine_rotate_timeline_get_relative_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_rotate_timeline_get_absolute_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_rotate_timeline_get_absolute_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_rotate_timeline_get_absolute_value_6(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_rotate_timeline_get_scale_value(spine_rotate_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_rotate_timeline_get_bone_index(spine_rotate_timeline obj); -SPINE_C_EXPORT void spine_rotate_timeline_set_bone_index(spine_rotate_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_rotate_timeline_get_bone_index(spine_rotate_timeline obj); +SPINE_C_EXPORT void spine_rotate_timeline_set_bone_index(spine_rotate_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/rtti.cpp b/spine-c-new/src/generated/rtti.cpp index 53130818b..b7018bbd2 100644 --- a/spine-c-new/src/generated/rtti.cpp +++ b/spine-c-new/src/generated/rtti.cpp @@ -32,18 +32,18 @@ using namespace spine; -spine_rtti spine_rtti_create(const utf8 * className) { +spine_rtti spine_rtti_create(const char * className) { RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className); return (spine_rtti) obj; } -spine_rtti spine_rtti_create_with_string_rtti(const utf8 * className, spine_rtti baseRTTI) { - RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className, baseRTTI); +spine_rtti spine_rtti_create_with_string_rtti(const char * className, spine_rtti baseRTTI) { + RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className, *(RTTI*) baseRTTI); return (spine_rtti) obj; } -spine_rtti spine_rtti_create_with_string_rtti_rtti_rtti_rtti(const utf8 * className, spine_rtti baseRTTI, spine_const rtti interface1, spine_const rtti interface2, spine_const rtti interface3) { - RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className, baseRTTI, (const RTTI *) interface1, (const RTTI *) interface2, (const RTTI *) interface3); +spine_rtti spine_rtti_create_with_string_rtti_rtti_rtti_rtti(const char * className, spine_rtti baseRTTI, spine_const rtti interface1, spine_const rtti interface2, spine_const rtti interface3) { + RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className, *(RTTI*) baseRTTI, (const RTTI *) interface1, (const RTTI *) interface2, (const RTTI *) interface3); return (spine_rtti) obj; } @@ -52,20 +52,20 @@ void spine_rtti_dispose(spine_rtti obj) { delete (RTTI *) obj; } -const utf8 * spine_rtti_get_class_name(spine_rtti obj) { +const char * spine_rtti_get_class_name(spine_rtti obj) { if (!obj) return nullptr; RTTI *_obj = (RTTI *) obj; - return (const utf8 *) _obj->getClassName(); + return (const char *) _obj->getClassName(); } -spine_bool spine_rtti_is_exactly(spine_rtti obj, spine_rtti rtti) { - if (!obj) return 0; +bool spine_rtti_is_exactly(spine_rtti obj, spine_rtti rtti) { + if (!obj) return false; RTTI *_obj = (RTTI *) obj; - return _obj->isExactly(rtti); + return _obj->isExactly(*(RTTI*) rtti); } -spine_bool spine_rtti_instance_of(spine_rtti obj, spine_rtti rtti) { - if (!obj) return 0; +bool spine_rtti_instance_of(spine_rtti obj, spine_rtti rtti) { + if (!obj) return false; RTTI *_obj = (RTTI *) obj; - return _obj->instanceOf(rtti); + return _obj->instanceOf(*(RTTI*) rtti); } diff --git a/spine-c-new/src/generated/rtti.h b/spine-c-new/src/generated/rtti.h index 27cc38481..38968284d 100644 --- a/spine-c-new/src/generated/rtti.h +++ b/spine-c-new/src/generated/rtti.h @@ -34,17 +34,15 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_rtti) - -SPINE_C_EXPORT spine_rtti spine_rtti_create(const utf8 * className); -SPINE_C_EXPORT spine_rtti spine_rtti_create_with_string_rtti(const utf8 * className, spine_rtti baseRTTI); -SPINE_C_EXPORT spine_rtti spine_rtti_create_with_string_rtti_rtti_rtti_rtti(const utf8 * className, spine_rtti baseRTTI, spine_const rtti interface1, spine_const rtti interface2, spine_const rtti interface3); +SPINE_C_EXPORT spine_rtti spine_rtti_create(const char * className); +SPINE_C_EXPORT spine_rtti spine_rtti_create_with_string_rtti(const char * className, spine_rtti baseRTTI); +SPINE_C_EXPORT spine_rtti spine_rtti_create_with_string_rtti_rtti_rtti_rtti(const char * className, spine_rtti baseRTTI, spine_const rtti interface1, spine_const rtti interface2, spine_const rtti interface3); SPINE_C_EXPORT void spine_rtti_dispose(spine_rtti obj); -SPINE_C_EXPORT const utf8 * spine_rtti_get_class_name(spine_rtti obj); -SPINE_C_EXPORT spine_bool spine_rtti_is_exactly(spine_rtti obj, spine_rtti rtti); -SPINE_C_EXPORT spine_bool spine_rtti_instance_of(spine_rtti obj, spine_rtti rtti); +SPINE_C_EXPORT const char * spine_rtti_get_class_name(spine_rtti obj); +SPINE_C_EXPORT bool spine_rtti_is_exactly(spine_rtti obj, spine_rtti rtti); +SPINE_C_EXPORT bool spine_rtti_instance_of(spine_rtti obj, spine_rtti rtti); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/scale_timeline.cpp b/spine-c-new/src/generated/scale_timeline.cpp index d85ac76db..e35f0cad7 100644 --- a/spine-c-new/src/generated/scale_timeline.cpp +++ b/spine-c-new/src/generated/scale_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_scale_timeline spine_scale_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_scale_timeline spine_scale_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ScaleTimeline *obj = new (__FILE__, __LINE__) ScaleTimeline(frameCount, bezierCount, boneIndex); return (spine_scale_timeline) obj; } @@ -42,19 +42,17 @@ void spine_scale_timeline_dispose(spine_scale_timeline obj) { delete (ScaleTimeline *) obj; } -spine_rtti spine_scale_timeline_get_rtti(spine_scale_timeline obj) { - if (!obj) return nullptr; - ScaleTimeline *_obj = (ScaleTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_scale_timeline_get_rtti() { + return (spine_rtti) &ScaleTimeline::rtti; } -void spine_scale_timeline_apply(spine_scale_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_scale_timeline_apply(spine_scale_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ScaleTimeline *_obj = (ScaleTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_scale_timeline_set_frame(spine_scale_timeline obj, spine_size_t frame, float time, float value1, float value2) { +void spine_scale_timeline_set_frame(spine_scale_timeline obj, size_t frame, float time, float value1, float value2) { if (!obj) return ; ScaleTimeline *_obj = (ScaleTimeline *) obj; _obj->setFrame(frame, time, value1, value2); @@ -66,13 +64,13 @@ float spine_scale_timeline_get_curve_value(spine_scale_timeline obj, float time) return _obj->getCurveValue(time); } -int32_t spine_scale_timeline_get_bone_index(spine_scale_timeline obj) { +int spine_scale_timeline_get_bone_index(spine_scale_timeline obj) { if (!obj) return 0; ScaleTimeline *_obj = (ScaleTimeline *) obj; return _obj->getBoneIndex(); } -void spine_scale_timeline_set_bone_index(spine_scale_timeline obj, int32_t value) { +void spine_scale_timeline_set_bone_index(spine_scale_timeline obj, int value) { if (!obj) return; ScaleTimeline *_obj = (ScaleTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/scale_timeline.h b/spine-c-new/src/generated/scale_timeline.h index 946875414..4a8aff0ab 100644 --- a/spine-c-new/src/generated/scale_timeline.h +++ b/spine-c-new/src/generated/scale_timeline.h @@ -34,18 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_scale_timeline) - -SPINE_C_EXPORT spine_scale_timeline spine_scale_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_scale_timeline spine_scale_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_scale_timeline_dispose(spine_scale_timeline obj); -SPINE_C_EXPORT spine_rtti spine_scale_timeline_get_rtti(spine_scale_timeline obj); -SPINE_C_EXPORT void spine_scale_timeline_apply(spine_scale_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_scale_timeline_set_frame(spine_scale_timeline obj, spine_size_t frame, float time, float value1, float value2); +SPINE_C_EXPORT spine_rtti spine_scale_timeline_get_rtti(); +SPINE_C_EXPORT void spine_scale_timeline_apply(spine_scale_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_scale_timeline_set_frame(spine_scale_timeline obj, size_t frame, float time, float value1, float value2); SPINE_C_EXPORT float spine_scale_timeline_get_curve_value(spine_scale_timeline obj, float time); -SPINE_C_EXPORT int32_t spine_scale_timeline_get_bone_index(spine_scale_timeline obj); -SPINE_C_EXPORT void spine_scale_timeline_set_bone_index(spine_scale_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_scale_timeline_get_bone_index(spine_scale_timeline obj); +SPINE_C_EXPORT void spine_scale_timeline_set_bone_index(spine_scale_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/scale_x_timeline.cpp b/spine-c-new/src/generated/scale_x_timeline.cpp index cbe43d6d7..222568204 100644 --- a/spine-c-new/src/generated/scale_x_timeline.cpp +++ b/spine-c-new/src/generated/scale_x_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_scale_x_timeline spine_scale_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_scale_x_timeline spine_scale_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ScaleXTimeline *obj = new (__FILE__, __LINE__) ScaleXTimeline(frameCount, bezierCount, boneIndex); return (spine_scale_x_timeline) obj; } @@ -42,19 +42,17 @@ void spine_scale_x_timeline_dispose(spine_scale_x_timeline obj) { delete (ScaleXTimeline *) obj; } -spine_rtti spine_scale_x_timeline_get_rtti(spine_scale_x_timeline obj) { - if (!obj) return nullptr; - ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_scale_x_timeline_get_rtti() { + return (spine_rtti) &ScaleXTimeline::rtti; } -void spine_scale_x_timeline_apply(spine_scale_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_scale_x_timeline_apply(spine_scale_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_scale_x_timeline_set_frame(spine_scale_x_timeline obj, spine_size_t frame, float time, float value) { +void spine_scale_x_timeline_set_frame(spine_scale_x_timeline obj, size_t frame, float time, float value) { if (!obj) return ; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_scale_x_timeline_get_curve_value(spine_scale_x_timeline obj, float t float spine_scale_x_timeline_get_relative_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_scale_x_timeline_get_absolute_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_scale_x_timeline_get_absolute_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_scale_x_timeline_get_absolute_value_6(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_scale_x_timeline_get_scale_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline obj) { +int spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline obj) { if (!obj) return 0; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; return _obj->getBoneIndex(); } -void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline obj, int32_t value) { +void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline obj, int value) { if (!obj) return; ScaleXTimeline *_obj = (ScaleXTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/scale_x_timeline.h b/spine-c-new/src/generated/scale_x_timeline.h index 813db9d20..fd6061c63 100644 --- a/spine-c-new/src/generated/scale_x_timeline.h +++ b/spine-c-new/src/generated/scale_x_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_scale_x_timeline) - -SPINE_C_EXPORT spine_scale_x_timeline spine_scale_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_scale_x_timeline spine_scale_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_scale_x_timeline_dispose(spine_scale_x_timeline obj); -SPINE_C_EXPORT spine_rtti spine_scale_x_timeline_get_rtti(spine_scale_x_timeline obj); -SPINE_C_EXPORT void spine_scale_x_timeline_apply(spine_scale_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_scale_x_timeline_set_frame(spine_scale_x_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_scale_x_timeline_get_rtti(); +SPINE_C_EXPORT void spine_scale_x_timeline_apply(spine_scale_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_scale_x_timeline_set_frame(spine_scale_x_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_scale_x_timeline_get_curve_value(spine_scale_x_timeline obj, float time); SPINE_C_EXPORT float spine_scale_x_timeline_get_relative_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_scale_x_timeline_get_absolute_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_scale_x_timeline_get_absolute_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_scale_x_timeline_get_absolute_value_6(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_scale_x_timeline_get_scale_value(spine_scale_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline obj); -SPINE_C_EXPORT void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline obj); +SPINE_C_EXPORT void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/scale_y_timeline.cpp b/spine-c-new/src/generated/scale_y_timeline.cpp index 45e747438..074e24d44 100644 --- a/spine-c-new/src/generated/scale_y_timeline.cpp +++ b/spine-c-new/src/generated/scale_y_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_scale_y_timeline spine_scale_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_scale_y_timeline spine_scale_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ScaleYTimeline *obj = new (__FILE__, __LINE__) ScaleYTimeline(frameCount, bezierCount, boneIndex); return (spine_scale_y_timeline) obj; } @@ -42,19 +42,17 @@ void spine_scale_y_timeline_dispose(spine_scale_y_timeline obj) { delete (ScaleYTimeline *) obj; } -spine_rtti spine_scale_y_timeline_get_rtti(spine_scale_y_timeline obj) { - if (!obj) return nullptr; - ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_scale_y_timeline_get_rtti() { + return (spine_rtti) &ScaleYTimeline::rtti; } -void spine_scale_y_timeline_apply(spine_scale_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_scale_y_timeline_apply(spine_scale_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_scale_y_timeline_set_frame(spine_scale_y_timeline obj, spine_size_t frame, float time, float value) { +void spine_scale_y_timeline_set_frame(spine_scale_y_timeline obj, size_t frame, float time, float value) { if (!obj) return ; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_scale_y_timeline_get_curve_value(spine_scale_y_timeline obj, float t float spine_scale_y_timeline_get_relative_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_scale_y_timeline_get_absolute_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_scale_y_timeline_get_absolute_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_scale_y_timeline_get_absolute_value_6(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_scale_y_timeline_get_scale_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline obj) { +int spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline obj) { if (!obj) return 0; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; return _obj->getBoneIndex(); } -void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline obj, int32_t value) { +void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline obj, int value) { if (!obj) return; ScaleYTimeline *_obj = (ScaleYTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/scale_y_timeline.h b/spine-c-new/src/generated/scale_y_timeline.h index 2d57d5ca2..f740d389c 100644 --- a/spine-c-new/src/generated/scale_y_timeline.h +++ b/spine-c-new/src/generated/scale_y_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_scale_y_timeline) - -SPINE_C_EXPORT spine_scale_y_timeline spine_scale_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_scale_y_timeline spine_scale_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_scale_y_timeline_dispose(spine_scale_y_timeline obj); -SPINE_C_EXPORT spine_rtti spine_scale_y_timeline_get_rtti(spine_scale_y_timeline obj); -SPINE_C_EXPORT void spine_scale_y_timeline_apply(spine_scale_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_scale_y_timeline_set_frame(spine_scale_y_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_scale_y_timeline_get_rtti(); +SPINE_C_EXPORT void spine_scale_y_timeline_apply(spine_scale_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_scale_y_timeline_set_frame(spine_scale_y_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_scale_y_timeline_get_curve_value(spine_scale_y_timeline obj, float time); SPINE_C_EXPORT float spine_scale_y_timeline_get_relative_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_scale_y_timeline_get_absolute_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_scale_y_timeline_get_absolute_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_scale_y_timeline_get_absolute_value_6(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_scale_y_timeline_get_scale_value(spine_scale_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline obj); -SPINE_C_EXPORT void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline obj); +SPINE_C_EXPORT void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/sequence.cpp b/spine-c-new/src/generated/sequence.cpp index 7a5fc2459..2e15a4815 100644 --- a/spine-c-new/src/generated/sequence.cpp +++ b/spine-c-new/src/generated/sequence.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_sequence spine_sequence_create(int32_t count) { +spine_sequence spine_sequence_create(int count) { Sequence *obj = new (__FILE__, __LINE__) Sequence(count); return (spine_sequence) obj; } @@ -43,7 +43,7 @@ void spine_sequence_dispose(spine_sequence obj) { } spine_sequence spine_sequence_copy(spine_sequence obj) { - if (!obj) return nullptr; + if (!obj) return (spine_sequence) 0; Sequence *_obj = (Sequence *) obj; return (spine_sequence) _obj->copy(); } @@ -54,66 +54,60 @@ void spine_sequence_apply(spine_sequence obj, spine_slot_pose slot, spine_attach _obj->apply((SlotPose *) slot, (Attachment *) attachment); } -const utf8 * spine_sequence_get_path(spine_sequence obj, const utf8 * basePath, int32_t index) { +const char* spine_sequence_get_path(spine_sequence obj, const char* basePath, int index) { if (!obj) return nullptr; Sequence *_obj = (Sequence *) obj; - return (const utf8 *) _obj->getPath(String(basePath), index).buffer(); + return (const char *) _obj->getPath(String(basePath), index).buffer(); } -int32_t spine_sequence_get_id(spine_sequence obj) { +int spine_sequence_get_id(spine_sequence obj) { if (!obj) return 0; Sequence *_obj = (Sequence *) obj; return _obj->getId(); } -void spine_sequence_set_id(spine_sequence obj, int32_t value) { +void spine_sequence_set_id(spine_sequence obj, int value) { if (!obj) return; Sequence *_obj = (Sequence *) obj; _obj->setId(value); } -int32_t spine_sequence_get_start(spine_sequence obj) { +int spine_sequence_get_start(spine_sequence obj) { if (!obj) return 0; Sequence *_obj = (Sequence *) obj; return _obj->getStart(); } -void spine_sequence_set_start(spine_sequence obj, int32_t value) { +void spine_sequence_set_start(spine_sequence obj, int value) { if (!obj) return; Sequence *_obj = (Sequence *) obj; _obj->setStart(value); } -int32_t spine_sequence_get_digits(spine_sequence obj) { +int spine_sequence_get_digits(spine_sequence obj) { if (!obj) return 0; Sequence *_obj = (Sequence *) obj; return _obj->getDigits(); } -void spine_sequence_set_digits(spine_sequence obj, int32_t value) { +void spine_sequence_set_digits(spine_sequence obj, int value) { if (!obj) return; Sequence *_obj = (Sequence *) obj; _obj->setDigits(value); } -int32_t spine_sequence_get_setup_index(spine_sequence obj) { +int spine_sequence_get_setup_index(spine_sequence obj) { if (!obj) return 0; Sequence *_obj = (Sequence *) obj; return _obj->getSetupIndex(); } -void spine_sequence_set_setup_index(spine_sequence obj, int32_t value) { +void spine_sequence_set_setup_index(spine_sequence obj, int value) { if (!obj) return; Sequence *_obj = (Sequence *) obj; _obj->setSetupIndex(value); } -void * spine_sequence_get_regions(spine_sequence obj) { - if (!obj) return nullptr; - Sequence *_obj = (Sequence *) obj; - return (void *) _obj->getRegions(); -} - int32_t spine_sequence_get_num_regions(spine_sequence obj) { if (!obj) return 0; Sequence *_obj = (Sequence *) obj; diff --git a/spine-c-new/src/generated/sequence.h b/spine-c-new/src/generated/sequence.h index 7f6e63337..2aaafc1eb 100644 --- a/spine-c-new/src/generated/sequence.h +++ b/spine-c-new/src/generated/sequence.h @@ -34,24 +34,21 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_sequence) - -SPINE_C_EXPORT spine_sequence spine_sequence_create(int32_t count); +SPINE_C_EXPORT spine_sequence spine_sequence_create(int count); SPINE_C_EXPORT void spine_sequence_dispose(spine_sequence obj); SPINE_C_EXPORT spine_sequence spine_sequence_copy(spine_sequence obj); SPINE_C_EXPORT void spine_sequence_apply(spine_sequence obj, spine_slot_pose slot, spine_attachment attachment); -SPINE_C_EXPORT const utf8 * spine_sequence_get_path(spine_sequence obj, const utf8 * basePath, int32_t index); -SPINE_C_EXPORT int32_t spine_sequence_get_id(spine_sequence obj); -SPINE_C_EXPORT void spine_sequence_set_id(spine_sequence obj, int32_t value); -SPINE_C_EXPORT int32_t spine_sequence_get_start(spine_sequence obj); -SPINE_C_EXPORT void spine_sequence_set_start(spine_sequence obj, int32_t value); -SPINE_C_EXPORT int32_t spine_sequence_get_digits(spine_sequence obj); -SPINE_C_EXPORT void spine_sequence_set_digits(spine_sequence obj, int32_t value); -SPINE_C_EXPORT int32_t spine_sequence_get_setup_index(spine_sequence obj); -SPINE_C_EXPORT void spine_sequence_set_setup_index(spine_sequence obj, int32_t value); -SPINE_C_EXPORT void * spine_sequence_get_regions(spine_sequence obj); +SPINE_C_EXPORT const char* spine_sequence_get_path(spine_sequence obj, const char* basePath, int index); +SPINE_C_EXPORT int spine_sequence_get_id(spine_sequence obj); +SPINE_C_EXPORT void spine_sequence_set_id(spine_sequence obj, int value); +SPINE_C_EXPORT int spine_sequence_get_start(spine_sequence obj); +SPINE_C_EXPORT void spine_sequence_set_start(spine_sequence obj, int value); +SPINE_C_EXPORT int spine_sequence_get_digits(spine_sequence obj); +SPINE_C_EXPORT void spine_sequence_set_digits(spine_sequence obj, int value); +SPINE_C_EXPORT int spine_sequence_get_setup_index(spine_sequence obj); +SPINE_C_EXPORT void spine_sequence_set_setup_index(spine_sequence obj, int value); SPINE_C_EXPORT int32_t spine_sequence_get_num_regions(spine_sequence obj); SPINE_C_EXPORT spine_texture_region *spine_sequence_get_regions(spine_sequence obj); diff --git a/spine-c-new/src/generated/sequence_mode.h b/spine-c-new/src/generated/sequence_mode.h index ae01e6192..7cd6a6815 100644 --- a/spine-c-new/src/generated/sequence_mode.h +++ b/spine-c-new/src/generated/sequence_mode.h @@ -30,20 +30,20 @@ #ifndef SPINE_C_SEQUENCEMODE_H #define SPINE_C_SEQUENCEMODE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_sequence_mode { - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_HOLD = 0, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_ONCE = 1, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_LOOP = 2, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_PINGPONG = 3, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_ONCE_REVERSE = 4, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_LOOP_REVERSE = 5, - SPINE_SEQUENCE_MODE_SEQUENCE_MODE_PINGPONG_REVERSE = 6 + SPINE_SEQUENCE_MODE_HOLD = 0, + SPINE_SEQUENCE_MODE_ONCE = 1, + SPINE_SEQUENCE_MODE_LOOP = 2, + SPINE_SEQUENCE_MODE_PINGPONG = 3, + SPINE_SEQUENCE_MODE_ONCE_REVERSE = 4, + SPINE_SEQUENCE_MODE_LOOP_REVERSE = 5, + SPINE_SEQUENCE_MODE_PINGPONG_REVERSE = 6 } spine_sequence_mode; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/sequence_timeline.cpp b/spine-c-new/src/generated/sequence_timeline.cpp index ae827f027..e046853e9 100644 --- a/spine-c-new/src/generated/sequence_timeline.cpp +++ b/spine-c-new/src/generated/sequence_timeline.cpp @@ -32,8 +32,8 @@ using namespace spine; -spine_sequence_timeline spine_sequence_timeline_create(spine_size_t frameCount, int32_t slotIndex, spine_spine::attachment attachment) { - SequenceTimeline *obj = new (__FILE__, __LINE__) SequenceTimeline(frameCount, slotIndex, (spine::Attachment *) attachment); +spine_sequence_timeline spine_sequence_timeline_create(size_t frameCount, int slotIndex, spine_attachment attachment) { + SequenceTimeline *obj = new (__FILE__, __LINE__) SequenceTimeline(frameCount, slotIndex, (Attachment *) attachment); return (spine_sequence_timeline) obj; } @@ -42,58 +42,50 @@ void spine_sequence_timeline_dispose(spine_sequence_timeline obj) { delete (SequenceTimeline *) obj; } -spine_rtti spine_sequence_timeline_get_rtti(spine_sequence_timeline obj) { - if (!obj) return nullptr; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_sequence_timeline_get_rtti() { + return (spine_rtti) &SequenceTimeline::rtti; } -void spine_sequence_timeline_apply(spine_sequence_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_sequence_timeline_apply(spine_sequence_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; SequenceTimeline *_obj = (SequenceTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_sequence_timeline_set_frame(spine_sequence_timeline obj, int32_t frame, float time, spine_sequence_mode mode, int32_t index, float delay) { +void spine_sequence_timeline_set_frame(spine_sequence_timeline obj, int frame, float time, spine_sequence_mode mode, int index, float delay) { if (!obj) return ; SequenceTimeline *_obj = (SequenceTimeline *) obj; - _obj->setFrame(frame, time, mode, index, delay); + _obj->setFrame(frame, time, (SequenceMode) mode, index, delay); } spine_attachment spine_sequence_timeline_get_attachment(spine_sequence_timeline obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return (spine_attachment) _obj->getAttachment(); } -spine_size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline obj) { - if (!obj) return nullptr; +size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline obj) { + if (!obj) return 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline obj) { - if (!obj) return nullptr; +size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline obj) { + if (!obj) return 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return _obj->getFrameCount(); } -void * spine_sequence_timeline_get_frames(spine_sequence_timeline obj) { - if (!obj) return nullptr; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_sequence_timeline_get_num_frames(spine_sequence_timeline obj) { if (!obj) return 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_sequence_timeline_get_frames(spine_sequence_timeline obj) { +float *spine_sequence_timeline_get_frames(spine_sequence_timeline obj) { if (!obj) return nullptr; SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_sequence_timeline_get_duration(spine_sequence_timeline obj) { @@ -102,31 +94,25 @@ float spine_sequence_timeline_get_duration(spine_sequence_timeline obj) { return _obj->getDuration(); } -void * spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj) { - if (!obj) return nullptr; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_sequence_timeline_get_num_property_ids(spine_sequence_timeline obj) { if (!obj) return 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj) { +int64_t *spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj) { if (!obj) return nullptr; SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_sequence_timeline_get_slot_index(spine_sequence_timeline obj) { +int spine_sequence_timeline_get_slot_index(spine_sequence_timeline obj) { if (!obj) return 0; SequenceTimeline *_obj = (SequenceTimeline *) obj; return _obj->getSlotIndex(); } -void spine_sequence_timeline_set_slot_index(spine_sequence_timeline obj, int32_t value) { +void spine_sequence_timeline_set_slot_index(spine_sequence_timeline obj, int value) { if (!obj) return; SequenceTimeline *_obj = (SequenceTimeline *) obj; _obj->setSlotIndex(value); diff --git a/spine-c-new/src/generated/sequence_timeline.h b/spine-c-new/src/generated/sequence_timeline.h index 4c730de7d..ad8a2e52d 100644 --- a/spine-c-new/src/generated/sequence_timeline.h +++ b/spine-c-new/src/generated/sequence_timeline.h @@ -34,27 +34,23 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_sequence_timeline) - -SPINE_C_EXPORT spine_sequence_timeline spine_sequence_timeline_create(spine_size_t frameCount, int32_t slotIndex, spine_spine::attachment attachment); +SPINE_C_EXPORT spine_sequence_timeline spine_sequence_timeline_create(size_t frameCount, int slotIndex, spine_attachment attachment); SPINE_C_EXPORT void spine_sequence_timeline_dispose(spine_sequence_timeline obj); -SPINE_C_EXPORT spine_rtti spine_sequence_timeline_get_rtti(spine_sequence_timeline obj); -SPINE_C_EXPORT void spine_sequence_timeline_apply(spine_sequence_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_sequence_timeline_set_frame(spine_sequence_timeline obj, int32_t frame, float time, spine_sequence_mode mode, int32_t index, float delay); +SPINE_C_EXPORT spine_rtti spine_sequence_timeline_get_rtti(); +SPINE_C_EXPORT void spine_sequence_timeline_apply(spine_sequence_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_sequence_timeline_set_frame(spine_sequence_timeline obj, int frame, float time, spine_sequence_mode mode, int index, float delay); SPINE_C_EXPORT spine_attachment spine_sequence_timeline_get_attachment(spine_sequence_timeline obj); -SPINE_C_EXPORT spine_size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline obj); -SPINE_C_EXPORT spine_size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline obj); -SPINE_C_EXPORT void * spine_sequence_timeline_get_frames(spine_sequence_timeline obj); +SPINE_C_EXPORT size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline obj); +SPINE_C_EXPORT size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline obj); SPINE_C_EXPORT int32_t spine_sequence_timeline_get_num_frames(spine_sequence_timeline obj); -SPINE_C_EXPORT spine_float *spine_sequence_timeline_get_frames(spine_sequence_timeline obj); +SPINE_C_EXPORT float *spine_sequence_timeline_get_frames(spine_sequence_timeline obj); SPINE_C_EXPORT float spine_sequence_timeline_get_duration(spine_sequence_timeline obj); -SPINE_C_EXPORT void * spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj); SPINE_C_EXPORT int32_t spine_sequence_timeline_get_num_property_ids(spine_sequence_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj); -SPINE_C_EXPORT int32_t spine_sequence_timeline_get_slot_index(spine_sequence_timeline obj); -SPINE_C_EXPORT void spine_sequence_timeline_set_slot_index(spine_sequence_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj); +SPINE_C_EXPORT int spine_sequence_timeline_get_slot_index(spine_sequence_timeline obj); +SPINE_C_EXPORT void spine_sequence_timeline_set_slot_index(spine_sequence_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/shear_timeline.cpp b/spine-c-new/src/generated/shear_timeline.cpp index 59ef5c996..de3f71b1b 100644 --- a/spine-c-new/src/generated/shear_timeline.cpp +++ b/spine-c-new/src/generated/shear_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_shear_timeline spine_shear_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_shear_timeline spine_shear_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ShearTimeline *obj = new (__FILE__, __LINE__) ShearTimeline(frameCount, bezierCount, boneIndex); return (spine_shear_timeline) obj; } @@ -42,19 +42,17 @@ void spine_shear_timeline_dispose(spine_shear_timeline obj) { delete (ShearTimeline *) obj; } -spine_rtti spine_shear_timeline_get_rtti(spine_shear_timeline obj) { - if (!obj) return nullptr; - ShearTimeline *_obj = (ShearTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_shear_timeline_get_rtti() { + return (spine_rtti) &ShearTimeline::rtti; } -void spine_shear_timeline_apply(spine_shear_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_shear_timeline_apply(spine_shear_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ShearTimeline *_obj = (ShearTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_shear_timeline_set_frame(spine_shear_timeline obj, spine_size_t frame, float time, float value1, float value2) { +void spine_shear_timeline_set_frame(spine_shear_timeline obj, size_t frame, float time, float value1, float value2) { if (!obj) return ; ShearTimeline *_obj = (ShearTimeline *) obj; _obj->setFrame(frame, time, value1, value2); @@ -66,13 +64,13 @@ float spine_shear_timeline_get_curve_value(spine_shear_timeline obj, float time) return _obj->getCurveValue(time); } -int32_t spine_shear_timeline_get_bone_index(spine_shear_timeline obj) { +int spine_shear_timeline_get_bone_index(spine_shear_timeline obj) { if (!obj) return 0; ShearTimeline *_obj = (ShearTimeline *) obj; return _obj->getBoneIndex(); } -void spine_shear_timeline_set_bone_index(spine_shear_timeline obj, int32_t value) { +void spine_shear_timeline_set_bone_index(spine_shear_timeline obj, int value) { if (!obj) return; ShearTimeline *_obj = (ShearTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/shear_timeline.h b/spine-c-new/src/generated/shear_timeline.h index 92a386125..312fa32b3 100644 --- a/spine-c-new/src/generated/shear_timeline.h +++ b/spine-c-new/src/generated/shear_timeline.h @@ -34,18 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_shear_timeline) - -SPINE_C_EXPORT spine_shear_timeline spine_shear_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_shear_timeline spine_shear_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_shear_timeline_dispose(spine_shear_timeline obj); -SPINE_C_EXPORT spine_rtti spine_shear_timeline_get_rtti(spine_shear_timeline obj); -SPINE_C_EXPORT void spine_shear_timeline_apply(spine_shear_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_shear_timeline_set_frame(spine_shear_timeline obj, spine_size_t frame, float time, float value1, float value2); +SPINE_C_EXPORT spine_rtti spine_shear_timeline_get_rtti(); +SPINE_C_EXPORT void spine_shear_timeline_apply(spine_shear_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_shear_timeline_set_frame(spine_shear_timeline obj, size_t frame, float time, float value1, float value2); SPINE_C_EXPORT float spine_shear_timeline_get_curve_value(spine_shear_timeline obj, float time); -SPINE_C_EXPORT int32_t spine_shear_timeline_get_bone_index(spine_shear_timeline obj); -SPINE_C_EXPORT void spine_shear_timeline_set_bone_index(spine_shear_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_shear_timeline_get_bone_index(spine_shear_timeline obj); +SPINE_C_EXPORT void spine_shear_timeline_set_bone_index(spine_shear_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/shear_x_timeline.cpp b/spine-c-new/src/generated/shear_x_timeline.cpp index b196a6e2f..d86e5009a 100644 --- a/spine-c-new/src/generated/shear_x_timeline.cpp +++ b/spine-c-new/src/generated/shear_x_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_shear_x_timeline spine_shear_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_shear_x_timeline spine_shear_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ShearXTimeline *obj = new (__FILE__, __LINE__) ShearXTimeline(frameCount, bezierCount, boneIndex); return (spine_shear_x_timeline) obj; } @@ -42,19 +42,17 @@ void spine_shear_x_timeline_dispose(spine_shear_x_timeline obj) { delete (ShearXTimeline *) obj; } -spine_rtti spine_shear_x_timeline_get_rtti(spine_shear_x_timeline obj) { - if (!obj) return nullptr; - ShearXTimeline *_obj = (ShearXTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_shear_x_timeline_get_rtti() { + return (spine_rtti) &ShearXTimeline::rtti; } -void spine_shear_x_timeline_apply(spine_shear_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_shear_x_timeline_apply(spine_shear_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ShearXTimeline *_obj = (ShearXTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_shear_x_timeline_set_frame(spine_shear_x_timeline obj, spine_size_t frame, float time, float value) { +void spine_shear_x_timeline_set_frame(spine_shear_x_timeline obj, size_t frame, float time, float value) { if (!obj) return ; ShearXTimeline *_obj = (ShearXTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_shear_x_timeline_get_curve_value(spine_shear_x_timeline obj, float t float spine_shear_x_timeline_get_relative_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ShearXTimeline *_obj = (ShearXTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_shear_x_timeline_get_absolute_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ShearXTimeline *_obj = (ShearXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_shear_x_timeline_get_absolute_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_shear_x_timeline_get_absolute_value_6(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; ShearXTimeline *_obj = (ShearXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_shear_x_timeline_get_scale_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; ShearXTimeline *_obj = (ShearXTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline obj) { +int spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline obj) { if (!obj) return 0; ShearXTimeline *_obj = (ShearXTimeline *) obj; return _obj->getBoneIndex(); } -void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline obj, int32_t value) { +void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline obj, int value) { if (!obj) return; ShearXTimeline *_obj = (ShearXTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/shear_x_timeline.h b/spine-c-new/src/generated/shear_x_timeline.h index 6eaaa75e2..09cb6e658 100644 --- a/spine-c-new/src/generated/shear_x_timeline.h +++ b/spine-c-new/src/generated/shear_x_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_shear_x_timeline) - -SPINE_C_EXPORT spine_shear_x_timeline spine_shear_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_shear_x_timeline spine_shear_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_shear_x_timeline_dispose(spine_shear_x_timeline obj); -SPINE_C_EXPORT spine_rtti spine_shear_x_timeline_get_rtti(spine_shear_x_timeline obj); -SPINE_C_EXPORT void spine_shear_x_timeline_apply(spine_shear_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_shear_x_timeline_set_frame(spine_shear_x_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_shear_x_timeline_get_rtti(); +SPINE_C_EXPORT void spine_shear_x_timeline_apply(spine_shear_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_shear_x_timeline_set_frame(spine_shear_x_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_shear_x_timeline_get_curve_value(spine_shear_x_timeline obj, float time); SPINE_C_EXPORT float spine_shear_x_timeline_get_relative_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_shear_x_timeline_get_absolute_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_shear_x_timeline_get_absolute_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_shear_x_timeline_get_absolute_value_6(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_shear_x_timeline_get_scale_value(spine_shear_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline obj); -SPINE_C_EXPORT void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline obj); +SPINE_C_EXPORT void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/shear_y_timeline.cpp b/spine-c-new/src/generated/shear_y_timeline.cpp index 374dc995f..3394cd704 100644 --- a/spine-c-new/src/generated/shear_y_timeline.cpp +++ b/spine-c-new/src/generated/shear_y_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_shear_y_timeline spine_shear_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_shear_y_timeline spine_shear_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { ShearYTimeline *obj = new (__FILE__, __LINE__) ShearYTimeline(frameCount, bezierCount, boneIndex); return (spine_shear_y_timeline) obj; } @@ -42,19 +42,17 @@ void spine_shear_y_timeline_dispose(spine_shear_y_timeline obj) { delete (ShearYTimeline *) obj; } -spine_rtti spine_shear_y_timeline_get_rtti(spine_shear_y_timeline obj) { - if (!obj) return nullptr; - ShearYTimeline *_obj = (ShearYTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_shear_y_timeline_get_rtti() { + return (spine_rtti) &ShearYTimeline::rtti; } -void spine_shear_y_timeline_apply(spine_shear_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_shear_y_timeline_apply(spine_shear_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; ShearYTimeline *_obj = (ShearYTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_shear_y_timeline_set_frame(spine_shear_y_timeline obj, spine_size_t frame, float time, float value) { +void spine_shear_y_timeline_set_frame(spine_shear_y_timeline obj, size_t frame, float time, float value) { if (!obj) return ; ShearYTimeline *_obj = (ShearYTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_shear_y_timeline_get_curve_value(spine_shear_y_timeline obj, float t float spine_shear_y_timeline_get_relative_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ShearYTimeline *_obj = (ShearYTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_shear_y_timeline_get_absolute_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; ShearYTimeline *_obj = (ShearYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_shear_y_timeline_get_absolute_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_shear_y_timeline_get_absolute_value_6(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; ShearYTimeline *_obj = (ShearYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_shear_y_timeline_get_scale_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; ShearYTimeline *_obj = (ShearYTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline obj) { +int spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline obj) { if (!obj) return 0; ShearYTimeline *_obj = (ShearYTimeline *) obj; return _obj->getBoneIndex(); } -void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline obj, int32_t value) { +void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline obj, int value) { if (!obj) return; ShearYTimeline *_obj = (ShearYTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/shear_y_timeline.h b/spine-c-new/src/generated/shear_y_timeline.h index 8d63d9a2a..9f840c483 100644 --- a/spine-c-new/src/generated/shear_y_timeline.h +++ b/spine-c-new/src/generated/shear_y_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_shear_y_timeline) - -SPINE_C_EXPORT spine_shear_y_timeline spine_shear_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_shear_y_timeline spine_shear_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_shear_y_timeline_dispose(spine_shear_y_timeline obj); -SPINE_C_EXPORT spine_rtti spine_shear_y_timeline_get_rtti(spine_shear_y_timeline obj); -SPINE_C_EXPORT void spine_shear_y_timeline_apply(spine_shear_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_shear_y_timeline_set_frame(spine_shear_y_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_shear_y_timeline_get_rtti(); +SPINE_C_EXPORT void spine_shear_y_timeline_apply(spine_shear_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_shear_y_timeline_set_frame(spine_shear_y_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_shear_y_timeline_get_curve_value(spine_shear_y_timeline obj, float time); SPINE_C_EXPORT float spine_shear_y_timeline_get_relative_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_shear_y_timeline_get_absolute_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_shear_y_timeline_get_absolute_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_shear_y_timeline_get_absolute_value_6(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_shear_y_timeline_get_scale_value(spine_shear_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline obj); -SPINE_C_EXPORT void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline obj); +SPINE_C_EXPORT void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/skeleton.cpp b/spine-c-new/src/generated/skeleton.cpp index 7b8e1230b..4c06f2e98 100644 --- a/spine-c-new/src/generated/skeleton.cpp +++ b/spine-c-new/src/generated/skeleton.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_skeleton spine_skeleton_create(spine_skeleton_data skeletonData) { - Skeleton *obj = new (__FILE__, __LINE__) Skeleton(skeletonData); + Skeleton *obj = new (__FILE__, __LINE__) Skeleton(*(SkeletonData*) skeletonData); return (spine_skeleton) obj; } @@ -42,10 +42,22 @@ void spine_skeleton_dispose(spine_skeleton obj) { delete (Skeleton *) obj; } +void spine_skeleton_update_cache(spine_skeleton obj) { + if (!obj) return ; + Skeleton *_obj = (Skeleton *) obj; + _obj->updateCache(); +} + +void spine_skeleton_print_update_cache(spine_skeleton obj) { + if (!obj) return ; + Skeleton *_obj = (Skeleton *) obj; + _obj->printUpdateCache(); +} + void spine_skeleton_constrained(spine_skeleton obj, spine_posed object) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; - _obj->constrained(object); + _obj->constrained(*(Posed*) object); } void spine_skeleton_sort_bone(spine_skeleton obj, spine_bone bone) { @@ -57,13 +69,13 @@ void spine_skeleton_sort_bone(spine_skeleton obj, spine_bone bone) { void spine_skeleton_update_world_transform(spine_skeleton obj, spine_physics physics) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; - _obj->updateWorldTransform(physics); + _obj->updateWorldTransform((Physics) physics); } -void spine_skeleton_update_world_transform(spine_skeleton obj, spine_physics physics, spine_bone_pose parent) { +void spine_skeleton_update_world_transform_2(spine_skeleton obj, spine_physics physics, spine_bone_pose parent) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; - _obj->updateWorldTransform(physics, (BonePose *) parent); + _obj->updateWorldTransform((Physics) physics, (BonePose *) parent); } void spine_skeleton_setup_pose(spine_skeleton obj) { @@ -85,17 +97,11 @@ void spine_skeleton_setup_pose_slots(spine_skeleton obj) { } spine_skeleton_data spine_skeleton_get_data(spine_skeleton obj) { - if (!obj) return nullptr; + if (!obj) return (spine_skeleton_data) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_skeleton_data) _obj->getData(); } -void * spine_skeleton_get_bones(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getBones(); -} - int32_t spine_skeleton_get_num_bones(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -108,12 +114,6 @@ spine_bone *spine_skeleton_get_bones(spine_skeleton obj) { return (spine_bone *) _obj->getBones().buffer(); } -void * spine_skeleton_get_update_cache(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getUpdateCache(); -} - int32_t spine_skeleton_get_num_update_cache(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -127,23 +127,17 @@ spine_update *spine_skeleton_get_update_cache(spine_skeleton obj) { } spine_bone spine_skeleton_get_root_bone(spine_skeleton obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_bone) _obj->getRootBone(); } -spine_bone spine_skeleton_find_bone(spine_skeleton obj, const utf8 * boneName) { - if (!obj) return nullptr; +spine_bone spine_skeleton_find_bone(spine_skeleton obj, const char* boneName) { + if (!obj) return (spine_bone) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_bone) _obj->findBone(String(boneName)); } -void * spine_skeleton_get_slots(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getSlots(); -} - int32_t spine_skeleton_get_num_slots(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -156,18 +150,12 @@ spine_slot *spine_skeleton_get_slots(spine_skeleton obj) { return (spine_slot *) _obj->getSlots().buffer(); } -spine_slot spine_skeleton_find_slot(spine_skeleton obj, const utf8 * slotName) { - if (!obj) return nullptr; +spine_slot spine_skeleton_find_slot(spine_skeleton obj, const char* slotName) { + if (!obj) return (spine_slot) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_slot) _obj->findSlot(String(slotName)); } -void * spine_skeleton_get_draw_order(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getDrawOrder(); -} - int32_t spine_skeleton_get_num_draw_order(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -181,12 +169,12 @@ spine_slot *spine_skeleton_get_draw_order(spine_skeleton obj) { } spine_skin spine_skeleton_get_skin(spine_skeleton obj) { - if (!obj) return nullptr; + if (!obj) return (spine_skin) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_skin) _obj->getSkin(); } -void spine_skeleton_set_skin(spine_skeleton obj, const utf8 * value) { +void spine_skeleton_set_skin(spine_skeleton obj, const char* value) { if (!obj) return; Skeleton *_obj = (Skeleton *) obj; _obj->setSkin(String(value)); @@ -198,30 +186,24 @@ void spine_skeleton_set_skin(spine_skeleton obj, spine_skin value) { _obj->setSkin((Skin *) value); } -spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, const utf8 * slotName, const utf8 * attachmentName) { - if (!obj) return nullptr; +spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, const char* slotName, const char* attachmentName) { + if (!obj) return (spine_attachment) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_attachment) _obj->getAttachment(String(slotName), String(attachmentName)); } -spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, int32_t slotIndex, const utf8 * attachmentName) { - if (!obj) return nullptr; +spine_attachment spine_skeleton_get_attachment_2(spine_skeleton obj, int slotIndex, const char* attachmentName) { + if (!obj) return (spine_attachment) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_attachment) _obj->getAttachment(slotIndex, String(attachmentName)); } -void spine_skeleton_set_attachment(spine_skeleton obj, const utf8 * slotName, const utf8 * attachmentName) { +void spine_skeleton_set_attachment(spine_skeleton obj, const char* slotName, const char* attachmentName) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; _obj->setAttachment(String(slotName), String(attachmentName)); } -void * spine_skeleton_get_constraints(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getConstraints(); -} - int32_t spine_skeleton_get_num_constraints(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -234,12 +216,6 @@ spine_constraint *spine_skeleton_get_constraints(spine_skeleton obj) { return (spine_constraint *) _obj->getConstraints().buffer(); } -void * spine_skeleton_get_physics_constraints(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (void *) _obj->getPhysicsConstraints(); -} - int32_t spine_skeleton_get_num_physics_constraints(spine_skeleton obj) { if (!obj) return 0; Skeleton *_obj = (Skeleton *) obj; @@ -252,20 +228,20 @@ spine_physics_constraint *spine_skeleton_get_physics_constraints(spine_skeleton return (spine_physics_constraint *) _obj->getPhysicsConstraints().buffer(); } -void spine_skeleton_get_bounds(spine_skeleton obj, float outX, float outY, float outWidth, float outHeight, void * outVertexBuffer) { +void spine_skeleton_get_bounds(spine_skeleton obj, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; - _obj->getBounds(outX, outY, outWidth, outHeight, (Vector &) outVertexBuffer); + _obj->getBounds(*outX, *outY, *outWidth, *outHeight, (Array &) outVertexBuffer); } -void spine_skeleton_get_bounds(spine_skeleton obj, float outX, float outY, float outWidth, float outHeight, void * outVertexBuffer, spine_skeleton_clipping clipper) { +void spine_skeleton_get_bounds_6(spine_skeleton obj, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer, spine_skeleton_clipping clipper) { if (!obj) return ; Skeleton *_obj = (Skeleton *) obj; - _obj->getBounds(outX, outY, outWidth, outHeight, (Vector &) outVertexBuffer, (SkeletonClipping *) clipper); + _obj->getBounds(*outX, *outY, *outWidth, *outHeight, (Array &) outVertexBuffer, (SkeletonClipping *) clipper); } spine_color spine_skeleton_get_color(spine_skeleton obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; Skeleton *_obj = (Skeleton *) obj; return (spine_color) &_obj->getColor(); } @@ -273,7 +249,7 @@ spine_color spine_skeleton_get_color(spine_skeleton obj) { void spine_skeleton_set_color(spine_skeleton obj, spine_color value) { if (!obj) return; Skeleton *_obj = (Skeleton *) obj; - _obj->setColor(value); + _obj->setColor(*((Color*) value)); } void spine_skeleton_set_color(spine_skeleton obj, float r, float g, float b, float a) { diff --git a/spine-c-new/src/generated/skeleton.h b/spine-c-new/src/generated/skeleton.h index d61de4c9a..b4784715a 100644 --- a/spine-c-new/src/generated/skeleton.h +++ b/spine-c-new/src/generated/skeleton.h @@ -34,49 +34,43 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton) +#include "types.h" SPINE_C_EXPORT spine_skeleton spine_skeleton_create(spine_skeleton_data skeletonData); SPINE_C_EXPORT void spine_skeleton_dispose(spine_skeleton obj); +SPINE_C_EXPORT void spine_skeleton_update_cache(spine_skeleton obj); +SPINE_C_EXPORT void spine_skeleton_print_update_cache(spine_skeleton obj); SPINE_C_EXPORT void spine_skeleton_constrained(spine_skeleton obj, spine_posed object); SPINE_C_EXPORT void spine_skeleton_sort_bone(spine_skeleton obj, spine_bone bone); SPINE_C_EXPORT void spine_skeleton_update_world_transform(spine_skeleton obj, spine_physics physics); -SPINE_C_EXPORT void spine_skeleton_update_world_transform(spine_skeleton obj, spine_physics physics, spine_bone_pose parent); +SPINE_C_EXPORT void spine_skeleton_update_world_transform_2(spine_skeleton obj, spine_physics physics, spine_bone_pose parent); SPINE_C_EXPORT void spine_skeleton_setup_pose(spine_skeleton obj); SPINE_C_EXPORT void spine_skeleton_setup_pose_bones(spine_skeleton obj); SPINE_C_EXPORT void spine_skeleton_setup_pose_slots(spine_skeleton obj); SPINE_C_EXPORT spine_skeleton_data spine_skeleton_get_data(spine_skeleton obj); -SPINE_C_EXPORT void * spine_skeleton_get_bones(spine_skeleton obj); SPINE_C_EXPORT int32_t spine_skeleton_get_num_bones(spine_skeleton obj); SPINE_C_EXPORT spine_bone *spine_skeleton_get_bones(spine_skeleton obj); -SPINE_C_EXPORT void * spine_skeleton_get_update_cache(spine_skeleton obj); SPINE_C_EXPORT int32_t spine_skeleton_get_num_update_cache(spine_skeleton obj); SPINE_C_EXPORT spine_update *spine_skeleton_get_update_cache(spine_skeleton obj); SPINE_C_EXPORT spine_bone spine_skeleton_get_root_bone(spine_skeleton obj); -SPINE_C_EXPORT spine_bone spine_skeleton_find_bone(spine_skeleton obj, const utf8 * boneName); -SPINE_C_EXPORT void * spine_skeleton_get_slots(spine_skeleton obj); +SPINE_C_EXPORT spine_bone spine_skeleton_find_bone(spine_skeleton obj, const char* boneName); SPINE_C_EXPORT int32_t spine_skeleton_get_num_slots(spine_skeleton obj); SPINE_C_EXPORT spine_slot *spine_skeleton_get_slots(spine_skeleton obj); -SPINE_C_EXPORT spine_slot spine_skeleton_find_slot(spine_skeleton obj, const utf8 * slotName); -SPINE_C_EXPORT void * spine_skeleton_get_draw_order(spine_skeleton obj); +SPINE_C_EXPORT spine_slot spine_skeleton_find_slot(spine_skeleton obj, const char* slotName); SPINE_C_EXPORT int32_t spine_skeleton_get_num_draw_order(spine_skeleton obj); SPINE_C_EXPORT spine_slot *spine_skeleton_get_draw_order(spine_skeleton obj); SPINE_C_EXPORT spine_skin spine_skeleton_get_skin(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_skin(spine_skeleton obj, const utf8 * value); +SPINE_C_EXPORT void spine_skeleton_set_skin(spine_skeleton obj, const char* value); SPINE_C_EXPORT void spine_skeleton_set_skin(spine_skeleton obj, spine_skin value); -SPINE_C_EXPORT spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, const utf8 * slotName, const utf8 * attachmentName); -SPINE_C_EXPORT spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, int32_t slotIndex, const utf8 * attachmentName); -SPINE_C_EXPORT void spine_skeleton_set_attachment(spine_skeleton obj, const utf8 * slotName, const utf8 * attachmentName); -SPINE_C_EXPORT void * spine_skeleton_get_constraints(spine_skeleton obj); +SPINE_C_EXPORT spine_attachment spine_skeleton_get_attachment(spine_skeleton obj, const char* slotName, const char* attachmentName); +SPINE_C_EXPORT spine_attachment spine_skeleton_get_attachment_2(spine_skeleton obj, int slotIndex, const char* attachmentName); +SPINE_C_EXPORT void spine_skeleton_set_attachment(spine_skeleton obj, const char* slotName, const char* attachmentName); SPINE_C_EXPORT int32_t spine_skeleton_get_num_constraints(spine_skeleton obj); SPINE_C_EXPORT spine_constraint *spine_skeleton_get_constraints(spine_skeleton obj); -SPINE_C_EXPORT void * spine_skeleton_get_physics_constraints(spine_skeleton obj); SPINE_C_EXPORT int32_t spine_skeleton_get_num_physics_constraints(spine_skeleton obj); SPINE_C_EXPORT spine_physics_constraint *spine_skeleton_get_physics_constraints(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_get_bounds(spine_skeleton obj, float outX, float outY, float outWidth, float outHeight, void * outVertexBuffer); -SPINE_C_EXPORT void spine_skeleton_get_bounds(spine_skeleton obj, float outX, float outY, float outWidth, float outHeight, void * outVertexBuffer, spine_skeleton_clipping clipper); +SPINE_C_EXPORT void spine_skeleton_get_bounds(spine_skeleton obj, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer); +SPINE_C_EXPORT void spine_skeleton_get_bounds_6(spine_skeleton obj, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer, spine_skeleton_clipping clipper); SPINE_C_EXPORT spine_color spine_skeleton_get_color(spine_skeleton obj); SPINE_C_EXPORT void spine_skeleton_set_color(spine_skeleton obj, spine_color value); SPINE_C_EXPORT void spine_skeleton_set_color(spine_skeleton obj, float r, float g, float b, float a); diff --git a/spine-c-new/src/generated/skeleton_binary.cpp b/spine-c-new/src/generated/skeleton_binary.cpp index 49d5aeaa1..0c955a3d9 100644 --- a/spine-c-new/src/generated/skeleton_binary.cpp +++ b/spine-c-new/src/generated/skeleton_binary.cpp @@ -37,7 +37,7 @@ spine_skeleton_binary spine_skeleton_binary_create(spine_atlas atlas) { return (spine_skeleton_binary) obj; } -spine_skeleton_binary spine_skeleton_binary_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, spine_bool ownsLoader) { +spine_skeleton_binary spine_skeleton_binary_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, bool ownsLoader) { SkeletonBinary *obj = new (__FILE__, __LINE__) SkeletonBinary((AttachmentLoader *) attachmentLoader, ownsLoader); return (spine_skeleton_binary) obj; } @@ -47,14 +47,14 @@ void spine_skeleton_binary_dispose(spine_skeleton_binary obj) { delete (SkeletonBinary *) obj; } -spine_skeleton_data spine_skeleton_binary_read_skeleton_data(spine_skeleton_binary obj, spine_const unsigned char binary, int32_t length) { - if (!obj) return nullptr; +spine_skeleton_data spine_skeleton_binary_read_skeleton_data(spine_skeleton_binary obj, const unsigned char * binary, int length) { + if (!obj) return (spine_skeleton_data) 0; SkeletonBinary *_obj = (SkeletonBinary *) obj; return (spine_skeleton_data) _obj->readSkeletonData((const unsigned char *) binary, length); } -spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary obj, const utf8 * path) { - if (!obj) return nullptr; +spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary obj, const char* path) { + if (!obj) return (spine_skeleton_data) 0; SkeletonBinary *_obj = (SkeletonBinary *) obj; return (spine_skeleton_data) _obj->readSkeletonDataFile(String(path)); } @@ -65,8 +65,8 @@ void spine_skeleton_binary_set_scale(spine_skeleton_binary obj, float value) { _obj->setScale(value); } -const utf8 * spine_skeleton_binary_get_error(spine_skeleton_binary obj) { +const char* spine_skeleton_binary_get_error(spine_skeleton_binary obj) { if (!obj) return nullptr; SkeletonBinary *_obj = (SkeletonBinary *) obj; - return (const utf8 *) _obj->getError().buffer(); + return (const char *) _obj->getError().buffer(); } diff --git a/spine-c-new/src/generated/skeleton_binary.h b/spine-c-new/src/generated/skeleton_binary.h index fadd2e4c8..d4395a4d1 100644 --- a/spine-c-new/src/generated/skeleton_binary.h +++ b/spine-c-new/src/generated/skeleton_binary.h @@ -34,17 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton_binary) +#include "types.h" SPINE_C_EXPORT spine_skeleton_binary spine_skeleton_binary_create(spine_atlas atlas); -SPINE_C_EXPORT spine_skeleton_binary spine_skeleton_binary_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, spine_bool ownsLoader); +SPINE_C_EXPORT spine_skeleton_binary spine_skeleton_binary_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, bool ownsLoader); SPINE_C_EXPORT void spine_skeleton_binary_dispose(spine_skeleton_binary obj); -SPINE_C_EXPORT spine_skeleton_data spine_skeleton_binary_read_skeleton_data(spine_skeleton_binary obj, spine_const unsigned char binary, int32_t length); -SPINE_C_EXPORT spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary obj, const utf8 * path); +SPINE_C_EXPORT spine_skeleton_data spine_skeleton_binary_read_skeleton_data(spine_skeleton_binary obj, const unsigned char * binary, int length); +SPINE_C_EXPORT spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary obj, const char* path); SPINE_C_EXPORT void spine_skeleton_binary_set_scale(spine_skeleton_binary obj, float value); -SPINE_C_EXPORT const utf8 * spine_skeleton_binary_get_error(spine_skeleton_binary obj); +SPINE_C_EXPORT const char* spine_skeleton_binary_get_error(spine_skeleton_binary obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/skeleton_bounds.cpp b/spine-c-new/src/generated/skeleton_bounds.cpp index 619a09994..9292fcfba 100644 --- a/spine-c-new/src/generated/skeleton_bounds.cpp +++ b/spine-c-new/src/generated/skeleton_bounds.cpp @@ -42,72 +42,66 @@ void spine_skeleton_bounds_dispose(spine_skeleton_bounds obj) { delete (SkeletonBounds *) obj; } -void spine_skeleton_bounds_update(spine_skeleton_bounds obj, spine_skeleton skeleton, spine_bool updateAabb) { +void spine_skeleton_bounds_update(spine_skeleton_bounds obj, spine_skeleton skeleton, bool updateAabb) { if (!obj) return ; SkeletonBounds *_obj = (SkeletonBounds *) obj; - _obj->update(skeleton, updateAabb); + _obj->update(*(Skeleton*) skeleton, updateAabb); } -spine_bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds obj, float x, float y) { - if (!obj) return 0; +bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds obj, float x, float y) { + if (!obj) return false; SkeletonBounds *_obj = (SkeletonBounds *) obj; return _obj->aabbContainsPoint(x, y); } -spine_bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2) { - if (!obj) return 0; +bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2) { + if (!obj) return false; SkeletonBounds *_obj = (SkeletonBounds *) obj; return _obj->aabbIntersectsSegment(x1, y1, x2, y2); } -spine_bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds obj, spine_skeleton_bounds bounds) { - if (!obj) return 0; +bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds obj, spine_skeleton_bounds bounds) { + if (!obj) return false; SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->aabbIntersectsSkeleton(bounds); + return _obj->aabbIntersectsSkeleton(*(SkeletonBounds*) bounds); } -spine_bool spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, spine_polygon polygon, float x, float y) { - if (!obj) return 0; +bool spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, spine_polygon polygon, float x, float y) { + if (!obj) return false; SkeletonBounds *_obj = (SkeletonBounds *) obj; return _obj->containsPoint((Polygon *) polygon, x, y); } -spine_bounding_box_attachment spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, float x, float y) { - if (!obj) return nullptr; +spine_bounding_box_attachment spine_skeleton_bounds_contains_point_2(spine_skeleton_bounds obj, float x, float y) { + if (!obj) return (spine_bounding_box_attachment) 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; return (spine_bounding_box_attachment) _obj->containsPoint(x, y); } spine_bounding_box_attachment spine_skeleton_bounds_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2) { - if (!obj) return nullptr; + if (!obj) return (spine_bounding_box_attachment) 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; return (spine_bounding_box_attachment) _obj->intersectsSegment(x1, y1, x2, y2); } -spine_bool spine_skeleton_bounds_intersects_segment(spine_skeleton_bounds obj, spine_polygon polygon, float x1, float y1, float x2, float y2) { - if (!obj) return 0; +bool spine_skeleton_bounds_intersects_segment_5(spine_skeleton_bounds obj, spine_polygon polygon, float x1, float y1, float x2, float y2) { + if (!obj) return false; SkeletonBounds *_obj = (SkeletonBounds *) obj; return _obj->intersectsSegment((Polygon *) polygon, x1, y1, x2, y2); } spine_polygon spine_skeleton_bounds_get_polygon(spine_skeleton_bounds obj, spine_bounding_box_attachment attachment) { - if (!obj) return nullptr; + if (!obj) return (spine_polygon) 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; return (spine_polygon) _obj->getPolygon((BoundingBoxAttachment *) attachment); } spine_bounding_box_attachment spine_skeleton_bounds_get_bounding_box(spine_skeleton_bounds obj, spine_polygon polygon) { - if (!obj) return nullptr; + if (!obj) return (spine_bounding_box_attachment) 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; return (spine_bounding_box_attachment) _obj->getBoundingBox((Polygon *) polygon); } -void * spine_skeleton_bounds_get_polygons(spine_skeleton_bounds obj) { - if (!obj) return nullptr; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (void *) _obj->getPolygons(); -} - int32_t spine_skeleton_bounds_get_num_polygons(spine_skeleton_bounds obj) { if (!obj) return 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; @@ -120,12 +114,6 @@ spine_polygon *spine_skeleton_bounds_get_polygons(spine_skeleton_bounds obj) { return (spine_polygon *) _obj->getPolygons().buffer(); } -void * spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds obj) { - if (!obj) return nullptr; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (void *) _obj->getBoundingBoxes(); -} - int32_t spine_skeleton_bounds_get_num_bounding_boxes(spine_skeleton_bounds obj) { if (!obj) return 0; SkeletonBounds *_obj = (SkeletonBounds *) obj; diff --git a/spine-c-new/src/generated/skeleton_bounds.h b/spine-c-new/src/generated/skeleton_bounds.h index 719ff2037..57c49e02d 100644 --- a/spine-c-new/src/generated/skeleton_bounds.h +++ b/spine-c-new/src/generated/skeleton_bounds.h @@ -34,26 +34,22 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton_bounds) +#include "types.h" SPINE_C_EXPORT spine_skeleton_bounds spine_skeleton_bounds_create(void); SPINE_C_EXPORT void spine_skeleton_bounds_dispose(spine_skeleton_bounds obj); -SPINE_C_EXPORT void spine_skeleton_bounds_update(spine_skeleton_bounds obj, spine_skeleton skeleton, spine_bool updateAabb); -SPINE_C_EXPORT spine_bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds obj, float x, float y); -SPINE_C_EXPORT spine_bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2); -SPINE_C_EXPORT spine_bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds obj, spine_skeleton_bounds bounds); -SPINE_C_EXPORT spine_bool spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, spine_polygon polygon, float x, float y); -SPINE_C_EXPORT spine_bounding_box_attachment spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, float x, float y); +SPINE_C_EXPORT void spine_skeleton_bounds_update(spine_skeleton_bounds obj, spine_skeleton skeleton, bool updateAabb); +SPINE_C_EXPORT bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds obj, float x, float y); +SPINE_C_EXPORT bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2); +SPINE_C_EXPORT bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds obj, spine_skeleton_bounds bounds); +SPINE_C_EXPORT bool spine_skeleton_bounds_contains_point(spine_skeleton_bounds obj, spine_polygon polygon, float x, float y); +SPINE_C_EXPORT spine_bounding_box_attachment spine_skeleton_bounds_contains_point_2(spine_skeleton_bounds obj, float x, float y); SPINE_C_EXPORT spine_bounding_box_attachment spine_skeleton_bounds_intersects_segment(spine_skeleton_bounds obj, float x1, float y1, float x2, float y2); -SPINE_C_EXPORT spine_bool spine_skeleton_bounds_intersects_segment(spine_skeleton_bounds obj, spine_polygon polygon, float x1, float y1, float x2, float y2); +SPINE_C_EXPORT bool spine_skeleton_bounds_intersects_segment_5(spine_skeleton_bounds obj, spine_polygon polygon, float x1, float y1, float x2, float y2); SPINE_C_EXPORT spine_polygon spine_skeleton_bounds_get_polygon(spine_skeleton_bounds obj, spine_bounding_box_attachment attachment); SPINE_C_EXPORT spine_bounding_box_attachment spine_skeleton_bounds_get_bounding_box(spine_skeleton_bounds obj, spine_polygon polygon); -SPINE_C_EXPORT void * spine_skeleton_bounds_get_polygons(spine_skeleton_bounds obj); SPINE_C_EXPORT int32_t spine_skeleton_bounds_get_num_polygons(spine_skeleton_bounds obj); SPINE_C_EXPORT spine_polygon *spine_skeleton_bounds_get_polygons(spine_skeleton_bounds obj); -SPINE_C_EXPORT void * spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds obj); SPINE_C_EXPORT int32_t spine_skeleton_bounds_get_num_bounding_boxes(spine_skeleton_bounds obj); SPINE_C_EXPORT spine_bounding_box_attachment *spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds obj); SPINE_C_EXPORT float spine_skeleton_bounds_get_min_x(spine_skeleton_bounds obj); diff --git a/spine-c-new/src/generated/skeleton_data.cpp b/spine-c-new/src/generated/skeleton_data.cpp index f6508efa6..e348988f1 100644 --- a/spine-c-new/src/generated/skeleton_data.cpp +++ b/spine-c-new/src/generated/skeleton_data.cpp @@ -42,70 +42,70 @@ void spine_skeleton_data_dispose(spine_skeleton_data obj) { delete (SkeletonData *) obj; } -spine_bone_data spine_skeleton_data_find_bone(spine_skeleton_data obj, const utf8 * boneName) { - if (!obj) return nullptr; +spine_bone_data spine_skeleton_data_find_bone(spine_skeleton_data obj, const char* boneName) { + if (!obj) return (spine_bone_data) 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_bone_data) _obj->findBone(String(boneName)); } -spine_slot_data spine_skeleton_data_find_slot(spine_skeleton_data obj, const utf8 * slotName) { - if (!obj) return nullptr; +spine_slot_data spine_skeleton_data_find_slot(spine_skeleton_data obj, const char* slotName) { + if (!obj) return (spine_slot_data) 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_slot_data) _obj->findSlot(String(slotName)); } -spine_skin spine_skeleton_data_find_skin(spine_skeleton_data obj, const utf8 * skinName) { - if (!obj) return nullptr; +spine_skin spine_skeleton_data_find_skin(spine_skeleton_data obj, const char* skinName) { + if (!obj) return (spine_skin) 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_skin) _obj->findSkin(String(skinName)); } -spine_spine::event_data spine_skeleton_data_find_event(spine_skeleton_data obj, const utf8 * eventDataName) { - if (!obj) return nullptr; +spine_event_data spine_skeleton_data_find_event(spine_skeleton_data obj, const char* eventDataName) { + if (!obj) return (spine_event_data) 0; SkeletonData *_obj = (SkeletonData *) obj; - return (spine_spine::event_data) _obj->findEvent(String(eventDataName)); + return (spine_event_data) _obj->findEvent(String(eventDataName)); } -spine_animation spine_skeleton_data_find_animation(spine_skeleton_data obj, const utf8 * animationName) { - if (!obj) return nullptr; +spine_animation spine_skeleton_data_find_animation(spine_skeleton_data obj, const char* animationName) { + if (!obj) return (spine_animation) 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_animation) _obj->findAnimation(String(animationName)); } -spine_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data obj, const utf8 * constraintName) { +spine_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data obj, const char* constraintName) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_ik_constraint_data) _obj->findIkConstraint(String(constraintName)); } -spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data obj, const utf8 * constraintName) { +spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data obj, const char* constraintName) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_transform_constraint_data) _obj->findTransformConstraint(String(constraintName)); } -spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data obj, const utf8 * constraintName) { +spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data obj, const char* constraintName) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_path_constraint_data) _obj->findPathConstraint(String(constraintName)); } -spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data obj, const utf8 * constraintName) { +spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data obj, const char* constraintName) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_physics_constraint_data) _obj->findPhysicsConstraint(String(constraintName)); } -const utf8 * spine_skeleton_data_get_name(spine_skeleton_data obj) { +const char* spine_skeleton_data_get_name(spine_skeleton_data obj) { if (!obj) return nullptr; SkeletonData *_obj = (SkeletonData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -void * spine_skeleton_data_get_bones(spine_skeleton_data obj) { - if (!obj) return nullptr; +void spine_skeleton_data_set_name(spine_skeleton_data obj, const char* value) { + if (!obj) return; SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getBones(); + _obj->setName(String(value)); } int32_t spine_skeleton_data_get_num_bones(spine_skeleton_data obj) { @@ -120,12 +120,6 @@ spine_bone_data *spine_skeleton_data_get_bones(spine_skeleton_data obj) { return (spine_bone_data *) _obj->getBones().buffer(); } -void * spine_skeleton_data_get_slots(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getSlots(); -} - int32_t spine_skeleton_data_get_num_slots(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -138,12 +132,6 @@ spine_slot_data *spine_skeleton_data_get_slots(spine_skeleton_data obj) { return (spine_slot_data *) _obj->getSlots().buffer(); } -void * spine_skeleton_data_get_skins(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getSkins(); -} - int32_t spine_skeleton_data_get_num_skins(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -157,7 +145,7 @@ spine_skin *spine_skeleton_data_get_skins(spine_skeleton_data obj) { } spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_skin) 0; SkeletonData *_obj = (SkeletonData *) obj; return (spine_skin) _obj->getDefaultSkin(); } @@ -168,28 +156,16 @@ void spine_skeleton_data_set_default_skin(spine_skeleton_data obj, spine_skin va _obj->setDefaultSkin((Skin *) value); } -void * spine_skeleton_data_get_events(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getEvents(); -} - int32_t spine_skeleton_data_get_num_events(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; return (int32_t) _obj->getEvents().size(); } -spine_spine::event_data *spine_skeleton_data_get_events(spine_skeleton_data obj) { +spine_event_data *spine_skeleton_data_get_events(spine_skeleton_data obj) { if (!obj) return nullptr; SkeletonData *_obj = (SkeletonData *) obj; - return (spine_spine::event_data *) _obj->getEvents().buffer(); -} - -void * spine_skeleton_data_get_animations(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getAnimations(); + return (spine_event_data *) _obj->getEvents().buffer(); } int32_t spine_skeleton_data_get_num_animations(spine_skeleton_data obj) { @@ -204,12 +180,6 @@ spine_animation *spine_skeleton_data_get_animations(spine_skeleton_data obj) { return (spine_animation *) _obj->getAnimations().buffer(); } -void * spine_skeleton_data_get_ik_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getIkConstraints(); -} - int32_t spine_skeleton_data_get_num_ik_constraints(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -222,12 +192,6 @@ spine_ik_constraint_data *spine_skeleton_data_get_ik_constraints(spine_skeleton_ return (spine_ik_constraint_data *) _obj->getIkConstraints().buffer(); } -void * spine_skeleton_data_get_transform_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getTransformConstraints(); -} - int32_t spine_skeleton_data_get_num_transform_constraints(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -240,12 +204,6 @@ spine_transform_constraint_data *spine_skeleton_data_get_transform_constraints(s return (spine_transform_constraint_data *) _obj->getTransformConstraints().buffer(); } -void * spine_skeleton_data_get_path_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getPathConstraints(); -} - int32_t spine_skeleton_data_get_num_path_constraints(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -258,12 +216,6 @@ spine_path_constraint_data *spine_skeleton_data_get_path_constraints(spine_skele return (spine_path_constraint_data *) _obj->getPathConstraints().buffer(); } -void * spine_skeleton_data_get_physics_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getPhysicsConstraints(); -} - int32_t spine_skeleton_data_get_num_physics_constraints(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -276,12 +228,6 @@ spine_physics_constraint_data *spine_skeleton_data_get_physics_constraints(spine return (spine_physics_constraint_data *) _obj->getPhysicsConstraints().buffer(); } -void * spine_skeleton_data_get_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (void *) _obj->getConstraints(); -} - int32_t spine_skeleton_data_get_num_constraints(spine_skeleton_data obj) { if (!obj) return 0; SkeletonData *_obj = (SkeletonData *) obj; @@ -354,28 +300,52 @@ void spine_skeleton_data_set_reference_scale(spine_skeleton_data obj, float valu _obj->setReferenceScale(value); } -const utf8 * spine_skeleton_data_get_version(spine_skeleton_data obj) { +const char* spine_skeleton_data_get_version(spine_skeleton_data obj) { if (!obj) return nullptr; SkeletonData *_obj = (SkeletonData *) obj; - return (const utf8 *) _obj->getVersion().buffer(); + return (const char *) _obj->getVersion().buffer(); } -const utf8 * spine_skeleton_data_get_hash(spine_skeleton_data obj) { - if (!obj) return nullptr; +void spine_skeleton_data_set_version(spine_skeleton_data obj, const char* value) { + if (!obj) return; SkeletonData *_obj = (SkeletonData *) obj; - return (const utf8 *) _obj->getHash().buffer(); + _obj->setVersion(String(value)); } -const utf8 * spine_skeleton_data_get_images_path(spine_skeleton_data obj) { +const char* spine_skeleton_data_get_hash(spine_skeleton_data obj) { if (!obj) return nullptr; SkeletonData *_obj = (SkeletonData *) obj; - return (const utf8 *) _obj->getImagesPath().buffer(); + return (const char *) _obj->getHash().buffer(); } -const utf8 * spine_skeleton_data_get_audio_path(spine_skeleton_data obj) { +void spine_skeleton_data_set_hash(spine_skeleton_data obj, const char* value) { + if (!obj) return; + SkeletonData *_obj = (SkeletonData *) obj; + _obj->setHash(String(value)); +} + +const char* spine_skeleton_data_get_images_path(spine_skeleton_data obj) { if (!obj) return nullptr; SkeletonData *_obj = (SkeletonData *) obj; - return (const utf8 *) _obj->getAudioPath().buffer(); + return (const char *) _obj->getImagesPath().buffer(); +} + +void spine_skeleton_data_set_images_path(spine_skeleton_data obj, const char* value) { + if (!obj) return; + SkeletonData *_obj = (SkeletonData *) obj; + _obj->setImagesPath(String(value)); +} + +const char* spine_skeleton_data_get_audio_path(spine_skeleton_data obj) { + if (!obj) return nullptr; + SkeletonData *_obj = (SkeletonData *) obj; + return (const char *) _obj->getAudioPath().buffer(); +} + +void spine_skeleton_data_set_audio_path(spine_skeleton_data obj, const char* value) { + if (!obj) return; + SkeletonData *_obj = (SkeletonData *) obj; + _obj->setAudioPath(String(value)); } float spine_skeleton_data_get_fps(spine_skeleton_data obj) { @@ -383,3 +353,9 @@ float spine_skeleton_data_get_fps(spine_skeleton_data obj) { SkeletonData *_obj = (SkeletonData *) obj; return _obj->getFps(); } + +void spine_skeleton_data_set_fps(spine_skeleton_data obj, float value) { + if (!obj) return; + SkeletonData *_obj = (SkeletonData *) obj; + _obj->setFps(value); +} diff --git a/spine-c-new/src/generated/skeleton_data.h b/spine-c-new/src/generated/skeleton_data.h index 367051a83..62270f0e4 100644 --- a/spine-c-new/src/generated/skeleton_data.h +++ b/spine-c-new/src/generated/skeleton_data.h @@ -34,52 +34,41 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton_data) +#include "types.h" SPINE_C_EXPORT spine_skeleton_data spine_skeleton_data_create(void); SPINE_C_EXPORT void spine_skeleton_data_dispose(spine_skeleton_data obj); -SPINE_C_EXPORT spine_bone_data spine_skeleton_data_find_bone(spine_skeleton_data obj, const utf8 * boneName); -SPINE_C_EXPORT spine_slot_data spine_skeleton_data_find_slot(spine_skeleton_data obj, const utf8 * slotName); -SPINE_C_EXPORT spine_skin spine_skeleton_data_find_skin(spine_skeleton_data obj, const utf8 * skinName); -SPINE_C_EXPORT spine_spine::event_data spine_skeleton_data_find_event(spine_skeleton_data obj, const utf8 * eventDataName); -SPINE_C_EXPORT spine_animation spine_skeleton_data_find_animation(spine_skeleton_data obj, const utf8 * animationName); -SPINE_C_EXPORT spine_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data obj, const utf8 * constraintName); -SPINE_C_EXPORT spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data obj, const utf8 * constraintName); -SPINE_C_EXPORT spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data obj, const utf8 * constraintName); -SPINE_C_EXPORT spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data obj, const utf8 * constraintName); -SPINE_C_EXPORT const utf8 * spine_skeleton_data_get_name(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_bones(spine_skeleton_data obj); +SPINE_C_EXPORT spine_bone_data spine_skeleton_data_find_bone(spine_skeleton_data obj, const char* boneName); +SPINE_C_EXPORT spine_slot_data spine_skeleton_data_find_slot(spine_skeleton_data obj, const char* slotName); +SPINE_C_EXPORT spine_skin spine_skeleton_data_find_skin(spine_skeleton_data obj, const char* skinName); +SPINE_C_EXPORT spine_event_data spine_skeleton_data_find_event(spine_skeleton_data obj, const char* eventDataName); +SPINE_C_EXPORT spine_animation spine_skeleton_data_find_animation(spine_skeleton_data obj, const char* animationName); +SPINE_C_EXPORT spine_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data obj, const char* constraintName); +SPINE_C_EXPORT spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data obj, const char* constraintName); +SPINE_C_EXPORT spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data obj, const char* constraintName); +SPINE_C_EXPORT spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data obj, const char* constraintName); +SPINE_C_EXPORT const char* spine_skeleton_data_get_name(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_name(spine_skeleton_data obj, const char* value); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_bones(spine_skeleton_data obj); SPINE_C_EXPORT spine_bone_data *spine_skeleton_data_get_bones(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_slots(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_slots(spine_skeleton_data obj); SPINE_C_EXPORT spine_slot_data *spine_skeleton_data_get_slots(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_skins(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_skins(spine_skeleton_data obj); SPINE_C_EXPORT spine_skin *spine_skeleton_data_get_skins(spine_skeleton_data obj); SPINE_C_EXPORT spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data obj); SPINE_C_EXPORT void spine_skeleton_data_set_default_skin(spine_skeleton_data obj, spine_skin value); -SPINE_C_EXPORT void * spine_skeleton_data_get_events(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_events(spine_skeleton_data obj); -SPINE_C_EXPORT spine_spine::event_data *spine_skeleton_data_get_events(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_animations(spine_skeleton_data obj); +SPINE_C_EXPORT spine_event_data *spine_skeleton_data_get_events(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_animations(spine_skeleton_data obj); SPINE_C_EXPORT spine_animation *spine_skeleton_data_get_animations(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_ik_constraints(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_ik_constraints(spine_skeleton_data obj); SPINE_C_EXPORT spine_ik_constraint_data *spine_skeleton_data_get_ik_constraints(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_transform_constraints(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_transform_constraints(spine_skeleton_data obj); SPINE_C_EXPORT spine_transform_constraint_data *spine_skeleton_data_get_transform_constraints(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_path_constraints(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_path_constraints(spine_skeleton_data obj); SPINE_C_EXPORT spine_path_constraint_data *spine_skeleton_data_get_path_constraints(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_physics_constraints(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_physics_constraints(spine_skeleton_data obj); SPINE_C_EXPORT spine_physics_constraint_data *spine_skeleton_data_get_physics_constraints(spine_skeleton_data obj); -SPINE_C_EXPORT void * spine_skeleton_data_get_constraints(spine_skeleton_data obj); SPINE_C_EXPORT int32_t spine_skeleton_data_get_num_constraints(spine_skeleton_data obj); SPINE_C_EXPORT spine_constraint_data *spine_skeleton_data_get_constraints(spine_skeleton_data obj); SPINE_C_EXPORT float spine_skeleton_data_get_x(spine_skeleton_data obj); @@ -92,11 +81,16 @@ SPINE_C_EXPORT float spine_skeleton_data_get_height(spine_skeleton_data obj); SPINE_C_EXPORT void spine_skeleton_data_set_height(spine_skeleton_data obj, float value); SPINE_C_EXPORT float spine_skeleton_data_get_reference_scale(spine_skeleton_data obj); SPINE_C_EXPORT void spine_skeleton_data_set_reference_scale(spine_skeleton_data obj, float value); -SPINE_C_EXPORT const utf8 * spine_skeleton_data_get_version(spine_skeleton_data obj); -SPINE_C_EXPORT const utf8 * spine_skeleton_data_get_hash(spine_skeleton_data obj); -SPINE_C_EXPORT const utf8 * spine_skeleton_data_get_images_path(spine_skeleton_data obj); -SPINE_C_EXPORT const utf8 * spine_skeleton_data_get_audio_path(spine_skeleton_data obj); +SPINE_C_EXPORT const char* spine_skeleton_data_get_version(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_version(spine_skeleton_data obj, const char* value); +SPINE_C_EXPORT const char* spine_skeleton_data_get_hash(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_hash(spine_skeleton_data obj, const char* value); +SPINE_C_EXPORT const char* spine_skeleton_data_get_images_path(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_images_path(spine_skeleton_data obj, const char* value); +SPINE_C_EXPORT const char* spine_skeleton_data_get_audio_path(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_audio_path(spine_skeleton_data obj, const char* value); SPINE_C_EXPORT float spine_skeleton_data_get_fps(spine_skeleton_data obj); +SPINE_C_EXPORT void spine_skeleton_data_set_fps(spine_skeleton_data obj, float value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/skeleton_json.cpp b/spine-c-new/src/generated/skeleton_json.cpp index 96a0e1402..a1838be9d 100644 --- a/spine-c-new/src/generated/skeleton_json.cpp +++ b/spine-c-new/src/generated/skeleton_json.cpp @@ -37,7 +37,7 @@ spine_skeleton_json spine_skeleton_json_create(spine_atlas atlas) { return (spine_skeleton_json) obj; } -spine_skeleton_json spine_skeleton_json_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, spine_bool ownsLoader) { +spine_skeleton_json spine_skeleton_json_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, bool ownsLoader) { SkeletonJson *obj = new (__FILE__, __LINE__) SkeletonJson((AttachmentLoader *) attachmentLoader, ownsLoader); return (spine_skeleton_json) obj; } @@ -47,14 +47,14 @@ void spine_skeleton_json_dispose(spine_skeleton_json obj) { delete (SkeletonJson *) obj; } -spine_skeleton_data spine_skeleton_json_read_skeleton_data_file(spine_skeleton_json obj, const utf8 * path) { - if (!obj) return nullptr; +spine_skeleton_data spine_skeleton_json_read_skeleton_data_file(spine_skeleton_json obj, const char* path) { + if (!obj) return (spine_skeleton_data) 0; SkeletonJson *_obj = (SkeletonJson *) obj; return (spine_skeleton_data) _obj->readSkeletonDataFile(String(path)); } -spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json obj, const utf8 * json) { - if (!obj) return nullptr; +spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json obj, const char * json) { + if (!obj) return (spine_skeleton_data) 0; SkeletonJson *_obj = (SkeletonJson *) obj; return (spine_skeleton_data) _obj->readSkeletonData((const char *) json); } @@ -65,8 +65,8 @@ void spine_skeleton_json_set_scale(spine_skeleton_json obj, float value) { _obj->setScale(value); } -const utf8 * spine_skeleton_json_get_error(spine_skeleton_json obj) { +const char* spine_skeleton_json_get_error(spine_skeleton_json obj) { if (!obj) return nullptr; SkeletonJson *_obj = (SkeletonJson *) obj; - return (const utf8 *) _obj->getError().buffer(); + return (const char *) _obj->getError().buffer(); } diff --git a/spine-c-new/src/generated/skeleton_json.h b/spine-c-new/src/generated/skeleton_json.h index 59783b324..38f23aa3b 100644 --- a/spine-c-new/src/generated/skeleton_json.h +++ b/spine-c-new/src/generated/skeleton_json.h @@ -34,17 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton_json) +#include "types.h" SPINE_C_EXPORT spine_skeleton_json spine_skeleton_json_create(spine_atlas atlas); -SPINE_C_EXPORT spine_skeleton_json spine_skeleton_json_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, spine_bool ownsLoader); +SPINE_C_EXPORT spine_skeleton_json spine_skeleton_json_create_with_attachment_loader_bool(spine_attachment_loader attachmentLoader, bool ownsLoader); SPINE_C_EXPORT void spine_skeleton_json_dispose(spine_skeleton_json obj); -SPINE_C_EXPORT spine_skeleton_data spine_skeleton_json_read_skeleton_data_file(spine_skeleton_json obj, const utf8 * path); -SPINE_C_EXPORT spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json obj, const utf8 * json); +SPINE_C_EXPORT spine_skeleton_data spine_skeleton_json_read_skeleton_data_file(spine_skeleton_json obj, const char* path); +SPINE_C_EXPORT spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json obj, const char * json); SPINE_C_EXPORT void spine_skeleton_json_set_scale(spine_skeleton_json obj, float value); -SPINE_C_EXPORT const utf8 * spine_skeleton_json_get_error(spine_skeleton_json obj); +SPINE_C_EXPORT const char* spine_skeleton_json_get_error(spine_skeleton_json obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/skeleton_renderer.cpp b/spine-c-new/src/generated/skeleton_renderer.cpp index 1f9844b79..ed9b5e72e 100644 --- a/spine-c-new/src/generated/skeleton_renderer.cpp +++ b/spine-c-new/src/generated/skeleton_renderer.cpp @@ -43,7 +43,7 @@ void spine_skeleton_renderer_dispose(spine_skeleton_renderer obj) { } spine_render_command spine_skeleton_renderer_render(spine_skeleton_renderer obj, spine_skeleton skeleton) { - if (!obj) return nullptr; + if (!obj) return (spine_render_command) 0; SkeletonRenderer *_obj = (SkeletonRenderer *) obj; - return (spine_render_command) _obj->render(skeleton); + return (spine_render_command) _obj->render(*(Skeleton*) skeleton); } diff --git a/spine-c-new/src/generated/skeleton_renderer.h b/spine-c-new/src/generated/skeleton_renderer.h index 8289796d3..0683792e2 100644 --- a/spine-c-new/src/generated/skeleton_renderer.h +++ b/spine-c-new/src/generated/skeleton_renderer.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_skeleton_renderer) +#include "types.h" SPINE_C_EXPORT spine_skeleton_renderer spine_skeleton_renderer_create(void); SPINE_C_EXPORT void spine_skeleton_renderer_dispose(spine_skeleton_renderer obj); diff --git a/spine-c-new/src/generated/skin.cpp b/spine-c-new/src/generated/skin.cpp index ca6e614e2..e80b0a1f1 100644 --- a/spine-c-new/src/generated/skin.cpp +++ b/spine-c-new/src/generated/skin.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_skin spine_skin_create(const utf8 * name) { +spine_skin spine_skin_create(const char* name) { Skin *obj = new (__FILE__, __LINE__) Skin(String(name)); return (spine_skin) obj; } @@ -42,40 +42,40 @@ void spine_skin_dispose(spine_skin obj) { delete (Skin *) obj; } -void spine_skin_set_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name, spine_attachment attachment) { +void spine_skin_set_attachment(spine_skin obj, size_t slotIndex, const char* name, spine_attachment attachment) { if (!obj) return ; Skin *_obj = (Skin *) obj; _obj->setAttachment(slotIndex, String(name), (Attachment *) attachment); } -spine_attachment spine_skin_get_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name) { - if (!obj) return nullptr; +spine_attachment spine_skin_get_attachment(spine_skin obj, size_t slotIndex, const char* name) { + if (!obj) return (spine_attachment) 0; Skin *_obj = (Skin *) obj; return (spine_attachment) _obj->getAttachment(slotIndex, String(name)); } -void spine_skin_remove_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name) { +void spine_skin_remove_attachment(spine_skin obj, size_t slotIndex, const char* name) { if (!obj) return ; Skin *_obj = (Skin *) obj; _obj->removeAttachment(slotIndex, String(name)); } -void spine_skin_find_names_for_slot(spine_skin obj, spine_size_t slotIndex, void * names) { +void spine_skin_find_names_for_slot(spine_skin obj, size_t slotIndex, spine_array_string names) { if (!obj) return ; Skin *_obj = (Skin *) obj; - _obj->findNamesForSlot(slotIndex, (Vector &) names); + _obj->findNamesForSlot(slotIndex, (Array &) names); } -void spine_skin_find_attachments_for_slot(spine_skin obj, spine_size_t slotIndex, void * attachments) { +void spine_skin_find_attachments_for_slot(spine_skin obj, size_t slotIndex, spine_array_attachment attachments) { if (!obj) return ; Skin *_obj = (Skin *) obj; - _obj->findAttachmentsForSlot(slotIndex, (Vector &) attachments); + _obj->findAttachmentsForSlot(slotIndex, (Array &) attachments); } -const utf8 * spine_skin_get_name(spine_skin obj) { +const char* spine_skin_get_name(spine_skin obj) { if (!obj) return nullptr; Skin *_obj = (Skin *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } void spine_skin_add_skin(spine_skin obj, spine_skin other) { @@ -90,18 +90,6 @@ void spine_skin_copy_skin(spine_skin obj, spine_skin other) { _obj->copySkin((Skin *) other); } -spine_attachment_map::entries spine_skin_get_attachments(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return _obj->getAttachments(); -} - -void * spine_skin_get_bones(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return (void *) _obj->getBones(); -} - int32_t spine_skin_get_num_bones(spine_skin obj) { if (!obj) return 0; Skin *_obj = (Skin *) obj; @@ -114,12 +102,6 @@ spine_bone_data *spine_skin_get_bones(spine_skin obj) { return (spine_bone_data *) _obj->getBones().buffer(); } -void * spine_skin_get_constraints(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return (void *) _obj->getConstraints(); -} - int32_t spine_skin_get_num_constraints(spine_skin obj) { if (!obj) return 0; Skin *_obj = (Skin *) obj; @@ -133,7 +115,7 @@ spine_constraint_data *spine_skin_get_constraints(spine_skin obj) { } spine_color spine_skin_get_color(spine_skin obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; Skin *_obj = (Skin *) obj; return (spine_color) &_obj->getColor(); } diff --git a/spine-c-new/src/generated/skin.h b/spine-c-new/src/generated/skin.h index 803411efa..e6888ba2f 100644 --- a/spine-c-new/src/generated/skin.h +++ b/spine-c-new/src/generated/skin.h @@ -34,25 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_skin) - -SPINE_C_EXPORT spine_skin spine_skin_create(const utf8 * name); +SPINE_C_EXPORT spine_skin spine_skin_create(const char* name); SPINE_C_EXPORT void spine_skin_dispose(spine_skin obj); -SPINE_C_EXPORT void spine_skin_set_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name, spine_attachment attachment); -SPINE_C_EXPORT spine_attachment spine_skin_get_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name); -SPINE_C_EXPORT void spine_skin_remove_attachment(spine_skin obj, spine_size_t slotIndex, const utf8 * name); -SPINE_C_EXPORT void spine_skin_find_names_for_slot(spine_skin obj, spine_size_t slotIndex, void * names); -SPINE_C_EXPORT void spine_skin_find_attachments_for_slot(spine_skin obj, spine_size_t slotIndex, void * attachments); -SPINE_C_EXPORT const utf8 * spine_skin_get_name(spine_skin obj); +SPINE_C_EXPORT void spine_skin_set_attachment(spine_skin obj, size_t slotIndex, const char* name, spine_attachment attachment); +SPINE_C_EXPORT spine_attachment spine_skin_get_attachment(spine_skin obj, size_t slotIndex, const char* name); +SPINE_C_EXPORT void spine_skin_remove_attachment(spine_skin obj, size_t slotIndex, const char* name); +SPINE_C_EXPORT void spine_skin_find_names_for_slot(spine_skin obj, size_t slotIndex, spine_array_string names); +SPINE_C_EXPORT void spine_skin_find_attachments_for_slot(spine_skin obj, size_t slotIndex, spine_array_attachment attachments); +SPINE_C_EXPORT const char* spine_skin_get_name(spine_skin obj); SPINE_C_EXPORT void spine_skin_add_skin(spine_skin obj, spine_skin other); SPINE_C_EXPORT void spine_skin_copy_skin(spine_skin obj, spine_skin other); -SPINE_C_EXPORT spine_attachment_map::entries spine_skin_get_attachments(spine_skin obj); -SPINE_C_EXPORT void * spine_skin_get_bones(spine_skin obj); SPINE_C_EXPORT int32_t spine_skin_get_num_bones(spine_skin obj); SPINE_C_EXPORT spine_bone_data *spine_skin_get_bones(spine_skin obj); -SPINE_C_EXPORT void * spine_skin_get_constraints(spine_skin obj); SPINE_C_EXPORT int32_t spine_skin_get_num_constraints(spine_skin obj); SPINE_C_EXPORT spine_constraint_data *spine_skin_get_constraints(spine_skin obj); SPINE_C_EXPORT spine_color spine_skin_get_color(spine_skin obj); diff --git a/spine-c-new/src/generated/slider.cpp b/spine-c-new/src/generated/slider.cpp index dd8c51c04..5012c4cc2 100644 --- a/spine-c-new/src/generated/slider.cpp +++ b/spine-c-new/src/generated/slider.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_slider spine_slider_create(spine_slider_data data, spine_skeleton skeleton) { - Slider *obj = new (__FILE__, __LINE__) Slider(data, skeleton); + Slider *obj = new (__FILE__, __LINE__) Slider(*(SliderData*) data, *(Skeleton*) skeleton); return (spine_slider) obj; } @@ -42,38 +42,36 @@ void spine_slider_dispose(spine_slider obj) { delete (Slider *) obj; } -spine_rtti spine_slider_get_rtti(spine_slider obj) { - if (!obj) return nullptr; - Slider *_obj = (Slider *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slider_get_rtti() { + return (spine_rtti) &Slider::rtti; } spine_slider spine_slider_copy(spine_slider obj, spine_skeleton skeleton) { - if (!obj) return nullptr; + if (!obj) return (spine_slider) 0; Slider *_obj = (Slider *) obj; - return (spine_slider) _obj->copy(skeleton); + return (spine_slider) _obj->copy(*(Skeleton*) skeleton); } void spine_slider_update(spine_slider obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; Slider *_obj = (Slider *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_slider_sort(spine_slider obj, spine_skeleton skeleton) { if (!obj) return ; Slider *_obj = (Slider *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_slider_is_source_active(spine_slider obj) { - if (!obj) return 0; +bool spine_slider_is_source_active(spine_slider obj) { + if (!obj) return false; Slider *_obj = (Slider *) obj; return _obj->isSourceActive(); } spine_bone spine_slider_get_bone(spine_slider obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; Slider *_obj = (Slider *) obj; return (spine_bone) _obj->getBone(); } @@ -87,7 +85,7 @@ void spine_slider_set_bone(spine_slider obj, spine_bone value) { spine_constraint_data spine_slider_get_data(spine_slider obj) { if (!obj) return 0; Slider *_obj = (Slider *) obj; - return _obj->getData(); + return (spine_constraint_data) &_obj->getData(); } void spine_slider_pose(spine_slider obj) { @@ -103,15 +101,15 @@ void spine_slider_setup_pose(spine_slider obj) { } spine_slider_pose spine_slider_get_pose(spine_slider obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slider_pose) 0; Slider *_obj = (Slider *) obj; - return _obj->getPose(); + return (spine_slider_pose) &_obj->getPose(); } spine_slider_pose spine_slider_get_applied_pose(spine_slider obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slider_pose) 0; Slider *_obj = (Slider *) obj; - return _obj->getAppliedPose(); + return (spine_slider_pose) &_obj->getAppliedPose(); } void spine_slider_reset_constrained(spine_slider obj) { @@ -126,19 +124,19 @@ void spine_slider_constrained(spine_slider obj) { _obj->constrained(); } -spine_bool spine_slider_is_pose_equal_to_applied(spine_slider obj) { - if (!obj) return 0; +bool spine_slider_is_pose_equal_to_applied(spine_slider obj) { + if (!obj) return false; Slider *_obj = (Slider *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_slider_is_active(spine_slider obj) { - if (!obj) return 0; +bool spine_slider_is_active(spine_slider obj) { + if (!obj) return false; Slider *_obj = (Slider *) obj; return _obj->isActive(); } -void spine_slider_set_active(spine_slider obj, spine_bool value) { +void spine_slider_set_active(spine_slider obj, bool value) { if (!obj) return; Slider *_obj = (Slider *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/slider.h b/spine-c-new/src/generated/slider.h index 939f3f828..220ae4c91 100644 --- a/spine-c-new/src/generated/slider.h +++ b/spine-c-new/src/generated/slider.h @@ -34,17 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_slider) +#include "types.h" SPINE_C_EXPORT spine_slider spine_slider_create(spine_slider_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_slider_dispose(spine_slider obj); -SPINE_C_EXPORT spine_rtti spine_slider_get_rtti(spine_slider obj); +SPINE_C_EXPORT spine_rtti spine_slider_get_rtti(); SPINE_C_EXPORT spine_slider spine_slider_copy(spine_slider obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_slider_update(spine_slider obj, spine_skeleton skeleton, spine_physics physics); SPINE_C_EXPORT void spine_slider_sort(spine_slider obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_slider_is_source_active(spine_slider obj); +SPINE_C_EXPORT bool spine_slider_is_source_active(spine_slider obj); SPINE_C_EXPORT spine_bone spine_slider_get_bone(spine_slider obj); SPINE_C_EXPORT void spine_slider_set_bone(spine_slider obj, spine_bone value); SPINE_C_EXPORT spine_constraint_data spine_slider_get_data(spine_slider obj); @@ -54,9 +52,9 @@ SPINE_C_EXPORT spine_slider_pose spine_slider_get_pose(spine_slider obj); SPINE_C_EXPORT spine_slider_pose spine_slider_get_applied_pose(spine_slider obj); SPINE_C_EXPORT void spine_slider_reset_constrained(spine_slider obj); SPINE_C_EXPORT void spine_slider_constrained(spine_slider obj); -SPINE_C_EXPORT spine_bool spine_slider_is_pose_equal_to_applied(spine_slider obj); -SPINE_C_EXPORT spine_bool spine_slider_is_active(spine_slider obj); -SPINE_C_EXPORT void spine_slider_set_active(spine_slider obj, spine_bool value); +SPINE_C_EXPORT bool spine_slider_is_pose_equal_to_applied(spine_slider obj); +SPINE_C_EXPORT bool spine_slider_is_active(spine_slider obj); +SPINE_C_EXPORT void spine_slider_set_active(spine_slider obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slider_data.cpp b/spine-c-new/src/generated/slider_data.cpp index 6e97e44b1..7ce1e2ca3 100644 --- a/spine-c-new/src/generated/slider_data.cpp +++ b/spine-c-new/src/generated/slider_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_slider_data spine_slider_data_create(const utf8 * name) { +spine_slider_data spine_slider_data_create(const char* name) { SliderData *obj = new (__FILE__, __LINE__) SliderData(String(name)); return (spine_slider_data) obj; } @@ -42,20 +42,18 @@ void spine_slider_data_dispose(spine_slider_data obj) { delete (SliderData *) obj; } -spine_rtti spine_slider_data_get_rtti(spine_slider_data obj) { - if (!obj) return nullptr; - SliderData *_obj = (SliderData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slider_data_get_rtti() { + return (spine_rtti) &SliderData::rtti; } spine_constraint spine_slider_data_create(spine_slider_data obj, spine_skeleton skeleton) { if (!obj) return 0; SliderData *_obj = (SliderData *) obj; - return (spine_constraint) _obj->create(skeleton); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } spine_animation spine_slider_data_get_animation(spine_slider_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_animation) 0; SliderData *_obj = (SliderData *) obj; return (spine_animation) _obj->getAnimation(); } @@ -66,32 +64,32 @@ void spine_slider_data_set_animation(spine_slider_data obj, spine_animation valu _obj->setAnimation((Animation *) value); } -spine_bool spine_slider_data_get_additive(spine_slider_data obj) { - if (!obj) return 0; +bool spine_slider_data_get_additive(spine_slider_data obj) { + if (!obj) return false; SliderData *_obj = (SliderData *) obj; return _obj->getAdditive(); } -void spine_slider_data_set_additive(spine_slider_data obj, spine_bool value) { +void spine_slider_data_set_additive(spine_slider_data obj, bool value) { if (!obj) return; SliderData *_obj = (SliderData *) obj; _obj->setAdditive(value); } -spine_bool spine_slider_data_get_loop(spine_slider_data obj) { - if (!obj) return 0; +bool spine_slider_data_get_loop(spine_slider_data obj) { + if (!obj) return false; SliderData *_obj = (SliderData *) obj; return _obj->getLoop(); } -void spine_slider_data_set_loop(spine_slider_data obj, spine_bool value) { +void spine_slider_data_set_loop(spine_slider_data obj, bool value) { if (!obj) return; SliderData *_obj = (SliderData *) obj; _obj->setLoop(value); } spine_bone_data spine_slider_data_get_bone(spine_slider_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; SliderData *_obj = (SliderData *) obj; return (spine_bone_data) _obj->getBone(); } @@ -103,7 +101,7 @@ void spine_slider_data_set_bone(spine_slider_data obj, spine_bone_data value) { } spine_from_property spine_slider_data_get_property(spine_slider_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_from_property) 0; SliderData *_obj = (SliderData *) obj; return (spine_from_property) _obj->getProperty(); } @@ -138,38 +136,32 @@ void spine_slider_data_set_offset(spine_slider_data obj, float value) { _obj->setOffset(value); } -spine_bool spine_slider_data_get_local(spine_slider_data obj) { - if (!obj) return 0; +bool spine_slider_data_get_local(spine_slider_data obj) { + if (!obj) return false; SliderData *_obj = (SliderData *) obj; return _obj->getLocal(); } -void spine_slider_data_set_local(spine_slider_data obj, spine_bool value) { +void spine_slider_data_set_local(spine_slider_data obj, bool value) { if (!obj) return; SliderData *_obj = (SliderData *) obj; _obj->setLocal(value); } -const utf8 * spine_slider_data_get_name(spine_slider_data obj) { +const char* spine_slider_data_get_name(spine_slider_data obj) { if (!obj) return nullptr; SliderData *_obj = (SliderData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_slider_data_is_skin_required(spine_slider_data obj) { - if (!obj) return 0; +bool spine_slider_data_is_skin_required(spine_slider_data obj) { + if (!obj) return false; SliderData *_obj = (SliderData *) obj; return _obj->isSkinRequired(); } spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slider_pose) 0; SliderData *_obj = (SliderData *) obj; - return _obj->getSetupPose(); -} - -spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data obj) { - if (!obj) return nullptr; - SliderData *_obj = (SliderData *) obj; - return _obj->getSetupPose(); + return (spine_slider_pose) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/slider_data.h b/spine-c-new/src/generated/slider_data.h index 31e7a1f9a..fd3f9233b 100644 --- a/spine-c-new/src/generated/slider_data.h +++ b/spine-c-new/src/generated/slider_data.h @@ -34,20 +34,18 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slider_data) - -SPINE_C_EXPORT spine_slider_data spine_slider_data_create(const utf8 * name); +SPINE_C_EXPORT spine_slider_data spine_slider_data_create(const char* name); SPINE_C_EXPORT void spine_slider_data_dispose(spine_slider_data obj); -SPINE_C_EXPORT spine_rtti spine_slider_data_get_rtti(spine_slider_data obj); +SPINE_C_EXPORT spine_rtti spine_slider_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_slider_data_create(spine_slider_data obj, spine_skeleton skeleton); SPINE_C_EXPORT spine_animation spine_slider_data_get_animation(spine_slider_data obj); SPINE_C_EXPORT void spine_slider_data_set_animation(spine_slider_data obj, spine_animation value); -SPINE_C_EXPORT spine_bool spine_slider_data_get_additive(spine_slider_data obj); -SPINE_C_EXPORT void spine_slider_data_set_additive(spine_slider_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_slider_data_get_loop(spine_slider_data obj); -SPINE_C_EXPORT void spine_slider_data_set_loop(spine_slider_data obj, spine_bool value); +SPINE_C_EXPORT bool spine_slider_data_get_additive(spine_slider_data obj); +SPINE_C_EXPORT void spine_slider_data_set_additive(spine_slider_data obj, bool value); +SPINE_C_EXPORT bool spine_slider_data_get_loop(spine_slider_data obj); +SPINE_C_EXPORT void spine_slider_data_set_loop(spine_slider_data obj, bool value); SPINE_C_EXPORT spine_bone_data spine_slider_data_get_bone(spine_slider_data obj); SPINE_C_EXPORT void spine_slider_data_set_bone(spine_slider_data obj, spine_bone_data value); SPINE_C_EXPORT spine_from_property spine_slider_data_get_property(spine_slider_data obj); @@ -56,11 +54,10 @@ SPINE_C_EXPORT float spine_slider_data_get_scale(spine_slider_data obj); SPINE_C_EXPORT void spine_slider_data_set_scale(spine_slider_data obj, float value); SPINE_C_EXPORT float spine_slider_data_get_offset(spine_slider_data obj); SPINE_C_EXPORT void spine_slider_data_set_offset(spine_slider_data obj, float value); -SPINE_C_EXPORT spine_bool spine_slider_data_get_local(spine_slider_data obj); -SPINE_C_EXPORT void spine_slider_data_set_local(spine_slider_data obj, spine_bool value); -SPINE_C_EXPORT const utf8 * spine_slider_data_get_name(spine_slider_data obj); -SPINE_C_EXPORT spine_bool spine_slider_data_is_skin_required(spine_slider_data obj); -SPINE_C_EXPORT spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data obj); +SPINE_C_EXPORT bool spine_slider_data_get_local(spine_slider_data obj); +SPINE_C_EXPORT void spine_slider_data_set_local(spine_slider_data obj, bool value); +SPINE_C_EXPORT const char* spine_slider_data_get_name(spine_slider_data obj); +SPINE_C_EXPORT bool spine_slider_data_is_skin_required(spine_slider_data obj); SPINE_C_EXPORT spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/slider_mix_timeline.cpp b/spine-c-new/src/generated/slider_mix_timeline.cpp index 2393522f4..4a260e0a3 100644 --- a/spine-c-new/src/generated/slider_mix_timeline.cpp +++ b/spine-c-new/src/generated/slider_mix_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_slider_mix_timeline spine_slider_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t sliderIndex) { +spine_slider_mix_timeline spine_slider_mix_timeline_create(size_t frameCount, size_t bezierCount, int sliderIndex) { SliderMixTimeline *obj = new (__FILE__, __LINE__) SliderMixTimeline(frameCount, bezierCount, sliderIndex); return (spine_slider_mix_timeline) obj; } @@ -42,19 +42,17 @@ void spine_slider_mix_timeline_dispose(spine_slider_mix_timeline obj) { delete (SliderMixTimeline *) obj; } -spine_rtti spine_slider_mix_timeline_get_rtti(spine_slider_mix_timeline obj) { - if (!obj) return nullptr; - SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slider_mix_timeline_get_rtti() { + return (spine_rtti) &SliderMixTimeline::rtti; } -void spine_slider_mix_timeline_apply(spine_slider_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_slider_mix_timeline_apply(spine_slider_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline obj, spine_size_t frame, float time, float value) { +void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline obj, size_t frame, float time, float value) { if (!obj) return ; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_slider_mix_timeline_get_curve_value(spine_slider_mix_timeline obj, f float spine_slider_mix_timeline_get_relative_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_slider_mix_timeline_get_absolute_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_slider_mix_timeline_get_absolute_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_slider_mix_timeline_get_absolute_value_6(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_slider_mix_timeline_get_scale_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline obj) { +int spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline obj) { if (!obj) return 0; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline obj, int32_t value) { +void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline obj, int value) { if (!obj) return; SliderMixTimeline *_obj = (SliderMixTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/slider_mix_timeline.h b/spine-c-new/src/generated/slider_mix_timeline.h index 7eced9180..c7baa0ef7 100644 --- a/spine-c-new/src/generated/slider_mix_timeline.h +++ b/spine-c-new/src/generated/slider_mix_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slider_mix_timeline) - -SPINE_C_EXPORT spine_slider_mix_timeline spine_slider_mix_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t sliderIndex); +SPINE_C_EXPORT spine_slider_mix_timeline spine_slider_mix_timeline_create(size_t frameCount, size_t bezierCount, int sliderIndex); SPINE_C_EXPORT void spine_slider_mix_timeline_dispose(spine_slider_mix_timeline obj); -SPINE_C_EXPORT spine_rtti spine_slider_mix_timeline_get_rtti(spine_slider_mix_timeline obj); -SPINE_C_EXPORT void spine_slider_mix_timeline_apply(spine_slider_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_slider_mix_timeline_get_rtti(); +SPINE_C_EXPORT void spine_slider_mix_timeline_apply(spine_slider_mix_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_slider_mix_timeline_get_curve_value(spine_slider_mix_timeline obj, float time); SPINE_C_EXPORT float spine_slider_mix_timeline_get_relative_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_slider_mix_timeline_get_absolute_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_slider_mix_timeline_get_absolute_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_slider_mix_timeline_get_absolute_value_6(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_slider_mix_timeline_get_scale_value(spine_slider_mix_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline obj); -SPINE_C_EXPORT void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline obj); +SPINE_C_EXPORT void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slider_pose.cpp b/spine-c-new/src/generated/slider_pose.cpp index 9ad6fb457..89b0290c9 100644 --- a/spine-c-new/src/generated/slider_pose.cpp +++ b/spine-c-new/src/generated/slider_pose.cpp @@ -45,7 +45,7 @@ void spine_slider_pose_dispose(spine_slider_pose obj) { void spine_slider_pose_set(spine_slider_pose obj, spine_slider_pose value) { if (!obj) return; SliderPose *_obj = (SliderPose *) obj; - _obj->set(value); + _obj->set(*((SliderPose*) value)); } float spine_slider_pose_get_time(spine_slider_pose obj) { diff --git a/spine-c-new/src/generated/slider_pose.h b/spine-c-new/src/generated/slider_pose.h index b71bec6df..dd037d02a 100644 --- a/spine-c-new/src/generated/slider_pose.h +++ b/spine-c-new/src/generated/slider_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_slider_pose) +#include "types.h" SPINE_C_EXPORT spine_slider_pose spine_slider_pose_create(void); SPINE_C_EXPORT void spine_slider_pose_dispose(spine_slider_pose obj); diff --git a/spine-c-new/src/generated/slider_timeline.cpp b/spine-c-new/src/generated/slider_timeline.cpp index 155e114b7..2ffa133c3 100644 --- a/spine-c-new/src/generated/slider_timeline.cpp +++ b/spine-c-new/src/generated/slider_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_slider_timeline spine_slider_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t sliderIndex) { +spine_slider_timeline spine_slider_timeline_create(size_t frameCount, size_t bezierCount, int sliderIndex) { SliderTimeline *obj = new (__FILE__, __LINE__) SliderTimeline(frameCount, bezierCount, sliderIndex); return (spine_slider_timeline) obj; } @@ -42,19 +42,17 @@ void spine_slider_timeline_dispose(spine_slider_timeline obj) { delete (SliderTimeline *) obj; } -spine_rtti spine_slider_timeline_get_rtti(spine_slider_timeline obj) { - if (!obj) return nullptr; - SliderTimeline *_obj = (SliderTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slider_timeline_get_rtti() { + return (spine_rtti) &SliderTimeline::rtti; } -void spine_slider_timeline_apply(spine_slider_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_slider_timeline_apply(spine_slider_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; SliderTimeline *_obj = (SliderTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_slider_timeline_set_frame(spine_slider_timeline obj, spine_size_t frame, float time, float value) { +void spine_slider_timeline_set_frame(spine_slider_timeline obj, size_t frame, float time, float value) { if (!obj) return ; SliderTimeline *_obj = (SliderTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_slider_timeline_get_curve_value(spine_slider_timeline obj, float tim float spine_slider_timeline_get_relative_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; SliderTimeline *_obj = (SliderTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_slider_timeline_get_absolute_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; SliderTimeline *_obj = (SliderTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_slider_timeline_get_absolute_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_slider_timeline_get_absolute_value_6(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; SliderTimeline *_obj = (SliderTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_slider_timeline_get_scale_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; SliderTimeline *_obj = (SliderTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_slider_timeline_get_constraint_index(spine_slider_timeline obj) { +int spine_slider_timeline_get_constraint_index(spine_slider_timeline obj) { if (!obj) return 0; SliderTimeline *_obj = (SliderTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_slider_timeline_set_constraint_index(spine_slider_timeline obj, int32_t value) { +void spine_slider_timeline_set_constraint_index(spine_slider_timeline obj, int value) { if (!obj) return; SliderTimeline *_obj = (SliderTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/slider_timeline.h b/spine-c-new/src/generated/slider_timeline.h index 3c0590888..9a78c75a6 100644 --- a/spine-c-new/src/generated/slider_timeline.h +++ b/spine-c-new/src/generated/slider_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slider_timeline) - -SPINE_C_EXPORT spine_slider_timeline spine_slider_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t sliderIndex); +SPINE_C_EXPORT spine_slider_timeline spine_slider_timeline_create(size_t frameCount, size_t bezierCount, int sliderIndex); SPINE_C_EXPORT void spine_slider_timeline_dispose(spine_slider_timeline obj); -SPINE_C_EXPORT spine_rtti spine_slider_timeline_get_rtti(spine_slider_timeline obj); -SPINE_C_EXPORT void spine_slider_timeline_apply(spine_slider_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_slider_timeline_set_frame(spine_slider_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_slider_timeline_get_rtti(); +SPINE_C_EXPORT void spine_slider_timeline_apply(spine_slider_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_slider_timeline_set_frame(spine_slider_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_slider_timeline_get_curve_value(spine_slider_timeline obj, float time); SPINE_C_EXPORT float spine_slider_timeline_get_relative_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_slider_timeline_get_absolute_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_slider_timeline_get_absolute_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_slider_timeline_get_absolute_value_6(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_slider_timeline_get_scale_value(spine_slider_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_slider_timeline_get_constraint_index(spine_slider_timeline obj); -SPINE_C_EXPORT void spine_slider_timeline_set_constraint_index(spine_slider_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_slider_timeline_get_constraint_index(spine_slider_timeline obj); +SPINE_C_EXPORT void spine_slider_timeline_set_constraint_index(spine_slider_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slot.cpp b/spine-c-new/src/generated/slot.cpp index 5665ea607..ff0ccabfe 100644 --- a/spine-c-new/src/generated/slot.cpp +++ b/spine-c-new/src/generated/slot.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_slot spine_slot_create(spine_slot_data data, spine_skeleton skeleton) { - Slot *obj = new (__FILE__, __LINE__) Slot(data, skeleton); + Slot *obj = new (__FILE__, __LINE__) Slot(*(SlotData*) data, *(Skeleton*) skeleton); return (spine_slot) obj; } @@ -43,9 +43,9 @@ void spine_slot_dispose(spine_slot obj) { } spine_bone spine_slot_get_bone(spine_slot obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; Slot *_obj = (Slot *) obj; - return _obj->getBone(); + return (spine_bone) &_obj->getBone(); } void spine_slot_setup_pose(spine_slot obj) { @@ -55,21 +55,21 @@ void spine_slot_setup_pose(spine_slot obj) { } spine_slot_data spine_slot_get_data(spine_slot obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_data) 0; Slot *_obj = (Slot *) obj; - return _obj->getData(); + return (spine_slot_data) &_obj->getData(); } spine_slot_pose spine_slot_get_pose(spine_slot obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_pose) 0; Slot *_obj = (Slot *) obj; - return _obj->getPose(); + return (spine_slot_pose) &_obj->getPose(); } spine_slot_pose spine_slot_get_applied_pose(spine_slot obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_pose) 0; Slot *_obj = (Slot *) obj; - return _obj->getAppliedPose(); + return (spine_slot_pose) &_obj->getAppliedPose(); } void spine_slot_reset_constrained(spine_slot obj) { @@ -90,8 +90,8 @@ void spine_slot_constrained(spine_slot obj) { _obj->constrained(); } -spine_bool spine_slot_is_pose_equal_to_applied(spine_slot obj) { - if (!obj) return 0; +bool spine_slot_is_pose_equal_to_applied(spine_slot obj) { + if (!obj) return false; Slot *_obj = (Slot *) obj; return _obj->isPoseEqualToApplied(); } diff --git a/spine-c-new/src/generated/slot.h b/spine-c-new/src/generated/slot.h index 4530f54f4..dc75398e2 100644 --- a/spine-c-new/src/generated/slot.h +++ b/spine-c-new/src/generated/slot.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_slot) +#include "types.h" SPINE_C_EXPORT spine_slot spine_slot_create(spine_slot_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_slot_dispose(spine_slot obj); @@ -48,7 +46,7 @@ SPINE_C_EXPORT spine_slot_pose spine_slot_get_applied_pose(spine_slot obj); SPINE_C_EXPORT void spine_slot_reset_constrained(spine_slot obj); SPINE_C_EXPORT void spine_slot_pose(spine_slot obj); SPINE_C_EXPORT void spine_slot_constrained(spine_slot obj); -SPINE_C_EXPORT spine_bool spine_slot_is_pose_equal_to_applied(spine_slot obj); +SPINE_C_EXPORT bool spine_slot_is_pose_equal_to_applied(spine_slot obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slot_curve_timeline.cpp b/spine-c-new/src/generated/slot_curve_timeline.cpp index ab1c05036..de7932582 100644 --- a/spine-c-new/src/generated/slot_curve_timeline.cpp +++ b/spine-c-new/src/generated/slot_curve_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_slot_curve_timeline spine_slot_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount, int32_t slotIndex) { +spine_slot_curve_timeline spine_slot_curve_timeline_create(size_t frameCount, size_t frameEntries, size_t bezierCount, int slotIndex) { SlotCurveTimeline *obj = new (__FILE__, __LINE__) SlotCurveTimeline(frameCount, frameEntries, bezierCount, slotIndex); return (spine_slot_curve_timeline) obj; } @@ -42,88 +42,74 @@ void spine_slot_curve_timeline_dispose(spine_slot_curve_timeline obj) { delete (SlotCurveTimeline *) obj; } -spine_rtti spine_slot_curve_timeline_get_rtti(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slot_curve_timeline_get_rtti() { + return (spine_rtti) &SlotCurveTimeline::rtti; } -void spine_slot_curve_timeline_apply(spine_slot_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_slot_curve_timeline_apply(spine_slot_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline obj, spine_size_t value) { +void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline obj, size_t value) { if (!obj) return; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; _obj->setLinear(value); } -void spine_slot_curve_timeline_set_stepped(spine_slot_curve_timeline obj, spine_size_t value) { +void spine_slot_curve_timeline_set_stepped(spine_slot_curve_timeline obj, size_t value) { if (!obj) return; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; _obj->setStepped(value); } -void spine_slot_curve_timeline_set_bezier(spine_slot_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_slot_curve_timeline_set_bezier(spine_slot_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_slot_curve_timeline_get_bezier_value(spine_slot_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_slot_curve_timeline_get_bezier_value(spine_slot_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_slot_curve_timeline_get_num_curves(spine_slot_curve_timeline obj) { if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj) { +float *spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj) { if (!obj) return nullptr; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; +size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline obj) { + if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; +size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline obj) { + if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return _obj->getFrameCount(); } -void * spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_slot_curve_timeline_get_num_frames(spine_slot_curve_timeline obj) { if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj) { +float *spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj) { if (!obj) return nullptr; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline obj) { @@ -132,31 +118,25 @@ float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline obj) { return _obj->getDuration(); } -void * spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_slot_curve_timeline_get_num_property_ids(spine_slot_curve_timeline obj) { if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj) { +int64_t *spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj) { if (!obj) return nullptr; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline obj) { +int spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline obj) { if (!obj) return 0; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; return _obj->getSlotIndex(); } -void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline obj, int32_t value) { +void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline obj, int value) { if (!obj) return; SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; _obj->setSlotIndex(value); diff --git a/spine-c-new/src/generated/slot_curve_timeline.h b/spine-c-new/src/generated/slot_curve_timeline.h index 8db621c12..3a7a366bc 100644 --- a/spine-c-new/src/generated/slot_curve_timeline.h +++ b/spine-c-new/src/generated/slot_curve_timeline.h @@ -34,32 +34,27 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slot_curve_timeline) - -SPINE_C_EXPORT spine_slot_curve_timeline spine_slot_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount, int32_t slotIndex); +SPINE_C_EXPORT spine_slot_curve_timeline spine_slot_curve_timeline_create(size_t frameCount, size_t frameEntries, size_t bezierCount, int slotIndex); SPINE_C_EXPORT void spine_slot_curve_timeline_dispose(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_rtti spine_slot_curve_timeline_get_rtti(spine_slot_curve_timeline obj); -SPINE_C_EXPORT void spine_slot_curve_timeline_apply(spine_slot_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_slot_curve_timeline_set_stepped(spine_slot_curve_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_slot_curve_timeline_set_bezier(spine_slot_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_slot_curve_timeline_get_bezier_value(spine_slot_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj); +SPINE_C_EXPORT spine_rtti spine_slot_curve_timeline_get_rtti(); +SPINE_C_EXPORT void spine_slot_curve_timeline_apply(spine_slot_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline obj, size_t value); +SPINE_C_EXPORT void spine_slot_curve_timeline_set_stepped(spine_slot_curve_timeline obj, size_t value); +SPINE_C_EXPORT void spine_slot_curve_timeline_set_bezier(spine_slot_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_slot_curve_timeline_get_bezier_value(spine_slot_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_slot_curve_timeline_get_num_curves(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_float *spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline obj); -SPINE_C_EXPORT void * spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj); +SPINE_C_EXPORT float *spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj); +SPINE_C_EXPORT size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline obj); +SPINE_C_EXPORT size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline obj); SPINE_C_EXPORT int32_t spine_slot_curve_timeline_get_num_frames(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_float *spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj); +SPINE_C_EXPORT float *spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj); SPINE_C_EXPORT float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline obj); -SPINE_C_EXPORT void * spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj); SPINE_C_EXPORT int32_t spine_slot_curve_timeline_get_num_property_ids(spine_slot_curve_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj); -SPINE_C_EXPORT int32_t spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline obj); -SPINE_C_EXPORT void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj); +SPINE_C_EXPORT int spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline obj); +SPINE_C_EXPORT void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slot_data.cpp b/spine-c-new/src/generated/slot_data.cpp index 708e37bf4..1f24b61e8 100644 --- a/spine-c-new/src/generated/slot_data.cpp +++ b/spine-c-new/src/generated/slot_data.cpp @@ -32,8 +32,8 @@ using namespace spine; -spine_slot_data spine_slot_data_create(int32_t index, const utf8 * name, spine_bone_data boneData) { - SlotData *obj = new (__FILE__, __LINE__) SlotData(index, String(name), boneData); +spine_slot_data spine_slot_data_create(int index, const char* name, spine_bone_data boneData) { + SlotData *obj = new (__FILE__, __LINE__) SlotData(index, String(name), *(BoneData*) boneData); return (spine_slot_data) obj; } @@ -42,79 +42,73 @@ void spine_slot_data_dispose(spine_slot_data obj) { delete (SlotData *) obj; } -int32_t spine_slot_data_get_index(spine_slot_data obj) { +int spine_slot_data_get_index(spine_slot_data obj) { if (!obj) return 0; SlotData *_obj = (SlotData *) obj; return _obj->getIndex(); } spine_bone_data spine_slot_data_get_bone_data(spine_slot_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; SlotData *_obj = (SlotData *) obj; - return _obj->getBoneData(); + return (spine_bone_data) &_obj->getBoneData(); } -void spine_slot_data_set_attachment_name(spine_slot_data obj, const utf8 * value) { +void spine_slot_data_set_attachment_name(spine_slot_data obj, const char* value) { if (!obj) return; SlotData *_obj = (SlotData *) obj; _obj->setAttachmentName(String(value)); } -const utf8 * spine_slot_data_get_attachment_name(spine_slot_data obj) { +const char* spine_slot_data_get_attachment_name(spine_slot_data obj) { if (!obj) return nullptr; SlotData *_obj = (SlotData *) obj; - return (const utf8 *) _obj->getAttachmentName().buffer(); + return (const char *) _obj->getAttachmentName().buffer(); } spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_blend_mode) 0; SlotData *_obj = (SlotData *) obj; - return _obj->getBlendMode(); + return (spine_blend_mode) _obj->getBlendMode(); } void spine_slot_data_set_blend_mode(spine_slot_data obj, spine_blend_mode value) { if (!obj) return; SlotData *_obj = (SlotData *) obj; - _obj->setBlendMode(value); + _obj->setBlendMode((BlendMode) value); } -spine_bool spine_slot_data_get_visible(spine_slot_data obj) { - if (!obj) return 0; +bool spine_slot_data_get_visible(spine_slot_data obj) { + if (!obj) return false; SlotData *_obj = (SlotData *) obj; return _obj->getVisible(); } -void spine_slot_data_set_visible(spine_slot_data obj, spine_bool value) { +void spine_slot_data_set_visible(spine_slot_data obj, bool value) { if (!obj) return; SlotData *_obj = (SlotData *) obj; _obj->setVisible(value); } spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_slot_pose) 0; SlotData *_obj = (SlotData *) obj; - return _obj->getSetupPose(); + return (spine_slot_pose) &_obj->getSetupPose(); } -spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data obj) { +const char* spine_slot_data_get_name(spine_slot_data obj) { if (!obj) return nullptr; SlotData *_obj = (SlotData *) obj; - return _obj->getSetupPose(); + return (const char *) _obj->getName().buffer(); } -spine_spine::string spine_slot_data_get_name(spine_slot_data obj) { - if (!obj) return nullptr; - SlotData *_obj = (SlotData *) obj; - return _obj->getName(); -} - -spine_bool spine_slot_data_is_skin_required(spine_slot_data obj) { - if (!obj) return 0; +bool spine_slot_data_is_skin_required(spine_slot_data obj) { + if (!obj) return false; SlotData *_obj = (SlotData *) obj; return _obj->isSkinRequired(); } -void spine_slot_data_set_skin_required(spine_slot_data obj, spine_bool value) { +void spine_slot_data_set_skin_required(spine_slot_data obj, bool value) { if (!obj) return; SlotData *_obj = (SlotData *) obj; _obj->setSkinRequired(value); diff --git a/spine-c-new/src/generated/slot_data.h b/spine-c-new/src/generated/slot_data.h index 7859f02ff..35f05dbbb 100644 --- a/spine-c-new/src/generated/slot_data.h +++ b/spine-c-new/src/generated/slot_data.h @@ -34,25 +34,22 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slot_data) - -SPINE_C_EXPORT spine_slot_data spine_slot_data_create(int32_t index, const utf8 * name, spine_bone_data boneData); +SPINE_C_EXPORT spine_slot_data spine_slot_data_create(int index, const char* name, spine_bone_data boneData); SPINE_C_EXPORT void spine_slot_data_dispose(spine_slot_data obj); -SPINE_C_EXPORT int32_t spine_slot_data_get_index(spine_slot_data obj); +SPINE_C_EXPORT int spine_slot_data_get_index(spine_slot_data obj); SPINE_C_EXPORT spine_bone_data spine_slot_data_get_bone_data(spine_slot_data obj); -SPINE_C_EXPORT void spine_slot_data_set_attachment_name(spine_slot_data obj, const utf8 * value); -SPINE_C_EXPORT const utf8 * spine_slot_data_get_attachment_name(spine_slot_data obj); +SPINE_C_EXPORT void spine_slot_data_set_attachment_name(spine_slot_data obj, const char* value); +SPINE_C_EXPORT const char* spine_slot_data_get_attachment_name(spine_slot_data obj); SPINE_C_EXPORT spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data obj); SPINE_C_EXPORT void spine_slot_data_set_blend_mode(spine_slot_data obj, spine_blend_mode value); -SPINE_C_EXPORT spine_bool spine_slot_data_get_visible(spine_slot_data obj); -SPINE_C_EXPORT void spine_slot_data_set_visible(spine_slot_data obj, spine_bool value); +SPINE_C_EXPORT bool spine_slot_data_get_visible(spine_slot_data obj); +SPINE_C_EXPORT void spine_slot_data_set_visible(spine_slot_data obj, bool value); SPINE_C_EXPORT spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data obj); -SPINE_C_EXPORT spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data obj); -SPINE_C_EXPORT spine_spine::string spine_slot_data_get_name(spine_slot_data obj); -SPINE_C_EXPORT spine_bool spine_slot_data_is_skin_required(spine_slot_data obj); -SPINE_C_EXPORT void spine_slot_data_set_skin_required(spine_slot_data obj, spine_bool value); +SPINE_C_EXPORT const char* spine_slot_data_get_name(spine_slot_data obj); +SPINE_C_EXPORT bool spine_slot_data_is_skin_required(spine_slot_data obj); +SPINE_C_EXPORT void spine_slot_data_set_skin_required(spine_slot_data obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slot_pose.cpp b/spine-c-new/src/generated/slot_pose.cpp index 264d63e11..5a727f05a 100644 --- a/spine-c-new/src/generated/slot_pose.cpp +++ b/spine-c-new/src/generated/slot_pose.cpp @@ -45,35 +45,35 @@ void spine_slot_pose_dispose(spine_slot_pose obj) { void spine_slot_pose_set(spine_slot_pose obj, spine_slot_pose value) { if (!obj) return; SlotPose *_obj = (SlotPose *) obj; - _obj->set(value); + _obj->set(*((SlotPose*) value)); } spine_color spine_slot_pose_get_color(spine_slot_pose obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; SlotPose *_obj = (SlotPose *) obj; return (spine_color) &_obj->getColor(); } spine_color spine_slot_pose_get_dark_color(spine_slot_pose obj) { - if (!obj) return nullptr; + if (!obj) return (spine_color) 0; SlotPose *_obj = (SlotPose *) obj; return (spine_color) &_obj->getDarkColor(); } -spine_bool spine_slot_pose_has_dark_color(spine_slot_pose obj) { - if (!obj) return 0; +bool spine_slot_pose_has_dark_color(spine_slot_pose obj) { + if (!obj) return false; SlotPose *_obj = (SlotPose *) obj; return _obj->hasDarkColor(); } -void spine_slot_pose_set_has_dark_color(spine_slot_pose obj, spine_bool value) { +void spine_slot_pose_set_has_dark_color(spine_slot_pose obj, bool value) { if (!obj) return; SlotPose *_obj = (SlotPose *) obj; _obj->setHasDarkColor(value); } spine_attachment spine_slot_pose_get_attachment(spine_slot_pose obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; SlotPose *_obj = (SlotPose *) obj; return (spine_attachment) _obj->getAttachment(); } @@ -84,32 +84,26 @@ void spine_slot_pose_set_attachment(spine_slot_pose obj, spine_attachment value) _obj->setAttachment((Attachment *) value); } -int32_t spine_slot_pose_get_sequence_index(spine_slot_pose obj) { +int spine_slot_pose_get_sequence_index(spine_slot_pose obj) { if (!obj) return 0; SlotPose *_obj = (SlotPose *) obj; return _obj->getSequenceIndex(); } -void spine_slot_pose_set_sequence_index(spine_slot_pose obj, int32_t value) { +void spine_slot_pose_set_sequence_index(spine_slot_pose obj, int value) { if (!obj) return; SlotPose *_obj = (SlotPose *) obj; _obj->setSequenceIndex(value); } -void * spine_slot_pose_get_deform(spine_slot_pose obj) { - if (!obj) return nullptr; - SlotPose *_obj = (SlotPose *) obj; - return _obj->getDeform(); -} - int32_t spine_slot_pose_get_num_deform(spine_slot_pose obj) { if (!obj) return 0; SlotPose *_obj = (SlotPose *) obj; return (int32_t) _obj->getDeform().size(); } -spine_float *spine_slot_pose_get_deform(spine_slot_pose obj) { +float *spine_slot_pose_get_deform(spine_slot_pose obj) { if (!obj) return nullptr; SlotPose *_obj = (SlotPose *) obj; - return (spine_float *) _obj->getDeform().buffer(); + return (float *) _obj->getDeform().buffer(); } diff --git a/spine-c-new/src/generated/slot_pose.h b/spine-c-new/src/generated/slot_pose.h index 9344a4a82..24da0d201 100644 --- a/spine-c-new/src/generated/slot_pose.h +++ b/spine-c-new/src/generated/slot_pose.h @@ -34,24 +34,21 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_slot_pose) +#include "types.h" SPINE_C_EXPORT spine_slot_pose spine_slot_pose_create(void); SPINE_C_EXPORT void spine_slot_pose_dispose(spine_slot_pose obj); SPINE_C_EXPORT void spine_slot_pose_set(spine_slot_pose obj, spine_slot_pose value); SPINE_C_EXPORT spine_color spine_slot_pose_get_color(spine_slot_pose obj); SPINE_C_EXPORT spine_color spine_slot_pose_get_dark_color(spine_slot_pose obj); -SPINE_C_EXPORT spine_bool spine_slot_pose_has_dark_color(spine_slot_pose obj); -SPINE_C_EXPORT void spine_slot_pose_set_has_dark_color(spine_slot_pose obj, spine_bool value); +SPINE_C_EXPORT bool spine_slot_pose_has_dark_color(spine_slot_pose obj); +SPINE_C_EXPORT void spine_slot_pose_set_has_dark_color(spine_slot_pose obj, bool value); SPINE_C_EXPORT spine_attachment spine_slot_pose_get_attachment(spine_slot_pose obj); SPINE_C_EXPORT void spine_slot_pose_set_attachment(spine_slot_pose obj, spine_attachment value); -SPINE_C_EXPORT int32_t spine_slot_pose_get_sequence_index(spine_slot_pose obj); -SPINE_C_EXPORT void spine_slot_pose_set_sequence_index(spine_slot_pose obj, int32_t value); -SPINE_C_EXPORT void * spine_slot_pose_get_deform(spine_slot_pose obj); +SPINE_C_EXPORT int spine_slot_pose_get_sequence_index(spine_slot_pose obj); +SPINE_C_EXPORT void spine_slot_pose_set_sequence_index(spine_slot_pose obj, int value); SPINE_C_EXPORT int32_t spine_slot_pose_get_num_deform(spine_slot_pose obj); -SPINE_C_EXPORT spine_float *spine_slot_pose_get_deform(spine_slot_pose obj); +SPINE_C_EXPORT float *spine_slot_pose_get_deform(spine_slot_pose obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/slot_timeline.cpp b/spine-c-new/src/generated/slot_timeline.cpp index af59724f2..025809f4c 100644 --- a/spine-c-new/src/generated/slot_timeline.cpp +++ b/spine-c-new/src/generated/slot_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_slot_timeline spine_slot_timeline_create(int32_t slotIndex) { +spine_slot_timeline spine_slot_timeline_create(int slotIndex) { SlotTimeline *obj = new (__FILE__, __LINE__) SlotTimeline(slotIndex); return (spine_slot_timeline) obj; } @@ -42,19 +42,17 @@ void spine_slot_timeline_dispose(spine_slot_timeline obj) { delete (SlotTimeline *) obj; } -spine_rtti spine_slot_timeline_get_rtti(spine_slot_timeline obj) { - if (!obj) return nullptr; - SlotTimeline *_obj = (SlotTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_slot_timeline_get_rtti() { + return (spine_rtti) &SlotTimeline::rtti; } -int32_t spine_slot_timeline_get_slot_index(spine_slot_timeline obj) { +int spine_slot_timeline_get_slot_index(spine_slot_timeline obj) { if (!obj) return 0; SlotTimeline *_obj = (SlotTimeline *) obj; return _obj->getSlotIndex(); } -void spine_slot_timeline_set_slot_index(spine_slot_timeline obj, int32_t value) { +void spine_slot_timeline_set_slot_index(spine_slot_timeline obj, int value) { if (!obj) return; SlotTimeline *_obj = (SlotTimeline *) obj; _obj->setSlotIndex(value); diff --git a/spine-c-new/src/generated/slot_timeline.h b/spine-c-new/src/generated/slot_timeline.h index 83106bd89..43968dd03 100644 --- a/spine-c-new/src/generated/slot_timeline.h +++ b/spine-c-new/src/generated/slot_timeline.h @@ -34,15 +34,13 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_slot_timeline) - -SPINE_C_EXPORT spine_slot_timeline spine_slot_timeline_create(int32_t slotIndex); +SPINE_C_EXPORT spine_slot_timeline spine_slot_timeline_create(int slotIndex); SPINE_C_EXPORT void spine_slot_timeline_dispose(spine_slot_timeline obj); -SPINE_C_EXPORT spine_rtti spine_slot_timeline_get_rtti(spine_slot_timeline obj); -SPINE_C_EXPORT int32_t spine_slot_timeline_get_slot_index(spine_slot_timeline obj); -SPINE_C_EXPORT void spine_slot_timeline_set_slot_index(spine_slot_timeline obj, int32_t value); +SPINE_C_EXPORT spine_rtti spine_slot_timeline_get_rtti(); +SPINE_C_EXPORT int spine_slot_timeline_get_slot_index(spine_slot_timeline obj); +SPINE_C_EXPORT void spine_slot_timeline_set_slot_index(spine_slot_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/spacing_mode.h b/spine-c-new/src/generated/spacing_mode.h index e93b6c83b..2998af8e0 100644 --- a/spine-c-new/src/generated/spacing_mode.h +++ b/spine-c-new/src/generated/spacing_mode.h @@ -30,17 +30,17 @@ #ifndef SPINE_C_SPACINGMODE_H #define SPINE_C_SPACINGMODE_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_spacing_mode { - SPINE_SPACING_MODE_SPACING_MODE_LENGTH = 0, - SPINE_SPACING_MODE_SPACING_MODE_FIXED, - SPINE_SPACING_MODE_SPACING_MODE_PERCENT, - SPINE_SPACING_MODE_SPACING_MODE_PROPORTIONAL + SPINE_SPACING_MODE_LENGTH = 0, + SPINE_SPACING_MODE_FIXED, + SPINE_SPACING_MODE_PERCENT, + SPINE_SPACING_MODE_PROPORTIONAL } spine_spacing_mode; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/texture_filter.h b/spine-c-new/src/generated/texture_filter.h index 5681b98a3..32a817710 100644 --- a/spine-c-new/src/generated/texture_filter.h +++ b/spine-c-new/src/generated/texture_filter.h @@ -30,21 +30,21 @@ #ifndef SPINE_C_TEXTUREFILTER_H #define SPINE_C_TEXTUREFILTER_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_texture_filter { - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_UNKNOWN, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_NEAREST, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_LINEAR, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_MIP_MAP, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_MIP_MAP_NEAREST_NEAREST, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_MIP_MAP_LINEAR_NEAREST, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_MIP_MAP_NEAREST_LINEAR, - SPINE_TEXTURE_FILTER_TEXTURE_FILTER_MIP_MAP_LINEAR_LINEAR + SPINE_TEXTURE_FILTER_UNKNOWN, + SPINE_TEXTURE_FILTER_NEAREST, + SPINE_TEXTURE_FILTER_LINEAR, + SPINE_TEXTURE_FILTER_MIP_MAP, + SPINE_TEXTURE_FILTER_MIP_MAP_NEAREST_NEAREST, + SPINE_TEXTURE_FILTER_MIP_MAP_LINEAR_NEAREST, + SPINE_TEXTURE_FILTER_MIP_MAP_NEAREST_LINEAR, + SPINE_TEXTURE_FILTER_MIP_MAP_LINEAR_LINEAR } spine_texture_filter; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/texture_region.h b/spine-c-new/src/generated/texture_region.h index e42265f78..96131c57c 100644 --- a/spine-c-new/src/generated/texture_region.h +++ b/spine-c-new/src/generated/texture_region.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_texture_region) +#include "types.h" SPINE_C_EXPORT spine_texture_region spine_texture_region_create(void); SPINE_C_EXPORT void spine_texture_region_dispose(spine_texture_region obj); diff --git a/spine-c-new/src/generated/texture_wrap.h b/spine-c-new/src/generated/texture_wrap.h index cbc4284c7..796faa8f9 100644 --- a/spine-c-new/src/generated/texture_wrap.h +++ b/spine-c-new/src/generated/texture_wrap.h @@ -30,16 +30,16 @@ #ifndef SPINE_C_TEXTUREWRAP_H #define SPINE_C_TEXTUREWRAP_H -#include "../../custom.h" +#include "../base.h" #ifdef __cplusplus extern "C" { #endif typedef enum spine_texture_wrap { - SPINE_TEXTURE_WRAP_TEXTURE_WRAP_MIRRORED_REPEAT, - SPINE_TEXTURE_WRAP_TEXTURE_WRAP_CLAMP_TO_EDGE, - SPINE_TEXTURE_WRAP_TEXTURE_WRAP_REPEAT + SPINE_TEXTURE_WRAP_MIRRORED_REPEAT, + SPINE_TEXTURE_WRAP_CLAMP_TO_EDGE, + SPINE_TEXTURE_WRAP_REPEAT } spine_texture_wrap; #ifdef __cplusplus diff --git a/spine-c-new/src/generated/timeline.cpp b/spine-c-new/src/generated/timeline.cpp index 128153857..53553b23f 100644 --- a/spine-c-new/src/generated/timeline.cpp +++ b/spine-c-new/src/generated/timeline.cpp @@ -32,56 +32,43 @@ using namespace spine; -spine_timeline spine_timeline_create(spine_size_t frameCount, spine_size_t frameEntries) { - Timeline *obj = new (__FILE__, __LINE__) Timeline(frameCount, frameEntries); - return (spine_timeline) obj; -} - void spine_timeline_dispose(spine_timeline obj) { if (!obj) return; delete (Timeline *) obj; } -spine_rtti spine_timeline_get_rtti(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_timeline_get_rtti() { + return (spine_rtti) &Timeline::rtti; } -void spine_timeline_apply(spine_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_timeline_apply(spine_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; Timeline *_obj = (Timeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -spine_size_t spine_timeline_get_frame_entries(spine_timeline obj) { - if (!obj) return nullptr; +size_t spine_timeline_get_frame_entries(spine_timeline obj) { + if (!obj) return 0; Timeline *_obj = (Timeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_timeline_get_frame_count(spine_timeline obj) { - if (!obj) return nullptr; +size_t spine_timeline_get_frame_count(spine_timeline obj) { + if (!obj) return 0; Timeline *_obj = (Timeline *) obj; return _obj->getFrameCount(); } -void * spine_timeline_get_frames(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - return _obj->getFrames(); -} - int32_t spine_timeline_get_num_frames(spine_timeline obj) { if (!obj) return 0; Timeline *_obj = (Timeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_timeline_get_frames(spine_timeline obj) { +float *spine_timeline_get_frames(spine_timeline obj) { if (!obj) return nullptr; Timeline *_obj = (Timeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_timeline_get_duration(spine_timeline obj) { @@ -90,353 +77,14 @@ float spine_timeline_get_duration(spine_timeline obj) { return _obj->getDuration(); } -void * spine_timeline_get_property_ids(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_timeline_get_num_property_ids(spine_timeline obj) { if (!obj) return 0; Timeline *_obj = (Timeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_timeline_get_property_ids(spine_timeline obj) { +int64_t *spine_timeline_get_property_ids(spine_timeline obj) { if (!obj) return nullptr; Timeline *_obj = (Timeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); -} - -spine_bool spine_timeline_is_type(spine_timeline obj, spine_timeline_type type) { - if (!obj) return 0; - Timeline *_obj = (Timeline *) obj; - - switch (type) { - case SPINE_TYPE_TIMELINE_ATTACHMENT_TIMELINE: - return _obj->getRTTI().instanceOf(AttachmentTimeline::rtti); - case SPINE_TYPE_TIMELINE_ROTATE_TIMELINE: - return _obj->getRTTI().instanceOf(RotateTimeline::rtti); - case SPINE_TYPE_TIMELINE_SCALE_X_TIMELINE: - return _obj->getRTTI().instanceOf(ScaleXTimeline::rtti); - case SPINE_TYPE_TIMELINE_SCALE_Y_TIMELINE: - return _obj->getRTTI().instanceOf(ScaleYTimeline::rtti); - case SPINE_TYPE_TIMELINE_SHEAR_X_TIMELINE: - return _obj->getRTTI().instanceOf(ShearXTimeline::rtti); - case SPINE_TYPE_TIMELINE_SHEAR_Y_TIMELINE: - return _obj->getRTTI().instanceOf(ShearYTimeline::rtti); - case SPINE_TYPE_TIMELINE_TRANSLATE_X_TIMELINE: - return _obj->getRTTI().instanceOf(TranslateXTimeline::rtti); - case SPINE_TYPE_TIMELINE_TRANSLATE_Y_TIMELINE: - return _obj->getRTTI().instanceOf(TranslateYTimeline::rtti); - case SPINE_TYPE_TIMELINE_ALPHA_TIMELINE: - return _obj->getRTTI().instanceOf(AlphaTimeline::rtti); - case SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_POSITION_TIMELINE: - return _obj->getRTTI().instanceOf(PathConstraintPositionTimeline::rtti); - case SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_SPACING_TIMELINE: - return _obj->getRTTI().instanceOf(PathConstraintSpacingTimeline::rtti); - case SPINE_TYPE_TIMELINE_SLIDER_MIX_TIMELINE: - return _obj->getRTTI().instanceOf(SliderMixTimeline::rtti); - case SPINE_TYPE_TIMELINE_SLIDER_TIMELINE: - return _obj->getRTTI().instanceOf(SliderTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_INERTIA_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintInertiaTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_STRENGTH_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintStrengthTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_DAMPING_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintDampingTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_MASS_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintMassTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_WIND_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintWindTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_GRAVITY_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintGravityTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_MIX_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintMixTimeline::rtti); - case SPINE_TYPE_TIMELINE_SCALE_TIMELINE: - return _obj->getRTTI().instanceOf(ScaleTimeline::rtti); - case SPINE_TYPE_TIMELINE_SHEAR_TIMELINE: - return _obj->getRTTI().instanceOf(ShearTimeline::rtti); - case SPINE_TYPE_TIMELINE_TRANSLATE_TIMELINE: - return _obj->getRTTI().instanceOf(TranslateTimeline::rtti); - case SPINE_TYPE_TIMELINE_IK_CONSTRAINT_TIMELINE: - return _obj->getRTTI().instanceOf(IkConstraintTimeline::rtti); - case SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_MIX_TIMELINE: - return _obj->getRTTI().instanceOf(PathConstraintMixTimeline::rtti); - case SPINE_TYPE_TIMELINE_RGBA_TIMELINE: - return _obj->getRTTI().instanceOf(RGBATimeline::rtti); - case SPINE_TYPE_TIMELINE_RGB_TIMELINE: - return _obj->getRTTI().instanceOf(RGBTimeline::rtti); - case SPINE_TYPE_TIMELINE_RGBA2_TIMELINE: - return _obj->getRTTI().instanceOf(RGBA2Timeline::rtti); - case SPINE_TYPE_TIMELINE_RGB2_TIMELINE: - return _obj->getRTTI().instanceOf(RGB2Timeline::rtti); - case SPINE_TYPE_TIMELINE_DEFORM_TIMELINE: - return _obj->getRTTI().instanceOf(DeformTimeline::rtti); - case SPINE_TYPE_TIMELINE_TRANSFORM_CONSTRAINT_TIMELINE: - return _obj->getRTTI().instanceOf(TransformConstraintTimeline::rtti); - case SPINE_TYPE_TIMELINE_DRAW_ORDER_TIMELINE: - return _obj->getRTTI().instanceOf(DrawOrderTimeline::rtti); - case SPINE_TYPE_TIMELINE_EVENT_TIMELINE: - return _obj->getRTTI().instanceOf(EventTimeline::rtti); - case SPINE_TYPE_TIMELINE_INHERIT_TIMELINE: - return _obj->getRTTI().instanceOf(InheritTimeline::rtti); - case SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_RESET_TIMELINE: - return _obj->getRTTI().instanceOf(PhysicsConstraintResetTimeline::rtti); - case SPINE_TYPE_TIMELINE_SEQUENCE_TIMELINE: - return _obj->getRTTI().instanceOf(SequenceTimeline::rtti); - } - return 0; -} - -spine_attachment_timeline spine_timeline_as_attachment_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(AttachmentTimeline::rtti)) return nullptr; - return (spine_attachment_timeline) obj; -} - -spine_rotate_timeline spine_timeline_as_rotate_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(RotateTimeline::rtti)) return nullptr; - return (spine_rotate_timeline) obj; -} - -spine_scale_x_timeline spine_timeline_as_scale_x_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ScaleXTimeline::rtti)) return nullptr; - return (spine_scale_x_timeline) obj; -} - -spine_scale_y_timeline spine_timeline_as_scale_y_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ScaleYTimeline::rtti)) return nullptr; - return (spine_scale_y_timeline) obj; -} - -spine_shear_x_timeline spine_timeline_as_shear_x_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ShearXTimeline::rtti)) return nullptr; - return (spine_shear_x_timeline) obj; -} - -spine_shear_y_timeline spine_timeline_as_shear_y_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ShearYTimeline::rtti)) return nullptr; - return (spine_shear_y_timeline) obj; -} - -spine_translate_x_timeline spine_timeline_as_translate_x_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(TranslateXTimeline::rtti)) return nullptr; - return (spine_translate_x_timeline) obj; -} - -spine_translate_y_timeline spine_timeline_as_translate_y_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(TranslateYTimeline::rtti)) return nullptr; - return (spine_translate_y_timeline) obj; -} - -spine_alpha_timeline spine_timeline_as_alpha_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(AlphaTimeline::rtti)) return nullptr; - return (spine_alpha_timeline) obj; -} - -spine_path_constraint_position_timeline spine_timeline_as_path_constraint_position_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PathConstraintPositionTimeline::rtti)) return nullptr; - return (spine_path_constraint_position_timeline) obj; -} - -spine_path_constraint_spacing_timeline spine_timeline_as_path_constraint_spacing_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PathConstraintSpacingTimeline::rtti)) return nullptr; - return (spine_path_constraint_spacing_timeline) obj; -} - -spine_slider_mix_timeline spine_timeline_as_slider_mix_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(SliderMixTimeline::rtti)) return nullptr; - return (spine_slider_mix_timeline) obj; -} - -spine_slider_timeline spine_timeline_as_slider_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(SliderTimeline::rtti)) return nullptr; - return (spine_slider_timeline) obj; -} - -spine_physics_constraint_inertia_timeline spine_timeline_as_physics_constraint_inertia_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintInertiaTimeline::rtti)) return nullptr; - return (spine_physics_constraint_inertia_timeline) obj; -} - -spine_physics_constraint_strength_timeline spine_timeline_as_physics_constraint_strength_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintStrengthTimeline::rtti)) return nullptr; - return (spine_physics_constraint_strength_timeline) obj; -} - -spine_physics_constraint_damping_timeline spine_timeline_as_physics_constraint_damping_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintDampingTimeline::rtti)) return nullptr; - return (spine_physics_constraint_damping_timeline) obj; -} - -spine_physics_constraint_mass_timeline spine_timeline_as_physics_constraint_mass_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintMassTimeline::rtti)) return nullptr; - return (spine_physics_constraint_mass_timeline) obj; -} - -spine_physics_constraint_wind_timeline spine_timeline_as_physics_constraint_wind_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintWindTimeline::rtti)) return nullptr; - return (spine_physics_constraint_wind_timeline) obj; -} - -spine_physics_constraint_gravity_timeline spine_timeline_as_physics_constraint_gravity_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintGravityTimeline::rtti)) return nullptr; - return (spine_physics_constraint_gravity_timeline) obj; -} - -spine_physics_constraint_mix_timeline spine_timeline_as_physics_constraint_mix_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintMixTimeline::rtti)) return nullptr; - return (spine_physics_constraint_mix_timeline) obj; -} - -spine_scale_timeline spine_timeline_as_scale_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ScaleTimeline::rtti)) return nullptr; - return (spine_scale_timeline) obj; -} - -spine_shear_timeline spine_timeline_as_shear_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(ShearTimeline::rtti)) return nullptr; - return (spine_shear_timeline) obj; -} - -spine_translate_timeline spine_timeline_as_translate_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(TranslateTimeline::rtti)) return nullptr; - return (spine_translate_timeline) obj; -} - -spine_ik_constraint_timeline spine_timeline_as_ik_constraint_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(IkConstraintTimeline::rtti)) return nullptr; - return (spine_ik_constraint_timeline) obj; -} - -spine_path_constraint_mix_timeline spine_timeline_as_path_constraint_mix_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PathConstraintMixTimeline::rtti)) return nullptr; - return (spine_path_constraint_mix_timeline) obj; -} - -spine_rgba_timeline spine_timeline_as_rgba_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(RGBATimeline::rtti)) return nullptr; - return (spine_rgba_timeline) obj; -} - -spine_rgb_timeline spine_timeline_as_rgb_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(RGBTimeline::rtti)) return nullptr; - return (spine_rgb_timeline) obj; -} - -spine_rgba2_timeline spine_timeline_as_rgba2_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(RGBA2Timeline::rtti)) return nullptr; - return (spine_rgba2_timeline) obj; -} - -spine_rgb2_timeline spine_timeline_as_rgb2_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(RGB2Timeline::rtti)) return nullptr; - return (spine_rgb2_timeline) obj; -} - -spine_deform_timeline spine_timeline_as_deform_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(DeformTimeline::rtti)) return nullptr; - return (spine_deform_timeline) obj; -} - -spine_transform_constraint_timeline spine_timeline_as_transform_constraint_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(TransformConstraintTimeline::rtti)) return nullptr; - return (spine_transform_constraint_timeline) obj; -} - -spine_draw_order_timeline spine_timeline_as_draw_order_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(DrawOrderTimeline::rtti)) return nullptr; - return (spine_draw_order_timeline) obj; -} - -spine_event_timeline spine_timeline_as_event_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(EventTimeline::rtti)) return nullptr; - return (spine_event_timeline) obj; -} - -spine_inherit_timeline spine_timeline_as_inherit_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(InheritTimeline::rtti)) return nullptr; - return (spine_inherit_timeline) obj; -} - -spine_physics_constraint_reset_timeline spine_timeline_as_physics_constraint_reset_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(PhysicsConstraintResetTimeline::rtti)) return nullptr; - return (spine_physics_constraint_reset_timeline) obj; -} - -spine_sequence_timeline spine_timeline_as_sequence_timeline(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - if (!_obj->getRTTI().instanceOf(SequenceTimeline::rtti)) return nullptr; - return (spine_sequence_timeline) obj; + return (int64_t *) _obj->getPropertyIds().buffer(); } diff --git a/spine-c-new/src/generated/timeline.h b/spine-c-new/src/generated/timeline.h index cb48ef8aa..a2f24d175 100644 --- a/spine-c-new/src/generated/timeline.h +++ b/spine-c-new/src/generated/timeline.h @@ -34,172 +34,18 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_timeline) - -SPINE_C_EXPORT spine_timeline spine_timeline_create(spine_size_t frameCount, spine_size_t frameEntries); SPINE_C_EXPORT void spine_timeline_dispose(spine_timeline obj); -SPINE_C_EXPORT spine_rtti spine_timeline_get_rtti(spine_timeline obj); -SPINE_C_EXPORT void spine_timeline_apply(spine_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT spine_size_t spine_timeline_get_frame_entries(spine_timeline obj); -SPINE_C_EXPORT spine_size_t spine_timeline_get_frame_count(spine_timeline obj); -SPINE_C_EXPORT void * spine_timeline_get_frames(spine_timeline obj); +SPINE_C_EXPORT spine_rtti spine_timeline_get_rtti(); +SPINE_C_EXPORT void spine_timeline_apply(spine_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT size_t spine_timeline_get_frame_entries(spine_timeline obj); +SPINE_C_EXPORT size_t spine_timeline_get_frame_count(spine_timeline obj); SPINE_C_EXPORT int32_t spine_timeline_get_num_frames(spine_timeline obj); -SPINE_C_EXPORT spine_float *spine_timeline_get_frames(spine_timeline obj); +SPINE_C_EXPORT float *spine_timeline_get_frames(spine_timeline obj); SPINE_C_EXPORT float spine_timeline_get_duration(spine_timeline obj); -SPINE_C_EXPORT void * spine_timeline_get_property_ids(spine_timeline obj); SPINE_C_EXPORT int32_t spine_timeline_get_num_property_ids(spine_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_timeline_get_property_ids(spine_timeline obj); -struct spine_attachment_timeline_wrapper; -typedef struct spine_attachment_timeline_wrapper *spine_attachment_timeline; -struct spine_rotate_timeline_wrapper; -typedef struct spine_rotate_timeline_wrapper *spine_rotate_timeline; -struct spine_scale_x_timeline_wrapper; -typedef struct spine_scale_x_timeline_wrapper *spine_scale_x_timeline; -struct spine_scale_y_timeline_wrapper; -typedef struct spine_scale_y_timeline_wrapper *spine_scale_y_timeline; -struct spine_shear_x_timeline_wrapper; -typedef struct spine_shear_x_timeline_wrapper *spine_shear_x_timeline; -struct spine_shear_y_timeline_wrapper; -typedef struct spine_shear_y_timeline_wrapper *spine_shear_y_timeline; -struct spine_translate_x_timeline_wrapper; -typedef struct spine_translate_x_timeline_wrapper *spine_translate_x_timeline; -struct spine_translate_y_timeline_wrapper; -typedef struct spine_translate_y_timeline_wrapper *spine_translate_y_timeline; -struct spine_alpha_timeline_wrapper; -typedef struct spine_alpha_timeline_wrapper *spine_alpha_timeline; -struct spine_path_constraint_position_timeline_wrapper; -typedef struct spine_path_constraint_position_timeline_wrapper *spine_path_constraint_position_timeline; -struct spine_path_constraint_spacing_timeline_wrapper; -typedef struct spine_path_constraint_spacing_timeline_wrapper *spine_path_constraint_spacing_timeline; -struct spine_slider_mix_timeline_wrapper; -typedef struct spine_slider_mix_timeline_wrapper *spine_slider_mix_timeline; -struct spine_slider_timeline_wrapper; -typedef struct spine_slider_timeline_wrapper *spine_slider_timeline; -struct spine_physics_constraint_inertia_timeline_wrapper; -typedef struct spine_physics_constraint_inertia_timeline_wrapper *spine_physics_constraint_inertia_timeline; -struct spine_physics_constraint_strength_timeline_wrapper; -typedef struct spine_physics_constraint_strength_timeline_wrapper *spine_physics_constraint_strength_timeline; -struct spine_physics_constraint_damping_timeline_wrapper; -typedef struct spine_physics_constraint_damping_timeline_wrapper *spine_physics_constraint_damping_timeline; -struct spine_physics_constraint_mass_timeline_wrapper; -typedef struct spine_physics_constraint_mass_timeline_wrapper *spine_physics_constraint_mass_timeline; -struct spine_physics_constraint_wind_timeline_wrapper; -typedef struct spine_physics_constraint_wind_timeline_wrapper *spine_physics_constraint_wind_timeline; -struct spine_physics_constraint_gravity_timeline_wrapper; -typedef struct spine_physics_constraint_gravity_timeline_wrapper *spine_physics_constraint_gravity_timeline; -struct spine_physics_constraint_mix_timeline_wrapper; -typedef struct spine_physics_constraint_mix_timeline_wrapper *spine_physics_constraint_mix_timeline; -struct spine_scale_timeline_wrapper; -typedef struct spine_scale_timeline_wrapper *spine_scale_timeline; -struct spine_shear_timeline_wrapper; -typedef struct spine_shear_timeline_wrapper *spine_shear_timeline; -struct spine_translate_timeline_wrapper; -typedef struct spine_translate_timeline_wrapper *spine_translate_timeline; -struct spine_ik_constraint_timeline_wrapper; -typedef struct spine_ik_constraint_timeline_wrapper *spine_ik_constraint_timeline; -struct spine_path_constraint_mix_timeline_wrapper; -typedef struct spine_path_constraint_mix_timeline_wrapper *spine_path_constraint_mix_timeline; -struct spine_rgba_timeline_wrapper; -typedef struct spine_rgba_timeline_wrapper *spine_rgba_timeline; -struct spine_rgb_timeline_wrapper; -typedef struct spine_rgb_timeline_wrapper *spine_rgb_timeline; -struct spine_rgba2_timeline_wrapper; -typedef struct spine_rgba2_timeline_wrapper *spine_rgba2_timeline; -struct spine_rgb2_timeline_wrapper; -typedef struct spine_rgb2_timeline_wrapper *spine_rgb2_timeline; -struct spine_deform_timeline_wrapper; -typedef struct spine_deform_timeline_wrapper *spine_deform_timeline; -struct spine_transform_constraint_timeline_wrapper; -typedef struct spine_transform_constraint_timeline_wrapper *spine_transform_constraint_timeline; -struct spine_draw_order_timeline_wrapper; -typedef struct spine_draw_order_timeline_wrapper *spine_draw_order_timeline; -struct spine_event_timeline_wrapper; -typedef struct spine_event_timeline_wrapper *spine_event_timeline; -struct spine_inherit_timeline_wrapper; -typedef struct spine_inherit_timeline_wrapper *spine_inherit_timeline; -struct spine_physics_constraint_reset_timeline_wrapper; -typedef struct spine_physics_constraint_reset_timeline_wrapper *spine_physics_constraint_reset_timeline; -struct spine_sequence_timeline_wrapper; -typedef struct spine_sequence_timeline_wrapper *spine_sequence_timeline; - -typedef enum spine_timeline_type { - SPINE_TYPE_TIMELINE_ATTACHMENT_TIMELINE = 0, - SPINE_TYPE_TIMELINE_ROTATE_TIMELINE = 1, - SPINE_TYPE_TIMELINE_SCALE_X_TIMELINE = 2, - SPINE_TYPE_TIMELINE_SCALE_Y_TIMELINE = 3, - SPINE_TYPE_TIMELINE_SHEAR_X_TIMELINE = 4, - SPINE_TYPE_TIMELINE_SHEAR_Y_TIMELINE = 5, - SPINE_TYPE_TIMELINE_TRANSLATE_X_TIMELINE = 6, - SPINE_TYPE_TIMELINE_TRANSLATE_Y_TIMELINE = 7, - SPINE_TYPE_TIMELINE_ALPHA_TIMELINE = 8, - SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_POSITION_TIMELINE = 9, - SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_SPACING_TIMELINE = 10, - SPINE_TYPE_TIMELINE_SLIDER_MIX_TIMELINE = 11, - SPINE_TYPE_TIMELINE_SLIDER_TIMELINE = 12, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_INERTIA_TIMELINE = 13, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_STRENGTH_TIMELINE = 14, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_DAMPING_TIMELINE = 15, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_MASS_TIMELINE = 16, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_WIND_TIMELINE = 17, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_GRAVITY_TIMELINE = 18, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_MIX_TIMELINE = 19, - SPINE_TYPE_TIMELINE_SCALE_TIMELINE = 20, - SPINE_TYPE_TIMELINE_SHEAR_TIMELINE = 21, - SPINE_TYPE_TIMELINE_TRANSLATE_TIMELINE = 22, - SPINE_TYPE_TIMELINE_IK_CONSTRAINT_TIMELINE = 23, - SPINE_TYPE_TIMELINE_PATH_CONSTRAINT_MIX_TIMELINE = 24, - SPINE_TYPE_TIMELINE_RGBA_TIMELINE = 25, - SPINE_TYPE_TIMELINE_RGB_TIMELINE = 26, - SPINE_TYPE_TIMELINE_RGBA2_TIMELINE = 27, - SPINE_TYPE_TIMELINE_RGB2_TIMELINE = 28, - SPINE_TYPE_TIMELINE_DEFORM_TIMELINE = 29, - SPINE_TYPE_TIMELINE_TRANSFORM_CONSTRAINT_TIMELINE = 30, - SPINE_TYPE_TIMELINE_DRAW_ORDER_TIMELINE = 31, - SPINE_TYPE_TIMELINE_EVENT_TIMELINE = 32, - SPINE_TYPE_TIMELINE_INHERIT_TIMELINE = 33, - SPINE_TYPE_TIMELINE_PHYSICS_CONSTRAINT_RESET_TIMELINE = 34, - SPINE_TYPE_TIMELINE_SEQUENCE_TIMELINE = 35 -} spine_timeline_type; - -SPINE_C_EXPORT spine_bool spine_timeline_is_type(spine_timeline obj, spine_timeline_type type); -SPINE_C_EXPORT spine_attachment_timeline spine_timeline_as_attachment_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_rotate_timeline spine_timeline_as_rotate_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_scale_x_timeline spine_timeline_as_scale_x_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_scale_y_timeline spine_timeline_as_scale_y_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_shear_x_timeline spine_timeline_as_shear_x_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_shear_y_timeline spine_timeline_as_shear_y_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_translate_x_timeline spine_timeline_as_translate_x_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_translate_y_timeline spine_timeline_as_translate_y_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_alpha_timeline spine_timeline_as_alpha_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_path_constraint_position_timeline spine_timeline_as_path_constraint_position_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_path_constraint_spacing_timeline spine_timeline_as_path_constraint_spacing_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_slider_mix_timeline spine_timeline_as_slider_mix_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_slider_timeline spine_timeline_as_slider_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_inertia_timeline spine_timeline_as_physics_constraint_inertia_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_strength_timeline spine_timeline_as_physics_constraint_strength_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_damping_timeline spine_timeline_as_physics_constraint_damping_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_mass_timeline spine_timeline_as_physics_constraint_mass_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_wind_timeline spine_timeline_as_physics_constraint_wind_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_gravity_timeline spine_timeline_as_physics_constraint_gravity_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_mix_timeline spine_timeline_as_physics_constraint_mix_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_scale_timeline spine_timeline_as_scale_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_shear_timeline spine_timeline_as_shear_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_translate_timeline spine_timeline_as_translate_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_ik_constraint_timeline spine_timeline_as_ik_constraint_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_path_constraint_mix_timeline spine_timeline_as_path_constraint_mix_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_rgba_timeline spine_timeline_as_rgba_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_rgb_timeline spine_timeline_as_rgb_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_rgba2_timeline spine_timeline_as_rgba2_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_rgb2_timeline spine_timeline_as_rgb2_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_deform_timeline spine_timeline_as_deform_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_transform_constraint_timeline spine_timeline_as_transform_constraint_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_draw_order_timeline spine_timeline_as_draw_order_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_event_timeline spine_timeline_as_event_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_inherit_timeline spine_timeline_as_inherit_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_physics_constraint_reset_timeline spine_timeline_as_physics_constraint_reset_timeline(spine_timeline obj); -SPINE_C_EXPORT spine_sequence_timeline spine_timeline_as_sequence_timeline(spine_timeline obj); +SPINE_C_EXPORT int64_t *spine_timeline_get_property_ids(spine_timeline obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_property.cpp b/spine-c-new/src/generated/to_property.cpp index 85481d7ac..c7a76664d 100644 --- a/spine-c-new/src/generated/to_property.cpp +++ b/spine-c-new/src/generated/to_property.cpp @@ -32,11 +32,6 @@ using namespace spine; -spine_to_property spine_to_property_create(void) { - ToProperty *obj = new (__FILE__, __LINE__) ToProperty(); - return (spine_to_property) obj; -} - void spine_to_property_dispose(spine_to_property obj) { if (!obj) return; delete (ToProperty *) obj; @@ -45,11 +40,11 @@ void spine_to_property_dispose(spine_to_property obj) { float spine_to_property_mix(spine_to_property obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToProperty *_obj = (ToProperty *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_property_apply(spine_to_property obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_property_apply(spine_to_property obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToProperty *_obj = (ToProperty *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_property.h b/spine-c-new/src/generated/to_property.h index ed9ea8b4d..c74e481d6 100644 --- a/spine-c-new/src/generated/to_property.h +++ b/spine-c-new/src/generated/to_property.h @@ -34,14 +34,11 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_to_property) - -SPINE_C_EXPORT spine_to_property spine_to_property_create(void); SPINE_C_EXPORT void spine_to_property_dispose(spine_to_property obj); SPINE_C_EXPORT float spine_to_property_mix(spine_to_property obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_property_apply(spine_to_property obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_property_apply(spine_to_property obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_rotate.cpp b/spine-c-new/src/generated/to_rotate.cpp index 28a9920ea..25274c8b9 100644 --- a/spine-c-new/src/generated/to_rotate.cpp +++ b/spine-c-new/src/generated/to_rotate.cpp @@ -40,11 +40,11 @@ void spine_to_rotate_dispose(spine_to_rotate obj) { float spine_to_rotate_mix(spine_to_rotate obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToRotate *_obj = (ToRotate *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_rotate_apply(spine_to_rotate obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_rotate_apply(spine_to_rotate obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToRotate *_obj = (ToRotate *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_rotate.h b/spine-c-new/src/generated/to_rotate.h index 53eb43110..07d6341f2 100644 --- a/spine-c-new/src/generated/to_rotate.h +++ b/spine-c-new/src/generated/to_rotate.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_rotate) +#include "types.h" SPINE_C_EXPORT void spine_to_rotate_dispose(spine_to_rotate obj); SPINE_C_EXPORT float spine_to_rotate_mix(spine_to_rotate obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_rotate_apply(spine_to_rotate obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_rotate_apply(spine_to_rotate obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_scale_x.cpp b/spine-c-new/src/generated/to_scale_x.cpp index 5bd13b0b5..063b2acd3 100644 --- a/spine-c-new/src/generated/to_scale_x.cpp +++ b/spine-c-new/src/generated/to_scale_x.cpp @@ -40,11 +40,11 @@ void spine_to_scale_x_dispose(spine_to_scale_x obj) { float spine_to_scale_x_mix(spine_to_scale_x obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToScaleX *_obj = (ToScaleX *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_scale_x_apply(spine_to_scale_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_scale_x_apply(spine_to_scale_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToScaleX *_obj = (ToScaleX *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_scale_x.h b/spine-c-new/src/generated/to_scale_x.h index e3518fc04..76d6453e9 100644 --- a/spine-c-new/src/generated/to_scale_x.h +++ b/spine-c-new/src/generated/to_scale_x.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_scale_x) +#include "types.h" SPINE_C_EXPORT void spine_to_scale_x_dispose(spine_to_scale_x obj); SPINE_C_EXPORT float spine_to_scale_x_mix(spine_to_scale_x obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_scale_x_apply(spine_to_scale_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_scale_x_apply(spine_to_scale_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_scale_y.cpp b/spine-c-new/src/generated/to_scale_y.cpp index 420a218d2..20af41fc2 100644 --- a/spine-c-new/src/generated/to_scale_y.cpp +++ b/spine-c-new/src/generated/to_scale_y.cpp @@ -40,11 +40,11 @@ void spine_to_scale_y_dispose(spine_to_scale_y obj) { float spine_to_scale_y_mix(spine_to_scale_y obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToScaleY *_obj = (ToScaleY *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_scale_y_apply(spine_to_scale_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_scale_y_apply(spine_to_scale_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToScaleY *_obj = (ToScaleY *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_scale_y.h b/spine-c-new/src/generated/to_scale_y.h index a1ab8888a..fb7f6c7f4 100644 --- a/spine-c-new/src/generated/to_scale_y.h +++ b/spine-c-new/src/generated/to_scale_y.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_scale_y) +#include "types.h" SPINE_C_EXPORT void spine_to_scale_y_dispose(spine_to_scale_y obj); SPINE_C_EXPORT float spine_to_scale_y_mix(spine_to_scale_y obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_scale_y_apply(spine_to_scale_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_scale_y_apply(spine_to_scale_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_shear_y.cpp b/spine-c-new/src/generated/to_shear_y.cpp index 6907f9eef..2f15c0223 100644 --- a/spine-c-new/src/generated/to_shear_y.cpp +++ b/spine-c-new/src/generated/to_shear_y.cpp @@ -40,11 +40,11 @@ void spine_to_shear_y_dispose(spine_to_shear_y obj) { float spine_to_shear_y_mix(spine_to_shear_y obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToShearY *_obj = (ToShearY *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_shear_y_apply(spine_to_shear_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_shear_y_apply(spine_to_shear_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToShearY *_obj = (ToShearY *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_shear_y.h b/spine-c-new/src/generated/to_shear_y.h index db3e2f277..1431c94c6 100644 --- a/spine-c-new/src/generated/to_shear_y.h +++ b/spine-c-new/src/generated/to_shear_y.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_shear_y) +#include "types.h" SPINE_C_EXPORT void spine_to_shear_y_dispose(spine_to_shear_y obj); SPINE_C_EXPORT float spine_to_shear_y_mix(spine_to_shear_y obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_shear_y_apply(spine_to_shear_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_shear_y_apply(spine_to_shear_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_x.cpp b/spine-c-new/src/generated/to_x.cpp index dbd634b2d..b42ce66ec 100644 --- a/spine-c-new/src/generated/to_x.cpp +++ b/spine-c-new/src/generated/to_x.cpp @@ -40,11 +40,11 @@ void spine_to_x_dispose(spine_to_x obj) { float spine_to_x_mix(spine_to_x obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToX *_obj = (ToX *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_x_apply(spine_to_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_x_apply(spine_to_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToX *_obj = (ToX *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_x.h b/spine-c-new/src/generated/to_x.h index 7031d2d84..fd0078891 100644 --- a/spine-c-new/src/generated/to_x.h +++ b/spine-c-new/src/generated/to_x.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_x) +#include "types.h" SPINE_C_EXPORT void spine_to_x_dispose(spine_to_x obj); SPINE_C_EXPORT float spine_to_x_mix(spine_to_x obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_x_apply(spine_to_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_x_apply(spine_to_x obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/to_y.cpp b/spine-c-new/src/generated/to_y.cpp index a45746be5..e74b8cb9f 100644 --- a/spine-c-new/src/generated/to_y.cpp +++ b/spine-c-new/src/generated/to_y.cpp @@ -40,11 +40,11 @@ void spine_to_y_dispose(spine_to_y obj) { float spine_to_y_mix(spine_to_y obj, spine_transform_constraint_pose pose) { if (!obj) return 0; ToY *_obj = (ToY *) obj; - return _obj->mix(pose); + return _obj->mix(*(TransformConstraintPose*) pose); } -void spine_to_y_apply(spine_to_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive) { +void spine_to_y_apply(spine_to_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { if (!obj) return ; ToY *_obj = (ToY *) obj; - _obj->apply(skeleton, pose, bone, value, local, additive); + _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); } diff --git a/spine-c-new/src/generated/to_y.h b/spine-c-new/src/generated/to_y.h index bb30d1e07..dc35984f9 100644 --- a/spine-c-new/src/generated/to_y.h +++ b/spine-c-new/src/generated/to_y.h @@ -34,13 +34,11 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_to_y) +#include "types.h" SPINE_C_EXPORT void spine_to_y_dispose(spine_to_y obj); SPINE_C_EXPORT float spine_to_y_mix(spine_to_y obj, spine_transform_constraint_pose pose); -SPINE_C_EXPORT void spine_to_y_apply(spine_to_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, spine_bool local, spine_bool additive); +SPINE_C_EXPORT void spine_to_y_apply(spine_to_y obj, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/track_entry.cpp b/spine-c-new/src/generated/track_entry.cpp index a99de4ebd..8ca65258a 100644 --- a/spine-c-new/src/generated/track_entry.cpp +++ b/spine-c-new/src/generated/track_entry.cpp @@ -42,14 +42,14 @@ void spine_track_entry_dispose(spine_track_entry obj) { delete (TrackEntry *) obj; } -int32_t spine_track_entry_get_track_index(spine_track_entry obj) { +int spine_track_entry_get_track_index(spine_track_entry obj) { if (!obj) return 0; TrackEntry *_obj = (TrackEntry *) obj; return _obj->getTrackIndex(); } spine_animation spine_track_entry_get_animation(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_animation) 0; TrackEntry *_obj = (TrackEntry *) obj; return (spine_animation) _obj->getAnimation(); } @@ -61,54 +61,54 @@ void spine_track_entry_set_animation(spine_track_entry obj, spine_animation valu } spine_track_entry spine_track_entry_get_previous(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_track_entry) 0; TrackEntry *_obj = (TrackEntry *) obj; return (spine_track_entry) _obj->getPrevious(); } -spine_bool spine_track_entry_get_loop(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_get_loop(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->getLoop(); } -void spine_track_entry_set_loop(spine_track_entry obj, spine_bool value) { +void spine_track_entry_set_loop(spine_track_entry obj, bool value) { if (!obj) return; TrackEntry *_obj = (TrackEntry *) obj; _obj->setLoop(value); } -spine_bool spine_track_entry_get_hold_previous(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_get_hold_previous(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->getHoldPrevious(); } -void spine_track_entry_set_hold_previous(spine_track_entry obj, spine_bool value) { +void spine_track_entry_set_hold_previous(spine_track_entry obj, bool value) { if (!obj) return; TrackEntry *_obj = (TrackEntry *) obj; _obj->setHoldPrevious(value); } -spine_bool spine_track_entry_get_reverse(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_get_reverse(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->getReverse(); } -void spine_track_entry_set_reverse(spine_track_entry obj, spine_bool value) { +void spine_track_entry_set_reverse(spine_track_entry obj, bool value) { if (!obj) return; TrackEntry *_obj = (TrackEntry *) obj; _obj->setReverse(value); } -spine_bool spine_track_entry_get_shortest_rotation(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_get_shortest_rotation(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->getShortestRotation(); } -void spine_track_entry_set_shortest_rotation(spine_track_entry obj, spine_bool value) { +void spine_track_entry_set_shortest_rotation(spine_track_entry obj, bool value) { if (!obj) return; TrackEntry *_obj = (TrackEntry *) obj; _obj->setShortestRotation(value); @@ -265,13 +265,13 @@ void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry obj, float } spine_track_entry spine_track_entry_get_next(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_track_entry) 0; TrackEntry *_obj = (TrackEntry *) obj; return (spine_track_entry) _obj->getNext(); } -spine_bool spine_track_entry_is_complete(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_is_complete(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->isComplete(); } @@ -307,25 +307,25 @@ void spine_track_entry_set_mix_duration(spine_track_entry obj, float mixDuration } spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_mix_blend) 0; TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getMixBlend(); + return (spine_mix_blend) _obj->getMixBlend(); } void spine_track_entry_set_mix_blend(spine_track_entry obj, spine_mix_blend value) { if (!obj) return; TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixBlend(value); + _obj->setMixBlend((MixBlend) value); } spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_track_entry) 0; TrackEntry *_obj = (TrackEntry *) obj; return (spine_track_entry) _obj->getMixingFrom(); } spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry obj) { - if (!obj) return nullptr; + if (!obj) return (spine_track_entry) 0; TrackEntry *_obj = (TrackEntry *) obj; return (spine_track_entry) _obj->getMixingTo(); } @@ -342,44 +342,26 @@ float spine_track_entry_get_track_complete(spine_track_entry obj) { return _obj->getTrackComplete(); } -void spine_track_entry_set_listener(spine_track_entry obj, spine_animation_state_listener value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setListener(value); -} - -void spine_track_entry_set_listener(spine_track_entry obj, spine_animation_state_listener_object value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setListener((AnimationStateListenerObject *) value); -} - -spine_bool spine_track_entry_is_empty_animation(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_is_empty_animation(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->isEmptyAnimation(); } -spine_bool spine_track_entry_was_applied(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_was_applied(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->wasApplied(); } -spine_bool spine_track_entry_is_next_ready(spine_track_entry obj) { - if (!obj) return 0; +bool spine_track_entry_is_next_ready(spine_track_entry obj) { + if (!obj) return false; TrackEntry *_obj = (TrackEntry *) obj; return _obj->isNextReady(); } -spine_void spine_track_entry_get_renderer_object(spine_track_entry obj) { +void * spine_track_entry_get_renderer_object(spine_track_entry obj) { if (!obj) return nullptr; TrackEntry *_obj = (TrackEntry *) obj; - return (spine_void) _obj->getRendererObject(); -} - -void spine_track_entry_set_renderer_object(spine_track_entry obj, spine_void rendererObject, spine_dispose_renderer_object dispose) { - if (!obj) return ; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setRendererObject((void *) rendererObject, dispose); + return (void *) _obj->getRendererObject(); } diff --git a/spine-c-new/src/generated/track_entry.h b/spine-c-new/src/generated/track_entry.h index 3d733b07b..5c9a3d1bf 100644 --- a/spine-c-new/src/generated/track_entry.h +++ b/spine-c-new/src/generated/track_entry.h @@ -34,24 +34,22 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_track_entry) +#include "types.h" SPINE_C_EXPORT spine_track_entry spine_track_entry_create(void); SPINE_C_EXPORT void spine_track_entry_dispose(spine_track_entry obj); -SPINE_C_EXPORT int32_t spine_track_entry_get_track_index(spine_track_entry obj); +SPINE_C_EXPORT int spine_track_entry_get_track_index(spine_track_entry obj); SPINE_C_EXPORT spine_animation spine_track_entry_get_animation(spine_track_entry obj); SPINE_C_EXPORT void spine_track_entry_set_animation(spine_track_entry obj, spine_animation value); SPINE_C_EXPORT spine_track_entry spine_track_entry_get_previous(spine_track_entry obj); -SPINE_C_EXPORT spine_bool spine_track_entry_get_loop(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_loop(spine_track_entry obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_track_entry_get_hold_previous(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_hold_previous(spine_track_entry obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_track_entry_get_reverse(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_reverse(spine_track_entry obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_track_entry_get_shortest_rotation(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_shortest_rotation(spine_track_entry obj, spine_bool value); +SPINE_C_EXPORT bool spine_track_entry_get_loop(spine_track_entry obj); +SPINE_C_EXPORT void spine_track_entry_set_loop(spine_track_entry obj, bool value); +SPINE_C_EXPORT bool spine_track_entry_get_hold_previous(spine_track_entry obj); +SPINE_C_EXPORT void spine_track_entry_set_hold_previous(spine_track_entry obj, bool value); +SPINE_C_EXPORT bool spine_track_entry_get_reverse(spine_track_entry obj); +SPINE_C_EXPORT void spine_track_entry_set_reverse(spine_track_entry obj, bool value); +SPINE_C_EXPORT bool spine_track_entry_get_shortest_rotation(spine_track_entry obj); +SPINE_C_EXPORT void spine_track_entry_set_shortest_rotation(spine_track_entry obj, bool value); SPINE_C_EXPORT float spine_track_entry_get_delay(spine_track_entry obj); SPINE_C_EXPORT void spine_track_entry_set_delay(spine_track_entry obj, float value); SPINE_C_EXPORT float spine_track_entry_get_track_time(spine_track_entry obj); @@ -78,7 +76,7 @@ SPINE_C_EXPORT void spine_track_entry_set_alpha_attachment_threshold(spine_track SPINE_C_EXPORT float spine_track_entry_get_mix_draw_order_threshold(spine_track_entry obj); SPINE_C_EXPORT void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry obj, float value); SPINE_C_EXPORT spine_track_entry spine_track_entry_get_next(spine_track_entry obj); -SPINE_C_EXPORT spine_bool spine_track_entry_is_complete(spine_track_entry obj); +SPINE_C_EXPORT bool spine_track_entry_is_complete(spine_track_entry obj); SPINE_C_EXPORT float spine_track_entry_get_mix_time(spine_track_entry obj); SPINE_C_EXPORT void spine_track_entry_set_mix_time(spine_track_entry obj, float value); SPINE_C_EXPORT float spine_track_entry_get_mix_duration(spine_track_entry obj); @@ -90,13 +88,10 @@ SPINE_C_EXPORT spine_track_entry spine_track_entry_get_mixing_from(spine_track_e SPINE_C_EXPORT spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry obj); SPINE_C_EXPORT void spine_track_entry_reset_rotation_directions(spine_track_entry obj); SPINE_C_EXPORT float spine_track_entry_get_track_complete(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_listener(spine_track_entry obj, spine_animation_state_listener value); -SPINE_C_EXPORT void spine_track_entry_set_listener(spine_track_entry obj, spine_animation_state_listener_object value); -SPINE_C_EXPORT spine_bool spine_track_entry_is_empty_animation(spine_track_entry obj); -SPINE_C_EXPORT spine_bool spine_track_entry_was_applied(spine_track_entry obj); -SPINE_C_EXPORT spine_bool spine_track_entry_is_next_ready(spine_track_entry obj); -SPINE_C_EXPORT spine_void spine_track_entry_get_renderer_object(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_renderer_object(spine_track_entry obj, spine_void rendererObject, spine_dispose_renderer_object dispose); +SPINE_C_EXPORT bool spine_track_entry_is_empty_animation(spine_track_entry obj); +SPINE_C_EXPORT bool spine_track_entry_was_applied(spine_track_entry obj); +SPINE_C_EXPORT bool spine_track_entry_is_next_ready(spine_track_entry obj); +SPINE_C_EXPORT void * spine_track_entry_get_renderer_object(spine_track_entry obj); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/transform_constraint.cpp b/spine-c-new/src/generated/transform_constraint.cpp index 328765571..f3a40ad70 100644 --- a/spine-c-new/src/generated/transform_constraint.cpp +++ b/spine-c-new/src/generated/transform_constraint.cpp @@ -33,7 +33,7 @@ using namespace spine; spine_transform_constraint spine_transform_constraint_create(spine_transform_constraint_data data, spine_skeleton skeleton) { - TransformConstraint *obj = new (__FILE__, __LINE__) TransformConstraint(data, skeleton); + TransformConstraint *obj = new (__FILE__, __LINE__) TransformConstraint(*(TransformConstraintData*) data, *(Skeleton*) skeleton); return (spine_transform_constraint) obj; } @@ -42,42 +42,34 @@ void spine_transform_constraint_dispose(spine_transform_constraint obj) { delete (TransformConstraint *) obj; } -spine_rtti spine_transform_constraint_get_rtti(spine_transform_constraint obj) { - if (!obj) return nullptr; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_transform_constraint_get_rtti() { + return (spine_rtti) &TransformConstraint::rtti; } spine_transform_constraint spine_transform_constraint_copy(spine_transform_constraint obj, spine_skeleton skeleton) { if (!obj) return 0; TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_transform_constraint) _obj->copy(skeleton); + return (spine_transform_constraint) _obj->copy(*(Skeleton*) skeleton); } void spine_transform_constraint_update(spine_transform_constraint obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } void spine_transform_constraint_sort(spine_transform_constraint obj, spine_skeleton skeleton) { if (!obj) return ; TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->sort(skeleton); + _obj->sort(*(Skeleton*) skeleton); } -spine_bool spine_transform_constraint_is_source_active(spine_transform_constraint obj) { - if (!obj) return 0; +bool spine_transform_constraint_is_source_active(spine_transform_constraint obj) { + if (!obj) return false; TransformConstraint *_obj = (TransformConstraint *) obj; return _obj->isSourceActive(); } -void * spine_transform_constraint_get_bones(spine_transform_constraint obj) { - if (!obj) return nullptr; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (void *) _obj->getBones(); -} - int32_t spine_transform_constraint_get_num_bones(spine_transform_constraint obj) { if (!obj) return 0; TransformConstraint *_obj = (TransformConstraint *) obj; @@ -91,7 +83,7 @@ spine_bone_pose *spine_transform_constraint_get_bones(spine_transform_constraint } spine_bone spine_transform_constraint_get_source(spine_transform_constraint obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone) 0; TransformConstraint *_obj = (TransformConstraint *) obj; return (spine_bone) _obj->getSource(); } @@ -105,7 +97,7 @@ void spine_transform_constraint_set_source(spine_transform_constraint obj, spine spine_constraint_data spine_transform_constraint_get_data(spine_transform_constraint obj) { if (!obj) return 0; TransformConstraint *_obj = (TransformConstraint *) obj; - return _obj->getData(); + return (spine_constraint_data) &_obj->getData(); } void spine_transform_constraint_pose(spine_transform_constraint obj) { @@ -123,13 +115,13 @@ void spine_transform_constraint_setup_pose(spine_transform_constraint obj) { spine_transform_constraint_pose spine_transform_constraint_get_pose(spine_transform_constraint obj) { if (!obj) return 0; TransformConstraint *_obj = (TransformConstraint *) obj; - return _obj->getPose(); + return (spine_transform_constraint_pose) &_obj->getPose(); } spine_transform_constraint_pose spine_transform_constraint_get_applied_pose(spine_transform_constraint obj) { if (!obj) return 0; TransformConstraint *_obj = (TransformConstraint *) obj; - return _obj->getAppliedPose(); + return (spine_transform_constraint_pose) &_obj->getAppliedPose(); } void spine_transform_constraint_reset_constrained(spine_transform_constraint obj) { @@ -144,19 +136,19 @@ void spine_transform_constraint_constrained(spine_transform_constraint obj) { _obj->constrained(); } -spine_bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint obj) { - if (!obj) return 0; +bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint obj) { + if (!obj) return false; TransformConstraint *_obj = (TransformConstraint *) obj; return _obj->isPoseEqualToApplied(); } -spine_bool spine_transform_constraint_is_active(spine_transform_constraint obj) { - if (!obj) return 0; +bool spine_transform_constraint_is_active(spine_transform_constraint obj) { + if (!obj) return false; TransformConstraint *_obj = (TransformConstraint *) obj; return _obj->isActive(); } -void spine_transform_constraint_set_active(spine_transform_constraint obj, spine_bool value) { +void spine_transform_constraint_set_active(spine_transform_constraint obj, bool value) { if (!obj) return; TransformConstraint *_obj = (TransformConstraint *) obj; _obj->setActive(value); diff --git a/spine-c-new/src/generated/transform_constraint.h b/spine-c-new/src/generated/transform_constraint.h index cc394a620..b1bbb0c00 100644 --- a/spine-c-new/src/generated/transform_constraint.h +++ b/spine-c-new/src/generated/transform_constraint.h @@ -34,18 +34,15 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_transform_constraint) +#include "types.h" SPINE_C_EXPORT spine_transform_constraint spine_transform_constraint_create(spine_transform_constraint_data data, spine_skeleton skeleton); SPINE_C_EXPORT void spine_transform_constraint_dispose(spine_transform_constraint obj); -SPINE_C_EXPORT spine_rtti spine_transform_constraint_get_rtti(spine_transform_constraint obj); +SPINE_C_EXPORT spine_rtti spine_transform_constraint_get_rtti(); SPINE_C_EXPORT spine_transform_constraint spine_transform_constraint_copy(spine_transform_constraint obj, spine_skeleton skeleton); SPINE_C_EXPORT void spine_transform_constraint_update(spine_transform_constraint obj, spine_skeleton skeleton, spine_physics physics); SPINE_C_EXPORT void spine_transform_constraint_sort(spine_transform_constraint obj, spine_skeleton skeleton); -SPINE_C_EXPORT spine_bool spine_transform_constraint_is_source_active(spine_transform_constraint obj); -SPINE_C_EXPORT void * spine_transform_constraint_get_bones(spine_transform_constraint obj); +SPINE_C_EXPORT bool spine_transform_constraint_is_source_active(spine_transform_constraint obj); SPINE_C_EXPORT int32_t spine_transform_constraint_get_num_bones(spine_transform_constraint obj); SPINE_C_EXPORT spine_bone_pose *spine_transform_constraint_get_bones(spine_transform_constraint obj); SPINE_C_EXPORT spine_bone spine_transform_constraint_get_source(spine_transform_constraint obj); @@ -57,9 +54,9 @@ SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_get_po SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_get_applied_pose(spine_transform_constraint obj); SPINE_C_EXPORT void spine_transform_constraint_reset_constrained(spine_transform_constraint obj); SPINE_C_EXPORT void spine_transform_constraint_constrained(spine_transform_constraint obj); -SPINE_C_EXPORT spine_bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint obj); -SPINE_C_EXPORT spine_bool spine_transform_constraint_is_active(spine_transform_constraint obj); -SPINE_C_EXPORT void spine_transform_constraint_set_active(spine_transform_constraint obj, spine_bool value); +SPINE_C_EXPORT bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint obj); +SPINE_C_EXPORT bool spine_transform_constraint_is_active(spine_transform_constraint obj); +SPINE_C_EXPORT void spine_transform_constraint_set_active(spine_transform_constraint obj, bool value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/transform_constraint_data.cpp b/spine-c-new/src/generated/transform_constraint_data.cpp index 10086e7e9..4c90d3970 100644 --- a/spine-c-new/src/generated/transform_constraint_data.cpp +++ b/spine-c-new/src/generated/transform_constraint_data.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_transform_constraint_data spine_transform_constraint_data_create(const utf8 * name) { +spine_transform_constraint_data spine_transform_constraint_data_create(const char* name) { TransformConstraintData *obj = new (__FILE__, __LINE__) TransformConstraintData(String(name)); return (spine_transform_constraint_data) obj; } @@ -42,22 +42,14 @@ void spine_transform_constraint_data_dispose(spine_transform_constraint_data obj delete (TransformConstraintData *) obj; } -spine_rtti spine_transform_constraint_data_get_rtti(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_transform_constraint_data_get_rtti() { + return (spine_rtti) &TransformConstraintData::rtti; } spine_constraint spine_transform_constraint_data_create(spine_transform_constraint_data obj, spine_skeleton skeleton) { if (!obj) return 0; TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (spine_constraint) _obj->create(skeleton); -} - -void * spine_transform_constraint_data_get_bones(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (void *) _obj->getBones(); + return (spine_constraint) _obj->create(*(Skeleton*) skeleton); } int32_t spine_transform_constraint_data_get_num_bones(spine_transform_constraint_data obj) { @@ -73,7 +65,7 @@ spine_bone_data *spine_transform_constraint_data_get_bones(spine_transform_const } spine_bone_data spine_transform_constraint_data_get_source(spine_transform_constraint_data obj) { - if (!obj) return nullptr; + if (!obj) return (spine_bone_data) 0; TransformConstraintData *_obj = (TransformConstraintData *) obj; return (spine_bone_data) _obj->getSource(); } @@ -156,60 +148,54 @@ void spine_transform_constraint_data_set_offset_shear_y(spine_transform_constrai _obj->setOffsetShearY(value); } -spine_bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data obj) { - if (!obj) return 0; +bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data obj) { + if (!obj) return false; TransformConstraintData *_obj = (TransformConstraintData *) obj; return _obj->getLocalSource(); } -void spine_transform_constraint_data_set_local_source(spine_transform_constraint_data obj, spine_bool value) { +void spine_transform_constraint_data_set_local_source(spine_transform_constraint_data obj, bool value) { if (!obj) return; TransformConstraintData *_obj = (TransformConstraintData *) obj; _obj->setLocalSource(value); } -spine_bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data obj) { - if (!obj) return 0; +bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data obj) { + if (!obj) return false; TransformConstraintData *_obj = (TransformConstraintData *) obj; return _obj->getLocalTarget(); } -void spine_transform_constraint_data_set_local_target(spine_transform_constraint_data obj, spine_bool value) { +void spine_transform_constraint_data_set_local_target(spine_transform_constraint_data obj, bool value) { if (!obj) return; TransformConstraintData *_obj = (TransformConstraintData *) obj; _obj->setLocalTarget(value); } -spine_bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data obj) { - if (!obj) return 0; +bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data obj) { + if (!obj) return false; TransformConstraintData *_obj = (TransformConstraintData *) obj; return _obj->getAdditive(); } -void spine_transform_constraint_data_set_additive(spine_transform_constraint_data obj, spine_bool value) { +void spine_transform_constraint_data_set_additive(spine_transform_constraint_data obj, bool value) { if (!obj) return; TransformConstraintData *_obj = (TransformConstraintData *) obj; _obj->setAdditive(value); } -spine_bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data obj) { - if (!obj) return 0; +bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data obj) { + if (!obj) return false; TransformConstraintData *_obj = (TransformConstraintData *) obj; return _obj->getClamp(); } -void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data obj, spine_bool value) { +void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data obj, bool value) { if (!obj) return; TransformConstraintData *_obj = (TransformConstraintData *) obj; _obj->setClamp(value); } -void * spine_transform_constraint_data_get_properties(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (void *) _obj->getProperties(); -} - int32_t spine_transform_constraint_data_get_num_properties(spine_transform_constraint_data obj) { if (!obj) return 0; TransformConstraintData *_obj = (TransformConstraintData *) obj; @@ -222,14 +208,14 @@ spine_class from_property *spine_transform_constraint_data_get_properties(spine_ return (spine_class from_property *) _obj->getProperties().buffer(); } -const utf8 * spine_transform_constraint_data_get_name(spine_transform_constraint_data obj) { +const char* spine_transform_constraint_data_get_name(spine_transform_constraint_data obj) { if (!obj) return nullptr; TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } -spine_bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data obj) { - if (!obj) return 0; +bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data obj) { + if (!obj) return false; TransformConstraintData *_obj = (TransformConstraintData *) obj; return _obj->isSkinRequired(); } @@ -237,11 +223,5 @@ spine_bool spine_transform_constraint_data_is_skin_required(spine_transform_cons spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data obj) { if (!obj) return 0; TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getSetupPose(); -} - -spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getSetupPose(); + return (spine_transform_constraint_pose) &_obj->getSetupPose(); } diff --git a/spine-c-new/src/generated/transform_constraint_data.h b/spine-c-new/src/generated/transform_constraint_data.h index d6dcdbd87..b9b805298 100644 --- a/spine-c-new/src/generated/transform_constraint_data.h +++ b/spine-c-new/src/generated/transform_constraint_data.h @@ -34,15 +34,12 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_transform_constraint_data) - -SPINE_C_EXPORT spine_transform_constraint_data spine_transform_constraint_data_create(const utf8 * name); +SPINE_C_EXPORT spine_transform_constraint_data spine_transform_constraint_data_create(const char* name); SPINE_C_EXPORT void spine_transform_constraint_data_dispose(spine_transform_constraint_data obj); -SPINE_C_EXPORT spine_rtti spine_transform_constraint_data_get_rtti(spine_transform_constraint_data obj); +SPINE_C_EXPORT spine_rtti spine_transform_constraint_data_get_rtti(); SPINE_C_EXPORT spine_constraint spine_transform_constraint_data_create(spine_transform_constraint_data obj, spine_skeleton skeleton); -SPINE_C_EXPORT void * spine_transform_constraint_data_get_bones(spine_transform_constraint_data obj); SPINE_C_EXPORT int32_t spine_transform_constraint_data_get_num_bones(spine_transform_constraint_data obj); SPINE_C_EXPORT spine_bone_data *spine_transform_constraint_data_get_bones(spine_transform_constraint_data obj); SPINE_C_EXPORT spine_bone_data spine_transform_constraint_data_get_source(spine_transform_constraint_data obj); @@ -59,20 +56,18 @@ SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_scale_y(spine_tr SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_scale_y(spine_transform_constraint_data obj, float value); SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_shear_y(spine_transform_constraint_data obj); SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_shear_y(spine_transform_constraint_data obj, float value); -SPINE_C_EXPORT spine_bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_local_source(spine_transform_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_local_target(spine_transform_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_additive(spine_transform_constraint_data obj, spine_bool value); -SPINE_C_EXPORT spine_bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data obj, spine_bool value); -SPINE_C_EXPORT void * spine_transform_constraint_data_get_properties(spine_transform_constraint_data obj); +SPINE_C_EXPORT bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data obj); +SPINE_C_EXPORT void spine_transform_constraint_data_set_local_source(spine_transform_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data obj); +SPINE_C_EXPORT void spine_transform_constraint_data_set_local_target(spine_transform_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data obj); +SPINE_C_EXPORT void spine_transform_constraint_data_set_additive(spine_transform_constraint_data obj, bool value); +SPINE_C_EXPORT bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data obj); +SPINE_C_EXPORT void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data obj, bool value); SPINE_C_EXPORT int32_t spine_transform_constraint_data_get_num_properties(spine_transform_constraint_data obj); SPINE_C_EXPORT spine_class from_property *spine_transform_constraint_data_get_properties(spine_transform_constraint_data obj); -SPINE_C_EXPORT const utf8 * spine_transform_constraint_data_get_name(spine_transform_constraint_data obj); -SPINE_C_EXPORT spine_bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data obj); -SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data obj); +SPINE_C_EXPORT const char* spine_transform_constraint_data_get_name(spine_transform_constraint_data obj); +SPINE_C_EXPORT bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data obj); SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data obj); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/transform_constraint_pose.cpp b/spine-c-new/src/generated/transform_constraint_pose.cpp index b35b565b7..970a9f793 100644 --- a/spine-c-new/src/generated/transform_constraint_pose.cpp +++ b/spine-c-new/src/generated/transform_constraint_pose.cpp @@ -45,7 +45,7 @@ void spine_transform_constraint_pose_dispose(spine_transform_constraint_pose obj void spine_transform_constraint_pose_set(spine_transform_constraint_pose obj, spine_transform_constraint_pose value) { if (!obj) return; TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->set(value); + _obj->set(*((TransformConstraintPose*) value)); } float spine_transform_constraint_pose_get_mix_rotate(spine_transform_constraint_pose obj) { diff --git a/spine-c-new/src/generated/transform_constraint_pose.h b/spine-c-new/src/generated/transform_constraint_pose.h index 4aa85de5c..886f92b17 100644 --- a/spine-c-new/src/generated/transform_constraint_pose.h +++ b/spine-c-new/src/generated/transform_constraint_pose.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_transform_constraint_pose) +#include "types.h" SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_pose_create(void); SPINE_C_EXPORT void spine_transform_constraint_pose_dispose(spine_transform_constraint_pose obj); diff --git a/spine-c-new/src/generated/transform_constraint_timeline.cpp b/spine-c-new/src/generated/transform_constraint_timeline.cpp index 25006a4f8..c3e31c8e9 100644 --- a/spine-c-new/src/generated/transform_constraint_timeline.cpp +++ b/spine-c-new/src/generated/transform_constraint_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_transform_constraint_timeline spine_transform_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t transformConstraintIndex) { +spine_transform_constraint_timeline spine_transform_constraint_timeline_create(size_t frameCount, size_t bezierCount, int transformConstraintIndex) { TransformConstraintTimeline *obj = new (__FILE__, __LINE__) TransformConstraintTimeline(frameCount, bezierCount, transformConstraintIndex); return (spine_transform_constraint_timeline) obj; } @@ -42,94 +42,80 @@ void spine_transform_constraint_timeline_dispose(spine_transform_constraint_time delete (TransformConstraintTimeline *) obj; } -spine_rtti spine_transform_constraint_timeline_get_rtti(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_transform_constraint_timeline_get_rtti() { + return (spine_rtti) &TransformConstraintTimeline::rtti; } -void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_transform_constraint_timeline_set_frame(spine_transform_constraint_timeline obj, int32_t frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY) { +void spine_transform_constraint_timeline_set_frame(spine_transform_constraint_timeline obj, int frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY) { if (!obj) return ; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; _obj->setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY); } -void spine_transform_constraint_timeline_set_linear(spine_transform_constraint_timeline obj, spine_size_t value) { +void spine_transform_constraint_timeline_set_linear(spine_transform_constraint_timeline obj, size_t value) { if (!obj) return; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; _obj->setLinear(value); } -void spine_transform_constraint_timeline_set_stepped(spine_transform_constraint_timeline obj, spine_size_t value) { +void spine_transform_constraint_timeline_set_stepped(spine_transform_constraint_timeline obj, size_t value) { if (!obj) return; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; _obj->setStepped(value); } -void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { +void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { if (!obj) return ; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; _obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) { +float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) { if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return _obj->getBezierValue(time, frame, valueOffset, i); } -void * spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return _obj->getCurves(); -} - int32_t spine_transform_constraint_timeline_get_num_curves(spine_transform_constraint_timeline obj) { if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return (int32_t) _obj->getCurves().size(); } -spine_float *spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj) { +float *spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj) { if (!obj) return nullptr; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (spine_float *) _obj->getCurves().buffer(); + return (float *) _obj->getCurves().buffer(); } -spine_size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline obj) { + if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return _obj->getFrameEntries(); } -spine_size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; +size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline obj) { + if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return _obj->getFrameCount(); } -void * spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return _obj->getFrames(); -} - int32_t spine_transform_constraint_timeline_get_num_frames(spine_transform_constraint_timeline obj) { if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return (int32_t) _obj->getFrames().size(); } -spine_float *spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj) { +float *spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj) { if (!obj) return nullptr; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (spine_float *) _obj->getFrames().buffer(); + return (float *) _obj->getFrames().buffer(); } float spine_transform_constraint_timeline_get_duration(spine_transform_constraint_timeline obj) { @@ -138,31 +124,25 @@ float spine_transform_constraint_timeline_get_duration(spine_transform_constrain return _obj->getDuration(); } -void * spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return _obj->getPropertyIds(); -} - int32_t spine_transform_constraint_timeline_get_num_property_ids(spine_transform_constraint_timeline obj) { if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return (int32_t) _obj->getPropertyIds().size(); } -spine_property_id *spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj) { +int64_t *spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj) { if (!obj) return nullptr; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (spine_property_id *) _obj->getPropertyIds().buffer(); + return (int64_t *) _obj->getPropertyIds().buffer(); } -int32_t spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline obj) { +int spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline obj) { if (!obj) return 0; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; return _obj->getConstraintIndex(); } -void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline obj, int32_t value) { +void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline obj, int value) { if (!obj) return; TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; _obj->setConstraintIndex(value); diff --git a/spine-c-new/src/generated/transform_constraint_timeline.h b/spine-c-new/src/generated/transform_constraint_timeline.h index 8bc63c1bd..1f5358f99 100644 --- a/spine-c-new/src/generated/transform_constraint_timeline.h +++ b/spine-c-new/src/generated/transform_constraint_timeline.h @@ -34,33 +34,28 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_transform_constraint_timeline) - -SPINE_C_EXPORT spine_transform_constraint_timeline spine_transform_constraint_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t transformConstraintIndex); +SPINE_C_EXPORT spine_transform_constraint_timeline spine_transform_constraint_timeline_create(size_t frameCount, size_t bezierCount, int transformConstraintIndex); SPINE_C_EXPORT void spine_transform_constraint_timeline_dispose(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_rtti spine_transform_constraint_timeline_get_rtti(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_transform_constraint_timeline_set_frame(spine_transform_constraint_timeline obj, int32_t frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY); -SPINE_C_EXPORT void spine_transform_constraint_timeline_set_linear(spine_transform_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_transform_constraint_timeline_set_stepped(spine_transform_constraint_timeline obj, spine_size_t value); -SPINE_C_EXPORT void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); -SPINE_C_EXPORT float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i); -SPINE_C_EXPORT void * spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT spine_rtti spine_transform_constraint_timeline_get_rtti(); +SPINE_C_EXPORT void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_transform_constraint_timeline_set_frame(spine_transform_constraint_timeline obj, int frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY); +SPINE_C_EXPORT void spine_transform_constraint_timeline_set_linear(spine_transform_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_transform_constraint_timeline_set_stepped(spine_transform_constraint_timeline obj, size_t value); +SPINE_C_EXPORT void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2); +SPINE_C_EXPORT float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline obj, float time, size_t frame, size_t valueOffset, size_t i); SPINE_C_EXPORT int32_t spine_transform_constraint_timeline_get_num_curves(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT void * spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT float *spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_transform_constraint_timeline_get_num_frames(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_float *spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT float *spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj); SPINE_C_EXPORT float spine_transform_constraint_timeline_get_duration(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT void * spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj); SPINE_C_EXPORT int32_t spine_transform_constraint_timeline_get_num_property_ids(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT spine_property_id *spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT int32_t spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline obj); -SPINE_C_EXPORT void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline obj, int32_t value); +SPINE_C_EXPORT int64_t *spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT int spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline obj); +SPINE_C_EXPORT void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/translate_timeline.cpp b/spine-c-new/src/generated/translate_timeline.cpp index 00286e485..02afad1a4 100644 --- a/spine-c-new/src/generated/translate_timeline.cpp +++ b/spine-c-new/src/generated/translate_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_translate_timeline spine_translate_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_translate_timeline spine_translate_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { TranslateTimeline *obj = new (__FILE__, __LINE__) TranslateTimeline(frameCount, bezierCount, boneIndex); return (spine_translate_timeline) obj; } @@ -42,19 +42,17 @@ void spine_translate_timeline_dispose(spine_translate_timeline obj) { delete (TranslateTimeline *) obj; } -spine_rtti spine_translate_timeline_get_rtti(spine_translate_timeline obj) { - if (!obj) return nullptr; - TranslateTimeline *_obj = (TranslateTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_translate_timeline_get_rtti() { + return (spine_rtti) &TranslateTimeline::rtti; } -void spine_translate_timeline_apply(spine_translate_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_translate_timeline_apply(spine_translate_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; TranslateTimeline *_obj = (TranslateTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_translate_timeline_set_frame(spine_translate_timeline obj, spine_size_t frame, float time, float value1, float value2) { +void spine_translate_timeline_set_frame(spine_translate_timeline obj, size_t frame, float time, float value1, float value2) { if (!obj) return ; TranslateTimeline *_obj = (TranslateTimeline *) obj; _obj->setFrame(frame, time, value1, value2); @@ -66,13 +64,13 @@ float spine_translate_timeline_get_curve_value(spine_translate_timeline obj, flo return _obj->getCurveValue(time); } -int32_t spine_translate_timeline_get_bone_index(spine_translate_timeline obj) { +int spine_translate_timeline_get_bone_index(spine_translate_timeline obj) { if (!obj) return 0; TranslateTimeline *_obj = (TranslateTimeline *) obj; return _obj->getBoneIndex(); } -void spine_translate_timeline_set_bone_index(spine_translate_timeline obj, int32_t value) { +void spine_translate_timeline_set_bone_index(spine_translate_timeline obj, int value) { if (!obj) return; TranslateTimeline *_obj = (TranslateTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/translate_timeline.h b/spine-c-new/src/generated/translate_timeline.h index ed7f02fa1..6f2d4485b 100644 --- a/spine-c-new/src/generated/translate_timeline.h +++ b/spine-c-new/src/generated/translate_timeline.h @@ -34,18 +34,16 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_translate_timeline) - -SPINE_C_EXPORT spine_translate_timeline spine_translate_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_translate_timeline spine_translate_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_translate_timeline_dispose(spine_translate_timeline obj); -SPINE_C_EXPORT spine_rtti spine_translate_timeline_get_rtti(spine_translate_timeline obj); -SPINE_C_EXPORT void spine_translate_timeline_apply(spine_translate_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_translate_timeline_set_frame(spine_translate_timeline obj, spine_size_t frame, float time, float value1, float value2); +SPINE_C_EXPORT spine_rtti spine_translate_timeline_get_rtti(); +SPINE_C_EXPORT void spine_translate_timeline_apply(spine_translate_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_translate_timeline_set_frame(spine_translate_timeline obj, size_t frame, float time, float value1, float value2); SPINE_C_EXPORT float spine_translate_timeline_get_curve_value(spine_translate_timeline obj, float time); -SPINE_C_EXPORT int32_t spine_translate_timeline_get_bone_index(spine_translate_timeline obj); -SPINE_C_EXPORT void spine_translate_timeline_set_bone_index(spine_translate_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_translate_timeline_get_bone_index(spine_translate_timeline obj); +SPINE_C_EXPORT void spine_translate_timeline_set_bone_index(spine_translate_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/translate_x_timeline.cpp b/spine-c-new/src/generated/translate_x_timeline.cpp index d63f5f760..eaefac67c 100644 --- a/spine-c-new/src/generated/translate_x_timeline.cpp +++ b/spine-c-new/src/generated/translate_x_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_translate_x_timeline spine_translate_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_translate_x_timeline spine_translate_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { TranslateXTimeline *obj = new (__FILE__, __LINE__) TranslateXTimeline(frameCount, bezierCount, boneIndex); return (spine_translate_x_timeline) obj; } @@ -42,19 +42,17 @@ void spine_translate_x_timeline_dispose(spine_translate_x_timeline obj) { delete (TranslateXTimeline *) obj; } -spine_rtti spine_translate_x_timeline_get_rtti(spine_translate_x_timeline obj) { - if (!obj) return nullptr; - TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_translate_x_timeline_get_rtti() { + return (spine_rtti) &TranslateXTimeline::rtti; } -void spine_translate_x_timeline_apply(spine_translate_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_translate_x_timeline_apply(spine_translate_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_translate_x_timeline_set_frame(spine_translate_x_timeline obj, spine_size_t frame, float time, float value) { +void spine_translate_x_timeline_set_frame(spine_translate_x_timeline obj, size_t frame, float time, float value) { if (!obj) return ; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_translate_x_timeline_get_curve_value(spine_translate_x_timeline obj, float spine_translate_x_timeline_get_relative_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_translate_x_timeline_get_absolute_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_translate_x_timeline_get_absolute_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_translate_x_timeline_get_absolute_value_6(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_translate_x_timeline_get_scale_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline obj) { +int spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline obj) { if (!obj) return 0; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; return _obj->getBoneIndex(); } -void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline obj, int32_t value) { +void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline obj, int value) { if (!obj) return; TranslateXTimeline *_obj = (TranslateXTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/translate_x_timeline.h b/spine-c-new/src/generated/translate_x_timeline.h index 17141d897..cc1392fd1 100644 --- a/spine-c-new/src/generated/translate_x_timeline.h +++ b/spine-c-new/src/generated/translate_x_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_translate_x_timeline) - -SPINE_C_EXPORT spine_translate_x_timeline spine_translate_x_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_translate_x_timeline spine_translate_x_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_translate_x_timeline_dispose(spine_translate_x_timeline obj); -SPINE_C_EXPORT spine_rtti spine_translate_x_timeline_get_rtti(spine_translate_x_timeline obj); -SPINE_C_EXPORT void spine_translate_x_timeline_apply(spine_translate_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_translate_x_timeline_set_frame(spine_translate_x_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_translate_x_timeline_get_rtti(); +SPINE_C_EXPORT void spine_translate_x_timeline_apply(spine_translate_x_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_translate_x_timeline_set_frame(spine_translate_x_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_translate_x_timeline_get_curve_value(spine_translate_x_timeline obj, float time); SPINE_C_EXPORT float spine_translate_x_timeline_get_relative_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_translate_x_timeline_get_absolute_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_translate_x_timeline_get_absolute_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_translate_x_timeline_get_absolute_value_6(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_translate_x_timeline_get_scale_value(spine_translate_x_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline obj); -SPINE_C_EXPORT void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline obj); +SPINE_C_EXPORT void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/translate_y_timeline.cpp b/spine-c-new/src/generated/translate_y_timeline.cpp index 40a94348e..c1ff703e9 100644 --- a/spine-c-new/src/generated/translate_y_timeline.cpp +++ b/spine-c-new/src/generated/translate_y_timeline.cpp @@ -32,7 +32,7 @@ using namespace spine; -spine_translate_y_timeline spine_translate_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex) { +spine_translate_y_timeline spine_translate_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex) { TranslateYTimeline *obj = new (__FILE__, __LINE__) TranslateYTimeline(frameCount, bezierCount, boneIndex); return (spine_translate_y_timeline) obj; } @@ -42,19 +42,17 @@ void spine_translate_y_timeline_dispose(spine_translate_y_timeline obj) { delete (TranslateYTimeline *) obj; } -spine_rtti spine_translate_y_timeline_get_rtti(spine_translate_y_timeline obj) { - if (!obj) return nullptr; - TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_translate_y_timeline_get_rtti() { + return (spine_rtti) &TranslateYTimeline::rtti; } -void spine_translate_y_timeline_apply(spine_translate_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) { +void spine_translate_y_timeline_apply(spine_translate_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { if (!obj) return ; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - _obj->apply(skeleton, lastTime, time, (Vector *) pEvents, alpha, blend, direction, appliedPose); + _obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); } -void spine_translate_y_timeline_set_frame(spine_translate_y_timeline obj, spine_size_t frame, float time, float value) { +void spine_translate_y_timeline_set_frame(spine_translate_y_timeline obj, size_t frame, float time, float value) { if (!obj) return ; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; _obj->setFrame(frame, time, value); @@ -69,34 +67,34 @@ float spine_translate_y_timeline_get_curve_value(spine_translate_y_timeline obj, float spine_translate_y_timeline_get_relative_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return _obj->getRelativeValue(time, alpha, blend, current, setup); + return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup); } float spine_translate_y_timeline_get_absolute_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) { if (!obj) return 0; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); } -float spine_translate_y_timeline_get_absolute_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { +float spine_translate_y_timeline_get_absolute_value_6(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { if (!obj) return 0; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value); + return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value); } float spine_translate_y_timeline_get_scale_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { if (!obj) return 0; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return _obj->getScaleValue(time, alpha, blend, direction, current, setup); + return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup); } -int32_t spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline obj) { +int spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline obj) { if (!obj) return 0; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; return _obj->getBoneIndex(); } -void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline obj, int32_t value) { +void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline obj, int value) { if (!obj) return; TranslateYTimeline *_obj = (TranslateYTimeline *) obj; _obj->setBoneIndex(value); diff --git a/spine-c-new/src/generated/translate_y_timeline.h b/spine-c-new/src/generated/translate_y_timeline.h index 526aca28e..850b3aa1d 100644 --- a/spine-c-new/src/generated/translate_y_timeline.h +++ b/spine-c-new/src/generated/translate_y_timeline.h @@ -34,22 +34,20 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_translate_y_timeline) - -SPINE_C_EXPORT spine_translate_y_timeline spine_translate_y_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex); +SPINE_C_EXPORT spine_translate_y_timeline spine_translate_y_timeline_create(size_t frameCount, size_t bezierCount, int boneIndex); SPINE_C_EXPORT void spine_translate_y_timeline_dispose(spine_translate_y_timeline obj); -SPINE_C_EXPORT spine_rtti spine_translate_y_timeline_get_rtti(spine_translate_y_timeline obj); -SPINE_C_EXPORT void spine_translate_y_timeline_apply(spine_translate_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose); -SPINE_C_EXPORT void spine_translate_y_timeline_set_frame(spine_translate_y_timeline obj, spine_size_t frame, float time, float value); +SPINE_C_EXPORT spine_rtti spine_translate_y_timeline_get_rtti(); +SPINE_C_EXPORT void spine_translate_y_timeline_apply(spine_translate_y_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose); +SPINE_C_EXPORT void spine_translate_y_timeline_set_frame(spine_translate_y_timeline obj, size_t frame, float time, float value); SPINE_C_EXPORT float spine_translate_y_timeline_get_curve_value(spine_translate_y_timeline obj, float time); SPINE_C_EXPORT float spine_translate_y_timeline_get_relative_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); SPINE_C_EXPORT float spine_translate_y_timeline_get_absolute_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup); -SPINE_C_EXPORT float spine_translate_y_timeline_get_absolute_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_EXPORT float spine_translate_y_timeline_get_absolute_value_6(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); SPINE_C_EXPORT float spine_translate_y_timeline_get_scale_value(spine_translate_y_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); -SPINE_C_EXPORT int32_t spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline obj); -SPINE_C_EXPORT void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline obj, int32_t value); +SPINE_C_EXPORT int spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline obj); +SPINE_C_EXPORT void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline obj, int value); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/types.h b/spine-c-new/src/generated/types.h new file mode 100644 index 000000000..4b5c4611c --- /dev/null +++ b/spine-c-new/src/generated/types.h @@ -0,0 +1,194 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated April 5, 2025. Replaces all prior versions. + * + * Copyright (c) 2013-2025, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_C_TYPES_H +#define SPINE_C_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../base.h" + +// Forward declarations for all non-enum types +SPINE_OPAQUE_TYPE(spine_animation) +SPINE_OPAQUE_TYPE(spine_track_entry) +SPINE_OPAQUE_TYPE(spine_event_queue_entry) +SPINE_OPAQUE_TYPE(spine_animation_state) +SPINE_OPAQUE_TYPE(spine_animation_state_data) +SPINE_OPAQUE_TYPE(spine_atlas_page) +SPINE_OPAQUE_TYPE(spine_atlas_region) +SPINE_OPAQUE_TYPE(spine_atlas) +SPINE_OPAQUE_TYPE(spine_atlas_attachment_loader) +SPINE_OPAQUE_TYPE(spine_attachment) +SPINE_OPAQUE_TYPE(spine_attachment_loader) +SPINE_OPAQUE_TYPE(spine_attachment_timeline) +SPINE_OPAQUE_TYPE(spine_block) +SPINE_OPAQUE_TYPE(spine_bone) +SPINE_OPAQUE_TYPE(spine_bone_data) +SPINE_OPAQUE_TYPE(spine_bone_local) +SPINE_OPAQUE_TYPE(spine_bone_pose) +SPINE_OPAQUE_TYPE(spine_bone_timeline) +SPINE_OPAQUE_TYPE(spine_bone_timeline1) +SPINE_OPAQUE_TYPE(spine_bone_timeline2) +SPINE_OPAQUE_TYPE(spine_bounding_box_attachment) +SPINE_OPAQUE_TYPE(spine_clipping_attachment) +SPINE_OPAQUE_TYPE(spine_color) +SPINE_OPAQUE_TYPE(spine_rgba_timeline) +SPINE_OPAQUE_TYPE(spine_rgb_timeline) +SPINE_OPAQUE_TYPE(spine_alpha_timeline) +SPINE_OPAQUE_TYPE(spine_rgba2_timeline) +SPINE_OPAQUE_TYPE(spine_rgb2_timeline) +SPINE_OPAQUE_TYPE(spine_constraint) +SPINE_OPAQUE_TYPE(spine_constraint_data) +SPINE_OPAQUE_TYPE(spine_constraint_timeline) +SPINE_OPAQUE_TYPE(spine_constraint_timeline1) +SPINE_OPAQUE_TYPE(spine_curve_timeline) +SPINE_OPAQUE_TYPE(spine_curve_timeline1) +SPINE_OPAQUE_TYPE(spine_curve_timeline2) +SPINE_OPAQUE_TYPE(spine_deform_timeline) +SPINE_OPAQUE_TYPE(spine_draw_order_timeline) +SPINE_OPAQUE_TYPE(spine_event) +SPINE_OPAQUE_TYPE(spine_event_data) +SPINE_OPAQUE_TYPE(spine_event_timeline) +SPINE_OPAQUE_TYPE(spine_ik_constraint) +SPINE_OPAQUE_TYPE(spine_ik_constraint_data) +SPINE_OPAQUE_TYPE(spine_ik_constraint_pose) +SPINE_OPAQUE_TYPE(spine_ik_constraint_timeline) +SPINE_OPAQUE_TYPE(spine_inherit_timeline) +SPINE_OPAQUE_TYPE(spine_linked_mesh) +SPINE_OPAQUE_TYPE(spine_interpolation) +SPINE_OPAQUE_TYPE(spine_pow_interpolation) +SPINE_OPAQUE_TYPE(spine_pow_out_interpolation) +SPINE_OPAQUE_TYPE(spine_mesh_attachment) +SPINE_OPAQUE_TYPE(spine_path_attachment) +SPINE_OPAQUE_TYPE(spine_path_constraint) +SPINE_OPAQUE_TYPE(spine_path_constraint_data) +SPINE_OPAQUE_TYPE(spine_path_constraint_mix_timeline) +SPINE_OPAQUE_TYPE(spine_path_constraint_pose) +SPINE_OPAQUE_TYPE(spine_path_constraint_position_timeline) +SPINE_OPAQUE_TYPE(spine_path_constraint_spacing_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint) +SPINE_OPAQUE_TYPE(spine_physics_constraint_data) +SPINE_OPAQUE_TYPE(spine_physics_constraint_pose) +SPINE_OPAQUE_TYPE(spine_physics_constraint_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_inertia_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_strength_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_damping_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_mass_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_wind_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_gravity_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_mix_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_reset_timeline) +SPINE_OPAQUE_TYPE(spine_point_attachment) +SPINE_OPAQUE_TYPE(spine_posed) +SPINE_OPAQUE_TYPE(spine_posed_active) +SPINE_OPAQUE_TYPE(spine_posed_data) +SPINE_OPAQUE_TYPE(spine_rtti) +SPINE_OPAQUE_TYPE(spine_region_attachment) +SPINE_OPAQUE_TYPE(spine_rotate_timeline) +SPINE_OPAQUE_TYPE(spine_scale_timeline) +SPINE_OPAQUE_TYPE(spine_scale_x_timeline) +SPINE_OPAQUE_TYPE(spine_scale_y_timeline) +SPINE_OPAQUE_TYPE(spine_sequence) +SPINE_OPAQUE_TYPE(spine_sequence_timeline) +SPINE_OPAQUE_TYPE(spine_shear_timeline) +SPINE_OPAQUE_TYPE(spine_shear_x_timeline) +SPINE_OPAQUE_TYPE(spine_shear_y_timeline) +SPINE_OPAQUE_TYPE(spine_skeleton) +SPINE_OPAQUE_TYPE(spine_skeleton_binary) +SPINE_OPAQUE_TYPE(spine_skeleton_bounds) +SPINE_OPAQUE_TYPE(spine_polygon) +SPINE_OPAQUE_TYPE(spine_skeleton_data) +SPINE_OPAQUE_TYPE(spine_skeleton_json) +SPINE_OPAQUE_TYPE(spine_render_command) +SPINE_OPAQUE_TYPE(spine_skeleton_renderer) +SPINE_OPAQUE_TYPE(spine_skin) +SPINE_OPAQUE_TYPE(spine_slider) +SPINE_OPAQUE_TYPE(spine_slider_data) +SPINE_OPAQUE_TYPE(spine_slider_mix_timeline) +SPINE_OPAQUE_TYPE(spine_slider_pose) +SPINE_OPAQUE_TYPE(spine_slider_timeline) +SPINE_OPAQUE_TYPE(spine_slot) +SPINE_OPAQUE_TYPE(spine_slot_curve_timeline) +SPINE_OPAQUE_TYPE(spine_slot_data) +SPINE_OPAQUE_TYPE(spine_slot_pose) +SPINE_OPAQUE_TYPE(spine_slot_timeline) +SPINE_OPAQUE_TYPE(spine_texture_region) +SPINE_OPAQUE_TYPE(spine_timeline) +SPINE_OPAQUE_TYPE(spine_transform_constraint) +SPINE_OPAQUE_TYPE(spine_from_property) +SPINE_OPAQUE_TYPE(spine_to_property) +SPINE_OPAQUE_TYPE(spine_from_rotate) +SPINE_OPAQUE_TYPE(spine_to_rotate) +SPINE_OPAQUE_TYPE(spine_from_x) +SPINE_OPAQUE_TYPE(spine_to_x) +SPINE_OPAQUE_TYPE(spine_from_y) +SPINE_OPAQUE_TYPE(spine_to_y) +SPINE_OPAQUE_TYPE(spine_from_scale_x) +SPINE_OPAQUE_TYPE(spine_to_scale_x) +SPINE_OPAQUE_TYPE(spine_from_scale_y) +SPINE_OPAQUE_TYPE(spine_to_scale_y) +SPINE_OPAQUE_TYPE(spine_from_shear_y) +SPINE_OPAQUE_TYPE(spine_to_shear_y) +SPINE_OPAQUE_TYPE(spine_transform_constraint_data) +SPINE_OPAQUE_TYPE(spine_transform_constraint_pose) +SPINE_OPAQUE_TYPE(spine_transform_constraint_timeline) +SPINE_OPAQUE_TYPE(spine_translate_timeline) +SPINE_OPAQUE_TYPE(spine_translate_x_timeline) +SPINE_OPAQUE_TYPE(spine_translate_y_timeline) +SPINE_OPAQUE_TYPE(spine_update) +SPINE_OPAQUE_TYPE(spine_vertex_attachment) +SPINE_OPAQUE_TYPE(spine_vertices) + +// Include all enum types (cannot be forward declared) +#include "event_type.h" +#include "format.h" +#include "texture_filter.h" +#include "texture_wrap.h" +#include "attachment_type.h" +#include "blend_mode.h" +#include "inherit.h" +#include "mix_blend.h" +#include "mix_direction.h" +#include "physics.h" +#include "position_mode.h" +#include "property.h" +#include "rotate_mode.h" +#include "sequence_mode.h" +#include "spacing_mode.h" + +// Array specializations +#include "arrays.h" + +#ifdef __cplusplus +} +#endif + +#endif // SPINE_C_TYPES_H \ No newline at end of file diff --git a/spine-c-new/src/generated/update.cpp b/spine-c-new/src/generated/update.cpp index a2384ed1f..326ef9c19 100644 --- a/spine-c-new/src/generated/update.cpp +++ b/spine-c-new/src/generated/update.cpp @@ -32,24 +32,17 @@ using namespace spine; -spine_update spine_update_create(void) { - Update *obj = new (__FILE__, __LINE__) Update(); - return (spine_update) obj; -} - void spine_update_dispose(spine_update obj) { if (!obj) return; delete (Update *) obj; } -spine_rtti spine_update_get_rtti(spine_update obj) { - if (!obj) return nullptr; - Update *_obj = (Update *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_update_get_rtti() { + return (spine_rtti) &Update::rtti; } void spine_update_update(spine_update obj, spine_skeleton skeleton, spine_physics physics) { if (!obj) return ; Update *_obj = (Update *) obj; - _obj->update(skeleton, physics); + _obj->update(*(Skeleton*) skeleton, (Physics) physics); } diff --git a/spine-c-new/src/generated/update.h b/spine-c-new/src/generated/update.h index f8fc04570..5b29c0067 100644 --- a/spine-c-new/src/generated/update.h +++ b/spine-c-new/src/generated/update.h @@ -34,13 +34,10 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_update) - -SPINE_C_EXPORT spine_update spine_update_create(void); SPINE_C_EXPORT void spine_update_dispose(spine_update obj); -SPINE_C_EXPORT spine_rtti spine_update_get_rtti(spine_update obj); +SPINE_C_EXPORT spine_rtti spine_update_get_rtti(); SPINE_C_EXPORT void spine_update_update(spine_update obj, spine_skeleton skeleton, spine_physics physics); #ifdef __cplusplus diff --git a/spine-c-new/src/generated/vertex_attachment.cpp b/spine-c-new/src/generated/vertex_attachment.cpp index 26f56e9b3..b99c26699 100644 --- a/spine-c-new/src/generated/vertex_attachment.cpp +++ b/spine-c-new/src/generated/vertex_attachment.cpp @@ -32,68 +32,49 @@ using namespace spine; -spine_vertex_attachment spine_vertex_attachment_create(const utf8 * name) { - VertexAttachment *obj = new (__FILE__, __LINE__) VertexAttachment(String(name)); - return (spine_vertex_attachment) obj; -} - void spine_vertex_attachment_dispose(spine_vertex_attachment obj) { if (!obj) return; delete (VertexAttachment *) obj; } -spine_rtti spine_vertex_attachment_get_rtti(spine_vertex_attachment obj) { - if (!obj) return nullptr; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (spine_rtti) &_obj->getRTTI(); +spine_rtti spine_vertex_attachment_get_rtti() { + return (spine_rtti) &VertexAttachment::rtti; } -void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { if (!obj) return ; VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); } -void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) { +void spine_vertex_attachment_compute_world_vertices_7(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { if (!obj) return ; VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->computeWorldVertices(skeleton, slot, start, count, (Vector &) worldVertices, offset, stride); + _obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); } -int32_t spine_vertex_attachment_get_id(spine_vertex_attachment obj) { +int spine_vertex_attachment_get_id(spine_vertex_attachment obj) { if (!obj) return 0; VertexAttachment *_obj = (VertexAttachment *) obj; return _obj->getId(); } -int32_t * spine_vertex_attachment_get_bones(spine_vertex_attachment obj) { - if (!obj) return 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return _obj->getBones(); -} - int32_t spine_vertex_attachment_get_num_bones(spine_vertex_attachment obj) { if (!obj) return 0; VertexAttachment *_obj = (VertexAttachment *) obj; return (int32_t) _obj->getBones().size(); } -int32_t *spine_vertex_attachment_get_bones(spine_vertex_attachment obj) { +int *spine_vertex_attachment_get_bones(spine_vertex_attachment obj) { if (!obj) return nullptr; VertexAttachment *_obj = (VertexAttachment *) obj; - return (int32_t *) _obj->getBones().buffer(); + return (int *) _obj->getBones().buffer(); } -void spine_vertex_attachment_set_bones(spine_vertex_attachment obj, int32_t * value) { +void spine_vertex_attachment_set_bones(spine_vertex_attachment obj, spine_array_int value) { if (!obj) return; VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->setBones((Vector &) value); -} - -void * spine_vertex_attachment_get_vertices(spine_vertex_attachment obj) { - if (!obj) return nullptr; - VertexAttachment *_obj = (VertexAttachment *) obj; - return _obj->getVertices(); + _obj->setBones((Array &) value); } int32_t spine_vertex_attachment_get_num_vertices(spine_vertex_attachment obj) { @@ -102,32 +83,32 @@ int32_t spine_vertex_attachment_get_num_vertices(spine_vertex_attachment obj) { return (int32_t) _obj->getVertices().size(); } -spine_float *spine_vertex_attachment_get_vertices(spine_vertex_attachment obj) { +float *spine_vertex_attachment_get_vertices(spine_vertex_attachment obj) { if (!obj) return nullptr; VertexAttachment *_obj = (VertexAttachment *) obj; - return (spine_float *) _obj->getVertices().buffer(); + return (float *) _obj->getVertices().buffer(); } -void spine_vertex_attachment_set_vertices(spine_vertex_attachment obj, void * value) { +void spine_vertex_attachment_set_vertices(spine_vertex_attachment obj, spine_array_float value) { if (!obj) return; VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->setVertices((Vector &) value); + _obj->setVertices((Array &) value); } -spine_size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment obj) { - if (!obj) return nullptr; +size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment obj) { + if (!obj) return 0; VertexAttachment *_obj = (VertexAttachment *) obj; return _obj->getWorldVerticesLength(); } -void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment obj, spine_size_t value) { +void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment obj, size_t value) { if (!obj) return; VertexAttachment *_obj = (VertexAttachment *) obj; _obj->setWorldVerticesLength(value); } spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; VertexAttachment *_obj = (VertexAttachment *) obj; return (spine_attachment) _obj->getTimelineAttachment(); } @@ -144,19 +125,19 @@ void spine_vertex_attachment_copy_to(spine_vertex_attachment obj, spine_vertex_a _obj->copyTo((VertexAttachment *) other); } -const utf8 * spine_vertex_attachment_get_name(spine_vertex_attachment obj) { +const char* spine_vertex_attachment_get_name(spine_vertex_attachment obj) { if (!obj) return nullptr; VertexAttachment *_obj = (VertexAttachment *) obj; - return (const utf8 *) _obj->getName().buffer(); + return (const char *) _obj->getName().buffer(); } spine_attachment spine_vertex_attachment_copy(spine_vertex_attachment obj) { - if (!obj) return nullptr; + if (!obj) return (spine_attachment) 0; VertexAttachment *_obj = (VertexAttachment *) obj; return (spine_attachment) _obj->copy(); } -int32_t spine_vertex_attachment_get_ref_count(spine_vertex_attachment obj) { +int spine_vertex_attachment_get_ref_count(spine_vertex_attachment obj) { if (!obj) return 0; VertexAttachment *_obj = (VertexAttachment *) obj; return _obj->getRefCount(); diff --git a/spine-c-new/src/generated/vertex_attachment.h b/spine-c-new/src/generated/vertex_attachment.h index cc6c43872..a55ca0d5c 100644 --- a/spine-c-new/src/generated/vertex_attachment.h +++ b/spine-c-new/src/generated/vertex_attachment.h @@ -34,32 +34,27 @@ extern "C" { #endif -#include "../custom.h" +#include "types.h" -SPINE_OPAQUE_TYPE(spine_vertex_attachment) - -SPINE_C_EXPORT spine_vertex_attachment spine_vertex_attachment_create(const utf8 * name); SPINE_C_EXPORT void spine_vertex_attachment_dispose(spine_vertex_attachment obj); -SPINE_C_EXPORT spine_rtti spine_vertex_attachment_get_rtti(spine_vertex_attachment obj); -SPINE_C_EXPORT void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride); -SPINE_C_EXPORT int32_t spine_vertex_attachment_get_id(spine_vertex_attachment obj); -SPINE_C_EXPORT int32_t * spine_vertex_attachment_get_bones(spine_vertex_attachment obj); +SPINE_C_EXPORT spine_rtti spine_vertex_attachment_get_rtti(); +SPINE_C_EXPORT void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT void spine_vertex_attachment_compute_world_vertices_7(spine_vertex_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_EXPORT int spine_vertex_attachment_get_id(spine_vertex_attachment obj); SPINE_C_EXPORT int32_t spine_vertex_attachment_get_num_bones(spine_vertex_attachment obj); -SPINE_C_EXPORT int32_t *spine_vertex_attachment_get_bones(spine_vertex_attachment obj); -SPINE_C_EXPORT void spine_vertex_attachment_set_bones(spine_vertex_attachment obj, int32_t * value); -SPINE_C_EXPORT void * spine_vertex_attachment_get_vertices(spine_vertex_attachment obj); +SPINE_C_EXPORT int *spine_vertex_attachment_get_bones(spine_vertex_attachment obj); +SPINE_C_EXPORT void spine_vertex_attachment_set_bones(spine_vertex_attachment obj, spine_array_int value); SPINE_C_EXPORT int32_t spine_vertex_attachment_get_num_vertices(spine_vertex_attachment obj); -SPINE_C_EXPORT spine_float *spine_vertex_attachment_get_vertices(spine_vertex_attachment obj); -SPINE_C_EXPORT void spine_vertex_attachment_set_vertices(spine_vertex_attachment obj, void * value); -SPINE_C_EXPORT spine_size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment obj); -SPINE_C_EXPORT void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment obj, spine_size_t value); +SPINE_C_EXPORT float *spine_vertex_attachment_get_vertices(spine_vertex_attachment obj); +SPINE_C_EXPORT void spine_vertex_attachment_set_vertices(spine_vertex_attachment obj, spine_array_float value); +SPINE_C_EXPORT size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment obj); +SPINE_C_EXPORT void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment obj, size_t value); SPINE_C_EXPORT spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment obj); SPINE_C_EXPORT void spine_vertex_attachment_set_timeline_attachment(spine_vertex_attachment obj, spine_attachment value); SPINE_C_EXPORT void spine_vertex_attachment_copy_to(spine_vertex_attachment obj, spine_vertex_attachment other); -SPINE_C_EXPORT const utf8 * spine_vertex_attachment_get_name(spine_vertex_attachment obj); +SPINE_C_EXPORT const char* spine_vertex_attachment_get_name(spine_vertex_attachment obj); SPINE_C_EXPORT spine_attachment spine_vertex_attachment_copy(spine_vertex_attachment obj); -SPINE_C_EXPORT int32_t spine_vertex_attachment_get_ref_count(spine_vertex_attachment obj); +SPINE_C_EXPORT int spine_vertex_attachment_get_ref_count(spine_vertex_attachment obj); SPINE_C_EXPORT void spine_vertex_attachment_reference(spine_vertex_attachment obj); SPINE_C_EXPORT void spine_vertex_attachment_dereference(spine_vertex_attachment obj); diff --git a/spine-c-new/src/generated/vertices.h b/spine-c-new/src/generated/vertices.h index 61688a3f7..0edacd579 100644 --- a/spine-c-new/src/generated/vertices.h +++ b/spine-c-new/src/generated/vertices.h @@ -34,9 +34,7 @@ extern "C" { #endif -#include "../custom.h" - -SPINE_OPAQUE_TYPE(spine_vertices) +#include "types.h" SPINE_C_EXPORT void spine_vertices_dispose(spine_vertices obj); diff --git a/spine-c-new/test/test.c b/spine-c-new/test/test.c index 27570825d..f6315b307 100644 --- a/spine-c-new/test/test.c +++ b/spine-c-new/test/test.c @@ -1,4 +1,5 @@ #include +#include #include int main() { @@ -10,11 +11,12 @@ int main() { // Test debug extension spine_enable_debug_extension(1); - // Test creating bounds - spine_bounds bounds = (spine_bounds)malloc(sizeof(struct spine_bounds_wrapper)); - if (bounds) { - printf("Successfully created bounds\n"); - free(bounds); + // Test loading an atlas (will fail but tests the API) + spine_atlas atlas = spine_atlas_load("test.atlas"); + if (!atlas) { + printf("Failed to load atlas (expected)\n"); + } else { + spine_atlas_dispose(atlas); } // Report any memory leaks